增加恢复默认菜单权限
This commit is contained in:
parent
a83b9723ae
commit
df9d07734f
@ -108,4 +108,13 @@ export function authUserSelectAll(data) {
|
||||
method: 'put',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
// 角色恢复默认菜单权限
|
||||
export function resetRole(query) {
|
||||
return request({
|
||||
url: '/system/role/resetRole',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
@ -134,6 +134,7 @@
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:role:remove']"
|
||||
>删除</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-s-help" v-if="scope.row.createBy === 'admin'" @click="restoreRole(scope.row.roleId)">恢复默认菜单权限</el-button>
|
||||
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
|
||||
<span class="el-dropdown-link">
|
||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||
@ -603,6 +604,31 @@ export default {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 恢复默认菜单权限
|
||||
restoreRole(roleId) {
|
||||
this.$confirm("确定恢复默认菜单权限吗?", '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
resetRole(roleId).then(result => {
|
||||
if (result.code === 200) {
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: result.message,
|
||||
type: 'success'
|
||||
})
|
||||
this.getList();
|
||||
} else {
|
||||
this.$notify({
|
||||
title: '失败',
|
||||
message: result.message,
|
||||
type: 'error'
|
||||
})
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/role/export', {
|
||||
|
@ -35,14 +35,14 @@ module.exports = {
|
||||
proxy: {
|
||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||
"/prod-api": {
|
||||
target: `http://192.168.3.53:8062`,
|
||||
target: `http://192.168.3.53:8063`,
|
||||
changeOrigin: true,
|
||||
// pathRewrite: {
|
||||
// ['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
// }
|
||||
},
|
||||
"/ureport": {
|
||||
target: `http://192.168.3.53:8062`,
|
||||
target: `http://192.168.3.53:8063`,
|
||||
ws: false,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
Loading…
Reference in New Issue
Block a user