zouyu
2026-05-25 edc6b742457bcdfcfbd49ff41a625f956a733459
src/views/business/inspectionTask/inspection.vue
@@ -78,7 +78,6 @@
          "
          >样品切换</el-button
        >
        <!--        <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">任务切换</el-button>-->
        <el-button
          v-if="state == 1"
          size="small"
@@ -777,7 +776,7 @@
        :column="column"
        :page="page"
        :tableLoading="tableLoading"
        :height="'calc(100vh - 290px)'"
        :height="700"
        @pagination="pagination"
        style="height: 100%; margin-top: 16px"
      ></lims-table>
@@ -871,16 +870,6 @@
          show-overflow-tooltip
        ></el-table-column>
      </el-table>
    </el-drawer>
    <el-drawer :size="500" :visible.sync="taskVisible" title="任务切换">
      <lims-table
        :tableData="tableData0"
        :column="column0"
        :page="page0"
        :tableLoading="tableLoading0"
        :height="'calc(100vh - 90px)'"
        :currentChange="handleChangeTask"
      ></lims-table>
    </el-drawer>
    <el-dialog
      title="哑铃片设备试样类型"
@@ -1188,11 +1177,6 @@
      :purchaseDialog="purchaseDialog"
      @resetPurchaseDialog="resetPurchaseDialog"
    ></purchase-verification>
    <!--查看工时弹框-->
    <viewManHourDia
      ref="viewManHourDia"
      @submit="openAddVerifyDia"
    ></viewManHourDia>
    <!--    IFS物料属性编辑弹框-->
    <el-dialog
      title="更新IFS库存物料批次属性"
@@ -1308,7 +1292,6 @@
import DataWorker from "@/workers/DataWorker.worker.js";
import html2canvas from "html2canvas";
import { mapGetters } from "vuex";
import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue";
import {
  getOneByIfsId,
  saveOrUpdateProps,
@@ -1317,7 +1300,6 @@
export default {
  name: "Inspection",
  components: {
    viewManHourDia,
    PurchaseVerification,
    AddUnPass,
    limsTable,
@@ -1364,7 +1346,6 @@
      dataGetDia: false,
      fileAdd: false,
      sampleVisible: false,
      taskVisible: false,
      submitLoading: false,
      searchForm: {
        sampleName: null,
@@ -2591,11 +2572,6 @@
        }
      }
    },
    // 改变任务
    handleChangeTask(row) {
      if (row) this.id = row.id;
      this.taskVisible = false;
    },
    // 字典获取信息
    getTypeDicts() {
      this.getDicts("urgency_level").then((response) => {
@@ -2811,7 +2787,7 @@
                }
              }
            });
            if (str != "") {
            if (str !== "") {
              let count2 = 0;
              for (let i in this.currentSample.insProduct) {
                let inspectionItemClass =
@@ -3103,24 +3079,27 @@
              this.param[a.id].insValue.find(
                (m) => m.c == insValue[i].c && m.r == insValue[i].r
              ).u = insValue[i].u;
              // this.param[a.id].insValue[i].v.v = insValue[i].v
              // this.param[a.id].insValue[i].u = insValue[i].u
            }
          }
        } catch (e) {}
        try {
          // 设备编号赋值
          let equipValue = JSON.parse(a.insProductResult.equipValue);
          for (let i = 0; i < equipValue.length; i++) {
            // 普通设备赋值
            this.param[a.id].equipValue[i].v.v = equipValue[i].v;
          if(a.insProductResult){
            // 设备编号赋值
            let equipValue = JSON.parse(a.insProductResult.equipValue);
            for (let i = 0; i < equipValue.length; i++) {
              // 普通设备赋值
              this.param[a.id].equipValue[i].v.v = equipValue[i].v;
            }
          }
        } catch (e) {}
        } catch (e) {
          console.log("设备编号赋值----", e);
        }
        try {
          // 设备名称赋值
          let equipName = JSON.parse(a.insProductResult.equipName);
          for (let i = 0; i < equipName.length; i++) {
            equipName[i].v !== "" &&
          if(a.insProductResult){
            let equipName = JSON.parse(a.insProductResult.equipName);
            for (let i = 0; i < equipName.length; i++) {
              equipName[i].v !== "" &&
              equipName[i].v.map((val) => {
                const index = this.equipOptions.findIndex(
                  (item) => item.value === val
@@ -3130,10 +3109,11 @@
                  val = this.equipOptions[index].deviceName;
                }
              });
          }
          for (let i = 0; i < equipName.length; i++) {
            // 普通设备名称赋值
            this.param[a.id].equipName[i].v.v = equipName[i].v;
            }
            for (let i = 0; i < equipName.length; i++) {
              // 普通设备名称赋值
              this.param[a.id].equipName[i].v.v = equipName[i].v;
            }
          }
        } catch (e) {
          console.log("设备名称赋值----", e);
@@ -3530,10 +3510,6 @@
        this.$message.error("未输入不通过原因");
      }
    },
    // 查看工时
    viewManHour() {
      this.$refs.viewManHourDia.showDialog(this.id, 99);
    },
    openAddVerifyDia() {
      this.addVerifyDia = true;
    },
@@ -3871,7 +3847,7 @@
    toFixed(v, ct) {
      if (v && ct && ct.fa) {
        if (ct.fa.includes(".")) {
          let num = ct.fa.slice(4).length;
          let num = ct.fa.split(".")[1].length;
          return Number(v).toFixed(num);
        } else {
          return v;