refactor(src/views/user/): 优化用户操作

duizhaopin_ui
duan 3 years ago
parent 104eb78179
commit 3ea33d2ae9

@ -34,6 +34,15 @@ export function user_power(data) {
})
}
// /api/power/user_power
export function get_module_list(data) {
return request({
url: '/api/power/get_module_list',
method: 'post',
data
})
}
// /api/user/update
export function update(data) {
return request({
@ -52,6 +61,15 @@ export function del(data) {
})
}
// /api/power/get_list
export function get_role_list(data) {
return request({
url: '/api/power/get_list',
method: 'post',
data
})
}
// export function getInfo(token) {
// return request({
// url: '/vue-admin-template/user/info',

@ -234,11 +234,13 @@ export default {
add(stringify(data)).then(res => {
this.$message.success(res.msg)
this.dialogVisible = false
this.getList()
})
} else {
update(stringify(data)).then(res => {
this.$message.success(res.msg)
this.dialogVisible = false
this.getList()
})
}
},
@ -246,7 +248,7 @@ export default {
this.userFormData = {}
},
handleUserFormCancel() {
this.dialogVisible = true
this.dialogVisible = false
this.userFormData = {}
},
handleAddUser() {
@ -276,7 +278,7 @@ export default {
cancelButtonText: '取消',
type: 'warning'
}).then(() =>
del(stringify({ 'user_id': this.multipleSelection[0].user })).then(
del(stringify({ 'user_id': this.multipleSelection[0].user_id })).then(
res => {
this.$message.success({
type: 'success',

Loading…
Cancel
Save