|
@@ -393,11 +393,11 @@ export default {
|
|
|
},
|
|
|
//上传文件弹窗触发事件
|
|
|
fileChange(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//上传图片弹窗触发事件
|
|
|
imgChange(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
//维修商变更
|
|
|
changeMaintainer(data) {
|
|
@@ -419,7 +419,7 @@ export default {
|
|
|
},
|
|
|
//设备图片弹窗改变事件
|
|
|
changePics(keys) {
|
|
|
- this.setDataToMain(keys, this.messKey.split(".")[1], this.row);
|
|
|
+ this.setDataToMain(keys, this.messKey, this.row);
|
|
|
},
|
|
|
setGraphyId(graphyId, assetGroupList) {
|
|
|
this.graphyId = graphyId;
|
|
@@ -506,10 +506,9 @@ export default {
|
|
|
//供应合同编号
|
|
|
if (val == "LedgerParam.SupplyPurchase.SupplierContractID") {
|
|
|
let falg = null;
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- falg = this.tableData[row.row].infos.DPSupplierID.split("-")[0];
|
|
|
- }
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ if (data) {
|
|
|
+ falg = data.split("-")[0];
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
this.id = falg;
|
|
@@ -522,10 +521,9 @@ export default {
|
|
|
if (val == "LedgerParam.InsuranceDoc.InsuranceNum") {
|
|
|
//选择保单
|
|
|
let falg = null;
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- if (!!this.tableData[row.row].infos) {
|
|
|
- falg = this.tableData[row.row].infos.DPInsurerID.split("-")[0];
|
|
|
- }
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ if (data) {
|
|
|
+ falg = data.split("-")[0];
|
|
|
}
|
|
|
if (!!falg) {
|
|
|
this.id = falg;
|
|
@@ -539,11 +537,13 @@ export default {
|
|
|
val == "LedgerParam.InsuranceDoc.InsuranceFile" ||
|
|
|
val == "LedgerParam.PhotoDoc.Archive"
|
|
|
) {
|
|
|
- this.filesArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? [this.tableData[row.row].infos[val.split(".")[1]]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
+ 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;
|
|
|
}
|
|
|
//安装照片--安装图纸--设备铭牌照片--设备图纸
|
|
@@ -553,28 +553,32 @@ export default {
|
|
|
val == "LedgerParam.PhotoDoc.Nameplate" ||
|
|
|
val == "LedgerParam.PhotoDoc.Drawing"
|
|
|
) {
|
|
|
- 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]]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
- }
|
|
|
+ let data = tools.dataForKey(this.tableData[row.row], val)
|
|
|
+ this.filesArr = 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") {
|
|
|
- this.picsArr = this.tableData[row.row].infos
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- ? this.tableData[row.row].infos[val.split(".")[1]]
|
|
|
- : []
|
|
|
- : [];
|
|
|
+ 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;
|
|
|
}
|
|
|
this.row = row.row;
|
|
@@ -599,17 +603,20 @@ export default {
|
|
|
},
|
|
|
//判断是否有值,有值赋值
|
|
|
setDataToMain(data, key, row) {
|
|
|
+ console.log("start+++++++++++++++++",this.tableData[row])
|
|
|
if (!!data && data != "--") {
|
|
|
if (!!this.tableData[row]) {
|
|
|
//铭牌照片特殊处理
|
|
|
- this.tableData[row][key] = data;
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data)
|
|
|
+ // this.tableData[row][key] = data;
|
|
|
} else {
|
|
|
this.tableData[row] = {};
|
|
|
- this.tableData[row][key] = data;
|
|
|
+ tools.setDataForKey(this.tableData[row], key, data)
|
|
|
}
|
|
|
} else {
|
|
|
- this.tableData[row][key] = "";
|
|
|
+ tools.setDataForKey(this.tableData[row], key, "")
|
|
|
}
|
|
|
+ console.log("end+++++++++++++++++",this.tableData[row])
|
|
|
}
|
|
|
}
|
|
|
};
|