liding
2026-09-21 94e0abbf193f9e1fc953716ca7868d74cd14a2cd
src/views/business/inspectionTask/index.vue
@@ -234,7 +234,6 @@
import UnPassRetestResult from "@/components/rawMaterialInspection/unPassRetestResult.vue"
import {
  claimInsOrderPlan,
  upPlanUser2,
  upPlanUser,
  selectUserCondition,
  getBindingProductByProductId,
@@ -244,6 +243,7 @@
  selectInsOrderPlanList,
  selectSampleAndProductByOrderId,
} from "@/api/business/inspectionTask.js";
import { treeDevice } from "@/api/cnas/resourceDemand/device.js";
import { mapGetters } from "vuex";
import {getRetestResult} from "@/api/business/rawMaterialOrder";
import {upReportUrl} from "@/api/business/insReport";
@@ -839,19 +839,29 @@
    },
    handleConnect(row) {
      this.orderId = row.id;
      this.connect = {};
      this.connect = {
        connectPerson: "",
        sonLaboratory: "",
      };
      this.sonLaboratoryList = [];
      this.connectVisible = true;
      upPlanUser2({ orderId: this.orderId }).then((res) => {
        if (res.code === 200 && res.data.length > 0) {
          this.sonLaboratoryList = [];
          res.data.forEach((m) => {
            this.sonLaboratoryList.push({
              value: m,
              label: m,
            });
          });
      treeDevice().then((res) => {
        if (res.code === 200) {
          const laboratoryNames = [
            ...new Set((res.data || []).map((item) => item && item.label).filter(Boolean)),
          ];
          this.sonLaboratoryList = laboratoryNames.map((laboratoryName) => ({
            value: laboratoryName,
            label: laboratoryName,
          }));
          if (this.sonLaboratoryList.length === 0) {
            this.$message.warning("暂无场所数据");
            return;
          }
          this.connect.sonLaboratory = this.sonLaboratoryList[0].value;
        }
      }).catch(() => {
        this.$message.error("场所数据加载失败");
      });
    },
    confirmConnect() {