Browse Source

Merge branch 'dev'

zhangyu 4 years ago
parent
commit
31fe8c8a60

+ 6 - 6
config/dev.env.js

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

+ 173 - 189
config/index.js

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

+ 7 - 0
src/api/relation/api.js

@@ -157,3 +157,10 @@ export function relDelete(param, success) {
   let url = '/api/datacenter/relation-manual-calc/rel-del'
   httpUtil.postJson(url, param, success)
 }
+
+
+//查询设备分类
+export function modelScanTaskQuery(param, success) {
+  let url = '/api/datacenter/model-scan-task/model-category-query'
+  httpUtil.postJson(url, param, success)
+}

+ 16 - 16
src/api/scan/request.js

@@ -354,22 +354,22 @@ export function defaultFloor(param) {
 }
 
 //物理世界新建岗位(设备系统)
-export function createPost(param) {
-  let data = {
-    "building_id": param.BuildId,
-    "floor_id": param.BIMID,
-    "equipment_category": param.category,
-    "infos": {
-      "BIMID": [
-        { "value": param.BIMID }
-      ],
-      "BIMLocation": [
-        { "value": param.BIMLocation }
-      ]
-    }
-  }
-  return fetch({ method: 'POST', url: `${godhand}/equipment/create?projectId=${param.perjectId}&secret=${param.secret}`, data })
-}
+// export function createPost(param) {
+//   let data = {
+//     "building_id": param.BuildId,
+//     "floor_id": param.BIMID,
+//     "equipment_category": param.category,
+//     "infos": {
+//       "BIMID": [
+//         { "value": param.BIMID }
+//       ],
+//       "BIMLocation": [
+//         { "value": param.BIMLocation }
+//       ]
+//     }
+//   }
+//   return fetch({ method: 'POST', url: `${godhand}/equipment/create?projectId=${param.perjectId}&secret=${param.secret}`, data })
+// }
 
 
 //物理世界新建岗位(部件)

+ 0 - 1
src/components/business_space/dialogs/list/filesDialog.vue

@@ -55,7 +55,6 @@
     },
     methods: {
       changeItem(file) {
-        console.log(file)
         this.$emit("changeFile", file)
       },
     },

+ 0 - 1
src/components/business_space/dialogs/list/firm.vue

@@ -178,7 +178,6 @@ export default {
           this.tableData = res.content
         })
       }
-      console.log(this.tableData)
     }
   },
   watch: {

+ 1 - 2
src/components/business_space/dialogs/list/picDialog.vue

@@ -89,7 +89,6 @@ export default {
       let videoPics = this.videoPicArr
       let panoramas = this.panoramaArr
       this.changeKeys = picsArr.concat(videos).concat(videoPics).concat(panoramas)
-      console.log(this.changeKeys)
       this.$emit("change", this.changeKeys)
     },
 
@@ -138,4 +137,4 @@ export default {
 };
 </script>
 <style>
-</style>
+</style>

+ 0 - 2
src/components/business_space/lib/uploadImgsName.vue

@@ -162,7 +162,6 @@
       // 寻找表单域中的 <input type="file" ... /> 标签
       // var file = form["file"].files[0];
 
-      console.log("lalala", item)
       let file = item.file;
       // try sending
       let reader = new FileReader();
@@ -239,7 +238,6 @@
                   let oFile = {}
                   oFile[vm.contextKey] = vm.imagesArr
                   vm.$emit("change", oFile, vm.defined, vm.videoPicArr);
-                  console.log('oFile-',oFile)
                 } else {
                   vm.$emit("change", vm.imagesArr, vm.defined, vm.videoPicArr);
 

+ 0 - 980
src/components/dialogs/addDialog/dialogDevice.vue

@@ -1,980 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-if="dialog.addDevice">
-    <!-- <router-link to="/ledger/facility/addfacility"></router-link>
-    <router-view></router-view> -->
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-show="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span
-                style="width:20px;float:left;display:block;height:20px;cursor: pointer;"
-                @click="changeAssetsFalg"
-              >
-                <i class="el-icon-fa  el-icon-fa-compass"></i>
-              </span>
-              <span>当前选择的设备类型:{{deviceType.facility}}</span>
-              <!-- 增加 -->
-              <div style="float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-              </div>
-              <!-- switch -->
-              <div
-                style="width:200px;color:gray;float:right;font-size:10px;"
-              >是否隐藏自动填充信息点:
-                <el-tooltip :content="'' + (isWatch ? '隐藏' : '不隐藏')" placement="top">
-                  <el-switch
-                    @change="changeWatch"
-                    v-model="isWatch"
-                    active-color="#13ce66"
-                    inactive-color="gray"
-                  ></el-switch>
-                </el-tooltip>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <!-- <el-button>取 消</el-button> -->
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addDevice">创建设备</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm
-      :mess="{deviceId : deviceType.assetType}"
-      ref="firm"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    ></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-    <system-type
-      type="check"
-      :infos="''"
-      :list="systemList"
-      @change="setSystem"
-      :graphyId="graphyId"
-      :dialog="dialog"
-    ></system-type>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/ledger/lib/cascader";
-import hansonTable from "@/components/dialogHanson/addDevice";
-import { getTableHeader, getSpaceFloor, getEquipmentFamily, BatchCreateSome, createAssetsList, createSystem, EqToAssets, createRelation } from "@/api/scan/request";
-import tools from "@/utils/scan/tools";
-import showTools from "@/utils/handsontable/notShow"
-import text from "@/utils/handsontable/mainText"
-
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-import systemType from "@/components/dialogs/list/systemType"
-import Handsontable from "handsontable-pro"
-import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN';
-
-//下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-
-import uuid from "@/utils/uuid";
-import {mapGetters, mapActions} from "vuex";
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({ Checked: 1 })
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog,
-    systemType
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    graphyId: {
-      type: String
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "确定新增设备的类型",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-        systemType: false,
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: "",
-        secret: ""
-      },
-      id: 0,
-      systemList: null,
-      isWatch: true,
-      EquipmentList: [],//资产族
-      floorFalg: false,
-    };
-  },
-  computed: {
-      ...mapGetters("layout", [
-          "projectId",
-          "secret",
-          "userId"
-      ])
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    this.getFloorData()
-    this.getEquipmentFamilyList()
-  },
-  mounted() { },
-  methods: {
-    changeAssetsFalg() {
-      if (this.floorFalg) {
-        this.floorFalg = false
-      } else {
-        this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
-          dangerouslyUseHTMLString: true,
-          confirmButtonText: '就要维护设备所属建筑楼层',
-          cancelButtonText: '暂时不搞了',
-          confirmButtonClass: 'confirmButtonClass',
-          cancelButtonClass: 'cancelButtonClass'
-        }).then(_ => {
-          this.floorFalg = true
-          this.getData()
-        }).catch(_ => {
-          this.$message("取消")
-        })
-      }
-    },
-    //获取资产族
-    getEquipmentFamilyList() {
-      getEquipmentFamily(res => {
-        this.EquipmentList = res.Content
-        console.log(this.EquipmentList, "EquipmentList")
-      })
-    },
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: '',
-                label: "未明确楼层"
-              })
-            }
-            return item
-          })
-          data.map(item => {
-            if (!!item.children && item.children.length) {
-              item.children.map(child => {
-                floorData.push({
-                  Code: item.value + "-" + child.value,
-                  Name: item.label + "-" + child.label
-                })
-              })
-            }
-          })
-          this.floorData = floorData
-          console.log(this.floorData)
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({
-          Checked: 1
-        })
-      }
-      if (!!this.hot) {
-        this.hot.destroy()
-      }
-      this.initHot()
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        if (!!!this.deviceType.code) {
-          this.$message("请选择设备类别")
-          return
-        }
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加设备"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-      this.EquipmentList.map(item => {
-        if (!!item.content && item.content.length) {
-          item.content.map(child => {
-            if (child.code == this.deviceType.code) {
-              this.deviceType.assetType = item.code
-              this.deviceType.assetName = item.name
-            }
-          })
-        }
-      })
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //添加设备
-    addDevice() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      let falg = false
-      copyData.map(item => {
-        if (!!item.infos || !!item.relation) {
-          if (item.infos.EquipLocalName) {
-            item.equipment_category = this.deviceType.code
-            data.push(item)
-          } else {
-            falg = true
-          }
-        }
-      })
-      if (falg) {
-        this.$message.info("存在设备的本地名称为空,请检查")
-        return
-      }
-      data = data.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            item.infos[key] = [{ "value": item.infos[key] != "" ? item.infos[key] : null }]
-          }
-        }
-        if (!!item.flowBuild) {
-          item.building_id = item.flowBuild.split("-")[0]
-          item.floor_id = item.flowBuild.split("-")[1] || null
-          //不存在floor字段去除floor
-          if (!item.floor_id) {
-            delete item.floor_id
-          }
-          delete item.flowBuild
-        }
-        return item
-      })
-      if (data.length) {
-        this.createJson(data)
-      } else {
-        this.$message.info("信息点不能为空")
-      }
-    },
-
-    //创建设备接口
-    async createJson(data) {
-        console.log(this.projectId)
-      let param = {
-        data: { criterias: data },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      param.data.criterias.map(item => {
-        if (!!item.infos.DPSupplierID && !!item.infos.DPSupplierID[0].value) {
-          item.infos.DPSupplierID[0].value = item.infos.DPSupplierID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPManufacturerID && !!item.infos.DPManufacturerID[0].value) {
-          item.infos.DPManufacturerID[0].value = item.infos.DPManufacturerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPInsurerID && !!item.infos.DPInsurerID[0].value) {
-          item.infos.DPInsurerID[0].value = item.infos.DPInsurerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPMaintainerID && !!item.infos.DPMaintainerID[0].value) {
-          item.infos.DPMaintainerID[0].value = item.infos.DPMaintainerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPSpecificationID && !!item.infos.DPSpecificationID[0].value) {
-          item.infos.DPSpecificationID[0].value = item.infos.DPSpecificationID[0].value.split("-")[0]
-        }
-      })
-      BatchCreateSome(param, res => {
-        console.log(res)
-        this.createPost(param.data.criterias, res.Content)
-        this.dialog.addDevice = false
-        console.log(this.deviceType)
-        this.$emit("close", this.deviceType)
-        tools.removeItem(this.deviceType.code)
-      })
-    },
-
-    //c创建请求
-    async createPost(param, data) {
-      console.log(param, data)
-      let pushParam = {
-        data: { criterias: [] },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      let list = []
-      data.map((item, index) => {
-        //linkSystem存在且长度不为0
-        if (!!param[index].linkSystem && param[index].linkSystem.length) {
-          param[index].linkSystem.map(child => {
-            let list = {
-              "from_id": child.id, //必填,object id
-              "to_id": item.id, //必填,object id
-              "graph_id": this.graphyId,                     //必填,图实例id
-              "rel_type": "1",
-            }
-            pushParam.data.criterias.push(list)
-          })
-        }
-
-        if (!!param[index].Checked) {
-          param[index].id = item.id
-          list.push(param[index])
-        }
-      })
-      await this.EqCreateAs(list)
-      await this.relationCreate(pushParam)
-    },
-
-    //根据设备id创建资产
-    async EqCreateAs(list) {
-      let param = {
-        FmList: [],
-        ProjId: this.projectId,
-        UserId: this.userId
-      }
-      list.map(item => {
-        param.FmList.push({
-          EquipmentId: item.id,
-          FmId: "Pe" + uuid(32, 16),
-          FmName: item.EquipLocalName || "",
-          Family: this.deviceType.assetType,
-          FamilyName: this.deviceType.assetName,
-          ProjId: this.projectId,
-          Inofs: {
-            DPManufacturerID: item.infos.DPManufacturerID ? item.infos.DPManufacturerID[0].value : null,
-            DPSpecificationID: item.infos.DPSpecificationID ? item.infos.DPSpecificationID[0].value : null,
-            DPSupplierID: item.infos.DPSupplierID ? item.infos.DPSupplierID[0].value : null,
-            DPMaintainerID: item.infos.DPMaintainerID ? item.infos.DPMaintainerID[0].value : null,
-            DPInsurerID: item.infos.DPInsurerID ? item.infos.DPInsurerID[0].value : null,
-          }
-        })
-      })
-      await createAssetsList(param, res => {
-        return true
-      })
-    },
-
-    //创建关系
-    async relationCreate(param) {
-      await createRelation(param).then(res => {
-        if (res.data.Result == "success") {
-          return true
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求失败")
-      })
-    },
-
-    changeWatch() {
-      this.getData()
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "F1", "F2", "M"]
-      readArr.push("Own")
-      let data = showTools.changeHeader(arr, readArr, false, this.isWatch, true)
-      data.unshift("同时创建资产", "所属系统实例");
-      if (this.floorFalg) {
-        data.splice(1, 0, "所属建筑楼层")
-      }
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(list) {
-      let arr = tools.copyArr(list)
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let data = showTools.showTypes(arr, this.onlyRead, this.isWatch, true)
-      data.unshift(
-        {
-          type: "checkbox",
-          checkedTemplate: 1,
-          uncheckedTemplate: 0,
-          data: "Checked",
-          label: {
-            position: "after",
-          }
-        },
-        {
-          data: "linkSystem",
-          renderer: text.systemList,
-          readOnly: true
-        }
-      );
-      if (this.floorFalg) {
-        data.splice(1, 0, {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            data: this.floorData
-          }
-        })
-      }
-      return data;
-    },
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      console.log(this.delHeader(this.headers), this.getType(this.headers))
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        maxRows: this.main.length,
-        rowHeaders: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        filters: true,
-        afterFilter: this.trimmedRows,
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-        // afterOnCellMouseUp: this.eventClick
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      console.log(el, rowArr)
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-
-      if (val == "linkSystem") {
-        this.systemList = this.main[row.row].linkSystem || []
-        this.dialog.systemType = true
-      }
-
-      //   if (val == "infos.Brand" || val == "infos.Specification") {
-      //     this.myDialog.firm = true;
-      //   }
-      if (val == "infos.DPManufacturerID") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos.DPSupplierID) {
-            falg = this.main[row.row].infos.DPSupplierID.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos.DPInsurerID) {
-            falg = this.main[row.row].infos.DPInsurerID.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.DPSupplierID"
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.supplier = true;
-        } else {
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-
-      if (val == "infos.DPMaintainerID"
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.maintainer = true;
-        } else {
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-
-      if (
-        val == "infos.DPInsurerID"
-
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.insurer = true;
-        } else {
-
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-    //选择型号修改
-    firmChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "brand", data, "Brand")
-        // this.utilToKey(key, "name", data, "Specification")
-        // this.utilToKey(key, "venderName", data, "Manufacturer")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand
-          this.utilToKey(key, "venderId", data, "DPManufacturerID")
-        }
-        this.utilToKey(key, "specificationId", data, "DPSpecificationID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      console.log("保险合同发生改变", data)
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log("供应商", data)
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Supplier")
-        // this.utilToKey(key, "email", data, "SupplierEmail")
-        // this.utilToKey(key, "website", data, "SupplierWeb")
-        // this.utilToKey(key, "phone", data, "SupplierPhone")
-        // this.utilToKey(key, "fox", data, "SupplierFax")
-        // this.utilToKey(key, "man", data, "SupplierContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          console.log(data)
-          this.utilToKey(key, "venderId", data, "DPSupplierID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Insurer")
-        // this.utilToKey(key, "email", data, "InsurerEmail")
-        // this.utilToKey(key, "website", data, "InsurerWeb")
-        // this.utilToKey(key, "phone", data, "InsurerFax")
-        // this.utilToKey(key, "man", data, "InsurerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "DPInsurerID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      console.log(data, "data")
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Maintainer")
-        // this.utilToKey(key, "email", data, "MaintainerEmail")
-        // this.utilToKey(key, "website", data, "MaintainerWeb")
-        // this.utilToKey(key, "phone", data, "MaintainerPhone")
-        // this.utilToKey(key, "fox", data, "MaintainerFax")
-        // this.utilToKey(key, "man", data, "MaintainerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "DPMaintainerID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      console.log(keys, "keys", this.messKey.split("."), this.row,'22222222222222')
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-        console.log(keys, "keys", this.messKey.split("."), this.row,'22222222222222')
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //系统实例弹窗确定
-    setSystem(data) {
-      this.main[this.row].linkSystem = data
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          this.main[row].infos[key] = data
-        } else {
-          this.main[row].infos = {}
-          this.main[row].infos[key] = data
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-      overflow: hidden;
-}
-</style>
-<style lang="">
-    .confirmButtonClass {
-    width: 180px;
-}
-.cancelButtonClass {
-    width: 180px;
-}
-</style>

+ 0 - 871
src/components/dialogs/addDialog/dialogSystem.vue

@@ -1,871 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div>
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-      :before-close="close"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span>当前选择的设备族:{{deviceType.facility}}</span>
-              <div style="width:500px;float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-                <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <el-button>取 消</el-button>
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="createAssets">创建系统</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm ref="firm" :dialog="myDialog"></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/lib/cascaders/system";
-import hansonTable from "@/components/dialogHanson/addDevice";
-import tools from "@/utils/scan/tools";
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-
-//下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-import {mapGetters, mapActions} from "vuex";
-import { getTableHeader, BatchCreateSome, getSpaceFloor } from "@/api/scan/request";
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "确定新增系统的类型",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: 0,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: "",
-        secret: ""
-      },
-      floorData: []
-    };
-  },
-  computed: {
-      ...mapGetters("layout", [
-          "projectId",
-          "secret",
-          "userId"
-      ])
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    this.setValue()
-    this.getFloorData()
-  },
-  mounted() { },
-  methods: {
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //关闭
-    close(done) {
-      this.$emit("close")
-      done()
-    },
-    //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            floorData.push({
-              Code: item.value,
-              Name: item.label
-            })
-          })
-          this.floorData = floorData
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      this.hot.loadData(this.main)
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加系统"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //创建资产
-    createAssets() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      copyData.map(item => {
-        if (!!item.infos || !!item.relation) {
-          item.equipment_category = this.deviceType.code
-          data.push(item)
-        }
-      })
-      data = data.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            item.infos[key] = [{ "value": item.infos[key] != "" ? item.infos[key] : null }]
-          }
-        }
-        if (!!item.flowBuild) {
-          if (!!item.building_id) {
-          } else {
-            item.building_id = ""
-          }
-          item.building_id = item.flowBuild
-          delete item.flowBuild
-        }
-        return item
-      })
-      if (data.length) {
-        this.createJson(data)
-      } else {
-        this.$message.error("信息点不能为空")
-      }
-    },
-
-    //新建资产请求
-    async createJson(data) {
-      let param = {
-        data: { criterias: data },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      console.log(param)
-      this.createPost(param)
-    },
-
-    async createPost(param) {
-      BatchCreateSome(param, res => {
-        // console.log("change")
-        this.$emit("close", this.deviceType)
-        tools.removeItem(this.deviceType.code)
-        this.dialog.addDevice = false
-        this.$message.success("创建成功")
-      })
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.Unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.Unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      data.unshift("所属建筑楼层");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.InfoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.InfoPointCode == "Brand" || item.InfoPointCode == "Specification") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InfoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.InfoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.InfoPointCode == "InsuranceFile" || item.InfoPointCode == "Archive") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.InfoPointCode == "InstallLocation" ||
-          item.InfoPointCode == "InstallPic" ||
-          item.InfoPointCode == "InstallDrawing" ||
-          item.InfoPointCode == "Nameplate" ||
-          item.InfoPointCode == "Pic" ||
-          item.InfoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.InfoPointCode == "Maintainer" ||
-          item.InfoPointCode == "Supplier" ||
-          item.InfoPointCode == "Insurer" ||
-          item.InfoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      data.unshift(
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            data: this.floorData
-          }
-        }
-      );
-      data = data.filter(item => item);
-      return data;
-    },
-
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该资产"
-            }
-          }
-        },
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        afterRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.DPSupplierID
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.DPInsurerID
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        console.log(this.picsArr)
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.Maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log(data, "供应商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Supplier")
-        this.utilToKey(key, "email", data, "SupplierEmail")
-        this.utilToKey(key, "website", data, "SupplierWeb")
-        this.utilToKey(key, "phone", data, "SupplierPhone")
-        this.utilToKey(key, "fox", data, "SupplierFax")
-        this.utilToKey(key, "man", data, "SupplierContactor")
-        this.utilToKey(key, "venderId", data, "DPSupplierID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      console.log("保险合同发生改变", data)
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      console.log(data, "保险商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Insurer")
-        this.utilToKey(key, "email", data, "InsurerEmail")
-        this.utilToKey(key, "website", data, "InsurerWeb")
-        this.utilToKey(key, "phone", data, "InsurerFax")
-        this.utilToKey(key, "man", data, "InsurerContactor")
-        this.utilToKey(key, "venderId", data, "DPInsurerID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Maintainer")
-        this.utilToKey(key, "email", data, "MaintainerEmail")
-        this.utilToKey(key, "website", data, "MaintainerWeb")
-        this.utilToKey(key, "phone", data, "MaintainerPhone")
-        this.utilToKey(key, "fox", data, "MaintainerFax")
-        this.utilToKey(key, "man", data, "MaintainerContactor")
-        this.utilToKey(key, "venderId", data, "DPMaintainerID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-      console.log("assets", keys)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        } else {
-          this.main[row].infos = {}
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        console.log("changed")
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 1 - 1
src/components/echarts/fanChart.vue

@@ -96,4 +96,4 @@ export default {
 }
 </script>
 <style>
-</style>
+</style>

+ 0 - 964
src/components/ledger/addDialog/dialogDevice.vue

@@ -1,964 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div v-if="dialog.addDevice">
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-show="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span
-                style="width:20px;float:left;display:block;height:20px;cursor: pointer;"
-                @click="changeAssetsFalg"
-              >
-                <i class="iconfont icon-xiaolian"></i>
-              </span>
-              <span>当前选择的设备族:{{deviceType.facility}}</span>
-              <!-- 增加 -->
-              <div style="width:360px;float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-              </div>
-              <!-- switch -->
-              <div
-                style="width:200px;color:gray;float:right;padding-top:7px;font-size:10px;"
-              >是否隐藏自动填充信息点:
-                <el-tooltip :content="'' + (isWatch ? '隐藏' : '不隐藏')" placement="top">
-                  <el-switch
-                    @change="changeWatch"
-                    v-model="isWatch"
-                    active-color="#13ce66"
-                    inactive-color="gray"
-                  ></el-switch>
-                </el-tooltip>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <el-button>取 消</el-button>
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="addDevice">创建设备</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm
-      :mess="{deviceId : deviceType.assetType}"
-      ref="firm"
-      @changeFirm="firmChange"
-      :dialog="myDialog"
-    ></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-    <system-type
-      type="check"
-      :infos="''"
-      :list="systemList"
-      @change="setSystem"
-      :graphyId="graphyId"
-      :dialog="dialog"
-    ></system-type>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/cascader";
-import hansonTable from "@/components/dialogHanson/addDevice";
-import { getTableHeader, getSpaceFloor, getEquipmentFamily, BatchCreateSome, createAssetsList, createSystem, EqToAssets, createRelation } from "@/api/request";
-import tools from "@/utils/scan/tools";
-import showTools from "@/utils/handsontable/notShow"
-import text from "@/utils/handsontable/mainText"
-
-import qrcode from "@/components/ledger/lib/qrcode";
-import firm from "@/components/dialogs/list/firm";
-import supplyDialog from "@/components/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/dialogs/list/picDialog"
-import systemType from "@/components/dialogs/list/systemType"
-
-
-//下拉插件
-import "@/assets/js/chosen.jquery.min";
-import "@/assets/js/handsontable-chosen-editor";
-
-import uuid from "@/utils/uuid";
-import {mapGetters, mapActions} from "vuex";
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({ Checked: 1 })
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog,
-    systemType
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    graphyId: {
-      type: String
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  computed: {
-    ...mapGetters("layout", ["projectId", "secret", "userId"]),
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-        systemType: false,
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: "",
-        secret: ""
-      },
-      id: 0,
-      systemList: null,
-      isWatch: true,
-      EquipmentList: [],//资产族
-      floorFalg: false,
-    };
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    this.getFloorData()
-    this.getEquipmentFamilyList()
-  },
-  mounted() { },
-  methods: {
-    changeAssetsFalg() {
-      if (this.floorFalg) {
-        this.floorFalg = false
-      } else {
-        this.$confirm('<p>维护设备所在建筑楼层后,对后续数据影响较大,如业务空间中的所在关系or其他?暂未梳理明白……</p><p>后续要修改设备所属建筑楼层,只能通过模型中的待建模清单操作</p>', '提示', {
-          dangerouslyUseHTMLString: true,
-          confirmButtonText: '就要维护设备所属建筑楼层',
-          cancelButtonText: '暂时不搞了'
-        }).then(_ => {
-          this.floorFalg = true
-          this.getData()
-        }).catch(_ => {
-          this.$message("取消")
-        })
-      }
-    },
-    //获取资产族
-    getEquipmentFamilyList() {
-      getEquipmentFamily(res => {
-        this.EquipmentList = res.Content
-        console.log(this.EquipmentList, "EquipmentList")
-      })
-    },
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            if (!!item.children) {
-              item.children.unshift({
-                value: '',
-                label: "未明确楼层"
-              })
-            }
-            return item
-          })
-          data.map(item => {
-            if (!!item.children && item.children.length) {
-              item.children.map(child => {
-                floorData.push({
-                  Code: item.value + "-" + child.value,
-                  Name: item.label + "-" + child.label
-                })
-              })
-            }
-          })
-          this.floorData = floorData
-          console.log(this.floorData)
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({
-          Checked: 1
-        })
-      }
-      if (!!this.hot) {
-        this.hot.destroy()
-      }
-      this.initHot()
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        if (!!!this.deviceType.code) {
-          this.$message("请选择设备类别")
-          return
-        }
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加设备"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-      this.EquipmentList.map(item => {
-        if (!!item.content && item.content.length) {
-          item.content.map(child => {
-            if (child.code == this.deviceType.code) {
-              this.deviceType.assetType = item.code
-              this.deviceType.assetName = item.name
-            }
-          })
-        }
-      })
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //添加设备
-    addDevice() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      let falg = false
-      copyData.map(item => {
-        if (!!item.infos || !!item.relation) {
-          if (item.infos.EquipLocalName) {
-            item.equipment_category = this.deviceType.code
-            data.push(item)
-          } else {
-            falg = true
-          }
-        }
-      })
-      if (falg) {
-        this.$message.info("存在设备的本地名称为空,请检查")
-        return
-      }
-      data = data.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            item.infos[key] = [{ "value": item.infos[key] != "" ? item.infos[key] : null }]
-          }
-        }
-        if (!!item.flowBuild) {
-          item.building_id = item.flowBuild.split("-")[0]
-          item.floor_id = item.flowBuild.split("-")[1] || null
-          //不存在floor字段去除floor
-          if (!item.floor_id) {
-            delete item.floor_id
-          }
-          delete item.flowBuild
-        }
-        return item
-      })
-      if (data.length) {
-        this.createJson(data)
-      } else {
-        this.$message.info("信息点不能为空")
-      }
-    },
-
-    //创建设备接口
-    async createJson(data) {
-      let param = {
-        data: { criterias: data },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      param.data.criterias.map(item => {
-        if (!!item.infos.DPSupplierID && !!item.infos.DPSupplierID[0].value) {
-          item.infos.DPSupplierID[0].value = item.infos.DPSupplierID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPManufacturerID && !!item.infos.DPManufacturerID[0].value) {
-          item.infos.DPManufacturerID[0].value = item.infos.DPManufacturerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPInsurerID && !!item.infos.DPInsurerID[0].value) {
-          item.infos.DPInsurerID[0].value = item.infos.DPInsurerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPMaintainerID && !!item.infos.DPMaintainerID[0].value) {
-          item.infos.DPMaintainerID[0].value = item.infos.DPMaintainerID[0].value.split("-")[0]
-        }
-        if (!!item.infos.DPSpecificationID && !!item.infos.DPSpecificationID[0].value) {
-          item.infos.DPSpecificationID[0].value = item.infos.DPSpecificationID[0].value.split("-")[0]
-        }
-      })
-      BatchCreateSome(param, res => {
-        console.log(res)
-        this.createPost(param.data.criterias, res.Content)
-        this.dialog.addDevice = false
-        console.log(this.deviceType)
-        this.$emit("close", this.deviceType)
-        tools.removeItem(this.deviceType.code)
-      })
-    },
-
-    //c创建请求
-    async createPost(param, data) {
-      console.log(param, data)
-      let pushParam = {
-        data: { criterias: [] },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      let list = []
-      data.map((item, index) => {
-        //linkSystem存在且长度不为0
-        if (!!param[index].linkSystem && param[index].linkSystem.length) {
-          param[index].linkSystem.map(child => {
-            let list = {
-              "from_id": child.id, //必填,object id
-              "to_id": item.id, //必填,object id
-              "graph_id": this.graphyId,                     //必填,图实例id
-              "rel_type": "1",
-            }
-            pushParam.data.criterias.push(list)
-          })
-        }
-
-        if (!!param[index].Checked) {
-          param[index].id = item.id
-          list.push(param[index])
-        }
-      })
-      await this.EqCreateAs(list)
-      await this.relationCreate(pushParam)
-    },
-
-    //根据设备id创建资产
-    async EqCreateAs(list) {
-      let param = {
-        FmList: [],
-        ProjId: this.projectId,
-        UserId: this.userId
-      }
-      list.map(item => {
-        param.FmList.push({
-          EquipmentId: item.id,
-          FmId: "Pe" + uuid(32, 16),
-          FmName: item.EquipLocalName || "",
-          Family: this.deviceType.assetType,
-          FamilyName: this.deviceType.assetName,
-          ProjId: this.projectId,
-          Inofs: {
-            DPManufacturerID: item.infos.DPManufacturerID ? item.infos.DPManufacturerID[0].value : null,
-            DPSpecificationID: item.infos.DPSpecificationID ? item.infos.DPSpecificationID[0].value : null,
-            DPSupplierID: item.infos.DPSupplierID ? item.infos.DPSupplierID[0].value : null,
-            DPMaintainerID: item.infos.DPMaintainerID ? item.infos.DPMaintainerID[0].value : null,
-            DPInsurerID: item.infos.DPInsurerID ? item.infos.DPInsurerID[0].value : null,
-          }
-        })
-      })
-      await createAssetsList(param, res => {
-        return true
-      })
-    },
-
-    //创建关系
-    async relationCreate(param) {
-      await createRelation(param).then(res => {
-        if (res.data.Result == "success") {
-          return true
-        } else {
-          this.$message.error("请求失败:" + res.data.ResultMsg)
-        }
-      }).catch(_ => {
-        this.$message.error("请求失败")
-      })
-    },
-
-    changeWatch() {
-      this.getData()
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(list) {
-      let arr = tools.copyArr(list)
-      // 如果不是只读状态,添加四大厂商选择
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let readArr = ["A1", "A2", "B1", "C5", "D1", "D2", "X", "L", "L1", "L2", "F1", "F2", "M"]
-      readArr.push("Own")
-      let data = showTools.changeHeader(arr, readArr, false, this.isWatch, true)
-      data.unshift("同时创建资产", "所属系统实例");
-      if (this.floorFalg) {
-        data.splice(1, 0, "所属建筑楼层")
-      }
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param list header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(list) {
-      let arr = tools.copyArr(list)
-      if (!this.onlyRead) {
-        arr = showTools.arrToArr(arr)
-      }
-      let data = showTools.showTypes(arr, this.onlyRead, this.isWatch, true)
-      data.unshift(
-        {
-          type: "checkbox",
-          checkedTemplate: 1,
-          uncheckedTemplate: 0,
-          data: "Checked",
-          label: {
-            position: "after",
-          }
-        },
-        {
-          data: "linkSystem",
-          renderer: text.systemList,
-          readOnly: true
-        }
-      );
-      if (this.floorFalg) {
-        data.splice(1, 0, {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            data: this.floorData
-          }
-        })
-      }
-      return data;
-    },
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      console.log(this.delHeader(this.headers), this.getType(this.headers))
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        maxRows: this.main.length,
-        rowHeaders: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该业务空间"
-            }
-          }
-        },
-        filters: true,
-        afterFilter: this.trimmedRows,
-        // 事件
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        beforeRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-        // afterOnCellMouseUp: this.eventClick
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      console.log(el, rowArr)
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-
-      if (val == "linkSystem") {
-        this.systemList = this.main[row.row].linkSystem || []
-        this.dialog.systemType = true
-      }
-
-      //   if (val == "infos.Brand" || val == "infos.Specification") {
-      //     this.myDialog.firm = true;
-      //   }
-      if (val == "infos.DPManufacturerID") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos.DPSupplierID) {
-            falg = this.main[row.row].infos.DPSupplierID.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos.DPInsurerID) {
-            falg = this.main[row.row].infos.DPInsurerID.split("-")[0]
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.DPSupplierID"
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.supplier = true;
-        } else {
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-
-      if (val == "infos.DPMaintainerID"
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.maintainer = true;
-        } else {
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-
-      if (
-        val == "infos.DPInsurerID"
-
-      ) {
-        if (!!this.main[row.row].Checked) {
-          this.myDialog.insurer = true;
-        } else {
-
-          this.$message("该信息点需勾选同步创建资产方可编辑")
-        }
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-    //选择型号修改
-    firmChange(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "brand", data, "Brand")
-        // this.utilToKey(key, "name", data, "Specification")
-        // this.utilToKey(key, "venderName", data, "Manufacturer")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name + "/" + data.brand
-          this.utilToKey(key, "venderId", data, "DPManufacturerID")
-        }
-        this.utilToKey(key, "specificationId", data, "DPSpecificationID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      console.log("保险合同发生改变", data)
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log("供应商", data)
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Supplier")
-        // this.utilToKey(key, "email", data, "SupplierEmail")
-        // this.utilToKey(key, "website", data, "SupplierWeb")
-        // this.utilToKey(key, "phone", data, "SupplierPhone")
-        // this.utilToKey(key, "fox", data, "SupplierFax")
-        // this.utilToKey(key, "man", data, "SupplierContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          console.log(data)
-          this.utilToKey(key, "venderId", data, "DPSupplierID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Insurer")
-        // this.utilToKey(key, "email", data, "InsurerEmail")
-        // this.utilToKey(key, "website", data, "InsurerWeb")
-        // this.utilToKey(key, "phone", data, "InsurerFax")
-        // this.utilToKey(key, "man", data, "InsurerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "DPInsurerID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      console.log(data, "data")
-      for (let key in data) {
-        // this.utilToKey(key, "name", data, "Maintainer")
-        // this.utilToKey(key, "email", data, "MaintainerEmail")
-        // this.utilToKey(key, "website", data, "MaintainerWeb")
-        // this.utilToKey(key, "phone", data, "MaintainerPhone")
-        // this.utilToKey(key, "fox", data, "MaintainerFax")
-        // this.utilToKey(key, "man", data, "MaintainerContactor")
-        if (key == "venderId") {
-          data[key] = data[key] + "-" + data.name
-          this.utilToKey(key, "venderId", data, "DPMaintainerID")
-        }
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      console.log(keys, "keys", this.messKey.split("."), this.row)
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //系统实例弹窗确定
-    setSystem(data) {
-      this.main[this.row].linkSystem = data
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          this.main[row].infos[key] = data
-        } else {
-          this.main[row].infos = {}
-          this.main[row].infos[key] = data
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-    overflow: hidden;
-    // height: 300px;
-    // overflow-x: hidden;
-    // overflow-y:auto;
-
-}
-</style>

+ 0 - 885
src/components/ledger/addDialog/dialogSystem.vue

@@ -1,885 +0,0 @@
-<!--
-    上传文件的弹窗
--->
-
-<template>
-  <div>
-    <router-view></router-view>
-    <router-link to="/leader/property/addproperty"></router-link>
-    <el-dialog
-      :title="title"
-      :center="isCenter"
-      :visible.sync="dialog.addDevice"
-      :width="width"
-      :fullscreen="isFull"
-      :before-close="close"
-    >
-      <div id="addDevice">
-        <div v-show="!isCenter">
-          <my-cascader ref="cascader" @change="changeCader"></my-cascader>
-        </div>
-        <div v-if="isCenter">
-          <div>
-            <div class="hanson-bar">
-              <span>当前选择的设备族:{{deviceType.facility}}</span>
-              <div style="width:500px;float:right;overflow:hidden;">
-                <span>增加</span>
-                <el-input v-model="addNum" style="width:50px;" placeholder="增加个数" size="small"></el-input>
-                <span>个{{deviceType.facility}}</span>
-                <el-button size="small" @click="addMain">增加</el-button>
-                <el-button size="small" @click="undo" icon="iconfont icon-undo">撤销</el-button>
-              </div>
-            </div>
-            <div v-show="main && main.length" id="myHandson" ref="myHandson"></div>
-          </div>
-        </div>
-      </div>
-      <div v-show="!isCenter" slot="footer" class="dialog-footer">
-        <el-button>取 消</el-button>
-        <el-button type="primary" @click="step(1)">下 一 步</el-button>
-      </div>
-      <span v-show="isCenter" slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="createAssets">创建系统</el-button>
-      </span>
-    </el-dialog>
-    <qrcode :dialog="myDialog" :addBody="true" ref="qrcode"></qrcode>
-    <firm ref="firm" :dialog="myDialog"></firm>
-    <supply-dialog @change="supplyChange" :id="id" ref="supply" :dialog="myDialog"></supply-dialog>
-    <supplier-dialog ref="supplier" @changeSupplier="supplierChange" :dialog="myDialog"></supplier-dialog>
-    <guarantee-dialog ref="guarantee" :id="id" @change="guaranteeChange" :dialog="myDialog"></guarantee-dialog>
-    <upload-files-dialog
-      ref="upload"
-      @changeFile="fileChange"
-      :keysArr="filesArr"
-      :dialog="myDialog"
-    ></upload-files-dialog>
-    <upload-img-dialog @changeFile="imgChange" :keysArr="imgsArr" :dialog="myDialog"></upload-img-dialog>
-    <maintainer-dialog @changeMaintainer="changeMaintainer" ref="maintainer" :dialog="myDialog"></maintainer-dialog>
-    <insurer-dialog @changeInsurer="changeInsurer" ref="insurer" :dialog="myDialog"></insurer-dialog>
-    <pic-dialog :dialog="myDialog" :keysArr="picsArr" @change="changePics"></pic-dialog>
-  </div>
-</template>
-<script>
-
-import myCascader from "@/components/ledger/lib/system";
-import hansonTable from "@/components/ledger/lib/addDevice";
-import tools from "@/utils/scan/tools";
-
-import qrcode from "@/components/business_space/lib/qrcode";
-import firm from "@/components/business_space/dialogs/list/firm";
-import supplyDialog from "@/components/business_space/dialogs/list/supplyDialog";
-import supplierDialog from "@/components/business_space/dialogs/list/supplierDialog";
-import maintainerDialog from "@/components/business_space/dialogs/list/maintainerDialog";
-import insurerDialog from "@/components/business_space/dialogs/list/insurerDialog";
-import guaranteeDialog from "@/components/business_space/dialogs/list/guaranteeDialog";
-import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDialog";
-import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog";
-import picDialog from "@/components/business_space/dialogs/list/picDialog"
-
-import Handsontable from "handsontable-pro"
-    import 'handsontable-pro/dist/handsontable.full.css'
-    import zhCN from 'handsontable-pro/languages/zh-CN';
-//下拉插件
-// import "@/assets/js/chosen.jquery.min";
-// import "@/assets/js/handsontable-chosen-editor";
-
-import { getTableHeader, BatchCreateSome, getSpaceFloor } from "@/api/scan/request";
-
-import {
-    mapGetters,
-    mapActions
-} from "vuex";
-
-
-let table = function (num) {
-  let main = []
-  for (let i = 0; i < num; i++) {
-    main.push({})
-  }
-  return main
-}
-export default {
-  components: {
-    myCascader,
-    hansonTable,
-    qrcode, //二维码页面
-    firm, //
-    supplyDialog,
-    supplierDialog,
-    guaranteeDialog,
-    uploadFilesDialog,
-    maintainerDialog,
-    insurerDialog,
-    uploadImgDialog,
-    picDialog
-  },
-  props: {
-    dialog: {
-      type: Object,
-      default: function () {
-        return {
-          addDevice: false
-        };
-      }
-    },
-    assetType: {
-      type: Array,
-      default: function () {
-        return []
-      }
-    }
-  },
-  computed: {
-      ...mapGetters("layout", [
-          "projectId",
-          "secret",
-          "userId"
-      ])
-  },
-  data() {
-    return {
-      width: "30%",
-      isFull: false,//dialog是否为全屏
-      title: "确定新增系统的类型",
-      isCenter: false,
-      deviceType: {},
-      main: table(1),
-      mess: {},
-      headers: null,
-      page: {
-        size: 50,
-        sizes: [10, 30, 50, 100, 150, 200],
-        total: 400,
-        currentPage: 1
-      },
-      id: 0,
-      myDialog: {
-        qrcode: false, //二维码弹窗
-        firm: false, //厂商弹窗
-        supply: false, //选择供应合同
-        supplier: false, //供应商选择
-        guarantee: false, //选择保单
-        maintainer: false, //选择维修商
-        insurer: false, //选择保险公司
-        uploadFiles: false,//上传文件
-        uploadImgs: false,//上传单个图片
-        pic: false, //多个图片
-      },
-      addNum: 1,//增加个数
-      row: null,//被修改的row
-      filesArr: [],//保存临时的文件key
-      messKey: null,
-      imgsArr: [],//临时保存的图片key数组
-      picsArr: [],//临时设备图片keys数组
-      param: {
-        ProjId: '',
-        secret: ''
-      },
-      floorData: []
-    };
-  },
-  created() {
-    this.param.ProjId = this.projectId
-    this.param.secret = this.secret
-    this.setValue()
-    this.getFloorData()
-  },
-  mounted() { },
-  methods: {
-    //设置默认选中数据
-    setValue() {
-      this.$nextTick(_ => {
-        this.$refs.cascader.setValue(this.assetType)
-      })
-    },
-    //关闭
-    close(done) {
-      this.$emit("close")
-      done()
-    },
-    //获取楼层数据
-    getFloorData() {
-      getSpaceFloor(this.param).then(res => {
-        if (res.data.Result == 'success') {
-          let data = this.changeArr(res.data.Content), floorData = []
-          data.map(item => {
-            floorData.push({
-              Code: item.value,
-              Name: item.label
-            })
-          })
-          this.floorData = floorData
-        } else {
-          this.$message.error(res.data.ResultMsg)
-        }
-      }).catch(() => {
-        this.$message.error("请求出错")
-      })
-    },
-    //将数组转换成optiosn格式
-    changeArr(arr) {
-      return arr.map(item => {
-        if (item.floors && item.floors.length) {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: item.floors.map(i => {
-              return {
-                value: i.id,
-                label: i.infos.FloorLocalName || "未知",
-              }
-            })
-          }
-        } else {
-          return {
-            value: item.id,
-            label: item.infos.BuildLocalName,
-            children: null,
-            isChilren: 1,
-          }
-        }
-      })
-    },
-
-    //增加个数
-    addMain() {
-      for (let i = 0; i < this.addNum; i++) {
-        this.main.push({})
-      }
-      this.hot.loadData(this.main)
-    },
-
-    //下一步
-    step(val) {
-      if (!!val) {
-        this.isFull = true
-        this.isCenter = true
-        this.title = "添加系统"
-        this.getData()
-      } else {
-        this.isFull = false
-        this.isCenter = false
-      }
-    },
-    //修改设备类型
-    changeCader(val) {
-      this.deviceType = val
-    },
-    //获取header的mess
-    getHeader(mess) {
-      this.mess = mess;
-    },
-
-    //获取主体内容
-    getMain(floorMess) {
-    },
-
-    //获取表头
-    getData() {
-      this.main = table(1)
-      getTableHeader({
-        code: this.deviceType.code,
-        ProjId: this.projectId
-      }).then(res => {
-        this.headers = res.data.Content;
-        if (!!this.hot) {
-          this.hot.destroy();
-          this.hot = null;
-        }
-        let data = tools.getItem(this.deviceType.code)
-        if (!!data) {
-          this.main = data
-        }
-        this.initHot();
-      });
-    },
-
-    //撤回
-    undo() {
-      this.hot.undo();
-    },
-
-    //刷新
-    reset() {
-      this.getData();
-    },
-
-    //创建资产
-    createAssets() {
-      let data = []
-      let copyData = tools.copyArr(this.main)
-      copyData.map(item => {
-        if (!!item.infos || !!item.relation) {
-          item.equipment_category = this.deviceType.code
-          data.push(item)
-        }
-      })
-      data = data.map(item => {
-        if (!!item.infos) {
-          for (let key in item.infos) {
-            item.infos[key] = [{ "value": item.infos[key] != "" ? item.infos[key] : null }]
-          }
-        }
-        if (!!item.flowBuild) {
-          if (!!item.building_id) {
-          } else {
-            item.building_id = ""
-          }
-          item.building_id = item.flowBuild
-          delete item.flowBuild
-        }
-        return item
-      })
-      if (data.length) {
-        this.createJson(data)
-      } else {
-        this.$message.error("信息点不能为空")
-      }
-    },
-
-    //新建资产请求
-    async createJson(data) {
-      let param = {
-        data: { criterias: data },
-        ProjId: this.projectId,
-        secret: this.secret
-      }
-      console.log(param)
-      this.createPost(param)
-    },
-
-    async createPost(param) {
-      BatchCreateSome(param, res => {
-        // console.log("change")
-        this.$emit("close", this.deviceType)
-        tools.removeItem(this.deviceType.code)
-        this.dialog.addDevice = false
-        this.$message.success("创建成功")
-      })
-    },
-
-    /**
-     * 表头文案处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的文案
-     */
-    delHeader(arr) {
-        console.log(arr)
-      let data = arr.map(item => {
-        if (
-          item.InputMode == "A1" ||
-          item.InputMode == "A2" ||
-          item.InputMode == "B1" ||
-          item.InputMode == "C5" ||
-          item.InputMode == "D1" ||
-          item.InputMode == "D2" ||
-          item.InputMode == "X" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2" ||
-          item.InputMode == "F1" ||
-          item.InputMode == "F2"
-        ) {
-          if (item.Unit == "") {
-            return item.InfoPointName;
-          } else {
-            return item.InfoPointName + "(" + item.Unit + ")";
-          }
-        } else {
-          return undefined;
-        }
-      });
-      data = data.filter(item => item);
-      data.unshift("所属建筑楼层");
-      return data;
-    },
-
-    /**
-     * 表头数据处理函数
-     * @param arr header数组数据
-     *
-     * @return 处理好的数据格式
-     */
-    getType(arr) {
-      let data = arr.map(item => {
-        //二维码
-        if (item.InfoPointCode == "EquipQRCode") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        //厂商选择
-        if (item.InfoPointCode == "Brand" || item.InfoPointCode == "Specification") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InfoPointCode == "SupplierContractID") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.InfoPointCode == "InsuranceNum") {
-          //选择保单
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (item.InfoPointCode == "InsuranceFile" || item.InfoPointCode == "Archive") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.InfoPointCode == "InstallLocation" ||
-          item.InfoPointCode == "InstallPic" ||
-          item.InfoPointCode == "InstallDrawing" ||
-          item.InfoPointCode == "Nameplate" ||
-          item.InfoPointCode == "Pic" ||
-          item.InfoPointCode == "Drawing"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-
-        if (
-          item.InfoPointCode == "Maintainer" ||
-          item.InfoPointCode == "Supplier" ||
-          item.InfoPointCode == "Insurer" ||
-          item.InfoPointCode == "InsurerContactor"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.lookDetails,
-            readOnly: true
-          }
-        }
-        if (item.InputMode == "D1") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              // multiple: true,//多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else if (item.InputMode == "A1" || item.InputMode == "A2") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            type: "numeric",
-            numericFormat: {
-              pattern: "0,0.00"
-              // culture: 'de-DE' // use this for EUR (German),
-              // more cultures available on http://numbrojs.com/languages.html
-            }
-          };
-        } else if (item.InputMode == "C5") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            type: "date",
-            dateFormat: "YYYY-MM-DD",
-            correctFormat: true
-          };
-        } else if (
-          item.InputMode == "B1" ||
-          item.InputMode == "L" ||
-          item.InputMode == "L1" ||
-          item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode
-          };
-        } else if (
-          item.InputMode == "X" ||
-          item.InputMode == "F2"
-          // item.InputMode == "L1" ||
-          // item.InputMode == "L2"
-        ) {
-          return {
-            data: "infos." + item.InfoPointCode,
-            readOnly: true
-          };
-        } else if (item.InputMode == "D2") {
-          return {
-            data: "infos." + item.InfoPointCode,
-            renderer: tools.customDropdownRenderer,
-            editor: "chosen",
-            chosenOptions: {
-              multiple: true, //多选
-              data: item.DataSource.Content || ""
-            }
-          };
-        } else {
-          return undefined;
-        }
-
-      });
-      data.unshift(
-        {
-          data: "flowBuild",
-          renderer: tools.customDropdownRenderer,
-          editor: "chosen",
-          chosenOptions: {
-            // multiple: true,//多选
-            data: this.floorData
-          }
-        }
-      );
-      data = data.filter(item => item);
-      return data;
-    },
-
-
-    //初始化插件
-    initHot() {
-      var container = document.getElementById("myHandson");
-      let winHeight = document.documentElement.clientHeight;
-      this.hot = new Handsontable(container, {
-        data: this.main,
-        colHeaders: this.delHeader(this.headers), //表头文案
-        columns: this.getType(this.headers), //数据显示格式
-        filters: true,
-        height: winHeight - 100 - 50 - 60,
-        columnSorting: true, //添加排序
-        sortIndicator: true, //添加排序
-        renderAllRows: true,
-        autoColumnSize: true,
-        language: "zh-CN",
-        manualColumnResize: true,
-        manualColumnMove: true,
-        dropdownMenu: [
-          "filter_by_condition",
-          "filter_by_value",
-          "filter_action_bar"
-        ],
-        contextMenu: this.onlyRead ? false :{
-          items: {
-            remove_row: {
-              name: "删除该资产"
-            }
-          }
-        },
-        afterChange: this.tdChange, //修改后
-        afterFilter: this.trimmedRows, //排序前
-        afterRemoveRow: this.romoveFm, //右键删除
-        afterOnCellMouseDown: this.eventClick //鼠标点击
-      });
-      let pro = document.getElementById("hot-display-license-info");
-      if (!!pro) {
-        pro.parentNode.removeChild(pro);
-      }
-      this.isLoading = false;
-    },
-
-    tdChange() {
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //表格中的点击
-    eventClick(el, rowArr) {
-      //点击的是表头
-      if (rowArr.row < 0) {
-        return;
-      }
-      let filter = this.filtersArr;
-      //被筛选过后的数组
-      let trimmedArr = this.trimmedRows();
-      //是否启用了排序
-      let isSort = this.hot.getPlugin("columnSorting").isSorted();
-      if (trimmedArr.length && isSort) {
-        let sortArr = this.myHotArr.getPlugin("columnSorting").rowsMapper
-          .__arrayMap;
-        let infos = this.main[trimmedArr[sortArr[rowArr.row]]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (isSort) {
-        //排序后的数组
-        let sortArr = this.hot.getPlugin("columnSorting").rowsMapper.__arrayMap;
-        let infos = this.main[sortArr[rowArr.row]];
-        this.getInfors(infos, sortArr[rowArr.row]);
-      } else if (trimmedArr.length) {
-        let infos = this.main[trimmedArr[rowArr.row]];
-        this.getInfors(infos, trimmedArr[rowArr.row]);
-      } else {
-        let infos = this.main[rowArr.row];
-        this.getInfors(infos, rowArr);
-      }
-    },
-
-    getInfors(infos, row) {
-      //其他的开始判断
-      let val = this.hot.colToProp(row.col);
-      if (val == "infos.EquipQRCode") {
-        this.myDialog.qrcode = true;
-        this.$refs.qrcode.getCanvas(1111);
-      }
-
-      if (val == "infos.Brand" || val == "infos.Specification") {
-        this.myDialog.firm = true;
-      }
-
-      if (val == "infos.SupplierContractID") {
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.DPSupplierID
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.supply = true;
-        } else {
-          this.$message("请先选择供应商")
-        }
-      }
-
-      if (val == "infos.InsuranceNum") {
-        //选择保单
-        let falg = null
-        if (!!this.main[row.row].infos) {
-          if (!!this.main[row.row].infos) {
-            falg = this.main[row.row].infos.DPInsurerID
-          }
-        }
-        if (!!falg) {
-          this.id = falg
-          this.myDialog.guarantee = true;
-        } else {
-          this.$message("请先选择保险商")
-        }
-      }
-
-      if (val == "infos.InsuranceFile" || val == "infos.Archive") {
-        this.filesArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        this.myDialog.uploadFiles = true
-      }
-
-      if (
-        val == "infos.InstallLocation" ||
-        val == "infos.InstallPic" ||
-        val == "infos.InstallDrawing" ||
-        val == "infos.Nameplate" ||
-        val == "infos.Drawing"
-      ) {
-        if (val == "infos.Nameplate") {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]].key] : []) : []
-        } else {
-          this.imgsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? [this.main[row.row].infos[val.split(".")[1]]] : []) : []
-        }
-        this.myDialog.uploadImgs = true
-      }
-
-      if (val == "infos.Pic") {
-        // console.log(this.main[row.row].infos[val.split(".")[1]], "this.main[row.row].infos[val.split")
-        this.picsArr = this.main[row.row].infos ? (this.main[row.row].infos[val.split(".")[1]] ? this.main[row.row].infos[val.split(".")[1]] : []) : []
-        console.log(this.picsArr)
-        this.myDialog.pic = true
-      }
-
-      if (
-        val == "infos.Supplier"
-      ) {
-        this.myDialog.supplier = true;
-      }
-
-      if (val == "infos.Maintainer") {
-        this.myDialog.maintainer = true;
-      }
-
-      if (
-        val == "infos.Insurer" ||
-        val == "infos.InsurerContactor") {
-        this.myDialog.insurer = true;
-      }
-      this.row = row.row
-      this.messKey = val
-      console.log(val, row);
-    },
-
-    //获取被筛选掉的行号
-    trimmedRows() {
-      // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-      var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-      let dataLength = this.main.length;
-      let dataArr = new Array();
-      for (let i = 0; i < dataLength; i++) {
-        dataArr.push(i);
-      }
-      if (plugin.length <= 0) {
-        dataArr = undefined;
-      } else {
-        dataArr = this.array_diff(dataArr, plugin);
-      }
-      return dataArr || [];
-      // var DataArray = new Array();
-
-      // for (var i = 0; i < plugin.length; i++) {
-      //     // 通过行号获取数据
-      //     DataArray.push(this.hot.getSourceDataAtRow(plugin[i]));
-      // }
-    },
-
-    //判断是否为空行
-    isEmptyRow(instance, row) {
-      var rowData = instance.countRows();
-      for (var i = 0, ilen = rowData.length; i < ilen; i++) {
-        if (rowData[i] !== null) {
-          return false;
-        }
-      }
-      return true;
-    },
-
-    //如果选择供应商之后
-    supplierChange(data) {
-      console.log(data, "供应商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Supplier")
-        this.utilToKey(key, "email", data, "SupplierEmail")
-        this.utilToKey(key, "website", data, "SupplierWeb")
-        this.utilToKey(key, "phone", data, "SupplierPhone")
-        this.utilToKey(key, "fox", data, "SupplierFax")
-        this.utilToKey(key, "man", data, "SupplierContactor")
-        this.utilToKey(key, "venderId", data, "DPSupplierID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //供应商合同
-    supplyChange(data) {
-      let changeData = { id: data }
-      this.utilToKey("id", "id", changeData, "SupplierContractID")
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险合同
-    guaranteeChange(data) {
-      console.log("保险合同发生改变", data)
-      for (let key in data) {
-        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-        this.utilToKey(key, "contractFile", data, "InsuranceFile")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //保险商变更
-    changeInsurer(data) {
-      console.log(data, "保险商")
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Insurer")
-        this.utilToKey(key, "email", data, "InsurerEmail")
-        this.utilToKey(key, "website", data, "InsurerWeb")
-        this.utilToKey(key, "phone", data, "InsurerFax")
-        this.utilToKey(key, "man", data, "InsurerContactor")
-        this.utilToKey(key, "venderId", data, "DPInsurerID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //维修商变更
-    changeMaintainer(data) {
-      for (let key in data) {
-        this.utilToKey(key, "name", data, "Maintainer")
-        this.utilToKey(key, "email", data, "MaintainerEmail")
-        this.utilToKey(key, "website", data, "MaintainerWeb")
-        this.utilToKey(key, "phone", data, "MaintainerPhone")
-        this.utilToKey(key, "fox", data, "MaintainerFax")
-        this.utilToKey(key, "man", data, "MaintainerContactor")
-        this.utilToKey(key, "venderId", data, "DPMaintainerID")
-      }
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    utilToKey(key, name, data, messName) {
-      if (key == name) {
-        this.setDataToMain(data[key], messName, this.row)
-      }
-    },
-
-    //上传文件弹窗触发事件
-    fileChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //上传图片弹窗触发事件
-    imgChange(keys) {
-      this.setDataToMain(keys[0], this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-    },
-
-    //设备图片弹窗改变事件
-    changePics(keys) {
-      this.setDataToMain(keys, this.messKey.split(".")[1], this.row)
-      tools.setItem(this.deviceType.code, this.main)
-      console.log("assets", keys)
-    },
-
-    //判断是否有值,有值赋值
-    setDataToMain(data, key, row) {
-      if (!!data && data != '--') {
-        if (!!this.main[row].infos) {
-          //铭牌照片特殊处理
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        } else {
-          this.main[row].infos = {}
-          if (key == 'Nameplate') {
-            this.main[row].infos[key] = {
-              "systemId": "dataPlatform",
-              "name": "铭牌照片",
-              "type": "image",
-              "key": data
-            }
-          } else {
-            this.main[row].infos[key] = data
-          }
-        }
-      } else {
-        this.main[row].infos[key] = ''
-      }
-    }
-  },
-  watch: {
-    dialog: {
-      deep: true,
-      handler: function () {
-        console.log("changed")
-        if (this.dialog.addDevice) {
-          this.setValue()
-        }
-      }
-    }
-  }
-};
-</script>
-<style lang="less" scoped>
-#addDevice {
-  overflow: hidden;
-}
-</style>

+ 0 - 2
src/components/ledger/handsontables/system.vue

@@ -74,7 +74,6 @@ import uploadFilesDialog from "@/components/business_space/dialogs/list/filesDia
 import uploadImgDialog from "@/components/business_space/dialogs/list/uploadImgDialog"
 import picDialog from "@/components/business_space/dialogs/list/picDialog"
 import myPagination from "@/components/common/myPagination"
-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"
@@ -90,7 +89,6 @@ export default {
     uploadImgDialog,
     picDialog,
     myPagination,
-    dialogAssets,
     detailsDialog,
     systemRelevance,
     myCascader,

+ 4 - 3
src/components/relation/overview/CardList.vue

@@ -242,8 +242,8 @@
         }
       },
       equipment(relation) { //配置源端末端
-        this.values.equipmentSetting=`${relation.RelationTypeName} 源末端关系设置`
-        this.$refs.maintain.dialogEquipment = true
+        this.values.equipmentSetting = `${relation.RelationTypeName} 源末端关系设置`
+        this.$refs.maintain.dialogEquipmentOpen()
       },
       manual(relation) {
         let {Manual, Prompting, RelationTypeName, ComputingTime} = relation;
@@ -270,7 +270,8 @@
           localStorage.setItem('RelationType',relation.RelationType)
           localStorage.setItem('ZoneType',relation.ZoneType)
           localStorage.setItem('MainObject',relation.MainObject)
-          localStorage.setItem('FromObject',relation.FromObject)
+          localStorage.setItem('FromObject', relation.FromObject)
+          localStorage.setItem('ComputingTime', relation.ComputingTime ? relation.ComputingTime : '')
           } else {
             this.$message.warning("设计中")
             return false

+ 52 - 32
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -95,25 +95,31 @@
       <el-row :span="24" style="margin-top: 15px">
         <el-col :span="8">
           <p class="">{{values.originEquipment}}</p>
-          <el-cascader
-            :key="isResouceShow"
-            :options="list"
-            v-model="ops"
-            :props="props"
-            collapse-tags
-            clearable
-          />
+          <!--          <el-cascader-->
+          <!--            :key="isResouceShow"-->
+          <!--            :options="list"-->
+          <!--            v-model="ops"-->
+          <!--            :props="props"-->
+          <!--            collapse-tags-->
+          <!--            clearable-->
+          <!--          />-->
+          <el-select v-model="assetValue" placeholder="请选择" clearable filterable size="small" @change="changeVal">
+            <el-option v-for="item in assetOptions" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+          </el-select>
         </el-col>
         <el-col :span="8">
           <p class="">{{values.endEquipment}}</p>
-          <el-cascader
-            :options="list"
-            v-model="filterOps"
-            :key="isResouceShow"
-            :props="props"
-            collapse-tags
-            clearable
-          />
+          <!--          <el-cascader-->
+          <!--            :options="list"-->
+          <!--            v-model="filterOps"-->
+          <!--            :key="isResouceShow"-->
+          <!--            :props="props"-->
+          <!--            collapse-tags-->
+          <!--            clearable-->
+          <!--          />-->
+          <el-select v-model="assetValueLast" placeholder="请选择" clearable filterable size="small" @change="changeVal">
+            <el-option v-for="item in assetOptions" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+          </el-select>
         </el-col>
       </el-row>
 
@@ -237,6 +243,7 @@
 <script>
   import {mapGetters} from 'vuex'
   import storage from '@/framework/utils/storage'
+  import {modelScanTaskQuery} from "@/api/relation/api";
 
   export default {
     name: "RelationMaintain",
@@ -286,6 +293,9 @@
         ops: [],
         filterOps: [],//为清空第二个选择器
         isResouceShow: 0,
+        assetOptions: [],
+        assetValue: '',
+        assetValueLast: ''
       }
     },
     computed: {
@@ -322,7 +332,14 @@
       deepCopy(obj) {
         return JSON.parse(JSON.stringify(obj))
       },
-
+      dialogEquipmentOpen() {
+        this.dialogEquipment = true
+        modelScanTaskQuery('', res => {
+          this.assetOptions = res.Content
+        })
+      },
+      changeVal() {
+      },
       showCascader() {
         ++this.isResouceShow
         let copy = this.deepCopy(this.source)
@@ -421,22 +438,25 @@
         })
       },
       computedUpdate() {
-        if (!this.resultOrigin.length && !this.ops.length) {
-          this.$message({
-            showClose: true,
-            message: '请选择源端设备类',
-            type: 'warning'
-          });
-          return false
-        } else {
-
-          if (this.resultOrigin.length || this.resultEnd.length) {
-            this.resultOrigin.push(...this.resultEnd)
-            this.$emit('openComputed', this.resultOrigin)
-          }
-          this.dialogTableVisibleMore = false
+        // if (!this.resultOrigin.length && !this.ops.length) {
+        //   this.$message({
+        //     showClose: true,
+        //     message: '请选择源端设备类',
+        //     type: 'warning'
+        //   });
+        //   return false
+        // } else {
+        //   if (this.resultOrigin.length || this.resultEnd.length) {
+        //     this.resultOrigin.push(...this.resultEnd)
+        //     this.$emit('openComputed', this.resultOrigin)
+        //   }
+        //   this.dialogTableVisibleMore = false
+        //
+        // }
+        this.resultOrigin.push(...this.resultEnd)
+        this.$emit('openComputed', this.resultOrigin)
+        this.dialogTableVisibleMore = false
 
-        }
       },
     }
   }

+ 1 - 3
src/views/data_admin/buildAssets/NoMap.vue

@@ -28,14 +28,12 @@
         <base-pagination class='data-table-pagination' style="text-align:right;" :currentPages='pageNum' :total='total' @pageChanged='pageChanged'></base-pagination>
         <!-- component -->
         <saga-dialog ref='dialog' :iframeSrc='iframeSrc'></saga-dialog>
-        <saga-station ref='station' :options='options' :itemObj='itemObj' @refresh='refresh'></saga-station>
     </div>
 </template>
 
 <script>
 import { mapGetters } from 'vuex'
 import SagaDialog from './Frame'
-import SagaStation from './Station'
 //api
 import {
     getErrAssets, //获取异常资产type不同不同tab
@@ -68,7 +66,7 @@ export default {
     },
     components: {
         SagaDialog,
-        SagaStation
+
     },
     computed: {
         ...mapGetters('layout', ['projectId', 'userId', 'secret'])

+ 0 - 123
src/views/data_admin/buildAssets/Station.vue

@@ -1,123 +0,0 @@
-<template>
-    <el-dialog title='添加对应岗位' :visible.sync='dialogVisible' width='500px'>
-        <div class='add-box'>
-            <el-select v-model='value' placeholder='资产设备族对应的设备类' clearable style="width: 300px">
-                <el-option v-for='item in options' :key='item.code' :label='item.name' :value='item.code'></el-option>
-            </el-select>
-        </div>
-        <span slot='footer' class='dialog-footer'>
-            <el-button type='primary' @click='save'>确定创建对应岗位</el-button>
-        </span>
-    </el-dialog>
-</template>
-
-<script>
-import {
-    createPost, //新建岗位
-    upDateTableMain, //关联资产
-    createComponent //新建岗位(部件)
-} from '@/api/scan/request'
-import { mapGetters } from 'vuex'
-export default {
-    name: 'saga-station',
-    data() {
-        return {
-            dialogVisible: false,
-            value: ''
-        }
-    },
-    computed: {
-        ...mapGetters('layout', ['projectId', 'secret', 'userId'])
-    },
-    props: {
-        options: {
-            default: []
-        },
-        itemObj: {
-            default: {}
-        }
-    },
-    methods: {
-        show() {
-            this.dialogVisible = true
-        },
-        save() {
-            if (this.value) {
-                let param = {
-                    BuildId: this.itemObj.BuildId,
-                    category: this.value,
-                    secret: this.secret,
-                    perjectId: this.projectId,
-                    BIMID: this.itemObj.FloorId,
-                    BIMLocation: (this.itemObj.X || 0) + ',' + (this.itemObj.Y || 0) + ',' + (this.itemObj.Z || 0)
-                }
-                if (param.category.length == 6) {
-                    createComponent(param).then(res => {
-                        if (res.data.Result == 'success') {
-                            this.upDateTableMain(res.data.id)
-                        } else {
-                            this.$message({
-                                message: res.data.ResultMsg,
-                                type: 'warning'
-                            })
-                        }
-                    })
-                } else {
-                    createPost(param).then(res => {
-                        if (res.data.Result == 'success') {
-                            this.upDateTableMain(res.data.id)
-                        } else {
-                            this.$message({
-                                message: res.data.ResultMsg,
-                                type: 'warning'
-                            })
-                        }
-                    })
-                }
-            } else {
-                this.$message({
-                    message: '请选择设备类后再进行关联',
-                    type: 'warning'
-                })
-            }
-        },
-        //关联资产
-        upDateTableMain(id) {
-            let param = {
-                    ProjId: this.projectId,
-                    UserId: this.userId
-                },
-                paramList = {}
-            paramList.EquipmentId = id
-            paramList.FmId = this.itemObj.FmId
-            paramList.Family = this.itemObj.Family
-            upDateTableMain(param, [paramList]).then(res => {
-                if (res.data.Result == 'success') {
-                    this.$message({
-                        message: '保存成功',
-                        type: 'success'
-                    })
-                    this.dialogVisible = false
-                    this.$emit('refresh')
-                } else {
-                    this.$message.error('请求失败')
-                }
-            })
-        }
-    },
-    watch: {
-        options: {
-            deep: true,
-            handler(val) {
-                this.value = ''
-            }
-        }
-    }
-}
-</script>
-
-<style scoped lang='less'>
-.add-box {
-    height: 100px;
-}
-</style>

+ 0 - 2
src/views/data_admin/buildAssets/index.vue

@@ -51,7 +51,6 @@
 <script>
 import SagaNofind from './Nofind'
 import SagaNopaint from './Nopaint'
-import SagaNomap from './Nomap'
 import SagaVerify from './Noverify'
 import { mapGetters } from 'vuex'
 //api
@@ -79,7 +78,6 @@ export default {
   components: {
     SagaNofind,
     SagaNopaint,
-    SagaNomap,
     SagaVerify
   },
   methods: {

+ 0 - 915
src/views/data_admin/buildAssets/index2.vue

@@ -1,915 +0,0 @@
-<!--
-  revit一次资产清单
- -->
-<template>
-    <div id="build_assets">
-        <div class="select_header">
-            <!-- <button @click="download"></button> -->
-            <i>建筑名称:</i>
-            <!-- <select name="" id="" v-model="select" @change="changeSelect">
-                <option :value="item.BuildId" v-for="item in BuildList">{{item.BuildName}}</option>
-          </select>-->
-            <el-select v-model="select" placeholder="请选择" @change="changeSelect">
-                <el-option v-for="item in BuildList" :key="item.BuildId" :label="item.BuildLocalName" :value="item.BuildId"></el-option>
-            </el-select>
-        </div>
-        <div class="main">
-            <div class="left_main">
-                <el-tabs type="border-card" @tab-click="createHotBtn">
-                    <el-tab-pane v-for="(item,index) in textArr" :label="item" v-loading="loading" :key="index">
-                        <div style="padding: .2rem;width:100%;">
-                            <!-- 这里不能使用if判断,因为可能存在vue实例渲染时document先进行查找 -->
-                            <div :id="'assets' + index" v-show="noData[index]"></div>
-                            <div v-show="!noData[index]">暂无数据</div>
-                        </div>
-                        <div class="assets_page">
-                            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="currentPage[tabCheck]" :page-sizes="pageSizeArrs" :page-size="pageSizeArr[tabCheck]" layout="total, sizes, prev, pager, next, jumper" :total="pageCount[tabCheck]"></el-pagination>
-                        </div>
-                    </el-tab-pane>
-                </el-tabs>
-            </div>
-        </div>
-        <el-dialog title="确定设备类" :visible.sync="familyDialog" :width="'30%'">
-            <el-select v-model="checkFamily" placeholder="与资产设备族对应的设备类">
-                <el-option v-for="item in showFamily" :key="item.code" :label="item.name" :value="item.code"></el-option>
-            </el-select>
-            <span slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="correlation">确定创建对应岗位</el-button>
-            <el-button @click="familyDialog = false">取 消</el-button>
-          </span>
-        </el-dialog>
-        <!-- 请求提示弹窗 -->
-        <el-dialog title="提示" :visible.sync="dialogVisible">
-            <span>{{ajaxMsg}}</span>
-            <span slot="footer" class="dialog-footer">
-            <el-button @click="dialogVisible = false">取 消</el-button>
-            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
-          </span>
-        </el-dialog>
-        <!-- 详情弹窗 -->
-        <el-dialog title="详情" class="iframe" v-if="iframeShow" :visible.sync="iframeShow">
-            <iframe id="google_ads_frame2" name="google_ads_frame2" frameborder="0" :src="iframeSrc" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true"></iframe>
-            <span slot="footer" class="dialog-footer">
-            <el-button @click="iframeShow = false">关 闭</el-button>
-            <!-- <el-button type="danger" @click="isDelAsset">删 除 该 资 产</el-button> -->
-            <el-button @click="isDelAsset">删 除 该 资 产</el-button>
-          </span>
-        </el-dialog>
-        <!-- 确定删除资产弹窗 -->
-        <el-dialog title="删除资产" :visible.sync="del">
-            <span>你确定删除该资产吗?</span>
-            <span slot="footer" class="dialog-footer">
-            <el-button @click="del = false">关 闭</el-button>
-            <el-button @click="delAsset">删 除</el-button>
-          </span>
-        </el-dialog>
-    </div>
-</template>
-
-<script>
-    import {
-        getBuildSelect, //根据项目ID获得建筑列表
-        getErrAssets, //获取异常资产type不同不同tab
-        delErrAssets, //删除异常资产
-        getAllFamily, //获取所有设备族
-        createPost, //新建岗位
-        upDateTableMain, //关联资产
-        getSpaceId, //获取空间id
-        getSpaceName, //获取空间名称
-        createComponent, //新建岗位(部件)
-        getAllbusiness, //获取楼层信息
-    } from "@/api/scan/request";
-    import {
-        mapGetters,
-        mapActions
-    } from "vuex";
-    import tools from '@/utils/scan/tools.js'
-    import Handsontable from "handsontable-pro"
-    import 'handsontable-pro/dist/handsontable.full.css'
-    import zhCN from 'handsontable-pro/languages/zh-CN';
-    export default {
-        computed: {
-            ...mapGetters("layout", [
-                "projectId",
-                "secret",
-                "userId"
-            ])
-        },
-        data() {
-            return {
-                BuildList: [], //下拉列表
-                textArr: [
-                    "现场无法找到的资产",
-                    "未画入模型的资产",
-                    "无对应岗位的资产",
-                    "未扫楼验证的资产"
-                ], //tab内容
-                select: "all", //下拉选中数据
-                data: [], //假数据
-                idArr: ["notFound", "noModel", "noJob", "noVerify"], //选中tab
-                myHotObj: [], //Handsontable实例数组
-                dialogVisible: false, //请求错误弹窗
-                ajaxMsg: "", //请求错误提示
-                currentPageArr: [1, 1, 1, 1], //当前选中页数数组
-                pageCount: [10, 10, 10, 10], //总共数据条数
-                pageSizeArrs: [10, 30, 50, 100], //下拉页数个数
-                pageSizeArr: [10, 10, 10, 10], //数组当前页个数
-                currentPage: [1, 1, 1, 1], //当前页数
-                tabCheck: 0, //当前选中的check
-                loading: true,
-                noData: [true, true, true, true],
-                iframeShow: false, //资产详情页弹窗
-                del: false,
-                FmList: [],
-                ProjId: this.projectId, //url获取项目id this.$route.query.projId
-                UserId: this.userId, //url获取用户id this.$route.query.userId
-                iframeSrc: "", //iframe的地址
-                allFamily: [], //所有的设备族
-                showFamily: [], //弹窗显示的设备类
-                familyDialog: false, //选择设备族弹窗
-                checkFamily: "", //选中的设备类
-                temporaryData: [], //暂时的数据
-                filtersArr: [],
-                copyData: null, //深拷贝数据
-                floors: [], //楼层信息
-            };
-        },
-        created() {
-            console.log(this.ProjId,"projectId")
-            this.ProjId = this.projectId
-            this.UserId = this.userId
-            this.getBuilding();
-            this.myHotObj.length = this.textArr.length;
-            //获取所有所有的设备族
-            this.getAllFamily();
-        },
-        mounted() {
-            this.getFloors()
-        },
-        methods: {
-            download() {
-                this.myHotObj[this.tabCheck].getPlugin('exportFile').downloadFile("csv", {
-                    filename: "嘉铭项目无对应岗位的资产",
-                    columnHeaders: true,
-                    exportHiddenRows: true,
-                    exportHiddenColumns: true,
-                    rowHeaders: true
-                })
-            },
-            //建筑选择事件
-            changeSelect() {
-                this.getErrAssets();
-            },
-            //获取所有楼层
-            getFloors() {
-                let param = {
-                    ProjId: this.ProjId,
-                    secret: this.secret,
-                    id: this.ProjId,
-                    type: ["Fl"]
-                }
-                getAllbusiness(param).then(res => {
-                    if (res.data.Result == "success") {
-                        this.floors = res.data.Content.map(item => {
-                            return {
-                                FloorLocalName: item.infos.FloorLocalName,
-                                FloorID: item.infos.FloorID
-                            }
-                        })
-                    } else {
-                        this.$message.error("请求出错" + res.data.ResultMsg)
-                    }
-                    this.getErrAssets();
-                })
-            },
-            //获取设备族
-            getAllFamily() {
-                getAllFamily().then(result => {
-                    if (result.data.Result == "success") {
-                        this.allFamily = result.data.Content;
-                    } else {
-                        this.dialogVisible = true;
-                        this.ajaxMsg = "请求出错";
-                    }
-                });
-            },
-            //新建岗位设备类
-            createPost() {
-                let param = {
-                    BuildId: this.temporaryData.BuildId,
-                    category: this.checkFamily,
-                    secret: this.secret,
-                    perjectId: this.ProjId,
-                    BIMID: this.temporaryData.FloorId,
-                    BIMLocation: (this.temporaryData.X || 0) + "," + (this.temporaryData.Y || 0) + "," + (this.temporaryData.Z || 0)
-                };
-                if (param.category.length == 6) {
-                    createComponent(param).then(res => {
-                        if (res.data.Result == "success") {
-                            this.upDateTableMain(res.data.id);
-                        } else {
-                            this.$message({
-                                message: res.data.ResultMsg,
-                                type: "warning"
-                            });
-                        }
-                    });
-                } else {
-                    createPost(param).then(res => {
-                        if (res.data.Result == "success") {
-                            this.upDateTableMain(res.data.id);
-                        } else {
-                            this.$message({
-                                message: res.data.ResultMsg,
-                                type: "warning"
-                            });
-                        }
-                    });
-                }
-            },
-            //获取元空间名称
-            getSpaceName(arr) {
-                let param = {
-                    perjectId: this.ProjId,
-                    secret: this.secret,
-                    list: arr
-                };
-                getSpaceName(param).then(res => {
-                    if (res.data.Result == "success") {
-                        let data = res.data.Content;
-                        for (let i = 0; i < this.data[3].length; i++) {
-                            let findData = data.find(
-                                item =>
-                                item.id == this.data[3][i].spaceId &&
-                                this.data[3][i].spaceName == undefined
-                            );
-                            if (findData != undefined) {
-                                this.data[3][i].spaceName = findData.infos.RoomLocalName;
-                            }
-                        }
-                        this.myHotObj[3].loadData(this.data[3]);
-                    } else {}
-                });
-            },
-            //获取元空间id
-            getSpaceId() {
-                let param = {},
-                    idArr = [],
-                    i = 0,
-                    dataArr = this.data[this.tabCheck];
-                for (; i < dataArr.length; i++) {
-                    if (dataArr[i].EquipmentId) {
-                        idArr.push({
-                            from_id: dataArr[i].EquipmentId,
-                            graph_id: "GtEquipinSpace001",
-                            rel_type: "1"
-                        });
-                    }
-                }
-                param = {
-                    perjectId: this.ProjId,
-                    secret: this.secret,
-                    list: idArr
-                };
-                getSpaceId(param).then(res => {
-                    let data = res.data,
-                        spaceArr = [],
-                        j = 0;
-                    if (data.Result == "success") {
-                        for (; j < data.Content.length; j++) {
-                            console.log(data.Content)
-                            if (data.Content[j].Count != 0) {
-                                spaceArr.push({
-                                    id: data.Content[j].Content[0].to_id
-                                });
-                                dataArr.map(item => {
-                                    if (item.EquipmentId == data.Content[j].Content[0].from_id) {
-                                        item.spaceId = data.Content[j].Content[0].to_id;
-                                    }
-                                    return item
-                                })
-                            }
-                        }
-                        console.log(dataArr, "dataArr")
-                        this.getSpaceName(spaceArr);
-                    } else {}
-                });
-            },
-            //获取资产设备类
-            getEquipmentName() {
-                let param = {},
-                    idArr = [],
-                    i = 0,
-                    dataArr = this.data[this.tabCheck];
-                for (; i < dataArr.length; i++) {
-                    if (dataArr[i].EquipmentId) {
-                        idArr.push({
-                            id: dataArr[i].EquipmentId
-                        });
-                    }
-                }
-                param = {
-                    perjectId: this.ProjId,
-                    secret: this.secret,
-                    list: idArr
-                };
-                getSpaceName(param).then(res => {
-                    if (res.data.Result == "success") {
-                        let data = res.data.Content;
-                        for (let i = 0; i < this.data[this.tabCheck].length; i++) {
-                            let findData = data.find(
-                                item => item.id == this.data[this.tabCheck][i].EquipmentId
-                            );
-                            if (findData != undefined) {
-                                let findFamily = this.allFamily.find(
-                                    item => item.code == this.data[this.tabCheck][i].Family
-                                ).content;
-                                this.data[this.tabCheck][i].familyArr = findFamily;
-                                this.data[this.tabCheck][i].assetType = findData.category.substr(
-                                    2,
-                                    6
-                                );
-                                this.data[this.tabCheck][i].assetName = findFamily.find(
-                                    item => item.code == findData.category.substr(2, 6)
-                                ).name;
-                                this.data[this.tabCheck][i].bimXY = findData.infos.BIMLocation || "--"
-                                this.data[this.tabCheck][i].html =
-                                    '<p style="color:#409EFF;cursor: pointer;">查看岗位详情</p>';
-                            }
-                        }
-                        this.myHotObj[this.tabCheck].loadData(this.data[this.tabCheck]);
-                    } else {}
-                });
-            },
-            //关联资产
-            upDateTableMain(id) {
-                let param = {
-                        ProjId: this.ProjId,
-                        UserId: this.UserId
-                    },
-                    paramList = {};
-                paramList.EquipmentId = id;
-                paramList.FmId = this.temporaryData.FmId;
-                paramList.Family = this.temporaryData.Family;
-                upDateTableMain(param, [paramList]).then(res => {
-                    if (res.data.Result == "success") {
-                        this.$message({
-                            message: "绑定成功",
-                            type: "success"
-                        });
-                        this.familyDialog = false;
-                        this.createHotBtn({
-                            index: this.tabCheck
-                        })
-                    } else {
-                        this.$message.error("请求失败");
-                    }
-                });
-            },
-            //获取异常资产
-            getErrAssets() {
-                let param = {
-                    BuildId: this.select,
-                    PageNum: this.currentPage[this.tabCheck],
-                    PageSize: this.pageSizeArr[this.tabCheck],
-                    Type: this.tabCheck + 1,
-                    ProjId: this.ProjId,
-                    UserId: this.UserId
-                };
-                if (this.tabCheck == 3) {
-                    param.CodeType = 1
-                } else {
-                    delete param.CodeType
-                }
-                let headerArr = [],
-                    columnsArr = [];
-                if (this.tabCheck != 3) {
-                    headerArr = [
-                        "建筑",
-                        "楼层",
-                        "点位标签名称",
-                        "设备族",
-                        "本地编码",
-                        "本地名称"
-                    ];
-                    columnsArr = [{
-                            data: "BuildName"
-                        },
-                        {
-                            data: "FloorName"
-                        },
-                        {
-                            data: "PointName"
-                        },
-                        {
-                            data: "FamilyName"
-                        },
-                        {
-                            data: "FmId"
-                        },
-                        {
-                            data: "FmName"
-                        }
-                    ];
-                } else {
-                    headerArr = [
-                        "建筑",
-                        "楼层",
-                        "设备族",
-                        "本地编码",
-                        "本地名称",
-                        "所在元空间",
-                        "对应设备类",
-                        "BIM模型中坐标",
-                        "对应的岗位",
-                        "查看资产详情"
-                    ];
-                    columnsArr = [{
-                            data: "BuildName"
-                        },
-                        {
-                            data: "FloorName"
-                        },
-                        {
-                            data: "FamilyName"
-                        },
-                        {
-                            data: "FmId"
-                        },
-                        {
-                            data: "FmName"
-                        },
-                        {
-                            data: "spaceName"
-                        },
-                        {
-                            data: "assetName"
-                        },
-                        {
-                            data: "bimXY",
-                        },
-                        {
-                            renderer: "html",
-                            data: "html"
-                        }, {
-                            renderer: tools.lookDetails,
-                            data: "details"
-                        }
-                    ];
-                }
-                if (this.tabCheck == 2) {
-                    headerArr.push("查看详情")
-                    columnsArr.push({
-                        renderer: tools.lookDetails,
-                        data: "details"
-                    })
-                }
-                //发起请求
-                getErrAssets(param).then(result => {
-                    if (result.data.Result == "success") {
-                        let id = "assets" + this.tabCheck;
-                        let dom = document.getElementById(id).innerText;
-                        if (result.data.Count) {
-                            this.noData[this.tabCheck] = true;
-                            //给数据添加楼层
-                            this.data[this.tabCheck] = result.data.FmList.map(item => {
-                                this.floors.map(floor => {
-                                    if (floor.FloorID == item.FloorId) {
-                                        item.FloorName = floor.FloorLocalName
-                                    }
-                                })
-                                return item
-                            });
-                            //拷贝一份数据以供删除
-                            this.copyData = tools.deepCopy(this.data[this.tabCheck])
-                            if (this.tabCheck == 3) {
-                                this.data[this.tabCheck] = result.data.FmList.map(item => {
-                                    item.bimXY = (item.X || '空') + "," + (item.Y || '空')
-                                    return item
-                                }).filter(d => d);
-                                this.getSpaceId();
-                                this.getEquipmentName();
-                            }
-                            if (dom) {
-                                this.loading = false;
-                                this.myHotObj[this.tabCheck].loadData(result.data.FmList);
-                            } else {
-                                this.$nextTick(() => {
-                                    this.createHot(
-                                        id,
-                                        this.tabCheck,
-                                        result.data.FmList,
-                                        headerArr,
-                                        columnsArr
-                                    );
-                                });
-                            }
-                            this.pageCount[this.tabCheck] = result.data.Count;
-                        } else {
-                            this.loading = false;
-                            this.noData[this.tabCheck] = false;
-                        }
-                    } else {
-                        this.dialogVisible = true;
-                        this.ajaxMsg = "请求出错";
-                    }
-                });
-            },
-            //删除资产
-            delAss() {
-                let param = {
-                    ProjId: this.ProjId,
-                    UserId: this.UserId
-                };
-                let paramList = [this.FmList.FmId];
-                delErrAssets(param, paramList).then(result => {
-                    if (result.data.Result == "success") {
-                        this.getErrAssets();
-                        return;
-                    } else {
-                        this.dialogVisible = true;
-                        this.ajaxMsg = "请求出错";
-                    }
-                });
-            },
-            //获取建筑列表
-            getBuilding() {
-                let param = {
-                    ProjId: this.ProjId,
-                    UserId: this.UserId
-                };
-                getBuildSelect(param).then(result => {
-                    if (result.data.Result == "success") {
-                        this.BuildList = result.data.BuildList;
-                        this.BuildList.unshift({
-                            BuildId: "all",
-                            BuildLocalId: "全部",
-                            BuildLocalName: "全部",
-                            BuildName: "全部"
-                        });
-                        this.select = this.BuildList[0].BuildId;
-                    } else {
-                        this.dialogVisible = true;
-                        this.ajaxMsg = "接口请求错误";
-                    }
-                });
-            },
-            //改变页面个数
-            handleSizeChange(val) {
-                this.pageSizeArr[this.tabCheck] = val;
-                this.getErrAssets();
-            },
-            //改变页面页数
-            handleCurrentChange(val) {
-                this.currentPage[this.tabCheck] = val;
-                this.getErrAssets();
-            },
-            //点击tab创建对应的表格
-            createHotBtn(tab, event) {
-                let id = "assets" + this.tabCheck;
-                let dom = document.getElementById(id).innerText;
-                this.tabCheck = Number(tab.index);
-                this.loading = true;
-                this.getErrAssets();
-            },
-            //弹窗点击删除事件
-            isDelAsset() {
-                this.iframeShow = false;
-                this.del = true;
-            },
-            //确定删除事件
-            delAsset() {
-                this.del = false;
-                this.delAss();
-            },
-            //关联资产确定
-            correlation() {
-                if (this.checkFamily == "") {
-                    this.$message({
-                        message: "请选择设备类后再进行关联",
-                        type: "warning"
-                    });
-                } else {
-                    this.createPost();
-                }
-            },
-            //Handsontable表格单击事件
-            tableDown(val, key) {
-                //是否是岗位
-                let isAsset = false;
-                this.FmList = this.data[this.tabCheck][key.row];
-                if (this.tabCheck == 3 || (this.tabCheck == 2 && key.col == 6)) {
-                    this.clickTab3(val, key)
-                    return
-                }
-                if (key.row < 0 || this.tabCheck == 2 || isAsset) {
-                    return;
-                } else {
-                    this.iframeSrc =
-                        process.env.BASE_URL +
-                        ":8889/#/details?perjectId=" +
-                        this.ProjId +
-                        "&secret=" +
-                        this.secret +
-                        "&FmId=" +
-                        this.FmList.FmId +
-                        "&type=1&code=" +
-                        this.FmList.Family;
-                    this.iframeShow = true;
-                }
-            },
-            clickTab3(val, rowArr) {
-                let trimmedArr = this.trimmedRows();
-                //是否启用了排序
-                let isSort = this.myHotObj[this.tabCheck]
-                    .getPlugin("columnSorting")
-                    .isSorted();
-                // debugger
-                let infos = null
-                if (trimmedArr.length && isSort) {
-                    let sortArr = this.myHotObj[this.tabCheck].getPlugin("columnSorting")
-                        .rowsMapper.__arrayMap;
-                    infos = this.data[this.tabCheck][
-                        trimmedArr[sortArr[rowArr.row]]
-                    ];
-                } else if (isSort) {
-                    //排序后的数组
-                    let sortArr = this.myHotObj[this.tabCheck].getPlugin("columnSorting")
-                        .rowsMapper.__arrayMap;
-                    infos = this.data[this.tabCheck][sortArr[rowArr.row]];
-                } else if (trimmedArr.length) {
-                    infos = this.data[this.tabCheck][trimmedArr[rowArr.row]];
-                } else {
-                    infos = this.data[this.tabCheck][rowArr.row];
-                }
-                if (rowArr.col == 8 || rowArr.col == 9) {
-                    this.lookTab3Details(infos, rowArr);
-                }
-                this.FmList = infos
-                if (this.tabCheck == 2 && rowArr.col == 6) {
-                    this.iframeSrc =
-                        process.env.BASE_URL +
-                        ":8889/#/details?perjectId=" +
-                        this.ProjId +
-                        "&secret=" +
-                        this.secret +
-                        "&FmId=" +
-                        infos.FmId +
-                        "&type=0&code=" +
-                        infos.Family;
-                    this.iframeShow = true;
-                    return
-                }
-                if (this.tabCheck == 3) {
-                    return
-                }
-            },
-            lookTab3Details(infos, rowArr) {
-                if (rowArr.col == 8) {
-                    if (!!infos.html) {
-                        this.iframeSrc =
-                            process.env.BASE_URL +
-                            ":8889/#/details?perjectId=" +
-                            this.ProjId +
-                            "&secret=" +
-                            this.secret +
-                            "&FmId=" +
-                            infos.EquipmentId +
-                            "&type=0&code=" +
-                            infos.assetType;
-                        this.iframeShow = true;
-                    }
-                }
-                if (rowArr.col == 9) {
-                    this.iframeSrc =
-                        process.env.BASE_URL +
-                        ":8889/#/details?perjectId=" +
-                        this.ProjId +
-                        "&secret=" +
-                        this.secret +
-                        "&FmId=" +
-                        infos.FmId +
-                        "&type=0&code=" +
-                        infos.Family;
-                    this.iframeShow = true;
-                }
-            },
-            //自定义菜单被点击触发事件
-            menuCallback(key, selection, clickEvent) {
-                if (selection) {
-                    let index = selection[0].start.row;
-                    this.temporaryData = this.data[this.tabCheck][index];
-                    this.showFamily = this.findFamily(this.temporaryData.Family).content;
-                    this.checkFamily = ""; //清空设备类
-                    this.familyDialog = true;
-                }
-            },
-            getDetails(key, selection, clickEvent) {
-                if (selection) {
-                    this.tableDown("", selection);
-                }
-            },
-            //数组查询族
-            findFamily(str) {
-                return this.allFamily.find(item => item.code == str);
-            },
-            //自定义右键菜单
-            customMenu(val) {
-                if (this.tabCheck == 2) {
-                    return {
-                        callback: function(key, selection, clickEvent) {},
-                        items: {
-                            about: {
-                                name: "自动创建对应资产",
-                                callback: this.menuCallback
-                            }
-                            // about: {
-                            //   name: "查看资产详情",
-                            //   callback: this.getDetails
-                            // }
-                        }
-                    };
-                } else {
-                    return "";
-                }
-            },
-            //创建表格实例
-            createHot(id, variableNum, data, headerArr, columnsArr) {
-                let that = this;
-                let containter = document.getElementById(id);
-                let options = {
-                    data: data,
-                    colHeaders: headerArr,
-                    manualColumnResize: true,
-                    manualColumnMove: true,
-                    height: 750,
-                    stretchH: "all",
-                    // maxRows: this.pageSizeArr[variableNum],
-                    renderAllRows: true,
-                    readOnly: true,
-                    autoColumnSize: true,
-                    columns: columnsArr,
-                    afterOnCellMouseDown: this.tableDown,
-                    contextMenu: this.customMenu()
-                };
-                if (this.tabCheck == 3) {
-                    options.contextMenu = {
-                        items: {
-                            remove_row: {
-                                name: "删除资产"
-                            }
-                        }
-                    }
-                    options.columnSorting = true //添加排序
-                    options.sortIndicator = true //添加排序
-                    options.dropdownMenu = [
-                        "filter_by_condition",
-                        "filter_by_value",
-                        "filter_action_bar"
-                    ]
-                    options.filters = true
-                    options.afterFilter = this.trimmedRows
-                    options.afterRemoveRow = this.romoveFm //右键删除
-                }
-                this.myHotObj[variableNum] = new Handsontable(containter, options);
-                //存在点击tab后分页不正确的问题,使用0转换
-                this.tabCheck = 0;
-                this.tabCheck = variableNum;
-                this.loading = false;
-                let pro = document.getElementById("hot-display-license-info");
-                pro.parentNode.removeChild(pro);
-            },
-            //删除资产
-            romoveFm(index, rowArr) {
-                let a = this.data[this.tabCheck]
-                let b = this.copyData
-                //获取相同的值
-                // let intersection = a.filter(v => b.includes(v))
-                //取差值
-                let difference = a.concat(b).filter(v => !a.includes(v) || !b.includes(v))
-                let param = {
-                    ProjId: this.ProjId,
-                    UserId: this.UserId
-                };
-                let paramList = difference.map(item => {
-                    return item.FmId
-                })
-                this.$confirm('确认删除?')
-                    .then(_ => {
-                        delErrAssets(param, paramList).then(result => {
-                            if (result.data.Result == "success") {
-                                this.createHotBtn({
-                                    index: this.tabCheck
-                                })
-                                return;
-                            } else {
-                                this.dialogVisible = true;
-                                this.ajaxMsg = "请求出错";
-                            }
-                        });
-                    })
-                    .catch(_ => {
-                        this.createHotBtn({
-                            index: this.tabCheck
-                        })
-                    });
-            },
-            //获取被筛选掉的行号
-            trimmedRows() {
-                // var plugin = hot.getPlugin('trimRows').trimmedRows;//获取被筛选掉的行号
-                var plugin = this.myHotObj[this.tabCheck].getPlugin("trimRows")
-                    .trimmedRows;
-                let dataLength = this.pageSizeArr[this.tabCheck];
-                let dataArr = new Array();
-                for (let i = 0; i < dataLength; i++) {
-                    dataArr.push(i);
-                }
-                if (plugin.length <= 0) {
-                    dataArr = undefined;
-                } else {
-                    dataArr = this.array_diff(dataArr, plugin);
-                }
-                this.filtersArr[this.tabCheck] = dataArr;
-                return dataArr || [];
-                // var DataArray = new Array();
-                // for (var i = 0; i < plugin.length; i++) {
-                //     // 通过行号获取数据
-                //     DataArray.push(this.myHotObj[this.tabCheck].getSourceDataAtRow(plugin[i]));
-                // }
-            },
-            //去除数组中相同的元素
-            array_diff(a, b) {
-                for (var i = 0; i < b.length; i++) {
-                    for (var j = 0; j < a.length; j++) {
-                        if (a[j] == b[i]) {
-                            a.splice(j, 1);
-                            j = j - 1;
-                        }
-                    }
-                }
-                return a;
-            },
-        }
-    };
-</script>
-
-<style lang="less" scoped>
-    #app {
-        min-width: 1098px;
-        min-height: 767px;
-        position: relative;
-        overflow-x: auto;
-    }
-    #build_assets {
-        height: 100%;
-        width: 100%;
-        overflow: hidden;
-        position: relative;
-        #assets0,
-        #assets1,
-        #assets2 {
-            height: 45rem;
-            overflow-y: auto;
-        }
-        .select_header {
-            font-size: 0.8rem;
-            height: 3rem;
-            width: 100%;
-            min-width: 1098px;
-            line-height: 3rem;
-            background-color: #eee;
-            border-bottom: 1px solid #000;
-            padding-left: 0.5rem;
-            position: absolute;
-            top: 0;
-            box-sizing: border-box;
-        }
-        .main {
-            width: 100%;
-            position: absolute;
-            top: 3.5rem;
-            bottom: 0;
-            overflow: hidden;
-            .left_main {
-                height: 100%;
-                box-sizing: border-box;
-                float: left;
-                width: 100%;
-                position: relative;
-                .el-tabs--border-card {
-                    position: absolute;
-                    left: 0.4rem;
-                    right: 0;
-                    top: 0;
-                    bottom: 0.4rem;
-                }
-            }
-        }
-        .iframe {
-            iframe {
-                width: 760px;
-                height: 100%;
-            }
-        }
-    }
-</style>

+ 7 - 9
src/views/relation/relationShip/index.vue

@@ -113,7 +113,7 @@
         >
         </el-table-column>
         <el-table-column
-          prop="LocalId"
+          prop="LocalID"
           label="本地编码"
           align="left"
           min-width="100"
@@ -156,7 +156,7 @@
         >
         </el-table-column>
         <el-table-column
-          prop="cLocalId"
+          prop="cLocalID"
           align="left"
           label="本地编码"
         >
@@ -274,7 +274,7 @@
           optionTips: `请下载最新最新<${localStorage.getItem('RelationTypeName')}>数据进行手动维护`, //请下载最新最新 xxxx 数据进行手动维护
           currentNum: '当前关系数量:',
           download: '下载模板(含数据)',
-          lastTime: '最后更新时间为', //最后更新时间为
+          lastTime: '最后更新时间为' + localStorage.getItem('ComputingTime') || '', //最后更新时间为
           uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
           uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
           downloadFile: ' 下载报告文件',
@@ -342,7 +342,7 @@
         tableData: [],
         delParam: {},
         loading: false,
-        needMergeArr: ['Name', 'LocalId', 'LocalName', 'CADID', 'btn'],
+        needMergeArr: ['Name', 'LocalID', 'LocalName', 'CADID', 'btn'],
         rowMergeArrs: {}
         // needMergeArr: ['name', 'id'], // 有合并项的列
         // rowMergeArrs: {}, // 包含需要一个或多个合并项信息的对象
@@ -403,11 +403,11 @@
               arr.push({
                 Name: i.Name,
                 LocalName: i.LocalName,
-                LocalId: i.LocalId,
+                LocalID: i.LocalID,
                 CADID: i.CADID,
                 cName: j.Name,
                 cLocalName: j.LocalName,
-                cLocalId: j.LocalId,
+                cLocalID: j.LocalID,
                 cCADID: j.CADID,
                 Id: i.Id,
                 cId: j.Id
@@ -419,8 +419,6 @@
         } else {
           this.tableData = []
         }
-
-
       },
       back() {
         this.$router.go(-1)
@@ -502,7 +500,7 @@
 
       objectSpanMethod({row, column, rowIndex, columnIndex}) {
         if (column.property === 'Name') return this.mergeAction('Name', rowIndex, column);
-        if (column.property === 'LocalId' && row.LocalId != undefined) return this.mergeAction('LocalId', rowIndex, column);
+        if (column.property === 'LocalID' && row.LocalID != undefined) return this.mergeAction('LocalID', rowIndex, column);
         if (column.property === 'LocalName' && row.LocalName != undefined) return this.mergeAction('LocalName', rowIndex, column);
         if (column.property === 'CADID' && row.CADID != undefined) return this.mergeAction('CADID', rowIndex, column);
         if (column.property === 'btn') return this.mergeAction('Name', rowIndex, column);