增加恢复默认菜单权限
This commit is contained in:
parent
a83b9723ae
commit
df9d07734f
@ -108,4 +108,13 @@ export function authUserSelectAll(data) {
|
|||||||
method: 'put',
|
method: 'put',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 角色恢复默认菜单权限
|
||||||
|
export function resetRole(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/role/resetRole',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
}
|
}
|
@ -134,6 +134,7 @@
|
|||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:role:remove']"
|
v-hasPermi="['system:role:remove']"
|
||||||
>删除</el-button>
|
>删除</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']">
|
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
<i class="el-icon-d-arrow-right el-icon--right"></i>更多
|
||||||
@ -603,6 +604,31 @@ export default {
|
|||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
}).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() {
|
handleExport() {
|
||||||
this.download('system/role/export', {
|
this.download('system/role/export', {
|
||||||
|
@ -35,14 +35,14 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
"/prod-api": {
|
"/prod-api": {
|
||||||
target: `http://192.168.3.53:8062`,
|
target: `http://192.168.3.53:8063`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
// pathRewrite: {
|
// pathRewrite: {
|
||||||
// ['^' + process.env.VUE_APP_BASE_API]: ''
|
// ['^' + process.env.VUE_APP_BASE_API]: ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
"/ureport": {
|
"/ureport": {
|
||||||
target: `http://192.168.3.53:8062`,
|
target: `http://192.168.3.53:8063`,
|
||||||
ws: false,
|
ws: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
Loading…
Reference in New Issue
Block a user