|
@@ -362,7 +362,6 @@ export default {
|
|
|
if (this.floorFlag) {
|
|
|
data.splice(1, 0, "所属建筑楼层")
|
|
|
}
|
|
|
- console.log(this.showTypeFlag)
|
|
|
return data;
|
|
|
},
|
|
|
formatHeaderType(list) {
|
|
@@ -435,16 +434,9 @@ export default {
|
|
|
},
|
|
|
//选择型号修改
|
|
|
firmChange(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "DPSpecificationID", data.specificationId)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Brand", data.brand)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Specification", data.name)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.EquipManufactor.Manufacturer", data.venderName)
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name + "/" + data.brand;
|
|
|
- this.utilToKey(key, "venderId", data, "DPManufacturerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPManufacturerID", data.venderId)
|
|
|
},
|
|
|
supplyChange(data) {
|
|
|
let changeData = { id: data };
|
|
@@ -453,17 +445,7 @@ export default {
|
|
|
//如果选择供应商之后
|
|
|
supplierChange(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.Supplier", data.name)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierWeb", data.website)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierContactor", data.man)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierPhone", data.phone)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierFax", data.fox)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.SupplyPurchase.SupplierEmail", data.email)
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPSupplierID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPSupplierID", data.venderId)
|
|
|
},
|
|
|
//保险合同
|
|
|
guaranteeChange(data) {
|
|
@@ -488,32 +470,12 @@ export default {
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.Maintainer", data.name)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerWeb", data.website)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerContactor", data.man)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerPhone", data.phone)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerFax", data.fox)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.OperationMainte.MaintainerEmail", data.email)
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPMaintainerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPMaintainerID", data.venderId)
|
|
|
},
|
|
|
//保险商变更
|
|
|
changeInsurer(data) {
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerEmail", data.email)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerFax", data.fox)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerPhone", data.phone)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerContactor", data.man)
|
|
|
- tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.InsurerWeb", data.website)
|
|
|
tools.setDataForKey(this.tableData[this.row], "LedgerParam.InsuranceDoc.Insurer", data.name)
|
|
|
- for (let key in data) {
|
|
|
- if (key == "venderId") {
|
|
|
- data[key] = data[key] + "-" + data.name;
|
|
|
- this.utilToKey(key, "venderId", data, "DPInsurerID");
|
|
|
- }
|
|
|
- }
|
|
|
+ tools.setDataForKey(this.tableData[this.row], "DPInsurerID", data.venderId)
|
|
|
},
|
|
|
//设备图片弹窗改变事件
|
|
|
changePics(keys) {
|
|
@@ -568,113 +530,124 @@ export default {
|
|
|
return dataArr || [];
|
|
|
},
|
|
|
getInfors(infos, row) {
|
|
|
- //其他的开始判断
|
|
|
let val = this.tableExample.colToProp(row.col);
|
|
|
- console.log(val)
|
|
|
- //设备二维码图片
|
|
|
- if (val == "EquipQRCode") {
|
|
|
- this.myDialog.qrcode = true;
|
|
|
- this.$refs.qrcode.getCanvas(1111);
|
|
|
- }
|
|
|
- //关联系统
|
|
|
- if (val == "LinkSystem") {
|
|
|
- this.systemList = this.tableData[row.row].LinkSystem || [];
|
|
|
- this.myDialog.systemType = true;
|
|
|
- }
|
|
|
- //品牌型号弹窗
|
|
|
- if (val == "DPManufacturerID") {
|
|
|
- this.myDialog.firm = true;
|
|
|
- }
|
|
|
- //供应商信息弹窗
|
|
|
- if (val == "DPSupplierID") {
|
|
|
- this.myDialog.supplier = true;
|
|
|
- }
|
|
|
- //维修商信息弹窗
|
|
|
- if (val == "DPMaintainerID") {
|
|
|
- this.myDialog.maintainer = true;
|
|
|
- }
|
|
|
- //保险公司信息
|
|
|
- if (val == "DPInsurerID") {
|
|
|
- this.myDialog.insurer = true;
|
|
|
- }
|
|
|
- //供应合同编号
|
|
|
- if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
|
- let falg = null;
|
|
|
- let data = this.tableData[row.row].DPSupplierID;
|
|
|
- if (data) {
|
|
|
- falg = data.split("-")[0];
|
|
|
- }
|
|
|
- if (!!falg) {
|
|
|
- this.id = falg;
|
|
|
- this.myDialog.supply = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择供应商");
|
|
|
- }
|
|
|
- }
|
|
|
- //保险单号
|
|
|
- if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
|
- //选择保单
|
|
|
- let falg = null;
|
|
|
- let data = this.tableData[row.row].DPInsurerID
|
|
|
- if (data) {
|
|
|
- falg = data.split("-")[0];
|
|
|
- }
|
|
|
- if (!!falg) {
|
|
|
- this.id = falg;
|
|
|
- this.myDialog.guarantee = true;
|
|
|
- } else {
|
|
|
- this.$message("请先选择保险商");
|
|
|
- }
|
|
|
- }
|
|
|
- //保险文件--设备文档--安装质检报告
|
|
|
- if (
|
|
|
- val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
|
|
|
- val == "LedgerParam.PhotoDoc.Archive" ||
|
|
|
- val == "LedgerParam.Siteinstall.CheckReport"
|
|
|
- ) {
|
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
- this.filesArr = data ? data : []
|
|
|
- // this.filesArr = this.tableData[row.row].infos
|
|
|
- // ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- // ? [this.tableData[row.row].infos[val.split(".")[1]]]
|
|
|
- // : []
|
|
|
- // : [];
|
|
|
- this.myDialog.uploadFiles = true;
|
|
|
- }
|
|
|
- //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
- if (
|
|
|
- val == "LedgerParam.Siteinstall.InstallPic" ||
|
|
|
- val == "LedgerParam.Siteinstall.InstallDrawing" ||
|
|
|
- val == "LedgerParam.PhotoDoc.Nameplate" ||
|
|
|
- val == "LedgerParam.PhotoDoc.Drawing"
|
|
|
- ) {
|
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
- this.imgsArr = data ? data : []
|
|
|
- // if (val == "LedgerParam.PhotoDoc.Nameplate") {
|
|
|
- // this.imgsArr = this.tableData[row.row].infos
|
|
|
- // ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- // ? [this.tableData[row.row].infos[val.split(".")[1]].key]
|
|
|
- // : []
|
|
|
- // : [];
|
|
|
- // } else {
|
|
|
- // this.imgsArr = this.tableData[row.row].infos
|
|
|
- // ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- // ? [this.tableData[row.row].infos[val.split(".")[1]]]
|
|
|
- // : []
|
|
|
- // : [];
|
|
|
- // }
|
|
|
- this.myDialog.uploadImgs = true;
|
|
|
- }
|
|
|
- //设备照片
|
|
|
- if (val == "LedgerParam.PhotoDoc.Pic") {
|
|
|
- let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
- this.picsArr = data ? data : []
|
|
|
- // this.picsArr = this.tableData[row.row].infos
|
|
|
- // ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- // ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- // : []
|
|
|
- // : [];
|
|
|
- this.myDialog.pic = true;
|
|
|
+ switch (val) {
|
|
|
+ //操作
|
|
|
+ case 'caozuo':
|
|
|
+ // window.open(`http://adm.sagacloud.cn:8058/spread?id=${infos.EquipID}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
|
|
|
+ this.$message("开发中...")
|
|
|
+ break;
|
|
|
+ //设备二维码图片
|
|
|
+ case 'EquipQRCode':
|
|
|
+ this.qrcodeUrl = this.tableData[row.row].EquipQRCode;
|
|
|
+ if (!!this.qrcodeUrl) {
|
|
|
+ this.myDialog.qrcode = true;
|
|
|
+ } else {
|
|
|
+ this.$message("此设备没有设备二维码");
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //关联系统
|
|
|
+ case 'linkSystem':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.systemList = this.tableData[row.row].LinkSystem || [];
|
|
|
+ this.myDialog.systemType = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //关联资产
|
|
|
+ case 'LinkEquipLocalName':
|
|
|
+ if (this.linkNameFalg) {
|
|
|
+ this.myDialog.changeRea = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //品牌型号弹窗
|
|
|
+ case 'DPManufacturerID':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.myDialog.firm = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //供应商信息弹窗
|
|
|
+ case 'DPSupplierID':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.myDialog.supplier = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //维修商信息弹窗
|
|
|
+ case 'DPMaintainerID':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.myDialog.maintainer = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //保险公司信息
|
|
|
+ case 'DPInsurerID':
|
|
|
+ if (!this.onlyRead) {
|
|
|
+ this.myDialog.insurer = true;
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //供应合同编号
|
|
|
+ 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("请先选择供应商");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //保险单号
|
|
|
+ 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("请先选择保险商");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ //保险文件--设备文档--安装质检报告
|
|
|
+ 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 : [];
|
|
|
+ this.myDialog.uploadFiles = true;
|
|
|
+ break;
|
|
|
+ //安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
|
+ 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 : [];
|
|
|
+ this.myDialog.uploadImgs = true;
|
|
|
+ break;
|
|
|
+ //设备照片
|
|
|
+ case 'LedgerParam.PhotoDoc.Pic':
|
|
|
+ let Pdata = tools.dataForKey(this.tableData[row.row], val);
|
|
|
+ this.picsArr = Pdata ? Pdata : [];
|
|
|
+ this.myDialog.pic = true;
|
|
|
+ break;
|
|
|
+ //包含的部件字段
|
|
|
+ case 'Count':
|
|
|
+ if (this.onlyRead) {
|
|
|
+ this.$router.push({ path: '/ledger/parts', query: { deviceId: infos.EquipID } });
|
|
|
+ } else {
|
|
|
+ this.$router.push({ path: '/ledger/partsmanage', query: { deviceId: infos.EquipID, typeId: this.mess.deviceId } });
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
}
|
|
|
this.row = row.row;
|
|
|
this.messKey = val;
|