Commit 1f290b65 by xiehao

1、修复了已知问题

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