Commit 2ecc2ef9 by peiqiQQQ

修改下拉查询位置顺序

1 parent 049fed99
......@@ -871,21 +871,32 @@ export default {
predefineColors: archiEleColor
}
},
created(){
Promise.all([
this.get_dialog_select1(),
this.get_dialog_select2(),
]).then((res2) => {
this.dialog_select1 = res2[0]
this.search_select1 = res2[1]
})
this.getStateList()
this.getScopeApplicationOptions()
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
this.get_table()
},
methods: {
// 适用范围
// getDictTypeOptions('scope_application').then((res) => {
getScopeApplicationOptions(){
query_jia_gou_ceng_ci_new({"typeValue": "scope_application"}).then(res => {
// this.scopeApplicationOptions = res
this.scopeApplicationOptions = res.data
})
this.getStateList()
},
methods: {
// 状态
getStateList(){
query_jia_gou_ceng_ci_new({"typeValue": "sys_state"}).then(res => {
if (res.code == 200) {
......@@ -1561,6 +1572,14 @@ export default {
this.pager.size = result.data.size
if (result.data.records.length > 0) {
result.data.records.map((item) => {
let result1 = this.dialog_select1.find(
(item2) => item2.value == item.archiLevelId,
)
let result2 = this.search_select1.find(
(item2) => item2.value == item.archiBelongId,
)
item['archiLevelName'] = result1 ? result1.label : ''
item['archiBelongName'] = result2 ? result2.label : ''
if (item.icon.includes('svg+xml')) {
const item_icon = item.icon.split('base64,')[1]
const decode_item_icon = window.atob(item_icon) //svg解码,为字符串
......@@ -1604,29 +1623,7 @@ export default {
item['height'] = 0
}
})
Promise.all([
this.get_dialog_select1(),
this.get_dialog_select2(),
]).then((res2) => {
this.dialog_select1 = res2[0]
this.search_select1 = res2[1]
result.data.records.map((item) => {
let result1 = res2[0].find(
// (item2) => item2.levelId == item.archiLevelId,
(item2) => item2.value == item.archiLevelId,
)
let result2 = res2[1].find(
// (item2) => item2.belongId == item.archiBelongId,
(item2) => item2.value == item.archiBelongId,
)
// item['archiLevelName'] = result1 ? result1.name : ''
// item['archiBelongName'] = result2 ? result2.name : ''
item['archiLevelName'] = result1 ? result1.label : ''
item['archiBelongName'] = result2 ? result2.label : ''
})
this.tableData = result.data.records
})
} else {
this.tableData = []
}
......
......@@ -720,23 +720,22 @@ export default {
is_add_edit2: 'add',
}
},
mounted() {
created(){
// 适用范围下拉
// this.get_dialog_select2().then((res) => {
query_jia_gou_ceng_ci_new({"typeValue": "scope_application"}).then(res => {
// this.search_select1 = this.search_select1.concat(res)
this.search_select1 = res.data
this.search_select1.forEach((item) => {
this.dicObj.scope[item.value] = item.label
})
})
// 初始化查询列表
this.getList()
this.getStateList()
// 获取元素列表
this.getYuansuList()
this.getStateList()
},
created() {},
mounted() {
// 初始化查询列表
this.getList()
},
methods: {
getStateList(){
query_jia_gou_ceng_ci_new({"typeValue": "sys_state"}).then(res => {
......
......@@ -739,17 +739,18 @@ export default {
tableHeight: null,
}
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
created(){
// 获取下拉
this.getArchiStageList()
this.getLevelList()
this.getBelongList()
this.getStateList()
},
mounted() {
window.addEventListener('resize', () => {
this.set_table_height()
})
this.set_table_height()
// 初始化查询列表
this.getList()
......@@ -761,7 +762,6 @@ export default {
this.getEleList()
this.gtEleRelList()
},
created() {},
methods: {
// 架构大类
getArchiStageList(){
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!