| | |
| | | import UnPassRetestResult from "@/components/rawMaterialInspection/unPassRetestResult.vue" |
| | | import { |
| | | claimInsOrderPlan, |
| | | upPlanUser2, |
| | | upPlanUser, |
| | | selectUserCondition, |
| | | getBindingProductByProductId, |
| | |
| | | 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"; |
| | |
| | | }, |
| | | 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() { |