|
@@ -24,7 +24,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="对象实例位置图:">
|
|
|
<span v-if="!drawCanvas">--</span>
|
|
|
- <canvas v-else height="300px" width="600" class="instanceMap" :id="form.instanceId" v-loading="form.loading"></canvas>
|
|
|
+ <canvas v-else height="300px" width="600" class="instanceMap" :id="form.instanceId" v-loading="form.loading" :k="refreshCanvas"></canvas>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -71,8 +71,6 @@ export default {
|
|
|
getTabFunNumObjInstance(pa, res => {
|
|
|
that.loading = false;
|
|
|
that.forms = res.Content;
|
|
|
- //清除画布
|
|
|
- that.clearGraphy()
|
|
|
//实例化所有实例
|
|
|
res.Content.map((item, key) => {
|
|
|
if (item.ObjectID) {
|
|
@@ -91,8 +89,7 @@ export default {
|
|
|
Filters: `FloorId='${res1.Content[0].FloorId}'`
|
|
|
}
|
|
|
getFloorMsgByFloorID(param, res2 => {
|
|
|
- // this.clearGraphy();
|
|
|
- // that.refreshCanvas = new Date().getTime();
|
|
|
+ that.refreshCanvas = new Date().getTime();
|
|
|
if(!that.views[key]){
|
|
|
that.views[key] = new SGraphyView(`${that.forms[key].instanceId}`)
|
|
|
}
|
|
@@ -138,8 +135,7 @@ export default {
|
|
|
Filters: `FloorId='${res1.Content[0].FloorId}'`
|
|
|
}
|
|
|
getFloorMsgByFloorID(param, res2 => {
|
|
|
- // this.clearGraphy();
|
|
|
- // that.refreshCanvas = new Date().getTime();
|
|
|
+ that.refreshCanvas = new Date().getTime();
|
|
|
if(!that.views[key]){
|
|
|
that.views[key] = new SGraphyView(`${that.forms[key].instanceId}`)
|
|
|
}
|
|
@@ -180,14 +176,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
- },
|
|
|
- //清除画布
|
|
|
- clearGraphy() {
|
|
|
- if (this.views.length) {
|
|
|
- this.views = [];
|
|
|
- // this.scenes.map(())
|
|
|
- this.scenes = [];
|
|
|
- }
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|