Explorar o código

modify cadengine version

haojianlong %!s(int64=5) %!d(string=hai) anos
pai
achega
51fb98a433

+ 2 - 2
package.json

@@ -11,7 +11,7 @@
     },
     "dependencies": {
         "@sybotan-web/base": "2.0.54",
-        "@sybotan-web/draw": "2.0.111",
+        "@sybotan-web/draw": "2.0.114",
         "@sybotan-web/graphy": "2.0.90",
         "axios": "^0.18.0",
         "echarts": "^4.1.0",
@@ -23,7 +23,7 @@
         "vue-axios": "^2.1.4",
         "vue-router": "^3.0.1",
         "vuex": "^3.1.0",
-        "cad-engine": "2.0.36"
+        "cad-engine": "2.0.42"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 6 - 0
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -140,6 +140,12 @@ export default {
   },
   mounted() {
     this.initOption();
+  },
+  watch: {
+    projectId() {
+      // todo
+      this.initOption();
+    }
   }
 };
 </script>

+ 10 - 8
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -38,7 +38,7 @@ export default {
     },
     initColor: {
       type: Array,
-      default: function() {
+      default: function () {
         return [
           "#F9C3C3",
           "#FFD1BF",
@@ -88,19 +88,19 @@ export default {
   mounted() {
     this.initGraphy('3af6d175c34e11e993ac85337be80696');
     let that = this;
-    eventBus.$on("suitableRatios", function() {
+    eventBus.$on("suitableRatios", function () {
       that.view.fitSceneToView();
     });
-    eventBus.$on("changeRatios", function(val) {
+    eventBus.$on("changeRatios", function (val) {
       that.changeRatios(val);
     });
-    eventBus.$on("downImgs", function(val) {
+    eventBus.$on("downImgs", function (val) {
       that.view.saveImage("saveImage" + new Date(), "png");
     });
-    eventBus.$on("openDrags", function(val) {
-       if(val){
+    eventBus.$on("openDrags", function (val) {
+      if (val) {
 
-       }
+      }
     });
   },
   methods: {
@@ -123,13 +123,15 @@ export default {
       if (!this.dataKey) {
         return;
       }
+      let arr = ['3af6d175c34e11e993ac85337be80696', 'bd174039c32311e98359dfc652ba919b', '8544a3c3cd2611e99abc839db1015353']
+      let index = Math.floor(Math.random() * 3)
       this.drawMainScene = null;
       this.view = null;
       // 初始化view类
       this.view = new SGraphyView("canvas" + this.indexs);
       this.drawMainScene = new FloorScene(null);
       let that = this;
-      this.drawMainScene.getFloorData('/modelapi/base-graph/query',{ ModelId:ModelId }).then(res=>{
+      this.drawMainScene.getFloorData('/modelapi/base-graph/query', { ModelId: arr[index] }).then(res => {
         that.view.scene = that.drawMainScene
         that.view.fitSceneToView();
       })