zhuo
2025-02-24 7ca9602dd6b7e5b3910c000632ce90edc4c5beea
删除标准库无用接口
已修改2个文件
126 ■■■■■ 文件已修改
src/api/standard/standardLibrary.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/standardLibrary/index.vue 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/standardLibrary.js
@@ -56,15 +56,6 @@
  });
}
// 给标准树添加检验标准
export function addStandardMethodList(data) {
  return request({
    url: "/standardTree/addStandardMethodList",
    method: "post",
    data: data,
  });
}
// 添加标准树
export function addStandardTree(data) {
  return request({
@@ -101,32 +92,6 @@
  });
}
// 删除标准树下的检验标准
export function delStandardMethodByFLSSM(data) {
  return request({
    url: "/standardTree/delStandardMethodByFLSSM",
    method: "post",
    data: data,
  });
}
// 删除标准树下的检验标准
export function delStandardProductByIds(data) {
  return request({
    url: "/standardTree/delStandardProductByIds",
    method: "post",
    data: data,
  });
}
// 新增标准树下的检验项目
export function addStandardProduct(data) {
  return request({
    url: "/standardTree/addStandardProduct",
    method: "post",
    data: data,
  });
}
// 通过检验标准查询检验项目
export function selectStandardProductListByMethodId(query) {
src/views/standard/standardLibrary/index.vue
@@ -488,14 +488,10 @@
  obtainItemParameterList,
  selectTestObjectByName,
  selectStandardMethods,
  addStandardMethodList,
  addStandardTree,
  updateStandardTree,
  selectsStandardMethodByFLSSM,
  upStandardProductList,
  delStandardMethodByFLSSM,
  delStandardProductByIds,
  addStandardProduct,
  selectStandardProductListByMethodId,
  updateSection,
  upStandardProducts,
@@ -592,6 +588,7 @@
    this.selectTestObjectByName();
    this.selectStandardMethods();
    this.selectEnumByCategoryForSonLaboratory();
    this.selectEnumByCategoryForsampleType();
    this.getStandardTemplate();
    this.selectStandardMethodsSec();
    this.token = {
@@ -845,22 +842,6 @@
        this.standardEnum = data;
      });
    },
    addStandardMethodList() {
      if (this.standardId == null || this.standardId == "") {
        this.$message.error("标准方法未选择");
        return;
      }
      this.addLoad2 = true;
      addStandardMethodList({
        standardId: this.standardId,
        tree: this.selectTree,
      }).then((res) => {
        this.addLoad2 = false;
        this.addStandardDia = false;
        this.$message.success("添加成功");
        this.selectsStandardMethodByFLSSM();
      });
    },
    // 提交分类添加
    addStandardTree() {
      if (this.addOb.sampleType == null || this.addOb.sampleType == "") {
@@ -1040,81 +1021,13 @@
        this.$message.success("已保存");
      });
    },
    delStandardMethodByFLSSM(id) {
      this.$confirm("是否删除当前数据?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.tableLoad = true;
          delStandardMethodByFLSSM({ id: id }).then((res) => {
            if (res.code == 201) {
              return;
            }
            this.$message.success("已删除");
            this.selectsStandardMethodByFLSSM();
          });
        })
        .catch(() => { });
    },
    handleSelectionChange(val) {
      this.selects = [];
      val.forEach((a) => {
        this.selects.push(a.id);
      });
    },
    delStandardProductByIds() {
      if (this.selects.length == 0) {
        this.$message.error("未选中数据");
        return;
      }
      this.$confirm(
        "是否删除当前选中 " + this.selects.length + " 条数据?",
        "警告",
        {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        }
      )
        .then(() => {
          this.tableLoad = true;
          delStandardProductByIds({
            ids: JSON.stringify(this.selects),
          }).then((res) => {
            if (res.code == 201) {
              return;
            }
            this.$message.success("已删除");
            this.selectsStandardMethodByFLSSM();
          });
        })
        .catch(() => { });
    },
    addStandardProductDo() {
      let selects = this.$refs.ValueTable.multipleSelection;
      if (selects.length == 0) {
        this.$message.error("未选择数据");
        return;
      }
      let select = [];
      selects.forEach((a) => {
        select.push(a.id);
      });
      this.tableLoad = true;
      addStandardProduct({
        ids: JSON.stringify(select),
        tree: this.selectTree,
      }).then((res) => {
        if (res.code == 201) {
          return;
        }
        this.$message.success("添加成功");
        this.selectsStandardMethodByFLSSM();
      });
      this.addProductDia = false;
    },
    refreshList() {
      this.batchCopyDia = false;
      const index = this.standardList.findIndex(