浏览代码

Merge branch 'zone' into dev

haojianlong 5 年之前
父节点
当前提交
54f18624cc

+ 6 - 6
config/dev.env.js

@@ -4,11 +4,11 @@ const prodEnv = require('./prod.env')
 
 
 module.exports = merge(prodEnv, {
 module.exports = merge(prodEnv, {
     NODE_ENV: '"development"',
     NODE_ENV: '"development"',
-    // BASE_URL: '"http://192.168.20.236"', //测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.235:8081"', //测试环境
+    BASE_URL: '"http://192.168.20.236"', //测试iframe地址
+    SSO_SERVER: '"http://192.168.20.235:8081"', //测试环境
     // // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境
     // // 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正式环境地址
+    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正式环境地址
 })
 })

+ 176 - 176
config/index.js

@@ -10,184 +10,184 @@ module.exports = {
     assetsSubDirectory: 'static',
     assetsSubDirectory: 'static',
     assetsPublicPath: '/',
     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',
-        // target: 'http://192.168.20.218:8082',//景灏
-        changeOrigin: true,
-        pathRewrite: {
-          "^/modelapi": "/revit-algorithm/"
-        }
-      },
-    },
-
-    // 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": "/"
-    //         }
-    //     },
+    // 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/"
+    //     }
+    //   },
     // },
     // },
 
 
+    proxyTable: {
+        '/admin': {
+            target: 'http://192.168.20.235:8080',
+            changeOrigin: true,
+            pathRewrite: {
+                "^/admin": "/"
+            }
+        },
+        '/api': {
+            target: 'http://192.168.20.235: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.235: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.235: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": "/"
+            }
+        },
+    },
+
     // Various Dev Server settings
     // Various Dev Server settings
     host: '0.0.0.0', // can be overwritten by process.env.HOST
     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
     port: 28080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined

+ 5 - 6
package.json

@@ -19,12 +19,7 @@
     "publish": "node publish.js"
     "publish": "node publish.js"
   },
   },
   "dependencies": {
   "dependencies": {
-    "@saga-web/base": "2.1.9",
-    "@saga-web/cad-engine": "2.0.523",
-    "@saga-web/draw": "2.1.72",
-    "@saga-web/graphy": "2.1.34",
     "axios": "^0.18.0",
     "axios": "^0.18.0",
-    "cad-engine": "2.0.250",
     "echarts": "^4.1.0",
     "echarts": "^4.1.0",
     "el-cascader-multi": "^1.1.8",
     "el-cascader-multi": "^1.1.8",
     "element-ui": "^2.11.0",
     "element-ui": "^2.11.0",
@@ -34,7 +29,11 @@
     "vue": "^2.5.2",
     "vue": "^2.5.2",
     "vue-axios": "^2.1.4",
     "vue-axios": "^2.1.4",
     "vue-router": "^3.0.1",
     "vue-router": "^3.0.1",
-    "vuex": "^3.1.0"
+    "vuex": "^3.1.0",
+    "@saga-web/base": "2.1.9",
+    "@saga-web/draw": "2.1.74",
+    "@saga-web/graphy": "2.1.39",
+    "@saga-web/cad-engine": "2.0.532"
   },
   },
   "devDependencies": {
   "devDependencies": {
     "ajv": "^6.9.1",
     "ajv": "^6.9.1",

+ 70 - 4
src/api/scan/request.js

@@ -1522,11 +1522,29 @@ export function buildingQueryAndCount(param, success) {
   http.postJson(url, param, success)
   http.postJson(url, param, success)
 }
 }
 
 
+// 查询分区统计信息
+export function countObjZone(param, success) {
+  let url = `${baseUrl}/datacenter/object/zone/count`;
+  http.postJson(url, param, success)
+}
+
+// 查询建筑楼层-统计业务空间state
+export function queryBFloorWithState(param, success) {
+  let url = `${baseUrl}/datacenter/object/zone/building-floor`;
+  http.postJson(url, param, success)
+}
+
+// 查询业务空间分区类型包含其他
+export function queryAllZoneType(param, success) {
+  let url = `${baseUrl}/datacenter/object/zone/type`;
+  http.postJson(url, param, success)
+}
+
 // 创建分区信息
 // 创建分区信息
 export function createZone(param, success) {
 export function createZone(param, success) {
-    let data = param.data
-    let url = `${baseUrl}/datacenter/${zone[param.zone]}/create-bd-fl`;
-    http.postJson(url, data, success)
+  let data = param.data
+  let url = `${baseUrl}/datacenter/${zone[param.zone]}/create-bd-fl`;
+  http.postJson(url, data, success)
 }
 }
 
 
 //删除分区信息
 //删除分区信息
@@ -1933,4 +1951,52 @@ export function postRelationInforAtpism(param, success) {
 export function getAllEqPaType(param, success) {
 export function getAllEqPaType(param, success) {
   let url = `${baseUrl}/datacenter/class-def/query-equip-comm-type`
   let url = `${baseUrl}/datacenter/class-def/query-equip-comm-type`
   http.postJson(url, param, success)
   http.postJson(url, param, success)
-}
+}
+/********************更换接口**************************/
+// 查询空间信息
+export function getZoneQuery(param,success) {
+let url = `${baseUrl}/datacenter/class-def/query-equip-comm-type`
+  http.postJson(url,param,success)
+}
+//创建空间分类型
+export function zoneCreateType(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/create-type`
+  http.postJson(url,param,success)
+}
+//创建空间分区对象
+export function zoneCreate(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/create`
+  http.postJson(url,param,success)
+}
+
+//跟据id删除分区对象
+export function zoneDelete(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/delete`
+  http.postJson(url,param,success)
+}
+
+//更新分区对象信息
+export function handleZoneUpdate(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/update`
+  http.postJson(url,param,success)
+}
+//查询空间信息
+export function searchZoneQuery(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/query`
+  http.postJson(url,param,success)
+}
+// 根据id删除分区对象
+export function handleZoneDelete(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/delete`
+  http.postJson(url,param,success)
+}
+//更新分区对象信息
+export function handleZoneObjectUpdate(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/update`
+  http.postJson(url,param,success)
+}
+//修改业务空间对象和建筑楼层的关系
+export function handleZoneUpdateBd(param,success) {
+  let url = `${baseUrl}/datacenter/object/zone/update-fl-bd`
+  http.postJson(url,param,success)
+}

文件差异内容过多而无法显示
+ 761 - 643
src/components/business_space/business/handsontable.vue


+ 182 - 21
src/components/business_space/newGraphy/graphy.vue

@@ -1,15 +1,23 @@
 <template>
 <template>
-  <div id="graphy" ref="graphy">
+  <div id="graphy" ref="graphy" v-loading="canvasLoading">
     <div v-show="!FloorMap">
     <div v-show="!FloorMap">
       <div class="center" style="height: 400px;padding-top:182px;box-sizing:border-box;">
       <div class="center" style="height: 400px;padding-top:182px;box-sizing:border-box;">
         <i class="icon-wushuju iconfont"></i>
         <i class="icon-wushuju iconfont"></i>
         暂无数据
         暂无数据
       </div>
       </div>
     </div>
     </div>
-    <div class="canvas-box" v-show="FloorMap" v-loading="canvasLoading">
+    <div class="canvas-box" v-show="FloorMap">
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <canvas id="floorCanvas" :width="canvasWidth" :height="canvasHeight" ref="canvas" tabindex="0"></canvas>
       <!-- 初始两个按钮 -->
       <!-- 初始两个按钮 -->
       <el-row class="buttons-box">
       <el-row class="buttons-box">
+        <div style="margin-right:10px;width: 100%;margin-bottom: 10px" v-if="showOtherFlag">
+          <!-- 平面图其他分区 -->
+          <el-button type="primary" @click="addZoneBtn">添加分区</el-button>
+          <el-select v-model="OtherValue" placeholder="请选择分区类型" @change="changeOtherZone">
+            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+            </el-option>
+          </el-select>
+        </div>
         <div>
         <div>
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
           <el-autocomplete popper-class="my-autocomplete" v-model="search" :fetch-suggestions="querySearch" placeholder="输入平面图中已有的业务空间名称进行查找"
             width="180px" @select="handleSelect">
             width="180px" @select="handleSelect">
@@ -35,6 +43,8 @@
             <!-- 点击已经关联的业务空间 -->
             <!-- 点击已经关联的业务空间 -->
             <el-button type="primary" plain @click="refactorBSP" :disabled="zoneDisable" style="margin-left:10px;">重新划分业务空间</el-button>
             <el-button type="primary" plain @click="refactorBSP" :disabled="zoneDisable" style="margin-left:10px;">重新划分业务空间</el-button>
             <el-button type="primary" @click="editeSpaceDetail" :disabled="zoneDisable">编辑空间详情</el-button>
             <el-button type="primary" @click="editeSpaceDetail" :disabled="zoneDisable">编辑空间详情</el-button>
+            <el-button type="primary" plain @click="confirmZoneSpace" :disabled="zoneDisable||(!zoneDisable&&!curZoneItem.isInfected)">确认业务空间
+            </el-button>
             <el-button plain @click="cancelGraphy" v-show="!zoneDisable">取 消</el-button>
             <el-button plain @click="cancelGraphy" v-show="!zoneDisable">取 消</el-button>
           </div>
           </div>
           <!-- 点击已经关联的业务空间 -->
           <!-- 点击已经关联的业务空间 -->
@@ -50,15 +60,16 @@
           <div v-show="type==4">
           <div v-show="type==4">
             <el-button plain @click="cancelGraphy">取 消</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
             <el-button type="primary" @click="saveRefactorBSP">保存</el-button>
             <el-button type="primary" @click="saveRefactorBSP">保存</el-button>
+            <el-button type="primary" v-show='curZoneItem.isInfected' @click="confirmAndSave">保存并确认业务空间</el-button>
           </div>
           </div>
           <!-- 批量创建所选业务空间 -->
           <!-- 批量创建所选业务空间 -->
           <div v-show="type==5">
           <div v-show="type==5">
             <el-button type="primary" @click="groupCreateZone">批量创建所选业务空间</el-button>
             <el-button type="primary" @click="groupCreateZone">批量创建所选业务空间</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
           </div>
           </div>
-        </div>
-        <div style="position: absolute;right: 0;">
-          <el-button type="text" @click="lookUnrelatBSpace(false)">未关联平面图的业务空间 {{num}} 条</el-button>
+          <div style="position: absolute;right: 10px;">
+            <el-button type="text" @click="lookUnrelatBSpace(false)">未关联平面图的业务空间 {{num}} 条</el-button>
+          </div>
         </div>
         </div>
       </el-row>
       </el-row>
       <!-- 底部操作按钮 -->
       <!-- 底部操作按钮 -->
@@ -75,6 +86,10 @@
     <!-- 批量创建选择弹窗 -->
     <!-- 批量创建选择弹窗 -->
     <el-dialog title="提示" :visible.sync="groupCreateDialogVis" width="30%">
     <el-dialog title="提示" :visible.sync="groupCreateDialogVis" width="30%">
       <div id="autoRelate">
       <div id="autoRelate">
+        <p>批量创建面积大于此值的默认空间为业务空间:</p>
+        <div style="padding:10px 20px;margin:0 0 10px 0;">
+          <el-slider v-model="areaValue" :marks="areaMarks" :step="10" :format-tooltip='val=>val/100'> </el-slider>
+        </div>
         <p>请选择批量创建方式:</p>
         <p>请选择批量创建方式:</p>
         <p>
         <p>
           <el-radio v-model="groupCreateType" :label="1">批量将所有的空白空间创建业务空间</el-radio>
           <el-radio v-model="groupCreateType" :label="1">批量将所有的空白空间创建业务空间</el-radio>
@@ -88,6 +103,7 @@
         <el-button size="small" type="primary" @click="confirm">确认</el-button>
         <el-button size="small" type="primary" @click="confirm">确认</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
+    <dialogZone ref="zone" @createSuccess="getOhterType" />
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
@@ -98,6 +114,7 @@ import { DivideFloorScene, SpaceItem, ZoneItem, FloorView } from "@saga-web/cad-
 import { colorArr } from "@/utils/spaceColor"
 import { colorArr } from "@/utils/spaceColor"
 import unRelateBSP from "./unRelateBSP";
 import unRelateBSP from "./unRelateBSP";
 import createBSP from "./createBSP";
 import createBSP from "./createBSP";
+import dialogZone from "../../ledger/addDialog/dialogZone";
 import {
 import {
   buildingQuery,
   buildingQuery,
   queryZone,
   queryZone,
@@ -106,17 +123,22 @@ import {
   countZone,
   countZone,
   getIspNotInSpace,
   getIspNotInSpace,
   createRelateInZoneAndISp,
   createRelateInZoneAndISp,
-  groupCreRelaZoneAndISp
+  groupCreRelaZoneAndISp,
+  getZoneQuery,
+  queryAllZoneType, // 定制分区类型
 } from "@/api/scan/request"
 } from "@/api/scan/request"
 
 
 export default {
 export default {
   components: {
   components: {
     canvasFun,
     canvasFun,
     unRelateBSP,
     unRelateBSP,
-    createBSP
+    createBSP,
+    dialogZone
   },
   },
   data() {
   data() {
     return {
     return {
+      zoneValue:'',
+      addZone:[],
       canvasWidth: 800,
       canvasWidth: 800,
       canvasHeight: 600,
       canvasHeight: 600,
       type: 1, // 默认操作模式
       type: 1, // 默认操作模式
@@ -148,7 +170,12 @@ export default {
       groupCreateDialogVis: false, //批量创建业务空间弹窗
       groupCreateDialogVis: false, //批量创建业务空间弹窗
       groupCreateType: 1, //批量创建方式
       groupCreateType: 1, //批量创建方式
       zoneDisable: true, // 重新划分是否禁用
       zoneDisable: true, // 重新划分是否禁用
-      sourceIdToISP: {}
+      sourceIdToISP: {},
+      areaValue: 40,
+      areaMarks: { 0: '0m²', 100: '1m²' },
+      options: [], //其他分区类型
+      OtherValue: '',
+      showOtherFlag: false, //是否显示其他分区类型添加
     }
     }
   },
   },
   computed: {
   computed: {
@@ -156,8 +183,8 @@ export default {
   },
   },
   created() { },
   created() { },
   mounted() {
   mounted() {
-    this.canvasWidth = this.$refs.graphy.offsetWidth;
-    this.canvasHeight = this.$refs.graphy.offsetHeight;
+    this.canvasWidth = this.$refs.graphy.offsetWidth - 20;
+    this.canvasHeight = this.$refs.graphy.offsetHeight - 20;
   },
   },
   methods: {
   methods: {
     // 初始化
     // 初始化
@@ -215,6 +242,10 @@ export default {
         })
         })
       })
       })
     },
     },
+    //添加其他分区
+    addZoneBtn() {
+      this.$refs.zone.dialogFormVisible = true
+    },
     // 搜索
     // 搜索
     querySearch(queryString, cb) {
     querySearch(queryString, cb) {
       let restaurants = this.zoneList;
       let restaurants = this.zoneList;
@@ -251,8 +282,38 @@ export default {
       this.FloorObj = FloorObj;
       this.FloorObj = FloorObj;
       this.FloorMap = FloorObj.StructureInfo ? FloorObj.StructureInfo.FloorMap : ''
       this.FloorMap = FloorObj.StructureInfo ? FloorObj.StructureInfo.FloorMap : ''
       this.tab = tab;
       this.tab = tab;
-      console.log(arguments)
-      this.init(initType);
+      console.log(arguments);
+      if (tab.code == "OtherZone") {
+        // 其他分区
+        this.showOtherFlag = true
+        this.getOhterType();
+      } else {
+        this.showOtherFlag = false;
+        this.init(initType);
+      }
+    },
+    // 其他分区类型查询
+    getOhterType() {
+      let pa = {
+        Cascade: [{ Name: 'zoneType' }],
+        Filters: `Code="OtherZone"`
+      }
+      queryAllZoneType(pa, res => {
+        if (res.Content[0].ZoneType && res.Content[0].ZoneType.length) {
+          this.options = res.Content[0].ZoneType.map(t => {
+
+            t.value = t.Code;
+            t.label = t.Name;
+            return t;
+          })
+        } else {
+          this.options = []
+        }
+      })
+    },
+    // 其他类型下拉change
+    changeOtherZone(val) {
+      console.log(val)
     },
     },
     // 获取未绑定业务空间的元空间
     // 获取未绑定业务空间的元空间
     getISPSPUnrelaBSP() {
     getISPSPUnrelaBSP() {
@@ -331,6 +392,7 @@ export default {
               OutLine: t.Outline,
               OutLine: t.Outline,
               RoomID: t.RoomID,
               RoomID: t.RoomID,
               Color: colorArr[i % colorArr.length],
               Color: colorArr[i % colorArr.length],
+              Infected: t.State
             }
             }
           } else {
           } else {
             console.log('internet slow')
             console.log('internet slow')
@@ -424,6 +486,22 @@ export default {
       let text = []
       let text = []
       let Spaces = this.allUnRelatISP.map(t => {
       let Spaces = this.allUnRelatISP.map(t => {
         if (t.Outline) {
         if (t.Outline) {
+          let area = 0;
+          if (t.Outline[0]) {
+            area = this.getarea(t.Outline[0]);
+            if (t.Outline.length > 1) {
+              for (let i = 1; i < t.Outline.length; i++) {
+                let temp = this.getarea(t.Outline[i]);
+                area = area - temp
+              }
+            }
+            area = (area / 1000000).toFixed(2);
+            if (area < (this.areaValue / 100)) {
+              return undefined
+            }
+          } else {
+            return undefined;
+          }
           text.push(t.RoomLocalName || t.RoomName)
           text.push(t.RoomLocalName || t.RoomName)
           return {
           return {
             IspaceId: t.RoomID,
             IspaceId: t.RoomID,
@@ -639,12 +717,33 @@ export default {
       // 将当前业务空间的每个元素添加到场景中并选中
       // 将当前业务空间的每个元素添加到场景中并选中
       this.scene.addAllLikeSpace(this.curZoneItem.data.OutLine);
       this.scene.addAllLikeSpace(this.curZoneItem.data.OutLine);
     },
     },
+    // 确认业务空间
+    confirmZoneSpace() {
+      this.curZoneItem.data.State = 0;
+      let pa = {
+        zone: this.tab.code,
+        data: {
+          Content: [this.curZoneItem.data],
+          Projection: ['State']
+        },
+      }
+      updateZone(pa, res => {
+        this.curZoneItem.isInfected = false;
+        this.$emit('updateState');
+        this.$message.success('更新成功');
+      })
+    },
+    // 保存并确认业务空间
+    confirmAndSave() {
+      this.confirmAndSaveFlag = true;
+      this.saveRefactorBSP();
+    },
     // 重新划分--保存
     // 重新划分--保存
     saveRefactorBSP() {
     saveRefactorBSP() {
       let selectSpace = this.scene.getSelectedSpaces();
       let selectSpace = this.scene.getSelectedSpaces();
       let selectLikeSpace = this.scene.getSelectedLikeSpace();
       let selectLikeSpace = this.scene.getSelectedLikeSpace();
       //更新业务空间
       //更新业务空间
-      let zoneObj = { Outline: [], Height: 0 }, IspaceIdList = [];
+      let zoneObj = { Outline: [], Height: 0, State: this.confirmAndSaveFlag ? 0 : this.curZoneItem.Infected ? 1 : 0 }, IspaceIdList = [];
       // 空间
       // 空间
       selectSpace.map(t => {
       selectSpace.map(t => {
         zoneObj.Outline.push(t.data.OutLine);
         zoneObj.Outline.push(t.data.OutLine);
@@ -749,26 +848,60 @@ export default {
           })
           })
         }
         }
         createSpaces = arr.map(t => {
         createSpaces = arr.map(t => {
+          let line = outlines[t.data.SourceId];
+          if (!line || !line.length) {
+            return undefined
+          } else {
+            let area = 0;
+            for (let i = 0; i < line.length; i++) {
+              for (let j = 0; j < line[i].length; j++) {
+                if (j == 0) {
+                  area += this.getarea(line[i][0]);
+                } else {
+                  area -= this.getarea(line[i][j]);
+                }
+              }
+            }
+            area = (area / 1000000).toFixed(2);
+            if (area < (this.areaValue / 100)) {
+              return undefined;
+            }
+          }
           return {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
             IspaceId: this.BIMIDToSID[t.data.SourceId],
             RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
-            Outline: outlines[t.data.SourceId],
+            Outline: line,
             BuildingId: this.buildFloor[0],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],
             FloorId: this.buildFloor[1],
             Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
             Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
           }
           }
-        }).filter(item => item.Outline && item.Outline.length)
+        }).filter(item => item)
       } else {
       } else {
         createSpaces = arr.map(t => {
         createSpaces = arr.map(t => {
+          let line = t.data.OutLine;
+          if (!line || !line.length) {
+            return undefined
+          } else {
+            let area = this.getarea(line[0]);
+            if (line.length > 1) {
+              for (let i = 1; i < line.length; i++) {
+                area -= this.getarea(line[i]);
+              }
+            }
+            area = (area / 1000000).toFixed(2);
+            if (area < (this.areaValue / 100)) {
+              return undefined;
+            }
+          }
           return {
           return {
             IspaceId: this.BIMIDToSID[t.data.SourceId],
             IspaceId: this.BIMIDToSID[t.data.SourceId],
             RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
             RoomLocalName: this.BIMIDToSIName[t.data.SourceId],
-            Outline: [t.data.OutLine],
+            Outline: [line],
             BuildingId: this.buildFloor[0],
             BuildingId: this.buildFloor[0],
             FloorId: this.buildFloor[1],
             FloorId: this.buildFloor[1],
             Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
             Height: t.data.Height > 100 ? (t.data.Height / 1000).toFixed(2) : t.data.Height || 0
           }
           }
-        })
+        }).filter(item => item);
       }
       }
       if (createSpaces.length) {
       if (createSpaces.length) {
         this.canvasLoading = true;
         this.canvasLoading = true;
@@ -786,6 +919,12 @@ export default {
       createRelateInZoneAndISp(pa, res => {
       createRelateInZoneAndISp(pa, res => {
         this.$message.success('创建成功');
         this.$message.success('创建成功');
         this.init(2);
         this.init(2);
+        if (this.confirmAndSaveFlag) {
+          this.confirmAndSaveFlag = false;
+          this.curZoneItem.selected = false;
+          this.curZoneItem = {};
+          this.$emit('updateState');
+        }
       })
       })
     },
     },
     // 批量更新业务空间和元空间的关系
     // 批量更新业务空间和元空间的关系
@@ -853,7 +992,7 @@ export default {
         zone: this.tab.code,
         zone: this.tab.code,
         data: {
         data: {
           Content: [zoneObj],
           Content: [zoneObj],
-          Projection: ['Outline', 'BIMLocation']
+          Projection: ['Outline', 'BIMLocation', 'State']
         },
         },
       }
       }
       updateZone(pa, res => {
       updateZone(pa, res => {
@@ -890,6 +1029,19 @@ export default {
       Z = (Z / len).toFixed(2);
       Z = (Z / len).toFixed(2);
       return `${X},${Y},${Z}`
       return `${X},${Y},${Z}`
     },
     },
+    // 计算面积
+    getarea(arr) {
+      if (!arr.length) {
+        return 0;
+      }
+      let sum = 0;
+      let n = arr.length;
+      arr[n] = arr[0];
+      for (let i = 1; i <= n; i++) {
+        sum += arr[i].X * arr[i - 1].Y - arr[i - 1].X * arr[i].Y;
+      }
+      return Math.abs(sum / 2)
+    },
     // canvas 获取焦点
     // canvas 获取焦点
     focus() {
     focus() {
       document.getElementById(`floorCanvas`).focus()
       document.getElementById(`floorCanvas`).focus()
@@ -994,6 +1146,8 @@ export default {
 #graphy {
 #graphy {
   position: relative;
   position: relative;
   width: 100%;
   width: 100%;
+  box-sizing: border-box;
+  padding: 0 10px 10px;
   height: calc(100% - 56px);
   height: calc(100% - 56px);
   .canvas-box {
   .canvas-box {
     width: 100%;
     width: 100%;
@@ -1002,13 +1156,15 @@ export default {
   .buttons-box {
   .buttons-box {
     position: absolute;
     position: absolute;
     top: 0;
     top: 0;
+    left: 0;
+    padding: 0 10px;
     width: 100%;
     width: 100%;
     z-index: 999;
     z-index: 999;
     & > div {
     & > div {
       float: left;
       float: left;
     }
     }
     /deep/ .el-autocomplete {
     /deep/ .el-autocomplete {
-      display: block;
+      display: inline-block;
       width: 320px;
       width: 320px;
       margin-right: 10px;
       margin-right: 10px;
     }
     }
@@ -1037,10 +1193,15 @@ export default {
   }
   }
   .canvas-actions-box {
   .canvas-actions-box {
     position: absolute;
     position: absolute;
-    bottom: 20px;
+    bottom: 60px;
     left: 50%;
     left: 50%;
     transform: translateX(-50%);
     transform: translateX(-50%);
-    z-index: 999;
+    z-index: 99;
+  }
+  #autoRelate {
+    /deep/ .el-slider__marks-text:nth-child(2) {
+      width: 25px;
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 48 - 41
src/components/ledger/addDialog/dialogZone.vue

@@ -1,62 +1,69 @@
 <template>
 <template>
   <!-- Form -->
   <!-- Form -->
-  <el-dialog title="收货地址" :visible.sync="dialogFormVisible">
+  <el-dialog title="收货地址" :visible.sync="dialogFormVisible" width="30%">
     <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
     <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 label="分区名称" prop="Name">
+        <el-input v-model="ruleForm.Name"></el-input>
       </el-form-item>
       </el-form-item>
-      <el-form-item label="分区ID" prop="id">
-        <el-input v-model="ruleForm.id"></el-input>
+      <el-form-item label="分区ID" prop="Id">
+        <el-input v-model="ruleForm.Id"></el-input>
       </el-form-item>
       </el-form-item>
       <el-form-item style="float: right;margin-top: 20px">
       <el-form-item style="float: right;margin-top: 20px">
         <el-button @click="dialogFormVisible = false">取 消</el-button>
         <el-button @click="dialogFormVisible = false">取 消</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')">添 加</el-button>
         <el-button type="primary" @click="submitForm('ruleForm')">添 加</el-button>
       </el-form-item>
       </el-form-item>
-
-      <!--    <div slot="footer" class="dialog-footer">-->
-      <!--      <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>-->
-      <!--    </div>-->
     </el-form>
     </el-form>
   </el-dialog>
   </el-dialog>
 </template>
 </template>
 
 
 <script>
 <script>
-  export default {
-    name: "dialogZone",
-    data() {
-      return {
-        dialogFormVisible: false,
-        ruleForm: {
-          name: '',
-          id: ''
+import {
+  zoneCreateType
+} from "@/api/scan/request"
+export default {
+  name: "dialogZone",
+  data() {
+    return {
+      dialogFormVisible: false,
+      ruleForm: {
+        Name: '',
+        Id: '',
+        ParentId: "OtherZone"
+      },
+      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) {
+          let pa = {
+            Content: [this.ruleForm]
+          }
+          zoneCreateType(pa, res=>{
+            this.$message.success('添加成功')
+            this.dialogFormVisible = false
+            this.ruleForm.Name = ''
+            this.ruleForm.Id = '';
+            this.$emit('createSuccess')
+          })
 
 
-        },
-        rules: {
-          name: [
-            {required: true, message: '请输入分区名称', trigger: 'blur'},
-            // {min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur'}
-          ],
-          id: [
-            {required: true, message: '请输入分区ID', trigger: 'blur'},
-          ],
+        } else {
+          console.log('error submit!!');
+          return false;
         }
         }
-      };
+      });
     },
     },
-    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>
 </script>
 
 
 <style scoped>
 <style scoped>

+ 169 - 76
src/views/ledger/spacelist/index.vue

@@ -8,7 +8,15 @@
     <!--------- 页面头部   -------------->
     <!--------- 页面头部   -------------->
     <div class="saga-title" v-show="!needCalculate">
     <div class="saga-title" v-show="!needCalculate">
       <div class="saga-build-mess">
       <div class="saga-build-mess">
-        <floorCascader @change="changeCascader" ref="floorCascader"></floorCascader>
+        <div style="margin-left: 10px;float: left;">
+          <span style="color: #999999;font-size: 14px;margin-right: 12px;">建筑楼层</span>
+          <el-cascader :options="options" placeholder="请选择建筑楼层" v-model="buildFloorSelectd" @change="changeCascader">
+            <template slot-scope="{ node, data }">
+              <i class="el-icon-warning-outline" v-if="data.Count" style="color:red;margin-right:10px;"></i>
+              <span>{{ data.label }}</span>
+            </template>
+          </el-cascader>
+        </div>
         <input type="hidden" v-model="zoneItemID">
         <input type="hidden" v-model="zoneItemID">
       </div>
       </div>
       <div class="saga-build-tab">
       <div class="saga-build-tab">
@@ -24,17 +32,24 @@
         <div class="types">
         <div class="types">
           <el-tabs v-model="activeName" type='card' @tab-click="tabClick">
           <el-tabs v-model="activeName" type='card' @tab-click="tabClick">
             <template v-for="(item,index) in tabsList">
             <template v-for="(item,index) in tabsList">
-              <el-tab-pane :name="item.Code" :key="index" :label="item.Name"></el-tab-pane>
+              <el-tab-pane :name="item.Code" :key="index">
+                <span slot="label"><i class="el-icon-warning-outline" v-if="item.Count>0"
+                    style="color:red;margin-right:10px;"></i>{{item.Name}}</span>
+              </el-tab-pane>
             </template>
             </template>
           </el-tabs>
           </el-tabs>
         </div>
         </div>
       </el-row>
       </el-row>
       <div v-show="isMyTab == 1" style="width:100%;height:100%">
       <div v-show="isMyTab == 1" style="width:100%;height:100%">
-        <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy" @copyID="copyID"></graphy>
+        <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy" @copyID="copyID"
+          @updateState="updateStateSuc"></graphy>
       </div>
       </div>
       <div v-show="isMyTab == 2">
       <div v-show="isMyTab == 2">
         <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :id="`handsontable${activeName}`"></handsontable-main>
         <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :id="`handsontable${activeName}`"></handsontable-main>
       </div>
       </div>
+      <div class="infectedTips" v-show="isMyTab==1&&infectedTotal>0">
+        <p>因底图变化而受影响的业务空间{{infectedTotal.toString()}}个,本层受影响的业务空间{{infectedCurfloor.toString()}}个</p>
+      </div>
     </div>
     </div>
     <div v-show="needCalculate" style="display:flex;align-items:center;justify-content:center;height:100%;background-color:#fff;">
     <div v-show="needCalculate" style="display:flex;align-items:center;justify-content:center;height:100%;background-color:#fff;">
       <div class="center" style="flex:1">
       <div class="center" style="flex:1">
@@ -46,48 +61,48 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <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,
-  getAllbusiness,
-  getSpaceFloor,
-  buildingQuery, //数据中心-建筑查询
-  queryDictionaryHead, //数据中心-字典头部信息查询接口
-  getrelationTypeProject, //数据中心-当该项目中的"建筑体下的业务空间"“楼层下的业务空间”关系的状态为需更新时,业务空间台账功能不可用
-  getSpaceBdFlCount, // 属于多建筑楼层的空间数据统计
-} from "@/api/scan/request";
-import tools from '@/utils/scan/tools'
-import floorCascader from "@/components/ledger/lib/floorCascader";
-import { mapGetters, mapActions } from "vuex";
-export default {
-  components: {
-    graphy,
-    handsontableMain,
-    roomInFloorDialog,
-    floorCascader,
-  },
-  computed: {
-    ...mapGetters('layout', ['projectId', 'userId', 'secret'])
-  },
-  data() {
-    return {
-      floor: {
-        influence: false, //受影响的业务空间弹窗
-        details: false, //详情弹窗
-        notRelated: false,
-        facility: false
-      },
-      param: {
-        ProjId: this.projectId, //项目id
-        UserId: this.userId, //用户id
+  // 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 {
+    countObjZone,
+    getDataDictionary,
+    getrelationTypeProject,
+    getSpaceBdFlCount,
+    queryAllZoneType,
+    queryBFloorWithState,
+    searchZoneQuery
+  } 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() {
+      return {
+        floor: {
+          influence: false, //受影响的业务空间弹窗
+          details: false, //详情弹窗
+          notRelated: false,
+          facility: false
+        },
+        param: {
+          ProjId: this.projectId, //项目id
+          UserId: this.userId, //用户id
         secret: this.secret
         secret: this.secret
       },
       },
       buildMess: {
       buildMess: {
@@ -108,18 +123,15 @@ export default {
         "rel_type": "99"
         "rel_type": "99"
       },
       },
       options: [], //建筑楼层级联下拉
       options: [], //建筑楼层级联下拉
-      props: { //自定义字段
-        value: "BuildID",
-        label: "BuildLocalName",
-        children: "Floor"
-      },
       floorToMap: {}, //楼层及其对应的模型图
       floorToMap: {}, //楼层及其对应的模型图
       FloorMap: "", //当前选中的楼层对象
       FloorMap: "", //当前选中的楼层对象
       zoneItemID: '',
       zoneItemID: '',
       buildFloorSelectd: [''], //当前所选的建筑楼层
       buildFloorSelectd: [''], //当前所选的建筑楼层
       childBackParam: {},
       childBackParam: {},
       needCalculate: false, // 关系是否需要计算
       needCalculate: false, // 关系是否需要计算
-      mutiCount: 0
+      mutiCount: 0,
+      infectedTotal: 0,
+      infectedCurfloor: 0
     };
     };
   },
   },
   created() {
   created() {
@@ -134,32 +146,50 @@ export default {
       this.getTypes()
       this.getTypes()
       this.getBuilding()
       this.getBuilding()
       this.getMutiCount()
       this.getMutiCount()
+      this.getInfected();
     },
     },
     // 获取项目下建筑
     // 获取项目下建筑
     getBuilding() {
     getBuilding() {
-      let pa = {
-        Cascade: [{ name: 'floor', Orders: 'SequenceId desc' }],
-        Orders: "BuildLocalName asc",
-      }
-      buildingQuery(pa, res => {
+      queryBFloorWithState({}, res => {
         this.options = res.Content.map(t => {
         this.options = res.Content.map(t => {
+          t.value = t.BuildID;
+          t.label = t.BuildLocalName || t.BuildName;
+          t.Count = 0;
           if (t.Floor) {
           if (t.Floor) {
-            t.Floor = t.Floor.map(item => {
-              item.BuildID = item.FloorID;
-              item.BuildLocalName = item.FloorLocalName;
+            t.children = t.Floor.map(item => {
+              item.value = item.FloorID;
+              item.label = item.FloorLocalName;
               this.floorToMap[item.FloorID] = item;
               this.floorToMap[item.FloorID] = item;
+              if (item.Count > 0) {
+                t.Count++;
+              }
               return item;
               return item;
             })
             })
+            t.children.unshift({ value: "all", label: "全部" }, { value: 'noKnow', label: "未明确楼层" })
           } else {
           } else {
-            t.Floor = []
+            t.children = []
           }
           }
           return t;
           return t;
         })
         })
+        this.options.unshift({ value: "all", label: "全部" }, { value: "noKnow", label: "未明确建筑" })
         if (this.childBackParam.zone) {
         if (this.childBackParam.zone) {
           this.changeCascader(this.buildFloorSelectd);
           this.changeCascader(this.buildFloorSelectd);
-          this.$refs.floorCascader.setValue(this.buildFloorSelectd)
+        }
+      })
+    },
+    // 获取受影响统计
+    getInfected(floor) {
+      let pa = {
+        Filters: `State=1`
+      }
+      if (floor) {
+        pa.Filters += `;FloorId="${floor}"`
+      }
+      countObjZone(pa, res => {
+        if (floor) {
+          this.infectedCurfloor = res.Count
         } else {
         } else {
-          this.$refs.floorCascader.setValue([''])
+          this.infectedTotal = res.Count
         }
         }
       })
       })
     },
     },
@@ -168,27 +198,23 @@ export default {
       this.changeGraphyOrTable(val)
       this.changeGraphyOrTable(val)
     },
     },
     // 获取tabs的列表
     // 获取tabs的列表
-    getTypes() {
+    getTypes(floorid) {
       let pa = {
       let pa = {
-        Filters: `parentId = 'Space'`
+        Cascade: [{ Name: 'zoneType' }]
+      }
+      if (floorid) {
+        pa.FloorId = floorid
       }
       }
-      queryDictionaryHead(pa, res => {
+      queryAllZoneType(pa, res => {
         this.tabsList = res.Content.map(t => {
         this.tabsList = res.Content.map(t => {
           if (t.Name == "元空间") {
           if (t.Name == "元空间") {
             return undefined;
             return undefined;
           }
           }
           return t;
           return t;
         }).filter(item => item);
         }).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) {
         if (this.childBackParam.zone) {
           this.activeName = this.childBackParam.zone;
           this.activeName = this.childBackParam.zone;
+
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
           this.buildFloorSelectd = this.childBackParam.buildFloorSelectd;
           this.isMyTab = this.childBackParam.isMyTab;
           this.isMyTab = this.childBackParam.isMyTab;
         } else {
         } else {
@@ -237,8 +263,11 @@ export default {
     //修改所选建筑楼层
     //修改所选建筑楼层
     changeCascader(val) {
     changeCascader(val) {
       this.buildFloorSelectd = val;
       this.buildFloorSelectd = val;
+      // this.inquireZone()
+
       // 如果选择的是全部或者未明确
       // 如果选择的是全部或者未明确
       if (val.indexOf('noKnow') > -1 || val.indexOf('all') > -1) {
       if (val.indexOf('noKnow') > -1 || val.indexOf('all') > -1) {
+        this.getTypes()
         this.isMyTab = 2;
         this.isMyTab = 2;
         this.FloorMap = {}
         this.FloorMap = {}
       } else {
       } else {
@@ -246,25 +275,68 @@ export default {
         if (!this.floorToMap[val[1]].StructureInfo || !this.floorToMap[val[1]].StructureInfo.FloorMap) {
         if (!this.floorToMap[val[1]].StructureInfo || !this.floorToMap[val[1]].StructureInfo.FloorMap) {
           this.isMyTab = 2;
           this.isMyTab = 2;
         }
         }
+        this.getTypes(val[1]);
         this.FloorMap = this.floorToMap[val[1]];
         this.FloorMap = this.floorToMap[val[1]];
       }
       }
       this.changeGraphyOrTable(this.isMyTab)
       this.changeGraphyOrTable(this.isMyTab)
     },
     },
+
     // 判断切换至图还是表
     // 判断切换至图还是表
     changeGraphyOrTable(num) {
     changeGraphyOrTable(num) {
       this.activeTabType = this.getItemForType()
       this.activeTabType = this.getItemForType()
       if (!this.buildFloorSelectd[0]) {
       if (!this.buildFloorSelectd[0]) {
         this.$message.warning('请选择建筑楼层')
         this.$message.warning('请选择建筑楼层')
         return
         return
-      };
+      }
+
       if (num == 2) {
       if (num == 2) {
         this.initMessage();
         this.initMessage();
       } else {
       } 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);
       }
       }
     },
     },
+    // inquireZone() {
+    //   //查询空间信息
+    //   let params = {
+    //     ZoneType: this.activeName,
+    //     PageNumber: 1,
+    //     PageSize: 50,
+    //     Orders: "createTime desc, RoomID asc"
+    //   };
+    //   if (this.buildFloorSelectd.length === 1) {
+    //     switch (this.buildFloorSelectd[0]) {
+    //       case 'noKnow':
+    //         params.BuildingId = 'isnull';
+    //         break;
+    //       case 'all':
+    //         // params.BuildingId = '';
+    //         break
+    //     }
+    //   } else if (this.buildFloorSelectd.length === 2) {
+    //     switch (this.buildFloorSelectd[1]) {
+    //       case 'noKnow':
+    //         params.BuildingId = this.buildFloorSelectd[0];
+    //         params.FloorId = 'isnull';
+    //         break;
+    //       case 'all' :
+    //         params.BuildingId = this.buildFloorSelectd[0];
+    //         // params.FloorId = '';
+    //         break;
+    //       default:
+    //         params.BuildingId = this.buildFloorSelectd[0];
+    //         params.FloorId = this.buildFloorSelectd[1]
+    //
+    //     }
+    //   }
+    //   searchZoneQuery(params, res => {
+    //
+    //   })
+    // },
     // 触发获取表头-获取初始化信息点
     // 触发获取表头-获取初始化信息点
     initMessage() {
     initMessage() {
+  // this.inquireZone()
+      //
       let params = {
       let params = {
         data: {
         data: {
           Orders: "sort asc",
           Orders: "sort asc",
@@ -273,8 +345,10 @@ export default {
         },
         },
         type: this.activeName
         type: this.activeName
       }
       }
+
       getDataDictionary(params, res => {
       getDataDictionary(params, res => {
         this.$refs.handsontable.getHeader(res.Content, this.buildFloorSelectd);
         this.$refs.handsontable.getHeader(res.Content, this.buildFloorSelectd);
+
       })
       })
     },
     },
     checkSpace(list, build, graphyId) {
     checkSpace(list, build, graphyId) {
@@ -309,7 +383,7 @@ export default {
       this.floor.facility = true
       this.floor.facility = true
       this.$refs.facility.getData(infos, this.buildMess)
       this.$refs.facility.getData(infos, this.buildMess)
     },
     },
-    copyID(val){
+    copyID(val) {
       this.$refs.handsontable.zoneItemID = val;
       this.$refs.handsontable.zoneItemID = val;
     },
     },
     // 空间属于多个建筑楼层
     // 空间属于多个建筑楼层
@@ -322,6 +396,13 @@ export default {
     },
     },
     relaSuc() {
     relaSuc() {
       this.init();
       this.init();
+    },
+    // 受影响业务空间确认成功回调
+    updateStateSuc() {
+      this.getBuilding()
+      this.getTypes(this.buildFloorSelectd[1]);
+      this.infectedTotal--;
+      this.infectedCurfloor--;
     }
     }
   },
   },
   watch: {
   watch: {
@@ -425,15 +506,27 @@ export default {
     overflow: hidden;
     overflow: hidden;
     height: 100%;
     height: 100%;
     background: #fff;
     background: #fff;
-    padding: 10px;
+    // padding: 10px;
     /deep/ .el-tabs__item.is-top {
     /deep/ .el-tabs__item.is-top {
       border-top: 2px solid transparent;
       border-top: 2px solid transparent;
       &.is-active {
       &.is-active {
         border-top: 2px solid #409eff;
         border-top: 2px solid #409eff;
       }
       }
     }
     }
+    .infectedTips {
+      position: absolute;
+      bottom: 0px;
+      box-sizing: border-box;
+      width: 100%;
+      padding: 0 20px;
+      line-height: 40px;
+      background: #ec808d;
+      color: #fff;
+      z-index: 9;
+    }
   }
   }
   .spaceTypes {
   .spaceTypes {
+    padding: 10px 10px 0;
     .types {
     .types {
       float: left;
       float: left;
       width: 100%;
       width: 100%;