Bladeren bron

增加角色授权、调整列表组件

asd123a20 3 jaren geleden
bovenliggende
commit
7ad881b225

+ 6 - 0
admin-frame/lib/apps.js

@@ -158,5 +158,11 @@ export default [
     entry: config.dev ? '//localhost:3025/admin-leave/' : 'admin-leave',
     entry: config.dev ? '//localhost:3025/admin-leave/' : 'admin-leave',
     container: config.tabs ? '#leave' : '#content',
     container: config.tabs ? '#leave' : '#content',
     activeRule: '/admin/leave'
     activeRule: '/admin/leave'
+  },
+  {
+    name: 'admin-role-menu',
+    entry: config.dev ? '//localhost:3026/admin-role-menu/' : 'admin-role-menu',
+    container: config.tabs ? '#roleMenu' : '#content',
+    activeRule: '/admin/roleMenu'
   }
   }
 ];
 ];

+ 9 - 1
admin-frame/src/components/filterList/index.vue

@@ -11,6 +11,7 @@
       :tableData="tableData"
       :tableData="tableData"
       :operation="operation"
       :operation="operation"
       :filed="filed"
       :filed="filed"
+      :options="options"
       @handle="handle"
       @handle="handle"
       @handleSelectionChange="$emit('handleSelectionChange', $event)"
       @handleSelectionChange="$emit('handleSelectionChange', $event)"
       @dblclick="$emit('dblclick', $event)"
       @dblclick="$emit('dblclick', $event)"
@@ -60,7 +61,14 @@ export default {
     // 分页总数
     // 分页总数
     total: { type: Number, default: 0 },
     total: { type: Number, default: 0 },
     // 每页条数
     // 每页条数
-    pageSize: { type: Number, default: 10 }
+    pageSize: { type: Number, default: 10 },
+    options: {
+      type: Object,
+      default: () => ({
+        size: 'mini',
+        width: 100
+      })
+    }
   },
   },
   data() {
   data() {
     return {
     return {

+ 4 - 5
admin-frame/src/components/filterList/table.vue

@@ -6,6 +6,7 @@
     style="width: 100%"
     style="width: 100%"
     @selection-change="handleSelectionChange"
     @selection-change="handleSelectionChange"
     @row-dblclick="dblclick"
     @row-dblclick="dblclick"
+    v-bind="options">
   >
   >
     <!-- 多选列 -->
     <!-- 多选列 -->
     <el-table-column v-if="selection" type="selection" stripe width="55"></el-table-column>
     <el-table-column v-if="selection" type="selection" stripe width="55"></el-table-column>
@@ -35,7 +36,8 @@
           :content="item.label"
           :content="item.label"
           placement="top-start"
           placement="top-start"
         >
         >
-          <el-button type="text" :class="item.icon" :size="options.size" @click="handle(scope.row, item)"></el-button>
+          <el-button type="text" v-if="item.icon" :class="item.icon" :size="options.size" @click="handle(scope.row, item)"></el-button>
+          <el-button type="text" v-else  :size="options.size" @click="handle(scope.row, item)">{{ item.label }}</el-button>
         </el-tooltip>
         </el-tooltip>
       </template>
       </template>
     </el-table-column>
     </el-table-column>
@@ -65,10 +67,7 @@ export default {
     // 操作列属性选项
     // 操作列属性选项
     options: {
     options: {
       type: Object,
       type: Object,
-      default: () => ({
-        size: 'mini',
-        width: 100
-      })
+      default: () => {}
     }
     }
   },
   },
   data() {
   data() {

+ 3 - 0
admin-role-menu/.browserslistrc

@@ -0,0 +1,3 @@
+> 1%
+last 2 versions
+not dead

+ 5 - 0
admin-role-menu/.editorconfig

@@ -0,0 +1,5 @@
+[*.{js,jsx,ts,tsx,vue}]
+indent_style = space
+indent_size = 2
+trim_trailing_whitespace = true
+insert_final_newline = true

+ 2 - 0
admin-role-menu/.env

@@ -0,0 +1,2 @@
+# 窗口使用弹出还是抽屉 (dialog And drawer)
+VUE_APP_WINDOW=dialog

+ 1 - 0
admin-role-menu/.eslintignore

@@ -0,0 +1 @@
+public-path.js

+ 23 - 0
admin-role-menu/.eslintrc.js

@@ -0,0 +1,23 @@
+module.exports = {
+  root: true,
+  env: {
+    node: true
+  },
+  extends: [
+    'plugin:vue/essential',
+    '@vue/standard'
+  ],
+  parserOptions: {
+    parser: 'babel-eslint'
+  },
+  rules: {
+    'no-console': 0,
+    'no-debugger': 0,
+    'comma-dangle': [2, 'never'],
+    'no-extra-parens': 2,
+    'no-extra-semi': 2,
+    semi: [2, 'always'],
+    'space-before-function-paren': [0, 'always'],
+    eqeqeq: 0
+  }
+};

+ 23 - 0
admin-role-menu/.gitignore

@@ -0,0 +1,23 @@
+.DS_Store
+node_modules
+/dist
+
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 24 - 0
admin-role-menu/README.md

@@ -0,0 +1,24 @@
+# admin-role
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Lints and fixes files
+```
+npm run lint
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

+ 5 - 0
admin-role-menu/babel.config.js

@@ -0,0 +1,5 @@
+module.exports = {
+  presets: [
+    '@vue/cli-plugin-babel/preset'
+  ]
+};

File diff suppressed because it is too large
+ 12565 - 0
admin-role-menu/package-lock.json


+ 35 - 0
admin-role-menu/package.json

@@ -0,0 +1,35 @@
+{
+  "name": "admin-role-menu",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "core-js": "^3.6.5",
+    "element-ui": "^2.15.6",
+    "sass": "^1.48.0",
+    "sass-loader": "^10.0.0",
+    "vue": "^2.6.11",
+    "vue-router": "^3.2.0",
+    "vuex": "^3.4.0"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "~4.5.0",
+    "@vue/cli-plugin-eslint": "~4.5.0",
+    "@vue/cli-plugin-router": "~4.5.0",
+    "@vue/cli-plugin-vuex": "~4.5.0",
+    "@vue/cli-service": "~4.5.0",
+    "@vue/eslint-config-standard": "^5.1.2",
+    "babel-eslint": "^10.1.0",
+    "eslint": "^6.7.2",
+    "eslint-plugin-import": "^2.20.2",
+    "eslint-plugin-node": "^11.1.0",
+    "eslint-plugin-promise": "^4.2.1",
+    "eslint-plugin-standard": "^4.0.0",
+    "eslint-plugin-vue": "^6.2.2",
+    "vue-template-compiler": "^2.6.11"
+  }
+}

BIN
admin-role-menu/public/favicon.ico


+ 17 - 0
admin-role-menu/public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= htmlWebpackPlugin.options.title %></title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 24 - 0
admin-role-menu/src/App.vue

@@ -0,0 +1,24 @@
+<template>
+  <div id="app">
+    <router-view></router-view>
+  </div>
+</template>
+
+<script>
+export default {
+  components: {},
+  computed: {},
+  data() {
+    return {};
+  },
+  mounted() {},
+  methods: {}
+};
+</script>
+
+<style lang="scss" scoped>
+#app {
+  width: 100%;
+  height: 100%;
+}
+</style>

BIN
admin-role-menu/src/assets/logo.png


+ 48 - 0
admin-role-menu/src/main.js

@@ -0,0 +1,48 @@
+import Vue from 'vue';
+import App from './App.vue';
+import VueRouter from 'vue-router';
+import routes from './router';
+import store from './store';
+import ElementUI from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+import './public-path.js';
+import dict from '@lib/dict.js';
+import tree from '@lib/tree.js';
+import resChange from '@lib/resChange.js';
+Vue.config.productionTip = false;
+Vue.use(VueRouter);
+Vue.use(ElementUI);
+Vue.use(dict);
+Vue.use(tree);
+Vue.use(resChange);
+let router = null;
+let instance = null;
+function render (props = {}) {
+  const { container } = props;
+  router = new VueRouter({
+    base: window.__POWERED_BY_QIANKUN__ ? '/admin/roleMenu/' : '/',
+    mode: 'history',
+    routes
+  });
+  instance = new Vue({
+    router,
+    store,
+    render: (h) => h(App)
+  }).$mount(container ? container.querySelector('#app') : '#app');
+}
+
+// 独立运行时
+if (!window.__POWERED_BY_QIANKUN__) {
+  render();
+}
+
+export async function bootstrap () {}
+export async function mount (props) {
+  render(props);
+}
+export async function unmount () {
+  instance.$destroy();
+  instance.$el.innerHTML = '';
+  instance = null;
+  router = null;
+}

+ 3 - 0
admin-role-menu/src/public-path.js

@@ -0,0 +1,3 @@
+if (window.__POWERED_BY_QIANKUN__) {
+  __webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;
+}

+ 11 - 0
admin-role-menu/src/router/index.js

@@ -0,0 +1,11 @@
+import home from '../views/home.vue';
+
+const routes = [
+  {
+    path: '/home',
+    name: 'home',
+    component: home
+  }
+];
+
+export default routes;

+ 63 - 0
admin-role-menu/src/store/index.js

@@ -0,0 +1,63 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import $axios from '@lib/axios.js';
+const api = {
+  roleQuery: '/api/naf/role/query',
+  menuQuery: '/api/naf/adminMenu/query',
+  queryBind: '/api/naf/roleBindMenu/queryBind',
+  batchBind: '/api/naf/roleBindMenu/batchBind',
+  batchUnBind: '/api/naf/roleBindMenu/batchUnBind'
+};
+Vue.use(Vuex);
+const state = () => ({
+  Total: 0,
+  roleList: [],
+  menusList: [],
+  bindList: []
+});
+
+const actions = {
+  async batchUnBind ({ commit }, payload) {
+    const res = await $axios.post(api.batchUnBind, payload);
+    return res;
+  },
+  async batchBind ({ commit }, payload) {
+    const res = await $axios.post(api.batchBind, payload);
+    return res;
+  },
+  async roleQuery ({ commit }) {
+    const res = await $axios.get(api.roleQuery);
+    commit('roleQuery', res);
+    return res;
+  },
+  async menuQuery ({ commit }) {
+    const res = await $axios.get(api.menuQuery);
+    commit('menuQuery', res.data);
+    return res;
+  },
+  async queryBind ({ commit }, payload) {
+    const res = await $axios.get(api.queryBind, payload);
+    commit('queryBind', res.data);
+    return res;
+  }
+};
+
+const mutations = {
+  roleQuery(state, payload) {
+    state.roleList = payload.data;
+    state.Total = payload.total;
+  },
+  menuQuery(state, payload) {
+    state.menusList = payload;
+  },
+  queryBind(state, payload) {
+    state.bindList = payload;
+  }
+};
+
+export default new Vuex.Store({
+  state,
+  actions,
+  mutations,
+  modules: {}
+});

+ 118 - 0
admin-role-menu/src/views/home.vue

@@ -0,0 +1,118 @@
+<template>
+  <div class="menushome">
+    <el-card class="box-card">
+      <div slot="header" class="clearfix">
+        <span>授权管理</span>
+      </div>
+      <div class="main">
+        <filterList ref="filterList" :pagination="false" :filter="false" :operation="operation" :options="options" :tableData="menus" :filed="filed" @view="view"></filterList>
+      </div>
+    </el-card>
+    <dialogAndDrawer :width="'35%'" :title="title" :visibleSync="visibleSync" v-if="visibleSync" @close="visibleSync = false">
+      <template v-slot:windowMain>
+        <transfer :data="roleList" :values="values" @change="transferChage"></transfer>
+      </template>
+    </dialogAndDrawer>
+  </div>
+</template>
+<script>
+import filterList from '@components/filterList/index.vue';
+import dialogAndDrawer from '@components/dialogAndDrawer.vue';
+import transfer from '@components/transfer.vue';
+import { mapState, mapActions } from 'vuex';
+export default {
+  components: {
+    filterList,
+    dialogAndDrawer,
+    transfer
+  },
+  data() {
+    return {
+      menuInfo: {},
+      values: [],
+      title: '',
+      visibleSync: false,
+      filed: [
+        { name: 'title', label: '标题', required: true, listOpts: { width: 200 } },
+        { name: 'icon', label: '菜单图标', listOpts: { width: 100 } },
+        { name: 'path', label: '菜单路由' },
+        { name: 'module', label: '分组模块' }
+      ],
+      operation: [
+        { name: 'view', label: '角色授权' }
+      ],
+      options: {
+        'row-key': 'code',
+        'default-expand-all': true,
+        'tree-props': { children: 'children', hasChildren: 'hasChildren' },
+        operWidth: 80
+      }
+    };
+  },
+  computed: {
+    ...mapState(['menusList', 'Total', 'roleList', 'bindList']),
+    menus() {
+      return this.$tree(this.menusList);
+    }
+  },
+  async mounted() {
+    await this.filterQuery();
+  },
+  methods: {
+    ...mapActions(['menuQuery', 'roleQuery', 'queryBind', 'batchBind', 'batchUnBind']),
+    // 角色授权
+    async view (e) {
+      console.log(e, 'eeee');
+      this.title = '绑定角色';
+      this.visibleSync = true;
+      this.menuInfo = e;
+      await this.roleQuery();
+      await this.queryBind({ menuCode: e.code });
+      this.values = this.bindList.map(k => k.roleCode);
+    },
+    // 查询
+    async filterQuery ({ filter = {}, paging = { page: 0, size: 10 } } = {}) {
+      await this.menuQuery({ filter, paging });
+    },
+    // 穿梭框改变
+    async transferChage (e) {
+      const menuCode = this.menuInfo.code;
+      // 解绑
+      e.filter(i => {
+        this.values = this.values.filter(k => k !== i);
+      });
+      if (this.values.length > 0) {
+        const unbind = await this.batchUnBind({ menuCode, ids: this.values });
+        this.$resChange(unbind, '解绑成功');
+      }
+      // 绑定
+      this.values.filter(y => {
+        e = e.filter(z => z == y);
+      });
+      if (e.length > 0) {
+        const res = await this.batchBind({ menuCode, ids: e });
+        this.$resChange(res, '绑定成功');
+      }
+      await this.queryBind({ menuCode: this.menuInfo.code });
+      this.values = this.bindList.map(e => e.roleCode);
+    }
+  }
+};
+</script>
+<style lang="scss">
+.menushome {
+  width: 100%;
+  height: 100%;
+  display: flex;
+  .box-card {
+    width: 100%;
+    height: 100%;
+    .el-card__body {
+      height: 90%;
+      .main {
+        overflow: auto !important;
+      }
+    }
+  }
+}
+</style>

+ 33 - 0
admin-role-menu/vue.config.js

@@ -0,0 +1,33 @@
+const path = require('path');
+const frameSrc = path.resolve(__dirname, '../admin-frame');
+const packageName = require('./package.json').name;
+module.exports = {
+  publicPath: `/${packageName}/`,
+  outputDir: path.join(frameSrc, `../../admin-web/${packageName}/`),
+  devServer: {
+    port: 3026,
+    headers: {
+      'Access-Control-Allow-Origin': '*'
+    },
+    proxy: {
+      '/api/': {
+        // target: 'http://192.168.0.45:18090'
+        target: 'http://192.168.3.45:18090'
+      }
+    }
+  },
+  configureWebpack: {
+    output: {
+      library: `${packageName}-[name]`,
+      libraryTarget: 'umd',
+      jsonpFunction: `webpackJsonp_${packageName}`
+    },
+    resolve: {
+      alias: {
+        '@components': path.join(frameSrc, '/src/components'),
+        '@style': path.join(frameSrc, '/style'),
+        '@lib': path.join(frameSrc, '/lib')
+      }
+    }
+  }
+};

+ 2 - 32
admin-role/src/store/index.js

@@ -5,29 +5,15 @@ const api = {
   roleCreate: '/api/naf/role/create',
   roleCreate: '/api/naf/role/create',
   roleUpdate: '/api/naf/role/update',
   roleUpdate: '/api/naf/role/update',
   roleDelete: '/api/naf/role/delete',
   roleDelete: '/api/naf/role/delete',
-  roleQuery: '/api/naf/role/query',
-  menuQuery: '/api/naf/adminMenu/query',
-  queryBind: '/api/naf/roleBindMenu/queryBind',
-  batchBind: '/api/naf/roleBindMenu/batchBind',
-  batchUnBind: '/api/naf/roleBindMenu/batchUnBind'
+  roleQuery: '/api/naf/role/query'
 };
 };
 Vue.use(Vuex);
 Vue.use(Vuex);
 const state = () => ({
 const state = () => ({
   Total: 0,
   Total: 0,
-  roleList: [],
-  menuList: [],
-  bindList: []
+  roleList: []
 });
 });
 
 
 const actions = {
 const actions = {
-  async batchUnBind ({ commit }, payload) {
-    const res = await $axios.post(api.batchUnBind, payload);
-    return res;
-  },
-  async batchBind ({ commit }, payload) {
-    const res = await $axios.post(api.batchBind, payload);
-    return res;
-  },
   async roleCreate ({ commit }, payload) {
   async roleCreate ({ commit }, payload) {
     const res = await $axios.post(api.roleCreate, payload);
     const res = await $axios.post(api.roleCreate, payload);
     return res;
     return res;
@@ -44,16 +30,6 @@ const actions = {
     const res = await $axios.get(api.roleQuery, { ...filter, skip: paging.page, limit: paging.size });
     const res = await $axios.get(api.roleQuery, { ...filter, skip: paging.page, limit: paging.size });
     commit('roleQuery', res);
     commit('roleQuery', res);
     return res;
     return res;
-  },
-  async menuQuery ({ commit }) {
-    const res = await $axios.get(api.menuQuery);
-    commit('menuQuery', res.data);
-    return res;
-  },
-  async queryBind ({ commit }, payload) {
-    const res = await $axios.get(api.queryBind, payload);
-    commit('queryBind', res.data);
-    return res;
   }
   }
 };
 };
 
 
@@ -61,12 +37,6 @@ const mutations = {
   roleQuery(state, payload) {
   roleQuery(state, payload) {
     state.roleList = payload.data;
     state.roleList = payload.data;
     state.Total = payload.total;
     state.Total = payload.total;
-  },
-  menuQuery(state, payload) {
-    state.menuList = payload;
-  },
-  queryBind(state, payload) {
-    state.bindList = payload;
   }
   }
 };
 };
 
 

+ 5 - 47
admin-role/src/views/home.vue

@@ -6,13 +6,12 @@
         <el-button style="float: right; padding: 3px 0" type="text" @click="addrole">添加角色</el-button>
         <el-button style="float: right; padding: 3px 0" type="text" @click="addrole">添加角色</el-button>
       </div>
       </div>
       <div class="main">
       <div class="main">
-        <filterList ref="filterList" :operation="operation" :tableData="roleList" :filed="filed" @bind="menuBind" @edit="filtereEdit" @delete="filterDelete" @query="filterQuery" :total="Total"></filterList>
+        <filterList ref="filterList" :tableData="roleList" :filed="filed" @edit="filtereEdit" @delete="filterDelete" @query="filterQuery" :total="Total"></filterList>
       </div>
       </div>
     </el-card>
     </el-card>
     <dialogAndDrawer :width="'35%'" :title="title" :visibleSync="visibleSync" v-if="visibleSync" @close="visibleSync = false">
     <dialogAndDrawer :width="'35%'" :title="title" :visibleSync="visibleSync" v-if="visibleSync" @close="visibleSync = false">
       <template v-slot:windowMain>
       <template v-slot:windowMain>
-        <formData v-if="!bind" :filed="formfiled" :data="formdata" :rules="formrules" @save="formSave"></formData>
-        <transfer v-else :prop="{key: 'code',label: 'title'}" :data="menuList" :values="values" @change="transferChage"></transfer>
+        <formData :filed="formfiled" :data="formdata" :rules="formrules" @save="formSave"></formData>
       </template>
       </template>
     </dialogAndDrawer>
     </dialogAndDrawer>
   </div>
   </div>
@@ -21,27 +20,17 @@
 import filterList from '@components/filterList/index.vue';
 import filterList from '@components/filterList/index.vue';
 import dialogAndDrawer from '@components/dialogAndDrawer.vue';
 import dialogAndDrawer from '@components/dialogAndDrawer.vue';
 import formData from '@components/formData/index.vue';
 import formData from '@components/formData/index.vue';
-import transfer from '@components/transfer.vue';
 import { mapState, mapActions } from 'vuex';
 import { mapState, mapActions } from 'vuex';
 export default {
 export default {
   components: {
   components: {
     filterList,
     filterList,
     dialogAndDrawer,
     dialogAndDrawer,
-    formData,
-    transfer
+    formData
   },
   },
   data() {
   data() {
     return {
     return {
-      values: [],
-      bind: false,
-      roleInfo: null,
       title: '',
       title: '',
       visibleSync: false,
       visibleSync: false,
-      operation: [
-        { name: 'bind', label: '绑定菜单', icon: 'el-icon-menu' },
-        { name: 'edit', label: '修改', icon: 'el-icon-edit' },
-        { name: 'delete', label: '删除', icon: 'el-icon-delete' }
-      ],
       filed: [
       filed: [
         { name: 'name', label: '名称', filter: true },
         { name: 'name', label: '名称', filter: true },
         { name: 'code', label: '编码', filter: true }
         { name: 'code', label: '编码', filter: true }
@@ -62,13 +51,13 @@ export default {
     };
     };
   },
   },
   computed: {
   computed: {
-    ...mapState(['roleList', 'Total', 'menuList', 'bindList'])
+    ...mapState(['roleList', 'Total'])
   },
   },
   async mounted() {
   async mounted() {
     await this.filterQuery();
     await this.filterQuery();
   },
   },
   methods: {
   methods: {
-    ...mapActions(['roleQuery', 'roleCreate', 'roleUpdate', 'roleDelete', 'menuQuery', 'queryBind', 'batchUnBind', 'batchBind']),
+    ...mapActions(['roleQuery', 'roleCreate', 'roleUpdate', 'roleDelete']),
     // 添加
     // 添加
     addrole () {
     addrole () {
       this.formdata = {};
       this.formdata = {};
@@ -110,37 +99,6 @@ export default {
       this.$resChange(res, msg);
       this.$resChange(res, msg);
       this.filterQuery();
       this.filterQuery();
       this.visibleSync = false;
       this.visibleSync = false;
-    },
-    async menuBind (e) {
-      this.roleInfo = e;
-      this.title = '绑定菜单';
-      this.visibleSync = true;
-      this.bind = true;
-      await this.menuQuery();
-      await this.queryBind({ roleCode: this.roleInfo.code });
-      this.values = this.bindList.map(e => e.menuCode);
-    },
-    // 穿梭框改变
-    async transferChage (e) {
-      const roleCode = this.roleInfo.code;
-      // 解绑
-      e.filter(i => {
-        this.values = this.values.filter(k => k !== i);
-      });
-      if (this.values.length > 0) {
-        const unbind = await this.batchUnBind({ roleCode, ids: this.values });
-        this.$resChange(unbind, '解绑成功');
-      }
-      // 绑定
-      this.values.filter(y => {
-        e = e.filter(z => z == y);
-      });
-      if (e.length > 0) {
-        const res = await this.batchBind({ roleCode, ids: e });
-        this.$resChange(res, '绑定成功');
-      }
-      await this.queryBind({ roleCode: this.roleInfo.code });
-      this.values = this.bindList.map(e => e.menuCode);
     }
     }
   }
   }
 };
 };

+ 3 - 0
admin.code-workspace

@@ -75,6 +75,9 @@
 		{
 		{
 			"path":  "admin-leave"
 			"path":  "admin-leave"
 		},
 		},
+		{
+			"path":  "admin-role-menu"
+		},
 	],
 	],
 	"settings": {}
 	"settings": {}
 }
 }