fix:修复背景图片无法上传的bug 以及切换project无法更换project的问题

This commit is contained in:
zhangyu
2021-03-18 10:59:19 +08:00
parent 93c9016c3e
commit b907e2beb2
3 changed files with 14 additions and 3 deletions

View File

@@ -679,6 +679,10 @@
methods:{
init(){
canvasOptions.on=this.onMessage;
if(getTopology(this.topologyIndex)){
getTopology(this.topologyIndex).open({});
getTopology(this.topologyIndex).render()
}
this.reload();
},
@@ -797,6 +801,8 @@
let canvas=new Topology('topology-canvas'+this.topologyIndexF,canvasOptions);
canvas.open(data);
setTopology(this.topologyIndex,canvas);
}else{
getTopology(this.topologyIndex).open(data);
}
this.topologyLoading=false;
if(!getTopology(this.topologyIndex).data.name){
@@ -879,7 +885,9 @@
this.projectInfoShow=data.data.projectInfo;
this.projectAlertShow=data.data.alertInfo;
}
if(!data.bkImage){
data.bkImage=undefined;
}
Promise.all(promiseArr).then(res=>{
res.forEach((response,index)=>{
let item=data.pens[index];
@@ -2059,6 +2067,9 @@
zoomMap(num){
getTopology(this.topologyIndex).scaleTo(getTopology(this.topologyIndex).data.scale+num);
},
penToBottom(){
getTopology(this.topologyIndex).bottom()
},
},
destroyed(){
getTopology(this.topologyIndex).destroy();