Ver código fonte

平面图接口调整

zhulizhen 6 anos atrás
pai
commit
edccb86a74

+ 11 - 11
src/components/business_space/graphy/business.vue

@@ -217,10 +217,7 @@
         deleteRelation, //删除关系
         isAbut
     } from "@/api/scan/request";
-    import {
-        mapGetters,
-        mapActions
-    } from "vuex";
+    import {mapGetters, mapActions} from "vuex";
     export default {
         name: "HelloWorld",
         props: {
@@ -250,9 +247,9 @@
                 canvasH: 600,
                 canvasW: 800,
                 param: {
-                    ProjId: this.$route.query.projId, //项目id
-                    UserId: this.$route.query.userId, //用户id
-                    secret: this.$route.query.secret
+                    ProjId: "", //项目id
+                    UserId: "", //用户id
+                    secret: ""
                 },
                 myDialogVisible: false,
                 wallList: [], //处理后的墙的线条
@@ -287,6 +284,9 @@
             };
         },
         created() {
+            this.param.ProjId = this.projectId
+            this.param.secret = this.secret
+            this.param.UserId = this.userId
             // this.getJson("Fl110108000327d8f006c39f49feb40e24a7ef22323220181119025802bim.jsonz")
             // this.getJson("bim.jsonz")
         },
@@ -341,8 +341,8 @@
                             ]
                         },
                     },
-                    ProjId: this.projectId,
-                    secret: this.secret
+                    ProjId: this.param.ProjId,
+                    secret: this.param.secret
                 }
                 getBussines2(param)
                     .then(res => {
@@ -505,8 +505,8 @@
                 formBIMToPri({
                         type: ["Si"],
                         ids: ids,
-                        ProjId: this.projectId,
-                        secret: this.secret
+                        ProjId: this.param.ProjId,
+                        secret: this.param.secret
                     })
                     .then(res => {
                         if (res.data.Result == "success") {

+ 14 - 3
src/views/data_admin/buildGraphy/graphyCanvas.vue

@@ -89,7 +89,7 @@ class MainScene extends SGraphyScene {
 
 import { updatePoint, getPoint, formBIMToPri, getPointList, updateBusiness } from "@/api/scan/request";
 import pako from '@/assets/pako/pako'
-
+import {mapGetters, mapActions} from "vuex";
 export default {
   name: "HelloWorld",
   props: {
@@ -122,7 +122,18 @@ export default {
         "http://prod.dp.sagacloud.cn:28888/image-service/common/image_get?systemId=dev&key=graphy.png"
     };
   },
-  created() { },
+  computed: {
+      ...mapGetters("peojMess", [
+          "projectId",
+          "secret",
+          "userId"
+      ])
+  },
+  created() {
+    this.param.ProjId = this.projectId
+    this.param.secret = this.secret
+    this.param.UserId = this.userId
+   },
   mounted() {
     this.resize()
   },
@@ -448,7 +459,7 @@ export default {
       await formBIMToPri({
         type: ["Si"],
         ids: ids,
-        ProjId: this.param.projId,
+        ProjId: this.param.ProjId,
         secret: this.param.secret
       })
         .then(res => {