|
@@ -190,9 +190,9 @@ export default {
|
|
|
// 读取绘制数据
|
|
|
readGraph() {
|
|
|
this.readGroup().then(data => {
|
|
|
- this.graphId = data.Data[0].ID;
|
|
|
- bus.$emit("setGraphId", this.graphId);
|
|
|
if (data.Data) {
|
|
|
+ this.graphId = data.Data[0].ID;
|
|
|
+ bus.$emit("setGraphId", this.graphId);
|
|
|
const parserData = new STopologyParser(null);
|
|
|
const itemMap = {};
|
|
|
parserData.parseData(data.Data[0].Elements);
|
|
@@ -266,14 +266,14 @@ export default {
|
|
|
t.endAnchor = endAnc || null;
|
|
|
}
|
|
|
});
|
|
|
- this.view.fitSceneToView();
|
|
|
- // 设置初始化缩放比例
|
|
|
- this.initScale = this.view.scale;
|
|
|
- this.view.maxScale = this.initScale * 10;
|
|
|
- this.view.minScale = this.initScale / 10;
|
|
|
- bus.$emit("initScale", this.view.scale);
|
|
|
- bus.$emit("elementDataChange", this.scene);
|
|
|
}
|
|
|
+ this.view.fitSceneToView();
|
|
|
+ // 设置初始化缩放比例
|
|
|
+ this.initScale = this.view.scale;
|
|
|
+ this.view.maxScale = this.initScale * 10;
|
|
|
+ this.view.minScale = this.initScale / 10;
|
|
|
+ bus.$emit("initScale", this.view.scale);
|
|
|
+ bus.$emit("elementDataChange", this.scene);
|
|
|
this.loadings.close()
|
|
|
});
|
|
|
},
|