ludc
2024-01-18 296f034c06ca8542b39878f860ffa5b909914338
Source/UBCS-WEB/src/components/Theme/ClassifyAuthDialog.vue
@@ -113,6 +113,11 @@
      currentRow: {}
    };
  },
  computed: {},
  mounted() {
  },
  created() {
  },
  watch: {
    // 监听父组件传的窗口显示隐藏的值
    visible() {
@@ -177,18 +182,13 @@
                this.classifyAuthData.push(item);
                this.addIndex = this.classifyAuthData.length - 1; //添加行下标等于classifyAuthData的长度-1
                this.roleHandlerMethods(authData.roleId, 'create', index)
                console.log('index', index)
                // console.log('index', index)
              })
            }
          });
        });
      }
    },
  },
  computed: {},
  mounted() {
  },
  created() {
  },
  methods: {
    roleHandlerMethods(id, type, index) {
@@ -201,8 +201,8 @@
        const filteredItems = this.classifyAuthButton.filter(item => {
          return !res.data.data.find(x => x.id === item.id);
        });
        console.log('禁用按钮',filteredItems)
        console.log('不禁用按钮',res.data.data)
        // console.log('禁用按钮',filteredItems)
        // console.log('不禁用按钮',res.data.data)
        //拿表格列头循环和没有对应的属性进行比较
        this.classifyAuthHeader.forEach((item) => {
          const isMatched = filteredItems.some(x => x.id === item.prop);
@@ -243,7 +243,7 @@
            this.classifyAuthData[classIndex].allDisabled = false;
          }
        });
        console.log('classifyAuthData',this.classifyAuthData)
        // console.log('classifyAuthData',this.classifyAuthData)
        //强制刷新表格
        this.itemKey = uuidv4();
      })
@@ -295,7 +295,7 @@
        this.$message.warning("当前租户不存在角色信息!");
        return;
      }
      console.log('this.roleList', this.roleList)
      // console.log('this.roleList', this.roleList)
      this.addIndex++; //自定义生成添加行下标
      let item = {
        roleData: this.roleList[0].id,
@@ -307,7 +307,6 @@
      this.classifyAuthButton.forEach(data => {
        Vue.set(item, data.id, false);
      })
      //console.log(item)
      this.classifyAuthData.push(item);
      this.roleHandlerMethods(this.roleList[0].id, 'add', this.addIndex)
    },