Commit ee717a6a authored by 李俊赕's avatar 李俊赕

数据初始化

parent 0fb93627
......@@ -82,7 +82,8 @@ export default {
visible: false,
type: 'select',
item: null
}
},
fieldNameArr: []
}
},
watch: {
......@@ -175,9 +176,18 @@ export default {
dataList.map(item => {
fieldNameArr.push(item.fieldName)
})
this.fieldNameArr = fieldNameArr
formatlist.map(item => {
const idx = fieldNameArr.indexOf(item.fieldName)
let idx = fieldNameArr.indexOf(item.fieldName)
if (item.otherField && item.otherField.length > 0) {
item.otherField.map(otherItem=>{
const idx1 = fieldNameArr.indexOf(otherItem.fieldName)
if (idx1 >= 0) {
item.value = dataList[idx1].value
break
}
})
}
if (idx >= 0) {
item.value = dataList[idx].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