spring
2025-03-04 6528f6c57ef76a321107eb3a8797d9a320a3902e
src/views/business/inspectionTask/index.vue
@@ -196,7 +196,7 @@
          新增
        </el-button>
      </div>
      <el-table :data="bindTableData" style="width: 100%" height="70vh">
      <el-table :data="bindTableData" style="width: 100%" height="70vh" v-loading="bindTableDataLoading">
        <el-table-column prop="inspectionItemClass" label="检验项分类" width="150">
        </el-table-column>
        <el-table-column prop="inspectionItem" label="检验项" width="150">
@@ -268,6 +268,7 @@
      InspectionKey: 1,
      bindDialogVisible: false,
      bindAddDialogVisible: false,
      bindTableDataLoading: false,
      bindTableData: [],
      bindAddTableData: [],
      chooseBindAddList: [],
@@ -522,13 +523,15 @@
            if (obj) {
              return this.insResultList.find((m) => m.value == params).label;
            } else {
              return ''
              return null
            }
          },
          formatType: (params) => {
            let obj = this.insResultList.find((m) => m.value == params)
            if (obj) {
              return this.insResultList.find((m) => m.value == params).type;
            } else {
              return null
            }
          },
        },
@@ -951,10 +954,6 @@
      })
        .then((res) => {
          this.loading = false;
          if (res.code == 201) {
            this.$message.error("绑定失败");
            return;
          }
          this.$message.success("绑定成功");
          this.bindAddDialogVisible = false;
          this.getBinding(this.bindCurrentInfo);
@@ -969,17 +968,14 @@
        cancelButtonText: "取消",
        type: "warning",
      }).then(async () => {
        delProductTreeByProductId({ productId: row.id })
          .then((res) => {
            if (res.coe == 201) {
              // this.$message.error('未绑定检验项')
              return;
            }
            this.getBinding(this.bindCurrentInfo);
          })
          .catch((error) => {
            console.error(error);
          });
        this.bindTableDataLoading = true
        delProductTreeByProductId({ productId: row.id }).then((res) => {
          this.bindTableDataLoading = false
          this.getBinding(this.bindCurrentInfo);
        }).catch((error) => {
          this.bindTableDataLoading = false
          console.error(error);
        });
      });
    },
  },