yangjunjing 5 년 전
부모
커밋
5d37099024
70개의 변경된 파일7421개의 추가작업 그리고 362개의 파일을 삭제
  1. 1 1
      config/index.js
  2. 6 6
      config/prod.env.js
  3. 4 4
      package.json
  4. 109 0
      src/api/data_admin/buildTaskApi.js
  5. 56 0
      src/api/msgsever.js
  6. 73 1
      src/api/scan/request.js
  7. BIN
      src/assets/house.jpg
  8. 14 6
      src/assets/style/iconfont/iconfont.css
  9. BIN
      src/assets/style/iconfont/iconfont.eot
  10. 7 1
      src/assets/style/iconfont/iconfont.svg
  11. BIN
      src/assets/style/iconfont/iconfont.ttf
  12. BIN
      src/assets/style/iconfont/iconfont.woff
  13. 42 9
      src/components/business_space/newGraphy/canvasFun.vue
  14. 197 97
      src/components/business_space/newGraphy/graphy.vue
  15. 137 27
      src/components/business_space/newGraphy/unRelateBSP.vue
  16. 184 0
      src/components/data_admin/buildTask/detail/assetsDetail.vue
  17. 219 0
      src/components/data_admin/buildTask/detail/deviceDetail.vue
  18. 97 0
      src/components/data_admin/buildTask/dialog/addTaskDialog.vue
  19. 253 0
      src/components/data_admin/buildTask/dialog/modelTaskDialog.vue
  20. 239 0
      src/components/data_admin/buildTask/draw/drawModel.vue
  21. 70 0
      src/components/data_admin/buildTask/lib/assetsCascader.vue
  22. 70 0
      src/components/data_admin/buildTask/lib/deviceCascader.vue
  23. 70 0
      src/components/data_admin/buildTask/lib/modelCascader.vue
  24. 81 0
      src/components/data_admin/buildTask/lib/modelFile.vue
  25. 53 0
      src/components/data_admin/buildTask/lib/taskState.vue
  26. 220 0
      src/components/data_admin/buildTask/table/assetsTable.vue
  27. 248 0
      src/components/data_admin/buildTask/table/deviceTable.vue
  28. 238 0
      src/components/data_admin/buildTask/table/modelTable.vue
  29. 202 0
      src/components/data_admin/buildTask/table/replaceTable.vue
  30. 202 0
      src/components/data_admin/buildTask/table/tearTable.vue
  31. 160 0
      src/components/data_admin/buildTask/taskStatistics.vue
  32. 225 0
      src/components/ledger/cenote/dialog/addSpaceDialog.vue
  33. 62 31
      src/components/ledger/handsontables/system.vue
  34. 1 1
      src/components/ledger/lib/assets.vue
  35. 94 0
      src/components/ledger/lib/buildfloorCascader.vue
  36. 1 1
      src/components/ledger/lib/cascader.vue
  37. 107 0
      src/components/ledger/lib/editSysFloor.vue
  38. 6 5
      src/components/ledger/lib/floorCascader.vue
  39. 65 0
      src/components/ledger/lib/spaceSelect.vue
  40. 180 0
      src/components/ledger/system/dialog/addCenoteDialog.vue
  41. 209 0
      src/components/ledger/system/dialog/addEquipDialog.vue
  42. 225 0
      src/components/ledger/system/dialog/addSpaceDialog.vue
  43. 140 0
      src/components/ledger/system/lib/equipType.vue
  44. 156 0
      src/components/ledger/system/table/cenoteTable.vue
  45. 144 0
      src/components/ledger/system/table/deviceTable.vue
  46. 156 0
      src/components/ledger/system/table/spaceTable.vue
  47. 107 0
      src/components/ready/buildfloor/modelFile.vue
  48. 83 0
      src/components/ready/buildfloor/modelFolder.vue
  49. 322 45
      src/framework/components/messagesever/index.vue
  50. 209 0
      src/framework/components/messagesever/msgAllDetails.vue
  51. 29 10
      src/framework/components/messagesever/msmq.js
  52. 14 10
      src/framework/layout/layout-store.js
  53. 58 15
      src/router/system.js
  54. 25 1
      src/utils/handsontable/mainText.js
  55. 26 0
      src/utils/scan/directive.js
  56. 27 0
      src/utils/tools.js
  57. 241 0
      src/views/data_admin/buildTask/addTask/addAssetsTask.vue
  58. 301 0
      src/views/data_admin/buildTask/addTask/addDeviceTask.vue
  59. 211 0
      src/views/data_admin/buildTask/addTask/addModelTask.vue
  60. 152 30
      src/views/data_admin/buildTask/index.vue
  61. 4 27
      src/views/ledger/cenotelist/index.vue
  62. 260 0
      src/views/ledger/cenotelist/relatedSpace.vue
  63. 82 0
      src/views/ledger/cenotelist/relatedSpaceList.vue
  64. 2 4
      src/views/ledger/spacelist/index.vue
  65. 6 12
      src/views/ledger/system/index.vue
  66. 197 0
      src/views/ledger/system/systemDetail/index.vue
  67. 8 1
      src/views/model/file/index.vue
  68. 1 1
      src/views/ready/buildfloor/drawGraphy/checkGraphy.vue
  69. 32 15
      src/views/ready/buildfloor/drawGraphy/drawFloor.vue
  70. 1 1
      src/views/ready/buildfloor/repetitionGraphy.vue

+ 1 - 1
config/index.js

@@ -94,7 +94,7 @@ module.exports = {
                 pathRewrite: {
                     "^/modelapi": "/"
                 }
-            },
+            }
         },
 
         // Various Dev Server settings

+ 6 - 6
config/prod.env.js

@@ -1,10 +1,10 @@
 'use strict'
 module.exports = {
     NODE_ENV: '"production"',
-    // BASE_URL: '"http://192.168.20.215"', //测试iframe地址
-    // SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
-    // MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
-    BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
-    SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
-    MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
+    BASE_URL: '"http://192.168.20.215"', //测试iframe地址
+    SSO_SERVER: '"http://192.168.20.102:8080"', //(新)测试环境
+    MQTT_SERVICE: '"ws://192.168.20.225:61614/stomp/"' //MQ测试环境地址
+    // BASE_URL: '"http://mbi.sagacloud.cn"', //线上iframe地址
+    // SSO_SERVER: '"http://sso.sagacloud.cn"',  //正式环境
+    // MQTT_SERVICE: '"ws://adm.sagacloud.cn/stomp/"' //MQ正式环境地址
 }

+ 4 - 4
package.json

@@ -25,10 +25,10 @@
         "vue-router": "^3.0.1",
         "vuex": "^3.1.0",
         "cad-engine": "2.0.250",
-        "@saga-web/base": "2.1.8",
-        "@saga-web/draw": "2.1.57",
-        "@saga-web/graphy": "2.1.28",
-        "@saga-web/cad-engine": "2.0.308"
+        "@saga-web/base": "2.1.9",
+        "@saga-web/draw": "2.1.58",
+        "@saga-web/graphy": "2.1.30",
+        "@saga-web/cad-engine": "2.0.385"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 109 - 0
src/api/data_admin/buildTaskApi.js

@@ -0,0 +1,109 @@
+import http from '../scan/httpUtil'
+const baseUrl = '/api';
+
+/**
+ * info: 查询统计数量(查询总数量不传参数,查询已完成数量TaskState=0,查询未找到TaskState=-1,查询未验证TaskState=1)
+ * @param {Filters:string} param 查询参数
+ * @param {*} success  成功的回调函数
+ * 
+ */
+export function queryTaskCount(param, success) {
+    let url = `${baseUrl}/datacenter/scan-task-base/count`;
+    http.postJson(url, param, success)
+}
+
+/*************************模型任务接口****************************/
+//创建模型任务
+export function createModelTask(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/create`;
+    http.postJson(url, param, success)
+}
+//根据id删除模型任务
+export function deleteModelTask(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/delete`;
+    http.postJson(url, param, success)
+}
+//查询:根据模型空间ID查询设备信息
+export function queryModelDiglog(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/equip-query`;
+    http.postJson(url, param, success)
+}
+//查询模型任务
+export function queryModelTask(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/page-query`;
+    http.postJson(url, param, success)
+}
+//更新模型任务
+export function updateModelTask(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/update`;
+    http.postJson(url, param, success)
+}
+//查询设备分类
+export function queryModelCategory(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/model-category-query`;
+    http.postJson(url, param, success)
+}
+//查询模型文件夹和文件
+export function queryModelFile(param, success) {
+    let url = `${baseUrl}/datacenter/model-scan-task/model-file-query`;
+    http.postJson(url, param, success)
+}
+
+/*************************设备台账任务接口****************************/
+//创建设备台账任务
+export function createDeviceTask(param, success) {
+    let url = `${baseUrl}/datacenter/equip-scan-task/create`;
+    http.postJson(url, param, success)
+}
+//根据id删除设备台账任务
+export function deleteDeviceTask(param, success) {
+    let url = `${baseUrl}/datacenter/equip-scan-task/delete`;
+    http.postJson(url, param, success)
+}
+//查询设备台账任务
+export function queryDeviceTask(param, success) {
+    let url = `${baseUrl}/datacenter/equip-scan-task/page-query`;
+    http.postJson(url, param, success)
+}
+//更新设备台账任务
+export function updateDeviceTask(param, success) {
+    let url = `${baseUrl}/datacenter/equip-scan-task/update`;
+    http.postJson(url, param, success)
+}
+//查询设备分类
+export function queryDeviceCategory(param, success) {
+    let url = `${baseUrl}/datacenter/equip-scan-task/equip-category-query`;
+    http.postJson(url, param, success)
+}
+
+/*************************资产台账任务接口****************************/
+//统计数量
+export function countAssetsTask(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/count`;
+    http.postJson(url, param, success)
+}
+//创建设备台账任务
+export function createAssetsTask(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/create`;
+    http.postJson(url, param, success)
+}
+//根据id删除设备台账任务
+export function deleteAssetsTask(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/delete`;
+    http.postJson(url, param, success)
+}
+//查询设备台账任务
+export function queryAssetsTask(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/page-query`;
+    http.postJson(url, param, success)
+}
+//更新设备台账任务
+export function updateAssetsTask(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/update`;
+    http.postJson(url, param, success)
+}
+//查询设备族
+export function queryAssetsFamily(param, success) {
+    let url = `${baseUrl}/datacenter/property-scan-task/property-category-query`;
+    http.postJson(url, param, success)
+}

+ 56 - 0
src/api/msgsever.js

@@ -0,0 +1,56 @@
+import http from './scan/httpUtil'
+const baseUrl = '/api';
+
+/*************************消息中心接口****************************/
+
+/**
+ * title: 统计数量
+ * info: 查询总数量不传参数,查询 已读Read = true,未读 Read = false
+ */
+export function messgeCount(param, success) {
+    let url = `${baseUrl}/message-center/message/count`;
+    http.postJson(url, param, success)
+}
+
+/**
+ * title: 创建消息
+ * info: 消息类型:提示(Info)、警告(Warning)、错误(Error)、成功(Success)
+ */
+export function messgeCreate(param, success) {
+    let url = `${baseUrl}/message-center/message/create`;
+    http.postJson(url, param, success)
+}
+
+/**
+ * title: 删除消息
+ */
+export function messgeDelete(param, success) {
+    let url = `${baseUrl}/message-center/message/delete`;
+    http.postJson(url, param, success)
+}
+
+/**
+ * title: 查询消息列表
+ */
+export function messgeQuery(param, success) {
+    let url = `${baseUrl}/message-center/message/page-query`;
+    http.postJson(url, param, success)
+}
+
+/**
+ * title: 更新消息状态
+ * info: 是否读过:未读(f)、已读(t)
+ */
+export function messgeUpdate(param, success) {
+    let url = `${baseUrl}/message-center/message/update`;
+    http.postJson(url, param, success)
+}
+
+/**
+ * title: 根据接收人将消息置为已读
+ * info: 已读Read = true,*UserId
+ */
+export function messgeUpdateState(param, success) {
+    let url = `${baseUrl}/message-center/message/update-state`;
+    http.postJson(url, param, success)
+}

+ 73 - 1
src/api/scan/request.js

@@ -919,6 +919,19 @@ export function queryLinkSys(param, success) {
     http.postJson(url, param, success)
 }
 
+//查询系统信息 - 建筑楼层 - 系统一对多
+export function querySysLinkBuild(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/query-new`;
+    if(param.buildingId){
+        url += `?buildingId=${param.buildingId}`
+    }
+    if(param.floorId){
+        url += `&floorId=${param.floorId}`
+    }
+    http.postJson(url, param.data, success)
+}
+
+
 //设备清单 - 设备关联系统 设备1-n
 export function equipLinkSys(param, success) {
     let url = `${baseUrl}/datacenter/sy-in-eq/link-sy`;
@@ -1053,6 +1066,18 @@ export function getEquipNotInSys(param, success) {
     http.postJson(url, param.data, success)
 }
 
+//创建系统所在建筑关系,系统一对多,覆盖
+export function sysRelateBuild(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-bd/link-bd`;
+    http.postJson(url, param, success)
+}
+
+//创建系统所在楼层关系,系统一对多,覆盖
+export function sysRelateFloor(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-fl/link-fl`;
+    http.postJson(url, param, success)
+}
+
 //查询当前系统下的设备
 export function getEquipInSys(param, success) {
     let url = `${baseUrl}/equip-component/equip-query/sys-equip`;
@@ -1323,6 +1348,24 @@ export function shthroughshUnlink(param, success) {
     let url = `${baseUrl}/datacenter/sh-through-sh/unlink`;
     http.postJson(url, param, success)
 }
+//查询没有和当前系统关联的设备
+export function unSysEq(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/general—system/un-sys-equip?sysId=${param.sysId}`;
+    http.postJson(url, data, success)
+}
+//查询没有和当前系统关联的竖井
+export function unSysShaft(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/general—system/un-sys-shaft?sysId=${param.sysId}`;
+    http.postJson(url, data, success)
+}
+//查询没有和当前系统关联的业务空间
+export function unSysZoneSpace(param, success) {
+    let data = param.data
+    let url = `${baseUrl}/datacenter/general—system/un-sys-zoneSpaceBaseTable?sysId=${param.sysId}`;
+    http.postJson(url, data, success)
+}
 //查询没有和当前竖井绑定的设备
 export function unshaftInEq(param, success) {
     let data = param.data
@@ -1346,6 +1389,11 @@ export function linkEqSh(param, success) {
     let url = `${baseUrl}/datacenter/eq-in-sh/link-eq-sh`;
     http.postJson(url, param, success)
 }
+//创建系统下的设备关系
+export function linkSysEq(param, success) {
+    let url = `${baseUrl}/datacenter/general—system/link-equip`;
+    http.postJson(url, param, success)
+}
 //竖井的贯通,竖井一对多,此方法不会覆盖以前的记录
 export function linkShaft(param, success) {
     let url = `${baseUrl}/datacenter/sh-through-sh/link-shaft`;
@@ -1356,7 +1404,31 @@ export function linkSySh(param, success) {
     let url = `${baseUrl}/datacenter/sy-in-sh/link-sy-sh`;
     http.postJson(url, param, success)
 }
-
+//创建系统所在业务空间关系
+export function linkSysSp(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-sp-base/link-list`;
+    http.postJson(url, param, success)
+}
+//系统所在竖井,系统一对多,此方法会覆盖以前的记录
+export function linkSh(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-sh/link-sh`;
+    http.postJson(url, param, success)
+}
+//系统所在竖井,系统一对多,此方法不会覆盖以前的记录
+export function linkSysSh(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-sh/link-sy-shs`;
+    http.postJson(url, param, success)
+}
+//根据对象删除系统和设备的关系,只针对一个对象
+export function eqInSysUnlink(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-eq/unlink`;
+    http.postJson(url, param, success)
+}
+//根据对象删除系统所在业务空间关系
+export function spaceInSysUnlink(param, success) {
+    let url = `${baseUrl}/datacenter/sy-in-sp-base/unlink-list?type=${param.type}`;
+    http.postJson(url, param.data, success)
+}
 //关系-----设备所在业务空间--删除关系
 export function eqInSpaceDelete(param, success) {
     let url = `${baseUrl}/datacenter/eq-in-sp-base/unlink-list?type=${param.type}`;

BIN
src/assets/house.jpg


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 14 - 6
src/assets/style/iconfont/iconfont.css


BIN
src/assets/style/iconfont/iconfont.eot


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 7 - 1
src/assets/style/iconfont/iconfont.svg


BIN
src/assets/style/iconfont/iconfont.ttf


BIN
src/assets/style/iconfont/iconfont.woff


+ 42 - 9
src/components/business_space/newGraphy/canvasFun.vue

@@ -1,30 +1,41 @@
 <template>
-  <el-row id="canvas-actions-box" :class="{'isEdit':isEdit}">
+  <el-row id="canvas-actions-box" :class="{'isEdit':config.isEdit}">
     <!-- <div :class="{'active':active=='move'}">
       <i class="iconfont icon-move" @click="moveCanvas"></i>
     </div> -->
+    <div v-if="config.isEdit&&config.groupSelect" :class="{'active':active=='groupSelect'}">
+      <i class="iconfont icon-shuxingxuanze" @click="groupSelect"></i>
+    </div>
     <div>
       <i class="iconfont icon-maximize" @click="fitToWindow"></i>
     </div>
-    <div>
+    <div v-if="!config.isEdit">
       <el-dropdown size="mini" placement="top-start" @command="handleCommand">
         <i class="el-icon-download" style="font-size:20px;color:#fff;"></i>
         <el-dropdown-menu slot='dropdown'>
           <el-dropdown-item command="savePng">保存为png</el-dropdown-item>
           <el-dropdown-item command="saveSvg">保存为svg</el-dropdown-item>
+          <el-dropdown-item command="saveJson">保存为Json</el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
-    <div v-if="isEdit" :class="{'active':active=='divide'}">
-      <i class="iconfont icon-edit1" @click="divide"></i>
+    <div v-if="config.isEdit&&config.divide" :class="{'active':active=='divide'}">
+      <el-dropdown size="mini" placement="top-start" @command="handleDivideCommand" :hide-on-click="false">
+        <i class="iconfont icon-edit1" @click="divide"></i>
+        <el-dropdown-menu slot='dropdown'>
+          <el-dropdown-item command="savePng">
+            吸附<el-switch v-model="isSwitch"></el-switch>
+          </el-dropdown-item>
+        </el-dropdown-menu>
+      </el-dropdown>
     </div>
-    <div v-if="isEdit">
+    <div v-if="config.isEdit&&config.divide">
       <i class="iconfont icon-Erase" @click="clearDivide"></i>
     </div>
-    <div v-if="isEdit">
+    <div v-if="config.isEdit">
       <i class="iconfont icon-Cancel" @click="undo"></i>
     </div>
-    <div v-if="isEdit">
+    <div v-if="config.isEdit">
       <i class="iconfont icon-Anti-cancel" @click="redo"></i>
     </div>
     <div>
@@ -46,11 +57,17 @@ export default {
       active: '',
       min: 1,
       everyScale: 1, // 每份的放大倍数
+      isSwitch: false, // 是否开启吸附
     }
   },
   props: {
-    isEdit: {
-      default: false
+    config: {
+      type: Object,
+      default: {
+        isEdit: false,
+        divide: true,
+        groupSelect: false
+      }
     }
   },
   computed: {
@@ -62,6 +79,11 @@ export default {
     //   this.active = this.active != "move" ? "move" : '';
     //   this.$emit('move', this.active == 'move');
     // },
+    //
+    groupSelect() {
+      this.active = 'groupSelect';
+      this.$emit('groupSelect');
+    },
     // 适配大小
     fitToWindow() {
       this.$emit('fit');
@@ -70,6 +92,10 @@ export default {
     handleCommand(command) {
       this.$emit(command)
     },
+    // 是否开启吸附
+    handleDivideCommand(commond) {
+      this.$emit('changeAbsorb', this.isSwitch);
+    },
     // 切割编辑
     divide() {
       this.active = 'divide';
@@ -124,14 +150,21 @@ export default {
     background-color: #6da60f;
     i {
       cursor: pointer;
+      color: #fff;
     }
   }
+  & > div:active {
+    background-color: #4b7902;
+  }
   & > div.active {
     background-color: #4b7902;
   }
   &.isEdit > div {
     background-color: #02a7f0;
   }
+  &.isEdit > div:active {
+    background-color: #027db4;
+  }
   &.isEdit > div.active {
     background-color: #027db4;
   }

+ 197 - 97
src/components/business_space/newGraphy/graphy.vue

@@ -25,7 +25,12 @@
         <div class="button-group">
           <!-- 默认操作模式 -->
           <div v-show="type==1">
-            <el-button @click="editGraphy">编辑平面图</el-button>
+            <el-dropdown split-button type="primary" @click="editGraphy" @command="handleCommand">
+              创建业务空间
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="groupCreateBSpace">批量创建业务空间</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
           </div>
           <!-- 点击已经关联的业务空间 -->
           <div v-show="type==2">
@@ -35,8 +40,8 @@
           </div>
           <!-- 点击未关联的业务空间 -->
           <div v-show="type==3">
-            <el-button plain @click="createNewZone">创建新的业务空间</el-button>
-            <el-button type="primary" @click="lookUnrelatBSpace(true)">从未关联平面图的业务空间中选择</el-button>
+            <el-button plain @click="createNewZone">创建单个全新的业务空间</el-button>
+            <el-button plain @click="lookUnrelatBSpace(true)">从未关联平面图的业务空间中选择</el-button>
             <el-button plain @click="cancelGraphy">取 消</el-button>
           </div>
           <!-- 重新划分业务空间 -->
@@ -44,6 +49,11 @@
             <el-button plain @click="cancelGraphy">取 消</el-button>
             <el-button type="primary" @click="saveRefactorBSP">保存</el-button>
           </div>
+          <!-- 批量创建所选业务空间 -->
+          <div v-show="type==5">
+            <el-button type="primary" @click="groupCreateZone">批量创建所选业务空间</el-button>
+            <el-button plain @click="cancelGraphy">取 消</el-button>
+          </div>
         </div>
         <div style="position: absolute;right: 0;">
           <el-button type="text" @click="lookUnrelatBSpace(false)">未关联平面图的业务空间 {{num}} 条</el-button>
@@ -51,15 +61,31 @@
       </el-row>
       <!-- 底部操作按钮 -->
       <el-row class="canvas-actions-box">
-        <canvasFun @move="moveCanvas" @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo"
-          @redo="redo" @scale="scale" :isEdit="isEdit" ref="canvasFun"></canvasFun>
+        <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo"
+          @changeAbsorb="changeAbsorb" @scale="scale" @groupSelect="groupSelect" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
       </el-row>
     </div>
     <!--  -->
     <!-- 未关联元空间的业务空间 -->
-    <unRelateBSP ref="unRelateBSP" :tableData="BSPUnrelaISPList" :isAction="isAction" @createFromUnrelated="createFromUnrelated"></unRelateBSP>
+    <unRelateBSP ref="unRelateBSP" :isAction="isAction" @createFromUnrelated="createFromUnrelated" :code="tab.code"></unRelateBSP>
     <!-- 创建新的业务空间 -->
     <createBSP ref="createBSP" @createRoom="createRoom"></createBSP>
+    <!-- 批量创建选择弹窗 -->
+    <el-dialog title="提示" :visible.sync="groupCreateDialogVis" width="30%">
+      <div id="autoRelate">
+        <p>请选择批量创建方式:</p>
+        <p>
+          <el-radio v-model="groupCreateType" :label="1">批量将所有的空白空间创建业务空间</el-radio>
+        </p>
+        <p>
+          <el-radio v-model="groupCreateType" :label="2">批量选择空白空间创建业务空间</el-radio>
+        </p>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="groupCreateDialogVis=false">取消</el-button>
+        <el-button size="small" type="primary" @click="confirm">确认</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -71,10 +97,11 @@ import { FloorView } from "@saga-web/cad-engine/lib/FloorView";
 import unRelateBSP from "./unRelateBSP";
 import createBSP from "./createBSP";
 import {
-  countZone,
+  buildingQuery,
   queryZone,
   updateZone,
   createZone,
+  countZone,
   getIspNotInSpace,
   createRelateInZoneAndISp,
   groupCreRelaZoneAndISp
@@ -104,18 +131,21 @@ export default {
       canvasHeight: 600,
       type: 1, // 默认操作模式
       search: '',//搜索
-      num: 0, // 未关联空间的业务空间条数
       buildFloor: ['', ''],
       FloorObj: {}, //楼层对象
       FloorMap: '', //楼层底图
       tab: {},
-      isEdit: false,
+      config: {
+        isEdit: false,
+        divide: true,
+        groupSelect: true
+      },
       canvasLoading: false,
       view: null,
       scene: null,
       Outline: [], // 当前选中的多个空间组成的轮廓线->三维数组
       businessSpaceList: [], // 所有业务空间
-      BSPUnrelaISPList: [], // 未关联元空间的业务空间
+      num: 0, // 未关联元空间的业务空间统计
       BSPRelaISPList: [], // 已关联元空间的业务空间
       // 未关联元空间的业务空间弹窗
       isAction: false,
@@ -124,6 +154,8 @@ export default {
       curZoneItem: {}, //当前选中的业务空间item
       allUnRelatISP: [], //
       zoneList: [], // 业务空间-canvas图中
+      groupCreateDialogVis: false, //批量创建业务空间弹窗
+      groupCreateType: 1, //批量创建方式
     }
   },
   computed: {
@@ -155,12 +187,17 @@ export default {
         // 业务空间
         this.getBusinessSpace();
       }
-      // 获取未关联平面图的业务空间统计
-      this.getUnrelateCount();
+      this.config = {
+        isEdit: false,
+        divide: true,
+        groupSelect: true
+      }
       // 获取当前楼层的元空间
       this.getFloorISpace();
       // 查询未关联业务空间的元空间
-      this.getISPSPUnrelaBSP()
+      this.getISPSPUnrelaBSP();
+      // 查询未关联平面图的业务空间
+      this.getBSPunrelaISP();
     },
     // 获取当前楼层的元空间
     getFloorISpace() {
@@ -200,6 +237,7 @@ export default {
       this.scene.clearZoneSelection();
       // 选中当前
       zone.selected = true;
+      this.curZoneItem = zone;
       this.type = 2;
       this.view.fitSelectedToView();
     },
@@ -216,18 +254,6 @@ export default {
       console.log(arguments)
       this.init(initType);
     },
-    // 获取未关联平面图的业务空间统计
-    getUnrelateCount() {
-      let pa = {
-        data: {
-          Filters: `BuildingId='${this.buildFloor[0]}';FloorId='${this.buildFloor[1]}';Outline isNull`
-        },
-        zone: this.tab.code
-      }
-      countZone(pa, res => {
-        this.num = res.Count
-      })
-    },
     // 获取未绑定业务空间的元空间
     getISPSPUnrelaBSP() {
       let pa = {
@@ -297,15 +323,11 @@ export default {
       queryZone(pa, res => {
         // 所有业务空间
         this.businessSpaceList = res.Content;
-        // 未关联元空间的业务空间
-        this.BSPUnrelaISPList = [];
         // 已关联元空间的业务空间
         this.BSPRelaISPList = [];
         res.Content.map(t => {
           if (t.Outline && t.Outline.length) {
             this.BSPRelaISPList.push(t)
-          } else {
-            this.BSPUnrelaISPList.push(t)
           }
         })
         // 绘制业务空间
@@ -326,18 +348,26 @@ export default {
     },
     // canvas点击事件
     canvasClick(item, event) {
-      if (this.type == 4) {
+      console.log(item)
+      console.log(event)
+      if (this.type == 4) {//重新划分
+
+      } else if (this.type == 5) {//批量
 
       } else {
         if (item instanceof SpaceItem && item.selectable) {
+          if (this.type == 2) {
+            this.scene.clearZoneSelection();
+          }
           this.type = 3;
           this.curZoneItem = {};
-          this.scene.isZoneSelectable = false;
         }
         if (item instanceof ZoneItem && item.selectable) {
+          if (this.type == 3) {
+            this.scene.clearSpaceSelection();
+          }
           this.type = 2;
           this.curZoneItem = item;
-          this.scene.isSpaceSelectable = false;
           this.scene.clearZoneSelection();
           item.selected = true;
         }
@@ -346,6 +376,11 @@ export default {
     // 编辑平面图
     editGraphy() {
       this.type = 3;
+      this.config.isEdit = true;
+      this.config.groupSelect = false;
+      this.config.divide = true;
+      // 设置业务空间不可选
+      this.scene.isZoneSelectable = false
     },
     // 查看未关联的业务空间--flag--查看-or-选择
     lookUnrelatBSpace(flag) {
@@ -361,6 +396,28 @@ export default {
     cancelGraphy() {
       this.init(2);
     },
+    // 批量创建业务空间弹窗
+    handleCommand(command) {
+      this.groupCreateDialogVis = true;
+    },
+    // 创建弹窗确认
+    confirm() {
+      if (this.groupCreateType == 1) {
+        this.groupCreateBSpace()
+      } else if (this.groupCreateType == 2) {
+        this.type = 5;
+        this.config.isEdit = true;
+        this.config.groupSelect = true;
+        this.config.divide = false;
+        this.groupCreateDialogVis = false;
+        // 清空选中空间
+        this.scene.clearSpaceSelection();
+        // 设置空间可选
+        this.scene.isSpaceSelectable = true;
+        // 设置业务空间不可选
+        this.scene.isZoneSelectable = false;
+      }
+    },
     // 批量创建业务空间
     groupCreateBSpace() {
       let text = []
@@ -393,34 +450,9 @@ export default {
           type: "warning"
         }
         ).then(() => {
-          let pa = {
-            zone: this.tab.code,
-            data: {
-              Content: Spaces
-            }
-          }
+          this.groupCreateDialogVis = false;
           this.canvasLoading = true;
-          createZone(pa, res => {
-            res.EntityList.map(t => {
-              Spaces = Spaces.map(item => {
-                if (t.RoomLocalName == item.RoomLocalName) {
-                  item.SpaceId = t.RoomID
-                }
-                return item;
-              })
-            })
-            let param = {
-              data: {
-                Content: Spaces
-              },
-              type: this.tab.code
-            }
-            groupCreRelaZoneAndISp(param, res => {
-              this.$message.success('创建成功')
-              this.canvasLoading = false;
-              this.init(2)
-            })
-          })
+          this.groupCreateBSP(Spaces)
         }).catch(() => {
           this.$message({
             type: "info",
@@ -459,38 +491,21 @@ export default {
       zoneObj.RoomLocalName = val;
       zoneObj.BuildingId = this.buildFloor[0];
       zoneObj.FloorId = this.buildFloor[1];
-      let pa = {
-        zone: this.tab.code,
-        data: {
-          Content: [zoneObj]
-        }
-      }
-      createZone(pa, res => {
-        this.relationInBSPandISP(res.EntityList[0].RoomID, IspaceIdList)
-      })
+      this.createSingleBSP(zoneObj, IspaceIdList)
     },
     // 从未关联平面图的业务空间中选择--按钮返回关联信号
     createFromUnrelated(BSP) {
       BSP.Outline = [];
       BSP.Height = 0;
-      let arr = this.scene.getSelectedSpaces();
+      let arr = this.scene.getSelectedSpaces(), IspaceIdList = [];
       arr.map(t => {
         BSP.Outline.push(t.data.OutLine);
+        IspaceIdList.push(this.BIMIDToSID[t.data.SourceId]);
         if (t.Height && (BSP.Height == 0 || t.Height < BSP.Height)) {
           BSP.Height = t.Height;
         }
       })
-      let pa = {
-        zone: BSP.ObjectType,
-        data: {
-          Content: [BSP],
-          Projection: ['Outline']
-        }
-      }
-      updateZone(pa, res => {
-        this.$message.success('更新成功');
-        this.init(2);
-      })
+      this.updateBSPOutline(BSP, IspaceIdList)
     },
     // 编辑空间详情
     editeSpaceDetail() {
@@ -508,7 +523,8 @@ export default {
       // 设置空间可选
       this.scene.isSpaceSelectable = true;
       // 将已关联的设置不可选,并将当前选的隐藏
-      this.scene.changeSelectZone(this.curZoneItem);
+      this.scene.isZoneSelectable = false;
+      this.curZoneItem.visible = false;
     },
     // 重新划分--保存
     saveRefactorBSP() {
@@ -526,6 +542,87 @@ export default {
       if (!zoneObj.Outline.length) {
         zoneObj.Outline = null;
       }
+      this.updateBSPOutline(zoneObj, IspaceIdList)
+    },
+    // 批量创建所选业务空间
+    groupCreateZone() {
+      let arr = this.scene.getSelectedSpaces();
+      let spaces = arr.map(t => {
+        return {
+          IspaceId: this.BIMIDToSID[t.data.SourceId],
+          RoomLocalName: t.data.Name,
+          Outline: [t.data.OutLine],
+          BuildingId: this.buildFloor[0],
+          FloorId: this.buildFloor[1],
+          Height: t.data.Height || 0
+        }
+      })
+      if (spaces.length) {
+        this.canvasLoading = true;
+        this.groupCreateBSP(spaces)
+      } else {
+        this.$message.warning('未选择空间');
+      }
+    },
+    // 更新业务空间和元空间的关系
+    relationInBSPandISP(SpaceId, IspaceIdList) {
+      let pa = {
+        data: { SpaceId: SpaceId, IspaceIdList: IspaceIdList },
+        type: this.tab.code
+      }
+      createRelateInZoneAndISp(pa, res => {
+        this.$message.success('创建成功');
+        this.init(2);
+      })
+    },
+    // 批量更新业务空间和元空间的关系
+    groupCreRelaZoneAndISp(Spaces) {
+      let param = {
+        data: {
+          Content: Spaces
+        },
+        type: this.tab.code
+      }
+      groupCreRelaZoneAndISp(param, res => {
+        this.$message.success('创建成功')
+        this.canvasLoading = false;
+        this.init(2)
+      })
+    },
+    // 批量创建
+    groupCreateBSP(spaces) {
+      let pa = {
+        zone: this.tab.code,
+        data: {
+          Content: spaces
+        }
+      }
+      createZone(pa, res => {
+        res.EntityList.map(t => {
+          spaces = spaces.map(item => {
+            if (t.RoomLocalName == item.RoomLocalName) {
+              item.SpaceId = t.RoomID
+            }
+            return item;
+          })
+        })
+        this.groupCreRelaZoneAndISp(spaces)
+      })
+    },
+    // 单个创建
+    createSingleBSP(space, IspaceIdList) {
+      let pa = {
+        zone: this.tab.code,
+        data: {
+          Content: [space]
+        }
+      }
+      createZone(pa, res => {
+        this.relationInBSPandISP(res.EntityList[0].RoomID, IspaceIdList)
+      })
+    },
+    // 更新业务空间区域
+    updateBSPOutline(zoneObj, IspaceIdList) {
       let pa = {
         zone: this.tab.code,
         data: {
@@ -537,15 +634,16 @@ export default {
         this.relationInBSPandISP(zoneObj.RoomID, IspaceIdList)
       })
     },
-    // 更新业务空间和元空间的关系
-    relationInBSPandISP(SpaceId, IspaceIdList) {
+    // 查询未关联平面图的业务空间(项目下+当前分区)
+    getBSPunrelaISP() {
       let pa = {
-        data: { SpaceId: SpaceId, IspaceIdList: IspaceIdList },
-        type: this.tab.code
+        zone: this.tab.code,
+        data: {
+          Filters: `Outline isNull`
+        }
       }
-      createRelateInZoneAndISp(pa, res => {
-        this.$message.success('创建成功');
-        this.init(2);
+      countZone(pa, res => {
+        this.num = res.Count;
       })
     },
     // canvas 获取焦点
@@ -561,15 +659,13 @@ export default {
       this.view = new FloorView('floorCanvas')
     },
     // 工具栏操作
-    // 移动底图
-    moveCanvas(move) {
-      // todo
-      let canvas = document.getElementById(`floorCanvas`);
-      if (move) {
-        canvas.style.cursor = 'move';
-      } else {
-        canvas.style.cursor = 'default';
-      }
+    // 吸附
+    changeAbsorb(isAbsorbing) {
+      this.scene.isAbsorbing = isAbsorbing;
+    },
+    // 框选
+    groupSelect() {
+      this.scene.isRectSelection = true;
     },
     // 适配底图到窗口
     fit() {
@@ -583,6 +679,10 @@ export default {
     saveSvg() {
       this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
     },
+    // 保存json
+    saveJson() {
+      this.view.saveFloorJson(`${this.buildFloor[1]}.json`)
+    },
     // 切割划分
     divide() {
       this.scene.isMarking = true;

+ 137 - 27
src/components/business_space/newGraphy/unRelateBSP.vue

@@ -1,27 +1,52 @@
 <template>
-  <el-dialog :title="title" :visible.sync="dialogVisible" width="600px" id="lookUnrelatBSpace">
-    <el-input :placeholder="`请输入业务空间名称`" v-model="queryString" @keyup.enter.native="queryTableData">
-      <i slot="suffix" class="el-input__icon el-icon-search" @click="queryTableData"></i>
-    </el-input>
-    <div style="margin-top:10px;height:300px;">
-      <el-table :data="data" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
-        <el-table-column prop="RoomLocalName" label="业务空间名称" show-overflow-tooltip min-width="200"></el-table-column>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="unRelateBSP">
+    <el-row class="filters">
+      <el-col :span="9">
+        <el-input placeholder="输入业务空间名称进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="15">
+        <span style="margin-left:10px;">所属楼层</span>
+        <el-cascader @change="getTableData" v-model="floor" :options="options" :props="props"></el-cascader>
+      </el-col>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="BNAME" label="所属建筑" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="FNAME" label="所属楼层" show-overflow-tooltip min-width="100"></el-table-column>
         <el-table-column prop="action" label="操作" min-width="100" v-if="isAction">
           <template slot-scope="scope">
-            <el-button @click="createRelation(scope.row)">关联平面图</el-button>
+            <el-button size="mini" @click="createRelation(scope.row)" type="primary" plain>关联平面图</el-button>
           </template>
         </el-table-column>
       </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
     </div>
   </el-dialog>
 </template>
 
 <script>
+import {
+  buildingQuery,
+  queryZone
+} from "@/api/scan/request"
 export default {
   name: "unRelateBSP",
   data() {
     return {
       title: '未关联平面图的业务空间',
+      inSpaceType: '业务空间',
       dialogVisible: false,
       loading: false,
       headerStyle: {
@@ -29,39 +54,124 @@ export default {
         color: '#2b2b2b',
         lineHeight: '30px'
       },
-      queryString: '',
-      data: []
+      keycode: '',
+      tableData: [],
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      floor: ['all'], // 级联建筑楼层
+      props: { //自定义字段
+        value: "BuildID",
+        label: "BuildLocalName",
+        children: "Floor"
+      },
+      bfData: {}, //建筑楼层id =>名称
+      options: [], //级联
     };
   },
   props: {
-    tableData: {
-      default: []
-    }, //列表数据
     isAction: false, //是否显示操作按钮
+    code: String
+  },
+  created() {
+    this.getBuilding()
   },
   methods: {
     // 显示弹窗
     showDialog() {
-      this.data = this.tableData;
       this.dialogVisible = true;
-    },
-    // 搜索
-    queryTableData() {
-      var restaurants = this.tableData;
-      this.data = this.queryString ?
-        restaurants.filter(this.createFilter(this.queryString)) :
-        restaurants;
-    },
-    createFilter(queryString) {
-      return restaurant => {
-        return restaurant.RoomLocalName.indexOf(queryString) > -1;
-      };
+      this.getTableData();
     },
     // 关联平面图
     createRelation(row) {
       this.$emit('createFromUnrelated', row);
       this.dialogVisible = false;
+    },
+    // 分页条数
+    handleSizeChange(val) {
+      this.page.pageSize = val;
+      this.page.pageNumber = 1;
+      this.getTableData();
+    },
+    // 页码
+    handleCurrentChange(val) { 
+      this.page.pageNumber = val;
+      this.getTableData();
+    },
+    // 获取项目下建筑
+    getBuilding() {
+      let pa = {
+        Cascade: [{ name: 'floor', Orders: 'SequenceId desc' }],
+        Orders: "BuildLocalName asc",
+      }
+      buildingQuery(pa, res => {
+        this.options = res.Content.map(t => {
+          this.bfData[t.BuildID] = t.BuildLocalName;
+          if (t.Floor) {
+            t.Floor = t.Floor.map(item => {
+              this.bfData[item.FloorID] = item.FloorLocalName;
+              item.BuildID = item.FloorID;
+              item.BuildLocalName = item.FloorLocalName;
+              return item;
+            })
+          } else {
+            t.Floor = []
+          }
+          t.Floor.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
+          return t;
+        })
+        this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
+      })
+    },
+    // 查询未关联平面图的业务空间(项目下+当前分区)
+    getTableData() {
+      let pa = {
+        zone: this.code,
+        data: {
+          Filters: `Outline isNull`,
+          Orders: "createTime desc, RoomID asc",
+          PageSize: this.page.pageSize,
+          pageNumber: this.page.pageNumber
+        }
+      }
+      if (this.floor[0] == 'isNull') {
+        pa.data.Filters += `;BuildingId isNull`
+      } else if (this.floor[0] && this.floor[0] != 'all') {
+        pa.data.Filters += `;BuildingId='${this.floor[0]}'`
+      }
+      if (this.floor[1] == 'isNull') {
+        pa.data.Filters += `;FloorId isNull`
+      } else if (this.floor[1] && this.floor[1] != 'all') {
+        pa.data.Filters += `;FloorId='${this.floor[1]}'`
+      }
+      if (this.keycode != '') {
+        pa.data.Filters += `;RoomLocalName contain "${this.keycode}" or RoomName contain "${this.keycode}"`
+      }
+      queryZone(pa, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(t => {
+          t.BNAME = this.bfData[t.BuildingId];
+          t.FNAME = this.bfData[t.FloorId];
+          return t;
+        })
+      })
     }
   },
 };
-</script>
+</script>
+<style lang="less" scoped>
+#unRelateBSP {
+  .filters {
+    margin-bottom: 10px;
+    /deep/ .el-input__inner {
+      vertical-align: baseline;
+    }
+  }
+  .table-box {
+    height: 350px;
+  }
+}
+</style>

+ 184 - 0
src/components/data_admin/buildTask/detail/assetsDetail.vue

@@ -0,0 +1,184 @@
+<template>
+  <div class="detail-box">
+    <el-scrollbar style="height:100%;">
+      <div class="attribute-detail detail-item">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="资产基本信息"></el-form-item>
+          <el-form-item label="任务创建时间:">{{ detail.CreateTime || '--' }}</el-form-item>
+          <el-form-item label="任务当前状态:">{{ detail.TaskState || '--' }}</el-form-item>
+          <el-form-item label="任务执行方案:">{{ detail.ScanScheme?detail.ScanScheme.SchemeName?detail.ScanScheme.SchemeName:'--':'--' }}</el-form-item>
+          <el-form-item label="设备族:">{{ detail.EquipFamily?detail.EquipFamily.FamilyName?detail.EquipFamily.FamilyName:'--':'--' }}</el-form-item>
+          <el-form-item label="全局名称:">{{ detail.EquipName || '--' }}</el-form-item>
+          <el-form-item label="资产本地名称:">{{ detail.EquipLocalName || '--' }}</el-form-item>
+          <el-form-item label="资产本地编码:">{{ detail.EquipLocalID || '--' }}</el-form-item>
+          <el-form-item label="设计图纸中编码:">{{ detail.CadId || '--' }}</el-form-item>
+          <el-form-item label="安装位置:">{{ detail.InstallLocation || '--' }}</el-form-item>
+          <el-form-item label="生产厂家:">{{ detail.Manufacturer || '--' }}</el-form-item>
+          <el-form-item label="型号:">{{ detail.Specification || '--' }}</el-form-item>
+          <el-form-item label="供应商:">{{ detail.Supplier || '--' }}</el-form-item>
+        </el-form>
+      </div>
+      <div class="implement-detail detail-item" v-if="detail.TaskState == '未找到'">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="执行任务人:">{{ detail.WorkerName || '--' }}</el-form-item>
+          <el-form-item label="执行时间:">{{ detail.ProcessTime || '--' }}</el-form-item>
+          <el-form-item label="未找到对象信息"></el-form-item>
+          <el-form-item label="资产名称:">{{ detail.EquipLocalName || detail.EquipName || '--' }}</el-form-item>
+          <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
+            <div class="img-item" @click="dialogVisible = true"  v-for="item in panoramaList" :key="item.Key">
+              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" style="width:100%;" :alt="item.Name">
+            </div>
+          </el-form-item>
+          <el-form-item label="资产照片:" v-show="imgList && imgList.length">
+            <div class="img-item">
+              <div class="demo-image__preview">
+                <el-image style="width:100%;" v-for="item in imgList"
+                 :key="item.Key" :title="item.Name"
+                 @click="nowUrl = item.Key" 
+                 :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}&width=400`" 
+                 :preview-src-list="srcList">
+                </el-image>
+              </div>
+            </div>
+          </el-form-item>
+          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+            <video controls style="width:100%;" v-for="item in videoList" :key="item.Key" :title="item.Name">
+              <source :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" type="video/mp4">
+              您的浏览器不支持 HTML5 video ,暂无法播放。
+            </video>
+          </el-form-item>
+          <el-form-item label="备注信息:">{{ detail.Note || '--' }}</el-form-item>
+        </el-form>
+      </div>
+      <div class="operation-detail detail-item">
+        <el-form>
+          <el-form-item label="操作信息:"></el-form-item>
+          <div class="block">
+            <el-timeline>
+              <el-timeline-item timestamp="2018/4/12" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/12 20:46</p>
+                </el-card>
+              </el-timeline-item>
+              <el-timeline-item timestamp="2018/4/3" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/3 20:46</p>
+                </el-card>
+              </el-timeline-item>
+              <el-timeline-item timestamp="2018/4/2" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/2 20:46</p>
+                </el-card>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </el-form>
+      </div>
+    </el-scrollbar>
+    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
+      一张图
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { } from "@/api/scan/request"
+import { mapGetters } from "vuex"
+export default {
+  components: {
+
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    panoramaList(){
+      if(this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length){
+        return this.detail.TaskPicList.filter(item => {
+          return item.Type == 'panorama'
+        })
+      } else {
+        return []
+      }
+    },
+    imgList(){
+      if(this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length){
+        return this.detail.TaskPicList.filter(item => {
+          return item.Type == 'image'
+        })
+      } else {
+        return []
+      }
+    },
+    videoList(){
+      if(this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length){
+        return this.detail.TaskPicList.filter(item => {
+          return item.Type == 'video'
+        })
+      } else {
+        return []
+      }
+    },
+    srcList(){
+      let nowIndex = this.imgList.findIndex(item => {return item.Key == this.nowUrl})
+      let index = nowIndex >= 1 ? nowIndex : 0;
+      let tempArr1 = this.imgList.slice(0, index);
+      let tempArr2 = this.imgList.slice(index, this.imgList.length);
+
+      let res = tempArr2.concat(tempArr1).map(item => {
+        return `/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`
+      });
+      return res;
+    }
+  },
+  props: {
+    detail: Object
+  },
+  data() {
+    return {
+      dialogVisible: false,//全景图弹出框
+      nowUrl: ''//当前正在显示的图
+    };
+  },
+  methods: {
+  },
+  watch: {
+    'detail.TaskId'() {
+      console.log(this.detail)
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.detail-box {
+  width: 100%;
+  height: 100%;
+  box-sizing: border-box;
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+  /deep/ .el-icon-circle-close {
+    color: white;
+  }
+
+  /deep/ .el-form-item__content {
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+
+  .detail-item {
+    width: calc(100% - 30px);
+    margin: 15px 15px 10px;
+    padding: 10px;
+    box-sizing: border-box;
+    border-left: 1px solid #eee;
+    box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+  }
+
+  .img-item {
+    position: relative;
+    cursor: pointer;
+  }
+}
+</style>

+ 219 - 0
src/components/data_admin/buildTask/detail/deviceDetail.vue

@@ -0,0 +1,219 @@
+<template>
+  <div class="detail-box">
+    <el-scrollbar style="height:100%;">
+      <div class="attribute-detail detail-item">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="设备基本信息"></el-form-item>
+          <el-form-item label="任务创建时间:">{{ detail.CreateTime || '--' }}</el-form-item>
+          <el-form-item label="任务当前状态:">{{ detail.TaskState || '--' }}</el-form-item>
+          <el-form-item label="任务执行方案:">{{ detail.ScanScheme?detail.ScanScheme.SchemeName?detail.ScanScheme.SchemeName:'--':'--' }}</el-form-item>
+          <el-form-item label="设备类:">{{ detail.EquipCategory?detail.EquipCategory.EquipName?detail.EquipCategory.EquipName:'--':'--' }}</el-form-item>
+          <el-form-item label="全局名称:">{{ detail.EquipName || '--' }}</el-form-item>
+          <el-form-item label="设备本地名称:">{{ detail.EquipLocalName || '--' }}</el-form-item>
+          <el-form-item label="设备本地编码:">{{ detail.EquipLocalID || '--' }}</el-form-item>
+          <el-form-item label="设计图纸中编码:">{{ detail.CadId || '--' }}</el-form-item>
+          <el-form-item label="安装位置:">{{ detail.InstallLocation || '--' }}</el-form-item>
+          <el-form-item label="生产厂家:">{{ detail.Manufacturer || '--' }}</el-form-item>
+          <el-form-item label="型号:">{{ detail.Specification || '--' }}</el-form-item>
+          <el-form-item label="供应商:">{{ detail.Supplier || '--' }}</el-form-item>
+          <el-form-item label="包含部件:">
+            <div v-if="detail.Component && detail.Component.length">
+              <p v-for="(item, index) in detail.Component?detail.Component:[]" :key="index" show-overflow-tooltip>
+               {{ item.EquipName }}
+              </p>
+            </div>
+            <div v-else>--</div>
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="implement-detail detail-item" v-if="detail.TaskState == '未找到'">
+        <el-form :model="detail" label-width="150px">
+          <el-form-item label="执行任务人:">{{ detail.WorkerName || '--' }}</el-form-item>
+          <el-form-item label="执行时间:">{{ detail.ProcessTime || '--' }}</el-form-item>
+          <el-form-item label="未找到对象信息"></el-form-item>
+          <el-form-item label="设备信息:" v-if="!detail.isComponent">{{ detail.EquipLocalName || detail.EquipName ||'--' }}</el-form-item>
+          <el-form-item label="部件信息:" v-else>
+            <div v-if="detail.Component && detail.Component.length">
+              <p v-for="item in detail.Component?detail.Component:[]" :key="item.TaskId" show-overflow-tooltip>
+               {{ item.EquipLocalName || item.EquipName }}
+              </p>
+            </div>
+            <div v-else>--</div>
+          </el-form-item>
+          <el-form-item label="全景图:" v-show="panoramaList && panoramaList.length">
+            <div class="img-item" @click="dialogVisible = true"  v-for="item in panoramaList" :key="item.Key">
+              <img :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" style="width:100%;" :alt="item.Name">
+            </div>
+          </el-form-item>
+          <el-form-item label="资产照片:" v-show="imgList && imgList.length">
+            <div class="img-item">
+              <div class="demo-image__preview">
+                <el-image style="width:100%;" v-for="item in imgList"
+                 :key="item.Key" :title="item.Name"
+                 @click="nowUrl = item.Key" 
+                 :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}&width=400`" 
+                 :preview-src-list="srcList">
+                </el-image>
+              </div>
+            </div>
+          </el-form-item>
+          <el-form-item label="现场视频:" v-show="videoList && videoList.length">
+            <video controls style="width:100%;" v-for="item in videoList" :key="item.Key" :title="item.Name">
+              <source :src="`/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`" type="video/mp4">
+              您的浏览器不支持 HTML5 video ,暂无法播放。
+            </video>
+          </el-form-item>
+          <el-form-item label="备注信息:">{{ detail.Note || '--' }}</el-form-item>
+        </el-form>
+      </div>
+      <div class="operation-detail detail-item">
+        <el-form>
+          <el-form-item label="操作信息:"></el-form-item>
+          <div class="block">
+            <el-timeline>
+              <el-timeline-item timestamp="2018/4/12" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/12 20:46</p>
+                </el-card>
+              </el-timeline-item>
+              <el-timeline-item timestamp="2018/4/3" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/3 20:46</p>
+                </el-card>
+              </el-timeline-item>
+              <el-timeline-item timestamp="2018/4/2" placement="top">
+                <el-card>
+                  <h4>更新 Github 模板</h4>
+                  <p>王小虎 提交于 2018/4/2 20:46</p>
+                </el-card>
+              </el-timeline-item>
+            </el-timeline>
+          </div>
+        </el-form>
+      </div>
+    </el-scrollbar>
+    <el-dialog title="全景图" :visible.sync="dialogVisible" width="70%" append-to-body>
+      一张图
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { } from "@/api/scan/request"
+import { mapGetters } from "vuex"
+export default {
+  components: {
+
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    notFoundList(){
+      if(this.detail && this.detail.Component && this.detail.Component.length){//是否存在部件
+        let index = this.detail.Component.findIndex(item => {return item.TaskState == -1})
+        if(index != -1){//部件中存在未找到的对象
+          this.detail.isComponent = true
+          return this.detail.Component[index].TaskPicList?this.detail.Component[index].TaskPicList:[]
+        } else {//部件全部找到
+          this.detail.isComponent = false
+          return this.detail.TaskPicList?this.detail.TaskPicList:[]
+        }
+      } else {
+        this.detail.isComponent = false
+        if(this.detail && this.detail.TaskPicList && this.detail.TaskPicList.length){
+          return this.detail.TaskPicList
+        } else {
+          return []
+        }
+      }
+    },
+    panoramaList(){
+      if(this.notFoundList && this.notFoundList.length){
+        return this.notFoundList.filter(item => {
+          return item.Type == 'panorama'
+        })
+      } else {
+        return []
+      }
+    },
+    imgList(){
+      if(this.notFoundList && this.notFoundList.length){
+        return this.notFoundList.filter(item => {
+          return item.Type == 'image'
+        })
+      } else {
+        return []
+      }
+    },
+    videoList(){
+      if(this.notFoundList && this.notFoundList.length){
+        return this.notFoundList.filter(item => {
+          return item.Type == 'video'
+        })
+      } else {
+        return []
+      }
+    },
+    srcList(){
+      let nowIndex = this.imgList.findIndex(item => {return item.Key == this.nowUrl})
+      let index = nowIndex >= 1 ? nowIndex : 0;
+      let tempArr1 = this.imgList.slice(0, index);
+      let tempArr2 = this.imgList.slice(index, this.imgList.length);
+
+      let res = tempArr2.concat(tempArr1).map(item => {
+        return `/image-service/common/image_get?systemId=dataPlatform&key=${item.Key}`
+      });
+      return res;
+    }
+  },
+  props: {
+    detail: Object
+  },
+  data() {
+    return {
+      dialogVisible: false,//全景图弹出框
+      nowUrl: '',//当前正在显示的图
+    };
+  },
+  methods: {
+  },
+  watch: {
+    'detail.TaskId'() {
+      console.log(this.detail)
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+.detail-box {
+  width: 100%;
+  height: 100%;
+  box-sizing: border-box;
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+  /deep/ .el-icon-circle-close {
+    color: white;
+  }
+
+  /deep/ .el-form-item__content {
+    text-overflow: ellipsis;
+    overflow: hidden;
+  }
+
+  .detail-item {
+    width: calc(100% - 30px);
+    margin: 15px 15px 10px;
+    padding: 10px;
+    box-sizing: border-box;
+    border-left: 1px solid #eee;
+    box-shadow: 0px 1px 5px 0px rgba(59, 66, 84, 0.15);
+  }
+
+  .img-item {
+    position: relative;
+    cursor: pointer;
+  }
+}
+</style>

+ 97 - 0
src/components/data_admin/buildTask/dialog/addTaskDialog.vue

@@ -0,0 +1,97 @@
+<template>
+  <el-dialog :title="title" :visible.sync="addTaskDialog" :before-close="handleClose" width="500px">
+    <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="110px">
+      <el-form-item label="未验证任务" prop="isVerification">
+        <el-switch v-model="ruleForm.isVerification"></el-switch>
+      </el-form-item>
+      <el-form-item label="任务类型" prop="taskType">
+        <div>
+          <el-radio v-model="ruleForm.taskType" label="model">现场验证模型</el-radio>
+        </div>
+        <div>
+          <el-radio v-model="ruleForm.taskType" label="device">现场验证设备台账</el-radio>
+        </div>
+        <div>
+          <el-radio v-model="ruleForm.taskType" label="assets">现场验证资产台账</el-radio>
+        </div>
+      </el-form-item>
+    </el-form>
+    <!-- <el-row>
+      请选择新建现场验证任务的数据源:
+      <el-checkbox v-model="ruleForm.isVerification">只选择未验证的</el-checkbox>
+    </el-row>
+    <el-row style="margin-top:15px;padding-left:15px;">
+      <div><el-radio v-model="ruleForm.taskType" label="model">现场验证模型</el-radio></div>
+      <div><el-radio v-model="ruleForm.taskType" label="device">现场验证设备台账</el-radio></div>
+      <div><el-radio v-model="ruleForm.taskType" label="assets">现场验证资产台账</el-radio></div>
+    </el-row>-->
+    <span slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="$emit('update:addTaskDialog',false)">取 消</el-button>
+      <el-button type="primary" @click="toAddTask()">确 认</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {} from "@/api/scan/request";
+import { mapGetters } from "vuex";
+export default {
+  components: {},
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加验证任务",
+      dialogVisible: false,
+      ruleForm: {
+        isVerification: true,
+        taskType: ""
+      },
+      rules: {
+        taskType: [
+          { required: true, message: "请选择任务类型", trigger: "change" }
+        ]
+      }
+    };
+  },
+  created() {},
+  props: {
+    addTaskDialog: Boolean, //是否显示弹窗
+    newTaskTypes: Array
+  },
+  methods: {
+    toAddTask() {
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.ruleForm.newTaskTypes = this.newTaskTypes;
+          if (this.ruleForm.taskType == "model") {
+            this.$router.push({
+              path: "/floor/addModelTask",
+              query: this.ruleForm
+            });
+          } else if (this.ruleForm.taskType == "device") {
+            this.$router.push({
+              path: "/floor/addDeviceTask",
+              query: this.ruleForm
+            });
+          } else if (this.ruleForm.taskType == "assets") {
+            this.$router.push({
+              path: "/floor/addAssetsTask",
+              query: this.ruleForm
+            });
+          }
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    handleClose() {
+      this.$emit("update:addTaskDialog", this.dialogVisible);
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+</style>

+ 253 - 0
src/components/data_admin/buildTask/dialog/modelTaskDialog.vue

@@ -0,0 +1,253 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="900px" id="addEqDialog">
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column type="expand">
+          <template slot-scope="props">
+            <p v-if="props.row.ComponentCount && props.row.ComponentCount.length" style="color:#99a9bf;line-height:32px;font-size:14px;">包含的部件:</p>
+            <el-form label-position="left" label-width="auto" inline class="demo-table-expand"
+              v-if="props.row.ComponentCount && props.row.ComponentCount.length">
+              <el-form-item v-for="item in props.row.ComponentCount?props.row.ComponentCount:[]" :key="item.code" :label="`${item.name}:`">
+                <span>{{ item.count }}</span>
+              </el-form-item>
+            </el-form>
+          </template>
+        </el-table-column>
+        <el-table-column prop="FolderName" label="所属模型文件夹" width="110" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="FileName" label="模型文件名" width="80" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="EquipLocalName" label="设备本地名称" show-overflow-tooltip width="100"></el-table-column>
+        <el-table-column prop="EquipLocalID" label="设备本地编码" show-overflow-tooltip width="100"></el-table-column>
+        <el-table-column prop="EquipCategory.EquipName" label="设备类" show-overflow-tooltip width="120"></el-table-column>
+        <el-table-column prop="BimId" label="BIM Id" show-overflow-tooltip width="80"></el-table-column>
+        <el-table-column prop="type" label="现场验证操作规定" width="150">
+          <template slot-scope="scope">
+            <el-select style="width:100px;" v-model="scope.row.SchemeId" placeholder="请选择">
+              <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="$emit('update:dialogVisible',false)">返回重选</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确认创建</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { queryEquip } from "@/api/scan/request"
+import { createModelTask, queryModelDiglog } from "@/api/data_admin/buildTaskApi"
+import { mapGetters } from "vuex"
+export default {
+  components: {
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "确认创建任务",
+      options: [{//方案
+        value: '1',
+        label: '标准'
+      }],
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      } // 列表样式
+    };
+  },
+  props: {
+    dialogVisible: Boolean,//是否显示弹窗
+    params: Object, //模型和设备的信息
+    newTaskTypes: Array
+  },
+  created() {
+
+  },
+  methods: {
+    getTableData() {
+      let params = {
+        Cascade: [
+          {
+            Name: "equipCategory",
+            Projection: ["EquipCode", "EquipName"]
+          },
+          {
+            Name: "component",
+            Cascade: [{ Name: "equipCategory" }]
+          },
+          {
+            Name: "building",
+            Projection: ["BuildLocalName", "BuildName", "BuildID"]
+          },
+          {
+            Name: "floor",
+            Projection: ["FloorLocalName", "FloorName", "FloorID"]
+          }
+        ],
+        Filters: `ProjectId='${this.projectId}'`,
+        Orders: "CreateTime desc, EquipID asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+
+      if (this.params.isVerification) {
+        params.Filters += `;TaskState isNull`
+      }
+
+      if (this.params.device) {
+        params.Filters += `;Category='${this.params.category}'`
+      }
+
+      if (this.params.spaceList && this.params.spaceList.length) {
+        //通过平面图区域查询
+        params.IdList = this.params.spaceList
+        queryModelDiglog(params, res => {
+          this.dataFormatter(res)
+        })
+      } else {
+        params.Filters += `;ModelId='${this.params.CurrentModelId}'`
+        queryEquip(params, res => {
+          this.dataFormatter(res)
+        })
+      }
+
+    },
+    // 表格数据格式化
+    dataFormatter(res) {
+      this.tableData = res.Content.map(item => {
+        if (item.Component && item.Component.length) {
+          item.ComponentCount = []
+          item.Component.map(parts => {
+            if (parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName) {
+              let index = item.ComponentCount.findIndex(c => { return c.code == parts.EquipCategory.EquipCode })
+              if (index != -1) {
+                item.ComponentCount[index].count++
+              } else {
+                item.ComponentCount.push({
+                  name: parts.EquipCategory.EquipName,
+                  code: parts.EquipCategory.EquipCode,
+                  count: 1
+                })
+              }
+            }
+          })
+        }
+        item.FolderName = this.params.modelFolderName
+        item.FolderId = this.params.modelFolderId
+        item.FileName = this.params.modelFileName
+        item.FileId = this.params.CurrentModelId
+        item.SchemeId = "1"
+        return item
+      })
+      this.page.total = res.Total
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let list = this.selections.map((item) => {
+          return {
+            EquipId: item.EquipID,
+            FileId: item.FileId,
+            FileName: item.FileName,
+            FolderId: item.FolderId,
+            FolderName: item.FolderName
+          }
+        })
+        let params = {
+          Content: list
+        }
+        createModelTask(params, res => {
+          this.$emit('update:dialogVisible', false)
+          this.$message.success('创建成功!')
+          this.$router.push({ name: 'buildTask', query: { newTaskTypes: this.newTaskTypes } })//跳转回首页
+        })
+      } else {
+        this.$message('请选择要创建的任务!')
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = 1
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    handleClose() {//关闭弹窗
+      this.$emit('update:dialogVisible', false);
+    }
+  },
+  watch: {
+    dialogVisible(newData, oldData) {
+      if (newData) {
+        this.tableData = []
+        this.page.pageNumber = 1
+        this.getTableData()
+      }
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px;
+    /deep/ .el-input__inner {
+      vertical-align: baseline;
+    }
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>
+
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+.demo-table-expand label {
+  width: 90px;
+  color: #99a9bf;
+}
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+  margin-left: 120px;
+  width: 100%;
+}
+</style>

+ 239 - 0
src/components/data_admin/buildTask/draw/drawModel.vue

@@ -0,0 +1,239 @@
+<template>
+  <div :id="`drawFloor${id}`" class="drawFloor" v-loading="canvasLoading">
+    <canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
+    <div class="operate" v-show="showTools">
+      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @scale="scale" @saveJson="saveJson" :config="config" ref="canvasFun"></canvasFun>
+    </div>
+  </div>
+</template>
+
+<script>
+import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
+import { SColor, SPoint } from "@sybotan-web/draw/lib";
+import canvasFun from "@/components/business_space/newGraphy/canvasFun"
+import { floorQuery, queryEquip } from "@/api/scan/request";
+export default {
+  components: {
+    canvasFun
+  },
+  data() {
+    return {
+      drawMainScene: null,
+      view: null,
+      dataKey: '',
+      cadWidth: 800,
+      cadHeight: 600,
+      canvasLoading: false,
+      modelId: '',
+      FloorID: '',
+      Outline: [],
+      deviceList: [],
+      buttonContent: "",
+      showTools: false,
+      config: {
+        isEdit: false
+      }
+    };
+  },
+  props: {
+    isEdit: {
+      default: false
+    },
+    id: {
+      default: 0
+    },
+    dialog: {
+      default: false
+    },
+    isLight:{
+      type: Boolean,
+      default: false
+    },
+    CurrentModelId: String
+  },
+  created() { },
+  mounted() {
+    this.cadWidth = document.getElementById(`drawFloor${this.id}`).offsetWidth;
+    this.cadHeight = document.getElementById(`drawFloor${this.id}`).offsetHeight;
+  },
+  methods: {
+    initGraphy(ModelId) {
+      this.modelId = ModelId;
+      this.clearGraphy()
+      this.drawMainScene = new DivideFloorScene();
+      this.canvasLoading = true;
+      this.drawMainScene.getFloorData('/modelapi/base-graph/query', { ModelId: ModelId }).then(res => {
+        // console.log(this)
+        this.getGraphtSuc(res);
+      })
+    },
+    getFloorData() {
+      let pa = {
+        Filters: `FloorID='${this.FloorID}'`
+      }
+      floorQuery(pa, res => {
+        let newArr = res.Content[0].Outline.map(t => {
+          return new SPoint(t.X, t.Y);
+        })
+        this.drawMainScene.addSceneMark(newArr)
+      })
+    },
+    getSelectedSpaces() {//获取选中区域
+      if (this.view && this.view.scene) {
+        let list = this.view.scene.getSelectedSpaces();
+        if (list.length) {
+          return list
+        } else {
+          return []
+        }
+      } else {
+        return []
+      }
+    },
+    // 清空平面图
+    clearGraphy() {
+      if (this.view) {
+        this.view.scene = null;
+        return
+      }
+      let id = `floorCanvas${this.id}`;
+      this.view = new FloorView(id)
+    },
+    canvasClick(item, eventObj) {//点击平面图事件 
+      this.$emit("changeButtonContent",this.drawMainScene.getSelectedSpaces().length?"通过模型空间创建":"通过模型创建") 
+    },
+    getGraphtSuc(res) {
+      this.showTools = true;
+      this.canvasLoading = false;
+      if (res.Result == 'failure') {
+        this.showTools = false;
+        this.$message.warning(res.Message);
+        return;
+      }
+      this.view.scene = this.drawMainScene;
+      if(this.isLight){//高亮显示未验证的区块
+        this.deviceList = []
+        this.highLightPoint()
+      }
+      this.view.fitSceneToView();
+      this.drawMainScene.click(this, this.canvasClick);
+      if (this.$refs.canvasFun) {
+        this.view.maxScale = this.view.scale * 10;
+        this.view.minScale = this.view.scale;
+        this.$refs.canvasFun.everyScale = this.view.scale;
+      }
+    },
+    //高亮未完成验证的区块
+    async highLightPoint() {
+      await this.getUnverificationDevice()
+      this.view.scene.spaceList.forEach(item => {
+        for(let deviceItem of this.deviceList) {
+          if(deviceItem.LocationJson && item.contains(deviceItem.LocationJson.X, -deviceItem.LocationJson.Y)){//注:坐标体系不同,Y坐标取反
+            item.highLightFlag = true
+            break
+          }
+        }
+      })
+    },
+    //获取模型下未验证的设备
+    getUnverificationDevice(pageNum) {
+      return new Promise((resolve) => {
+        pageNum = pageNum ? pageNum : 1
+        let params = {
+          Filters: `TaskState isNull;ModelId='${this.CurrentModelId}'`,
+          Orders: "CreateTime desc, EquipID asc",
+          Projection: ["EquipID", "BIMID", "BIMLocation", "LocationJson"],
+          PageNumber: pageNum,
+          PageSize: 1000
+        }
+        queryEquip(params, res => {
+          this.deviceList = res.Content
+          resolve();
+        });
+      });
+      // queryEquip(params, res => {
+      //   this.deviceList = this.deviceList.concat(res.Content)
+      //   if (res.Total / (res.PageSize * res.PageNumber) > 1) {
+      //     this.getUnverificationDevice(res.PageNumber + 1)
+      //   } else { }
+      // });
+    },
+    // canvas 获取焦点
+    focus() {
+      document.getElementById(`floorCanvas${this.id}`).focus()
+    },
+    // 工具栏操作
+    // 适配底图到窗口
+    fit() {
+      this.view.fitSceneToView()
+    },
+    // 保存为png
+    savePng() {
+      this.view.saveImage(`${this.floor}.png`, 'png');
+    },
+    // 保存为svg
+    saveSvg() {
+      this.view.saveSceneSvg(`${this.floor}.svg`, 6400, 4800);
+    },
+    saveJson() {
+      this.view.saveFloorJson(`${this.floor}.json`)
+    },
+    // 缩放
+    scale(val) {
+      if (!this.view) {
+        return;
+      }
+      let scale = this.view.scale;
+      this.view.scaleByPoint(val / scale, this.cadWidth / 2, this.cadHeight / 2);
+    }
+  },
+  watch: {
+    isLight: {
+      handler(newValue, oldValue) {
+        if(newValue){//高亮显示未验证的区块
+          this.deviceList = []
+          this.highLightPoint()
+        } else {
+          this.view.scene.spaceList.forEach(item => {
+            item.highLightFlag = false
+          })
+        }
+      }
+    },
+    CurrentModelId: {
+      handler(newName, oldName) {
+        if (newName) {
+          this.initGraphy(newName)
+        }
+      },
+      immediate: true,
+    },
+    "view.scale": {
+      handler(n) {
+        if (this.$refs.canvasFun) {
+          this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
+        }
+      }
+    },
+    "isEdit": {
+      handler(n) {
+        this.config.isEdit = n;
+      }
+    }
+  }
+};
+</script>
+<style scoped lang="less">
+.drawFloor {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  .operate {
+    position: absolute;
+    left: 50%;
+    bottom: 20px;
+    transform: translateX(-50%);
+    z-index: 99;
+  }
+}
+</style>

+ 70 - 0
src/components/data_admin/buildTask/lib/assetsCascader.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备族</span>
+    <el-select v-model="value" placeholder="请选择" clearable filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option  v-for="item in options" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { queryAssetsFamily } from "@/api/data_admin/buildTaskApi"
+export default {
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: "",
+      options: []
+    };
+  },
+  created() {
+    this.getData();
+  },
+  watch: {
+    projectId() {
+      this.value = '';
+      this.getData();
+    }
+  },
+  methods: {
+    setValue(val) {
+      this.value = val
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.Code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的资产任务-设备族
+    getData() {
+      queryAssetsFamily('', res => {
+        this.options = res.Content
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 70 - 0
src/components/data_admin/buildTask/lib/deviceCascader.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
+    <el-select v-model="value" placeholder="请选择" clearable filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option  v-for="item in options" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { queryDeviceCategory } from "@/api/data_admin/buildTaskApi"
+export default {
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: "",
+      options: []
+    };
+  },
+  created() {
+    this.getData();
+  },
+  watch: {
+    projectId() {
+      this.value = '';
+      this.getData();
+    }
+  },
+  methods: {
+    setValue(val) {
+      this.value = val
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.Code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的设备任务-设备类型
+    getData() {
+      queryDeviceCategory('', res => {
+        this.options = res.Content
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 70 - 0
src/components/data_admin/buildTask/lib/modelCascader.vue

@@ -0,0 +1,70 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
+    <el-select v-model="value" placeholder="请选择" clearable filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option  v-for="item in options" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { queryModelCategory } from "@/api/data_admin/buildTaskApi"
+export default {
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: "",
+      options: []
+    };
+  },
+  created() {
+    this.getData();
+  },
+  watch: {
+    projectId() {
+      this.value = '';
+      this.getData();
+    }
+  },
+  methods: {
+    setValue(val) {
+      this.value = val
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.Code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的模型任务-设备类型
+    getData() {
+      queryModelCategory('', res => {
+        this.options = res.Content
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 81 - 0
src/components/data_admin/buildTask/lib/modelFile.vue

@@ -0,0 +1,81 @@
+<template>
+    <div id="modelFile">
+        <span class="modelFile" style="margin-right: 12px;">模型文件</span>
+        <el-cascader :options="options" :props="props" :show-all-levels="false" @change="handleChange" style="width:160px;"
+        clearable placeholder="请选择模型文件" v-model="casVal"></el-cascader>
+    </div>
+</template>
+<script>
+import tools from "@/utils/scan/tools"
+import { queryModelFile } from "@/api/data_admin/buildTaskApi"
+import { mapGetters, mapActions } from "vuex"
+
+export default {
+  computed: {
+    ...mapGetters("layout", [ "projectId", "secret", "userId" ])
+  },
+  data() {
+    return {
+      casVal: [],
+      options: [],
+      modelIdToFloorId: {},
+      props: {
+        value: "FileId",
+        label: "FileName",
+        children: "FileList"
+      },
+    };
+  },
+  created() {
+    this.init()
+  },
+  watch: {
+    projectId() {
+      this.casVal =[]
+      this.options = []
+      this.init()
+    }
+  },
+  methods: {
+    //设置默认选项
+    setValue(val) {
+        if (val && val.length) {
+          this.casVal = val
+        }
+    },
+    //获取数据
+    init() {
+      this.getDirectory()
+    },
+    // 获取文件夹
+    getDirectory() {
+      queryModelFile("", res => {
+        this.options = res.Content.map(item => {
+          item.FileId = item.FolderId
+          item.FileName = item.FolderName
+          return item
+        })
+      });
+    },
+    //改变item
+    handleChange(value) {
+      this.$emit("change", value)
+    }
+  }
+};
+</script>
+<style lang="less">
+    .el-cascader .el-input .el-input__inner {
+        vertical-align: bottom;
+    }
+</style>
+<style lang="less" scoped>
+    #modelFile {
+        margin-left: 10px;
+        float: left;
+        .modelFile {
+            color: #999999;
+            font-size: 14px;
+        }
+    }
+</style>

+ 53 - 0
src/components/data_admin/buildTask/lib/taskState.vue

@@ -0,0 +1,53 @@
+<template>
+  <div id="cascaderMap">
+    <span class="task-state" style="margin-right: 12px;">任务执行情况</span>
+    <el-select v-model="taskState" placeholder="请选择" filterable style="width:120px;" size="small" @change="changeState">
+      <el-option  v-for="item in taskStateList" :key="item.code" :label="item.label" :value="item.value"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      taskStateList: [{
+				value: '',
+				label: '全部'
+			}, {
+				value: 1,
+				label: '待验证'
+			}, {
+				value: 0,
+				label: '已完成'
+			}, {
+				value: -1,
+				label: '未找到'
+			}],
+			taskState: '',//任务执行情况
+    };
+  },
+  methods: {
+    setValue(val) {
+      this.taskState = val
+    },
+    //修改val
+    changeState(val) {
+      this.$emit("change", val)
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .task-state {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 220 - 0
src/components/data_admin/buildTask/table/assetsTable.vue

@@ -0,0 +1,220 @@
+<template>
+  <div class="table-container">
+    <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':''}} -
+              {{scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipFamily.FamilyName" label="设备族" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="InstallLocation" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="TaskState" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <i v-if="scope.row.TaskState == '待验证' || scope.row.TaskState == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+     :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
+    </el-pagination>
+    <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
+      <assets-detail :detail="detailAssets"></assets-detail>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { queryAssetsTask, deleteAssetsTask, createAssetsTask, updateAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
+import { mapGetters } from "vuex"
+import assetsDetail from '../detail/assetsDetail'
+export default {
+  components: {
+    assetsDetail
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  props: {
+    paramsData: Object,
+  },
+  data() {
+    return {
+      inSpaceType: '资产',
+      loading: false, // loading
+      drawer: false, // 详情侧弹窗
+      detailAssets: {},
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      taskStateMap: {
+        '-1': '未找到',
+        '0': '已完成',
+        '1': '待验证'
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    };
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `ProjectId='${this.projectId}'`,
+        Cascade: [
+          {
+            Name: 'equipFamily'
+          }, {
+            Name: 'scanScheme'
+          }, {
+            Name: 'building',
+          }, {
+            Name: 'floor',
+          }
+        ],
+        Orders: "CreateTime desc, TaskId asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      if (this.paramsData.buildfloor[0] == "noKnow") {
+        params.Filters += `;BuildingId isNull`
+      } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+        params.Filters += `;BuildingId='${this.paramsData.buildfloor[0]}'`
+        if (this.paramsData.buildfloor[1] == "noKnow") {
+          params.Filters += `;FloorId isNull`
+        } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+          params.Filters += `;FloorId='${this.paramsData.buildfloor[1]}'`
+        }
+      }
+      if(this.paramsData.taskState !== ''){
+        params.Filters += `;TaskState=${this.paramsData.taskState}`
+      }
+      if(this.paramsData.family){
+        params.Filters += `;Category='${this.paramsData.family}'`
+      }
+      queryAssetsTask(params, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(item => {
+          item.TaskState = this.taskStateMap[item.TaskState]
+          return item
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该任务?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = [{TaskId: row.TaskId}]
+        deleteAssetsTask(params, res => {
+          this.$message.success('删除成功')
+          this.getTableData()
+        })
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    //重新生成任务
+    handleRegenerate(index, row){
+      let params = {
+        Content: [{
+          EquipId: row.EquipId,
+          TaskState: -1
+        }]
+      }
+      createAssetsTask(params, res => {
+        this.$message.success('重新生成任务成功!')
+        this.getTableData()
+      })
+    },
+    //认可此任务执行情况
+    handleConfirm(index, row){
+      let params = {
+        Content: [{
+          TaskId: row.TaskId,
+          TaskState: 0
+        }]
+      }
+      updateAssetsTask(params, res => {
+        this.$message.success('更新成功!')
+        this.getTableData()
+      })
+    },
+    //查看任务详情
+    handleDetail(index, row) {
+      this.drawer = true
+      this.detailAssets = row
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageNumber = 1
+      this.page.pageSize = pageSize;
+      this.getTableData()
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData()
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
+    }
+  },
+  watch: {
+    paramsData: {
+      handler(newName, oldName) {
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
+      },
+      immediate: true,
+      deep: true
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+/deep/ .el-drawer__body {
+  height: calc(100% - 80px);
+  border-top: 1px solid #c9c9c9;
+}
+/deep/ .el-drawer__header {
+  margin-bottom: 12px;
+}
+.table-container {
+  height: 100%;
+  background: #fff;
+  .table-button{
+    cursor: pointer;
+    margin-right: 15px;
+  }
+}
+</style>

+ 248 - 0
src/components/data_admin/buildTask/table/deviceTable.vue

@@ -0,0 +1,248 @@
+<template>
+  <div class="table-container">
+    <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':''}} -
+              {{scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName}}
+              <el-badge v-if="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:false:false" 
+                :value="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:0:0" class="item" type="warning">
+              </el-badge>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="InstallLocation" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="TaskState" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <i v-if="scope.row.TaskState == '待验证' || scope.row.TaskState == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+     :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
+    </el-pagination>
+    <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
+      <device-detail :detail="detailDevice"></device-detail>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { queryDeviceTask, deleteDeviceTask, createDeviceTask, updateDeviceTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
+import { mapGetters } from "vuex"
+import deviceDetail from '../detail/deviceDetail'
+export default {
+  components: {
+    deviceDetail
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  props: {
+    paramsData: Object,
+  },
+  data() {
+    return {
+      inSpaceType: '设备',
+      loading: false, // loading
+      drawer: false, // 详情侧弹窗
+      detailDevice: {},
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      taskStateMap: {
+        '-1': '未找到',
+        '0': '已完成',
+        '1': '待验证'
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    };
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `ProjectId='${this.projectId}'`,
+        Cascade: [
+          {
+            Name: 'component'
+          }, {
+            Name: 'scanScheme'
+          }, {
+            Name: 'building',
+          }, {
+            Name: 'floor',
+          }, {
+            Name: 'equipCategory'
+          }
+        ],
+        Orders: "CreateTime desc, TaskId asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      if (this.paramsData.buildfloor[0] == "noKnow") {
+        params.Filters += `;BuildingId isNull`
+      } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+        params.Filters += `;BuildingId='${this.paramsData.buildfloor[0]}'`
+        if (this.paramsData.buildfloor[1] == "noKnow") {
+          params.Filters += `;FloorId isNull`
+        } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+          params.Filters += `;FloorId='${this.paramsData.buildfloor[1]}'`
+        }
+      }
+      if(this.paramsData.taskState !== ''){
+        params.Filters += `;TaskState=${this.paramsData.taskState}`
+      }
+      if(this.paramsData.deviceCategory){
+        params.Filters += `;Category='${this.paramsData.deviceCategory}'`
+      }
+      queryDeviceTask(params, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(item => {
+          if(item.Component && item.Component.length){
+            item.ComponentCount = []
+            item.Component.map(parts => {
+              if(parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName){
+                let index = item.ComponentCount.findIndex(c => {return c.code == parts.EquipCategory.EquipCode})
+                if(index != -1){
+                  item.ComponentCount[index].count++
+                } else {
+                  item.ComponentCount.push({
+                    name: parts.EquipCategory.EquipName,
+                    code: parts.EquipCategory.EquipCode,
+                    count: 1
+                  })
+                }
+              }
+            })
+          }
+          item.TaskState = this.taskStateMap[item.TaskState]
+          return item
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该任务?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = [{TaskId: row.TaskId}]
+        deleteDeviceTask(params, res => {
+          this.$message.success('删除成功')
+          this.getTableData()
+        })
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    //重新生成任务
+    handleRegenerate(index, row){
+      let params = {
+        Content: [{
+          EquipId: row.EquipId,
+          TaskState: -1
+        }]
+      }
+      createDeviceTask(params, res => {
+        this.$message.success('重新生成任务成功!')
+        this.getTableData()
+      })
+    },
+    //认可此任务执行情况
+    handleConfirm(index, row){
+      let params = {
+        Content: [{
+          TaskId: row.TaskId,
+          TaskState: 0
+        }]
+      }
+      updateDeviceTask(params, res => {
+        this.$message.success('更新成功!')
+        this.getTableData()
+      })
+    },
+    //查看任务详情
+    handleDetail(index, row) {
+      this.drawer = true
+      this.detailDevice = row
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageNumber = 1
+      this.page.pageSize = pageSize;
+      this.getTableData()
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData()
+    }
+  },
+  watch: {
+    paramsData: {
+      handler(newName, oldName) {
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
+      },
+      immediate: true,
+      deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+/deep/ .el-drawer__body {
+  height: calc(100% - 80px);
+  border-top: 1px solid #c9c9c9;
+}
+/deep/ .el-drawer__header {
+  margin-bottom: 12px;
+}
+.table-container {
+  height: 100%;
+  background: #fff;
+  .table-button{
+    cursor: pointer;
+    margin-right: 15px;
+  }
+}
+</style>

+ 238 - 0
src/components/data_admin/buildTask/table/modelTable.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="table-container">
+    <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column prop="FolderName" label="所属模型文件夹" show-overflow-tooltip min-width="80"></el-table-column>
+        <el-table-column prop="FileName" label="模型文件名" show-overflow-tooltip min-width="80"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName}}
+              <el-badge v-if="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:false:false" 
+                :value="scope.row.Equipment?scope.row.Equipment.Component?scope.row.Equipment.Component.length:0:0" class="item" type="warning">
+              </el-badge>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="80"></el-table-column>
+        <el-table-column prop="BIMID" label="BIM ID" show-overflow-tooltip min-width="220"></el-table-column>
+        <el-table-column prop="TaskState" label="任务执行情况" show-overflow-tooltip min-width="60"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <i v-if="scope.row.TaskState == '待验证' || scope.row.TaskState == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+     :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
+    </el-pagination>
+    <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
+      <device-detail :detail="detailModel"></device-detail>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { queryModelTask, deleteModelTask, updateModelTask, createModelTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
+import { mapGetters } from "vuex"
+import deviceDetail from '../detail/deviceDetail'
+export default {
+  components: {
+    deviceDetail
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  props: {
+    paramsData: Object,
+  },
+  data() {
+    return {
+      inSpaceType: '设备',
+      loading: false, // loading
+      drawer: false, // 详情侧弹窗
+      detailModel: {},
+      tableData: [], //列表数据
+      taskStateMap: {
+        '-1': '未找到',
+        '0': '已完成',
+        '1': '待验证'
+      },
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    };
+  },
+  created() {
+    // this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `ProjectId='${this.projectId}'`,
+        Cascade: [
+          {
+            Name: 'component'
+          }, {
+            Name: 'scanScheme'
+          }, {
+            Name: 'equipCategory'
+          }
+        ],
+        Orders: "CreateTime desc, TaskId asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      if(this.paramsData.taskState !== ''){
+        params.Filters += `;TaskState=${this.paramsData.taskState}`
+      }
+      if(this.paramsData.modelFile){
+        params.Filters += `;FileId='${this.paramsData.modelFile}'`
+      }
+      if(this.paramsData.modelCategory){
+        params.Filters += `;Category='${this.paramsData.modelCategory}'`
+      }
+      queryModelTask(params, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(item => {
+          if(item.Component && item.Component.length){
+            item.ComponentCount = []
+            item.Component.map(parts => {
+              if(parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName){
+                let index = item.ComponentCount.findIndex(c => {return c.code == parts.EquipCategory.EquipCode})
+                if(index != -1){
+                  item.ComponentCount[index].count++
+                } else {
+                  item.ComponentCount.push({
+                    name: parts.EquipCategory.EquipName,
+                    code: parts.EquipCategory.EquipCode,
+                    count: 1
+                  })
+                }
+              }
+            })
+          }
+          item.TaskState = this.taskStateMap[item.TaskState]
+          return item
+        })
+      })
+    },
+    // 删除任务
+    handleDelete(index, row) {
+      this.$confirm("确认删除该任务?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = [{TaskId: row.TaskId}]
+        deleteModelTask(params, res => {
+          this.$message.success('删除成功')
+          this.getTableData()
+        })
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    //重新生成任务
+    handleRegenerate(index, row){
+      let params = {
+        Content: [{
+          EquipId: row.EquipId,
+          FileId: row.FileId,
+          FileName: row.FileName,
+          FolderId: row.FolderId,
+          FolderName: row.FolderName,
+          TaskState: -1
+        }]
+      }
+      createModelTask(params, res => {
+        this.$message.success('重新生成任务成功!')
+        this.getTableData()
+      })
+    },
+    //认可此任务执行情况
+    handleConfirm(index, row){
+      let params = {
+        Content: [{
+          TaskId: row.TaskId,
+          TaskState: 0
+        }]
+      }
+      updateModelTask(params, res => {
+        this.$message.success('更新成功!')
+        this.getTableData()
+      })
+    },
+    //查看任务详情
+    handleDetail(index, row) {
+      this.drawer = true
+      this.detailModel = row
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageNumber = 1
+      this.page.pageSize = pageSize;
+      this.getTableData()
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData()
+    }
+  },
+  watch: {
+    paramsData: {
+      handler(newName, oldName) {
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
+      },
+      immediate: true,
+      deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+/deep/ .el-drawer__body {
+  height: calc(100% - 80px);
+  border-top: 1px solid #c9c9c9;
+}
+/deep/ .el-drawer__header {
+  margin-bottom: 12px;
+}
+.table-container {
+  height: 100%;
+  background: #fff;
+  .table-button{
+    cursor: pointer;
+    margin-right: 15px;
+  }
+}
+</style>

+ 202 - 0
src/components/data_admin/buildTask/table/replaceTable.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="table-container">
+    <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':''}} -
+              {{scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipFamily.FamilyName" label="设备族" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="InstallLocation" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="TaskType" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <!-- <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <i v-if="scope.row.TaskState == '待验证' || scope.row.TaskState == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+          </template>
+        </el-table-column> -->
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+     :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
+    </el-pagination>
+    <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
+      <assets-detail :id="detailId"></assets-detail>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { queryAssetsTask, deleteAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
+import { mapGetters } from "vuex"
+import assetsDetail from '../detail/assetsDetail'
+export default {
+  components: {
+    assetsDetail
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  props: {
+    paramsData: Object,
+  },
+  data() {
+    return {
+      inSpaceType: '资产',
+      loading: false, // loading
+      drawer: false, // 详情侧弹窗
+      detailId: '',
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      taskTypeMap: {//待撕码,待换码
+        '-5': '已撕码',
+        '3': '待撕码',
+        '2': '待换码',
+        '0': '正常贴码'
+      },
+      taskStateMap: {
+        '-1': '未找到',
+        '0': '已完成',
+        '1': '待验证'
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    };
+  },
+  created() {
+    this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `ProjectId='${this.projectId}';TaskType in ['2']`,
+        Cascade: [
+          {
+            Name: 'equipFamily'
+          }, {
+            Name: 'building',
+          }, {
+            Name: 'floor',
+          }
+        ],
+        Orders: "CreateTime desc, TaskId asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      // if (this.paramsData.buildfloor[0] == "noKnow") {
+      //   params.Filters += `;BuildingId isNull`
+      // } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+      //   params.Filters += `;BuildingId='${this.paramsData.buildfloor[0]}'`
+      //   if (this.paramsData.buildfloor[1] == "noKnow") {
+      //     params.Filters += `;FloorId isNull`
+      //   } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+      //     params.Filters += `;FloorId='${this.paramsData.buildfloor[1]}'`
+      //   }
+      // }
+      // if(this.paramsData.taskState !== ''){
+      //   params.Filters += `;TaskState=${this.paramsData.taskState}`
+      // }
+      // if(this.paramsData.family){
+      //   params.Filters += `;Family='${this.paramsData.family}'`
+      // }
+      queryAssetsTask(params, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(item => {
+          item.TaskState = this.taskStateMap[item.TaskState]
+          item.TaskType = this.taskTypeMap[item.TaskType]
+          return item
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该任务?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = [{TaskId: row.TaskId}]
+        deleteAssetsTask(params, res => {
+          this.$message.success('删除成功')
+          this.getTableData()
+        })
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    //查看任务详情
+    handleDetail() {
+      this.drawer = true
+      this.detailId = row.TaskId
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageNumber = 1
+      this.page.pageSize = pageSize;
+      this.getTableData()
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData()
+    }
+  },
+  watch: {
+    paramsData: {
+      handler(newName, oldName) {
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
+      },
+      immediate: true,
+      deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+/deep/ .el-drawer__body {
+  height: calc(100% - 80px);
+  border-top: 1px solid #c9c9c9;
+}
+/deep/ .el-drawer__header {
+  margin-bottom: 12px;
+}
+.table-container {
+  height: 100%;
+  background: #fff;
+  .table-button{
+    cursor: pointer;
+    margin-right: 15px;
+  }
+}
+</style>

+ 202 - 0
src/components/data_admin/buildTask/table/tearTable.vue

@@ -0,0 +1,202 @@
+<template>
+  <div class="table-container">
+    <div class="table-list" :style="tableData && tableData.length?'height:calc(100% - 50px);':'height:100%;'">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column label="所属建筑楼层" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':''}} -
+              {{scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipLocalName" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipFamily.FamilyName" label="设备族" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="InstallLocation" label="安装位置" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="TaskType" label="任务执行情况" show-overflow-tooltip min-width="100"></el-table-column>
+        <!-- <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <i v-if="scope.row.TaskState == '待验证' || scope.row.TaskState == '未找到'" title="查看详情" class="iconfont icon-xiangqing table-button" @click="handleDetail(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="重新生成任务" class="iconfont icon-Update table-button" @click="handleRegenerate(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '待验证'" title="删除任务" class="iconfont icon-delete table-button" @click="handleDelete(scope.$index, scope.row)"></i>
+            <i v-if="scope.row.TaskState == '未找到'" title="认可此任务执行情况" class="iconfont icon-lijiqueren table-button" @click="handleConfirm(scope.$index, scope.row)"></i>
+          </template>
+        </el-table-column> -->
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.pageNumber"
+     :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="page.total">
+    </el-pagination>
+    <el-drawer title="任务详情" :visible.sync="drawer" direction="rtl" size="600px">
+      <assets-detail :id="detailId"></assets-detail>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { queryAssetsTask, deleteAssetsTask } from "@/api/data_admin/buildTaskApi"
+import tools from "@/utils/tools"
+import { mapGetters } from "vuex"
+import assetsDetail from '../detail/assetsDetail'
+export default {
+  components: {
+    assetsDetail
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  props: {
+    paramsData: Object,
+  },
+  data() {
+    return {
+      inSpaceType: '资产',
+      loading: false, // loading
+      drawer: false, // 详情侧弹窗
+      detailId: '',
+      tableData: [], //列表数据
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      taskTypeMap: {//待撕码,待换码
+        '-5': '已撕码',
+        '3': '待撕码',
+        '2': '待换码',
+        '0': '正常贴码'
+      },
+      taskStateMap: {
+        '-1': '未找到',
+        '0': '已完成',
+        '1': '待验证'
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    };
+  },
+  created() {
+    this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `ProjectId='${this.projectId}';TaskType in ['3','-5']`,
+        Cascade: [
+          {
+            Name: 'equipFamily'
+          }, {
+            Name: 'building',
+          }, {
+            Name: 'floor',
+          }
+        ],
+        Orders: "CreateTime desc, TaskId asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      // if (this.paramsData.buildfloor[0] == "noKnow") {
+      //   params.Filters += `;BuildingId isNull`
+      // } else if (this.paramsData.buildfloor[0] && this.paramsData.buildfloor[0] != "all") {
+      //   params.Filters += `;BuildingId='${this.paramsData.buildfloor[0]}'`
+      //   if (this.paramsData.buildfloor[1] == "noKnow") {
+      //     params.Filters += `;FloorId isNull`
+      //   } else if (this.paramsData.buildfloor[1] && this.paramsData.buildfloor[1] != "all") {
+      //     params.Filters += `;FloorId='${this.paramsData.buildfloor[1]}'`
+      //   }
+      // }
+      // if(this.paramsData.taskState !== ''){
+      //   params.Filters += `;TaskState=${this.paramsData.taskState}`
+      // }
+      // if(this.paramsData.family){
+      //   params.Filters += `;Family='${this.paramsData.family}'`
+      // }
+      queryAssetsTask(params, res => {
+        this.page.total = res.Total;
+        this.tableData = res.Content.map(item => {
+          item.TaskState = this.taskStateMap[item.TaskState]
+          item.TaskType = this.taskTypeMap[item.TaskType]
+          return item
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该任务?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = [{TaskId: row.TaskId}]
+        deleteAssetsTask(params, res => {
+          this.$message.success('删除成功')
+          this.getTableData()
+        })
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    //查看任务详情
+    handleDetail() {
+      this.drawer = true
+      this.detailId = row.TaskId
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageNumber = 1
+      this.page.pageSize = pageSize;
+      this.getTableData()
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData()
+    }
+  },
+  watch: {
+    paramsData: {
+      handler(newName, oldName) {
+        if(!tools.isSimilarly(newName, oldName)){
+          this.page.pageNumber = 1
+          this.getTableData()
+        }
+      },
+      immediate: true,
+      deep: true
+    },
+    projectId() {
+      this.page.pageNumber = 1
+      this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+/deep/ .el-drawer__body {
+  height: calc(100% - 80px);
+  border-top: 1px solid #c9c9c9;
+}
+/deep/ .el-drawer__header {
+  margin-bottom: 12px;
+}
+.table-container {
+  height: 100%;
+  background: #fff;
+  .table-button{
+    cursor: pointer;
+    margin-right: 15px;
+  }
+}
+</style>

+ 160 - 0
src/components/data_admin/buildTask/taskStatistics.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="statistics-box flex-row">
+		<div class="statistics-all flex-row">
+      <div class="statistics-progress">
+        <div class="statistics-progress-num">
+          <p>{{taskProgress?taskProgress:0 + '%'}}</p>
+          <p>完成情况</p>
+        </div>
+        <el-progress :width="90" type="circle" :percentage="taskProgress?taskProgress:0" :show-text="false"></el-progress>
+      </div>
+      <div class="statistics-all-box flex-col">
+        <span>总任务:<b>{{allCount}}</b></span>
+        <span>已完成:<b>{{alreadyCount}}</b></span>
+      </div>
+    </div>
+		<ul class="statistics-list flex-row">
+      <li>
+        <p class="statistics-list-text">现场未找到(需人工确认):</p>
+        <p class="statistics-list-num">{{notFoundCount}}</p>
+      </li>
+      <li>
+        <p class="statistics-list-text">待验证任务:</p>
+        <p class="statistics-list-num">{{waitCount}}</p>
+      </li>
+      <li>
+        <p class="statistics-list-text">待撕码任务:</p>
+        <p class="statistics-list-num">{{waitTearCount}}</p>
+      </li>
+      <li>
+        <p class="statistics-list-text">待换码任务:</p>
+        <p class="statistics-list-num">{{waitReplaceCount}}</p>
+      </li>
+    </ul>
+	</div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+import { queryTaskCount, countAssetsTask } from "@/api/data_admin/buildTaskApi"
+export default {
+  components: {
+    
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId" ]),
+    taskProgress(){
+      if(typeof this.alreadyCount == 'number' && typeof this.allCount == 'number'){
+        return Math.round(this.alreadyCount/this.allCount*100)
+      }
+    }
+  },
+  data() {
+    return {
+      allCount: '',//总任务
+      alreadyCount: '',//已完成
+      notFoundCount: '',//未找到
+      waitCount: '',//未完成验证
+      waitTearCount: '',//未完成撕码任务
+      waitReplaceCount: ''//未完成换码任务
+    }
+  },
+  created() {
+    this.getTaskCount();
+  },
+  methods: {
+    getTaskCount(){
+      queryTaskCount({},(res) => {
+        this.allCount = res.Count
+      })
+      queryTaskCount({Filters: `TaskState=0`},(res) => {
+        this.alreadyCount = res.Count
+      })
+      queryTaskCount({Filters: `TaskState=-1`},(res) => {
+        this.notFoundCount = res.Count
+      })
+      queryTaskCount({Filters: `TaskState=1`},(res) => {
+        this.waitCount = res.Count
+      })
+      countAssetsTask({Filters: `TaskState=1&&TaskType='3'`},(res) => {
+        this.waitTearCount = res.Count
+      })
+      countAssetsTask({Filters: `TaskState=1&&TaskType='2'`},(res) => {
+        this.waitReplaceCount = res.Count
+      })
+    }
+  },
+  watch: {
+    projectId() {
+      this.getTaskCount();
+    }
+  }
+}
+</script>
+<style lang="scss" scoped>
+	.statistics-box {
+		height: 120px;
+    color: #333;
+    .statistics-all{
+      flex: 2;
+      border: 1px solid #c9c9c9;
+      margin-right: 10px;
+      background: #fff;
+      .statistics-progress{
+        flex: 1;
+        position: relative;
+        height: 120px;
+        box-sizing: border-box;
+        text-align: center;
+        padding: 15px 0;
+        .statistics-progress-num{
+          font-size: 12px;
+          line-height: 18px;
+          position: absolute;
+          top: 50%;
+          left: 50%;
+          transform: translate(-50%, -50%);
+        }
+      }
+      .statistics-all-box{
+        flex: 1;
+        font-weight: bold;
+        padding: 25px 0;
+        >span{
+          flex: 1;
+          font-size: 15px;
+          line-height: 35px;
+        } 
+      }
+    }
+    .statistics-list{
+      flex: 7;
+      >li{
+        flex: 1;
+        border: 1px solid #c9c9c9;
+        padding: 10px;
+        margin-left: 10px;
+        background: #fff;
+        .statistics-list-text{
+          font-size: 15px;
+          line-height: 30px;
+          font-weight: bold;
+        }
+        .statistics-list-num{
+          text-align: center;
+          font-size: 20px;
+          line-height: 50px;
+          font-weight: bold;
+        }
+      }
+    }
+	}
+  .flex-row{
+    display: flex;
+		flex-direction: row;
+  }
+  .flex-col{
+    display: flex;
+		flex-direction: column;
+  }
+</style>

+ 225 - 0
src/components/ledger/cenote/dialog/addSpaceDialog.vue

@@ -0,0 +1,225 @@
+
+<template>
+  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7" style="width:268px;padding:0px;">
+        <el-input style placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;margin-left:-2px">
+        <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
+      </el-col>
+      <el-col :span="7.5" style="padding:0 0;">
+        <space-select ref="spacesel" @change="changeSpace"></space-select>
+      </el-col>
+    </el-row>
+    <el-row class="filters" :gutter="20"></el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RoomLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="ObjectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{spaceType[scope.row.ObjectType] || ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="handleClose">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  unSysZoneSpace,
+  linkSysSp,
+  queryDictionaryHead
+} from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import dictionaryCas from "@/components/config_point/dictionaryCascader";
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    dictionaryCas,
+    spaceSelect
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    dialog() {
+      return this.dialogVisible;
+    }
+  },
+  data() {
+    return {
+      title: "添加系统所在业务空间",
+      keycode: "", //输入查询条件
+      inSpaceType: "业务空间",
+      Buildfloor: ["all"], // 选中的建筑楼层
+      Spacecategory: null, // 选中的业务空间类型
+      tableData: [],
+      floorData: {}, //楼层
+      spaceData: {}, //业务空间分区
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: "#e1e4e5",
+        color: "#2b2b2b",
+        lineHeight: "30px"
+      } // 列表样式
+    };
+  },
+  props: {
+    params: Object, //查看的竖井关系信息
+    spaceType: Object,
+    dialogVisible: Boolean,
+    floorType: Object
+  },
+  mounted() { },
+  methods: {
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true;
+    },
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value;
+      this.getTableData();
+    },
+    //修改空间类型
+    changeSpace(value) {
+      this.Spacecategory = value;
+      this.getTableData();
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: "not RoomID isNull",
+          Orders: "RoomLocalName desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize
+        },
+        shaftId: this.params.ShaftID,
+        sysId: this.$route.query.SysID
+      };
+      if (this.Buildfloor[0] == "noKnow") {
+        params.data.Filters += `;buildingId isNull`;
+      } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
+        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+      }
+      if (this.Buildfloor[1] == "noKnow") {
+        params.data.Filters += `;floorId isNull`;
+      } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
+        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+      }
+      if (this.Spacecategory) {
+        params.data.Filters += `;ObjectType='${this.Spacecategory}'`;
+      }
+      if (this.keycode != "") {
+        params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`;
+      }
+
+      unSysZoneSpace(params, res => {
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+      });
+    },
+    handleClose() {
+      this.$emit("update:dialogVisible", false);
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          Content: this.selections.map(item => {
+            return {
+              SpaceID: item.RoomID,
+              SysID: this.$route.query.SysID,
+              ObjectType: item.ObjectType
+            };
+          })
+        };
+        linkSysSp(params, res => {
+          this.$message.success("关联成功!");
+          this.$emit("refresh");
+        });
+      } else {
+        this.$message("请选择要关联的设备");
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message("开发中");
+    }
+  },
+  watch: {
+    dialogVisible: {
+      handler() {
+        if (this.dialogVisible) {
+          this.page.pageNumber = 1;
+          this.tableData = [];
+          this.getTableData();
+        }
+      },
+      immediate: true
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin: 0 0 10px 0;
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 62 - 31
src/components/ledger/handsontables/system.vue

@@ -44,6 +44,8 @@
         <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
       </span>
     </el-dialog>
+    <!-- 关联楼层 -->
+    <editSysfloor ref="editFloor" @relateSuccess="relateSuccess"></editSysfloor>
     <!-- 新增系统 -->
     <el-dialog title="确定新增系统的类型" :visible.sync="myDialog.addDevice" width="30%">
       <el-row>
@@ -57,13 +59,9 @@
 </template>
 <script>
 import {
-  getTableHeader,
-  getBillSystemList,
-  updateBusiness,
   BeatchQueryParam,
-  delBatchList,
   getDataDictionary,
-  queryLinkSys,
+  querySysLinkBuild,
   updateGeneralSys,
   deleteGeneralSys
 } from "@/api/scan/request"
@@ -80,13 +78,11 @@ import dialogAssets from "@/components/ledger/addDialog/dialogSystem"
 import detailsDialog from "@/components/business_space/lib/detailsDia"
 import systemRelevance from "@/components/ledger/tableTransfers"
 import Handsontable from "handsontable-pro"
+import text from "@/utils/handsontable/mainText"
 import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN'
+import editSysfloor from "@/components/ledger/lib/editSysFloor";
 
-import {
-  mapGetters,
-  mapActions
-} from "vuex";
+import { mapGetters } from "vuex";
 export default {
   components: {
     qrcode, //二维码页面
@@ -97,7 +93,8 @@ export default {
     dialogAssets,
     detailsDialog,
     systemRelevance,
-    myCascader
+    myCascader,
+    editSysfloor
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -187,7 +184,7 @@ export default {
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
           this.tableHeader.forEach(item => {
-            if(item.Path && item.InputMode){
+            if (item.Path && item.InputMode) {
               this.inputMap[item.Path] = item.InputMode
             }
           })
@@ -205,17 +202,24 @@ export default {
       this.loading = true
       if (!!this.mess.deviceId) {
         let param = {
-          PageSize: this.page.size,
-          Orders: "createTime desc, SysID desc",
-          PageNumber: this.page.currentPage,
-          Filters: `category='${this.mess.deviceId}'`
+          data: {
+            PageSize: this.page.size,
+            Orders: "createTime desc, SysID desc",
+            PageNumber: this.page.currentPage,
+            Filters: `category='${this.mess.deviceId}'`
+          }
         }
         if (this.mess.buildId == "noKnow") {
-          param.Filters += `;buildingId isNull`
+          param.buildingId = 1;
         } else if (this.mess.buildId && this.mess.buildId != "all") {
-          param.Filters += `;buildingId='${this.mess.buildId}'`
+          param.buildingId = this.mess.buildId;
+        }
+        if (this.mess.floorId == "noKnow") {
+          param.floorId = 1;
+        } else if (this.mess.floorId && this.mess.floorId != "all") {
+          param.floorId = this.mess.floorId;
         }
-        queryLinkSys(param, res => {
+        querySysLinkBuild(param, res => {
           this.loading = false;
           _this.tableData = res.Content;
           _this.copyMain = tools.deepCopy(res.Content);
@@ -271,7 +275,10 @@ export default {
     formatHeaderData(list) {
       let arr = tools.copyArr(list)
       let data = showTools.headerTextFilter(arr, 'system', this.onlyRead, this.showType)
-      data.unshift("操作", "关联设备数量");
+      data.unshift("操作");
+      if (this.showType == "all") {
+        data.splice(3, 0, "所属建筑楼层")
+      }
       return data;
     },
     //格式化表内容
@@ -284,17 +291,24 @@ export default {
           renderer: tools.lookDetails,
           readOnly: true
         },
-        {
-          data: "Count",
-          renderer: tools.num,
-          readOnly: true
-        }
+        // {
+        //   data: "Count",
+        //   renderer: tools.num,
+        //   readOnly: true
+        // }
       );
       if (this.onlyRead) {
         data.map(item => {
           item.readOnly = true
         })
       }
+      if (this.showType == "all") {
+        data.splice(3, 0, {
+          data: "BuildingFloorInfoList",
+          renderer: text.sysInBuildFloor,
+          readOnly: this.onlyRead
+        })
+      }
       return data;
     },
     //获取动态参数
@@ -347,7 +361,7 @@ export default {
                         item,
                         head.Path,
                         // child.error ? "表号功能号格式错误" : "表号功能号不存在"
-                        child.error ? child.value? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
+                        child.error ? child.value ? "表号功能号格式错误" : "表号功能号不存在" : "暂未采集到实时数据"
                       );
                     }
                   });
@@ -370,7 +384,7 @@ export default {
       }
       this.hot = new Handsontable(container, {
         data: this.tableData,
-        fixedColumnsLeft: 4,
+        fixedColumnsLeft: 3,
         colHeaders: this.formatHeaderData(this.tableHeader), //表头文案
         columns: this.formatHeaderType(this.tableHeader), //数据显示格式
         filters: true,
@@ -379,7 +393,11 @@ export default {
         columnSorting: true, //添加排序
         sortIndicator: true, //添加排序
         renderAllRows: true,
+<<<<<<< HEAD
         // observeChanges: false, //启用observeChanges插件
+=======
+        observeChanges: false,
+>>>>>>> 48591ac128a8a8afb10aaeee8316d8df9b5bbe15
         // colWidths: 200,
         autoColumnSize: true,
         language: "zh-CN",
@@ -479,7 +497,7 @@ export default {
     async removeSys(param) {
       await deleteGeneralSys(param, res => {
         this.$message.success("删除成功")
-        this.$emit('close','')
+        this.$emit('close', '')
         this.getTableData()
       })
     },
@@ -489,7 +507,7 @@ export default {
         Content: [],
         Projection: []
       }, keyList = [];
-       //生成要修改字段列表
+      //生成要修改字段列表
       change.map(item => {
         let key = item[1].split(".")[0]
         if (item[1] && keyList.indexOf(key) == -1) {
@@ -521,7 +539,11 @@ export default {
         //操作
         case 'caozuo':
           // window.open(`http://adm.sagacloud.cn:8058/system?id=${infos.id}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-          this.$message("开发中...")
+          // this.$message("开发中...")
+          this.$router.push({
+            path: "/ledger/systemDetail",
+            query: { SysID: infos.SysID, Name: infos.SysLocalName || infos.SysName, SysType: infos.Category }
+          })
           return false
         //设备二维码图片
         case 'EquipQRCode':
@@ -538,6 +560,9 @@ export default {
             this.myDialog.relevance = true
           }
           return false
+        case 'BuildingFloorInfoList':
+          this.$refs.editFloor.showDialog(this.tableData[row.row]);
+          return false
         default:
           break;
       }
@@ -554,13 +579,19 @@ export default {
       this.updateInput = ''
     },
     //更新临时维护信息点
-    handleClickUpdate(){
+    handleClickUpdate() {
+      // this.$message("更新成功");
       tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
       this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
       this.updateInputShow = false
       this.myDialog.update = false
       this.updateInput = ''
     },
+    //关联建筑楼层成功
+    relateSuccess(data) {
+      this.getTableData()
+      // tools.setDataForKey(this.tableData[this.row], "BuildingFloorInfoList", data)
+    },
     //获取被筛选掉的行号
     trimmedRows() {
       // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号

+ 1 - 1
src/components/ledger/lib/assets.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="padding-right: 12px;">设备族</span>
-    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
       <el-option  v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
     </el-select>
     <!-- <el-cascader

+ 94 - 0
src/components/ledger/lib/buildfloorCascader.vue

@@ -0,0 +1,94 @@
+<template>
+  <el-cascader v-model="value" :options="options" :props="props" clearable ref="elCascader" @remove-tag="removeTag"></el-cascader>
+</template>
+<script>
+import { buildingQuery } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      value: [],
+      props: {
+        multiple: true,
+        checkStrictly: true,
+        value: 'BuildID',
+        label: 'BuildLocalName',
+        children: 'Floor'
+      },
+      options: []
+    }
+  },
+  props: {
+    SysID: {
+      default: ''
+    }
+  },
+  methods: {
+    getCascader() {
+      let param = {
+        Cascade: [
+          { Name: "floor", Orders: "FloorSequenceID desc" }
+        ],
+        Orders: "BuildLocalName asc",
+        PageNumber: 1,
+        PageSize: 50
+      }
+      buildingQuery(param, res => {
+        res.Content.map(t => {
+          if (t.Floor && t.Floor.length) {
+            t.Floor = t.Floor.map(item => {
+              if (item.FloorID == this.FloorID) return
+              item.BuildID = item.FloorID
+              item.BuildLocalName = item.FloorLocalName || item.FloorName
+              return item
+            }).filter(it => it)
+          }
+        })
+        this.options = res.Content
+      })
+    },
+    getSelectedNodes() {
+      let nodes = this.$refs.elCascader.getCheckedNodes();
+      let arr = [], flag = false, brr = [];
+      if (nodes.length) {
+        nodes.map(t => {
+          let obj = {
+            BuildName: t.pathLabels[0],
+            BuildID: t.path[0]
+          }
+          if (t.path.length > 1) {
+            obj.FloorName = t.pathLabels[1]
+            obj.FloorID = t.path[1]
+          } else {
+            flag = true;
+          }
+          arr.push(obj);
+        })
+        if (flag) {
+          for (let i = 0; i < arr.length; i++) {
+            for (let j = 0; j < arr.length; j++) {
+              if (!arr[i].FloorID && arr[j].FloorID && arr[i].BuildID == arr[j].BuildID) {
+                brr.push(i)
+              }
+            }
+          }
+          arr = arr.map((t, i) => {
+            if (brr.indexOf(i) > -1) {
+              return undefined;
+            }
+            return t;
+          }).filter(item => item);
+        }
+      }
+      return arr;
+    },
+    removeTag(){
+      console.log(arguments)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.el-cascader {
+  width: 100%;
+}
+</style>

+ 1 - 1
src/components/ledger/lib/cascader.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="cascaderMap">
     <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
-    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+    <el-select v-model="value" placeholder="请选择" clearable :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
       <el-option  v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
     </el-select>
     <!-- <el-cascader placeholder="请选择" :options="options" v-model="value" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small"

+ 107 - 0
src/components/ledger/lib/editSysFloor.vue

@@ -0,0 +1,107 @@
+<template>
+  <el-dialog title="所属建筑楼层" :visible.sync="connectDialogVis" width="50%" id="messageDialog">
+    <el-row>
+      <div style="line-height:32px;">添加{{system.SysLocalName}}所属建筑楼层 : </div>
+      <div style="width:70%">
+        <bfCascader ref="bfCascader" :SysID="system.SysID"></bfCascader>
+      </div>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="connectDialogVis=false">取消</el-button>
+      <el-button size="small" type="primary" @click="save">确认</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import bfCascader from './buildfloorCascader'
+import { sysRelateBuild, sysRelateFloor } from "@/api/scan/request";
+import { resolve } from 'q';
+export default {
+  data() {
+    return {
+      buildName: '',
+      connectDialogVis: false,
+      system: {}
+    }
+  },
+  components: {
+    bfCascader
+  },
+  methods: {
+    showDialog(system) {
+      this.system = system;
+      this.connectDialogVis = true;
+      this.$nextTick(() => {
+        this.$refs.bfCascader.getCascader()
+        let arr = this.system.BuildingFloorInfoList || [];
+        let value = []
+        if (arr.length) {
+          arr.map(t => {
+            if (t.FloorID) {
+              value.push([t.BuildID, t.FloorID]);
+            } else {
+              value.push([t.BuildID])
+            }
+          })
+        }
+        this.$refs.bfCascader.value = value
+      })
+    },
+    save() {
+      let arr = this.$refs.bfCascader.value;
+      let buildIds = [], floorIds = [];
+      arr.map(t => {
+        if (buildIds.indexOf(t[0]) < 0) {
+          buildIds.push(t[0]);
+        }
+        if (t.length > 1 && floorIds.indexOf(t[1]) < 0) {
+          floorIds.push(t[1]);
+        }
+      })
+      let buildPa = {
+        SysId: this.system.SysID,
+        BuildingIdList: buildIds
+      }
+      let floorPa = {
+        SysId: this.system.SysID,
+        FloorIdList: floorIds
+      }
+      let promise1 = new Promise((resolve, reject) => {
+        sysRelateBuild(buildPa, res => {
+          resolve(res);
+        })
+      })
+      let primise2 = new Promise((resolve, reject) => {
+        sysRelateFloor(floorPa, res => {
+          resolve(res);
+        })
+      })
+      let buildFloor = this.$refs.bfCascader.getSelectedNodes();
+      Promise.all([promise1, primise2]).then(res => {
+        this.connectDialogVis = false;
+        this.$message.success("关联成功");
+        this.$emit('relateSuccess', buildFloor);
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+#messageDialog {
+  .el-row {
+    height: 50px;
+    max-height: 200px;
+    overflow-y: auto;
+    overflow-x: hidden;
+  }
+  .el-row > div {
+    float: left;
+  }
+  .el-row > div + div {
+    margin-left: 10px;
+  }
+  /deep/ .el-input__inner {
+    vertical-align: baseline;
+  }
+}
+</style>

+ 6 - 5
src/components/ledger/lib/floorCascader.vue

@@ -1,6 +1,6 @@
 <template>
     <div id="buildFloor">
-        <span class="buildFloor" style="margin-right: 12px;">建筑楼层</span>
+        <span class="buildFloor">建筑楼层</span>
         <el-cascader placeholder="请选择建筑楼层" :options="options" v-model="value" filterable size="small" :style="isWidth ? '' : 'width:160px;'" @change="changeCascader"></el-cascader>
     </div>
 </template>
@@ -149,9 +149,10 @@
     #buildFloor {
         margin-left: 10px;
         float: left;
-        .buildFloor {
-            color: #999999;
-            font-size: 14px;
-        }
+    }
+    .buildFloor {
+        color: #999999;
+        font-size: 14px;
+        margin-right: 12px;
     }
 </style>

+ 65 - 0
src/components/ledger/lib/spaceSelect.vue

@@ -0,0 +1,65 @@
+<template>
+  <div id="spaceSelect">
+    <span class="buildFloor" style="padding-right:12px">业务空间</span>
+    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option v-for="(item, key) in options" :key="key" :label="item.Name" :value="item.Code"></el-option>
+    </el-select>
+  </div>
+</template>
+
+<script>
+import { queryDictionaryHead } from '@/api/scan/request';
+export default {
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      value:null,
+      spaceVal: null,//值
+      options: [],
+      props: {
+        isWidth:false
+      }
+    }
+  },
+  methods: {
+    //获取下拉框数据
+    getOptionData() {
+      let pa = {
+        Filters: `parentId = 'Space'`
+      }
+      queryDictionaryHead(pa, res => {
+        this.options = res.Content.map(t => {
+          if (t.Name == "元空间") {
+            return undefined;
+          }
+          return t;
+        }).filter(item => item);
+        this.options.unshift({Code:null, CreateTime:null, LastUpdate:null, Name:'全部', ObjectType: null, ParentId: null, Statistics: {}});
+      })
+    },
+    //改变空间
+    changeVal(value) {
+      this.$emit('change', value)
+    }
+  },
+  created() {
+    this.getOptionData();
+  }
+}
+</script>
+
+<style lang="less" scoped>
+#spaceSelect {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 180 - 0
src/components/ledger/system/dialog/addCenoteDialog.vue

@@ -0,0 +1,180 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7" style="width:268px">
+        <el-input placeholder="输入竖井名称或竖井本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="7.5">
+        <cenote-type @change="changeCenote"></cenote-type>
+      </el-col>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="StructureInfo.ShaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { unSysShaft, queryShaftType, linkSysSh } from "@/api/scan/request";
+import cenoteType from "@/components/ledger/lib/cenoteType";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    cenoteType
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加系统所在竖井",
+      keycode: '', //输入查询条件
+      cenoteType: '', // 选中的竖井类型
+      shaftType: {}, //全部竖井类型
+      inSpaceType: '竖井',
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      } // 列表样式
+    };
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object //查看的竖井关系信息
+  },
+  created() {
+    queryShaftType(res => {
+      res.Content.forEach(item => {
+        this.shaftType[item.Code] = item.Name
+      })
+    })
+  },
+  methods: {
+    //修改竖井类型
+    changeCenote(value) {
+      this.cenoteType = value.Id
+      this.getTableData()
+    },
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true
+      this.page.pageNumber = 1
+      this.tableData = []
+      this.getTableData()
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: this.cenoteType ? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteType}'` : `ProjectId='${this.projectId}'`,
+          Orders: "createTime desc, ShaftID asc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize,
+        },
+        shaftId: this.params.ShaftID,
+        sysId: this.$route.query.SysID
+      }
+      if (this.keycode != '') {
+        params.data.Filters += `;ShaftName contain '${this.keycode}' or ShaftLocalName contain '${this.keycode}' or ShaftLocalID contain '${this.keycode}'`
+      }
+      unSysShaft(params, res => {
+        this.tableData = res.Content
+        this.tableData.forEach(item => {
+          if (item.StructureInfo && item.StructureInfo.ShaftFuncType) {
+            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          }
+        })
+        this.page.total = res.Total
+      })
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          SysId: this.$route.query.SysID,
+          ShaftIdList: this.selections.map(item => {
+            return item.ShaftID
+          })
+        }
+        linkSysSh(params, res => {
+          this.dialogVisible = false
+          this.$message.success('关联成功!')
+          this.$emit('refresh')
+        })
+      } else {
+        this.$message('请选择要关联的设备')
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message('开发中')
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px;
+    /deep/ .el-input__inner {
+      vertical-align: baseline;
+    }
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 209 - 0
src/components/ledger/system/dialog/addEquipDialog.vue

@@ -0,0 +1,209 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7" style="width:268px">
+        <el-input placeholder="输入设备名称或设备本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;">
+        <floor-cascader @change="changeFloor" style="margin-left:5px;"></floor-cascader>
+      </el-col>
+      <el-col :span="8.5" style="padding-right:0;">
+        <myCascader @change="changeDevice" :all="true" :params="childParams"></myCascader>
+      </el-col>
+    </el-row>
+
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>{{scope.row.EquipLocalName||scope.row.EquipName||''}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { sysLinkEquip, unSysEq } from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import myCascader from "@/components/ledger/system/lib/equipType";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    myCascader
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加系统内设备",
+      keycode: "", //输入查询条件
+      Buildfloor: ["all"], // 选中的建筑楼层
+      Equipcategory: null, // 选中的设备类型
+      inSpaceType: "设备",
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: "#e1e4e5",
+        color: "#2b2b2b",
+        lineHeight: "30px"
+      } // 列表样式,
+    };
+  },
+  computed: {
+    childParams() {
+      let temp = JSON.parse(JSON.stringify(this.params));
+      temp.SysType = null;
+      return temp;
+    }
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object //查看的竖井关系信息
+  },
+  created() { },
+  methods: {
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value;
+      this.getTableData();
+    },
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true;
+      this.page.pageNumber = 1;
+      this.tableData = [];
+      this.getTableData();
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: `not EquipID isNull`,
+          Cascade: [{ Name: "equipCategory" }],
+          Orders: "createTime desc, EquipID desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize
+        },
+        shaftId: this.params.ShaftID,
+        sysId: this.$route.query.SysID
+      };
+      if (this.Buildfloor[0] == "noKnow") {
+        params.data.Filters += `;buildingId isNull`;
+      } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
+        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+      }
+      if (this.Buildfloor[1] == "noKnow") {
+        params.data.Filters += `;floorId isNull`;
+      } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
+        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+      }
+      if (this.keycode != "") {
+        params.data.Filters += `;EquipName contain '${this.keycode}' or EquipLocalName contain '${this.keycode}' or EquipLocalID contain '${this.keycode}'`;
+      }
+      if (this.Equipcategory) {
+        params.data.Filters += `;category='${this.Equipcategory}'`;
+      }
+      unSysEq(params, res => {
+        res.Content.forEach(item => {
+          item.ShaftListName = "";
+          if (item.ShaftList && item.ShaftList.length) {
+            item.ShaftListName = item.ShaftList.map(shaft => {
+              return shaft.ShaftLocalName
+                ? shaft.ShaftLocalName
+                : shaft.ShaftName;
+            }).join("、");
+          }
+        });
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+      });
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          SysId: this.$route.query.SysID,
+          EquipIdList: this.selections.map(item => {
+            return item.EquipID;
+          })
+        };
+        sysLinkEquip(params, res => {
+          this.dialogVisible = false;
+          this.$message.success("关联成功!");
+          this.$emit("refresh");
+        });
+      } else {
+        this.$message("请选择要关联的设备");
+      }
+    },
+    //修改设备类别
+    changeDevice(value) {
+      this.Equipcategory = value.code;
+      this.getTableData();
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message("开发中");
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px;
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+/deep/ #buildFloor .buildFloor {
+  margin: 0 5px 0 5px;
+}
+</style>

+ 225 - 0
src/components/ledger/system/dialog/addSpaceDialog.vue

@@ -0,0 +1,225 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialog" :before-close="handleClose" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7" style="width:268px;padding:0px;">
+        <el-input style placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;margin-left:-2px">
+        <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
+      </el-col>
+      <el-col :span="7.5" style="padding:0 0;">
+        <space-select ref="spacesel" @change="changeSpace"></space-select>
+      </el-col>
+    </el-row>
+    <el-row class="filters" :gutter="20"></el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{scope.row.RoomLocalName||scope.row.RoomName||''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="RoomLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{ scope.row.BuildingId && floorType[scope.row.BuildingId]? ((floorType[scope.row.BuildingId] || '') + (scope.row.FloorId && floorType[scope.row.FloorId] ? (' - ' + floorType[scope.row.FloorId] || '') : '')) : ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="ObjectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            {{spaceType[scope.row.ObjectType] || ''}}
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="handleClose">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  unSysZoneSpace,
+  linkSysSp,
+  queryDictionaryHead
+} from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import dictionaryCas from "@/components/config_point/dictionaryCascader";
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    dictionaryCas,
+    spaceSelect
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    dialog() {
+      return this.dialogVisible;
+    }
+  },
+  data() {
+    return {
+      title: "添加系统所在业务空间",
+      keycode: "", //输入查询条件
+      inSpaceType: "业务空间",
+      Buildfloor: ["all"], // 选中的建筑楼层
+      Spacecategory: null, // 选中的业务空间类型
+      tableData: [],
+      floorData: {}, //楼层
+      spaceData: {}, //业务空间分区
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: "#e1e4e5",
+        color: "#2b2b2b",
+        lineHeight: "30px"
+      } // 列表样式
+    };
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object, //查看的竖井关系信息
+    spaceType: Object,
+    dialogVisible: Boolean,
+    floorType: Object
+  },
+  mounted() { },
+  methods: {
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true;
+    },
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value;
+      this.getTableData();
+    },
+    //修改空间类型
+    changeSpace(value) {
+      this.Spacecategory = value;
+      this.getTableData();
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: "not RoomID isNull",
+          Orders: "RoomLocalName desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize
+        },
+        shaftId: this.params.ShaftID,
+        sysId: this.$route.query.SysID
+      };
+      if (this.Buildfloor[0] == "noKnow") {
+        params.data.Filters += `;buildingId isNull`;
+      } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
+        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`;
+      }
+      if (this.Buildfloor[1] == "noKnow") {
+        params.data.Filters += `;floorId isNull`;
+      } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
+        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`;
+      }
+      if (this.Spacecategory) {
+        params.data.Filters += `;ObjectType='${this.Spacecategory}'`;
+      }
+      if (this.keycode != "") {
+        params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`;
+      }
+
+      unSysZoneSpace(params, res => {
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+      });
+    },
+    handleClose() {
+      this.$emit("update:dialogVisible", false);
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          Content: this.selections.map(item => {
+            return {
+              SpaceID: item.RoomID,
+              SysID: this.$route.query.SysID,
+              ObjectType: item.ObjectType
+            };
+          })
+        };
+        linkSysSp(params, res => {
+          this.$message.success("关联成功!");
+          this.$emit("refresh");
+        });
+      } else {
+        this.$message("请选择要关联的设备");
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message("开发中");
+    }
+  },
+  watch: {
+    dialogVisible: {
+      handler() {
+        if (this.dialogVisible) {
+          this.page.pageNumber = 1;
+          this.tableData = [];
+          this.getTableData();
+        }
+      },
+      immediate: true
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin: 0 0 10px 0;
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 140 - 0
src/components/ledger/system/lib/equipType.vue

@@ -0,0 +1,140 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
+    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { queryPhysicsAllType, queryEquip } from "@/api/scan/request";
+export default {
+  name: "getCode",
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    },
+    all: {
+      type: Boolean,
+      default: false,
+    },
+    //系统
+    params: Object
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: "",
+      options: [],
+      props: {
+        value: "code",
+        label: "facility"
+      },
+      falg: true,
+      content: []
+    };
+  },
+  created() {
+    this.getData();
+  },
+  watch: {
+    projectId() {
+      this.value = '';
+      this.getData();
+    }
+  },
+  methods: {
+    setValue(val) {
+      this.value = val
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的设备类型(只拿到编码-需要过滤)
+    getData() {
+      let param2 = {
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Category"
+        ]
+      }
+      let param1 = 'Equipment'
+      let promise2 = new Promise((resolve, reject) => {
+        queryEquip(param2, res => {
+          resolve(res)
+        })
+      })
+      let promise1 = new Promise((resolve, reject) => {
+        queryPhysicsAllType(param1, res => {
+          let tempArr = res.Content;
+          if (this.params.SysType) {
+            tempArr = res.Content.filter(t => {
+              return t.ParentId == `${this.params.SysType}`
+            })
+          }
+          resolve(tempArr)
+        })
+      })
+      Promise.all([promise1, promise2]).then((res) => {
+        let allData = res[0], data = res[1]
+        this.options = this.formatOptions(allData)
+        if (this.value) {
+          this.changeVal(this.value)
+        }
+        if (!this.all) {
+          this.content = data.Content.map(t => {
+            return t.Category
+          });
+          this.filterForOptions();
+          if (this.value) {
+            this.changeVal(this.value)
+          }
+        }
+      })
+    },
+    //格式化options数据
+    formatOptions(arr) {
+      let data = [];
+      arr.map(t => {
+        let temp = {};
+        temp.code = t.Code;
+        temp.facility = t.Name;
+        data.push(temp)
+      })
+      return data;
+    },
+    //过滤
+    filterForOptions() {
+      this.options = this.options.filter(item => {
+        if (this.content.indexOf(item.code) > -1) {
+          return item
+        }
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 156 - 0
src/components/ledger/system/table/cenoteTable.vue

@@ -0,0 +1,156 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与竖井关系计算" placement="right">
+        <el-button>按系统内设备与竖井关系计算</el-button>
+      </el-tooltip>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.StructureInfo.ShaftFuncType}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算连通的其它竖井
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加设备弹窗 -->
+    <addCenoteDialog ref="addCenoteDialog" @refresh="getTableData" :type="type" :params="params"></addCenoteDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, queryShaftType, syinshUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addCenoteDialog from "@/components/ledger/system/dialog/addCenoteDialog"
+export default {
+  components: {
+    addCenoteDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: '竖井',
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [], //列表数据
+      shaftType: {} //竖井类型
+    };
+  },
+  props: {
+    params: Object,
+    type: String
+  },
+  created() {
+    queryShaftType(res => {
+      res.Content.forEach(item => {
+        this.shaftType[item.Code] = item.Name
+      })
+      this.getTableData()
+    })
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: 'shaftList',
+          }
+        ]
+      }
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].Shaft || []
+        this.tableData.forEach(item => {
+          if (item.StructureInfo && item.StructureInfo.ShaftFuncType) {
+            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          }
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      let sysId = this.$route.query.SysID
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          ShaftId: row.ShaftID,
+          SysId: sysId
+        }
+        this.deleteShThroughSh(params);
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    // 删除设备所在空间关系
+    deleteShThroughSh(params) {
+      syinshUnlink(params, res => {
+        this.$message.success('删除成功')
+        this.getTableData()
+      })
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.$refs.addCenoteDialog.showDialog()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 144 - 0
src/components/ledger/system/table/deviceTable.vue

@@ -0,0 +1,144 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <!-- <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中计算竖井内设备" placement="right">
+        <el-button>按空间计算</el-button>
+      </el-tooltip> -->
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName||scope.row.EquipName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipCategory.EquipName}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button title="删除关系" size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算竖井内设备
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加设备弹窗 -->
+    <addEquipDialog ref="addEqDialog" @refresh="getTableData" :type="type" :params="params"></addEquipDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, eqInSysUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addEquipDialog from "@/components/ledger/system/dialog/addEquipDialog"
+export default {
+  components: {
+    addEquipDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: '设备',
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [] //列表数据
+    };
+  },
+  props: {
+    params: Object,
+    type: String
+  },
+  created() {
+    this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: 'equipmentList',
+            Cascade: [{ Name: 'equipCategory' }]
+          }
+        ]
+      }
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].Equipment || []
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      let sysId = this.$route.query.SysID
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          EquipId: row.EquipID,
+          SysId: sysId
+        }
+        this.deleteEqInSh(params);
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    // 删除设备所在竖井关系
+    deleteEqInSh(params) {
+      eqInSysUnlink(params, res => {
+        this.$message.success('删除成功')
+        this.getTableData()
+      })
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.$refs.addEqDialog.showDialog()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 156 - 0
src/components/ledger/system/table/spaceTable.vue

@@ -0,0 +1,156 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与空间关系计算" placement="right">
+        <el-button>按系统内设备与业务空间关系计算</el-button>
+      </el-tooltip>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>{{ scope.row.RoomLocalName || scope.row.RoomName||''}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="RoomLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>{{ spaceType[scope.row.ObjectType]}}</div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算竖井内系统
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加空间弹窗 -->
+    <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="params" :spaceType="spaceType"
+      :floorType="floorType"></addSpaceDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, spaceInSysUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addSpaceDialog from "@/components/ledger/system/dialog/addSpaceDialog";
+export default {
+  components: {
+    addSpaceDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: "业务空间",
+      dialogVisible: false,
+      headerStyle: {
+        backgroundColor: "#e1e4e5",
+        color: "#2b2b2b",
+        lineHeight: "30px"
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [] //列表数据
+    };
+  },
+  props: {
+    params: Object,
+    type: String,
+    spaceType: Object,
+    floorType: {}
+  },
+  created() {
+    this.getTableData();
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: "zoneSpaceBaseTableList"
+          }
+        ]
+      };
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].ZoneSpaceBaseTable || [];
+      });
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          let params = {
+            data: [
+              {
+                SysId: this.params.SysID,
+                SpaceId: row.RoomID
+              }
+            ],
+            type: row.ObjectType
+          };
+          this.deleteSyInSh(params);
+        })
+        .catch(() => {
+          this.$message("取消删除");
+        });
+    },
+    // 删除系统所在竖井关系
+    deleteSyInSh(params) {
+      spaceInSysUnlink(params, res => {
+        this.$message.success("删除成功");
+        this.getTableData();
+      });
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.dialogVisible = true;
+    },
+    //刷新
+    refresh() {
+      this.dialogVisible = false;
+      this.getTableData()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 107 - 0
src/components/ready/buildfloor/modelFile.vue

@@ -0,0 +1,107 @@
+<template>
+    <div id="modelFile">
+        <span class="modelFile" style="margin-right: 12px;">模型文件</span>
+        <el-cascader :options="options" :show-all-levels="false" @change="handleChange" style="width:160px;"
+        @active-item-change='handleItemChange' clearable placeholder="请选择模型文件" v-model="casVal"></el-cascader>
+    </div>
+</template>
+<script>
+import tools from "@/utils/scan/tools"
+import request from "@/api/model/file.js";
+import { mapGetters, mapActions } from "vuex"
+
+export default {
+  computed: {
+    ...mapGetters("layout", [ "projectId", "secret", "userId" ])
+  },
+  data() {
+    return {
+      casVal: [],
+      options: [],
+      modelIdToFloorId: {}
+    };
+  },
+  created() {
+    this.init()
+  },
+  watch: {
+    projectId() {
+      this.casVal =[]
+      this.options = []
+      this.init()
+    }
+  },
+  methods: {
+    //设置默认选项
+    setValue(val) {
+        if (val && val.length) {
+          this.casVal = val
+        }
+    },
+    //获取数据
+    init() {
+      this.getDirectory()
+    },
+    // 获取文件夹
+    getDirectory() {
+      request.queryModel("", res => {
+        this.options = res.Content.map(t => {
+          return {
+            value: t.Id,
+            label: t.Name,
+            children: []
+          }
+        })
+      });
+    },
+    // 通过id查询文件夹下模型文件
+    handleItemChange(val) {
+      let data = {
+        FolderId: val[0],
+        ProjectId: this.projectId
+      };
+      request.queryFloorList(data, res => {
+        let tempArr = res.Content.map(t => {
+          this.modelIdToFloorId[t.CurrentModelId] = t.Id;
+          return {
+            value: t.CurrentModelId,
+            label: t.FloorName
+          }
+        })
+        this.pushChild(this.options, tempArr, val[0])
+      })
+    },
+    // 将模型文件list填到相应的文件夹下
+    pushChild(options, arr, Code) {
+      options.map(option => {
+        if (option.value == Code) {
+          option.children = arr;
+        } else {
+          if (option.children) {
+            this.pushChild(option.children, arr, Code)
+          }
+        }
+      })    
+    },
+    //改变item
+    handleChange(value) {
+      this.$emit("change", value)
+    }
+  }
+};
+</script>
+<style lang="less">
+    .el-cascader .el-input .el-input__inner {
+        vertical-align: bottom;
+    }
+</style>
+<style lang="less" scoped>
+    #modelFile {
+        margin-left: 10px;
+        float: left;
+        .modelFile {
+            color: #999999;
+            font-size: 14px;
+        }
+    }
+</style>

+ 83 - 0
src/components/ready/buildfloor/modelFolder.vue

@@ -0,0 +1,83 @@
+<template>
+  <div id="modelFile">
+    <span class="modelFile" style="margin-right: 12px;">模型文件夹</span>
+    <el-select v-model="casVal" filterable clearable placeholder="请选择模型文件夹" style="width:160px;" @change="handleChange">
+      <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import tools from "@/utils/scan/tools"
+import request from "@/api/model/file.js";
+import { mapGetters, mapActions } from "vuex"
+
+export default {
+  computed: {
+    ...mapGetters("layout", ["projectId", "secret", "userId"])
+  },
+  data() {
+    return {
+      casVal: '',
+      options: []
+    };
+  },
+  created() {
+    this.init()
+  },
+  watch: {
+    projectId() {
+      this.casVal = ''
+      this.options = []
+      this.init()
+    }
+  },
+  methods: {
+    //设置默认选项
+    setValue(val) {
+      if (val && val.length) {
+        this.casVal = val
+      }
+    },
+    //获取数据
+    init() {
+      this.getDirectory()
+    },
+    // 获取文件夹
+    getDirectory() {
+      request.queryModel("", res => {
+        this.options = res.Content.map(t => {
+          return {
+            value: t.Id,
+            label: t.Name
+          }
+        })
+      });
+    },
+    //改变item
+    handleChange(value) {
+      this.options.map(item =>{
+        if (item.value == value) {
+          value = item
+        }
+      })
+      value = value?value:{value:''}
+      this.$emit("change", value)
+    }
+  }
+};
+</script>
+<style lang="less">
+.el-cascader .el-input .el-input__inner {
+  vertical-align: bottom;
+}
+</style>
+<style lang="less" scoped>
+#modelFile {
+  margin-left: 10px;
+  float: left;
+  .modelFile {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 322 - 45
src/framework/components/messagesever/index.vue

@@ -2,13 +2,48 @@
  * @Author: zhangyu
  * @Date: 2019-08-26 15:22:13
  * @Info: 
- * @LastEditTime: 2019-09-26 20:16:41
+ * @LastEditTime: 2019-11-13 15:46:29
  -->
 <template>
-  <div class="notification-box" @click="handleClickRead">
+  <div class="notification-box" v-clickOutside="handleClose" @click="handleClickRead">
     <el-badge :value="unreadNum" :hidden="!unreadNum" :max="99">
       <i class="el-icon-message-solid"></i>
     </el-badge>
+    <transition name="el-fade-in-linear">
+      <div v-show="noticeListShow" @click.stop="" class="noticeBox">
+        <ul class="noticeTab">
+          <li class="noticeTab_item">消息通知
+            <!-- <span class="unread_num">1</span> -->
+          </li>
+        </ul>
+        <div class="noticeList_scroll">
+          <el-scrollbar style="height:100%;">
+            <ul class="noticeList">
+              <li class="noticeList_item" v-for="item in messageList" :key="item.Id" :title="item.Content.Message?item.Content.Message:''">
+                <div class="noticeItem_box">
+                  <div class="noticeItem_text">
+                    <i :class="iconClassMap[item.Type]?iconClassMap[item.Type]:'msg-icon el-icon-warning warning-color'"></i>
+                    <p><span>{{`【${moduleMap[item.Module]?moduleMap[item.Module]:item.Module}】 `}}</span>{{item.Title?item.Title:""}}</p>
+                  </div>
+                  <div class="noticeItem_time">
+                    <span class="proname">{{item.Project[0].ProjLocalName || ''}}</span>
+                    {{item.CreateTime}}
+                    <el-link v-for="(btn, index) in item.Content.ButtonList?item.Content.ButtonList:[]"
+                      style="float:right;font-size:12px;margin-left:5px;" type="primary" :key="index"
+                      :href="`/image-service/common/file_get?systemId=revit&key=${btn.Url}`" :download="btn.FileName?btn.FileName:''">
+                      {{btn.Name?btn.Name:""}}</el-link>
+                  </div>
+                </div>
+              </li>
+            </ul>
+          </el-scrollbar>
+        </div>
+        <div class="notice_operate">
+          <!-- <div class="readAll">全部标为已读</div> -->
+          <div class="seeAll" @click="allDetails">查看全部<i class="iconfont icon-right"></i></div>
+        </div>
+      </div>
+    </transition>
     <!-- <el-button type="primary" @click="handleClickConnectMQ">连接MQ</el-button>
     <el-button type="primary" @click="handleClickDisconnectMQ">断开MQ</el-button>
     <el-button type="primary" @click="handleClickUnsubscribe">停止接收消息</el-button><br><br>
@@ -30,39 +65,90 @@
 import { mapGetters } from 'vuex'
 import Stomp from 'stompjs'
 import Msmq from './msmq'
+import Bus from '@/utils/bus.js'
 import { MQTT_SERVICE, MQTT_USERNAME, MQTT_PASSWORD } from './mqSetting'
+import { messgeCount, messgeQuery, messgeUpdateState } from '@/api/msgsever'
 
 export default {
+  components: {
+
+  },
   data() {
     return {
       client: Stomp.client(MQTT_SERVICE),
       unreadNum: 0,
+      noticeListShow: false,//是否显示消息列表
       sendMessage: '',
       messageList: [], // 历史消息
       subList: [], // 订阅的消息实例
-      topics: ["/topic/model.manage"] // 订阅的消息名称
+      topics: ["/topic/message.manage"], // 订阅的消息名称
+      messageList: [],
+      moduleMap: {//消息模块映射
+        "Model": "模型文件管理"
+      },
+      iconClassMap: { //消息类型图标映射
+        "Success": "msg-icon el-icon-success success-color",
+        "Error": "msg-icon el-icon-error error-color",
+        "Warning": "msg-icon el-icon-warning warning-color",
+        "Info": "msg-icon el-icon-info info-color",
+      },
     }
   },
-  created () {
+  created() {
     this.connect()
-    // let url = "ws://192.168.20.225:61614/stomp";
-    // let login = "admin";
-    // let passcode = "admin";
-    // let destination = "/topic/datacenter.broadcast";
-    // let client = Stomp.client(url)
-    // console.log('钩子:',client)
-    // var onconnect = function(frame) {
-    //   client.subscribe(destination, function(message) {
-    //     console.log(message.body);
-    //     alert(message.body);        
-    //   });
-    // };
-    // client.connect(login, passcode, onconnect)
+  },
+  mounted() {
+    this.getUnreadCount()
+    this.getMessageList()//获取消息列表
+    Bus.$on('messageListUpdate', message => {
+      this.getMessageList()
+    })
+    Bus.$on('getUnreadCountUpdate', message => {
+      this.getUnreadCount()
+    })
   },
   computed: {
-    ...mapGetters('layout', ['userInfo', 'projectId', 'projects'])
+    ...mapGetters('layout', ['userInfo', 'projectId', 'projects', 'userId'])
   },
-  methods:{
+  methods: {
+    getMessageList() {//获取消息列表(最新10条)
+      let params = {
+        Cascade: [
+          {
+            Name: "project"
+          }
+        ],
+        Filters: `UserId='${this.userId}'`,
+        Orders: "CreateTime desc, Id asc",
+        PageNumber: 1,
+        PageSize: 10
+      }
+      messgeQuery(params, res => {
+        this.messageList = res.Content
+      })
+    },
+    getUnreadCount() {//获取未读消息的数量
+      let params = {
+        Filters: `Read=false;UserId='${this.userId}'`
+      }
+      messgeCount(params, res => {
+        this.unreadNum = res.Count
+      })
+    },
+    setAllRead() {//将当前角色消息全部置为已读
+      if (this.userId) {
+        messgeUpdateState({ Read: true, UserId: this.userId }, res => { this.unreadNum = 0 })
+      }
+    },
+    handleClose(e) {//关闭消息列表
+      this.noticeListShow = false
+    },
+    handleClickRead() {//点击消息铃铛
+      this.noticeListShow ? this.noticeListShow = false : this.noticeListShow = true
+      if (this.noticeListShow) {
+        this.setAllRead()//将当前角色消息全部置为已读
+      }
+    },
     connect() {
       this.client = Stomp.client(MQTT_SERVICE)
       this.client.reconnect_delay = 5000
@@ -85,7 +171,7 @@ export default {
     },
     //接收到消息的回调
     onmessage(message) {
-      this.unreadNum = Msmq.handleMsg(message, this.projects, this.unreadNum);
+      this.unreadNum = Msmq.handleMsg(message, this.projects, this.userId, this.unreadNum);
     },
     // 接收消息失败回调
     onFailed(frame) {
@@ -99,7 +185,7 @@ export default {
     },
     //断开连接
     disconnect() {
-      this.client.disconnect(function() {
+      this.client.disconnect(function () {
         console.log("连接已断开!");
       })
     },
@@ -107,45 +193,236 @@ export default {
     send(destination, message, headers = {}) {
       this.client.send(destination, headers, JSON.stringify(message))
     },
-    
-    handleClickConnectMQ() {
+
+    handleClickConnectMQ() {//连接MQ
       this.connect()
     },
-    handleClickDisconnectMQ() {
+    handleClickDisconnectMQ() {//断开MQ
       this.disconnect()
     },
-    handleClickUnsubscribe() {
+    handleClickUnsubscribe() {//停止接收消息
       this.unsubscribe()
     },
-    handleClickSendMessage() {
-      this.send('/topic/datacenter.broadcast',this.sendMessage)
-    }, 
-    handleClickRead() {
-      this.unreadNum = 0;
+    handleClickSendMessage() {//发送消息
+      this.send('/topic/datacenter.broadcast', this.sendMessage)
+    },
+    allDetails() {
+      this.noticeListShow = false;
+      this.$router.push({ path: "/allDetails" });
     }
   }
 }
 </script>
 
 <style lang="scss" scoped>
-  .notification-box{
-    width: 100%;
-    height: 100%;
-    padding: 16px 10px 10px;
+.notification-box {
+  width: 100%;
+  height: 100%;
+  position: relative;
+  padding: 16px 10px 10px;
+  box-sizing: border-box;
+  color: #79869a;
+  cursor: pointer;
+  .noticeBox {
+    position: absolute;
+    top: 50px;
+    left: 50%;
+    margin-left: -220px;
+    cursor: auto;
+    z-index: 1000;
+    text-align: left;
+    width: 272px;
+    height: 362px;
+    box-shadow: 0 1px 6px 0 #ccc;
+    color: #333;
+    background: #fff;
+    overflow: visible !important;
+  }
+  .noticeBox::before {
+    content: "";
+    border: solid 7px transparent;
+    border-bottom-color: #fff;
+    display: block;
+    position: absolute;
+    width: 2px;
+    top: -14px;
+    left: 50%;
+    margin-left: 77px;
+    z-index: 0;
+  }
+  .noticeTab {
+    padding: 8px 16px 0;
+    z-index: 10;
+    height: 32px;
+    zoom: 1;
+    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.1) inset;
+    .noticeTab_item {
+      float: left;
+      position: relative;
+      width: 240px;
+      height: 32px;
+      line-height: 32px;
+      padding: 0;
+      margin-right: 0;
+      font-weight: 700;
+      text-align: left;
+      cursor: pointer;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
+      .unread_num {
+        display: inline-block;
+        color: #fff;
+        background-color: #5182e4;
+        height: 14px;
+        padding: 0 2px;
+        line-height: 14px;
+        text-align: center;
+        border-radius: 2px;
+        font-size: 12px;
+        padding: 0 3px;
+        font-family: Arial;
+        -webkit-transform: scale(0.85);
+        -ms-transform: scale(0.85);
+        -o-transform: scale(0.85);
+        transform: scale(0.85);
+      }
+    }
+    .active {
+      box-shadow: 0 -2px 0 0 #5182e4 inset;
+    }
+  }
+  .noticeList_scroll {
+    height: 282px;
+    /deep/ .el-scrollbar__wrap {
+      overflow-x: hidden;
+    }
+    .noticeList_item {
+      width: 100%;
+      height: auto;
+      position: relative;
+      cursor: pointer;
+      box-sizing: border-box;
+      padding: 12px 16px;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
+      zoom: 1;
+      .noticeItem_box {
+        float: left;
+        position: relative;
+        width: 100%;
+        .noticeItem_text {
+          color: rgba(10, 18, 32, 0.87);
+          font-weight: 700;
+          padding-left: 18px;
+          text-indent: -6px;
+          position: relative;
+          font-size: 12px;
+          line-height: 17px;
+          -webkit-transition: all 0.2s ease-in-out;
+          -o-transition: all 0.2s ease-in-out;
+          transition: all 0.2s ease-in-out;
+          .msg-icon {
+            position: absolute;
+            top: 2.5px;
+            left: 6px;
+          }
+          p {
+            word-break: break-all;
+          }
+        }
+        .noticeItem_time {
+          font-size: 12px;
+          height: 19px;
+          line-height: 19px;
+          color: rgba(10, 18, 32, 0.46);
+          margin-top: 4px;
+          padding-left: 18px;
+          .proname{
+            float: left;
+            display: block;
+            width: 80px;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+          }
+        }
+      }
+    }
+    .noticeList_item:hover {
+      background-color: #f5f7f7;
+    }
+    .noticeList_item:after {
+      content: "";
+      display: block;
+      height: 0;
+      clear: both;
+      visibility: hidden;
+    }
+    .noticeList_item:before {
+      position: absolute;
+      right: 0;
+      bottom: 0;
+      left: 0;
+      height: 1px;
+      padding: 0 16px;
+      background-color: #ebebeb;
+      content: "";
+      background-clip: content-box;
+    }
+  }
+  .notice_operate {
+    height: 40px;
+    line-height: 20px;
+    padding: 10px 16px;
     box-sizing: border-box;
-    color: #79869a;
-    cursor: pointer;
-    .el-icon-message-solid{
-      font-size: 22px;
+    background-color: rgba(242, 243, 245, 0.48);
+    box-shadow: inset 0 1px 0 0 rgba(10, 18, 32, 0.06);
+    zoom: 1;
+    .readAll {
+      float: left;
+      cursor: pointer;
+      -webkit-transition: all 0.2s ease-in-out;
+      -o-transition: all 0.2s ease-in-out;
+      transition: all 0.2s ease-in-out;
     }
-    /deep/ .el-badge__content{
-      height: 16px;
-      line-height: 16px;
-      border: 1px solid transparent;
+    .readAll:hover {
+      text-decoration: underline;
     }
+    .seeAll {
+      float: right;
+      color: #5182e4;
+      cursor: pointer;
+      font-weight: 700;
+    }
+    .seeAll:hover {
+      text-decoration: underline;
+    }
+  }
+  .el-icon-message-solid {
+    font-size: 22px;
   }
-  .notification-box:hover{
-    color: #d3d8e2;
-    background-color: #3f4f62;
+  /deep/ .el-badge__content {
+    height: 16px;
+    line-height: 16px;
+    border: 1px solid transparent;
   }
+}
+.notification-box:hover {
+  color: #d3d8e2;
+  background-color: #3f4f62;
+}
+.success-color {
+  color: #67c23a;
+}
+.error-color {
+  color: #f56c6c;
+}
+.warning-color {
+  color: #e6a23c;
+}
+.info-color {
+  color: #909399;
+}
 </style>

+ 209 - 0
src/framework/components/messagesever/msgAllDetails.vue

@@ -0,0 +1,209 @@
+  <template>
+  <div class="box">
+    <div class="condition">
+      <div class="main" :style="tableData && tableData.length?'height: calc(100% - 50px);':'height: calc(100% - 46px);'">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" :header-cell-style="headerStyle"
+          @expand-change="changeMessageState">
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column width="25">
+            <template slot-scope="scope">
+              <el-badge class="item" type="warning" is-dot v-if="!scope.row.Read"></el-badge>
+            </template>
+          </el-table-column>
+          <el-table-column prop="Title" label="标题内容" min-width="300" show-overflow-tooltip></el-table-column>
+          <el-table-column label="项目">
+            <template slot-scope="scope">
+              {{ scope.row.Project[0].ProjLocalName }}
+            </template>
+          </el-table-column>
+          <el-table-column label="模块" width="200">
+            <template slot-scope="scope">
+              {{ moduleMap[scope.row.Module]?moduleMap[scope.row.Module]:scope.row.Module }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="CreateTime" label="消息时间">
+          </el-table-column>
+          <el-table-column label="消息类型">
+            <template slot-scope="scope">
+              <div>
+                <i :class="iconClassMap[scope.row.Type]?iconClassMap[scope.row.Type]:'msg-icon el-icon-warning warning-color'" style="font-size:14px;"></i>
+                <span>{{ typeMap[scope.row.Type]?typeMap[scope.row.Type]:scope.row.Type }}</span>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column type="expand">
+            <template slot-scope="scope">
+              <p>{{ scope.row.Content.Message }}</p>
+              <el-link v-for="(btn, index) in scope.row.Content.ButtonList" style="float:left;font-size:12px;color:white;width:"
+                :key="index" :href="`/image-service/common/file_get?systemId=revit&key=${btn.Url}`" :download="btn.FileName?btn.FileName:''">
+                {{btn.Name}}
+              </el-link>
+            </template>
+          </el-table-column>
+          <template slot="empty">
+            <div style="height: 60%;transform: translateY(50%);">
+              <i class="icon-wushuju iconfont"></i>
+              数据暂无
+            </div>
+          </template>
+        </el-table>
+      </div>
+      <el-pagination class="right" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+  <script>
+import { mapGetters } from 'vuex'
+import { messgeQuery, messgeUpdate } from '@/api/msgsever'
+import Bus from '@/utils/bus.js'
+
+export default {
+  data() {
+    return {
+      tableData: [],
+      loading: false,
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {// 列表样式
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, 
+      moduleMap: {//消息模块映射
+        "Model": "模型文件管理"
+      },
+      iconClassMap: { //消息类型图标映射
+        "Success": "msg-icon el-icon-success success-color",
+        "Error": "msg-icon el-icon-error error-color",
+        "Warning": "msg-icon el-icon-warning warning-color",
+        "Info": "msg-icon el-icon-info info-color",
+      },
+      typeMap: { //消息类型文字映射
+        "Success": "成功",
+        "Error": "错误",
+        "Warning": "警告",
+        "Info": "提醒",
+      }
+    }
+  },
+  computed: {
+    ...mapGetters('layout', ['userId'])
+  },
+  mounted() {
+    this.getTableData();
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Cascade: [
+          {
+            Name: "project"
+          }
+        ],
+        Filters: `UserId='${this.userId}'`,
+        Orders: "CreateTime desc, Id asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      this.loading = true;
+      messgeQuery(params, res => {
+        this.tableData = res.Content;
+        this.page.total = res.Total;
+        this.loading = false;
+      })
+    },
+    // 切换每页显示数量
+    handleSizeChange(val) {
+      this.page.pageSize = val;
+      this.getTableData();
+    },
+    // 切换页码
+    handleCurrentChange(val) {
+      this.page.pageNumber = val;
+      this.getTableData();
+    },
+    // 更新消息状态:已读、未读
+    changeMessageState(val) {
+      if(!val.Read){
+        val.Read = true;
+        let params = {
+          Content: [{
+            Id: val.Id,
+            Read: true
+          }]
+        }
+        messgeUpdate(params, res => { 
+          Bus.$emit('getUnreadCountUpdate')
+        });// 展开更新为已读状态,未读数量同步变更
+      }
+    }
+  }
+};
+  </script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    .main {
+      margin-top: 10px;
+      a{
+        text-decoration: none;
+      }
+    }
+  }
+}
+.el-badge.item {
+  height: 10px;
+}
+.el-table__expanded-cell {
+  p {
+    margin-left: 40px;
+  }
+}
+.el-link {
+  margin: 20px 0 0 40px;
+  background: #409eff;
+  border-radius: 3px;
+  padding: 3px 15px;
+}
+.demo-table-expand {
+  font-size: 0;
+}
+.demo-table-expand label {
+  width: 90px;
+  color: #99a9bf;
+}
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+  margin-left: 120px;
+  width: 100%;
+}
+.success-color {
+  color: #67c23a;
+}
+.error-color {
+  color: #f56c6c;
+}
+.warning-color {
+  color: #e6a23c;
+}
+.info-color {
+  color: #909399;
+}
+</style>

+ 29 - 10
src/framework/components/messagesever/msmq.js

@@ -2,20 +2,39 @@ import { Notification } from 'element-ui';
 import Bus from '@/utils/bus.js'
 
 const MSMQ = {
-  handleMsg (message, projects, unreadNum ) {
+  msgTypeMap: {
+    "Success": "success",
+    "Error": "error",
+    "Warning": "warning",
+    "Info": "info",
+  },
+  moduleMap: {//消息模块映射
+    "Model": "模型文件管理"
+  },
+  handleMsg (message, projects, userId, unreadNum ) {
     let data
     try {
       data = JSON.parse(message.body)
-    } catch (err) {}
-    // if(projects.some((item) => {return item.id == data.projectId})) { //判断消息是否是当前用户拥有的项目
-      unreadNum++
-      if(message.headers.destination == '/topic/model.manage'){ //模型文件的消息触发模型文件列表刷新事件
-        Bus.$emit('modelStatusChange', data)
+    } catch (err) {
+      return false
+    }
+    if(data.ProjectId && projects.some((item) => {return item.id == data.ProjectId})) { //判断消息是否是当前用户拥有的项目
+      if(!data.UserList || (userId && data.UserList && data.UserList.includes(userId))){//判断消息接收人是否是当前用户
+        if(data.Module && data.Module == 'Model'){ //模型文件的消息触发模型文件列表刷新事件
+          Bus.$emit('modelStatusChange', data)
+        }
+        Notification({ 
+          title: `${data.Title?data.Title:''}`, 
+          dangerouslyUseHTMLString: true, 
+          message: `【${this.moduleMap[data.Module]?this.moduleMap[data.Module]:data.Module}】${data.Content?data.Content.Message?data.Content.Message:'':''}`,
+          type: this.msgTypeMap[data.Type]?this.msgTypeMap[data.Type]:'info'
+        })
+        // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
+        unreadNum++
+        Bus.$emit('messageListUpdate', data)//消息驱动消息列表刷新
+        return unreadNum
       }
-      // Notification.info({ title: '消息',dangerouslyUseHTMLString: true, message: `项目编号:${data.projectId}<br>消息类型:${data.type}<br>描述信息:${data.description}<br>` })
-      Notification.info({ title: '消息', dangerouslyUseHTMLString: true, message: `${JSON.stringify(data)}` })
-      return unreadNum
-    // }
+    }
   }
 }
 

+ 14 - 10
src/framework/layout/layout-store.js

@@ -63,19 +63,19 @@ export default {
             storage.set(KEY_MENU_SELECTED, val)
         },
         setprojectId: (state, val) => {
-            let cacheInfo = JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo'))?JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')):{}
+            let cacheInfo = JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')) ? JSON.parse(localStorage.getItem('_sagacloud_admin_store_cacheInfo')) : {}
             state.projectId = val
             localStorage.setItem('projectId', val)
-            if(cacheInfo[state.userInfo.userName]){
+            if (cacheInfo[state.userInfo.userName]) {
                 cacheInfo[state.userInfo.userName].projectId = val
                 localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
             } else {
-                cacheInfo[state.userInfo.userName] = {projectId: val}
+                cacheInfo[state.userInfo.userName] = { projectId: val }
                 localStorage.setItem('_sagacloud_admin_store_cacheInfo', JSON.stringify(cacheInfo))
             }
             storage.set(KEY_PROJECT_SELECTED, val)
-            state.projects.map((item) =>{
-                if(item.id == val) {
+            state.projects.map((item) => {
+                if (item.id == val) {
                     state.secret = item.pwd
                 }
             })
@@ -98,21 +98,21 @@ export default {
                         }
                         state.projects = []
                         if (resp.Projects) {
-                            if(resp.Projects[0] && resp.Projects[0].ProjId) {
+                            if (resp.Projects[0] && resp.Projects[0].ProjId) {
                                 state.projectId = resp.Projects[0].ProjId
-                                state.secret = resp.Projects[0].Secret?resp.Projects[0].Secret:""
+                                state.secret = resp.Projects[0].Secret ? resp.Projects[0].Secret : ""
                             }
                             resp.Projects.forEach(proj =>
                                 state.projects.push({
                                     id: proj.ProjId,
                                     name: proj.ProjLocalName,
-                                    pwd: proj.Secret?proj.Secret:""
+                                    pwd: proj.Secret ? proj.Secret : ""
                                 })
                             )
                         }
                     } else {
                         state.userInfo = null
-                       
+
                     }
                     resolve(resp)
                 })
@@ -120,7 +120,11 @@ export default {
         },
         setBreadcrumb: {
             root: true,
-            handler({ state }, val) {
+            handler({ state, commit }, val) {
+                let label = val[0].label;
+                if (label === "消息中心") {
+                    commit("setSidebarSelected", "message"); // 当进入消息中心页面的时候不选中导航栏
+                }
                 state.breadcrumb = []
                 state.breadcrumb = val
                 storage.set(KEY_PAGE_BRANDCRUMB, val)

+ 58 - 15
src/router/system.js

@@ -1,4 +1,5 @@
 import LayoutMain from '@/framework/layout/Main'
+import MsgAllDetails from "@/framework/components/messagesever/msgAllDetails"
 
 import Login from '@/framework/layout/Login'
 import Dasboard from '@/views/dasboard'
@@ -36,6 +37,9 @@ import spaceRela from '@/views/point/dynamicdata/addRelation/spaceRela'
 
 /** 扫楼作业 */
 import buildTask from '@/views/data_admin/buildTask'
+import addDeviceTask from '@/views/data_admin/buildTask/addTask/addDeviceTask'
+import addAssetsTask from '@/views/data_admin/buildTask/addTask/addAssetsTask'
+import addModelTask from '@/views/data_admin/buildTask/addTask/addModelTask'
 import buildAssets from '@/views/data_admin/buildAssets'
 import buildLog from '@/views/data_admin/buildLog'
 import buildData from '@/views/data_admin/buildData'
@@ -44,6 +48,7 @@ import buildGraphy from '@/views/data_admin/buildGraphy'
 /**  台账管理 */
 import systemLedger from '@/views/ledger/system'
 import systemadd from '@/views/ledger/system/addsystem'
+import systemDetail from '@/views/ledger/system/systemDetail'
 import facilityLedger from '@/views/ledger/facility'
 import partsLedger from '@/views/ledger/facility/parts'
 import partsmanageLedger from '@/views/ledger/facility/partsmanage'
@@ -51,8 +56,8 @@ import partsadd from '@/views/ledger/facility/partsmanage/addparts'
 import deviceadd from '@/views/ledger/facility/addfacility'
 import propertyadd from '@/views/ledger/property/addproperty'
 import propertyLedger from '@/views/ledger/property'
-import spacelist from '@/views/ledger/spacelist'//业务空间台账
-import addPropertys from '@/views/ledger/property/addpropertys'//根据未关联资产的设备或部件批量创建设备
+import spacelist from '@/views/ledger/spacelist' //业务空间台账
+import addPropertys from '@/views/ledger/property/addpropertys' //根据未关联资产的设备或部件批量创建设备
 import batchlinkAssets from '@/views/ledger/facility/batchlink' //批量关联资产
 import cenotelist from '@/views/ledger/cenotelist' //竖井清单
 import cenoteadd from '@/views/ledger/cenotelist/cenoteadd' //添加竖井
@@ -63,6 +68,7 @@ import dataReport from '@/views/ledger/report'
 import auth from '@/views/system/auth'
 import noUser from '@/views/system/nouser'
 import spaceDetail from '@/views/ledger/spacelist/spaceDetail'
+import relatedSpace from '@/views/ledger/cenotelist/relatedSpace'
 
 /**  关系维护并计算 */
 import maintain from '@/views/relation/maintain'
@@ -76,15 +82,23 @@ import dataUtil from '@/views/business_space/dataUtil'
 
 /**市场及商务 */
 const OwnerManage = () =>
-    import('@/views/market/owner/manage')
+    import ('@/views/market/owner/manage')
 
 export default [
-    { path: '/', name: '', component: LayoutMain, children: [{ path: '', name: 'blank', component: Dasboard }] },
+    { 
+        path: '/', 
+        name: '', 
+        component: LayoutMain, 
+        children: [
+            { path: '', name: 'blank', component: Dasboard },
+            { path: 'allDetails', name: "allDetails", component: MsgAllDetails, meta: { keepAlive: false, breadcrumbs: [{ label: '消息中心' }] } }
+        ] 
+    },
     //{ path: '/login', name: 'Login', component: Login },
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
     // 业务空间数据导入工具
-    { path: '/dataUtil', name: 'dataUtil', component: LayoutMain,children:[{path:'index',component: dataUtil}] },
+    { path: '/dataUtil', name: 'dataUtil', component: LayoutMain, children: [{ path: 'index', component: dataUtil }] },
     // 平台管理
     {
         path: '/platform',
@@ -106,7 +120,7 @@ export default [
             // { path: 'buildfloor', name: 'buildFloor', component: Dasboard, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] } },
             { path: 'collectsetting', name: 'collectsetting', component: collectsetting, meta: { keepAlive: false, breadcrumbs: [{ label: '需采集的信息点' }] } },
             { path: 'appuser', name: 'buildUser', component: buildUser, meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼App用户管理' }] } },
-            { path: 'repetitionGraphy', name: 'repetitionGraphy', component: repetitionGraphy, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理', path: '/ready/buildfloor' }, { label:'平面图维护' }] }}
+            { path: 'repetitionGraphy', name: 'repetitionGraphy', component: repetitionGraphy, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理', path: '/ready/buildfloor' }, { label: '平面图维护' }] } }
         ]
     },
     //模型管理
@@ -119,8 +133,8 @@ export default [
             {
                 path: 'file',
                 name: 'modelFile',
-                component: Dasboard,
-                // component: modelFile,
+                // component: Dasboard,
+                component: modelFile,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '模型管理', path: '/model/file' }, { label: '模型文件管理' }] }
             },
             {
@@ -196,36 +210,54 @@ export default [
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
-            { path: '', name: 'buildData', component: buildData },
+            { path: '', name: 'buildTask', component: buildTask },
             {
                 path: 'task',
                 name: 'buildTask',
                 component: buildTask,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场任务管理' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场任务管理' }] }
+            },
+            {
+                path: 'addDeviceTask',
+                name: 'addDeviceTask',
+                component: addDeviceTask,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场任务管理', path: '/floor/task' }, { label: '现场验证设备台账' }] }
+            },
+            {
+                path: 'addAssetsTask',
+                name: 'addAssetsTask',
+                component: addAssetsTask,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场任务管理', path: '/floor/task' }, { label: '现场验证资产台账' }] }
+            },
+            {
+                path: 'addModelTask',
+                name: 'addModelTask',
+                component: addModelTask,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场任务管理', path: '/floor/task' }, { label: '现场验证模型' }] }
             },
             {
                 path: 'data',
                 name: 'buildData',
                 component: buildData,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场数据整理', path: '/floor/data' }, { label: '信息点整理' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场数据整理', path: '/floor/data' }, { label: '信息点整理' }] }
             },
             {
                 path: 'plan',
                 name: 'buildGraphy',
                 component: buildGraphy,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '现场数据整理', path: '/floor/data' }, { label: '位置标签整理' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '现场数据整理', path: '/floor/data' }, { label: '位置标签整理' }] }
             },
             {
                 path: 'abnormalprop',
                 name: 'buildAssets',
                 component: buildAssets,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '扫楼报告' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '扫楼报告' }] }
             },
             {
                 path: 'log',
                 name: 'buildLog',
                 component: buildLog,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor/task' }, { label: '扫楼日志查看' }] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼作业', path: '/floor' }, { label: '扫楼日志查看' }] }
             }
         ]
     },
@@ -297,6 +329,12 @@ export default [
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账' }] }
             },
             {
+                path: 'systemDetail',
+                name: 'systemDetail',
+                component: systemDetail,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账', path: '/ledger/facility' }, { label: '系统详情' }] }
+            },
+            {
                 path: 'systemadd',
                 name: 'systemadd',
                 component: systemadd,
@@ -312,7 +350,7 @@ export default [
                 path: 'spaceDetail',
                 name: 'spaceDetail',
                 component: spaceDetail,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账',path: '/ledger/spacelist' }, {label:'业务空间详情'}] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账', path: '/ledger/spacelist' }, { label: '业务空间详情' }] }
             },
             {
                 path: 'cenotelist',
@@ -331,6 +369,11 @@ export default [
                 name: 'cenoteDetail',
                 component: cenoteDetail,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关系详情' }] }
+            }, {
+                path: 'relatedSpace',
+                name: 'relatedSpace',
+                component: relatedSpace,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关联的元空间' }] }
             },
             {
                 path: 'rentlist',

+ 25 - 1
src/utils/handsontable/mainText.js

@@ -95,7 +95,31 @@ const text = {
         td.style.cursor = "pointer";
         td.innerHTML = "查看二维码"
         return td
-    }
+    },
+
+    //系统所属建筑楼层
+    sysInBuildFloor: (instance, td, row, col, prop, value, cellProperties) => {
+        td.style.color = "#409EFF";
+        td.style.cursor = "pointer";
+        if (value instanceof Array && value.length > 0) {
+            let text = ""
+            for (let i = 0; i < value.length; i++) {
+                if(value[i].BuildID && value[i].FloorID){
+                    text += `${value[i].BuildLocalName || value[i].BuildName}-${value[i].FloorLocalName || value[i].FloorName }、`
+                } else {
+                    text += `${value[i].BuildLocalName || value[i].BuildName}、`
+                }
+            }
+            text = text.substring(0,text.length-1);
+            if(text.length>15){
+                text = text.substring(0,15)+ "...";
+            }
+            td.innerHTML = text;
+        } else {
+            td.innerHTML = "无所属建筑楼层"
+        }
+        return td;
+    },
 }
 
 export default text

+ 26 - 0
src/utils/scan/directive.js

@@ -62,4 +62,30 @@ Vue.directive('load', function(el, binding) {
         // }
         el.src = imgDom.src
     }
+})
+//点击空白处隐藏div指令
+Vue.directive('clickOutside', {
+    // 初始化指令
+    bind(el, binding, vnode) {
+        function documentHandler(e) {
+            // 这里判断点击的元素是否是本身,是本身,则返回
+            if (el.contains(e.target)) {
+                return false;
+            }
+            // 判断指令中是否绑定了函数
+            if (binding.expression) {
+                // 如果绑定了函数 则调用那个函数,此处binding.value就是handleClose方法
+                binding.value(e);
+            }
+        }
+        // 给当前元素绑定个私有变量,方便在unbind中可以解除事件监听
+        el.__vueClickOutside__ = documentHandler;
+        document.addEventListener('click', documentHandler);
+    },
+    update() {},
+    unbind(el, binding) {
+        // 解除事件监听
+        document.removeEventListener('click', el.__vueClickOutside__);
+        delete el.__vueClickOutside__;
+    },
 })

+ 27 - 0
src/utils/tools.js

@@ -34,4 +34,31 @@ tools.deepCopy = (obj) => {
     return temp
 }
 
+//判断watch监听的值是否相同
+tools.isSimilarly = (newValue, oldValue) => {
+    if(typeof newValue === typeof oldValue){
+        if(newValue === oldValue){
+            return true
+        } else {
+            let flag = false
+            try {
+                Object.keys(newValue).forEach((item, index, arr) => {
+                    if(oldValue.hasOwnProperty(item) && newValue[item] === oldValue[item]){
+                        if(index == arr.length-1){
+                            flag = true
+                        }
+                    } else {
+                        throw new Error()
+                    }
+                })
+            } catch (error) {
+                return false
+            }
+            return flag
+        }
+    } else {
+        return false
+    }
+}
+
 export default tools

+ 241 - 0
src/views/data_admin/buildTask/addTask/addAssetsTask.vue

@@ -0,0 +1,241 @@
+<template>
+  <div class="box">
+    <div class="condition">
+      <div class="header">
+        <!-- <i style="float:left;font-size:30px;padding-right:10px;cursor:pointer;" title="返回" @click="goBack" class="el-icon-back"></i> -->
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <floor-cascader ref="floorCascader" @change="changeFloor"></floor-cascader>
+        <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
+        <el-input placeholder="请输入安装位置" style="width: 200px;margin-left:20px;" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" style="cursor:pointer;" @click="getTableData"></i>
+        </el-input>
+        <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">创建已选</el-button>
+      </div>
+      <div class="main" :style="tableData && tableData.length?'height: calc(100% - 96px);':'height: calc(100% - 46px);'">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" @selection-change="handleSelectionChange" :header-cell-style="headerStyle">
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column label="所属建筑楼层" width="200">
+            <template slot-scope="scope">
+              <div>
+                {{scope.row.Building?scope.row.Building.BuildLocalName?scope.row.Building.BuildLocalName:'':''}} -
+                {{scope.row.Floor?scope.row.Floor.FloorLocalName?scope.row.Floor.FloorLocalName:'':''}}
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="EquipLocalName" label="资产本地名称" show-overflow-tooltip></el-table-column>
+          <el-table-column prop="EquipLocalID" label="资产本地编码" show-overflow-tooltip width="200"></el-table-column>
+          <el-table-column prop="FamilyName.Name" label="设备族"></el-table-column>
+          <el-table-column prop="LedgerParam.Siteinstall.InstallLocation" label="安装位置"></el-table-column>
+          <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            数据暂无
+          </div>
+        </template>
+        </el-table>
+      </div>
+      <div class=footer>
+        <el-pagination
+          class="right"
+          v-show="tableData && tableData.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.pageNumber"
+          :page-sizes="page.pageSizes"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+//组件
+import floorCascader from "@/components/ledger/lib/floorCascader"
+import myCascader from "@/components/ledger/lib/assets"
+//api
+import { queryProperty } from "@/api/scan/request"
+import { createAssetsTask } from "@/api/data_admin/buildTaskApi"
+export default {
+  data() {
+    return {
+      params: {},
+      loading: false,
+      keycode: '',
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      tableData: [],
+      multipleSelection:[],
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "userId", "secret"])
+  },
+  components: {
+    floorCascader,
+    myCascader
+  },
+  created() {
+    this.params = this.$route.query
+  },
+  mounted() {
+    this.getTableData()
+  },
+  watch: {
+    projectId() {
+      this.page.pageNumber = 1
+      this.multipleSelection = []
+      this.getTableData()
+    }
+  },
+  methods: {
+    //返回
+    goBack() {
+      this.$router.push({ name: "buildTask" })
+    },
+    //选择设备族
+    changeDevice(val) {
+      if(val.code) {
+        this.params.category = val.code
+      } else {
+        this.params.category = ''
+      }
+      this.page.pageNumber = 1
+      this.getTableData()
+    },
+    //选择建筑楼层
+    changeFloor(value) {
+      if (value[0]) {
+        this.params.buildId = value[0]
+      }
+      if (value[1]) {
+        this.params.floorId = value[1]
+      } else {
+        this.params.floorId = ''
+      }
+      this.page.pageNumber = 1
+      this.getTableData()
+    },
+    //获取表格数据
+    getTableData() {
+      this.loading = true
+      let param = this.formatFilter()
+      queryProperty(param, res => {
+        this.tableData = res.Content
+        this.page.total = res.Total
+        this.loading = false
+      })
+    },
+    //格式化条件
+    formatFilter() {
+      let params = {
+        Cascade: [
+          {
+            Name: "familyName"
+          },
+          {
+            Name: "building",
+            Projection: [ "BuildLocalName", "BuildName", "BuildID" ]
+          },
+          {
+            Name: "floor",
+            Projection: [ "FloorLocalName", "FloorName", "FloorID" ]
+          }
+        ],
+        Filters: `ProjectId='${this.projectId}'`,
+        Orders: "CreateTime desc, EquipID asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+
+      if(this.params.isVerification){
+        params.Filters += `;TaskState isNull`
+      }
+
+      if(this.keycode){
+        params.Filters += `;LedgerParam.Siteinstall.InstallLocation contain '${this.keycode}'`
+      }
+
+      if(this.params.category){
+        params.Filters += `;Family='${this.params.category}'`
+      }
+
+      if (this.params.buildId == "noKnow") {
+        params.Filters += `;BuildingId isNull`
+      } else if (this.params.buildId && this.params.buildId != "all") {
+        params.Filters += `;BuildingId='${this.params.buildId}'`
+      }
+
+      if (this.params.floorId == "noKnow") {
+        params.Filters += `;FloorId isNull`
+      } else if (this.params.floorId && this.params.floorId != "all") {
+        params.Filters += `;FloorId='${this.params.floorId}'`
+      }
+
+      return params
+    },
+    //选择的设备或部件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //切换每页显示多少条数据
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.getTableData()
+    },
+    //切换页数
+    handleCurrentChange(val) {
+      this.page.pageNumber = 1
+      this.page.pageNumber = val
+      this.getTableData()
+    },
+    //创建已选
+    handleClickCreate() {
+      let list = this.multipleSelection.map((item) => {
+        return {EquipId: item.EquipID}
+      })
+      let param = {
+        Content: list
+      }
+      createAssetsTask(param, res => {
+        this.$message.success("创建成功!")
+        this.$router.push({ name: "buildTask",query:{ newTaskTypes:this.$route.query.newTaskTypes } })
+      })
+    }
+  }
+};
+</script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    margin-bottom: 10px;
+    .header{
+      padding-bottom: 10px;
+      border-bottom: 1px solid #bcbcbc;
+    }
+    .main{
+      margin-top: 10px;
+    }
+  }
+}
+</style>
+

+ 301 - 0
src/views/data_admin/buildTask/addTask/addDeviceTask.vue

@@ -0,0 +1,301 @@
+<template>
+  <div class="box">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <floor-cascader ref="floorCascader" @change="changeFloor"></floor-cascader>
+        <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
+        <el-input placeholder="请输入安装位置" style="width: 200px;margin-left:20px;" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" style="cursor:pointer;" @click="getTableData"></i>
+        </el-input>
+        <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">创建已选</el-button>
+      </div>
+      <div class="main" :style="tableData && tableData.length?'height: calc(100% - 96px);':'height: calc(100% - 46px);'">
+        <el-table ref="multipleTable" :data="tableData" v-loading='loading' stripe height="100%" @selection-change="handleSelectionChange" :header-cell-style="headerStyle">
+          <el-table-column type="selection" width="55"></el-table-column>
+          <el-table-column type="expand">
+            <template slot-scope="props">
+              <p v-if="props.row.ComponentCount && props.row.ComponentCount.length" style="color:#99a9bf;line-height:32px;font-size:14px;">包含的部件:</p>
+              <el-form label-position="left" label-width="auto" inline class="demo-table-expand" v-if="props.row.ComponentCount && props.row.ComponentCount.length">
+                <el-form-item v-for="item in props.row.ComponentCount?props.row.ComponentCount:[]" :key="item.code" :label="`${item.name}:`">
+                  <span>{{ item.count }}</span>
+                </el-form-item>
+              </el-form>
+            </template>
+          </el-table-column>
+          <el-table-column label="所属建筑楼层" width="200"></el-table-column>
+          <el-table-column prop="EquipLocalName" label="设备本地名称" show-overflow-tooltip>
+             <template slot-scope="scope">
+              <div>
+                {{scope.row.EquipLocalName}}
+                <el-badge v-if="scope.row.Component&&scope.row.Component.length?true:false" 
+                  :value="scope.row.Component&&scope.row.Component.length?scope.row.Component.length:0" class="item" type="warning">
+                </el-badge>
+              </div>
+            </template>
+          </el-table-column>
+          <el-table-column prop="EquipLocalID" label="设备本地编码" show-overflow-tooltip width="200"></el-table-column>
+          <el-table-column prop="EquipCategory.EquipName" label="设备类"></el-table-column>
+          <el-table-column prop="LedgerParam.Siteinstall.InstallLocation" label="安装位置"></el-table-column>
+          <el-table-column prop="type" label="现场验证操作规定" width="200">
+            <template slot-scope="scope">
+              <el-select style="width:100px;" v-model="scope.row.SchemeId" placeholder="请选择">
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <template slot="empty">
+            <div style="height: 60%;transform: translateY(50%);">
+              <i class="icon-wushuju iconfont"></i>
+              数据暂无
+            </div>
+          </template>
+        </el-table>
+      </div>
+      <div class=footer>
+        <el-pagination
+          class="right"
+          v-show="tableData && tableData.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.pageNumber"
+          :page-sizes="page.pageSizes"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+//组件
+import floorCascader from "@/components/ledger/lib/floorCascader"
+import myCascader from "@/components/ledger/lib/cascader"
+//api
+import { queryEquip } from "@/api/scan/request"
+import { createDeviceTask } from "@/api/data_admin/buildTaskApi"
+export default {
+  data() {
+    return {
+      params: {},
+      loading: false,
+      keycode: '',
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      options: [{//方案
+        value: '1',
+        label: '标准'
+      }],
+      tableData: [],
+      multipleSelection:[],
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "userId", "secret"])
+  },
+  components: {
+    floorCascader,
+    myCascader
+  },
+  created() {
+    this.params = this.$route.query
+    console.log(this.params)
+  },
+  mounted() {
+    this.getTableData()
+  },
+  watch: {
+    projectId() {
+      this.page.pageNumber = 1
+      this.multipleSelection = []
+      this.getTableData()
+    }
+  },
+  methods: {
+    //返回
+    goBack() {
+      this.$router.push({ name: "buildTask" })
+    },
+    //选择设备或部件
+    changeDevice(val) {
+      if(val.code) {
+        this.params.category = val.code
+      } else {
+        this.params.category = ''
+      }
+      this.page.pageNumber = 1
+      this.getTableData()
+    },
+    //选择建筑楼层
+    changeFloor(value) {
+      if (value[0]) {
+        this.params.buildId = value[0]
+      }
+      if (value[1]) {
+        this.params.floorId = value[1]
+      } else {
+        this.params.floorId = ''
+      }
+      this.page.pageNumber = 1
+      this.getTableData()
+    },
+    //获取表格数据
+    getTableData() {
+      this.loading = true
+      let param = this.formatFilter()
+      queryEquip(param, res => {
+        this.tableData = res.Content.map(item => {
+          if(item.Component && item.Component.length){
+            item.ComponentCount = []
+            item.Component.map(parts => {
+              if(parts.EquipCategory && parts.EquipCategory.EquipCode && parts.EquipCategory.EquipName){
+                let index = item.ComponentCount.findIndex(c => {return c.code == parts.EquipCategory.EquipCode})
+                if(index != -1){
+                  item.ComponentCount[index].count++
+                } else {
+                  item.ComponentCount.push({
+                    name: parts.EquipCategory.EquipName,
+                    code: parts.EquipCategory.EquipCode,
+                    count: 1
+                  })
+                }
+              }
+            })
+          }
+          item.SchemeId = "1"
+          return item
+        })
+        this.page.total = res.Total
+        this.loading = false
+      })
+    },
+    //格式化条件
+    formatFilter() {
+      let params = {
+        Cascade: [
+          {
+            Name: "equipCategory",
+            Projection: ["EquipCode", "EquipName"]
+          },
+          {
+            Name: "component",
+            Cascade: [{Name: "equipCategory"}]
+          },
+          {
+            Name: "building",
+            Projection: [ "BuildLocalName", "BuildName", "BuildID" ]
+          },
+          {
+            Name: "floor",
+            Projection: [ "FloorLocalName", "FloorName", "FloorID" ]
+          }
+        ],
+        Filters: `ProjectId='${this.projectId}'`,
+        Orders: "CreateTime desc, EquipID asc",
+        PageNumber: this.page.pageNumber,
+        PageSize: this.page.pageSize
+      }
+      
+      if(this.params.isVerification){
+        params.Filters += `;TaskState isNull`
+      }
+
+      if(this.keycode){
+        params.Filters += `;LedgerParam.Siteinstall.InstallLocation contain '${this.keycode}'`
+      }
+
+      if(this.params.category){
+        params.Filters += `;Category='${this.params.category}'`
+      }
+
+      if (this.params.buildId == "noKnow") {
+        params.Filters += `;BuildingId isNull`
+      } else if (this.params.buildId && this.params.buildId != "all") {
+        params.Filters += `;BuildingId='${this.params.buildId}'`
+      }
+
+      if (this.params.floorId == "noKnow") {
+        params.Filters += `;FloorId isNull`
+      } else if (this.params.floorId && this.params.floorId != "all") {
+        params.Filters += `;FloorId='${this.params.floorId}'`
+      }
+      return params
+    },
+    //选择的设备或部件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //切换每页显示多少条数据
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.getTableData()
+    },
+    //切换页数
+    handleCurrentChange(val) {
+      this.page.pageNumber = val
+      this.getTableData()
+    },
+    //创建已选
+    handleClickCreate() {
+      let list = this.multipleSelection.map((item) => {
+        return {EquipId: item.EquipID}
+      })
+      let param = {
+        Content: list
+      }
+      createDeviceTask(param, res => {
+        this.$message.success("创建成功!")
+        this.$router.push({ name: "buildTask",query:{ newTaskTypes:this.$route.query.newTaskTypes } })
+      })
+    }
+  }
+};
+</script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    .header{
+      padding-bottom: 10px;
+      border-bottom: 1px solid #bcbcbc;
+    }
+    .main{
+      margin-top: 10px;
+    }
+  }
+}
+</style>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    margin-left: 120px;
+    width: 100%;
+  }
+</style>

+ 211 - 0
src/views/data_admin/buildTask/addTask/addModelTask.vue

@@ -0,0 +1,211 @@
+<template>
+  <div id="bd-fl-manage">
+    <div class="header-nav">
+      <el-button style="float:left;margin-right:20px;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+      <model-folder ref="modelFolder" @change="handleChangeModelFolder" style="margin-right:10px;"></model-folder>
+      <my-cascader :isWidth="false" ref="cascader" @change="changeDevice"></my-cascader>
+      <el-button style="float:right;margin-top:1px;" @click="handleClickCreate">{{buttonContent}}</el-button>
+      <el-switch v-show="CurrentModelId" style="float:right;margin-top:7px;margin-right:20px;" v-model="isLight" active-text="高亮显示未完成验证的区块"></el-switch>
+    </div>
+    <el-row>
+      <div class="l-list">
+        <h4>模型文件</h4>
+        <div class="model-file-list">
+          <el-scrollbar style="height:100%;">
+            <div v-for="item in modelFileList" :key="item.Id" :class="{'model-file-item':true,'active':item.active}" @click="handleChangeModelFile(item)">
+              <span>{{item.FloorName}}</span>
+            </div>
+          </el-scrollbar>
+        </div>
+      </div>
+      <div class="r-model">
+        <draw-model ref="drawModel" :id="1" :CurrentModelId="CurrentModelId" :isLight="isLight" @changeButtonContent="changeButtonContent"></draw-model>
+      </div>
+    </el-row>
+    <modelTask-dialog :dialogVisible.sync="dialogVisible" :params="params" :newTaskTypes="newTaskTypes"></modelTask-dialog>
+  </div>
+</template>
+
+<script>
+import modelFolder from "@/components/ready/buildfloor/modelFolder"
+import myCascader from "@/components/ledger/lib/cascader"
+import drawModel from "@/components/data_admin/buildTask/draw/drawModel"
+import modelTaskDialog from "@/components/data_admin/buildTask/dialog/modelTaskDialog"
+import { mapGetters, mapActions } from "vuex";
+import request from "@/api/model/file.js";
+import {} from "@/api/scan/request";
+export default {
+  components: {
+    modelFolder,
+    myCascader,
+    drawModel,
+    modelTaskDialog
+  },
+  data() {
+    return {
+      isLight: false,//是否高亮未完成验证区块
+      query: {},//query信息
+      dialogVisible: false,//是否显示弹窗
+      modelFolderName: '',//模型文件夹名字
+      modelFolderId: '',//模型文件夹的id
+      modelFileName: '',//模型文件名字
+      modelFileList: [],
+      CurrentModelId: '',//模型文件id
+      device: '',//设备类别
+      spaceList: [],//选中的空间
+      newTaskTypes: [],
+      buttonContent: "通过模型创建",// 按钮文案
+    };
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"]),
+    params(){
+      return {
+        device: this.device,
+        CurrentModelId: this.CurrentModelId,
+        modelFolderName: this.modelFolderName,
+        modelFileName: this.modelFileName,
+        spaceList: this.spaceList,
+        isVerification: this.query.isVerification
+      }
+    }
+  },
+  created() { 
+    this.query = this.$route.query
+  },
+  methods: {
+    goBack(){//返回
+      this.$router.push({name:'buildTask'})
+    },
+    handleChangeModelFolder(item){//切换模型文件夹
+      let val = item.value
+      if(val){
+        this.modelFolderName = item.label
+        let data = {
+          FolderId: val,
+          ProjectId: this.projectId
+        };
+        request.queryFloorList(data, res => {
+          this.modelFileList = res.Content.map(item => {
+            item.active = false
+            return item
+          })
+          if (this.modelFileList.length) {
+            this.handleChangeModelFile(this.modelFileList[0]);
+          }
+        })
+      } else {
+        this.resetSelected()
+      }
+    },
+    resetSelected(){
+      this.modelFileList = []
+      this.CurrentModelId = ''
+      this.modelFolderName = ''
+      this.modelFolderId = ''
+      this.modelFileName = ''
+      this.spaceList = []
+      this.dialogVisible = false
+      this.$refs.drawModel.clearGraphy()
+    },
+    handleChangeModelFile(file){//切换模型文件
+      this.modelFileList.map(item => {
+        file.Id == item.Id?item.active = true:item.active = false
+        return item
+      })
+      this.CurrentModelId = file.CurrentModelId
+      this.modelFolderId = file.FolderId
+      this.modelFileName = file.FloorName
+      this.newTaskTypes = this.$route.query.newTaskTypes
+    },
+    changeDevice(val){//切换设备类别
+      this.device = val.code
+    },
+    handleClickCreate(){//创建已选
+      if(!this.CurrentModelId){
+        this.$message('请选择模型文件!')
+        return false
+      }
+      this.spaceList = this.$refs.drawModel.getSelectedSpaces().map(item => {
+        return item.data.SourceId
+      })
+      this.dialogVisible = true
+    },
+    changeButtonContent(val){// 通过判断是否选中模型空间调整文案
+      this.buttonContent = val;
+    }
+  },
+  watch: {
+    projectId() {
+      this.resetSelected()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#bd-fl-manage {
+  overflow: hidden;
+  height: 100%;
+  position: relative;
+  .header-nav{
+    height: 32px;
+    padding-bottom: 10px;
+  }
+  .el-row {
+    height: calc(100% - 50px);
+    & > div {
+      float: left;
+      height: 100%;
+      overflow: hidden;
+      background-color: #fff;
+      box-sizing: border-box;
+      border: 1px solid #dfe6ec;
+      .action-box {
+        padding: 10px;
+        .el-button--small {
+          padding: 10px 11px;
+        }
+      }
+    }
+    .l-list {
+      width: 250px;
+      height: 100%;
+      border-right: 0;
+      h4 {
+        padding-left: 10px;
+        border-top: 1px solid #d9d9d9;
+        border-bottom: 1px solid #dfe6ec;
+        background: #d9d9d9;
+        color: #333;
+        line-height: 44px;
+      }
+      .model-file-list {
+        height: calc(100% - 46px);
+        line-height: 48px;
+        /deep/.el-scrollbar__wrap {
+          overflow-x: hidden;
+        }
+        .model-file-item {
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          cursor: pointer;
+          span {
+            margin-left: 10px;
+          }
+        }
+        .model-file-item.active,
+        .model-file-item:hover {
+          background-color: #f5f7fa;
+          color: #000;
+        }
+      }
+    }
+    .r-model {
+      width: calc(100% - 250px);
+      box-sizing: border-box;
+      padding: 10px;
+    }
+  }
+}
+</style>

+ 152 - 30
src/views/data_admin/buildTask/index.vue

@@ -1,36 +1,158 @@
 <template>
-    <div>
-      <das-board>
-        <template v-slot:plan>
-          <span>{{plan?plan:"yyyy-mm-dd"}}</span>
-        </template>
-        <template v-slot:finish>
-          <span>{{finish?finish:"yyyy-mm-dd"}}</span>
-        </template>
-        <template v-slot:onLine>
-          <span>{{onLine?onLine:"yyyy-mm-dd"}}</span>
-        </template>
-        <template v-slot:explain>
-          <span>{{explain?explain:"yyyy-mm-dd"}}</span>
-        </template>
-      </das-board>
-    </div>
+	<div>
+		<task-statistics></task-statistics>
+		<div class="hanson-bar">
+			<el-cascader v-model="taskTypes" :options="taskTypeList" filterable @change="handleChangeTask"></el-cascader>
+			<el-divider direction="vertical"></el-divider>
+			<div class="condition-list">
+				<floor-cascader  v-show="taskType == 'device' || taskType == 'assets'" :isWidth="false" @change="changeFloor"></floor-cascader>
+				<task-state v-show="taskType == 'model' || taskType == 'device' || taskType == 'assets'" ref="taskState" @change="changeState"></task-state>
+				<model-file  v-show="taskType == 'model'" ref="modelFile" @change="handleChangeModel"></model-file>
+				<model-cascader  v-show="taskType == 'model'" :isWidth="false" ref="modelCascader" @change="changeModelCascader"></model-cascader>
+				<device-cascader  v-show="taskType == 'device'" :isWidth="false" ref="deviceCascader" @change="changeDeviceCascader"></device-cascader>
+				<assets-cascader  v-show="taskType == 'assets'" :isWidth="false" ref="assets" @change="changeAssetsCascader"></assets-cascader>
+			</div>
+			<el-button class="add-task" @click="addTaskDialog = true">添加验证任务</el-button>
+		</div>
+		<div class="tabel-box">
+			<model-table :paramsData="{taskState, modelFile, modelCategory}" v-if="taskType == 'model'"></model-table>
+			<device-table :paramsData="{buildfloor, taskState, deviceCategory}" v-else-if="taskType == 'device'"></device-table>
+			<assets-table :paramsData="{buildfloor, taskState, family}" v-else-if="taskType == 'assets'"></assets-table>
+			<tear-table v-else-if="taskType == 'tear'"></tear-table>
+			<replace-table v-else-if="taskType == 'replace'"></replace-table>
+		</div>
+		<add-task :addTaskDialog.sync="addTaskDialog" :newTaskTypes="newTaskTypes"></add-task>
+	</div>
 </template>
 
 <script>
-import dasBoard from "@/views/dasboard/index";
+import { mapGetters } from "vuex"
+import taskStatistics from '@/components/data_admin/buildTask/taskStatistics'
+import floorCascader from "@/components/ledger/lib/floorCascader"
+
+import taskState from "@/components/data_admin/buildTask/lib/taskState"
+import modelFile from "@/components/data_admin/buildTask/lib/modelFile"
+import modelCascader from "@/components/data_admin/buildTask/lib/modelCascader"
+import deviceCascader from "@/components/data_admin/buildTask/lib/deviceCascader"
+import assetsCascader from "@/components/data_admin/buildTask/lib/assetsCascader"
+
+import modelTable from "@/components/data_admin/buildTask/table/modelTable"
+import deviceTable from "@/components/data_admin/buildTask/table/deviceTable"
+import assetsTable from "@/components/data_admin/buildTask/table/assetsTable"
+import tearTable from "@/components/data_admin/buildTask/table/tearTable"
+import replaceTable from "@/components/data_admin/buildTask/table/replaceTable"
+import addTask from "@/components/data_admin/buildTask/dialog/addTaskDialog"
 export default {
-    components: {
-      dasBoard
-    },
-    data() {
-        return {
-          plan: "2019-08-21",
-          finish: "2019-09-06",
-          onLine: "2019-09-30",
-          explain: "现场任务的创建和修改;v1.2:任务完成情况的查看"
-        }
-    },
-    mounted() {}
+  components: {
+		taskState,
+		modelCascader,
+		taskStatistics,
+		floorCascader,
+		modelFile,
+		deviceCascader,
+		assetsCascader,
+		modelTable,
+		deviceTable,
+		assetsTable,
+		tearTable,
+		replaceTable,
+		addTask
+	},
+	computed: {
+		...mapGetters("layout", [  "projectId",  "secret", "userId" ]),
+		taskType(){
+			return this.taskTypes.slice(-1)[0]
+		}
+	},
+  data() {
+    return {
+			taskTypeList: [
+				{ value: "verification", label: '现场验证任务', children:[
+					{value: "model", label: '现场验证模型'},
+					{value: "device", label: '现场验证设备台账'},
+					{value: "assets", label: '现场验证资产台账'}
+				]}, 
+				{ value: "tear", label: '现场撕码任务' }, 
+				{ value: "replace", label: '现场换码任务' }
+			],
+			taskStateList: [{
+				value: '',
+				label: '全部'
+			}, {
+				value: 1,
+				label: '待验证'
+			}, {
+				value: 0,
+				label: '已完成'
+			}, {
+				value: -1,
+				label: '未找到'
+			}],
+			taskState: '',//任务执行情况
+			modelFile: '',//模型文件
+			modelCategory: '',//模型-设备类型
+			deviceCategory: '',//设备-设备类型
+			family: '',//设备族
+			buildfloor: ['all'],//建筑楼层
+			taskTypes: [],
+			addTaskDialog: false, //是否显示添加任务弹窗
+			newTaskTypes:''
+    }
+	},
+	created(){
+		this.$route.query.newTaskTypes?this.newTaskTypes = this.$route.query.newTaskTypes:this.newTaskTypes = ['verification','model']
+		this.taskTypes = this.newTaskTypes
+	},
+  methods: {
+		handleChangeTask(val){//切换任务类型
+			this.newTaskTypes = val
+		},
+		handleChangeModel(val) {//修改模型文件
+			if(val[1]){
+				this.modelFile = val[1]
+			} else {
+        this.modelFile = ''
+      }
+		},
+		changeState(val) {//修改任务执行情况
+			this.taskState = val
+		},
+		changeFloor(val){//修改建筑楼层
+			this.buildfloor = val
+		},
+		changeModelCascader(val){//修改模型-设备类型
+			this.modelCategory = val.Code
+		},
+		changeDeviceCascader(val){//修改设备-设备类型
+			this.deviceCategory = val.Code
+		},
+		changeAssetsCascader(val){//修改设备族
+			this.family = val.Code
+		}
+  }
 }
-</script>
+</script>
+<style lang="scss" scoped>
+	.hanson-bar {
+    height: 40px;
+    padding: 5px 0;
+    font-size: 14px;
+    overflow: hidden;
+    margin-top: 0;
+    line-height: 40px;
+		position: relative;
+		.condition-list{
+			display: inline-block;
+			vertical-align: middle;
+			line-height: 32px;
+		}
+		.add-task{
+			position: absolute;
+			right: 0;
+			top: 9px;
+		}
+	}
+	.tabel-box{
+		height: calc(100% - 170px);
+	}
+</style>

+ 4 - 27
src/views/ledger/cenotelist/index.vue

@@ -25,24 +25,6 @@
       <div class="tableLeft" v-show="tableData && tableData.length">
         <handson-table ref="table"></handson-table>
       </div>
-      <div class="tableRight">
-        <div v-show="isTableRightShow">
-          <div class="table_right_box"><span class="iconfont close_right" @click="handleCloseRight">&#xe66b;</span></div>
-          <h5>管理需要关联的元空间</h5>
-          <p style="margin-bottom: 10px;">以下为关联的元空间id</p>
-          <el-input
-            type="textarea"
-            :autosize="{ minRows: 6, maxRows: 10}"
-            :disabled="onlyRead"
-            placeholder="请输入元空间id,以“,”分割"
-            v-model="spaceList">
-          </el-input>
-          <el-row class="right" v-show="!onlyRead">
-            <el-button @click="handleCloseRight">取消</el-button>
-            <el-button @click="saveSpaceList" type="primary">保存</el-button>
-          </el-row>
-        </div>
-      </div>
     </div>
     <el-pagination
       class="right"
@@ -75,7 +57,6 @@ import tools from "@/utils/scan/tools"
 import handsonUtils from "@/utils/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import text from "@/utils/handsontable/mainText"
-
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import handsonTable from "@/components/common/handsontable";
 import { getDataDictionary, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
@@ -89,7 +70,6 @@ export default {
     return {
       cenoteId: "",//竖井类型id
       shaftId: "",//要操作的竖井id
-      isTableRightShow: false,
       spaceList: "",
       options: [{
         value: true,
@@ -297,11 +277,6 @@ export default {
       this.cenoteId = value.Id
       this.getTableHeader()
     },
-    //关闭右侧关联元空间输入按钮
-    handleCloseRight() {
-      this.isTableRightShow = false
-      this.spaceList = ""
-    },
     //切换每页显示多少条数据
     handleSizeChange(val) {
       this.page.pageSize = val
@@ -372,8 +347,10 @@ export default {
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceCount") {
-        this.spaceList = infos.SpaceList
-        this.isTableRightShow = true
+        this.$router.push({
+          path:'/ledger/relatedSpace',
+          query:{ShaftId: this.shaftId,name:name,onlyRead:this.onlyRead}
+        })
         return false
       } else if (val === "OtheRelations") {
         this.$router.push({

+ 260 - 0
src/views/ledger/cenotelist/relatedSpace.vue

@@ -0,0 +1,260 @@
+<template>
+  <div id="relatedSpace">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <span style="float:left;">{{ cenoteObj.name || '' }}</span>
+        <div class="edit-tool" v-if="!cenoteObj.onlyRead">
+          <el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
+          <div v-else>
+            <el-button v-show="!isEdit" @click="isEdit = true" size="small" style="float:right">编辑</el-button>
+            <el-button v-show="isEdit" size="small" style="float:right">保存</el-button>
+            <el-button v-show="isEdit" size="small" @click="isEdit = false" style="float:right">取消</el-button>
+          </div>
+          <addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="cenoteObj" :spaceType="spaceType" :floorType="floorType"></addSpaceDialog>
+        </div>
+        <space-select @change="changeSpace"></space-select>
+      </div>
+      <div class="saga-build-tab">
+        <el-radio-group v-model="isMyTab" @change="changeRadio" style="width: 136px;">
+          <el-radio-button label="1">平面图</el-radio-button>
+          <el-radio-button label="2" class="space-own-radio" style="width: 68px;">列表</el-radio-button>
+        </el-radio-group>
+      </div>
+      <div v-show="isMyTab == 1" class="data-item">
+        <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding">
+          <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
+        </el-select>
+        <div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;position:relative;">
+          <el-scrollbar style="height:100%;width:149px;border-right:1px solid;margin:0px;">
+          <div class="floor" style="width:149px;height:100%;">
+            <span class="floor-item">楼 层</span>
+            <div v-if="building">
+            <span class="floor-item" @click="changeFloor(item.FloorID)" :class="{floorItemChoose:(item.FloorID == floor)}" v-for="item in buildingObj.Floor" :key="item.FloorID">{{ item.FloorLocalName }}</span>
+            </div>
+          </div>
+          </el-scrollbar>
+        </div>
+      </div>
+      <div v-show="isMyTab == 2" class="data-item">
+        <related-spaceList :space="space" ref="spacelist"></related-spaceList>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import relatedSpaceList from "@/views/ledger/cenotelist/relatedSpaceList";
+import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
+import { queryDictionaryHead, buildingQuery } from '@/api/scan/request'
+export default {
+  data() {
+    return {
+      isMyTab: 1,//默认平面图
+      isEdit: false,//是否正在编辑
+      building: '',//当前建筑id
+      buildingObj:{},//当前建筑obj
+      buildingList: [],
+      space: '',//当前业务空间
+      floor: '',//当前楼层
+      dialogVisible: false,//添加空间弹窗
+      spaceType: {},//空间种类
+      floorType: {},//子组件楼层信息
+    }
+  },
+  computed: {
+    cenoteObj() {
+      return this.$route.query;
+    }
+  },
+  props: {
+
+  },
+  components: {
+    spaceSelect,
+    relatedSpaceList,
+    addSpaceDialog
+  },
+  created() {
+    this.load();
+    let pa = {
+      Filters: `parentId='Space'`
+    }
+    queryDictionaryHead(pa, res => {
+      res.Content.map(t => {
+        if (t.Name != "元空间") {
+          this.spaceType[t.Code] = t.Name;
+        }
+      })
+    });
+
+    let param = {
+      Cascade: [
+        { Name: "floor" }
+      ]
+    };
+    buildingQuery(param, res => {
+      this.buildingList = res.Content;
+      if(this.buildingList.length > 0){
+        this.building = this.buildingList[0].BuildID;
+        this.buildingObj = this.buildingList[0];
+        if(this.buildingObj.Floor.length > 0){
+          this.floor = this.buildingObj.Floor[0].FloorID;
+        }
+      }
+      res.Content.map(item => {
+        if (item.BuildID && item.BuildLocalName) {
+          this.floorType[item.BuildID] = item.BuildLocalName;
+          if (item.Floor instanceof Array) {
+            item.Floor.map(f => {
+              if (f.FloorID && f.FloorLocalName) {
+                this.floorType[f.FloorID] = f.FloorLocalName;
+              }
+            })
+          }
+        }
+      });
+    });
+  },
+  methods: {
+    //更改业务空间类型
+    changeSpace(val) {
+      this.space = val;
+      this.load();
+    },
+    //加载数据
+    load() {
+      if (this.isMyTab == 1) {
+
+      }
+      else {
+        this.$refs.spacelist.getSpaceList();
+      }
+    },
+    //更换建筑
+    changeBuilding(bid){
+      this.buildingList.map(item => {
+        if(item.BuildID == bid){
+          this.buildingObj = item;
+        }
+      })
+      this.load();
+    },
+    //更换楼层
+    changeFloor(fid){
+      this.floor = fid;
+      this.load();
+    },
+    //更换列表或平面图
+    changeRadio(val) {
+      this.isMyTab = val;
+      this.load();
+    },
+    //返回
+    goBack() {
+      this.$router.push({
+        name: 'cenotelist'
+      })
+    },
+    //更新
+    refresh() {
+      this.load();
+    }
+  },
+  watch: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.condition {
+  position: relative;
+  padding: 10px 10px;
+  display: flex;
+  height: calc(100% - 22px);
+  flex-direction: column;
+  border: 1px solid #dfe6ec;
+  background: #fff;
+  .header {
+    padding-bottom: 10px;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
+    span {
+      line-height: 33px;
+      margin-left: 15px;
+    }
+    /deep/ .buildFloor {
+      line-height: 32px;
+    }
+  }
+  .spaceTypes {
+    .types {
+      float: left;
+      width: calc(100% - 200px);
+      /deep/ .el-tabs__item.is-top {
+        border-top: 2px solid transparent;
+        &.is-active {
+          border-top: 2px solid #409eff;
+        }
+      }
+    }
+    .deleBtn {
+      float: left;
+      width: 200px;
+      text-align: right;
+      height: 40px;
+      border-bottom: 1px solid #e4e7ed;
+    }
+  }
+}
+.saga-build-tab {
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  .tab-main {
+    float: left;
+    width: 120px;
+    padding: 0 5px;
+    margin: 5px 0;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    height: 30px;
+    box-sizing: border-box;
+    text-align: center;
+    cursor: pointer;
+    overflow: hidden;
+    i {
+      font-size: 18px;
+      padding-right: 10px;
+      float: left;
+      line-height: 30px;
+      margin-left: 10px;
+    }
+    span {
+      line-height: 30px;
+      float: left;
+    }
+  }
+  .tab-active {
+    background-color: #409eff;
+    color: #fff;
+  }
+}
+.data-item {
+  height: calc(100% - 44px);
+  padding: 10px 0px;
+}
+.floor-item {
+  padding: 10px 10px;
+  display: block;
+  margin: 0px;
+  cursor: pointer;
+}
+.floorItemChoose {
+  background: rgba(0,0,0,0.2);
+}
+/deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+</style>

+ 82 - 0
src/views/ledger/cenotelist/relatedSpaceList.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="relatedSpaceList" style="height:100%;">
+    <div class="query">
+      <el-input v-model="keyword" placeholder="请输入关键词" @keyup.enter.native="getSpaceList" style="width:240px;margin:0 0 0 10px;">
+        <i slot="suffix" class="el-input__icon el-icon-search" @click="getSpaceList"></i>
+      </el-input>
+      <floorCascader @change="changeCascader"></floorCascader>
+    </div>
+    <div class="table-area" style="height:calc(100% - 52px)">
+      <el-scrollbar style="height:calc(100% - 40px);">
+        <el-table :data="tableData" style="width: 100%;height:100%;" v-loading="loading" :header-cell-style="headerStyle">
+          <el-table-column prop='MeterFunc' label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+            <template slot-scope="scope">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-scrollbar>
+      <!-- 分页 -->
+      <el-pagination @size-change="getSpaceList" @current-change="getSpaceList" :current-page="currentPage" :page-sizes="pageSizes"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.length" style="float:right;">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+import floorCascader from "@/components/ledger/lib/floorCascader";
+export default {
+  data() {
+    return {
+      //表格头样式
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      },
+      pageSizes: [10, 20, 50, 100],
+      pageSize: 50,
+      currentPage: 1,
+      keyword: '',//关键词
+      floor: '',//当前楼层
+      options: [],//楼层
+      tableData: [],//表格数据
+      loading: false,//加载
+    }
+  },
+  components:{
+    floorCascader
+  },
+  methods: {
+    getSpaceList() {
+      console.log(111)
+    },
+    changeCascader(val){
+      console.log(val);
+    }
+  },
+  props: {
+    space: '',//空间id
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.query {
+  padding: 10px 0px;
+}
+#relatedSpaceList {
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+}
+</style>

+ 2 - 4
src/views/ledger/spacelist/index.vue

@@ -32,9 +32,6 @@
             </template>
           </el-tabs>
         </div>
-        <div class="groupAdd">
-          <el-button size="small" @click="groupCreateBSpace">批量创建业务空间</el-button>
-        </div>
       </el-row>
       <div v-show="isMyTab == 1" style="width:100%;height:100%">
         <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy"></graphy>
@@ -377,7 +374,8 @@ export default {
   .spaceTypes {
     .types {
       float: left;
-      width: calc(100% - 200px);
+      width: 100%;
+      // width: calc(100% - 200px);
     }
     .groupAdd {
       float: left;

+ 6 - 12
src/views/ledger/system/index.vue

@@ -6,7 +6,7 @@
     <saga-title :mess="mess"></saga-title>
     <div class="table-main">
       <div class="search-header">
-        <floor-cascader :type="'no'" @change="changeFloor"></floor-cascader>
+        <floor-cascader @change="changeFloor"></floor-cascader>
         <my-cascader ref="cascader" @change="changeDevice"></my-cascader>
       </div>
       <hanson-table @close="close" ref="tableMain"></hanson-table>
@@ -20,14 +20,9 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
 import myCascader from "@/components/ledger/lib/system";
 import hansonTable from "@/components/ledger/handsontables/system";
 import tableTransfers from "@/components/ledger/tableTransfers";
-import {
-  mapGetters,
-  mapActions
-} from "vuex";
+import { mapGetters } from "vuex";
 import { countGeneralSys } from "@/api/scan/request"
-import Handsontable from "handsontable-pro"
 import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN';
 
 export default {
   components: {
@@ -64,11 +59,10 @@ export default {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
     this.countGeneralSys()
-
-    let deviceId = this.$route.params.deviceId;
-    if (deviceId) {
+    let SysType = this.$route.params.SysType;
+    if (SysType) {
       this.$nextTick(() => {
-        this.$refs.cascader.changeVal(deviceId)
+        this.$refs.cascader.changeVal(SysType)
       })
     }
   },
@@ -89,7 +83,7 @@ export default {
       this.$refs.cascader.getData()
     },
     //获取系统统计信息
-    countGeneralSys(){
+    countGeneralSys() {
       let param = {}
       countGeneralSys(param, res => {
         this.mess.name[0].num = res.Count

+ 197 - 0
src/views/ledger/system/systemDetail/index.vue

@@ -0,0 +1,197 @@
+<template>
+  <div class="box">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <span>{{params.Name}}</span>
+      </div>
+      <el-row class="spaceTypes">
+        <div class="types">
+          <el-tabs v-model="activeTab" type='card'>
+            <template v-for="(item,index) in tabsList">
+              <el-tab-pane :name="item.Code" :key="index" :label="item.Name"></el-tab-pane>
+            </template>
+          </el-tabs>
+        </div>
+        <div class="deleBtn">
+          <el-button size="small" @click="deleteSystem">删除系统</el-button>
+        </div>
+      </el-row>
+      <div v-if="activeTab=='detail'" style="height:calc(100% - 110px)">
+        <div>开发中...</div>
+      </div>
+      <!-- 系统内设备 -->
+      <deviceTable v-if="activeTab=='Equipment'" :params="params" :type="activeTab"></deviceTable>
+      <!-- 系统所在竖井 -->
+      <cenoteTable v-else-if="activeTab=='cenote'" :params="params" :type="activeTab"></cenoteTable>
+      <!-- 系统所在业务空间 -->
+      <spaceTable v-else-if="activeTab=='space'" :params="params" :type="activeTab" :spaceType="spaceType" :floorType="floorType"></spaceTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+import { queryLinkSys, deleteGeneralSys, queryDictionaryHead, buildingQuery } from '@/api/scan/request'
+import cenoteTable from '@/components/ledger/system/table/cenoteTable'
+import deviceTable from '@/components/ledger/system/table/deviceTable'
+import spaceTable from '@/components/ledger/system/table/spaceTable'
+export default {
+  data() {
+    return {
+      params: {}, //参数-包含系统id 分区类型
+      tabsList: [
+        { Code: 'detail', Name: '系统详情' },
+        { Code: 'Equipment', Name: '系统内设备' },
+        { Code: 'cenote', Name: '系统所在竖井' },
+        { Code: 'space', Name: '系统所在业务空间' },
+      ], //tab页
+      activeTab: 'detail', //当前选中的tab
+      systemDetails: {}, //系统信息,
+      spaceType: {},//空间种类
+      floorType: {}
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "userId", "secret"])
+  },
+  components: {
+    cenoteTable,
+    deviceTable,
+    spaceTable
+  },
+  created() {
+    this.params = this.$route.query;
+    this.getSystemDetails();
+
+    let pa = {
+      Filters: `parentId='Space'`
+    }
+    queryDictionaryHead(pa, res => {
+      res.Content.map(t => {
+        if (t.Name != "元空间") {
+          this.spaceType[t.Code] = t.Name;
+        }
+      })
+    });
+
+    let param = {
+      Cascade: [
+        { Name: "floor" }
+      ]
+    };
+    buildingQuery(param, res => {
+      res.Content.map(item => {
+        if (item.BuildID && item.BuildLocalName) {
+          this.floorType[item.BuildID] = item.BuildLocalName;
+          if (item.Floor instanceof Array) {
+            item.Floor.map(f => {
+              if (f.FloorID && f.FloorLocalName) {
+                this.floorType[f.FloorID] = f.FloorLocalName;
+              }
+            })
+          }
+        }
+      });
+    });
+  },
+  mounted() { },
+  watch: {
+    projectId() { }
+  },
+  methods: {
+    // 返回
+    goBack() {
+      this.$router.push({
+        name: "systemlist",
+        params: this.params
+      })
+    },
+    // 查询系统详情
+    getSystemDetails() {
+      let pa = {
+        Filters: `SysID="${this.params.SysID}"`
+      }
+      queryLinkSys(pa, res => {
+        this.systemDetails = res.Content[0];
+      })
+    },
+    // 删除系统
+    deleteSystem() {
+      this.$confirm("此操作将删除系统,是否继续?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let pa = [{
+          SysID: this.systemDetails.SysID
+        }]
+        this.removeSys(pa)
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    async removeSys(param) {
+      await deleteGeneralSys(param, res => {
+        this.$message.success("删除成功")
+        this.goBack()
+      })
+    },
+  }
+};
+</script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    margin-bottom: 10px;
+    .header {
+      padding-bottom: 10px;
+      span {
+        line-height: 33px;
+        margin-left: 15px;
+      }
+    }
+    .spaceTypes {
+      .types {
+        float: left;
+        width: calc(100% - 200px);
+        /deep/ .el-tabs__item.is-top {
+          border-top: 2px solid transparent;
+          &.is-active {
+            border-top: 2px solid #409eff;
+          }
+        }
+      }
+      .deleBtn {
+        float: left;
+        width: 200px;
+        text-align: right;
+        height: 40px;
+        border-bottom: 1px solid #e4e7ed;
+      }
+    }
+    .main {
+      margin-top: 10px;
+      height: calc(100% - 96px);
+    }
+    .footer {
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>
+
+<style lang="less">
+.el-table th {
+  background-color: #d9d9d9;
+  color: #000;
+}
+</style>
+

+ 8 - 1
src/views/model/file/index.vue

@@ -20,7 +20,9 @@
             </div>
           </div>
           <div class="folder-list">
-            <div class="head">模型文件夹</div>
+            <div class="head">建筑模型文件夹
+              <span>(建议按建筑模型进行命名)</span>
+            </div>
             <ul class="lists">
               <el-scrollbar style="height:100%;">
                 <li @click="openFolder(index,item)" v-for="(item,index) in navigationModel" :key="index"
@@ -595,6 +597,11 @@ export default {
       justify-content: left;
       align-items: center;
       font-weight: bold;
+      span{
+        font-weight: normal;
+        font-size: 12px;
+        color: #606266;
+      }
     }
     .lists {
       width: 100%;

+ 1 - 1
src/views/ready/buildfloor/drawGraphy/checkGraphy.vue

@@ -78,7 +78,7 @@ export default {
     handleItemChange(val) {
       let data = {
         FolderId: val[0],
-        Status: '3, 31, 4',
+        Status: '4',
         ProjectId: this.projectId
       };
       request.queryFloorList(data, res => {

+ 32 - 15
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -2,15 +2,15 @@
   <div :id="`drawFloor${id}`" class="drawFloor" v-loading="canvasLoading">
     <canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
     <div class="operate" v-if="showTools">
-      <canvasFun @move="moveCanvas" @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo"
-        @redo="redo" @scale="scale" :isEdit="isEdit" ref="canvasFun"></canvasFun>
+      <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo" @scale="scale"
+        @changeAbsorb="changeAbsorb" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
     </div>
   </div>
 </template>
 
 <script>
 import { SGraphyView } from "@saga-web/graphy/lib";
-import { DivideFloorScene } from "@saga-web/cad-engine/lib"
+import { DivideFloorScene, FloorView } from "@saga-web/cad-engine/lib"
 import { SColor, SPoint } from "@saga-web/draw/lib";
 import canvasFun from "@/components/business_space/newGraphy/canvasFun"
 import { floorQuery } from "@/api/scan/request";
@@ -29,7 +29,11 @@ export default {
       modelId: '',
       FloorID: '',
       Outline: [],
-      floorData: {}
+      floorData: {},
+      config: {
+        isEdit: false,
+        divide: true
+      }
     };
   },
   props: {
@@ -116,6 +120,16 @@ export default {
         this.initGraphy(this.floorData.StructureInfo.FloorMap, 2)
       })
     },
+    // 获取绑定该模型id的其他楼层轮廓线
+    getOtherFloorOutLine(){
+      let modelid =  this.$route.query.modelId;
+      let pa = {
+        Filters: `ModelId='${modelid}'`
+      }
+      floorQuery(pa, res => {
+        console.log(res)
+      })
+    },
     // 清空平面图
     clearGraphy() {
       if (this.view) {
@@ -123,23 +137,13 @@ export default {
         return
       }
       let id = `floorCanvas${this.id}`;
-      this.view = new SGraphyView(id)
+      this.view = new FloorView(id)
     },
     // canvas 获取焦点
     focus() {
       document.getElementById(`floorCanvas${this.id}`).focus()
     },
     // 工具栏操作
-    // 移动底图
-    moveCanvas(move) {
-      // todo
-      let canvas = document.getElementById(`floorCanvas${this.id}`);
-      if (move) {
-        canvas.style.cursor = 'move';
-      } else {
-        canvas.style.cursor = 'default';
-      }
-    },
     // 适配底图到窗口
     fit() {
       this.view.fitSceneToView()
@@ -160,6 +164,14 @@ export default {
     clearDivide() {
       this.drawMainScene.clearSceneMark()
     },
+    // 吸附
+    changeAbsorb(isAbsorbing) {
+      this.drawMainScene.isAbsorbing = isAbsorbing;
+    },
+    // 保存json
+    saveJson() {
+      this.view.saveFloorJson(`${this.floor}.json`)
+    },
     // 撤销
     undo() {
 
@@ -182,6 +194,11 @@ export default {
           this.$refs.canvasFun.sliderVal = n * 10 / this.view.minScale;
         }
       }
+    },
+    "isEdit": {
+      handler(n) {
+        this.config.isEdit = n;
+      }
     }
   }
 };

+ 1 - 1
src/views/ready/buildfloor/repetitionGraphy.vue

@@ -63,7 +63,7 @@ export default {
         Outline = Outline.map(t => {
           return {
             x: t.x.toFixed(2),
-            y: t.y.toFixed(2),
+            y: -t.y.toFixed(2),
           }
         })
       }