|
@@ -33,7 +33,8 @@ export default {
|
|
|
config: {
|
|
|
isEdit: false,
|
|
|
divide: true
|
|
|
- }
|
|
|
+ },
|
|
|
+ shadeList: []
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -53,7 +54,7 @@ export default {
|
|
|
created() {
|
|
|
this.FloorID = this.$route.query.FloorID;
|
|
|
if (!this.dialog) {
|
|
|
- this.getFloorData();
|
|
|
+ this.init();
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -61,6 +62,11 @@ export default {
|
|
|
this.cadHeight = document.getElementById(`drawFloor${this.id}`).offsetHeight;
|
|
|
},
|
|
|
methods: {
|
|
|
+ //
|
|
|
+ init(){
|
|
|
+ this.getFloorData();
|
|
|
+ this.getOtherFloorOutLine();
|
|
|
+ },
|
|
|
// 初始化canvas
|
|
|
initGraphy(Id, type) {
|
|
|
// type=1 => id:模型id
|
|
@@ -121,14 +127,23 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 获取绑定该模型id的其他楼层轮廓线
|
|
|
- getOtherFloorOutLine(){
|
|
|
- let modelid = this.$route.query.modelId;
|
|
|
+ getOtherFloorOutLine() {
|
|
|
+ let modelid = this.$route.query.modelId;
|
|
|
let pa = {
|
|
|
Filters: `ModelId='${modelid}'`
|
|
|
}
|
|
|
+ this.shadeList = [];
|
|
|
floorQuery(pa, res => {
|
|
|
- console.log(res)
|
|
|
- })
|
|
|
+ res.Content.map(t => {
|
|
|
+ if (t.FloorID != this.FloorID && t.Outline && t.Outline.length) {
|
|
|
+ let line = t.Outline.map(item => {
|
|
|
+ return new SPoint(item.X, item.Y);
|
|
|
+ })
|
|
|
+ this.shadeList.push(line);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.drawMainScene.addAllShade(this.shadeList);
|
|
|
+ });
|
|
|
},
|
|
|
// 清空平面图
|
|
|
clearGraphy() {
|