提交 a4d0fb0f authored 作者: pengxiaohui's avatar pengxiaohui

修改bug

上级 f7c5d082
...@@ -244,14 +244,7 @@ export default { ...@@ -244,14 +244,7 @@ export default {
// 删除 // 删除
handleRemove() { handleRemove() {
const ids = this.multipleSelection.map(item => item.id) const ids = this.multipleSelection.map(item => item.id)
batchDeleteAd({ ids }).then(res => { this.fetchDeleteAd(ids)
if (res.code === 0) {
this.$message.success('删除成功')
this.$refs.tableList.refetch(true)
} else {
this.$message.error(res.message)
}
})
}, },
handleCreate() { handleCreate() {
this.drawFormOptions.type = 'create' this.drawFormOptions.type = 'create'
...@@ -325,6 +318,16 @@ export default { ...@@ -325,6 +318,16 @@ export default {
this.$message.error(res.message) this.$message.error(res.message)
} }
}) })
},
fetchDeleteAd(ids) {
batchDeleteAd({ ids }).then(res => {
if (res.code === 0) {
this.$message.success('删除成功')
this.$refs.tableList.refetch(true)
} else {
this.$message.error(res.message)
}
})
} }
}, },
beforeMount() { beforeMount() {
......
...@@ -335,9 +335,7 @@ export default { ...@@ -335,9 +335,7 @@ export default {
this.$message.success(msg + '成功') this.$message.success(msg + '成功')
this.$refs.tabList.refetch() this.$refs.tabList.refetch()
// 刷新用户user_detail // 刷新用户user_detail
if (this.userProjectIds.includes(data.project_id)) { this.$store.dispatch('checkRolesPermissions')
this.$store.dispatch('checkRolesPermissions')
}
} else { } else {
this.$message.error(res.message || msg + '失败') this.$message.error(res.message || msg + '失败')
} }
......
...@@ -279,9 +279,9 @@ export default { ...@@ -279,9 +279,9 @@ export default {
handleCreate() { handleCreate() {
this.drawerVisible = true this.drawerVisible = true
this.drawerType = 'create' this.drawerType = 'create'
this.$refs.drawerForm.resetFields();
}, },
handleDrawerClose() { handleDrawerClose() {
this.$refs.drawerForm.resetFields();
this.drawerVisible = false this.drawerVisible = false
this.form = Object.assign({}, drawerForm) this.form = Object.assign({}, drawerForm)
this.checkAll = false this.checkAll = false
...@@ -346,15 +346,15 @@ export default { ...@@ -346,15 +346,15 @@ export default {
}, },
handleDetails(val) { handleDetails(val) {
if (this.hasCreate) { if (this.hasCreate) {
this.drawerVisible = true
this.drawerType = 'details'
const form = this.form const form = this.form
form.sso_id = val.sso_id form.sso_id = val.sso_id
form.role_id = val.roles[0] ? val.roles[0].id : '' form.role_id = val.roles[0] ? val.roles[0].id : ''
form.project_ids = val.projects.map(item => item.id) || [] form.project_ids = val.projects.map(item => item.id) || []
this.handleCheckedProjectChange(form.project_ids)
this.operateItem = val this.operateItem = val
this.userList = [val.sso_user] this.userList = [val.sso_user]
this.drawerVisible = true
this.drawerType = 'details'
this.$refs.drawerForm.resetFields();
} }
}, },
statusChange(val) { statusChange(val) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论