diff --git a/src/api/system/role.js b/src/api/system/role.js index 4b455e1..1744cb7 100644 --- a/src/api/system/role.js +++ b/src/api/system/role.js @@ -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 + }) } \ No newline at end of file diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 9d34963..bc140b0 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -134,6 +134,7 @@ @click="handleDelete(scope.row)" v-hasPermi="['system:role:remove']" >删除 + 恢复默认菜单权限 更多 @@ -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', { diff --git a/vue.config.js b/vue.config.js index 0f7f8f6..6df3777 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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: {