Commit 2ecc2ef9 by peiqiQQQ

修改下拉查询位置顺序

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