田源
2024-08-19 39a6e2d4cbbc789955400ffd2352514a8fe4c188
Source/plt-web/plt-web-ui/src/views/modelingMenu/modeling/linkType/index.vue
@@ -714,12 +714,24 @@
        this.$message.error('请至少选择一条数据');
        return;
      }
      ;
      this.$confirm('您确定要删除所选择的数据吗?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
      deleteLink(this.nodeRow).then(res => {
        if (res.data.code === 200) {
          this.$message.success('删除成功');
          this.getTreeList();
        }
      })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // 创建按钮
@@ -762,9 +774,10 @@
    // 一致性检查
    checkClickHandler() {
      checkLinkType().then(res => {
        if (res && res.data && res.data.data) {
      this.conCheckVisible = true;
      this.conCheckLoading = true;
      checkLinkType().then(res => {
        if (res.data.code === 200) {
          const data = res.data.data;
          this.conDefaultCheckData = data; // 保留一份原始数据
@@ -793,19 +806,19 @@
              if (splitMethods[0].startsWith('_ADD')) {
                outputData.push({
                  id: id,
                  methods: '增加列(' + splitMethods[1].slice(0, -1) + ')', // 结束位置减去)的字符
                    methods: '增加列(' + splitMethods[0].slice(0, -1) + ')', // 结束位置减去)的字符
                  status: '未修复'
                });
              } else if (splitMethods[0].startsWith('_CREATE')) {
                outputData.push({
                  id: id,
                  methods: '创建表(' + splitMethods[1].slice(0, -1) + ')',
                    methods: '创建表(' + splitMethods[0].slice(0, -1) + ')',
                  status: '未修复'
                });
              } else if (splitMethods[0].startsWith('_DROP')) {
                outputData.push({
                  id: id,
                  methods: '移除列(' + splitMethods[1].slice(0, -1) + ')',
                    methods: '移除列(' + splitMethods[0].slice(0, -1) + ')',
                  status: '未修复'
                });
              } else {
@@ -815,6 +828,9 @@
          });
          this.conCheckData = outputData;
        }
        } else {
          this.$message.success(res.data.msg);
        }
      }).catch(err => {
        this.$message.error(err);
      })
@@ -822,11 +838,11 @@
    // 修复一致性检查
    repairClickHandler() {
      console.log(this.conDefaultCheckData)
      const params = this.conDefaultCheckData[0];
      repairTable(params).then(res => {
        if (func.isEmptyObject(res.data.obj[0])) {
          this.$message.success('修复成功');
          this.conCheckData = [];
        } else {
          this.$message.error('修复失败,请重新尝试!');
        }
@@ -842,6 +858,8 @@
          this.createViewLoading = false;
          this.$message.success(res.data.obj);
        }
      }).catch(err => {
        this.createViewLoading = false;
      })
    },