|
@@ -10,9 +10,9 @@
|
|
|
|
|
|
<script>
|
|
|
import eventBus from "./bus.js";
|
|
|
-import { SGraphyView } from "@sybotan-web/graphy/lib";
|
|
|
-import { DivideFloorScene } from "cad-engine"
|
|
|
-import { SColor, SPoint } from "@sybotan-web/draw/lib";
|
|
|
+import { SGraphyView } from "@saga-web/graphy/lib";
|
|
|
+import { DivideFloorScene } from "@saga-web/cad-engine/lib"
|
|
|
+import { SColor, SPoint } from "@saga-web/draw/lib";
|
|
|
import canvasFun from "@/components/business_space/newGraphy/canvasFun"
|
|
|
import { floorQuery } from "@/api/scan/request";
|
|
|
export default {
|
|
@@ -59,6 +59,12 @@ export default {
|
|
|
that.drawMainScene = new DivideFloorScene();
|
|
|
that.canvasLoading = true;
|
|
|
that.drawMainScene.getFloorData('/modelapi/base-graph/query', { ModelId: ModelId }).then(res => {
|
|
|
+ that.canvasLoading = false;
|
|
|
+ if (res.Result == 'failure') {
|
|
|
+ this.showTools = false;
|
|
|
+ that.$message.warning(res.Message);
|
|
|
+ return;
|
|
|
+ }
|
|
|
let Elements = res.EntityList[0].Elements;
|
|
|
let flag = false;
|
|
|
for (let key in Elements) {
|
|
@@ -69,7 +75,6 @@ export default {
|
|
|
if (flag) {
|
|
|
that.view.scene = that.drawMainScene
|
|
|
that.view.fitSceneToView();
|
|
|
- that.canvasLoading = false;
|
|
|
that.view.maxScale = that.view.scale * 10;
|
|
|
that.view.minScale = that.view.scale;
|
|
|
that.drawMainScene.isSpaceSelectable = false;
|