Merge pull request #8947 from ulleo/dev
fix(X-Pack): 修复打开数据填报表单保存页面时,在文件夹列表查询完成前点击所属文件夹导致下拉菜单展示不正确问题
This commit is contained in:
commit
dd2a9e17a2
@ -142,6 +142,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.loading = true
|
||||||
this.formData = this.form
|
this.formData = this.form
|
||||||
|
|
||||||
forEach(this.formData.forms, f => {
|
forEach(this.formData.forms, f => {
|
||||||
@ -150,23 +151,24 @@ export default {
|
|||||||
f.settings.mapping.type = f.settings.mapping.typeOptions[0].value
|
f.settings.mapping.type = f.settings.mapping.typeOptions[0].value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const p1 = listDatasourceType()
|
||||||
|
const p2 = listDatasource()
|
||||||
|
const p3 = listForm({ nodeType: 'folder' })
|
||||||
|
|
||||||
listDatasourceType().then(res => {
|
Promise.all([p1, p2, p3]).then((val) => {
|
||||||
this.allDatasourceTypes = res.data
|
this.allDatasourceTypes = val[0].data
|
||||||
})
|
|
||||||
|
|
||||||
listDatasource().then(res => {
|
this.allDatasourceList = val[1].data
|
||||||
this.allDatasourceList = res.data
|
|
||||||
})
|
|
||||||
|
|
||||||
listForm({ nodeType: 'folder' }).then(res => {
|
this.folders = val[2].data || []
|
||||||
this.folders = res.data || []
|
|
||||||
if (this.formData.folder) {
|
if (this.formData.folder) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.tree.setCurrentKey(this.formData.folder)
|
this.$refs.tree.setCurrentKey(this.formData.folder)
|
||||||
this.$refs.tree.setCheckedKeys([this.formData.folder])
|
this.$refs.tree.setCheckedKeys([this.formData.folder])
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user