v1.9 优化组织修改显示不正确bug

This commit is contained in:
wuxw 2025-09-09 16:04:19 +08:00
parent 7ceb32c011
commit 5077115fa7
2 changed files with 6 additions and 10 deletions

View File

@ -40,11 +40,7 @@ export function listOrgs(params) {
params params
}).then(response => { }).then(response => {
const res = response.data const res = response.data
if (res.code == 0) {
resolve(res) resolve(res)
} else {
reject(new Error(res.msg || '获取组织列表失败'))
}
}).catch(error => { }).catch(error => {
reject(error) reject(error)
}) })

View File

@ -68,21 +68,21 @@
orgId: data.id, orgId: data.id,
orgName: data.text, orgName: data.text,
orgLevel: '', orgLevel: '',
parentOrgId: data.parentId, // parentOrgId: data.parentId,
parentOrgName: data.parentText || '', // parentOrgName: data.parentText || '',
description: data.text || '' //description: data.text || ''
} }
this.visible = true this.visible = true
this.getList() this.getList()
}, },
async getList() { async getList() {
const {data} = await listOrgs({ const {orgs} = await listOrgs({
page: 1, page: 1,
row: 1, row: 1,
orgId: this.form.orgId orgId: this.form.orgId
}) })
this.form = {...data[0]} this.form = {...orgs[0]}
console.log(data) console.log(orgs)
}, },
handleSubmit() { handleSubmit() {
this.$refs.form.validate(valid => { this.$refs.form.validate(valid => {