From b34c4bfb96b9517ca489982e94abf66e3d7c4b66 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 17 三月 2025 11:14:32 +0800
Subject: [PATCH] 检验任务代码迁移

---
 src/views/business/inspectionTask/Inspection.vue | 1128 ++++++++++++++++++++++++----------------------------------
 1 files changed, 473 insertions(+), 655 deletions(-)

diff --git a/src/views/business/inspectionTask/Inspection.vue b/src/views/business/inspectionTask/Inspection.vue
index 18c7feb..5ded8be 100644
--- a/src/views/business/inspectionTask/Inspection.vue
+++ b/src/views/business/inspectionTask/Inspection.vue
@@ -665,7 +665,6 @@
             class="form-inline"
             label-width="50px"
             style="padding-top: 0; padding-left: 10px"
-            v-if="PROJECT == '妫�娴嬩腑蹇�'"
           >
             <el-form-item label="娓╁害:" style="margin-bottom: 0">
               <el-input
@@ -699,7 +698,6 @@
                   tableLists.find((m) => m.templateId == currentTable)
                     .templateName == '娓╁害寰幆妫�楠屽師濮嬭褰�' &&
                   temDataAcquisition)) &&
-              PROJECT == '妫�娴嬩腑蹇�' &&
               state == 1
             "
             @click="getDataAcquisitionDevice"
@@ -715,7 +713,6 @@
               (tableLists.find((m) => m.templateId == currentTable) &&
                 tableLists.find((m) => m.templateId == currentTable)
                   .templateName == '娓╁害寰幆妫�楠屽師濮嬭褰�' &&
-                PROJECT == '妫�娴嬩腑蹇�' &&
                 collected &&
                 state == 1)
             "
@@ -802,7 +799,9 @@
                       :disabled="
                         (getInspectionItemType(n.i) == 1 &&
                           !dataAcquisitionEidtAble) ||
-                        (n.u != userId && n.u != undefined && n.u != '')
+                        (n.u != loginUserInfo.userId &&
+                          n.u != undefined &&
+                          n.u != '')
                       "
                       @input="handleInput(n)"
                       @change="
@@ -835,7 +834,9 @@
                       v-model="n.v.v"
                       :disabled="
                         getInspectionItemType(n.i) == 1 ||
-                        (n.u != userId && n.u != undefined && n.u != '')
+                        (n.u != loginUserInfo.userId &&
+                          n.u != undefined &&
+                          n.u != '')
                       "
                       @change="
                         (m) =>
@@ -854,7 +855,9 @@
                       :disabled="
                         state > 1 ||
                         getInspectionItemType(n.i) == 1 ||
-                        (n.u != userId && n.u != undefined && n.u != '')
+                        (n.u != loginUserInfo.userId &&
+                          n.u != undefined &&
+                          n.u != '')
                       "
                       @visible-change="(e) => getDic(e, n.i)"
                       @change="
@@ -870,8 +873,8 @@
                       <el-option
                         v-for="(e, i) in enumList"
                         :key="i"
-                        :label="e.label"
-                        :value="e.value"
+                        :label="e.dictLabel"
+                        :value="e.dictValue"
                       ></el-option>
                     </el-select>
                     <span
@@ -883,27 +886,7 @@
                   <template
                     v-else-if="n.v.ps != undefined && n.v.ps.value === '缁撹'"
                   >
-                    <el-select
-                      v-if="
-                        (getInspectionValueType(n.i) == 2 ||
-                          getInspectionValueType(n.i) == 5) &&
-                        state == 1 &&
-                        PROJECT == '瑁呭鐢电紗'
-                      "
-                      class="table_input"
-                      v-model="n.v.v"
-                      @change="saveInsContext(n.i)"
-                    >
-                      <el-option label="鍚堟牸" :value="1"></el-option>
-                      <el-option label="涓嶅悎鏍�" :value="0"></el-option>
-                    </el-select>
-                    <template
-                      v-if="
-                        PROJECT == '妫�娴嬩腑蹇�' ||
-                        (PROJECT == '瑁呭鐢电紗' &&
-                          getInspectionValueType(n.i) != 2)
-                      "
-                    >
+                    <template>
                       <span
                         v-if="n.v.v === 1"
                         :style="`font-family:${n.v.ff} !important;color: green;`"
@@ -934,7 +917,11 @@
                     <el-select
                       v-model="n.v.v"
                       placeholder="璁惧"
-                      :disabled="n.u != userId && n.u != undefined && n.u != ''"
+                      :disabled="
+                        n.u != loginUserInfo.userId &&
+                        n.u != undefined &&
+                        n.u != ''
+                      "
                       class="table_input"
                       @visible-change="(e) => getEquipOptions(e, n.i)"
                       remote
@@ -986,13 +973,6 @@
                       state == 1
                     "
                   >
-                    <!-- <el-input class="table_input" type="textarea"
-                      :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
-                      v-model="n.v.v" @change="saveInsContext()" v-if="getInspectionValueType(n.i) == 2"></el-input>
-                    <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v"
-                      :disabled="state>1" @visible-change="e=>getDic(e,n.i)" @change="saveInsContext()">
-                      <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
-                    </el-select> -->
                     <span :style="`font-family:${n.v.ff} !important;`">{{
                       toFixed(n.v.v, n.v.ct)
                     }}</span>
@@ -2894,7 +2874,7 @@
           >闄勪欢涓婁紶</el-button
         >
       </el-upload>
-      <ValueTable
+      <!-- <ValueTable
         class="value-table"
         ref="fileList"
         :url="$api.insOrderPlan.getFileList"
@@ -2902,7 +2882,7 @@
         :delUrl="$api.insOrderPlan.delfile"
         :key="upIndex"
         style="height: 100%; margin-top: 16px"
-      />
+      /> -->
     </div>
     <el-drawer title="鍏夌氦鍒囨崲" :visible.sync="fiberOpticVisible" :size="500">
       <el-table
@@ -3115,11 +3095,11 @@
             <el-tag
               v-for="(item, i) in typeList"
               :key="i"
-              v-if="item.value == scope.row.insState"
-              :type="item.type"
+              v-if="item.dictValue == scope.row.insState"
+              :type="item.listClass"
               size="medium"
               style="margin-right: 5px"
-              >{{ item.label }}</el-tag
+              >{{ item.dictLabel }}</el-tag
             >
           </template>
         </el-table-column>
@@ -3165,14 +3145,14 @@
       </el-table>
     </el-drawer>
     <el-drawer title="浠诲姟鍒囨崲" :visible.sync="taskVisible" :size="500">
-      <ValueTable
+      <!-- <ValueTable
         class="value-table"
         ref="insOrderPlan"
         :url="$api.insOrderPlan.inspectionOrderDetailsTaskSwitching"
         :componentData="componentData"
         :key="upIndex"
         style="height: 100%"
-      />
+      /> -->
     </el-drawer>
     <el-dialog title="妫�楠屽鏍�" :visible.sync="reviewDia" width="500px">
       <div class="body" style="display: flex; padding: 10px" v-if="reviewDia">
@@ -3372,16 +3352,48 @@
 </template>
 
 <script>
+import {
+  doInsOrder,
+  upPlanUser2,
+  upPlanUser,
+  saveInsContext2,
+  getSagTemperatureProducts,
+  temCycle,
+  write,
+  getInsProduct,
+  getReportModel,
+  verifyPlan,
+  checkSubmitPlan,
+  getEquipName,
+  submitPlan,
+  saveInsContext,
+  downFile,
+} from "@/api/business/inspectionTask";
+import {
+  temDataAcquisition,
+  temDataAcquisition2,
+  determineWhetherToCollectData,
+  selectDeviceByCategory,
+} from "@/api/cnas/resourceDemand/device";
+import { getLaboratoryPersonList } from "@/api/system/user";
+import { getDicts } from "@/api/system/dict/data";
+import { selectDictDataByName } from "@/api/system/dict/type";
 import limsTable from "@/components/Table/lims-table.vue";
 import file from "@/utils/file";
 import excelFunction from "@/utils/excelFountion";
+import { mapGetters } from "vuex";
+import { getToken } from "@/utils/auth";
 export default {
-  props: ["sonLaboratory", "orderId", "state", "inspectorList", "handover"],
   components: {
     limsTable,
   },
   data() {
     return {
+      sonLaboratory: null,
+      orderId: null,
+      state: null,
+      inspectorList: [],
+      handover: [],
       equipName: [],
       insFibersId: null, //鍏夌氦甯d
       insOrderState: null,
@@ -3410,7 +3422,6 @@
       componentData: {
         entity: {
           sonLaboratory: null,
-          userId: 0,
         },
         isIndex: false,
         showSelect: false,
@@ -3498,7 +3509,6 @@
       comparisonList: [],
       excelMethodList: [],
       equipOptions: [],
-      userId: 0,
       reviewLoading: false,
       reviewDia: false,
       noReason: "",
@@ -3750,20 +3760,23 @@
   },
   // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
   computed: {
+    ...mapGetters(["loginUserInfo"]),
     headers() {
-      return {
-        token: sessionStorage.getItem("token"),
-      };
+      return { Authorization: "Bearer " + getToken() };
     },
     action() {
-      return this.javaApi + this.$api.insOrderPlan.uploadFile;
+      return this.javaApi + "/insOrderPlan/uploadFile";
     },
   },
   created() {
-    console.log("妫�楠屼汉鍛�---", this.inspectorList);
-    this.componentData.entity.sonLaboratory = this.sonLaboratory;
-    this.id = this.orderId;
-    this.getUserInfo();
+    console.log(this.$route.params);
+    this.sonLaboratory = this.$route.params.sonLaboratory;
+    this.orderId = this.$route.params.orderId;
+    this.state = this.$route.params.state;
+    this.inspectorList = this.$route.params.inspectorList;
+    this.handover = this.$route.params.handover;
+    // this.componentData.entity.sonLaboratory = this.sonLaboratory;
+    this.id = this.$route.params.orderId;
   },
   mounted() {
     this.getSonLaboratoryList();
@@ -3772,113 +3785,110 @@
     this.getComparisonList();
     this.getAuthorizedPerson();
     this.scrollInit();
-    this.getPower();
+    // this.getPower();
     this.startWorker();
   },
   watch: {
     // 鐩戝惉浠诲姟id锛岃幏鍙栦换鍔′俊鎭�
     id(val) {
       this.loading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.doInsOrder, {
-          id: val,
-          laboratory: this.sonLaboratory,
-        })
+      doInsOrder({
+        id: val,
+        laboratory: this.sonLaboratory,
+      })
         .then(async (res) => {
-          this.insOrder = res.data.insOrder;
-          this.insOrderState = res.data.insState;
-          this.componentData0.entity.insOrderId = val;
-          this.$refs.fileList.selectList();
-          this.urgentList.forEach((m) => {
-            if (m.value == this.insOrder.type) {
-              this.insOrder.typeName = m.label;
+          if (res.code === 200) {
+            this.insOrder = res.data.insOrder;
+            this.insOrderState = res.data.insState;
+            this.componentData0.entity.insOrderId = val;
+            // this.$refs.fileList.selectList();
+            this.urgentList.forEach((m) => {
+              if (m.dictValue == this.insOrder.type) {
+                this.insOrder.typeName = m.dictLabel;
+              }
+            });
+            this.loading = false;
+            if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
+              return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�");
             }
-          });
-          this.loading = false;
-          if (!res.data.sampleProduct || res.data.sampleProduct.length == 0) {
-            return this.$message.error("璇ヤ换鍔℃病鏈夋牱鍝佷俊鎭�");
-          }
-          // 璧嬪�煎綋鍓嶆牱鍝佸垪琛�
-          this.sampleProduct = res.data.sampleProduct;
-          this.fileterSampleProducts = JSON.parse(
-            JSON.stringify(res.data.sampleProduct)
-          );
-          this.currentSample = this.HaveJson(this.sampleProduct[0]);
-          let insProduct = this.HaveJson(this.currentSample.insProduct);
-          // 娓╁害銆佹箍搴﹁祴鍊�
-          if (insProduct && insProduct.length > 0) {
-            const filterList = insProduct.filter(
-              (ele) => ele.temperature || ele.humidity
+            // 璧嬪�煎綋鍓嶆牱鍝佸垪琛�
+            this.sampleProduct = res.data.sampleProduct;
+            this.fileterSampleProducts = JSON.parse(
+              JSON.stringify(res.data.sampleProduct)
             );
-            if (filterList && filterList.length > 0) {
-              let { temperature, humidity } = filterList[0];
-              this.otherForm = {
-                temperature: temperature ? temperature : null,
-                humidity: humidity ? humidity : null,
-              };
+            this.currentSample = this.HaveJson(this.sampleProduct[0]);
+            let insProduct = this.HaveJson(this.currentSample.insProduct);
+            // 娓╁害銆佹箍搴﹁祴鍊�
+            if (insProduct && insProduct.length > 0) {
+              const filterList = insProduct.filter(
+                (ele) => ele.temperature || ele.humidity
+              );
+              if (filterList && filterList.length > 0) {
+                let { temperature, humidity } = filterList[0];
+                this.otherForm = {
+                  temperature: temperature ? temperature : null,
+                  humidity: humidity ? humidity : null,
+                };
+              }
             }
-          }
-          // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
-          let list = await this.getCurrentProduct(this.currentSample.id, 0);
-          console.log(888, list);
-          if (list) {
-            this.currentSample.insProduct = this.HaveJson(list);
-          }
-          // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁�
-          this.param = {};
-          this.changeType = 0;
-          this.currentSample.insProduct.forEach((a, j) => {
-            this.param[a.id] = {
-              insValue: [],
-              comValue: [],
-              resValue: null,
-              equipValue: [],
-              equipName: [],
-              insResult: null,
-            };
-          });
-          this.determineWhetherToCollectData(); //鏄惁闇�瑕佹暟閲�
-          this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭�
-          if (this.currentSample.index == undefined)
-            this.currentSample["index"] = 1;
-          let bushing = this.currentSample.bushing;
-          this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅
+            // 鑾峰彇褰撳墠鏍峰搧鐨勬楠岄」
+            let list = await this.getCurrentProduct(this.currentSample.id, 0);
+            console.log(888, list);
+            if (list) {
+              this.currentSample.insProduct = this.HaveJson(list);
+            }
+            // 鍒濆鍖栦紶閫掑埌鍚庣鐨勫弬鏁�
+            this.param = {};
+            this.changeType = 0;
+            this.currentSample.insProduct.forEach((a, j) => {
+              this.param[a.id] = {
+                insValue: [],
+                comValue: [],
+                resValue: null,
+                equipValue: [],
+                equipName: [],
+                insResult: null,
+              };
+            });
+            this.determineWhetherToCollectData(); //鏄惁闇�瑕佹暟閲�
+            this.getReportModel(this.currentSample.id); //鑾峰彇濂楃銆佸厜绾ゅ甫銆佸厜绾や俊鎭�
+            if (this.currentSample.index == undefined)
+              this.currentSample["index"] = 1;
+            let bushing = this.currentSample.bushing;
+            this.getTableLists(); //澶勭悊妯℃澘鍒楄〃淇℃伅
 
-          this.componentData.currentId = val;
-          this.currentKey = 1;
-          // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁---涓嬮潰淇℃伅鏆傛椂鍙拷鐣�
-          this.fiberOpticTape = [];
-          this.currentFiberOpticTape = null;
-          this.fiberOptic = [];
-          this.currentFiberOptic = null;
-          this.bushing = [];
-          this.currentBushing = null;
-          this.currentTab = null;
-          if (bushing && bushing.length > 0) {
-            this.bushing = bushing;
+            this.componentData.currentId = val;
+            this.currentKey = 1;
+            // 娓呯┖鍏夌氦閰嶇疆鐩稿叧鏁版嵁---涓嬮潰淇℃伅鏆傛椂鍙拷鐣�
+            this.fiberOpticTape = [];
+            this.currentFiberOpticTape = null;
+            this.fiberOptic = [];
+            this.currentFiberOptic = null;
+            this.bushing = [];
+            this.currentBushing = null;
+            this.currentTab = null;
+            if (bushing && bushing.length > 0) {
+              this.bushing = bushing;
+            }
+            // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
+            this.worker.postMessage(
+              JSON.stringify({
+                modelType: this.sampleProduct[0].model,
+                type: "saveData",
+                tableList: this.tableList,
+                param: this.param,
+                currentTable: this.currentTable,
+              })
+            );
           }
-          // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
-          this.worker.postMessage(
-            JSON.stringify({
-              modelType: this.sampleProduct[0].model,
-              type: "saveData",
-              tableList: this.tableList,
-              param: this.param,
-              currentTable: this.currentTable,
-            })
-          );
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鐩戝惉褰撳墠妯℃澘鍙樺寲
     currentTable(val1, val0) {
       if (val0 != null && val1 != val0) {
-        // if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='鎴愬搧缂嗘楠屽師濮嬭褰�')){
-        //   if(this.casing.length>0){
-        //     this.handleChange(this.casing[0].id,3)
-        //   }
-        //   return
-        // }
-        //76:鐤插姵璇曢獙妫�楠屽師濮嬭褰曚笉鎵ц涓嬮潰鐨勬搷浣�
         if (this.changeType && this.changeType > 0) {
           // 濡傛灉鏄厜绾ゃ�佸厜绾ゅ甫锛屽垯涓嶆墽琛屼笅闈㈡搷浣�
           return;
@@ -3979,10 +3989,9 @@
       });
     },
     getSonLaboratoryList() {
-      this.$axios
-        .post(this.$api.insOrderPlan.upPlanUser2, {
-          orderId: this.orderId,
-        })
+      upPlanUser2({
+        orderId: this.orderId,
+      })
         .then((res) => {
           if (res.code === 200 && res.data.length > 0) {
             this.sonLaboratoryList = [];
@@ -3994,6 +4003,9 @@
             });
             this.connect.sonLaboratory = this.sonLaboratoryList[0].value;
           }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鍐呴儴浜ゆ帴
@@ -4015,19 +4027,20 @@
         return;
       }
       this.loading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.upPlanUser, {
-          orderId: this.orderId,
-          userId: this.connect.connectPerson,
-          sonLaboratory: this.connect.sonLaboratory,
-        })
+      upPlanUser({
+        orderId: this.orderId,
+        userId: this.connect.connectPerson,
+        sonLaboratory: this.connect.sonLaboratory,
+      })
         .then((res) => {
           if (res.code === 200) {
-            this.loading = false;
-            this.$message.success("鎿嶄綔鎴愬姛");
+            if (res.code === 200) {
+              this.loading = false;
+              this.$message.success("鎿嶄綔鎴愬姛");
+            }
+            this.connectVisible = false;
+            this.$emit("goback");
           }
-          this.connectVisible = false;
-          this.$emit("goback");
         })
         .catch((error) => {
           console.error(error);
@@ -4250,25 +4263,16 @@
       delete obj.model;
       delete obj.methodS;
       delete obj.sampleType;
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.saveInsContext2,
-          {
-            id: this.fatigueTestInfo.insProductResult
-              ? this.fatigueTestInfo.insProductResult.id
-              : "",
-            insProductId: this.fatigueTestInfo.id,
-            sampleId: this.currentSample.id,
-            orderId: this.currentSample.insOrderId,
-            insValue: JSON.stringify(obj),
-            templateName: "鐤插姵璇曢獙",
-          },
-          {
-            headers: {
-              "Content-Type": "application/json",
-            },
-          }
-        )
+      saveInsContext2({
+        id: this.fatigueTestInfo.insProductResult
+          ? this.fatigueTestInfo.insProductResult.id
+          : "",
+        insProductId: this.fatigueTestInfo.id,
+        sampleId: this.currentSample.id,
+        orderId: this.currentSample.insOrderId,
+        insValue: JSON.stringify(obj),
+        templateName: "鐤插姵璇曢獙",
+      })
         .then((res) => {
           if (res.code == 201) {
             this.$message.error("淇濆瓨澶辫触");
@@ -4276,8 +4280,8 @@
           }
           this.$message.success("淇濆瓨鎴愬姛");
         })
-        .catch((err) => {
-          console.log(err);
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鐤插姵璇曢獙鐗规��---缁撴潫
@@ -4358,26 +4362,17 @@
       let obj1 = {};
       obj1.arr2 = this.powerCharacteristicsInfo.arr2;
       obj1.arr3 = this.powerCharacteristicsInfo.arr3;
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.saveInsContext2,
-          {
-            id: this.powerCharacteristicsInfo.insProductResult
-              ? this.powerCharacteristicsInfo.insProductResult.id
-              : "",
-            insProductId: this.powerCharacteristicsInfo.id,
-            sampleId: this.currentSample.id,
-            orderId: this.currentSample.insOrderId,
-            insValue: JSON.stringify(obj0),
-            comValue: JSON.stringify(obj1),
-            templateName: "闃叉尟閿ゅ姛鐜囩壒鎬�",
-          },
-          {
-            headers: {
-              "Content-Type": "application/json",
-            },
-          }
-        )
+      saveInsContext2({
+        id: this.powerCharacteristicsInfo.insProductResult
+          ? this.powerCharacteristicsInfo.insProductResult.id
+          : "",
+        insProductId: this.powerCharacteristicsInfo.id,
+        sampleId: this.currentSample.id,
+        orderId: this.currentSample.insOrderId,
+        insValue: JSON.stringify(obj0),
+        comValue: JSON.stringify(obj1),
+        templateName: "闃叉尟閿ゅ姛鐜囩壒鎬�",
+      })
         .then((res) => {
           if (res.code == 201) {
             this.$message.error("淇濆瓨澶辫触");
@@ -4385,8 +4380,8 @@
           }
           this.$message.success("淇濆瓨鎴愬姛");
         })
-        .catch((err) => {
-          console.log(err);
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 闃叉尟閿ゅ姛鐜囩壒鎬�---缁撴潫
@@ -4447,25 +4442,16 @@
         }
       }
       obj.elasticityModulus = this.stressStrainInfo.elasticity;
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.saveInsContext2,
-          {
-            id: this.stressStrainInfo.insProductResult
-              ? this.stressStrainInfo.insProductResult.id
-              : "",
-            sampleId: this.currentSample.id,
-            orderId: this.currentSample.insOrderId,
-            insProductId: this.stressStrainInfo.id,
-            insValue: JSON.stringify(obj),
-            templateName: "鏋剁┖鍦扮嚎搴斿姏搴斿彉",
-          },
-          {
-            headers: {
-              "Content-Type": "application/json",
-            },
-          }
-        )
+      saveInsContext2({
+        id: this.stressStrainInfo.insProductResult
+          ? this.stressStrainInfo.insProductResult.id
+          : "",
+        sampleId: this.currentSample.id,
+        orderId: this.currentSample.insOrderId,
+        insProductId: this.stressStrainInfo.id,
+        insValue: JSON.stringify(obj),
+        templateName: "鏋剁┖鍦扮嚎搴斿姏搴斿彉",
+      })
         .then((res) => {
           if (res.code == 201) {
             this.$message.error("淇濆瓨澶辫触");
@@ -4473,8 +4459,8 @@
           }
           this.$message.success("淇濆瓨鎴愬姛");
         })
-        .catch((err) => {
-          console.log(err);
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鍒犻櫎璁板綍
@@ -4507,23 +4493,6 @@
           return;
         }
         this.stressStrainInfo.elasticity = e;
-        // else {
-        //   this.$axios
-        //     .post(
-        //       this.$api.insOrderPlan.write2 +
-        //         "?id=" +
-        //         this.stressStrainInfo.id +
-        //         "&elasticityModulus=" +
-        //         e
-        //     )
-        //     .then((res) => {
-        //       if (res.code == 201) {
-        //         this.$message.error("淇濆瓨澶辫触");
-        //         return;
-        //       }
-        //       this.$message.success("宸蹭繚瀛�");
-        //     });
-        // }
       }
     },
     // 鏋剁┖瀵煎湴绾垮簲鍔涘簲鍙�---缁撴潫
@@ -4564,10 +4533,9 @@
       )[0];
       // 鑾峰彇璁惧鍒楄〃
       this.getEquipOptions(true, obj.id);
-      this.$axios
-        .post(this.$api.insOrderPlan.getSagTemperatureProducts, {
-          sampleId: this.currentSample.id,
-        })
+      getSagTemperatureProducts({
+        sampleId: this.currentSample.id,
+      })
         .then((res) => {
           if (res.code == 201) return;
           let { productVos, sampleVo } = res.data;
@@ -4677,7 +4645,9 @@
             }
           });
         })
-        .catch((err) => {});
+        .catch((error) => {
+          console.error(error);
+        });
     },
     // 淇濆瓨鏁版嵁
     saveSageInfo(type, value) {
@@ -4765,23 +4735,13 @@
           temperature = temperature + "鈩�";
         }
         this.dataAcquisitionLoading = true;
-        this.$axios
-          .post(
-            this.$api.deviceScope.temDataAcquisition,
-            {
-              entrustCode: this.insOrder.entrustCode,
-              sampleCode: this.currentSample.sampleCode,
-              model: this.wareForm0.model,
-              cycles: this.wareForm.inspectionItem,
-              temperature: temperature,
-            },
-            {
-              headers: {
-                "Content-Type": "application/json",
-              },
-              noQs: true,
-            }
-          )
+        temDataAcquisition({
+          entrustCode: this.insOrder.entrustCode,
+          sampleCode: this.currentSample.sampleCode,
+          model: this.wareForm0.model,
+          cycles: this.wareForm.inspectionItem,
+          temperature: temperature,
+        })
           .then((res) => {
             this.dataAcquisitionLoading = false;
             if (res.code != 200) {
@@ -4789,19 +4749,27 @@
             }
             // 璧嬪�煎洖鏄綪K8000鐨勬暟鎹�
             this.wareFormChange();
+          })
+          .catch((error) => {
+            console.error(error);
           });
       } else {
         const _than = this;
         // 涓�鑸殑鏁版嵁閲囬泦
         _than.dataAcquisitionLoading = true;
-        let urlStr =
-          this.$api.deviceScope.dataCollection +
-          "?entrustCode=" +
-          this.insOrder.entrustCode +
-          "&sampleCode=" +
-          this.currentSample.sampleCode +
-          "&id=" +
-          this.currentSample.id;
+        // let urlStr =
+        //   this.$api.deviceScope.dataCollection +
+        //   "?entrustCode=" +
+        //   this.insOrder.entrustCode +
+        //   "&sampleCode=" +
+        //   this.currentSample.sampleCode +
+        //   "&id=" +
+        //   this.currentSample.id;
+        let data = {
+          entrustCode: this.insOrder.entrustCode,
+          sampleCode: this.currentSample.sampleCode,
+          id: this.currentSample.id,
+        };
         console.log(_than.fibers);
         if (_than.fibers && _than.fibers.length > 0) {
           //褰撳墠閫変腑鐨勫厜绾ゅ甫
@@ -4811,25 +4779,31 @@
           if (null == currentFibers || currentFibers.length == 0) {
             currentFibers = _than.fibers[0];
           }
-          urlStr +=
-            "&fiberOpticRibbon=" +
-            currentFibers.bushingColor +
-            "-" +
-            currentFibers.code;
+          // urlStr +=
+          //   "&fiberOpticRibbon=" +
+          //   currentFibers.bushingColor +
+          //   "-" +
+          //   currentFibers.code;
+          data.fiberOpticRibbon =
+            currentFibers.bushingColor + "-" + currentFibers.code;
         }
-        let replaceUrlStr = urlStr
-          .split("")
-          .map((s) => s.replace("#", "%23"))
-          .join("");
-        this.$axios.get(replaceUrlStr).then((res) => {
-          this.dataAcquisitionLoading = false;
-          if (res.code != 200) {
-            return;
-          }
-          this.dataAcquisitionInfoNew = this.HaveJson(res.data);
-          // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
-          this.handleDataAcquisition(res.data);
-        });
+        // let replaceUrlStr = urlStr
+        //   .split("")
+        //   .map((s) => s.replace("#", "%23"))
+        //   .join("");
+        dataCollection(data)
+          .then((res) => {
+            this.dataAcquisitionLoading = false;
+            if (res.code != 200) {
+              return;
+            }
+            this.dataAcquisitionInfoNew = this.HaveJson(res.data);
+            // 瀵规暟閲囧洖鏉ョ殑鍊艰繘琛屽鐞�
+            this.handleDataAcquisition(res.data);
+          })
+          .catch((error) => {
+            console.error(error);
+          });
       }
     },
     handleDataAcquisition(data) {
@@ -5185,7 +5159,6 @@
     // 褰撳惊鐜鏁般�佹俯搴︾偣鍙樺寲銆丳K8000鏁伴噰鏃朵細璋冪敤锛屼富瑕佹槸鑾峰彇淇℃伅杩涜鍥炴樉
     wareFormChange(m, type) {
       if (
-        this.PROJECT != "妫�娴嬩腑蹇�" ||
         !this.tableLists.find((m) => m.templateId == this.currentTable) ||
         this.tableLists.find((m) => m.templateId == this.currentTable)
           .templateName != "娓╁害寰幆妫�楠屽師濮嬭褰�"
@@ -5202,11 +5175,10 @@
         wareForm.inspectionItemSubclass = wareForm.inspectionItemSubclass + "鈩�";
       }
       this.wareTableDataLoading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.temCycle, {
-          sampleId: this.currentSample.id,
-          ...wareForm,
-        })
+      temCycle({
+        sampleId: this.currentSample.id,
+        ...wareForm,
+      })
         .then((res) => {
           this.wareTableDataLoading = false;
           if (res.code == 201) return;
@@ -5371,6 +5343,9 @@
           });
           // 杩欐槸椤甸潰鏈�缁堝憟鐜扮殑鏍煎紡
           this.wareTableData = arr2;
+        })
+        .catch((error) => {
+          console.error(error);
         });
       // 鑾峰彇璁惧鍒楄〃
       this.getEquipOptions(true, this.currentSample.insProduct[0].id);
@@ -5381,23 +5356,15 @@
     // 寰幆娆℃暟鍒囨崲鏃惰皟鐢�
     thermalCyclingChange() {
       this.thermalCyclingLoading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.temCycle, {
-          sampleId: this.currentSample.id,
-          inspectionItem: this.thermalCyclingInfo.inspectionItem,
-        })
+      temCycle({
+        sampleId: this.currentSample.id,
+        inspectionItem: this.thermalCyclingInfo.inspectionItem,
+      })
         .then((res) => {
           this.thermalCyclingLoading = false;
           if (res.code == 201) return;
           let { productVos, sampleVo } = res.data;
           this.thermalCyclingInfo = { ...this.thermalCyclingInfo, ...sampleVo };
-          // if(this.thermalCyclingInfo.inspectionItem>1){
-          //   for(let i in this.param){
-          //     if(this.param[i].inspectionItemSubclass){
-          //       delete this.param[i]
-          //     }
-          //   }
-          // }
           for (let i in this.param) {
             if (this.param[i].inspectionItemSubclass) {
               delete this.param[i];
@@ -5495,6 +5462,9 @@
           }
           // 鑾峰彇璁惧鍒楄〃
           this.getEquipOptions(true, this.currentSample.insProduct[0].id);
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 娣诲姞妫�楠屽��
@@ -5785,27 +5755,17 @@
     // 鍗曟牴鍨傜洿鐕冪儳---缁撴潫
     // 淇濆瓨婀垮害銆佹俯搴︽暟鎹�
     subOtherForm(m, type) {
-      // let ids = []
-      // for (let i in this.param) {
-      //   ids.push(i)
-      // }
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.write,
-          {
-            [type]: Number(m),
-            insOrderId: this.currentSample.insOrderId,
-          },
-          {
-            headers: {
-              "Content-Type": "application/json",
-            },
-            noQs: true,
-          }
-        )
+      write({
+        [type]: Number(m),
+        insOrderId: this.currentSample.insOrderId,
+      })
         .then((res) => {
-          if (res.code == 201) return;
-          this.$message.success("淇濆瓨鎴愬姛");
+          if (res.code === 200) {
+            this.$message.success("淇濆瓨鎴愬姛");
+          }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鏉冮檺鑾峰彇
@@ -5837,29 +5797,28 @@
       this.temDataAcquisition = temDataAcquisition;
     },
     uploadSample() {
-      this.$axios
-        .post(this.$api.insOrderPlan.doInsOrder, {
-          id: this.id,
-          laboratory: this.sonLaboratory,
+      doInsOrder({
+        id: this.id,
+        laboratory: this.sonLaboratory,
+      })
+        .then((res) => {
+          if (res.code === 200) {
+            this.sampleProduct = res.data.sampleProduct;
+          }
         })
-        .then(async (res) => {
-          this.sampleProduct = res.data.sampleProduct;
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鏍规嵁绫诲瀷銆佷换鍔d銆佸疄楠屽鏉ヨ幏鍙栨牱鍝佺殑妫�楠岄」淇℃伅
     async getCurrentProduct(id, type) {
       this.tableLoading = true;
-      let res = await this.$axios.post(
-        this.$api.insOrderPlan.getInsProduct +
-          "?id=" +
-          id +
-          "&type=" +
-          type +
-          "&laboratory=" +
-          this.sonLaboratory
-      );
+      let res = await getInsProduct({
+        id: id,
+        type: type,
+        laboratory: this.sonLaboratory,
+      });
       this.tableLoading = false;
-      console.log("getCurrentProduct-->", res.data);
       return res.data;
     },
     handleChangeBushing(row, column, event) {
@@ -5989,24 +5948,21 @@
     },
     // 鑾峰彇濂楃,鍏夌氦甯�,鍏夌氦鏁版嵁
     getReportModel(id) {
-      if (this.PROJECT != "妫�娴嬩腑蹇�") {
-        return;
-      }
       this.getReportModelLoading = true;
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.getReportModel +
-            "?sampleId=" +
-            id +
-            "&sonLaboratory=" +
-            this.sonLaboratory,
-          {}
-        )
+      getReportModel({
+        sampleId: id,
+        sonLaboratory: this.sonLaboratory,
+      })
         .then((res) => {
-          this.getReportModelLoading = false;
-          this.fibers = res.data["鍏夌氦甯�"];
-          this.fiber = res.data["鍏夌氦"];
-          this.casing = res.data["濂楃"];
+          if (res.code === 200) {
+            this.getReportModelLoading = false;
+            this.fibers = res.data["鍏夌氦甯�"];
+            this.fiber = res.data["鍏夌氦"];
+            this.casing = res.data["濂楃"];
+          }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 濂楃,鍏夌氦甯�,鍏夌氦绛夊垏鎹�,瀵瑰簲鍘熷璁板綍妯℃澘涔熻鍒囨崲
@@ -6063,63 +6019,52 @@
     },
     // 瀛楀吀鑾峰彇淇℃伅
     getTypeDicts() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "绱ф�ョ▼搴�",
-        })
+      getDicts("urgency_level")
         .then((res) => {
-          let data = res.data;
-          data.forEach((ele) => {
-            if (ele.value === "0") {
-              ele.type = "success";
-            } else if (ele.value === "1") {
-              ele.type = "warning";
-            } else if (ele.value === "2") {
-              ele.type = "danger";
-            }
-          });
-          this.urgentList = data;
-          this.componentData.tagField.type.select = data;
-        });
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "杞借嵎",
+          if (res.code === 200) {
+            this.urgentList = res.data;
+          }
         })
-        .then((res) => {
-          this.loadList = res.data;
+        .catch((error) => {
+          console.error(error);
         });
+      // getDicts("").then(res=>{
+      //   if(res.status===200){
+      //     console.log(res)
+      //   }
+      // }).catch(error=>{
+      //   console.error(error)
+      // })
+      // this.$axios
+      //   .post(this.$api.enums.selectEnumByCategory, {
+      //     category: "杞借嵎",
+      //   })
+      //   .then((res) => {
+      //     this.loadList = res.data;
+      //   });
     },
     // 瀛楀吀鑾峰彇淇℃伅
     getInsStateDicts() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "妫�楠屼换鍔$姸鎬�",
-        })
+      getDicts("inspection_task_state")
         .then((res) => {
-          let data = res.data;
-          data.forEach((ele) => {
-            //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃
-            if (["2", "5"].includes(ele.value)) {
-              ele.type = "success";
-            } else if (["1", "3"].includes(ele.value)) {
-              ele.type = "warning";
-            } else if (["0", "4"].includes(ele.value)) {
-              ele.type = "danger";
-            }
-          });
-          this.typeList = data;
-          this.componentData.tagField.insState.select = data;
+          if (res.code === 200) {
+            this.typeList = res.data;
+          }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 瀛楀吀鑾峰彇淇℃伅
     getComparisonList() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "琛ㄦ牸鍧愭爣杞崲",
-        })
+      getDicts("coordinate_transformation")
         .then((res) => {
-          let data = res.data;
-          this.comparisonList = data;
+          if (res.code === 200) {
+            this.comparisonList = res.data;
+          }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     // 鑾峰彇妫�楠屽�间负涓嬫媺鏃剁殑涓嬫媺鍒楄〃
@@ -6128,12 +6073,14 @@
       if (val === undefined || val === null) {
         return;
       }
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: val,
-        })
+      selectDictDataByName(val)
         .then((res) => {
-          this.enumList = res.data;
+          if (res.code === 200) {
+            this.enumList = res.data;
+          }
+        })
+        .catch((error) => {
+          console.error(error);
         });
     },
     tableRowClassName({ row, rowIndex }) {
@@ -6247,23 +6194,18 @@
         });
         // 鍒濆鍖栭〉闈㈡暟鎹�
         this.wareTableDataLoading = true;
-        this.$axios
-          .post(
-            this.$api.deviceScope.temDataAcquisition2,
-            {
-              entrustCode: this.insOrder.entrustCode,
-              sampleCode: this.currentSample.sampleCode,
-              model: this.currentSample.model,
-            },
-            {
-              headers: {
-                "Content-Type": "application/json",
-              },
-              noQs: true,
-            }
-          )
+        temDataAcquisition2({
+          entrustCode: this.insOrder.entrustCode,
+          sampleCode: this.currentSample.sampleCode,
+          model: this.currentSample.model,
+        })
           .then((res) => {
-            this.wareFormChange();
+            if (res.code === 200) {
+              this.wareFormChange();
+            }
+          })
+          .catch((error) => {
+            console.error(error);
           });
       }
       // 娓╁害寰幆妫�楠屽師濮嬭褰�---缁撴潫
@@ -6635,8 +6577,9 @@
               conclusionList.forEach((n, i) => {
                 if (n.r == b.r && n.c == b.c) {
                   b.v.f = `(${
-                    this.comparisonList.find((j) => j.value == finalList[i].c)
-                      .label
+                    this.comparisonList.find(
+                      (j) => j.dictValue == finalList[i].c
+                    ).dictLabel
                   }${finalList[i].r + 1})`;
                 }
               });
@@ -6649,7 +6592,7 @@
           }
         });
         // 浠ヤ笅鏄牱寮忓鐞嗛�昏緫
-        set = Array.sort(set);
+        set = Array.from(set).sort((a, b) => a - b);
         set.forEach((b) => {
           let arr = [];
           a.template.forEach((c) => {
@@ -6886,7 +6829,6 @@
     },
     // 妫�楠屽�艰緭鍏ュ悗瑙﹀彂鐨勫嚱鏁�
     changeInput(m, code, n, getDataType) {
-      console.log("---->999");
       // 涓烘暟閲囧畾涔変竴涓�昏緫鍙傛暟
       if (getDataType == "getDataType") {
         this.getDataType = 2;
@@ -6895,17 +6837,15 @@
       if (n) {
         currentInsItemId = JSON.parse(JSON.stringify(n.i));
         // 闇�瑕佺瀛﹁鏁版硶鐨勫彲浠ヨ蛋杩欓噷
-        if (this.PROJECT === "妫�娴嬩腑蹇�") {
-          if (
-            this.currentSample.insProduct.find(
-              (ele) =>
-                ele.id == currentInsItemId && ele.inspectionItem == "浣撶Н鐢甸樆鐜�"
-            )
-          ) {
-            if (parseFloat(n.v.v) >= 100000) {
-              let num2 = new this.$Big(n.v.v);
-              n.v.v = num2.toExponential();
-            }
+        if (
+          this.currentSample.insProduct.find(
+            (ele) =>
+              ele.id == currentInsItemId && ele.inspectionItem == "浣撶Н鐢甸樆鐜�"
+          )
+        ) {
+          if (parseFloat(n.v.v) >= 100000) {
+            let num2 = new this.$Big(n.v.v);
+            n.v.v = num2.toExponential();
           }
         }
         // 瀹氫箟涓�涓嚱鏁版潵楠岃瘉鍒嗘暟鏄惁鏈夋晥
@@ -6927,7 +6867,6 @@
             excelMethodList: this.excelMethodList,
             comparisonList: this.comparisonList,
             currentSample: this.currentSample,
-            PROJECT: this.PROJECT,
             param: this.param,
             currentTable: this.currentTable,
             getDataTypeId: this.getDataTypeId,
@@ -6945,7 +6884,6 @@
         switch (this.result.method) {
           case "saveInsContext":
             this.$nextTick(() => {
-              // this.$delete(this.tableList[0],'arr')
               this.$set(
                 this.tableList[0],
                 "arr",
@@ -6970,34 +6908,6 @@
                 }
               }
               this.saveInsContext(currentInsItemId);
-              // 濡傛灉鏄暟閲囧彲缂栬緫杈撳叆鐨勬儏鍐�,鍙互鐩存帴淇濆瓨鏁版嵁
-              // if(this.getDataType==2){
-              //   console.log("aaaaaa--->>>",currentInsItemId);
-              //   this.saveInsContext()
-              // }else{
-              //   if(this.isGet&&!this.dataAcquisitionEidtAble){
-              //     // if(this.result.value.getDataTypeId==''){
-              //     //   // 濡傛灉鏄暟閲囦笉鍙紪杈戣緭鍏ョ殑鎯呭喌,涓旀渶鍚庝竴涓暟閲囨病鏈夊畬鎴�,鍒欎笉淇濆瓨鏁版嵁
-              //     //   return
-              //     // }
-              //     // 淇濆瓨鏁版嵁
-              //     this.saveInsContext()
-              //     // setTimeout(()=>{
-              //     // },2000)
-              //   }else if(this.isGet&&this.dataAcquisitionEidtAble){
-              //     if(this.getDataType==1){
-              //       // if(this.result.value.getDataTypeId==''){
-              //       //   // 濡傛灉鏄暟閲囧彲缂栬緫杈撳叆鐨勬儏鍐�,涓旀渶鍚庝竴涓暟閲囨病鏈夊畬鎴�,鍒欎笉淇濆瓨鏁版嵁
-              //       //   return
-              //       // }
-              //       this.saveInsContext()
-              //     }else{
-              //       this.saveInsContext()
-              //     }
-              //   }else{
-              //     this.saveInsContext()
-              //   }
-              // }
             });
             break;
           case "tableList":
@@ -7016,10 +6926,9 @@
     },
     // 鏄惁闇�瑕佹暟閲�
     async determineWhetherToCollectData() {
-      let res = await this.$axios.get(
-        this.$api.deviceScope.determineWhetherToCollectData +
-          "?managementNumber=''"
-      );
+      let res = await determineWhetherToCollectData({
+        managementNumber: "",
+      });
       this.isGet = res.data;
       if (
         this.currentSample.insProduct.filter(
@@ -7261,13 +7170,11 @@
       if (e) {
         this.equipOptions = [];
         let product = this.currentSample.insProduct.find((m) => m.id == id);
-        console.log(product);
-        this.$axios
-          .post(this.$api.deviceScope.selectDeviceByCategory, {
-            inspectionItem: product.inspectionItem,
-            inspectionItemSubclass: product.inspectionItemSubclass,
-            sonLaboratory: product.sonLaboratory,
-          })
+        selectDeviceByCategory({
+          inspectionItem: product.inspectionItem,
+          inspectionItemSubclass: product.inspectionItemSubclass,
+          sonLaboratory: product.sonLaboratory,
+        })
           .then((res) => {
             if (res.code === 200 && res.data) {
               this.equipOptions = res.data.map((m) => {
@@ -7293,25 +7200,17 @@
         }
       }
     },
-    getUserInfo() {
-      this.$axios.get(this.$api.user.getUserInfo).then((res) => {
-        this.userId = res.data.id;
-        this.componentData.entity.userId = res.data.id;
-        // console.log(1111,this.userId)
-      });
-    },
     // 澶嶆牳
     upInsReview(e) {
       if (e == 1) {
         // 閫氳繃
         this.reviewLoading = true;
-        this.$axios
-          .post(this.$api.insOrderPlan.verifyPlan, {
-            orderId: this.orderId,
-            type: 1,
-            laboratory: this.sonLaboratory,
-            tell: null,
-          })
+        verifyPlan({
+          orderId: this.orderId,
+          type: 1,
+          laboratory: this.sonLaboratory,
+          tell: null,
+        })
           .then((res) => {
             if (res.code === 200) {
               this.$message.success("鎿嶄綔鎴愬姛");
@@ -7331,13 +7230,12 @@
     handleReviewDia() {
       if (this.noReason) {
         this.reviewLoading = true;
-        this.$axios
-          .post(this.$api.insOrderPlan.verifyPlan, {
-            orderId: this.orderId,
-            type: 0,
-            laboratory: this.sonLaboratory,
-            tell: this.noReason,
-          })
+        verifyPlan({
+          orderId: this.orderId,
+          type: 0,
+          laboratory: this.sonLaboratory,
+          tell: this.noReason,
+        })
           .then((res) => {
             if (res.code === 200) {
               this.$message.success("鎿嶄綔鎴愬姛");
@@ -7368,26 +7266,20 @@
       }
       this.addVerifyDia = false;
       this.submitLoading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.checkSubmitPlan, {
-          orderId: this.orderId,
-          laboratory: this.sonLaboratory,
-          humidity: this.otherForm.humidity,
-          temperature: this.otherForm.temperature,
-        })
+      checkSubmitPlan({
+        orderId: this.orderId,
+        laboratory: this.sonLaboratory,
+        humidity: this.otherForm.humidity,
+        temperature: this.otherForm.temperature,
+      })
         .then((res) => {
           if (res.code === 200) {
             if (!res.data || res.data.length == 0) {
-              this.$axios
-                .get(
-                  this.$api.insOrderPlan.getEquipName +
-                    "?orderId=" +
-                    this.orderId +
-                    "&sonLaboratory=" +
-                    this.sonLaboratory
-                )
+              getEquipName({
+                orderId: this.orderId,
+                sonLaboratory: this.sonLaboratory,
+              })
                 .then((response) => {
-                  console.log(typeof response.data, response.data.length);
                   if (response.data.length > 0) {
                     let newData = [];
                     const h = this.$createElement;
@@ -7418,67 +7310,54 @@
                       type: "",
                     })
                       .then(() => {
-                        this.$axios
-                          .post(this.$api.insOrderPlan.submitPlan, {
-                            orderId: this.orderId,
-                            laboratory: this.sonLaboratory,
-                            verifyUser: this.verifyUser,
-                            entrustCode: this.insOrder.entrustCode,
-                          })
+                        submitPlan({
+                          orderId: this.orderId,
+                          laboratory: this.sonLaboratory,
+                          verifyUser: this.verifyUser,
+                          entrustCode: this.insOrder.entrustCode,
+                        })
                           .then((res) => {
                             if (res.code === 200) {
                               this.$message.success("鎿嶄綔鎴愬姛");
                               this.$emit("goback");
                             }
                             this.submitLoading = false;
+                          })
+                          .catch((error) => {
+                            console.error(error);
                           });
                       })
                       .catch(() => {
                         this.submitLoading = false;
                       });
                   } else {
-                    this.$axios
-                      .post(this.$api.insOrderPlan.submitPlan, {
-                        orderId: this.orderId,
-                        laboratory: this.sonLaboratory,
-                        verifyUser: this.verifyUser,
-                        entrustCode: this.insOrder.entrustCode,
-                      })
+                    submitPlan({
+                      orderId: this.orderId,
+                      laboratory: this.sonLaboratory,
+                      verifyUser: this.verifyUser,
+                      entrustCode: this.insOrder.entrustCode,
+                    })
                       .then((res) => {
                         if (res.code === 200) {
                           this.$message.success("鎿嶄綔鎴愬姛");
                           this.$emit("goback");
                         }
                         this.submitLoading = false;
+                      })
+                      .catch((error) => {
+                        console.error(error);
                       });
                   }
+                })
+                .catch((error) => {
+                  console.error(error);
                 });
-
-              // this.$axios
-              //   .post(this.$api.insOrderPlan.submitPlan, {
-              //     orderId: this.orderId,
-              //     laboratory: this.sonLaboratory,
-              //     verifyUser: this.verifyUser,
-              //     entrustCode: this.insOrder.entrustCode,
-              //   })
-              //   .then((res) => {
-              //     if (res.code === 200) {
-              //       this.$message.success("鎿嶄綔鎴愬姛");
-              //       this.$emit("goback");
-              //     }
-              //     this.submitLoading = false;
-              //   })
             } else {
-              this.$axios
-                .get(
-                  this.$api.insOrderPlan.getEquipName +
-                    "?orderId=" +
-                    this.orderId +
-                    "&sonLaboratory=" +
-                    this.sonLaboratory
-                )
+              getEquipName({
+                orderId: this.orderId,
+                sonLaboratory: this.sonLaboratory,
+              })
                 .then((response) => {
-                  console.log(typeof response.data, response.data.length);
                   if (response.data.length > 0) {
                     let newData = [];
                     const h = this.$createElement;
@@ -7550,12 +7429,11 @@
                           type: "",
                         })
                           .then(() => {
-                            this.$axios
-                              .post(this.$api.insOrderPlan.submitPlan, {
-                                orderId: this.orderId,
-                                laboratory: this.sonLaboratory,
-                                verifyUser: this.verifyUser,
-                              })
+                            submitPlan({
+                              orderId: this.orderId,
+                              laboratory: this.sonLaboratory,
+                              verifyUser: this.verifyUser,
+                            })
                               .then((res) => {
                                 if (res.code === 200) {
                                   this.$message.success("鎿嶄綔鎴愬姛");
@@ -7613,12 +7491,11 @@
                       type: "",
                     })
                       .then(() => {
-                        this.$axios
-                          .post(this.$api.insOrderPlan.submitPlan, {
-                            orderId: this.orderId,
-                            laboratory: this.sonLaboratory,
-                            verifyUser: this.verifyUser,
-                          })
+                        submitPlan({
+                          orderId: this.orderId,
+                          laboratory: this.sonLaboratory,
+                          verifyUser: this.verifyUser,
+                        })
                           .then((res) => {
                             if (res.code === 200) {
                               this.$message.success("鎿嶄綔鎴愬姛");
@@ -7632,66 +7509,10 @@
                       .catch(() => {});
                     this.submitLoading = false;
                   }
+                })
+                .catch((error) => {
+                  console.error(error);
                 });
-
-              //   let newData = [];
-              //   const h = this.$createElement;
-              //   // 鍘婚噸涓嶅悎鏍煎鐞�
-              //   let set = new Set();
-              //   res.data.forEach((item) => {
-              //     if (!set.has(item)) {
-              //       set.add(item);
-              //     }
-              //   });
-              //   res.data = Array.from(set);
-              //   for (let i in res.data) {
-              //     const lastChar = res.data[i].slice(-1);
-              //     if (lastChar == "-") {
-              //       res.data[i] = res.data[i].slice(0, -1);
-              //     }
-              //     newData.push(
-              //       h(
-              //         "p",
-              //         { style: "font-size: 14px;color: red;" },
-              //         Number(i) + 1 + "銆�" + res.data[i]
-              //       )
-              //     );
-              //   }
-              //   newData.push(
-              //     h(
-              //       "p",
-              //       {
-              //         style:
-              //           "font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh",
-              //       },
-              //       "浠ヤ笂椤圭洰涓嶅悎鏍硷紝纭畾鎻愪氦锛�"
-              //     )
-              //   );
-              //   this.$confirm("鎻愮ず", {
-              //     title: "鎻愮ず",
-              //     message: h("div", null, newData),
-              //     confirmButtonText: "纭畾",
-              //     cancelButtonText: "鍙栨秷",
-              //     type: "",
-              //   })
-              //     .then(() => {
-              //       this.$axios
-              //         .post(this.$api.insOrderPlan.submitPlan, {
-              //           orderId: this.orderId,
-              //           laboratory: this.sonLaboratory,
-              //           verifyUser: this.verifyUser,
-              //         })
-              //         .then((res) => {
-              //           if (res.code === 200) {
-              //             this.$message.success("鎿嶄綔鎴愬姛");
-              //             this.$emit("goback");
-              //           }
-              //         })
-              //         .catch((error) => {
-              //           console.error(error);
-              //         });
-              //     })
-              //     .catch(() => {});
             }
           }
           this.submitLoading = false;
@@ -7704,7 +7525,6 @@
     },
     // 缁熶竴鍦ㄨ繖閲屼繚瀛樻暟鎹�
     saveInsContext(currentInsItemId, isDelete = false) {
-      // console.log("saveInsContext-->",this.param);
       try {
         if (this.param) {
           let param = null;
@@ -7713,22 +7533,23 @@
           } else {
             param = this.param;
           }
-          console.log("param-->", param);
-          this.$axios
-            .post(this.$api.insOrderPlan.saveInsContext, {
-              param: JSON.stringify(param),
-              currentTable: this.currentTable,
-              sampleId: this.currentSample.id,
-              orderId: this.orderId,
-              sonLaboratory: this.sonLaboratory,
-              isDelete: isDelete,
-            })
+          saveInsContext({
+            param: param,
+            currentTable: this.currentTable,
+            sampleId: this.currentSample.id,
+            orderId: this.orderId,
+            sonLaboratory: this.sonLaboratory,
+            isDelete: isDelete,
+          })
             .then((res) => {
               if (res.code == 201) {
                 this.$message.error("淇濆瓨澶辫触");
                 return;
               }
               this.$message.success("宸蹭繚瀛�");
+            })
+            .catch((error) => {
+              console.error(error);
             });
           // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
           this.worker.postMessage(
@@ -7846,19 +7667,15 @@
       //this.saveInsContext(ids[i]);
     },
     getAuthorizedPerson() {
-      this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => {
-        // let data = []
-        // // let userName = JSON.parse(localStorage.getItem("user")).name;
-        // res.data.forEach(a => {
-        //   if(!this.inspectorList.includes(a.name)) {
-        //     data.push({
-        //     label: a.name,
-        //     value: a.id
-        //   })
-        //   }
-        // })
-        this.personList = res.data;
-      });
+      getLaboratoryPersonList()
+        .then((res) => {
+          if (res.code === 200) {
+            this.personList = res.data;
+          }
+        })
+        .catch((error) => {
+          console.error(error);
+        });
     },
     scrollInit() {
       // 鑾峰彇瑕佺粦瀹氫簨浠剁殑鍏冪礌
@@ -8040,10 +7857,9 @@
       this.$refs.upload.clearFiles();
     },
     handleDown(row) {
-      this.$axios
-        .post(this.$api.insOrderPlan.downFile, {
-          id: row.id,
-        })
+      downFile({
+        id: row.id,
+      })
         .then((res) => {
           if (res.code === 200) {
             let url = "";
@@ -8059,7 +7875,9 @@
             }
           }
         })
-        .catch((error) => {});
+        .catch((error) => {
+          console.error(error);
+        });
     },
     /**
      * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆�

--
Gitblit v1.9.3