页面列表的字段回显
This commit is contained in:
@@ -86,6 +86,12 @@
|
||||
prop="countryArea"
|
||||
label="国家/地区"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.countryArea.indexOf(',') >= 0">
|
||||
<span>{{ scope.row.countryArea }}</span>
|
||||
</span>
|
||||
<span v-else>{{ countryAreaMap[scope.row.countryArea] }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="detailedListName"
|
||||
@@ -170,6 +176,7 @@ export default {
|
||||
name: "listOfCountries",
|
||||
data() {
|
||||
return {
|
||||
countryAreaMap: {},
|
||||
searching: false,
|
||||
total: 0,
|
||||
page: 1,
|
||||
@@ -349,6 +356,12 @@ export default {
|
||||
fileIds: item.fileIds
|
||||
}
|
||||
});
|
||||
},
|
||||
// 将文本状态的id与name对应
|
||||
setMap(data){
|
||||
data.forEach(item => {
|
||||
this.$set(this.countryAreaMap, item.value, item.label)
|
||||
})
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -359,6 +372,7 @@ export default {
|
||||
_this: this
|
||||
}, res => {
|
||||
this.countryOptions = res.data.COUNTRY;
|
||||
this.setMap(this.countryOptions)
|
||||
}, e => {
|
||||
});
|
||||
}
|
||||
|
||||
@@ -352,7 +352,8 @@ export default {
|
||||
this.$router.push({
|
||||
name: "OtherAddEit",
|
||||
query: {
|
||||
id: item.id
|
||||
id: item.id,
|
||||
fileIds: item.fileIds
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -355,7 +355,8 @@ export default {
|
||||
this.$router.push({
|
||||
name: "ProjectAddEit",
|
||||
query: {
|
||||
id: item.id
|
||||
id: item.id,
|
||||
fileIds: item.fileIds
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user