田源
2023-11-17 ba90ddf7618567877f1211f671ae1b34c378faad
整合代码
已修改1个文件
45 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue
@@ -1284,20 +1284,17 @@
      }
    },
    //树刷新
    flushed() {
    async flushed() {
      this.loading = true;
      this.getAttr()
        .then(() => {
          this.loading = false;
          this.$refs.tree.setCurrentKey(null);
          this.nodeClickList = {}
          this.TreeList = []
          this.TreeFlagCode = true;
        })
        .catch(error => {
          this.loading = false;
          console.error(error);
        });
      try {
        await this.getAttr()
        this.$refs.tree.setCurrentKey(null);
        this.nodeClickList = {}
        this.TreeList = []
        this.TreeFlagCode = true;
      } finally {
        this.loading = false;
      }
    },
    //启用和停用都先判断状态
    //启用
@@ -1321,11 +1318,12 @@
          type: 'warning'
        });
        if (confirmResult) {
          await TreeEnable(this.nodeClickList);
          this.$message({
            type: 'success',
            message: '启用成功!'
          });
          await TreeEnable(this.nodeClickList).then(res => {
            this.$message({
              type: 'success',
              message: '启用成功!'
            });
          })
          await this.getAttr();
        } else {
@@ -1363,11 +1361,12 @@
          type: 'warning'
        });
        if (confirmResult) {
          await TreeDeactivate(this.nodeClickList);
          this.$message({
            type: 'success',
            message: '停用成功!'
          });
          await TreeDeactivate(this.nodeClickList).then(res => {
            this.$message({
              type: 'success',
              message: '停用成功!'
            });
          })
          this.nodeClickList['flag'] = true;
          await this.getAttr();
        } else {