田源
2024-09-29 7d05c69630d066c0992368423f90e440e3638f91
Source/UBCS-WEB/src/components/Theme/DataAuthDialog.vue
@@ -128,10 +128,8 @@
        this.loadAuthPage();
      }
    },
    classifyAuthData(newval){
      this.addIndex = newval.length <= 0 ? 0 :newval.length-1;
      // console.log(this.addIndex)
    classifyAuthData(newval) {
      this.addIndex = newval.length <= 0 ? 0 : newval.length - 1;
    }
  },
  computed: {},
@@ -173,13 +171,15 @@
        //和表格列进行对比
        this.classifyAuthHeader.forEach((item) => {
          // if (item.code !== 'data_view') {
          //   this.$set(this.classifyAuthData[index].authButton, "allDisabled", true);
          // }
          const isMatched = filteredItems.some((x) => x.id === item.prop);
          this.$nextTick(() => {
            if (this.classifyAuthData[index]) {
              if (isMatched) {
                Object.keys(this.classifyAuthData[index]).forEach((key) => {
                  this.$set(this.classifyAuthData[index].authButton, item.code, true);
                  //添加 “查看全部禁用条件”
                  if (item.code === "data_view") {
                    this.$set(this.classifyAuthData[index].authButton, "allDisabled", true);
@@ -197,7 +197,7 @@
            }
          });
        });
        // console.log(this.classifyAuthData)
        //强制刷新表格
        this.itemKey = uuidv4();
      });
@@ -251,7 +251,7 @@
        classifyItem: this.classifyData.label,
        authButton: {},
        uuid: uuidv4(),//生成唯一的id,
        index: this.addIndex,
        index: this.classifyAuthData.length -1,
      }
      //将按钮设置进去
      this.classifyAuthButton.forEach(data => {
@@ -259,7 +259,7 @@
      })
      //console.log(item)
      this.classifyAuthData.push(item)
      this.roleHandlerMethods(this.roleList[0].id, 'add', this.addIndex)
      this.roleHandlerMethods(this.roleList[0].id, 'add', this.classifyAuthData.length -1)
    },
    // 删除行
    subClassifyAuth() {
@@ -315,7 +315,7 @@
          let itemButtonList = [];
          //筛选出按钮勾选为true的列
          for (let key in item) {
            if (item[key] === true) {
            if (item[key] === true && key !== 'checkTheStatus') {
              itemButtonList.push(key);
            }
          }