Browse Source

Merge branch 'dev'

zhangyu 5 years ago
parent
commit
3e3d1f9357

+ 6 - 6
config/dev.env.js

@@ -4,12 +4,12 @@ const prodEnv = require('./prod.env')
 
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
-    // BASE_URL: '"http://172.16.44.215"', //测试iframe地址
-    // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
+    BASE_URL: '"http://172.16.44.215"', //测试iframe地址
+    SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
     // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
     // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
-    // MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
-    SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
-    BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
-    MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
+    MQTT_SERVICE: '"ws://172.16.42.210:61614/stomp/"' //MQ测试环境地址
+    // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
+    // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
+    // MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 })

+ 189 - 189
config/index.js

@@ -10,197 +10,197 @@ module.exports = {
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
 
-    proxyTable: {//正式环境
-      '/admin': {
-        target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/admin": "/"
-        }
-      },
-      '/api': {
-        target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/api": "/"
-        }
-      },
-      '/data-platform-3': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/business-space': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/business-space": "/dp-auxiliary/business-space/"
-        }
-      },
-      '/pointconfig': {
-        // 目标 API 地址
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/venders-dp': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/venders-dp": "/dp-auxiliary/venders-dp/"
-        }
-      },
-      '/venders': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/venders": "/dp-auxiliary/venders/"
-        }
-      },
-      '/ScanBuilding': {
-        // 目标 API 地址
-        target: 'http://mbi.sagacloud.cn:8080/',
-        // 如果要代理 websockets
-        ws: true,
-        // 将主机标头的原点更改为目标URL
-        changeOrigin: false
-      },
-      '/image-service': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/image-service": "/dp-auxiliary/image-service/"
-        }
-      },
-      '/godhand': {
-        // 目标 API 地址
-        target: 'http://api.sagacloud.cn',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/godhand": "/dp-auxiliary/godhand/"
-        }
-      },
-      '/modelapi': {
-        target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-          "^/modelapi": "/revit-algorithm/"
-        }
-      },
-      '/schedulerapi': {
-        target: 'http://mbi.sagacloud.cn:8080',
-        changeOrigin: true,
-        pathRewrite: {
-            "^/schedulerapi": "/scheduler/"
-        }
-      },
-    },
-
-    // proxyTable: {
-    //     '/admin': {
-    //         target: 'http://172.16.44.235:8080',
-    //         changeOrigin: true,
-    //         pathRewrite: {
-    //             "^/admin": "/"
-    //         }
-    //     },
-    //     '/api': {
-    //         target: 'http://172.16.44.235:8080',
-    //         changeOrigin: true,
-    //         pathRewrite: {
-    //             "^/api": "/"
-    //         }
-    //     },
-    //     '/data-platform-3': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/business-space': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/pointconfig': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.44.235:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/venders-dp': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/venders': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/ScanBuilding': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.44.235:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/image-service': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/godhand': {
-    //         // 目标 API 地址
-    //         target: 'http://172.16.42.210:8080/',
-    //         // 如果要代理 websockets
-    //         ws: true,
-    //         // 将主机标头的原点更改为目标URL
-    //         changeOrigin: false
-    //     },
-    //     '/modelapi': {
-    //         target: 'http://172.16.42.210:8082',
-    //         // target: 'http://192.168.20.218:8082',//景灏
-    //         changeOrigin: true,
-    //         pathRewrite: {
-    //             "^/modelapi": "/"
-    //         }
-    //     },
-    //     '/schedulerapi': {
-    //       target: 'http://172.16.42.210:8081',
-    //       changeOrigin: true,
-    //       pathRewrite: {
-    //           "^/schedulerapi": "/"
-    //       }
-    //     },
+    // proxyTable: {//正式环境
+    //   '/admin': {
+    //     target: 'http://mbi.sagacloud.cn:8080',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/admin": "/"
+    //     }
+    //   },
+    //   '/api': {
+    //     target: 'http://mbi.sagacloud.cn:8080',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/api": "/"
+    //     }
+    //   },
+    //   '/data-platform-3': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/business-space': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/business-space": "/dp-auxiliary/business-space/"
+    //     }
+    //   },
+    //   '/pointconfig': {
+    //     // 目标 API 地址
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/venders-dp': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/venders-dp": "/dp-auxiliary/venders-dp/"
+    //     }
+    //   },
+    //   '/venders': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/venders": "/dp-auxiliary/venders/"
+    //     }
+    //   },
+    //   '/ScanBuilding': {
+    //     // 目标 API 地址
+    //     target: 'http://mbi.sagacloud.cn:8080/',
+    //     // 如果要代理 websockets
+    //     ws: true,
+    //     // 将主机标头的原点更改为目标URL
+    //     changeOrigin: false
+    //   },
+    //   '/image-service': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/image-service": "/dp-auxiliary/image-service/"
+    //     }
+    //   },
+    //   '/godhand': {
+    //     // 目标 API 地址
+    //     target: 'http://api.sagacloud.cn',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/godhand": "/dp-auxiliary/godhand/"
+    //     }
+    //   },
+    //   '/modelapi': {
+    //     target: 'http://mbi.sagacloud.cn:8080',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //       "^/modelapi": "/revit-algorithm/"
+    //     }
+    //   },
+    //   '/schedulerapi': {
+    //     target: 'http://mbi.sagacloud.cn:8080',
+    //     changeOrigin: true,
+    //     pathRewrite: {
+    //         "^/schedulerapi": "/scheduler/"
+    //     }
+    //   },
     // },
 
+    proxyTable: {
+        '/admin': {
+            target: 'http://172.16.44.235:8080',
+            changeOrigin: true,
+            pathRewrite: {
+                "^/admin": "/"
+            }
+        },
+        '/api': {
+            target: 'http://172.16.44.235:8080',
+            changeOrigin: true,
+            pathRewrite: {
+                "^/api": "/"
+            }
+        },
+        '/data-platform-3': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/business-space': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/pointconfig': {
+            // 目标 API 地址
+            target: 'http://172.16.44.235:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/venders-dp': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/venders': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/ScanBuilding': {
+            // 目标 API 地址
+            target: 'http://172.16.44.235:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/image-service': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/godhand': {
+            // 目标 API 地址
+            target: 'http://172.16.42.210:8080/',
+            // 如果要代理 websockets
+            ws: true,
+            // 将主机标头的原点更改为目标URL
+            changeOrigin: false
+        },
+        '/modelapi': {
+            target: 'http://172.16.42.210:8082',
+            // target: 'http://192.168.20.218:8082',//景灏
+            changeOrigin: true,
+            pathRewrite: {
+                "^/modelapi": "/"
+            }
+        },
+        '/schedulerapi': {
+          target: 'http://172.16.42.210:8081',
+          changeOrigin: true,
+          pathRewrite: {
+              "^/schedulerapi": "/"
+          }
+        },
+    },
+
     // Various Dev Server settings
     host: '0.0.0.0', // can be overwritten by process.env.HOST
     port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined

+ 7 - 4
src/components/business_space/newGraphy/graphy.vue

@@ -183,6 +183,7 @@ export default {
       options: [], //其他分区类型
       OtherValue: '',
       showOtherFlag: false, //是否显示其他分区类型添加
+      fileName: '', // 下载文件名称
     }
   },
   computed: {
@@ -282,7 +283,7 @@ export default {
       this.view.fitSelectedToView();
     },
     // 父组件调用
-    getData(buildFloor, FloorObj, tab) {
+    getData(buildFloor, FloorObj, tab, name) {
       let initType = 1;
       if (FloorObj.FloorID == this.FloorObj.FloorID) {
         initType = 2;
@@ -290,6 +291,7 @@ export default {
       this.buildFloor = buildFloor;
       this.FloorObj = FloorObj;
       this.FloorMap = FloorObj.StructureInfo ? FloorObj.StructureInfo.FloorMap : ''
+      this.fileName = name
       this.tab = tab;
       console.log(arguments);
       if (tab.code == "OtherZone") {
@@ -410,6 +412,7 @@ export default {
             return undefined;
           }
         }).filter(item => item)
+        console.log(this.scene)
         this.scene.removeAllZone();
         this.scene.addZoneList(tempArr);
         this.scene.click(this, this.canvasClick);
@@ -1121,15 +1124,15 @@ export default {
     },
     // 保存为png
     savePng() {
-      this.view.saveImage(`${this.buildFloor[1]}.png`, 'png');
+      this.view.saveImage(`${this.fileName}.png`, 'png');
     },
     // 保存为svg
     saveSvg() {
-      this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
+      this.view.saveSceneSvg(`${this.fileName}.svg`, 6400, 4800);
     },
     // 保存json
     saveJson() {
-      this.view.saveFloorJson(`${this.buildFloor[1]}.json`)
+      this.view.saveFloorJson(`${this.fileName}.json`)
     },
     // 切割划分
     divide() {

+ 1 - 1
src/components/business_space/newTables/eqToSpaceTable.vue

@@ -19,7 +19,7 @@
         <el-table-column :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100">
           <template slot-scope="scope">
             <div>
-              {{scope.row.EquipCategory.EquipName}}
+              {{scope.row.EquipCategory?scope.row.EquipCategory.EquipName:''}}
             </div>
           </template>
         </el-table-column>

+ 34 - 34
src/views/ledger/spacelist/index.vue

@@ -10,8 +10,7 @@
       <div class="saga-build-mess">
         <div style="margin-left: 10px;float: left;">
           <span style="color: #999999;font-size: 14px;margin-right: 12px;">建筑楼层</span>
-          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr"
-                       v-model="buildFloorSelectd">
+          <el-cascader :options="options" @change="changeCascader" placeholder="请选择建筑楼层" ref="cascaderAddr" v-model="buildFloorSelectd">
             <template slot-scope="{ node, data }">
               <span>{{ data.label }}</span>
               <i class="el-icon-warning-outline" v-if="data.Count" style="color:red;margin-right:10px;"></i>
@@ -46,7 +45,8 @@
           @updateState="updateStateSuc"></graphy>
       </div>
       <div v-show="isMyTab == 2">
-        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType" :id="`handsontable${activeName}`"></handsontable-main>
+        <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :otherType="otherType" :id="`handsontable${activeName}`">
+        </handsontable-main>
       </div>
       <div class="infectedTips" v-show="isMyTab==1&&infectedTotal>0">
         <p>因底图变化而受影响的业务空间{{infectedTotal.toString()}}个<span v-show="buildFloorSelectd.length>1">,本层受影响的业务空间{{infectedCurfloor.toString()}}个</span></p>
@@ -63,37 +63,37 @@
   </div>
 </template>
 <script>
-  // import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
-  // import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
-  // import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
-  // import notRelated from "@/components/business_space/dialogs/notRelated";
-  // import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
-  // import graphy from "@/components/business_space/graphy/business";
-  import graphy from "@/components/business_space/newGraphy/graphy";
-  import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
-  import handsontableMain from "@/components/business_space/business/handsontable";
-  import {
-    getDataDictionary,
-    getrelationTypeProject,
-    getSpaceBdFlCount,
-    queryAllZoneType,
-    queryBFloorWithState,
-    zoneCount
-  } from "@/api/scan/request";
-  import floorCascader from "@/components/ledger/lib/floorCascader";
-  import {mapGetters} from "vuex";
+// import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
+// import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
+// import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
+// import notRelated from "@/components/business_space/dialogs/notRelated";
+// import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
+// import graphy from "@/components/business_space/graphy/business";
+import graphy from "@/components/business_space/newGraphy/graphy";
+import roomInFloorDialog from "@/components/business_space/newAddDialogs/roomInFloorDialog";
+import handsontableMain from "@/components/business_space/business/handsontable";
+import {
+  getDataDictionary,
+  getrelationTypeProject,
+  getSpaceBdFlCount,
+  queryAllZoneType,
+  queryBFloorWithState,
+  zoneCount
+} from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import { mapGetters } from "vuex";
 
-  export default {
-    components: {
-      graphy,
-      handsontableMain,
-      roomInFloorDialog,
-      floorCascader,
-    },
-    computed: {
-      ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-    },
-    data() {
+export default {
+  components: {
+    graphy,
+    handsontableMain,
+    roomInFloorDialog,
+    floorCascader,
+  },
+  computed: {
+    ...mapGetters('layout', ['projectId', 'userId', 'secret'])
+  },
+  data() {
     return {
       floor: {
         influence: false, //受影响的业务空间弹窗
@@ -296,7 +296,7 @@
         this.initMessage();
       } else {
         this.getInfected(this.buildFloorSelectd[1]);
-        this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
+        this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType, this.$refs.cascaderAddr.inputValue);
         this.childBackParam = {}
       }
     },