Commit 169002c7 by yangxiaolei

补充对比功能

parent ac0b7b32
......@@ -50,6 +50,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......@@ -142,7 +143,26 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
let keyLabel = row.role.toLowerCase()
let extkeyLabel = `brtset.${keyLabel}.pts`
let deepData = this.getProperty(extkeyLabel,this.model)
console.log("deepData=>",deepData)
console.log("deepData1=>",deepData.modifySet)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
}
console.log("deepData2=>",deepData.modifySet)
}
},
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
......
......@@ -54,6 +54,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData (model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......@@ -146,7 +147,26 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.brdgrp, row.role.toLowerCase(), res.data);
let keyLabel = row.role.toLowerCase()
let extkeyLabel = `litdck.${keyLabel}.pts`
let deepData = this.getProperty(extkeyLabel,this.model)
console.log("deepData=>",deepData)
console.log("deepData1=>",deepData.modifySet)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
}
console.log("deepData2=>",deepData.modifySet)
}
},
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
......
......@@ -98,7 +98,6 @@ export default {
},
// 获取弹框表格数据
async queryGridEtyPromptDialogData(type, ptytyp) {
console.log("type=>",type)
let params = {
userId: window.sessionStorage.userId || 'ZL',
ptytyp: ptytyp,
......@@ -118,7 +117,6 @@ export default {
...row,
};
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.lidgrp, row.role.toLowerCase(), res.data);
......@@ -129,8 +127,7 @@ export default {
console.log("deepData=>",deepData)
console.log("deepData1=>",deepData.modifySet)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
deepData.modifySet.push('extkey','adrblk')
}
console.log("deepData2=>",deepData.modifySet)
}
......
......@@ -50,6 +50,7 @@ export default {
},
// 兼容处理在前端model中定义了字段,后端返回的数据中不存在字段的问题
copyValueFromVoData(model, data) {
model.modifySet = []
let keysList = Object.keys(model)
keysList.map((key) => {
if (data[key]) {
......@@ -142,8 +143,27 @@ export default {
let res = await Api.post('/service/ptspta/fetch', params);
if (res.respCode == SUCCESS) {
this.$set(this.model.gidgrp, row.role.toLowerCase(), res.data);
let keyLabel = row.role.toLowerCase()
let extkeyLabel = `trtset.${keyLabel}.pts`
let deepData = this.getProperty(extkeyLabel,this.model)
console.log("deepData=>",deepData)
console.log("deepData1=>",deepData.modifySet)
if(Array.isArray(deepData.modifySet) && !deepData.modifySet.includes('extkey')){
deepData.modifySet.push('extkey','adrblk')
}
console.log("deepData2=>",deepData.modifySet)
}
},
getProperty(str, value) {
let keys = str?.split('.')
for (let key of keys) {
if (value) {
value = value[key]
}
}
return value
},
// 业务信息=》基本信息=》支出目的
purposChange(key, value) {
this.handleChangeForm(key, value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment