zhangyu %!s(int64=5) %!d(string=hai) anos
pai
achega
de60952625

+ 1 - 1
src/components/ledger/cenote/elevationMap.vue

@@ -29,7 +29,7 @@
     </div>
     <div v-else class="saga-center">
       <i class="icon-wushuju iconfont"></i>
-      数据暂无
+      暂无数据
     </div>
   </div>
 </template>

+ 451 - 415
src/components/ledger/handsontables/device.vue

@@ -281,7 +281,8 @@
         deviceType: {}, //族3位编码及名称
         floorData: [],
         curDevice: '',//当前点击的设备id
-        addData: {}, //添加设备选择的设备类型
+        addData: {}, //
+        showParts: false,
         inputMap: {
           flowBuild: 'D1'
         }, //信息点和输入方式映射表
@@ -407,6 +408,7 @@
           }
           getEquipTableCon(param, res => {
             this.loading = false;
+            this.showParts = res.Message == "1"?true:false;// 判断是否显示包含的部件列
             this.tableData = res.Content.map((item) => {
               if (item.hasOwnProperty("BuildingId") && item.hasOwnProperty("FloorId")) {
                 item.flowBuild = item.BuildingId + "-" + item.FloorId
@@ -613,9 +615,15 @@
       formatHeaderData(list) {
         let arr = tools.copyArr(list)
         let data = showTools.headerTextFilter(arr, 'equipment', this.onlyRead, this.showType, true)
-        data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
-        if (this.showType == "all") {
+        if (this.showParts) {
+          data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
+        } else {
+          data.unshift("操作", "当前关联的资产", "所属系统实例");
+        }
+        if (this.showType == "all" && this.showParts) {
           data.splice(6, 0, "所属建筑楼层")
+        } else if (this.showType == "all" && !this.showParts) {
+          data.splice(5, 0, "所属建筑楼层")
         }
         return data;
       },
@@ -623,27 +631,46 @@
       formatHeaderType(list) {
         let arr = tools.copyArr(list)
         let data = showTools.headerTypeFilter(arr, 'equipment', this.onlyRead, this.showType, true)
-        data.unshift(
-          {
-            data: "caozuo",
-            renderer: tools.lookDetails,
-            readOnly: true
-          },
-          {
-            data: "LinkEquipLocalName",
-            readOnly: true,
-            renderer: tools.LinkEquipLocalName
-          }, {
-            data: "LinkSystem",
-            renderer: text.systemList,
-            readOnly: true
-          }, {
-            data: "Count",
-            readOnly: true,
-            renderer: tools.lookDetails
-          }
-        );
-        if (this.showType == "all") {
+        if (this.showParts) {
+          data.unshift(
+            {
+              data: "caozuo",
+              renderer: tools.lookDetails,
+              readOnly: true
+            },
+            {
+              data: "LinkEquipLocalName",
+              readOnly: true,
+              renderer: tools.LinkEquipLocalName
+            }, {
+              data: "LinkSystem",
+              renderer: text.systemList,
+              readOnly: true
+            }, {
+              data: "Count",
+              readOnly: true,
+              renderer: tools.lookDetails
+            }
+          );
+        } else {
+          data.unshift(
+            {
+              data: "caozuo",
+              renderer: tools.lookDetails,
+              readOnly: true
+            },
+            {
+              data: "LinkEquipLocalName",
+              readOnly: true,
+              renderer: tools.LinkEquipLocalName
+            }, {
+              data: "LinkSystem",
+              renderer: text.systemList,
+              readOnly: true
+            }
+          );
+        }
+        if (this.showType == "all" && this.showParts) {
           data.splice(6, 0, {
             data: "flowBuild",
             renderer: tools.customDropdownRenderer,
@@ -653,6 +680,16 @@
             },
             readOnly: this.onlyRead
           })
+        } else if (this.showType == "all" && !this.showParts) {
+          data.splice(5, 0, {
+            data: "flowBuild",
+            renderer: tools.customDropdownRenderer,
+            editor: "chosen",
+            chosenOptions: {
+              data: this.buildFloorData
+            },
+            readOnly: this.onlyRead
+          })
         }
         return data;
       },
@@ -666,7 +703,7 @@
         }
         this.hot = new Handsontable(container, {
           data: this.tableData,
-          fixedColumnsLeft: 6,
+          fixedColumnsLeft: this.showParts?6:5,
           colHeaders: this.formatHeaderData(this.tableHeader), //表头文案
           columns: this.formatHeaderType(this.tableHeader), //数据显示格式
           filters: true,
@@ -930,417 +967,416 @@
             break;
         }
       },
-
-        //获取到了正确的信息
-        getInfors(infos, row, el) {
-            let val = this.hot.colToProp(row.col);
-            let inputMode = this.inputMap[val];
-            this.row = row.row;
-            this.messKey = val;
-            this.firmDataType = 'row'
-            lStorage.set('screen_data', { path: this.$route.path, data: { equip: infos } })
-            switch (val) {
-                //操作
-                case 'caozuo':
-                    // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-                    // this.$message("开发中...")
-                    this.$router.push({
-                      path: "deviceDetails",
-                      query: {
-                        type: this.mess.deviceId,
-                        equipId: infos.EquipID,
-                        equipName: infos.EquipLocalName?infos.EquipLocalName:infos.EquipName?infos.EquipName:'',
-                        equipCode: infos.EquipLocalID?infos.EquipLocalID:'',
-                        data: this.tableData.map(item => {
-                          return {
-                            value: item.EquipID,
-                            label: item.EquipLocalName?item.EquipLocalName:item.EquipName?item.EquipName:''
-                          }
-                        })
-                      }
-                    })
-                    return false
-                //设备二维码图片
-                case 'EquipQRCode':
-                    this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
-                    if (!!this.qrcodeUrl) {
-                        this.myDialog.qrcode = true;
-                    } else {
-                        this.$message("此设备没有设备二维码");
-                    }
-                    return false
-                //关联系统
-                case 'LinkSystem':
-                    if (!this.onlyRead) {
-                        this.curDevice = infos.EquipID;
-                        this.systemList = this.tableData[row.row].LinkSystem || [];
-                        this.myDialog.systemType = true;
-                    }
-                    return false
-                //关联资产
-                case 'LinkEquipLocalName':
-                    if (!this.onlyRead) {
-                        this.myDialog.changeRea = true;
-                    }
-                    return false
-                //品牌型号弹窗
-                case 'DPManufacturerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.firm = true;
-                    }
-                    return false
-                //供应商信息弹窗
-                case 'DPSupplierID':
-                    if (!this.onlyRead) {
-                        this.myDialog.supplier = true;
-                    }
-                    return false
-                //维修商信息弹窗
-                case 'DPMaintainerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.maintainer = true;
-                    }
-                    return false
-                //保险公司信息
-                case 'DPInsurerID':
-                    if (!this.onlyRead) {
-                        this.myDialog.insurer = true;
-                    }
-                    return false
-                //供应合同编号
-                case 'LedgerParam.SupplyPurchase.SupplierContractID':
-                    if (!this.onlyRead) {
-                        let ContractIDflag = null;
-                        let DPSdata = this.tableData[row.row].DPSupplierID;
-                        if (DPSdata) {
-                            ContractIDflag = DPSdata.split("-")[0];
+      //获取到了正确的信息
+      getInfors(infos, row, el) {
+          let val = this.hot.colToProp(row.col);
+          let inputMode = this.inputMap[val];
+          this.row = row.row;
+          this.messKey = val;
+          this.firmDataType = 'row'
+          lStorage.set('screen_data', { path: this.$route.path, data: { equip: infos } })
+          switch (val) {
+              //操作
+              case 'caozuo':
+                  // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
+                  // this.$message("开发中...")
+                  this.$router.push({
+                    path: "deviceDetails",
+                    query: {
+                      type: this.mess.deviceId,
+                      equipId: infos.EquipID,
+                      equipName: infos.EquipLocalName?infos.EquipLocalName:infos.EquipName?infos.EquipName:'',
+                      equipCode: infos.EquipLocalID?infos.EquipLocalID:'',
+                      data: this.tableData.map(item => {
+                        return {
+                          value: item.EquipID,
+                          label: item.EquipLocalName?item.EquipLocalName:item.EquipName?item.EquipName:''
                         }
-                        if (!!ContractIDflag) {
-                            this.id = ContractIDflag;
-                            this.myDialog.supply = true;
-                        } else {
-                            this.$message("请先选择供应商");
-                        }
-                    }
-                    return false
-                //保险单号
-                case 'LedgerParam.InsuranceDoc.InsuranceNum':
-                    if (!this.onlyRead) {
-                        let DPInsurerIDflag = null;
-                        let DPIdata = this.tableData[row.row].DPInsurerID;
-                        if (DPIdata) {
-                            DPInsurerIDflag = DPIdata.split("-")[0];
-                        }
-                        if (!!DPInsurerIDflag) {
-                            this.id = DPInsurerIDflag;
-                            this.myDialog.guarantee = true;
-                        } else {
-                            this.$message("请先选择保险商");
-                        }
-                    }
-                    return false
-                //保险文件--设备文档--安装质检报告
-                case 'LedgerParam.InsuranceDoc.InsuranceFile':
-                case 'LedgerParam.PhotoDoc.Archive':
-                case 'LedgerParam.Siteinstall.CheckReport':
-                    let IPSdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.filesArr = IPSdata ? IPSdata : [];
-                    if (!this.onlyRead || this.filesArr.length) {
-                        this.myDialog.uploadFiles = true;
-                    }
-                    return false
-                //安装照片--安装图纸--设备铭牌照片--设备图纸
-                case 'LedgerParam.Siteinstall.InstallPic':
-                case 'LedgerParam.Siteinstall.InstallDrawing':
-                case 'LedgerParam.PhotoDoc.Nameplate':
-                case 'LedgerParam.PhotoDoc.Drawing':
-                    let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.imgsArr = SSPPdata ? SSPPdata : [];
-                    if (!this.onlyRead || this.imgsArr.length) {
-                        this.myDialog.uploadImgs = true;
-                    }
-                    return false
-                //设备照片
-                case 'LedgerParam.PhotoDoc.Pic':
-                    let Pdata = tools.dataForKey(this.tableData[row.row], val);
-                    this.picsArr = Pdata ? Pdata : [];
-                    if (!this.onlyRead || this.picsArr.length) {
-                        this.myDialog.pic = true;
-                    }
-                    return false
-                //包含的部件字段
-                case 'Count':
-                    let countUrl = this.onlyRead ? '/ledger/parts' : '/ledger/partsmanage';
-                    this.$router.push({path: countUrl, query: {
-                        deviceId: infos.EquipID,
-                        typeId: this.mess.deviceId,
-                        pageNo: this.page.currentPage,
-                        pageSize: this.page.size
-                    }});
-                    return false
-                default:
-                    break;
-            }
-            if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-                this.updateInfoPoint = val
-                this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-                this.myDialog.update = true
-            }
-        },
-        //关闭临时维护弹窗回调
-        handleCloseUpdate() {
-            this.updateInputShow = false
-            this.updateInfoPoint = ''
-            this.updateInput = ''
-        },
-        //更新临时维护信息点
-        handleClickUpdate() {
-            tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
-            this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
-            this.updateInputShow = false
-            this.myDialog.update = false
-            this.updateInput = ''
-        },
-        //获取被筛选掉的行号
-        trimmedRows() {
-            var plugin = this.hot.getPlugin("trimRows").trimmedRows;
-            let dataLength = this.tableData.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 || [];
-        },
-        //去除数组中相同的元素
-        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;
-        },
-        //如果选择供应商之后
-        supplierChange(data, type) {
-            if (type === 'dialog') {
-                let firm = {...data, num: 8}
-                this.firmName = firm
-            } else {
-                tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
-                tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
-                this.handleUpdataTable(
-                    [
-                        [this.row, "DPSupplierID", null, data.venderId],
-                        [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
-                    ],
-                    "edit"
-                )
-                // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
-            }
-
+                  })
+                  return false
+              //设备二维码图片
+              case 'EquipQRCode':
+                  this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
+                  if (!!this.qrcodeUrl) {
+                      this.myDialog.qrcode = true;
+                  } else {
+                      this.$message("此设备没有设备二维码");
+                  }
+                  return false
+              //关联系统
+              case 'LinkSystem':
+                  if (!this.onlyRead) {
+                      this.curDevice = infos.EquipID;
+                      this.systemList = this.tableData[row.row].LinkSystem || [];
+                      this.myDialog.systemType = true;
+                  }
+                  return false
+              //关联资产
+              case 'LinkEquipLocalName':
+                  if (!this.onlyRead) {
+                      this.myDialog.changeRea = true;
+                  }
+                  return false
+              //品牌型号弹窗
+              case 'DPManufacturerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.firm = true;
+                  }
+                  return false
+              //供应商信息弹窗
+              case 'DPSupplierID':
+                  if (!this.onlyRead) {
+                      this.myDialog.supplier = true;
+                  }
+                  return false
+              //维修商信息弹窗
+              case 'DPMaintainerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.maintainer = true;
+                  }
+                  return false
+              //保险公司信息
+              case 'DPInsurerID':
+                  if (!this.onlyRead) {
+                      this.myDialog.insurer = true;
+                  }
+                  return false
+              //供应合同编号
+              case 'LedgerParam.SupplyPurchase.SupplierContractID':
+                  if (!this.onlyRead) {
+                      let ContractIDflag = null;
+                      let DPSdata = this.tableData[row.row].DPSupplierID;
+                      if (DPSdata) {
+                          ContractIDflag = DPSdata.split("-")[0];
+                      }
+                      if (!!ContractIDflag) {
+                          this.id = ContractIDflag;
+                          this.myDialog.supply = true;
+                      } else {
+                          this.$message("请先选择供应商");
+                      }
+                  }
+                  return false
+              //保险单号
+              case 'LedgerParam.InsuranceDoc.InsuranceNum':
+                  if (!this.onlyRead) {
+                      let DPInsurerIDflag = null;
+                      let DPIdata = this.tableData[row.row].DPInsurerID;
+                      if (DPIdata) {
+                          DPInsurerIDflag = DPIdata.split("-")[0];
+                      }
+                      if (!!DPInsurerIDflag) {
+                          this.id = DPInsurerIDflag;
+                          this.myDialog.guarantee = true;
+                      } else {
+                          this.$message("请先选择保险商");
+                      }
+                  }
+                  return false
+              //保险文件--设备文档--安装质检报告
+              case 'LedgerParam.InsuranceDoc.InsuranceFile':
+              case 'LedgerParam.PhotoDoc.Archive':
+              case 'LedgerParam.Siteinstall.CheckReport':
+                  let IPSdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.filesArr = IPSdata ? IPSdata : [];
+                  if (!this.onlyRead || this.filesArr.length) {
+                      this.myDialog.uploadFiles = true;
+                  }
+                  return false
+              //安装照片--安装图纸--设备铭牌照片--设备图纸
+              case 'LedgerParam.Siteinstall.InstallPic':
+              case 'LedgerParam.Siteinstall.InstallDrawing':
+              case 'LedgerParam.PhotoDoc.Nameplate':
+              case 'LedgerParam.PhotoDoc.Drawing':
+                  let SSPPdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.imgsArr = SSPPdata ? SSPPdata : [];
+                  if (!this.onlyRead || this.imgsArr.length) {
+                      this.myDialog.uploadImgs = true;
+                  }
+                  return false
+              //设备照片
+              case 'LedgerParam.PhotoDoc.Pic':
+                  let Pdata = tools.dataForKey(this.tableData[row.row], val);
+                  this.picsArr = Pdata ? Pdata : [];
+                  if (!this.onlyRead || this.picsArr.length) {
+                      this.myDialog.pic = true;
+                  }
+                  return false
+              //包含的部件字段
+              case 'Count':
+                  let countUrl = this.onlyRead ? '/ledger/parts' : '/ledger/partsmanage';
+                  this.$router.push({path: countUrl, query: {
+                      deviceId: infos.EquipID,
+                      typeId: this.mess.deviceId,
+                      pageNo: this.page.currentPage,
+                      pageSize: this.page.size
+                  }});
+                  return false
+              default:
+                  break;
+          }
+          if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
+              this.updateInfoPoint = val
+              this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+              this.myDialog.update = true
+          }
       },
-      //供应合同编号
-      supplyChange(data) {
-        tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", {id: data})
+      //关闭临时维护弹窗回调
+      handleCloseUpdate() {
+          this.updateInputShow = false
+          this.updateInfoPoint = ''
+          this.updateInput = ''
       },
-      //保险单号-保险文件
-      guaranteeChange(data) {
-        for (let key in data) {
-          this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
-          if (key == "contractFile") {
-            if (!!data[key]) {
-              data[key] = [data[key]]
-            }
+      //更新临时维护信息点
+      handleClickUpdate() {
+          tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+          this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+          this.updateInputShow = false
+          this.myDialog.update = false
+          this.updateInput = ''
+      },
+      //获取被筛选掉的行号
+      trimmedRows() {
+          var plugin = this.hot.getPlugin("trimRows").trimmedRows;
+          let dataLength = this.tableData.length;
+          let dataArr = new Array();
+          for (let i = 0; i < dataLength; i++) {
+              dataArr.push(i);
           }
-          this.utilToKey(key, "contractFile", data, "InsuranceFile")
-        }
+          if (plugin.length <= 0) {
+              dataArr = undefined;
+          } else {
+              dataArr = this.array_diff(dataArr, plugin);
+          }
+          return dataArr || [];
+      },
+      //去除数组中相同的元素
+      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;
       },
-      //选择型号修改
-      firmChange(data, type) {
-        if (type === 'dialog') { // 如果是批量信息维护
-          let venderName = data.venderName ? data.venderName : '空'
-          let brandName = data.brandName ? data.brandName : '空'
-          let name = data.name ? data.name : '空'
-          let firm = {
-            ...data,
-            num: 2,
-            Specification: data.name,
-            name: `${venderName}/${brandName}/${name}`
+      //如果选择供应商之后
+      supplierChange(data, type) {
+          if (type === 'dialog') {
+              let firm = {...data, num: 8}
+              this.firmName = firm
+          } else {
+              tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
+              tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
+              this.handleUpdataTable(
+                  [
+                      [this.row, "DPSupplierID", null, data.venderId],
+                      [this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]
+                  ],
+                  "edit"
+              )
+              // this.handleUpdataTable([[this.row, "LedgerParam.SupplyPurchase.Supplier", null, data.name]], "edit")
+          }
+
+    },
+    //供应合同编号
+    supplyChange(data) {
+      tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContractID", {id: data})
+    },
+    //保险单号-保险文件
+    guaranteeChange(data) {
+      for (let key in data) {
+        this.utilToKey(key, "insuranceNo", data, "InsuranceNum")
+        if (key == "contractFile") {
+          if (!!data[key]) {
+            data[key] = [data[key]]
           }
-          this.firmName = firm //批量维护dialog显示对象的字段
-        } else {  //如果是表格操作
-          tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
-          tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
-          tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPManufacturerID", null, data.venderId],
-              [this.row, "DPBrandID", null, data.brandId],
-              [this.row, "DPSpecificationID", null, data.specificationId],
-              [this.row, "LedgerParam.EquipManufactor.Manufacturer", null, data.venderName],
-              [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
-              [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
-          // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
         }
-      },
-      //保险商变更
-      changeInsurer(data, type) {
-        if (type === 'dialog') {
-          let firm = {...data, num: 42}
-          this.firmName = firm
-        } else {
-          tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPInsurerID", null, data.venderId],
-              [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
+        this.utilToKey(key, "contractFile", data, "InsuranceFile")
+      }
+    },
+    //选择型号修改
+    firmChange(data, type) {
+      if (type === 'dialog') { // 如果是批量信息维护
+        let venderName = data.venderName ? data.venderName : '空'
+        let brandName = data.brandName ? data.brandName : '空'
+        let name = data.name ? data.name : '空'
+        let firm = {
+          ...data,
+          num: 2,
+          Specification: data.name,
+          name: `${venderName}/${brandName}/${name}`
         }
+        this.firmName = firm //批量维护dialog显示对象的字段
+      } else {  //如果是表格操作
+        tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)//生产商ID
+        tools.setDataForKey(this.tableData[this.row], "DPBrandID", data.brandId)//品牌ID
+        tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)//型号ID
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brandName)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPManufacturerID", null, data.venderId],
+            [this.row, "DPBrandID", null, data.brandId],
+            [this.row, "DPSpecificationID", null, data.specificationId],
+            [this.row, "LedgerParam.EquipManufactor.Manufacturer", null, data.venderName],
+            [this.row, "LedgerParam.EquipManufactor.Brand", null, data.brandName],
+            [this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Brand", null, data.brand]], "edit")
+        // this.handleUpdataTable([[this.row, "LedgerParam.EquipManufactor.Specification", null, data.name]], "edit")
+      }
+    },
+    //保险商变更
+    changeInsurer(data, type) {
+      if (type === 'dialog') {
+        let firm = {...data, num: 42}
+        this.firmName = firm
+      } else {
+        tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPInsurerID", null, data.venderId],
+            [this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.InsuranceDoc.Insurer", null, data.name]], "edit")
+      }
 
-      },
-      //维修商变更
-      changeMaintainer(data, type) {
-        if (type === 'dialog') {
-          let firm = {...data, num: 35}
-          this.firmName = firm
-        } else {
-          tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
-          tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
-          this.handleUpdataTable(
-            [
-              [this.row, "DPMaintainerID", null, data.venderId],
-              [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
-            ],
-            "edit"
-          )
-          // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
-        }
+    },
+    //维修商变更
+    changeMaintainer(data, type) {
+      if (type === 'dialog') {
+        let firm = {...data, num: 35}
+        this.firmName = firm
+      } else {
+        tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
+        tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
+        this.handleUpdataTable(
+          [
+            [this.row, "DPMaintainerID", null, data.venderId],
+            [this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]
+          ],
+          "edit"
+        )
+        // this.handleUpdataTable([[this.row, "LedgerParam.OperationMainte.Maintainer", null, data.name]], "edit")
+      }
 
-      },
-      //修改关联的资产
-      changeProperty(val) {
-        this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
-        this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
-      },
-      //上传文件弹窗触发事件
-      fileChange(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
-        } else {
-          this.setDataToMain(keys, this.messKey, this.row);
-        }
-      },
-      //上传图片弹窗触发事件
-      imgChange(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
-        } else {
-          this.setDataToMain(keys, this.messKey, this.row);
+    },
+    //修改关联的资产
+    changeProperty(val) {
+      this.setDataToMain(val.PropertyId, 'PropertyId', this.row);
+      this.setDataToMain(val.LinkEquipLocalName, 'LinkEquipLocalName', this.row);
+    },
+    //上传文件弹窗触发事件
+    fileChange(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
+      }
+    },
+    //上传图片弹窗触发事件
+    imgChange(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
 
-        }
-      },
-      //关联系统更改
-      changeSystemType(data) {
-        tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
-      },
-      //设备图片弹窗改变事件
-      changePics(keys, type) {
-        if (type === 'dialog') {
-          this.information = keys
+      }
+    },
+    //关联系统更改
+    changeSystemType(data) {
+      tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
+    },
+    //设备图片弹窗改变事件
+    changePics(keys, type) {
+      if (type === 'dialog') {
+        this.information = keys
+      } else {
+        this.setDataToMain(keys, this.messKey, this.row);
+      }
+    },
+    utilToKey(key, name, data, messName) {
+      if (key == name) {
+        this.setDataToMain(data[key], messName, this.row)
+      }
+    },
+    //判断是否有值,有值赋值
+    setDataToMain(data, key, row) {
+      if (!!data && data != '--') {
+        if (!!this.tableData[row]) {
+          tools.setDataForKey(this.tableData[row], key, data);
+          this.handleUpdataTable([[row, key, null, data]], "edit");
         } else {
-          this.setDataToMain(keys, this.messKey, this.row);
+          this.tableData[row] = {};
+          tools.setDataForKey(this.tableData[row], key, data);
         }
-      },
-      utilToKey(key, name, data, messName) {
-        if (key == name) {
-          this.setDataToMain(data[key], messName, this.row)
-        }
-      },
-      //判断是否有值,有值赋值
-      setDataToMain(data, key, row) {
-        if (!!data && data != '--') {
-          if (!!this.tableData[row]) {
-            tools.setDataForKey(this.tableData[row], key, data);
-            this.handleUpdataTable([[row, key, null, data]], "edit");
-          } else {
-            this.tableData[row] = {};
-            tools.setDataForKey(this.tableData[row], key, data);
-          }
-        } else {
-          tools.setDataForKey(this.tableData[row], key, "");
+      } else {
+        tools.setDataForKey(this.tableData[row], key, "");
+      }
+    },
+    //    批量信息维护
+    Batch() {
+      this.firmDataType = 'dialog'
+      this.$refs.batchDialogs.batchDialog = true
+    },
+    upDataDevice(type, data1, data2) {
+      let param = {Content: data1}
+      let param1 = {Content: data2}
+      if (type === 1) { //增量
+        //LedgerParam
+        let filterParam = this.filterCheck(param, 'sole')
+        let filterParam1 = this.filterCheck(param1, 'multiple')
+        if (filterParam) {
+          updateEquip(param, res => {
+          });
         }
-      },
-      //    批量信息维护
-      Batch() {
-        this.firmDataType = 'dialog'
-        this.$refs.batchDialogs.batchDialog = true
-      },
-      upDataDevice(type, data1, data2) {
-        let param = {Content: data1}
-        let param1 = {Content: data2}
-        if (type === 1) { //增量
-          //LedgerParam
-          let filterParam = this.filterCheck(param, 'sole')
-          let filterParam1 = this.filterCheck(param1, 'multiple')
-          if (filterParam) {
-            updateEquip(param, res => {
-            });
-          }
-          if (filterParam1) {
-            setTimeout(() => {
-              queryUpdate(param1, res => {
-              })
+        if (filterParam1) {
+          setTimeout(() => {
+            queryUpdate(param1, res => {
             })
+          })
 
-          }
         }
-        if (type === 2) {//覆盖
-          let filterParams = this.filterCheck(param, 'sole')
-          if (filterParams) {
-            updateEquip(param, res => {
-            });
-          }
+      }
+      if (type === 2) {//覆盖
+        let filterParams = this.filterCheck(param, 'sole')
+        if (filterParams) {
+          updateEquip(param, res => {
+          });
         }
-        setTimeout(() => {
-          this.getTableData()
-          this.getAllData()
-        }, 10)
-      },
-      filterCheck(arr, type) {
-        if (type === 'sole') {
-          for (let i of arr.Content) {
-            return Object.keys(i.LedgerParam).length
-          }
-        } else if (type === 'multiple') {
-          let  nArr = [];
-          arr.Content.forEach(i => {
-            let {EquipID, ...value} = i
-            nArr.push({LedgerParam: value})
-          })
-          for (let j of nArr) {
-            return Object.keys(j.LedgerParam).length
-          }
+      }
+      setTimeout(() => {
+        this.getTableData()
+        this.getAllData()
+      }, 10)
+    },
+    filterCheck(arr, type) {
+      if (type === 'sole') {
+        for (let i of arr.Content) {
+          return Object.keys(i.LedgerParam).length
+        }
+      } else if (type === 'multiple') {
+        let  nArr = [];
+        arr.Content.forEach(i => {
+          let {EquipID, ...value} = i
+          nArr.push({LedgerParam: value})
+        })
+        for (let j of nArr) {
+          return Object.keys(j.LedgerParam).length
         }
       }
+    }
     },
     watch: {
       projectId() {

+ 3 - 2
src/components/ledger/lib/floorCascader.vue

@@ -63,7 +63,8 @@
             getData() {
                 let data, buildParams = {
                     PageNumber: 1,
-                    PageSize: 500,
+                    PageSize: 1000,
+                    Orders: "BuildLocalName asc",
                     Projection: [
                         "BuildID",
                         "BuildLocalName"
@@ -71,7 +72,7 @@
                 }, floorParams = {
                     Orders: "FloorSequenceID desc",
                     PageNumber: 1,
-                    PageSize: 500,
+                    PageSize: 1000,
                     Projection: [
                         "BuildID",
                         "FloorID",

+ 6 - 10
src/components/ledger/lib/system.vue

@@ -10,7 +10,7 @@
 </template>
 <script>
 import { mapGetters } from 'vuex';
-import { queryLinkSys, getEqCode } from "@/api/scan/request";
+import { queryLinkSys, queryPhysicsAllType } from "@/api/scan/request";
 export default {
   name: "getCode",
   props: {
@@ -72,7 +72,7 @@ export default {
       let param = {
         Distinct: true,
         PageNumber: 1,
-        PageSize: 500,
+        PageSize: 1000,
         Projection: [
           "Category", "CategoryName"
         ]
@@ -85,8 +85,8 @@ export default {
       })
     },
     getAllData() {
-      getEqCode().then(res => {
-        this.options = this.changeArr(res.data.Content)
+      queryPhysicsAllType('System', res => {
+        this.options = this.changeArr(res.Content)
         if (this.value) {
           this.changeVal(this.value)
         }
@@ -94,12 +94,8 @@ export default {
     },
     changeArr(arr) {
       let data = [];
-      arr.map(item => {
-        if (item.content && item.content.length) {
-          return item.content.map(children => {
-            data.push({ Category: children.code, CategoryName: children.system });
-          });
-        }
+      arr.forEach(item => {
+        data.push({ Category: item.Code, CategoryName: item.Name });
       });
       return data;
     }

+ 3 - 2
src/utils/scan/tools.js

@@ -313,9 +313,10 @@ tools.hasRelation = function (instance, td, row, col, prop, value, cellPropertie
 //关联的资产
 tools.LinkEquipLocalName = function (instance, td, row, col, prop, value, cellProperties) {
   if (value) {
-    td.innerHTML = value;
+    td.innerHTML = value == 'null'?'':value;
   } else {
-    td.innerHTML = instance.getDataAtRowProp(row, 'LinkEquipName');
+    let html = instance.getDataAtRowProp(row, 'LinkEquipName');
+    td.innerHTML = html == 'null'?'':html;
   }
   return td;
 }

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

@@ -598,7 +598,12 @@
             },
             //获取建筑列表
             getBuilding() {
-                buildingQuery({}, res => {
+                buildingQuery({
+                    PageNumber: 1,
+                    PageSize: 1000,
+                    Orders: "BuildLocalName asc",
+                    Projection: [ "BuildID", "BuildLocalName" ]
+                }, res => {
                     this.buildList = res.Content;
                 });
             },

+ 2 - 2
src/views/ready/buildfloor/index.vue

@@ -381,11 +381,11 @@
           } else {
             let param = [{BuildId: this.curBuildId}];
             objectDeleteBuild(param, res => {
-              this.handleBuildQuery()
-              this.init()
               this.$message.success("删除成功");
               this.buildDisabled = false
               this.delDialogVis = false;
+              this.handleBuildQuery()
+              this.init()
             })
           }