Quellcode durchsuchen

Merge branch 'dev' of http://39.106.8.246:3003/web/ibms into total

 Conflicts:
	src/components/relation/overview/CardList.vue
shaun-sheep vor 5 Jahren
Ursprung
Commit
b2d86ccc65

+ 8 - 8
config/dev.env.js

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

+ 226 - 136
config/index.js

@@ -5,150 +5,240 @@
 const path = require('path')
 
 module.exports = {
-    dev: {
-        // Paths
-        assetsSubDirectory: 'static',
-        assetsPublicPath: '/',
-        proxyTable: {
-            '/admin': {
-                target: 'http://192.168.20.236:8080',
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/admin": "/"
-                }
-            },
-            '/api': {
-                target: 'http://192.168.20.236:8080',
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/api": "/"
-                }
-            },
-            '/data-platform-3': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/business-space': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/pointconfig': {
-                // 目标 API 地址
-                target: 'http://192.168.20.236:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/venders-dp': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/venders': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/ScanBuilding': {
-                // 目标 API 地址
-                target: 'http://192.168.20.236:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/image-service': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/godhand': {
-                // 目标 API 地址
-                target: 'http://192.168.20.225:8080/',
-                // 如果要代理 websockets
-                ws: true,
-                // 将主机标头的原点更改为目标URL
-                changeOrigin: false
-            },
-            '/modelapi': {
-                target: 'http://192.168.20.225:8082',
-                // target: 'http://192.168.20.218:8082',//景灏
-                changeOrigin: true,
-                pathRewrite: {
-                    "^/modelapi": "/"
-                }
-            },
-        },
+  dev: {
+    // Paths
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
 
-        // 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
-        autoOpenBrowser: false,
-        errorOverlay: true,
-        notifyOnErrors: true,
-        poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
+    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',
+        // target: 'http://192.168.20.218:8082',//景灏
+        changeOrigin: true,
+        pathRewrite: {
+          "^/modelapi": "/revit-algorithm/"
+        }
+      },
+    },
 
-        /**
-         * Source Maps
-         */
+    // proxyTable: {
+    //     '/admin': {
+    //         target: 'http://192.168.20.236:8080',
+    //         changeOrigin: true,
+    //         pathRewrite: {
+    //             "^/admin": "/"
+    //         }
+    //     },
+    //     '/api': {
+    //         target: 'http://192.168.20.236:8080',
+    //         changeOrigin: true,
+    //         pathRewrite: {
+    //             "^/api": "/"
+    //         }
+    //     },
+    //     '/data-platform-3': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/business-space': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/pointconfig': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.236:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/venders-dp': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/venders': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/ScanBuilding': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.236:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/image-service': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/godhand': {
+    //         // 目标 API 地址
+    //         target: 'http://192.168.20.225:8080/',
+    //         // 如果要代理 websockets
+    //         ws: true,
+    //         // 将主机标头的原点更改为目标URL
+    //         changeOrigin: false
+    //     },
+    //     '/modelapi': {
+    //         target: 'http://192.168.20.225:8082',
+    //         // target: 'http://192.168.20.218:8082',//景灏
+    //         changeOrigin: true,
+    //         pathRewrite: {
+    //             "^/modelapi": "/"
+    //         }
+    //     },
+    // },
 
-        // https://webpack.js.org/configuration/devtool/#development
-        devtool: 'cheap-module-eval-source-map',
+    // 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
+    autoOpenBrowser: false,
+    errorOverlay: true,
+    notifyOnErrors: true,
+    poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
 
-        // If you have problems debugging vue-files in devtools,
-        // set this to false - it *may* help
-        // https://vue-loader.vuejs.org/en/options.html#cachebusting
-        cacheBusting: true,
+    /**
+     * Source Maps
+     */
 
-        cssSourceMap: true
-    },
+    // https://webpack.js.org/configuration/devtool/#development
+    devtool: 'cheap-module-eval-source-map',
+
+    // If you have problems debugging vue-files in devtools,
+    // set this to false - it *may* help
+    // https://vue-loader.vuejs.org/en/options.html#cachebusting
+    cacheBusting: true,
+
+    cssSourceMap: true
+  },
 
-    build: {
-        // Template for index.html
-        index: path.resolve(__dirname, '../dist/index.html'),
+  build: {
+    // Template for index.html
+    index: path.resolve(__dirname, '../dist/index.html'),
 
-        // Paths
-        assetsRoot: path.resolve(__dirname, '../dist'),
-        assetsSubDirectory: 'static',
-        assetsPublicPath: '/',
+    // Paths
+    assetsRoot: path.resolve(__dirname, '../dist'),
+    assetsSubDirectory: 'static',
+    assetsPublicPath: '/',
 
-        /**
-         * Source Maps
-         */
+    /**
+     * Source Maps
+     */
 
-        productionSourceMap: true,
-        // https://webpack.js.org/configuration/devtool/#production
-        devtool: '#source-map',
+    productionSourceMap: true,
+    // https://webpack.js.org/configuration/devtool/#production
+    devtool: '#source-map',
 
-        // Gzip off by default as many popular static hosts such as
-        // Surge or Netlify already gzip all static assets for you.
-        // Before setting to `true`, make sure to:
-        // npm install --save-dev compression-webpack-plugin
-        productionGzip: false,
-        productionGzipExtensions: ['js', 'css'],
+    // Gzip off by default as many popular static hosts such as
+    // Surge or Netlify already gzip all static assets for you.
+    // Before setting to `true`, make sure to:
+    // npm install --save-dev compression-webpack-plugin
+    productionGzip: false,
+    productionGzipExtensions: ['js', 'css'],
 
-        // Run the build command with an extra argument to
-        // View the bundle analyzer report after build finishes:
-        // `npm run build --report`
-        // Set to `true` or `false` to always turn it on or off
-        bundleAnalyzerReport: process.env.npm_config_report
-    }
-}
+    // Run the build command with an extra argument to
+    // View the bundle analyzer report after build finishes:
+    // `npm run build --report`
+    // Set to `true` or `false` to always turn it on or off
+    bundleAnalyzerReport: process.env.npm_config_report
+  }
+}

+ 2 - 2
config/prod.env.js

@@ -2,8 +2,8 @@
 module.exports = {
     NODE_ENV: '"production"',
     BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.102:8080"', //测试环境
-    SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
+    SSO_SERVER: '"http://192.168.20.235:8081"', //测试环境
+    // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
     // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
     // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境

+ 2 - 5
package.json

@@ -19,9 +19,6 @@
     "publish": "node publish.js"
   },
   "dependencies": {
-    "@sybotan-web/base": "2.1.5",
-    "@sybotan-web/draw": "2.1.56",
-    "@sybotan-web/graphy": "2.1.27",
     "axios": "^0.18.0",
     "echarts": "^4.1.0",
     "element-ui": "^2.11.0",
@@ -34,9 +31,9 @@
     "vuex": "^3.1.0",
     "cad-engine": "2.0.250",
     "@saga-web/base": "2.1.9",
-    "@saga-web/draw": "2.1.71",
+    "@saga-web/draw": "2.1.72",
     "@saga-web/graphy": "2.1.34",
-    "@saga-web/cad-engine": "2.0.494"
+    "@saga-web/cad-engine": "2.0.523"
   },
   "devDependencies": {
     "ajv": "^6.9.1",

+ 3 - 2
publish.js

@@ -2,15 +2,16 @@
  * @Author: zhangyu
  * @Date: 2019-12-18 16:18:30
  * @Info: 自动化部署
- * @LastEditTime: 2019-12-18 16:20:55
+ * @LastEditTime : 2020-02-11 17:47:56
  */
 
 const Client = require("node-ssh");
-const ssh = new Client();
+const ssh = new Client(); 
 
 ssh.connect({
   host: process.env.npm_package_remote_host,
   port: "22",
+  // privateKey: `${process.env.HOME}\\.ssh\\id_rsa_2048`,
   username: process.env.npm_package_remote_user,
   password: process.env.npm_package_remote_password
 }).then(() => {

+ 24 - 0
src/api/scan/request.js

@@ -1515,6 +1515,30 @@ export function queryParentZone(param, success) {
     http.postJson(url, param, success)
 }
 
+//创建邻接关系
+export function createSpaceNeighborhood(param, success) {
+  let url = `${baseUrl}/datacenter/relation/sp-rel/space-neighborhood-Create`;
+  http.postJson(url, param, success)
+}
+
+//查询邻接关系
+export function querySpaceNeighborhood(param, success) {
+  let url = `${baseUrl}/datacenter/relation/sp-rel/space-neighborhood-query`;
+  http.postJson(url, param, success)
+}
+
+//查询邻接关系
+export function delSpaceNeighborhood(param, success) {
+  let url = `${baseUrl}/datacenter/relation/sp-rel/delete`;
+  http.postJson(url, param, success)
+}
+
+//查询邻接关系
+export function delFloorNeighborhood(param, success) {
+  let url = `${baseUrl}/datacenter/relation/sp-rel/delete-floor`;
+  http.postJson(url, param, success)
+}
+
 //项目关系类型查询
 export function getrelationTypeProject(param, success) {
     let url = `${baseUrl}/datacenter/graphic/relation_type_project`;

Datei-Diff unterdrückt, da er zu groß ist
+ 675 - 624
src/components/business_space/business/handsontable.vue


+ 1 - 1
src/components/business_space/newGraphy/canvasFun.vue

@@ -142,7 +142,7 @@ export default {
 </script>
 <style lang="less" scoped>
 #canvas-actions-box {
-  min-width: 542px;
+  // min-width: 542px;
   & > div {
     float: left;
     font-size: 20px;

+ 15 - 1
src/components/globaluploader/index.vue

@@ -105,6 +105,20 @@ export default {
     }
   },
   mounted() {
+    // 刷新或关闭浏览器提示
+    window.addEventListener('beforeunload', event => {
+      if(this.uploader.isUploading()) { // 判断是否有文件正在上传
+        event.preventDefault();
+        e = event || window.event;
+        // 兼容IE8和Firefox之前的版本
+        if (e) {
+          e.returnValue = "您有文件正在上传,关闭会中断上传,是否继续?";
+        }
+        // Chrome, Safari, Firefox 4+, Opera 12+ , IE 9+
+        return "您有文件正在上传,关闭会中断上传,是否继续?";
+      }
+    });
+
     Bus.$on('openUploader', (query, file) => {
       if(!this.uploaderList.some(item => {return item.name === file.name})){
         if(query.uploadId){
@@ -185,7 +199,7 @@ export default {
         this.statusSet(file.id, 'merging');
         if(file.file.modelId){
           //模型文件合并专用接口
-          request.mergeModelFile({ ModelId: file.file.modelId, UploadId: file.file.uploadId }, res => {
+          request.mergeModelFile({ ModelId: file.file.modelId, UploadId: file.file.uploadId, Md5: file.file.md5 }, res => {
             Bus.$emit('modelStatusChange')
             // 文件合并成功
             Bus.$emit('fileSuccess');

+ 64 - 0
src/components/ledger/addDialog/dialogZone.vue

@@ -0,0 +1,64 @@
+<template>
+  <!-- Form -->
+  <el-dialog title="收货地址" :visible.sync="dialogFormVisible">
+    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
+      <el-form-item label="分区名称" prop="name">
+        <el-input v-model="ruleForm.name"></el-input>
+      </el-form-item>
+      <el-form-item label="分区ID" prop="id">
+        <el-input v-model="ruleForm.id"></el-input>
+      </el-form-item>
+      <el-form-item style="float: right;margin-top: 20px">
+        <el-button @click="dialogFormVisible = false">取 消</el-button>
+        <el-button type="primary" @click="submitForm('ruleForm')">添 加</el-button>
+      </el-form-item>
+
+      <!--    <div slot="footer" class="dialog-footer">-->
+      <!--      <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>-->
+      <!--    </div>-->
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+  export default {
+    name: "dialogZone",
+    data() {
+      return {
+        dialogFormVisible: false,
+        ruleForm: {
+          name: '',
+          id: ''
+
+        },
+        rules: {
+          name: [
+            {required: true, message: '请输入分区名称', trigger: 'blur'},
+            // {min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur'}
+          ],
+          id: [
+            {required: true, message: '请输入分区ID', trigger: 'blur'},
+          ],
+        }
+      };
+    },
+    methods: {
+      submitForm(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            this.dialogFormVisible = false
+            this.ruleForm.name = ''
+            this.ruleForm.id = ''
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

src/views/ledger/cenotelist/relatedSpaceList.vue → src/components/ledger/cenote/relatedSpaceList.vue


+ 28 - 16
src/components/model/file/versionDialog.vue

@@ -1,30 +1,38 @@
 <template>
   <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px">
-    <div class="content">
+    <div v-loading="loading" class="content">
       <el-scrollbar style="height:100%;">
         <span>上传人:{{versionData.userName}}</span>
         <span style="marginLeft:30px;">上传时间:{{versionData.acceptTime}}</span>
         <p style="marginTop:15px;">更新内容:</p>
-        <el-divider>新增设备概要内容</el-divider>
-        <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,新增设备实例如下:</p>
-        <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
-        <el-divider>删除设备概要内容</el-divider>
-        <p style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,删除设备实例如下:</p>
-        <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
-        <el-divider>新增设备</el-divider>
-        <div v-for="(item, key) in versionData.createData" :key="'CL'+key">
-          <p>【{{mapType[key]}}】</p>
-          <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+        <div v-if="Object.keys(versionData.createData).length || Object.keys(versionData.deleteData).length">
+          <el-divider v-if="Object.keys(versionData.createData).length">新增设备概要内容</el-divider>
+          <p v-if="Object.keys(versionData.createData).length" style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,新增设备实例如下:</p>
+          <p v-for="(item, key) in versionData.createData" :key="'C'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
+          <el-divider v-if="Object.keys(versionData.deleteData).length">[{{Object.keys(versionData.deleteData).length}}]删除设备概要内容</el-divider>
+          <p v-if="Object.keys(versionData.deleteData).length" style="marginBottom:10px;">于【{{versionData.acceptTime}}】上传模型文件,删除设备实例如下:</p>
+          <p v-for="(item, key) in versionData.deleteData" :key="'D'+key">【{{mapType[key]}}】:【{{item.length}}】个</p>
+          <el-divider v-if="Object.keys(versionData.createData).length">新增设备</el-divider>
+          <div v-for="(item, key) in versionData.createData" :key="'CL'+key">
+            <p>【{{mapType[key]}}】</p>
+            <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+          </div>
+          <el-divider v-if="Object.keys(versionData.deleteData).length">删除设备</el-divider>
+          <div v-for="(item, key) in versionData.deleteData" :key="'DL'+key">
+            <p>【{{mapType[key]}}】</p>
+            <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+          </div>
         </div>
-        <el-divider>删除设备</el-divider>
-        <div v-for="(item, key) in versionData.deleteData" :key="'DL'+key">
-          <p>【{{mapType[key]}}】</p>
-          <p v-for="(obj, i) in item" :key="obj.Id">【{{i+1}}】、建筑:【{{obj.BuildingName || "无"}}】;楼层:【{{obj.FloorName || "无"}}】;设备全局id:【{{obj.ObjId || "无"}}】;BIMID:【{{obj.BimId || "无"}}】;设备本地编码:【{{obj.LocalId || "无"}}】;设备本地名称:【{{obj.LocalName || "无"}}】;CADID:【{{obj.CadId || "无"}}】;</p>
+        <div v-else>
+          <div style="height: 60%;transform: translateY(50%);font-weight: normal;font-size: 12px;text-align: center;color: #909399;">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
         </div>
       </el-scrollbar>
     </div>
     <span slot="footer" class="dialog-footer">
-      <el-button size="small" type="primary" @click="handleClose">确认创建</el-button>
+      <el-button size="small" type="primary" @click="handleClose">关闭</el-button>
       <!-- <el-button size="small" type="primary">确 定</el-button> -->
     </span>
   </el-dialog>
@@ -51,6 +59,7 @@ export default {
   data() {
     return {
       title: "版本文件信息",
+      loading: true,
       versionData: {
         userName: '',
         acceptTime: '',
@@ -104,6 +113,7 @@ export default {
               }
             }
           });
+          this.loading = false;
           this.$forceUpdate();
         })
         console.log(this.versionData)
@@ -132,6 +142,7 @@ export default {
               }
             }
           });
+          this.loading = false;
           this.$forceUpdate();
         })
         console.log(this.versionData)
@@ -142,6 +153,7 @@ export default {
     dialogVisible: {
       handler() {
         if (this.dialogVisible) {
+          this.loading = true;
           this.versionData = {
             userName: '',
             acceptTime: '',

+ 2 - 2
src/components/point/dynamicdata/autoGroupRelaDialog.vue

@@ -3,10 +3,10 @@
     <div id="autoRelate">
       <p>请选择使用哪个信息点对应原始点位的设备标识:</p>
       <p>
-        <el-radio v-model="autoType" label="objectLocalName">{{TypeName}}实本地名称</el-radio>
+        <el-radio v-model="autoType" label="objectLocalName">{{TypeName}}实本地名称</el-radio>
       </p>
       <p>
-        <el-radio v-model="autoType" label="objectLocalCode">{{TypeName}}本地编码</el-radio>
+        <el-radio v-model="autoType" label="objectLocalCode">{{TypeName}}实例本地编码</el-radio>
       </p>
     </div>
     <span slot="footer" class="dialog-footer">

+ 5 - 6
src/components/point/report/addTabFunNum.vue

@@ -38,8 +38,7 @@ export default {
         Unit: '',//值单位
       },
       //下拉框选项
-      options: [
-      ],
+      options: [],
       //验证规则
       rules: {
         MeterFunc: [
@@ -48,11 +47,11 @@ export default {
         CollectInterval: [
           { required: true, message: '请输入采集间隔时间', trigger: 'blur' }
         ],
-        Unit: [
-          { required: true, message: '请选择值单位', trigger: 'change' }
-        ],
+        // Unit: [
+        //   { required: true, message: '请选择值单位', trigger: 'change' }
+        // ],
         DataRuleContent: [
-          { required: true, message: '请填写取公式', trigger: 'blur' }
+          { required: true, message: '请填写取公式', trigger: 'blur' }
         ]
       }
     }

+ 2 - 2
src/components/point/report/integrateStatistics.vue

@@ -10,9 +10,9 @@
     <div class="statistics-chart" style="border-top:5px solid #eee;min-height: calc(65% - 3px);">
       <div class="chart-title">共包含原始点位:{{ originalPoint }} 个</div>
       <div style="padding:15px 10%;line-height:2;">
-        1点位对多表号功能号:{{ pointData.oneToM }}
+        1点位对多表号功能号:{{ pointData.oneToM.toString() }}
         <br />
-        多点位对1表号功能号:{{ pointData.mToOne }}
+        多点位对1表号功能号:{{ pointData.mToOne.toString() }}
         <!-- 查看表号功能号一对多多对一总览 -->
         <el-button @click="showOverview" type="info" icon="el-icon-arrow-right" circle
           style="margin:-25px 0 0 50px;background:rgb(121, 187, 255);color:rgb(225, 228, 229);border:none;"></el-button>

+ 1 - 1
src/framework/components/messagesever/msgAllDetails.vue

@@ -109,7 +109,7 @@ export default {
             Name: "project"
           }
         ],
-        Filters: `UserId='${this.userId}'`,
+        Filters: `UserId='${this.userId}';Type!='Refresh'`,
         Orders: "CreateTime desc, Id asc",
         PageNumber: this.page.pageNumber,
         PageSize: this.page.pageSize

+ 1 - 1
src/views/data_admin/buildData/index.vue

@@ -125,7 +125,7 @@
                         <el-tab-pane v-for="(item,index) in facilityList" :key="index" :name="'table' + index" :label="item.Name + '(' + item.Total + ')'">
                             <div style="padding: .2rem;width:100%;" v-loading="loading">
                                 <div :id="'table' + index" v-loading="tableLoading"></div>
-                                <div class="data_page center">
+                                <div class="data_page center" style="position: inherit">
                                     <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage[tabChecked]" :page-sizes="pageSizeArrs" :page-size="pageSizeArr[tabChecked]" layout="total, sizes, prev, pager, next, jumper" :total="pageCount[tabChecked]"></el-pagination>
                                 </div>
                             </div>

+ 2 - 3
src/views/ledger/cenotelist/relatedSpace.vue

@@ -62,7 +62,7 @@
 
 <script>
 import spaceSelect from "@/components/ledger/lib/spaceSelect";
-import relatedSpaceList from "@/views/ledger/cenotelist/relatedSpaceList";
+import relatedSpaceList from "@/components/ledger/cenote/relatedSpaceList";
 import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
 import { queryDictionaryHead, buildingQuery, shaftSpaceTypeQuery, shaftSpaceBuildingQuery } from '@/api/scan/request';
 import cenoteGraphy from '@/components/ledger/lib/cenoteGraphy'
@@ -136,7 +136,7 @@ export default {
     //默认显示第一个空间
     showDefaultSpace() {
       if (this.spaceList.length) {
-        this.space = this.spaceList[0].Code;
+        this.space = this.spaceList.find((item) => {return item.Code == "GeneralZone"})? "GeneralZone": this.spaceList[0].Code;
         if (this.spaceList.length > 1 && this.cenoteObj.onlyRead) {
           this.showSpaceDot = true;
         }
@@ -247,7 +247,6 @@ export default {
     //更换楼层
     changeFloor(fid) {
       this.floor = fid;
-      this.isEdit = false;
       let buildfloor = [this.building, fid]
       this.$refs.cenotegraphy.getFloorMap(buildfloor, this.space)
     },

+ 21 - 20
src/views/ledger/facility/addfacility.vue

@@ -1,9 +1,9 @@
 <template>
   <div id="deviceList">
     <el-row class="right">
-      <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
+      <!-- <span style="width:20px;float:left;display:block;height:20px;cursor: pointer;" @click="changeAssetsFalg">
         <i class="el-icon-fa  el-icon-fa-compass"></i>
-      </span>
+      </span> -->
       <span style="float:left;">当前选择的设备类型:{{category.name}}</span>
       <el-select v-model="showType" @change="initTable" style="width:125px;margin-right:10px;vertical-align:bottom;">
         <el-option v-for="item in showTypes" :key="item.value" :label="item.label" :value="item.value"></el-option>
@@ -132,6 +132,7 @@ export default {
       EquipmentList: [],
       firmId: "", //品牌型号所需字段--族id三位编码(传设备类id或部件类id)
       buildFloorData: [],
+      floorFlag: true,
     };
   },
   computed: {
@@ -158,24 +159,24 @@ export default {
       })
     },
     //维护建筑
-    changeAssetsFalg() {
-      if (this.floorFlag) {
-        this.floorFlag = false
-      } else {
-        this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
-          dangerouslyUseHTMLString: true,
-          confirmButtonText: '就要维护设备所属建筑楼层',
-          cancelButtonText: '暂时不搞了',
-          confirmButtonClass: 'confirmButtonClass',
-          cancelButtonClass: 'cancelButtonClass'
-        }).then(_ => {
-          this.floorFlag = true
-          this.getTableHeader()
-        }).catch(_ => {
-          this.$message("取消")
-        })
-      }
-    },
+    // changeAssetsFalg() {
+    //   if (this.floorFlag) {
+    //     this.floorFlag = false
+    //   } else {
+    //     this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
+    //       dangerouslyUseHTMLString: true,
+    //       confirmButtonText: '就要维护设备所属建筑楼层',
+    //       cancelButtonText: '暂时不搞了',
+    //       confirmButtonClass: 'confirmButtonClass',
+    //       cancelButtonClass: 'cancelButtonClass'
+    //     }).then(_ => {
+    //       this.floorFlag = true
+    //       this.getTableHeader()
+    //     }).catch(_ => {
+    //       this.$message("取消")
+    //     })
+    //   }
+    // },
     //将数组转换成optiosn格式
     changeArr(arr) {
       return arr.map(item => {

+ 1 - 1
src/views/ledger/rentlist/manageTenantZone.vue

@@ -5,7 +5,7 @@
       <el-button size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
       <div style="display:inline-block;margin:10px 0 0 10px;">
         <label style="margin-right:10px;">业务空间类型</label>
-        <el-badge :is-dot="options.length>1">
+        <el-badge :is-dot="onlyRead&&options.length>1">
           <el-select v-model="value" placeholder="请选择" @change="getTnRelatFloor">
             <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
             </el-option>

+ 6 - 2
src/views/ledger/rentlist/rentadd/index.vue

@@ -46,8 +46,12 @@ export default {
       isTableRightShow: false,
       relationids: "",
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
-      showType: "partInfo",
+      showTypes: [
+        // { value: "partInfo", label: '隐藏信息点' }, 
+        { value: "all", label: '全部' }, 
+        { value: "Visible", label: '只看采集信息' }
+      ],
+      showType: "Visible",
       tableHeader: [],
       tableData: session.get("rentAddData")? session.get("rentAddData").length? session.get("rentAddData"): [{}]: [{}],
       copyTableData: []

+ 8 - 0
src/views/ledger/spacelist/index.vue

@@ -179,6 +179,14 @@ export default {
           }
           return t;
         }).filter(item => item);
+        this.tabsList.push({
+          Code: "other",
+          CreateTime: "2019-06-04 14:48:39",
+          LastUpdate: "2019-06-04 14:48:39",
+          Name: "其他",
+          ObjectType: null,
+          ParentId: "Other"
+        })
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;

+ 6 - 2
src/views/ledger/system/addsystem.vue

@@ -58,7 +58,11 @@ export default {
     return {
       addNum: 1,
       onlyRead: false,
-      showTypes: [{ value: "partInfo", label: '隐藏信息点' }, { value: "all", label: '全部' }, { value: "Visible", label: '只看采集信息' }],
+      showTypes: [
+        // { value: "partInfo", label: '隐藏信息点' }, 
+        { value: "all", label: '全部' }, 
+        { value: "Visible", label: '只看采集信息' }
+      ],
       tableHeader: [],
       tableData: session.get("systemAddData")
         ? session.get("systemAddData").length
@@ -91,7 +95,7 @@ export default {
       systemId: null,
       graphyId: null,
       id: 0,
-      showType: 'partInfo',
+      showType: 'Visible',
       EquipmentList: [],
     };
   },

+ 2 - 5
src/views/model/report/index.vue

@@ -188,7 +188,7 @@ export default {
   mounted() { },
   created() {
     this.params = {
-      ProjectId: this.projectId
+      Orders: "Name asc"
     }
     this.getModelFileCount();
     this.getModelFloorCount();
@@ -199,7 +199,7 @@ export default {
   methods: {
     getModelFloorCount() {// 获取楼层模型文件数量,计算出检查出问题的模型文件
       let promise1 = new Promise(resolve => {
-        queryFloorList(this.params, res => {
+        queryFloorList({}, res => {
           resolve(res);
         })
       })
@@ -425,9 +425,6 @@ export default {
   },
   watch: {
     projectId() {
-      this.params = {
-        ProjectId: this.projectId
-      }
       this.getModelFileCount();
       this.getModelFloorCount();
     }

+ 4 - 0
src/views/ready/collectsetting/index.vue

@@ -1120,6 +1120,10 @@
         background-color: #fff;
         border-left: 1px solid #f5f5f5;
 
+        .d_jump {
+          width: calc(100% - 105px);
+        }
+
         .right_main_msg {
           padding-left: 10px;
           padding-top: 200px;

+ 391 - 6
src/views/relation/overview/detail/index.vue

@@ -1,13 +1,398 @@
 <template>
-  <div>
-    ...
+  <div id="spaceRelation">
+    <el-row>
+      <el-col :span="0.5">
+        <el-button size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
+      </el-col>
+      <el-col :span="0.5">
+        <span style="margin:0 10px;">建筑楼层</span>
+        <el-cascader placeholder="请选择建筑楼层" :options="options" v-model="buildFloor" filterable size="small" @change="changeCascader" :props="props">
+        </el-cascader>
+      </el-col>
+      <el-col :span="0.5">
+        <span style="margin:0 10px;">业务空间类型</span>
+        <el-select placeholder="请选择" v-model="zoneType" @change="getBusinessSpace">
+          <el-option v-for="item in tabsList" :key="item.Code" :label="item.Name" :value="item.Code">
+          </el-option>
+        </el-select>
+      </el-col>
+      <el-col :span="0.5" style="float:right;" v-show='0'>
+        <span style="margin-right:10px;">当前状态 {{description}}</span>
+        <el-button @click="cancel">取消</el-button>
+        <el-button @click="removeRelation">清除</el-button>
+        <el-button @click="removeAll">清除所有</el-button>
+        <el-button @click="addRelation">添加</el-button>
+        <el-button type="primary" @click="saveRelation">保存</el-button>
+      </el-col>
+    </el-row>
+    <div class="canvas-container" v-loading="canvasLoading" ref="graphy">
+      <div v-show="!FloorMap" style="display:flex;align-items:center;justify-content:center;height:100%;">
+        <div class="center" style="flex:1">
+          <i class="icon-wushuju iconfont"></i>
+          暂无数据
+        </div>
+      </div>
+      <div v-show="FloorMap" class="canvas-box">
+        <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
+        <!-- 底部操作按钮 -->
+        <el-row class="canvas-actions-box">
+          <canvasFun @fit="fit" @scale="scale" :config="config" ref="canvasFun"></canvasFun>
+        </el-row>
+      </div>
+    </div>
   </div>
 </template>
 <script>
+import {
+  buildingQuery, //数据中心-建筑查询
+  queryZone, // 业务空间查询
+  queryDictionaryHead, //空间类型查询
+  createSpaceNeighborhood, //创建邻接关系
+  querySpaceNeighborhood, // 查询邻接关系
+  delSpaceNeighborhood, //删除选中
+  delFloorNeighborhood, //删除所有
+} from "@/api/scan/request";
+import { SColor, SPoint } from "@saga-web/draw/lib";
+import { RelationScene, FloorView } from "@saga-web/cad-engine/lib";
+import canvasFun from "@/components/business_space/newGraphy/canvasFun"
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import { colorArr } from "@/utils/spaceColor"
 export default {
-  created(){
-    let detail = this.$route.query
-    console.log(detail)
+  components: {
+    floorCascader,
+    canvasFun
+  },
+  data() {
+    return {
+      view: '',
+      scene: '',
+      canvasWidth: 800,
+      canvasHeight: 600,
+      canvasLoading: false,
+      FloorMap: '',
+      options: [],
+      buildFloor: [],
+      tabsList: [],
+      zoneType: 'GeneralZone',
+      props: {
+        value: 'BuildID',
+        label: 'BuildLocalName',
+        children: 'Floor'
+      },
+      idToFloor: {},
+      config: {
+        isEdit: false,
+        divide: false,
+        groupSelect: false
+      },
+      description: '无'
+    }
+  },
+  created() {
+    //图类型编码
+    this.type = this.$route.query.type;
+    this.init();
+  },
+  mounted() {
+    this.canvasWidth = this.$refs.graphy.offsetWidth - 20;
+    this.canvasHeight = this.$refs.graphy.offsetHeight - 20;
+  },
+  methods: {
+    //初始化
+    init() {
+      this.getBuilding();
+      this.getTypes();
+    },
+    changeCascader(val) {
+      if (val.length > 1) {
+        let floor = this.idToFloor[val[1]];
+        if (floor.StructureInfo && floor.StructureInfo.FloorMap) {
+          this.FloorMap = floor.StructureInfo.FloorMap;
+          this.initGraphy();
+        } else {
+          this.FloorMap = '';
+        }
+      } else {
+        this.FloorMap = '';
+      }
+    },
+    // 保存邻接关系
+    saveRelation() {
+      let relationList = this.scene.relationList;
+      let pa = {
+        Content: []
+      }
+      if (relationList.length) {
+        pa.Content = relationList.map(t => {
+          return {
+            FloorId: this.buildFloor[1],
+            GraphType: this.type,
+            LocationOne: `${t.startPoint.x},${-t.startPoint.y}`,
+            LocationTwo: `${t.lastPoint.x},${-t.lastPoint.y}`,
+            SpaceIdOne: t.startZone,
+            SpaceIdTwo: t.endZone,
+            ZoneType: this.zoneType
+          }
+        })
+      }
+      this.createRela(pa)
+    },
+    clearRelation() {
+      if (this.scene) {
+        this.scene.removeAllRelation()
+      }
+    },
+    //
+    cancel() {
+      this.scene.removeRelationFlag = false;
+      this.scene.createRelateFlag = false;
+      this.scene.isAbsorbing = false;
+      this.description = '无'
+    },
+    //
+    removeRelation() {
+      this.scene.removeRelationFlag = true;
+      this.scene.createRelateFlag = false;
+      this.scene.isAbsorbing = false;
+      this.description = '清除'
+    },
+    //
+    addRelation() {
+      this.scene.createRelateFlag = true;
+      this.scene.removeRelationFlag = false;
+      this.scene.isAbsorbing = true;
+      this.description = '添加'
+    },
+    // 
+    removeAll() {
+      let temp = {
+        FloorId: this.buildFloor[1],
+        ZoneType: this.zoneType,
+        GraphType: this.type
+      }
+      delFloorNeighborhood(temp, res => {
+        this.$message.success('删除成功');
+        this.clearRelation();
+      })
+    },
+    canvasClick(item, event) {
+      console.log(item);
+      item.selected = false;
+    },
+    initGraphy() {
+      this.clearGraphy()
+      this.scene = new RelationScene();
+      this.canvasLoading = true;
+      this.scene.loadUrl(`/image-service/common/file_get?systemId=revit&key=${this.FloorMap}`).then(res => {
+        this.canvasLoading = false;
+        if (res == 'error') {
+          this.FloorMap = '';
+          this.$message.warning('数据解析异常');
+          return;
+        }
+        this.view.scene = this.scene;
+        this.view.fitSceneToView();
+        this.scene.isSpaceSelectable = false;
+        this.getBusinessSpace();
+        this.view.minScale = this.view.scale;
+        if (this.$refs.canvasFun) {
+          this.$refs.canvasFun.everyScale = this.view.scale;
+        }
+      })
+    },
+    // 清空场景并初始化视图
+    clearGraphy() {
+      if (this.view) {
+        this.view.scene = null;
+        return
+      }
+      this.view = new FloorView('floorCanvas')
+    },
+    // canvas 获取焦点
+    focus() {
+      document.getElementById(`floorCanvas`).focus()
+    },
+    // 适配底图到窗口
+    fit() {
+      this.view.fitSceneToView()
+    },
+    // 缩放
+    scale(val) {
+      if (!this.view) {
+        return;
+      }
+      let scale = this.view.scale;
+      this.view.scaleByPoint(val / scale, this.canvasWidth / 2, this.canvasHeight / 2);
+    },
+    goback() {
+      this.$router.push({ name: 'overView' })
+    },
+    // 获取项目下建筑
+    getBuilding() {
+      let pa = {
+        Cascade: [{ name: 'floor', Orders: 'SequenceId desc' }],
+        Orders: "BuildLocalName asc",
+      }
+      buildingQuery(pa, res => {
+        this.options = res.Content.map(t => {
+          if (t.Floor) {
+            t.Floor = t.Floor.map(item => {
+              item.BuildID = item.FloorID;
+              item.BuildLocalName = item.FloorLocalName;
+              this.idToFloor[item.FloorID] = item;
+              return item;
+            })
+          } else {
+            t.Floor = []
+          }
+          return t;
+        })
+      })
+    },
+    // 业务空间分区类型
+    getTypes() {
+      let pa = {
+        Filters: `parentId='Space'`
+      }
+      queryDictionaryHead(pa, res => {
+        this.tabsList = res.Content.map(t => {
+          if (t.Name == "元空间") {
+            return undefined;
+          }
+          return t;
+        }).filter(item => item);
+      })
+    },
+    getRelations() {
+      let pa = {
+        Filters: `FloorId='${this.buildFloor[1]}';GraphType='${this.type}';ZoneType='${this.zoneType}'`
+      }
+      querySpaceNeighborhood(pa, res => {
+        let tempArr = res.Content.map(t => {
+          let p1 = t.LocationOne.split(',');
+          let p2 = t.LocationTwo.split(',');
+          return {
+            LocationOne: new SPoint(p1[0], -p1[1]),
+            LocationTwo: new SPoint(p2[0], -p2[1]),
+            SpaceIdOne: t.SpaceIdOne,
+            SpaceIdTwo: t.SpaceIdTwo,
+          }
+        })
+        this.clearRelation();
+        this.scene.addAllRelaPoint(tempArr);
+        this.canvasLoading = false;
+      })
+    },
+    // 获取当前分区下的业务空间
+    getBusinessSpace() {
+      this.canvasLoading = true
+      let pa = {
+        zone: this.zoneType,
+        data: {
+          Filters: ``,
+          Orders: "createTime desc, RoomID asc",
+          PageSize: 1000
+        }
+      }
+      if (this.buildFloor.length && this.buildFloor.length > 1) {
+        pa.data.Filters = `BuildingId='${this.buildFloor[0]}';FloorId='${this.buildFloor[1]}'`
+      } else {
+        this.$message.warning("请选择建筑楼层");
+      }
+      queryZone(pa, res => {
+        // 所有业务空间
+        this.businessSpaceList = res.Content;
+        // 已关联元空间的业务空间
+        this.BSPRelaISPList = [];
+        res.Content.map(t => {
+          if (t.Outline && t.Outline.length) {
+            this.BSPRelaISPList.push(t)
+          }
+        })
+        // 绘制业务空间
+        let tempArr = this.BSPRelaISPList.map((t, i) => {
+          if (t.FloorId == this.buildFloor[1] && t.ObjectType == this.zoneType) {
+            return {
+              RoomLocalName: t.RoomLocalName,
+              OutLine: t.Outline,
+              RoomID: t.RoomID,
+              Color: colorArr[i % colorArr.length],
+            }
+          } else {
+            console.log('internet slow')
+            return undefined;
+          }
+        }).filter(item => item)
+        this.scene.removeAllZone();
+        this.scene.addZoneList(tempArr);
+        this.scene.click(this, this.canvasClick)
+        // 绘制关系
+        this.getRelations();
+      })
+    },
+    // 创建邻接关系
+    createRela(param) {
+      console.log(param)
+      createSpaceNeighborhood(param, res => {
+        this.$message.success('创建成功')
+      })
+    }
+  },
+  watch: {
+    projectId() {
+      this.FloorMap = '';
+      this.init();
+    },
+    "view.scale": {
+      handler(n) {
+        if (this.$refs.canvasFun) {
+          let s = n * 10 / this.view.minScale
+          this.$refs.canvasFun.sliderVal = s > 1000 ? 1000 : s;
+        }
+      }
+    },
+    "scene.curRemoveItem": {
+      handler(n) {
+        if (n) {
+          let pa = [{
+            GraphType: this.type,
+            ZoneType: this.zoneType,
+            SpaceIdOne: n.startZone,
+            SpaceIdTwo: n.endZone
+          }]
+          delSpaceNeighborhood(pa, res => {
+            this.$message.success('删除成功');
+          })
+        }
+      }
+    }
   }
 }
-</script>
+</script>
+<style lang="less" scoped>
+#spaceRelation {
+  /deep/ .el-input__inner {
+    vertical-align: baseline;
+  }
+  .canvas-container {
+    position: relative;
+    width: calc(100% - 22px;);
+    height: calc(100% - 64px);
+    margin-top: 10px;
+    padding: 10px;
+    background-color: #fff;
+    border: 1px solid #e4e4e4;
+    .canvas-box {
+      width: 100%;
+      height: 100%;
+    }
+    .canvas-actions-box {
+      position: absolute;
+      bottom: 20px;
+      left: 50%;
+      transform: translateX(-50%);
+      z-index: 999;
+    }
+  }
+}
+</style>