Commit 66615378 by liuyong
2 parents 9e19a3f6 1f290b65
Showing with 18 additions and 15 deletions
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<el-table-column type="index" label="序号" width="80" align="center"></el-table-column> <el-table-column type="index" label="序号" width="80" align="center"></el-table-column>
<el-table-column prop="elementName" label="元素名称" align="center"></el-table-column> <el-table-column prop="elementName" label="元素名称" align="center"></el-table-column>
<el-table-column prop="archiLevelId" label="架构层次" width="150" align="center"> <el-table-column prop="archiLevelId" label="架构层次" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span >{{dicObj.archiLevelId[scope.row.archiLevelId]}}</span> <span>{{ scope.row.archiLevelName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="archiBelongId" label="架构归属" width="150" align="center"> <el-table-column prop="archiBelongId" label="架构归属" width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -378,18 +378,22 @@ export default { ...@@ -378,18 +378,22 @@ export default {
getYMXZDGLlist(this.params).then(res => { getYMXZDGLlist(this.params).then(res => {
if (res.code == 200) { if (res.code == 200) {
if(res.data.records.length > 0) { if(res.data.records.length > 0) {
this.get_dialog_select2().then(res2 => { Promise.all([ this.get_dialog_select1(), this.get_dialog_select2() ]).then(res2 => {
res.data.records.map(item => { this.dialog_select1 = res2[0];
const result = res2.find(item2 => item2.belongId == item.archiBelongId); this.search_select1 = res2[1];
item['archiBelongName'] = result ? result.name : null; res.data.records.map(item => {
}) let result1 = res2[0].find(item2 => item2.levelId == item.archiLevelId);
this.tableData = res.data.records; let result2 = res2[1].find(item2 => item2.belongId == item.archiBelongId);
}); item['archiLevelName'] = result1 ? result1.name : '';
item['archiBelongName'] = result2 ? result2.name : '';
});
this.tableData = res.data.records;
})
}else { }else {
this.page.total = 0; this.page.total = 0;
this.tableData = []; this.tableData = [];
} }
} }
}); });
}, },
...@@ -408,7 +412,7 @@ export default { ...@@ -408,7 +412,7 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
this.page.current = 1; this.page.current = 1;
this.params.current = 1; this.params.current = 1;
this.page.size = val; this.page.size = val;
this.params.pageSize = val; this.params.pageSize = val;
this.getList(); this.getList();
...@@ -552,7 +556,7 @@ export default { ...@@ -552,7 +556,7 @@ export default {
} }
}); });
}); });
}, },
get_dialog_select2() {//查询架构归属下拉框值 get_dialog_select2() {//查询架构归属下拉框值
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -887,4 +891,4 @@ export default { ...@@ -887,4 +891,4 @@ export default {
background-color: #0D867F; background-color: #0D867F;
color: #fff; color: #fff;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!