Browse Source

数据权限bug修复

zhangwenjian 5 years ago
parent
commit
8793f868c3
2 changed files with 4 additions and 5 deletions
  1. 0 1
      src/utils/request.js
  2. 4 4
      src/views/role/index.vue

+ 0 - 1
src/utils/request.js

@@ -44,7 +44,6 @@ service.interceptors.response.use(
    */
   response => {
     const code = response.data.code
-    debugger
     if (code === 401) {
       store.dispatch('user/resetToken')
       if (URL.indexOf('login') !== -1) {

+ 4 - 4
src/views/role/index.vue

@@ -361,10 +361,10 @@ export default {
     // 所有部门节点数据
     getDeptAllCheckedKeys() {
       // 目前被选中的部门节点
-      const checkedKeys = this.$refs.dept.getHalfCheckedKeys()
+      const checkedKeys = this.$refs.dept.getCheckedKeys()
       // 半选中的部门节点
-      const halfCheckedKeys = this.$refs.dept.getCheckedKeys()
-      checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
+      // const halfCheckedKeys = this.$refs.dept.getCheckedKeys()
+      // checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
       return checkedKeys
     },
     /** 根据角色ID查询菜单树结构 */
@@ -511,7 +511,7 @@ export default {
     submitDataScope: function() {
       if (this.form.roleId !== undefined) {
         this.form.deptIds = this.getDeptAllCheckedKeys()
-
+        console.log(this.getDeptAllCheckedKeys())
         dataScope(this.form).then(response => {
           if (response.code === 200) {
             this.msgSuccess('修改成功')