Bladeren bron

字段修改

zhangyu 4 jaren geleden
bovenliggende
commit
7f134b8715
2 gewijzigde bestanden met toevoegingen van 86 en 84 verwijderingen
  1. 85 83
      src/components/ledger/handsontables/device.vue
  2. 1 1
      src/utils/handsontable/buildFloorData.js

+ 85 - 83
src/components/ledger/handsontables/device.vue

@@ -326,7 +326,7 @@ export default {
     bimDialog
   },
   created() {
-    buildFloor.getData(this.buildFloorData);
+	buildFloor.getData(this.buildFloorData);
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -517,7 +517,7 @@ export default {
           this.getTableData();
           this.getAllData();
           //  信息维护
-          this.newEnclosure = res.Content.filter(i => i.InputMode == "F2");
+          this.newEnclosure = res.content.filter(i => i.inputMode == "F2");
         });
       }
     },
@@ -542,15 +542,15 @@ export default {
         };
 
         if (this.mess.buildId == "noKnow") {
-          param.Filters += `;buildingId isNull`;
+          param.filters += `;buildingId isNull`;
         } else if (this.mess.buildId && this.mess.buildId != "all") {
-          param.Filters += `;buildingId='${this.mess.buildId}'`;
+          param.filters += `;buildingId='${this.mess.buildId}'`;
         }
 
         if (this.mess.floorId == "noKnow") {
-          param.Filters += `;floorId isNull`;
+          param.filters += `;floorId isNull`;
         } else if (this.mess.floorId && this.mess.floorId != "all") {
-          param.Filters += `;floorId='${this.mess.floorId}'`;
+          param.filters += `;floorId='${this.mess.floorId}'`;
         }
         getEquipTableCon(param, res => {
           this.loading = false;
@@ -587,14 +587,14 @@ export default {
         let params = {
           cascade: [
             {
-              name: "property",
-            //   projection: [
-            //     "Family",
-            //     "EquipLocalName",
-            //     "EquipLocalID",
-            //     "EquipID",
-            //     "CodeType"
-            //   ]
+              name: "property"
+              //   projection: [
+              //     "Family",
+              //     "EquipLocalName",
+              //     "EquipLocalID",
+              //     "EquipID",
+              //     "CodeType"
+              //   ]
             },
             {
               Name: "building",
@@ -618,8 +618,7 @@ export default {
             "id",
             "bimId"
           ]
-		};
-		debugger
+        };
         if (this.mess.buildId == "noKnow") {
           params.filters += `;buildingId isNull`;
         } else if (this.mess.buildId && this.mess.buildId != "all") {
@@ -632,8 +631,8 @@ export default {
           params.filters += `;floorId='${this.mess.floorId}'`;
         }
         queryEquip(params, res => {
-          this.allObject = res.Content;
-          this.batchPage.total = res.Total;
+          this.allObject = res.content;
+          this.batchPage.total = res.total;
         });
       }
     },
@@ -789,7 +788,13 @@ export default {
     //格式化表头
     formatHeaderData(list) {
       let arr = tools.copyArr(list);
-      let data = showTools.headerTextFilter(arr, "equipment", this.onlyRead, this.showType, true);
+      let data = showTools.headerTextFilter(
+        arr,
+        "equipment",
+        this.onlyRead,
+        this.showType,
+        true
+      );
       if (this.showParts) {
         data.unshift("操作", "当前关联的资产", "所属系统实例", "包含的部件");
       } else {
@@ -811,7 +816,7 @@ export default {
         this.onlyRead,
         this.showType,
         true
-      );
+	  );
       if (this.showParts) {
         data.unshift(
           {
@@ -1135,120 +1140,119 @@ export default {
     multiples(val) {
       this.firmDataType = "dialog";
       switch (val) {
-        case "LedgerParam.InsuranceDoc.InsuranceFile": //保险文件
+        case "infos.insuranceFile": //保险文件
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.PhotoDoc.Archive": //设备文档
+        case "infos.archive": //设备文档
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.Siteinstall.CheckReport": //安装质检报告
+        case "infos.checkReport": //安装质检报告
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.OperationMainte.MaintainManual": //维修保养手册
+        case "infos.maintainManual": //维修保养手册
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.SupplyPurchase.ApproachingAcceptance": //进场验收单
+        case "infos.approachingAcceptance": //进场验收单
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.SupplyPurchase.AcceptanceReport": //验收报告
+        case "infos.acceptanceReport": //验收报告
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.PhotoDoc.OperationManual": //操作说明书
+        case "infos.operationManual": //操作说明书
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.EquipManufactor.OriginalCertificate": //原厂证明
+        case "infos.originalCertificate": //原厂证明
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.EquipManufactor.TestReport": //检测报告
+        case "infos.testReport": //检测报告
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.PhotoDoc.ProductCertification": //产品合格证
+        case "infos.productCertification": //产品合格证
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.Siteinstall.InstallInstruction": //安装说明书
+        case "infos.installInstruction": //安装说明书
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.PhotoDoc.Drawing": //设备图纸
+        case "infos.drawing": //设备图纸
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.Siteinstall.InstallDrawing": //安装图纸
+        case "infos.installDrawing": //安装图纸
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.SupplyPurchase.SupplierContract": //供应合同
+        case "infos.supplierContract": //供应合同
           this.filesArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadFiles = true;
           break;
-        case "LedgerParam.Siteinstall.InstallPic":
+        case "infos.installPic"://安装照片
           this.imgsArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadImgs = true;
           break;
-        case "LedgerParam.PhotoDoc.Nameplate":
+        case "infos.nameplate"://设备铭牌照片
           this.imgsArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
           this.infoType = val;
           this.myDialog.uploadImgs = true;
           break;
-        //设备照片
-        case "LedgerParam.PhotoDoc.Pic":
+        case "infos.pic"://设备照片
           this.picsArr = this.forValue(this.newEnclosure, val)
             ? this.forValue(this.newEnclosure, val)
             : [];
@@ -1266,7 +1270,7 @@ export default {
       lStorage.set("screen_data", {
         path: this.$route.path,
         data: { equip: infos }
-      });
+	  });
       switch (val) {
         //操作
         case "caozuo":
@@ -1276,36 +1280,36 @@ export default {
             path: "deviceDetails",
             query: {
               type: this.mess.deviceId,
-              equipId: infos.EquipID,
-              equipName: infos.EquipLocalName
-                ? infos.EquipLocalName
-                : infos.EquipName
-                ? infos.EquipName
+              equipId: infos.id,
+              equipName: infos.localName
+                ? infos.localName
+                : infos.name
+                ? infos.name
                 : "",
-              equipCode: infos.EquipLocalID ? infos.EquipLocalID : "",
+              equipCode: infos.localId ? infos.localId : "",
               data: this.tableData.map(item => {
                 return {
-                  value: item.EquipID,
-                  label: item.EquipLocalName
-                    ? item.EquipLocalName
-                    : item.EquipName
-                    ? item.EquipName
+                  value: item.id,
+                  label: item.localName
+                    ? item.localName
+                    : item.name
+                    ? item.name
                     : ""
                 };
               })
             }
           });
           return false;
-        //设备二维码图片
-        case "EquipQRCode":
-          this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
-          if (!!this.qrcodeUrl) {
+        //设备二维码图片(infos.defaultQRCode)
+        case "infos.defaultQRCode":
+          this.qrcodeUrl = this.tableData[row.row][val];
+          if (this.qrcodeUrl) {
             this.myDialog.qrcode = true;
           } else {
             this.$message("此设备没有设备二维码");
           }
           return false;
-        //BIM模型中坐标
+        //BIM模型中坐标(bimLocation)
         case "BIMLocation":
           this.bimcodeobj = this.tableData[row.row];
           if (Object.keys(this.bimcodeobj).length > 0) {
@@ -1314,13 +1318,13 @@ export default {
             this.$message("此设备没有BIM模型中坐标");
           }
           return false;
-        //关联系统
+        //关联系统()
         case "LinkSystem":
           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;
@@ -1350,8 +1354,8 @@ export default {
             this.myDialog.insurer = true;
           }
           return false;
-        //供应合同编号
-        case "LedgerParam.SupplyPurchase.SupplierContractID":
+        //供应合同编号(B1)
+        case "infos.supplierContractID":
           if (!this.onlyRead) {
             let ContractIDflag = null;
             let DPSdata = this.tableData[row.row].DPSupplierID;
@@ -1366,8 +1370,8 @@ export default {
             }
           }
           return false;
-        //保险单号
-        case "LedgerParam.InsuranceDoc.InsuranceNum":
+        //保险单号(B1)
+        case "infos.insuranceNum":
           if (!this.onlyRead) {
             let DPInsurerIDflag = null;
             let DPIdata = this.tableData[row.row].DPInsurerID;
@@ -1383,37 +1387,37 @@ export default {
           }
           return false;
         //保险文件--设备文档--安装质检报告
-        case "LedgerParam.InsuranceDoc.InsuranceFile": //保险文件
-        case "LedgerParam.PhotoDoc.Archive": //设备文档
-        case "LedgerParam.Siteinstall.CheckReport": //安装质检报告
-        case "LedgerParam.OperationMainte.MaintainManual": //维修保养手册
-        case "LedgerParam.SupplyPurchase.ApproachingAcceptance": //进场验收单
-        case "LedgerParam.SupplyPurchase.AcceptanceReport": //验收报告
-        case "LedgerParam.PhotoDoc.OperationManual": //操作说明书
-        case "LedgerParam.EquipManufactor.OriginalCertificate": //原厂证明
-        case "LedgerParam.EquipManufactor.TestReport": //检测报告
-        case "LedgerParam.PhotoDoc.ProductCertification": //产品合格证
-        case "LedgerParam.Siteinstall.InstallInstruction": //安装说明书
-        case "LedgerParam.SupplyPurchase.SupplierContract": //供应合同
-        case "LedgerParam.PhotoDoc.Drawing": //设备图纸
-        case "LedgerParam.Siteinstall.InstallDrawing": //安装图纸
+        case "infos.insuranceFile": //保险文件(F2)
+        case "infos.archive": //设备文档(F2)
+        case "infos.checkReport": //安装质检报告(F2)
+        case "infos.maintainManual": //维修保养手册(F2)
+        case "infos.approachingAcceptance": //进场验收单(F2)
+        case "infos.acceptanceReport": //验收报告(F2)
+        case "infos.operationManual": //操作说明书(F2)
+        case "infos.originalCertificate": //原厂证明(F2)
+        case "infos.testReport": //检测报告(F2)
+        case "infos.productCertification": //产品合格证(F2)
+        case "infos.installInstruction": //安装说明书(F2)
+        case "infos.supplierContract": //供应合同(F2)
+        case "infos.drawing": //设备图纸(F2)
+        case "infos.installDrawing": //安装图纸(F2)
           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.PhotoDoc.Nameplate":
+        //安装照片--设备铭牌照片(F2)
+        case "infos.installPic":
+        case "infos.nameplate":
           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":
+        //设备照片(F2)
+        case "infos.pic":
           let Pdata = tools.dataForKey(this.tableData[row.row], val);
           this.picsArr = Pdata ? Pdata : [];
           if (!this.onlyRead || this.picsArr.length) {
@@ -1422,9 +1426,7 @@ export default {
           return false;
         //包含的部件字段
         case "Count":
-          let countUrl = this.onlyRead
-            ? "/ledger/parts"
-            : "/ledger/partsmanage";
+          let countUrl = this.onlyRead ? "/ledger/parts" : "/ledger/partsmanage";
           this.$router.push({
             path: countUrl,
             query: {

+ 1 - 1
src/utils/handsontable/buildFloorData.js

@@ -35,7 +35,7 @@ const buildFloor = {
     })
 
     Promise.all([promise1, promise2]).then(function(values) {
-      let builData = values[0].Content, floorData = values[1].Content
+      let builData = values[0].content, floorData = values[1].content
       data = builData.map(build => {
           return {
               value: build.id,