Commit 5077115fa70c776bb0bf0987afc4b0b57ef1e9b3
1 parent
7ceb32c0
v1.9 优化组织修改显示不正确bug
Showing
2 changed files
with
6 additions
and
10 deletions
src/api/org/orgApi.js
| ... | ... | @@ -40,11 +40,7 @@ export function listOrgs(params) { |
| 40 | 40 | params |
| 41 | 41 | }).then(response => { |
| 42 | 42 | const res = response.data |
| 43 | - if (res.code == 0) { | |
| 44 | 43 | resolve(res) |
| 45 | - } else { | |
| 46 | - reject(new Error(res.msg || '获取组织列表失败')) | |
| 47 | - } | |
| 48 | 44 | }).catch(error => { |
| 49 | 45 | reject(error) |
| 50 | 46 | }) | ... | ... |
src/components/org/EditOrg.vue
| ... | ... | @@ -68,21 +68,21 @@ |
| 68 | 68 | orgId: data.id, |
| 69 | 69 | orgName: data.text, |
| 70 | 70 | orgLevel: '', |
| 71 | - parentOrgId: data.parentId, | |
| 72 | - parentOrgName: data.parentText || '', | |
| 73 | - description: data.text || '' | |
| 71 | + // parentOrgId: data.parentId, | |
| 72 | + // parentOrgName: data.parentText || '', | |
| 73 | + //description: data.text || '' | |
| 74 | 74 | } |
| 75 | 75 | this.visible = true |
| 76 | 76 | this.getList() |
| 77 | 77 | }, |
| 78 | 78 | async getList() { |
| 79 | - const {data} = await listOrgs({ | |
| 79 | + const {orgs} = await listOrgs({ | |
| 80 | 80 | page: 1, |
| 81 | 81 | row: 1, |
| 82 | 82 | orgId: this.form.orgId |
| 83 | 83 | }) |
| 84 | - this.form = {...data[0]} | |
| 85 | - console.log(data) | |
| 84 | + this.form = {...orgs[0]} | |
| 85 | + console.log(orgs) | |
| 86 | 86 | }, |
| 87 | 87 | handleSubmit() { |
| 88 | 88 | this.$refs.form.validate(valid => { | ... | ... |