|
@@ -7,7 +7,7 @@
|
|
|
:before-close="handleClose"
|
|
|
>
|
|
|
<div class="bodys">
|
|
|
- <el-cascader :props="props" :show-all-levels="false" @change="handleChange"></el-cascader>
|
|
|
+ <el-cascader :props="props" :show-all-levels="false" @change="handleChange" placeholder="请选择模型文件"></el-cascader>
|
|
|
<div>
|
|
|
或
|
|
|
<el-button type="text">上传图片</el-button>
|
|
@@ -37,17 +37,14 @@ let id = 0;
|
|
|
import drawFloor from "./drawFloor";
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
import request from "@/api/model/file.js";
|
|
|
+import { floorUpdate } from "@/api/scan/request";
|
|
|
export default {
|
|
|
components: {
|
|
|
drawFloor
|
|
|
},
|
|
|
props: {
|
|
|
checkGraphyVisible: Boolean,
|
|
|
- jsonKey: {
|
|
|
- type: String,
|
|
|
- default: "",
|
|
|
- required: false
|
|
|
- }
|
|
|
+ checkGraphyItem: Object
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters("layout", ["projectId"])
|
|
@@ -55,11 +52,13 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
value: "",
|
|
|
- dataKey:'',
|
|
|
+ dataKey: "", //url
|
|
|
+ jsonKey: "", //map.josn
|
|
|
point: [40703.54760591985, 42678.14510522981], //坐标
|
|
|
pointWidth: 2000,
|
|
|
- findGraphyItemId: "", //高亮的id
|
|
|
- props: { //联级框
|
|
|
+ findGraphyItemId: "", //高亮的i
|
|
|
+ props: {
|
|
|
+ //联级框
|
|
|
lazy: true,
|
|
|
lazyLoad(node, resolve) {
|
|
|
const { level } = node;
|
|
@@ -80,17 +79,17 @@ export default {
|
|
|
ProjectId: this.projectId
|
|
|
};
|
|
|
request.queryFloorList(data, res => {
|
|
|
- const nodes = Array.from(res.Content).map(item => ({
|
|
|
- value: item.Url,
|
|
|
- label: item.FloorName,
|
|
|
- leaf: level >= 1
|
|
|
- }));
|
|
|
- // 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
|
|
- resolve(nodes);
|
|
|
+ const nodes = Array.from(res.Content).map(item => ({
|
|
|
+ value: item.Url,
|
|
|
+ label: item.FloorName,
|
|
|
+ leaf: level >= 1
|
|
|
+ }));
|
|
|
+ // 通过调用resolve将子节点数据返回,通知组件数据加载完成
|
|
|
+ resolve(nodes);
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- },
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -98,7 +97,34 @@ export default {
|
|
|
this.$emit("handleCloseCGraphy");
|
|
|
},
|
|
|
// 绑定图片
|
|
|
- bindGraphy() {},
|
|
|
+ bindGraphy() {
|
|
|
+ if(!this.jsonKey){
|
|
|
+ this.$message.warning("请选择模型文件");
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let data = {
|
|
|
+ Content: [
|
|
|
+ {
|
|
|
+ FloorID: this.checkGraphyItem.FloorID,
|
|
|
+ StructureInfo: {
|
|
|
+ FloorMap: this.jsonKey
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ floorUpdate(data, res => {
|
|
|
+ if (res.Result == "success") {
|
|
|
+ this.$message.success("添加成功");
|
|
|
+ this.handleClose()
|
|
|
+ } else {
|
|
|
+ if (res.Message) {
|
|
|
+ this.$message.warning(res.Message);
|
|
|
+ } else {
|
|
|
+ this.$message.warning("绑定失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
initOption() {
|
|
|
// let data = {
|
|
|
// FloorName: item.FloorLocalName,
|
|
@@ -109,8 +135,10 @@ export default {
|
|
|
return new Promose((resolve, reject) => {});
|
|
|
},
|
|
|
// 点击多级联动
|
|
|
- handleChange(val){
|
|
|
- this.dataKey = val[1];
|
|
|
+ handleChange(val) {
|
|
|
+ console.log(val)
|
|
|
+ // this.jsonKey = val[1];
|
|
|
+ // this.dataKey = `/image-service/common/file_get/${this.jsonKey}?systemId=revit`;
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|