|
@@ -124,16 +124,16 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 维护信息弹窗-->
|
|
<!-- 维护信息弹窗-->
|
|
<batchDialog
|
|
<batchDialog
|
|
- ref="batchDialogs"
|
|
|
|
- @code="fourVendors"
|
|
|
|
- :firmName="firmName"
|
|
|
|
- :allObject="allObject"
|
|
|
|
- :page="batchPage"
|
|
|
|
- :information="information"
|
|
|
|
- :newEnclosure="newEnclosure"
|
|
|
|
- @getAllData="getAllData"
|
|
|
|
- @multiple="multiple"
|
|
|
|
- @upDataDevice="upDataDevice"
|
|
|
|
|
|
+ ref="batchDialogs"
|
|
|
|
+ @code="fourVendors"
|
|
|
|
+ :firmName="firmName"
|
|
|
|
+ :allObject="allObject"
|
|
|
|
+ :page="batchPage"
|
|
|
|
+ :information="information"
|
|
|
|
+ :newEnclosure="newEnclosure"
|
|
|
|
+ @getAllData="getAllData"
|
|
|
|
+ @multiples="multiples"
|
|
|
|
+ @upDataDevice="upDataDevice"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -915,62 +915,162 @@
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- multiple(val) {
|
|
|
|
|
|
+ forValue(arr, val) {
|
|
|
|
+ let enclosure = []
|
|
|
|
+ arr && arr.length && arr.map(i => {
|
|
|
|
+ if (i.Path == val) {
|
|
|
|
+ enclosure = i.value
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return enclosure
|
|
|
|
+ },
|
|
|
|
+ multiples(val) {
|
|
this.firmDataType = 'dialog'
|
|
this.firmDataType = 'dialog'
|
|
switch (val) {
|
|
switch (val) {
|
|
- //设备文档--安装质检报告--保险文件
|
|
|
|
- case 'archive':
|
|
|
|
- let adata = this.information.archive.Archive;
|
|
|
|
- this.filesArr = adata ? adata : [];
|
|
|
|
- this.infoType = 'archive';
|
|
|
|
|
|
+ case 'LedgerParam.InsuranceDoc.InsuranceFile': //保险文件
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
this.myDialog.uploadFiles = true;
|
|
this.myDialog.uploadFiles = true;
|
|
break;
|
|
break;
|
|
- case 'checkReport':
|
|
|
|
- let cdata = this.information.checkReport.CheckReport;
|
|
|
|
- this.filesArr = cdata ? cdata : [];
|
|
|
|
- this.infoType = 'checkReport'
|
|
|
|
|
|
+ case 'LedgerParam.PhotoDoc.Archive': //设备文档
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
this.myDialog.uploadFiles = true;
|
|
this.myDialog.uploadFiles = true;
|
|
break;
|
|
break;
|
|
- case 'insuranceFile':
|
|
|
|
- let idata = this.information.insuranceFile.InsuranceFile;
|
|
|
|
- this.filesArr = idata ? idata : [];
|
|
|
|
- this.infoType = 'insuranceFile';
|
|
|
|
|
|
+ case 'LedgerParam.Siteinstall.CheckReport': //安装质检报告
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
this.myDialog.uploadFiles = true;
|
|
this.myDialog.uploadFiles = true;
|
|
break;
|
|
break;
|
|
- //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
|
- case 'installPic':
|
|
|
|
- let insData = this.information.installPic.InstallPic;
|
|
|
|
- this.imgsArr = insData ? insData : [];
|
|
|
|
- this.infoType = 'installPic';
|
|
|
|
- this.myDialog.uploadImgs = true;
|
|
|
|
|
|
+ case 'LedgerParam.OperationMainte.MaintainManual': //维修保养手册
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
break;
|
|
break;
|
|
- case 'installDrawing':
|
|
|
|
- let drawData = this.information.installDrawing.InstallDrawing;
|
|
|
|
- this.imgsArr = drawData ? drawData : [];
|
|
|
|
- this.infoType = 'installDrawing';
|
|
|
|
- this.myDialog.uploadImgs = true;
|
|
|
|
|
|
+ case 'LedgerParam.SupplyPurchase.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': //验收报告
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
|
+ break;
|
|
|
|
+ case 'LedgerParam.PhotoDoc.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': //原厂证明
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
|
+ break;
|
|
|
|
+ case 'LedgerParam.EquipManufactor.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': //产品合格证
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
|
+ break;
|
|
|
|
+ case 'LedgerParam.Siteinstall.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': //设备图纸
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
|
+ break;
|
|
|
|
+ case 'LedgerParam.Siteinstall.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': //供应合同
|
|
|
|
+ this.filesArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val;
|
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
break;
|
|
break;
|
|
- case 'nameplate':
|
|
|
|
- let nDate = this.information.nameplate.Nameplate;
|
|
|
|
- this.imgsArr = nDate ? nDate : [];
|
|
|
|
- this.infoType = 'nameplate';
|
|
|
|
|
|
+ case 'LedgerParam.Siteinstall.InstallPic':
|
|
|
|
+ this.imgsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val
|
|
this.myDialog.uploadImgs = true;
|
|
this.myDialog.uploadImgs = true;
|
|
break;
|
|
break;
|
|
- case 'drawing':
|
|
|
|
- let dDate = this.information.drawing.Drawing;
|
|
|
|
- this.imgsArr = dDate ? dDate : [];
|
|
|
|
- this.infoType = 'drawing';
|
|
|
|
|
|
+ case 'LedgerParam.PhotoDoc.Nameplate':
|
|
|
|
+ this.imgsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val
|
|
this.myDialog.uploadImgs = true;
|
|
this.myDialog.uploadImgs = true;
|
|
break;
|
|
break;
|
|
//设备照片
|
|
//设备照片
|
|
- case 'pic':
|
|
|
|
- let picData = this.information.pic.Pic;
|
|
|
|
- this.picsArr = picData ? picData : [];
|
|
|
|
- this.infoType = 'pic';
|
|
|
|
|
|
+ case 'LedgerParam.PhotoDoc.Pic':
|
|
|
|
+ this.picsArr = this.forValue(this.newEnclosure, val) ? this.forValue(this.newEnclosure, val) : [];
|
|
|
|
+ this.infoType = val
|
|
this.myDialog.pic = true;
|
|
this.myDialog.pic = true;
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // multiple(val) {
|
|
|
|
+ // this.firmDataType = 'dialog'
|
|
|
|
+ // switch (val) {
|
|
|
|
+ // //设备文档--安装质检报告--保险文件
|
|
|
|
+ // case 'archive':
|
|
|
|
+ // let adata = this.information.archive.Archive;
|
|
|
|
+ // this.filesArr = adata ? adata : [];
|
|
|
|
+ // this.infoType = 'archive';
|
|
|
|
+ // this.myDialog.uploadFiles = true;
|
|
|
|
+ // break;
|
|
|
|
+ // case 'checkReport':
|
|
|
|
+ // let cdata = this.information.checkReport.CheckReport;
|
|
|
|
+ // this.filesArr = cdata ? cdata : [];
|
|
|
|
+ // this.infoType = 'checkReport'
|
|
|
|
+ // this.myDialog.uploadFiles = true;
|
|
|
|
+ // break;
|
|
|
|
+ // case 'insuranceFile':
|
|
|
|
+ // let idata = this.information.insuranceFile.InsuranceFile;
|
|
|
|
+ // this.filesArr = idata ? idata : [];
|
|
|
|
+ // this.infoType = 'insuranceFile';
|
|
|
|
+ // this.myDialog.uploadFiles = true;
|
|
|
|
+ // break;
|
|
|
|
+ // //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
|
+ // case 'installPic':
|
|
|
|
+ // let insData = this.information.installPic.InstallPic;
|
|
|
|
+ // this.imgsArr = insData ? insData : [];
|
|
|
|
+ // this.infoType = 'installPic';
|
|
|
|
+ // this.myDialog.uploadImgs = true;
|
|
|
|
+ // break;
|
|
|
|
+ // case 'installDrawing':
|
|
|
|
+ // let drawData = this.information.installDrawing.InstallDrawing;
|
|
|
|
+ // this.imgsArr = drawData ? drawData : [];
|
|
|
|
+ // this.infoType = 'installDrawing';
|
|
|
|
+ // this.myDialog.uploadImgs = true;
|
|
|
|
+ // break;
|
|
|
|
+ // case 'nameplate':
|
|
|
|
+ // let nDate = this.information.nameplate.Nameplate;
|
|
|
|
+ // this.imgsArr = nDate ? nDate : [];
|
|
|
|
+ // this.infoType = 'nameplate';
|
|
|
|
+ // this.myDialog.uploadImgs = true;
|
|
|
|
+ // break;
|
|
|
|
+ // case 'drawing':
|
|
|
|
+ // let dDate = this.information.drawing.Drawing;
|
|
|
|
+ // this.imgsArr = dDate ? dDate : [];
|
|
|
|
+ // this.infoType = 'drawing';
|
|
|
|
+ // this.myDialog.uploadImgs = true;
|
|
|
|
+ // break;
|
|
|
|
+ // //设备照片
|
|
|
|
+ // case 'pic':
|
|
|
|
+ // let picData = this.information.pic.Pic;
|
|
|
|
+ // this.picsArr = picData ? picData : [];
|
|
|
|
+ // this.infoType = 'pic';
|
|
|
|
+ // this.myDialog.pic = true;
|
|
|
|
+ // break;
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
//获取到了正确的信息
|
|
//获取到了正确的信息
|
|
getInfors(infos, row, el) {
|
|
getInfors(infos, row, el) {
|
|
let val = this.hot.colToProp(row.col);
|
|
let val = this.hot.colToProp(row.col);
|
|
@@ -1284,58 +1384,78 @@
|
|
}
|
|
}
|
|
|
|
|
|
},
|
|
},
|
|
- //修改关联的资产
|
|
|
|
- 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, file) {
|
|
|
|
+ if (type === 'dialog') {
|
|
|
|
+ // this.information = keys
|
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
|
+ if (i.Path == keys) {
|
|
|
|
+ this.$set(i, 'value', file)
|
|
|
|
+ }
|
|
|
|
+ return i
|
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- //关联系统更改
|
|
|
|
- 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 {
|
|
} else {
|
|
- this.tableData[row] = {};
|
|
|
|
- tools.setDataForKey(this.tableData[row], key, data);
|
|
|
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
|
+ }
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ //上传图片弹窗触发事件
|
|
|
|
+ imgChange(keys, type, file) {
|
|
|
|
+ if (type === 'dialog') {
|
|
|
|
+ // this.information = keys
|
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
|
+ if (i.Path == keys) {
|
|
|
|
+ this.$set(i, 'value', file)
|
|
|
|
+ }
|
|
|
|
+ return i
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //关联系统更改
|
|
|
|
+ changeSystemType(data) {
|
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "LinkSystem", data)
|
|
|
|
+ },
|
|
|
|
+ //设备图片弹窗改变事件
|
|
|
|
+ changePics(keys, type,file) {
|
|
|
|
+ if (type === 'dialog') {
|
|
|
|
+ // this.information = keys
|
|
|
|
+ this.newEnclosure.forEach(i => {
|
|
|
|
+ if (i.Path == keys) {
|
|
|
|
+ this.$set(i, 'value', file)
|
|
|
|
+ }
|
|
|
|
+ return i
|
|
|
|
+ })
|
|
|
|
+ } 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.tableData[row] = {};
|
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data);
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ tools.setDataForKey(this.tableData[row], key, "");
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- tools.setDataForKey(this.tableData[row], key, "");
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
// 批量信息维护
|
|
// 批量信息维护
|
|
Batch() {
|
|
Batch() {
|