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

修改bug

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