zouyu
2026-04-22 3ee153c34cd734bdb5845b60e6a207884d3b0838
报告编制:印章生成调整
已修改6个文件
3448 ■■■■■ 文件已修改
src/utils/excelFountion.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/inspection.vue 2075 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/performance/class/index.vue 782 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/performance/rewardAndPunishment/index.vue 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/structural/premises/index.vue 489 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/workers/InspectionWorker.worker.js 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/excelFountion.js
@@ -246,7 +246,7 @@
function getABCList(f) {
  try {
    let regex = /[=\+\-\*\%\(\)\/\^\s]/g;
    let fouList = ["SUM", "MAX", "MIN", "AVERAGE", "ABS"];
    let fouList = ["SUM", "MAX", "MIN", "AVERAGE", "ABS","SQRT"];
    f = f
      .replace(regex, ",")
      .replace(new RegExp('"&', "g"), "")
src/views/business/inspectionTask/inspection.vue
@@ -1,203 +1,453 @@
<template>
  <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);">
  <div
    v-loading="loading"
    class="inspection"
    style="background-color: rgb(245, 247, 251)"
  >
    <el-row class="title">
      <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left;">
        <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px"
          style="text-align: right; padding-top: 0; display: inline">
      <el-col
        v-if="insOrder.ifsOrderType !== '02wg'"
        :span="8"
        style="text-align: left"
      >
        <el-form
          :inline="true"
          :model="otherForm"
          class="form-inline"
          label-width="50px"
          style="text-align: right; padding-top: 0; display: inline"
        >
          <el-form-item label="温度:" style="margin-bottom: 0">
            <el-input v-model="otherForm.temperature" :disabled="state > 1" placeholder="" size="small"
              style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'temperature')"></el-input>
            <el-input
              v-model="otherForm.temperature"
              :disabled="state > 1"
              placeholder=""
              size="small"
              style="width: 90px; line-height: 60px"
              @change="(m) => subOtherForm(m, 'temperature')"
            ></el-input>
            <span style="margin-left: 4px">℃</span>
          </el-form-item>
          <el-form-item label="湿度:" style="margin-bottom: 0">
            <el-input v-model="otherForm.humidity" :disabled="state > 1" placeholder="" size="small"
              style="width: 90px; line-height: 60px" @change="(m) => subOtherForm(m, 'humidity')"></el-input>
            <el-input
              v-model="otherForm.humidity"
              :disabled="state > 1"
              placeholder=""
              size="small"
              style="width: 90px; line-height: 60px"
              @change="(m) => subOtherForm(m, 'humidity')"
            ></el-input>
            <span style="margin-left: 4px">%</span>
          </el-form-item>
        </el-form>
      </el-col>
      <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right">
        <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFS物料属性更新</el-button>
        <el-button size="small" type="primary" @click="refreshView">刷新</el-button>
        <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">进货验证</el-button>
        <el-button v-if="state == 1 && [0,1].includes(Number(typeSource))" size="small" type="primary"
          @click="openUnPassDialog('add')">不合格处理</el-button>
        <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">样品切换</el-button>
      <el-col
        :span="insOrder.ifsOrderType !== '02wg' ? 16 : 24"
        style="text-align: right"
      >
        <el-button
          v-if="insOrder.ifsOrderType && insOrder.ifsOrderType === '02wg'"
          size="small"
          type="primary"
          @click="showMaterialPropsDialog"
          >IFS物料属性更新</el-button
        >
        <el-button size="small" type="primary" @click="refreshView"
          >刷新</el-button
        >
        <el-button
          v-if="typeSource == 1"
          size="small"
          type="primary"
          @click="openPurchase"
          >进货验证</el-button
        >
        <el-button
          v-if="state == 1 && [0, 1].includes(Number(typeSource))"
          size="small"
          type="primary"
          @click="openUnPassDialog('add')"
          >不合格处理</el-button
        >
        <el-button
          size="small"
          type="primary"
          @click="
            sampleVisible = true;
            uploadSample();
          "
          >样品切换</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" type="primary" @click="addVerifyDia = true">提交</el-button>
        <el-button
          v-if="state == 1"
          size="small"
          type="primary"
          @click="addVerifyDia = true"
          >提交</el-button
        >
        <!-- 复核 -->
        <el-button v-if="state == 2" size="medium" type="primary" @click="openAddCheck">通过</el-button>
        <el-button v-if="state == 2" size="medium" @click="upInsReview(0)">不通过</el-button>
        <el-button type="primary" size="small" @click="exportTable('myTable')">下载原始记录</el-button>
        <el-button
          v-if="state == 2"
          size="medium"
          type="primary"
          @click="openAddCheck"
          >通过</el-button
        >
        <el-button v-if="state == 2" size="medium" @click="upInsReview(0)"
          >不通过</el-button
        >
        <el-button type="primary" size="small" @click="exportTable('myTable')"
          >下载原始记录</el-button
        >
        <el-button size="small" @click="goback">返回</el-button>
      </el-col>
    </el-row>
    <div class="search">
<!--      <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">-->
<!--        <el-form-item label="委托编号:">-->
<!--          <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="样品编号:">-->
<!--          <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">-->
<!--            <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--          </el-tooltip>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="样品名称:">-->
<!--          <el-input v-model="currentSample.sample" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="样品数量:">-->
<!--          <el-input v-model="sampleProduct.length" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="样品型号:">-->
<!--          <el-input v-model="currentSample.model" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="下发时间:">-->
<!--          <el-input v-model="insOrder.sendTime" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="紧急程度:">-->
<!--          <el-input v-model="insOrder.typeName" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="约定时间:">-->
<!--          <el-input v-model="insOrder.appointed" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item v-if="typeSource === 1" label="抽检数量:">-->
<!--          <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item v-if="typeSource === 1" label="厂家密度:">-->
<!--          <el-input v-model="supplierDensity" clearable disabled placeholder="请输入" size="small"></el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="当前样品位数:" label-width="120px">-->
<!--          <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>-->
<!--        </el-form-item>-->
<!--        <el-form-item label="备注:">-->
<!--          &lt;!&ndash;          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>&ndash;&gt;-->
<!--          <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请输入" size="small"-->
<!--            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>-->
<!--          &lt;!&ndash; <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> &ndash;&gt;-->
<!--        </el-form-item>-->
<!--        <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">-->
<!--          <el-form-item label="外护颜色:">-->
<!--            <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="绝缘颜色:">-->
<!--            <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>-->
<!--          </el-form-item>-->
<!--          <el-form-item label="盘号:">-->
<!--            <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>-->
<!--          </el-form-item>-->
<!--        </template>-->
<!--      </el-form>-->
<!--      -->
      <!--      <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">-->
      <!--        <el-form-item label="委托编号:">-->
      <!--          <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="样品编号:">-->
      <!--          <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">-->
      <!--            <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--          </el-tooltip>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="样品名称:">-->
      <!--          <el-input v-model="currentSample.sample" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="样品数量:">-->
      <!--          <el-input v-model="sampleProduct.length" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="样品型号:">-->
      <!--          <el-input v-model="currentSample.model" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="下发时间:">-->
      <!--          <el-input v-model="insOrder.sendTime" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="紧急程度:">-->
      <!--          <el-input v-model="insOrder.typeName" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="约定时间:">-->
      <!--          <el-input v-model="insOrder.appointed" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item v-if="typeSource === 1" label="抽检数量:">-->
      <!--          <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item v-if="typeSource === 1" label="厂家密度:">-->
      <!--          <el-input v-model="supplierDensity" clearable disabled placeholder="请输入" size="small"></el-input>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="当前样品位数:" label-width="120px">-->
      <!--          <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>-->
      <!--        </el-form-item>-->
      <!--        <el-form-item label="备注:">-->
      <!--          &lt;!&ndash;          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>&ndash;&gt;-->
      <!--          <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请输入" size="small"-->
      <!--            @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>-->
      <!--          &lt;!&ndash; <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> &ndash;&gt;-->
      <!--        </el-form-item>-->
      <!--        <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">-->
      <!--          <el-form-item label="外护颜色:">-->
      <!--            <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item label="绝缘颜色:">-->
      <!--            <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>-->
      <!--          </el-form-item>-->
      <!--          <el-form-item label="盘号:">-->
      <!--            <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>-->
      <!--          </el-form-item>-->
      <!--        </template>-->
      <!--      </el-form>-->
      <!--      -->
      <el-descriptions title="检验单概况" :column="4" border>
        <template v-if="insOrder.ifsOrderType">
          <el-descriptions-item label="零件号">{{insOrder.partNo}}</el-descriptions-item>
          <el-descriptions-item label="零件名称">{{insOrder.partDetail}}</el-descriptions-item>
          <el-descriptions-item label="批次号">{{ insOrder.lotBatchNo }}</el-descriptions-item>
          <el-descriptions-item label="样品型号" >{{currentSample.model}}</el-descriptions-item>
          <el-descriptions-item label="抽检数量">{{insOrder.testQuantity}}</el-descriptions-item>
          <el-descriptions-item label="厂家密度">{{supplierDensity}}</el-descriptions-item>
          <template v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'">
            <el-descriptions-item label="载具编号">{{insOrder.drumNo}}</el-descriptions-item>
            <el-descriptions-item label="起始米标(km)">{{insOrder.startMeterMark}}</el-descriptions-item>
            <el-descriptions-item label="截止米标(km)">{{insOrder.endMeterMark}}</el-descriptions-item>
            <el-descriptions-item label="入库长度(km)">{{calcInbondLength(insOrder.startMeterMark,insOrder.endMeterMark)}}</el-descriptions-item>
            <el-descriptions-item label="绝缘颜色">{{insOrder.insulationColor}}</el-descriptions-item>
            <el-descriptions-item label="外护颜色">{{insOrder.outerColor}}</el-descriptions-item>
            <el-descriptions-item label="印字信息">{{insOrder.letteringInfo}}</el-descriptions-item>
          <el-descriptions-item label="零件号">{{
            insOrder.partNo
          }}</el-descriptions-item>
          <el-descriptions-item label="零件名称">{{
            insOrder.partDetail
          }}</el-descriptions-item>
          <el-descriptions-item label="批次号">{{
            insOrder.lotBatchNo
          }}</el-descriptions-item>
          <el-descriptions-item label="样品型号">{{
            currentSample.model
          }}</el-descriptions-item>
          <el-descriptions-item label="抽检数量">{{
            insOrder.testQuantity
          }}</el-descriptions-item>
          <el-descriptions-item label="厂家密度">{{
            supplierDensity
          }}</el-descriptions-item>
          <template
            v-if="insOrder.ifsOrderType && insOrder.ifsOrderType === '02wg'"
          >
            <el-descriptions-item label="载具编号">{{
              insOrder.drumNo
            }}</el-descriptions-item>
            <el-descriptions-item label="起始米标(km)">{{
              insOrder.startMeterMark
            }}</el-descriptions-item>
            <el-descriptions-item label="截止米标(km)">{{
              insOrder.endMeterMark
            }}</el-descriptions-item>
            <el-descriptions-item label="入库长度(km)">{{
              calcInbondLength(insOrder.startMeterMark, insOrder.endMeterMark)
            }}</el-descriptions-item>
            <el-descriptions-item label="绝缘颜色">{{
              insOrder.insulationColor
            }}</el-descriptions-item>
            <el-descriptions-item label="外护颜色">{{
              insOrder.outerColor
            }}</el-descriptions-item>
            <el-descriptions-item label="印字信息">{{
              insOrder.letteringInfo
            }}</el-descriptions-item>
          </template>
        </template>
        <template v-else>
          <el-descriptions-item label="委托编号">{{ insOrder.entrustCode }}</el-descriptions-item>
          <el-descriptions-item label="样品编号">{{ currentSample.sampleCode }}</el-descriptions-item>
          <el-descriptions-item label="样品名称">{{ currentSample.sample }}</el-descriptions-item>
          <el-descriptions-item label="样品数量">{{ sampleProduct.length }}</el-descriptions-item>
          <el-descriptions-item label="样品型号">{{ currentSample.model }}</el-descriptions-item>
          <el-descriptions-item label="下发时间">{{ insOrder.sendTime }}</el-descriptions-item>
          <el-descriptions-item label="紧急程度">{{ insOrder.typeName }}</el-descriptions-item>
          <el-descriptions-item label="约定时间">{{ insOrder.appointed }}</el-descriptions-item>
          <el-descriptions-item label="委托编号">{{
            insOrder.entrustCode
          }}</el-descriptions-item>
          <el-descriptions-item label="样品编号">{{
            currentSample.sampleCode
          }}</el-descriptions-item>
          <el-descriptions-item label="样品名称">{{
            currentSample.sample
          }}</el-descriptions-item>
          <el-descriptions-item label="样品数量">{{
            sampleProduct.length
          }}</el-descriptions-item>
          <el-descriptions-item label="样品型号">{{
            currentSample.model
          }}</el-descriptions-item>
          <el-descriptions-item label="下发时间">{{
            insOrder.sendTime
          }}</el-descriptions-item>
          <el-descriptions-item label="紧急程度">{{
            insOrder.typeName
          }}</el-descriptions-item>
          <el-descriptions-item label="约定时间">{{
            insOrder.appointed
          }}</el-descriptions-item>
        </template>
        <el-descriptions-item label="当前样品位数"><el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag></el-descriptions-item>
        <el-descriptions-item label="当前样品位数"
          ><el-tag v-if="currentKey">{{
            `NO.${currentKey}`
          }}</el-tag></el-descriptions-item
        >
        <el-descriptions-item label="备注">
          <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请输入" size="small"
                    @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>
          <el-input
            v-model="insOrder.remark"
            :disabled="state != 1"
            clearable
            placeholder="请输入"
            size="small"
            @blur="subOtherForm(insOrder.remark, 'remark')"
          ></el-input>
        </el-descriptions-item>
      </el-descriptions>
    </div>
    <div class="center">
      <div class="search" style="
      <div
        class="search"
        style="
          text-align: left;
          display: flex;
          align-items: center;
          justify-content: space-between;
        ">
        "
      >
        <div style="display: flex; align-items: center">
          <span v-if="tableList.length > 0">检验模板:</span>
          <el-radio-group v-model="currentTable" size="small">
            <el-radio-button v-for="(item, index) in tableLists" :key="index" :label="item.templateId" size="small">{{
              item.templateName }}</el-radio-button>
            <el-radio-button
              v-for="(item, index) in tableLists"
              :key="index"
              :label="item.templateId"
              size="small"
              >{{ item.templateName }}</el-radio-button
            >
          </el-radio-group>
        </div>
        <div style="display: flex; align-items: center">
          <el-button v-if="state == 1" size="small" type="primary" @click="openAddUnpass">新增不合格复测</el-button>
          <el-button v-if="state == 1" size="small" type="primary" @click="unpassCheck">不合格复测</el-button>
          <el-button v-if="state > 1" size="small" type="primary" @click="viewUnpassCheck">查看不合格复测</el-button>
          <el-button
            v-if="state == 1"
            size="small"
            type="primary"
            @click="openAddUnpass"
            >新增不合格复测</el-button
          >
          <el-button
            v-if="state == 1"
            size="small"
            type="primary"
            @click="unpassCheck"
            >不合格复测</el-button
          >
          <el-button
            v-if="state > 1"
            size="small"
            type="primary"
            @click="viewUnpassCheck"
            >查看不合格复测</el-button
          >
          <span v-if="cableTagList.length > 0">&nbsp;&nbsp;电缆配置:</span>
          <el-select v-if="cableTagList.length > 0" v-model="currentTab" clearable placeholder="请选择" size="small"
            @change="(m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
              " @focus="getCableTag(currentSample.id)">
            <el-option v-for="item in cableTagList" :key="item.cableTag" :label="item.cableTag" :value="item.cableTag">
          <el-select
            v-if="cableTagList.length > 0"
            v-model="currentTab"
            clearable
            placeholder="请选择"
            size="small"
            @change="
              (m) => handleChangeCableTag(currentSample.id, 0, 'cableTag', m)
            "
            @focus="getCableTag(currentSample.id)"
          >
            <el-option
              v-for="item in cableTagList"
              :key="item.cableTag"
              :label="item.cableTag"
              :value="item.cableTag"
            >
              <span style="float: left">{{ item.cableTag }}</span>
              <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
                type="danger">未检</el-tag>
              <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
                type="warning">检验中</el-tag>
              <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
                type="success">已检</el-tag>
              <el-tag
                v-if="item.status == 0"
                size="small"
                style="float: right; margin-top: 5px"
                type="danger"
                >未检</el-tag
              >
              <el-tag
                v-if="item.status == 1"
                size="small"
                style="float: right; margin-top: 5px"
                type="warning"
                >检验中</el-tag
              >
              <el-tag
                v-if="item.status == 2"
                size="small"
                style="float: right; margin-top: 5px"
                type="success"
                >已检</el-tag
              >
            </el-option>
          </el-select>
          <span v-if="repetitionTagList.length > 0">&nbsp;&nbsp;重复检验项:</span>
          <el-select v-if="repetitionTagList.length > 0" v-model="repetitionTag" clearable placeholder="请选择"
            size="small" @change="(m) =>
              handleChangeCableTag(currentSample.id, 0, 'repetitionTag', m)
              " @focus="getRepetitionTag(currentSample.id)">
            <el-option v-for="item in repetitionTagList" :key="item.repetitionTag" :label="item.radius"
              :value="item.repetitionTag">
          <span v-if="repetitionTagList.length > 0"
            >&nbsp;&nbsp;重复检验项:</span
          >
          <el-select
            v-if="repetitionTagList.length > 0"
            v-model="repetitionTag"
            clearable
            placeholder="请选择"
            size="small"
            @change="
              (m) =>
                handleChangeCableTag(currentSample.id, 0, 'repetitionTag', m)
            "
            @focus="getRepetitionTag(currentSample.id)"
          >
            <el-option
              v-for="item in repetitionTagList"
              :key="item.repetitionTag"
              :label="item.radius"
              :value="item.repetitionTag"
            >
              <span style="float: left">{{ item.radius }}</span>
              <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
                type="danger">未检</el-tag>
              <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
                type="warning">检验中</el-tag>
              <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
                type="success">已检</el-tag>
              <el-tag
                v-if="item.status == 0"
                size="small"
                style="float: right; margin-top: 5px"
                type="danger"
                >未检</el-tag
              >
              <el-tag
                v-if="item.status == 1"
                size="small"
                style="float: right; margin-top: 5px"
                type="warning"
                >检验中</el-tag
              >
              <el-tag
                v-if="item.status == 2"
                size="small"
                style="float: right; margin-top: 5px"
                type="success"
                >已检</el-tag
              >
            </el-option>
          </el-select>
          <span v-if="typeSource == '1'">&nbsp;&nbsp;待检验数量:</span>
          <el-select v-if="typeSource == '1'" v-model="rawMaterialTag" placeholder="请选择" size="small" @change="(m) => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)
            " @focus="getRawMaterialTag(currentSample.id)">
            <el-option v-for="item in rawMaterialTagList" :key="item.rawMaterialTag" :label="item.rawMaterialTag"
              :value="item.rawMaterialTag">
          <el-select
            v-if="typeSource == '1'"
            v-model="rawMaterialTag"
            placeholder="请选择"
            size="small"
            @change="
              (m) => handleChangeCableTag(currentSample.id, 4, 'cableTag', m)
            "
            @focus="getRawMaterialTag(currentSample.id)"
          >
            <el-option
              v-for="item in rawMaterialTagList"
              :key="item.rawMaterialTag"
              :label="item.rawMaterialTag"
              :value="item.rawMaterialTag"
            >
              <span style="float: left">{{ item.rawMaterialTag }}</span>
              <el-tag v-if="item.status == 0" size="small" style="float: right; margin-top: 5px"
                type="danger">未检</el-tag>
              <el-tag v-if="item.status == 1" size="small" style="float: right; margin-top: 5px"
                type="warning">检验中</el-tag>
              <el-tag v-if="item.status == 2" size="small" style="float: right; margin-top: 5px"
                type="success">已检</el-tag>
              <el-tag
                v-if="item.status == 0"
                size="small"
                style="float: right; margin-top: 5px"
                type="danger"
                >未检</el-tag
              >
              <el-tag
                v-if="item.status == 1"
                size="small"
                style="float: right; margin-top: 5px"
                type="warning"
                >检验中</el-tag
              >
              <el-tag
                v-if="item.status == 2"
                size="small"
                style="float: right; margin-top: 5px"
                type="success"
                >已检</el-tag
              >
            </el-option>
          </el-select>
          <el-button :loading="dataAcquisitionLoading" v-if="state == 1" size="small" type="primary"
            @click="getDataAcquisitionDevice">数据采集</el-button>
          <el-button :type="dataAcquisitionEidtAble ? '' : 'primary'" v-if="state == 1" size="small"
            @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble">{{ dataAcquisitionEidtAble ? "关闭编辑" : "编辑数采"
            }}</el-button>
          <el-button
            :loading="dataAcquisitionLoading"
            v-if="state == 1"
            size="small"
            type="primary"
            @click="getDataAcquisitionDevice"
            >数据采集</el-button
          >
          <el-button
            :type="dataAcquisitionEidtAble ? '' : 'primary'"
            v-if="state == 1"
            size="small"
            @click="dataAcquisitionEidtAble = !dataAcquisitionEidtAble"
            >{{ dataAcquisitionEidtAble ? "关闭编辑" : "编辑数采" }}</el-button
          >
        </div>
      </div>
      <!-- 常规检验原始记录 -->
      <div id="nav" v-loading="tableLoading" class="center-box">
        <template v-if="
          tableLists.find((m) => m.templateId == currentTable)">
          <table v-for="(item, index) in tableList" :key="index + currentTable + currentSample.id" border="1"
            cellpadding="10" class="tables" id="myTable">
        <template v-if="tableLists.find((m) => m.templateId == currentTable)">
          <table
            v-for="(item, index) in tableList"
            :key="index + currentTable + currentSample.id"
            border="1"
            cellpadding="10"
            class="tables"
            id="myTable"
          >
            <tbody>
              <tr style="white-space: nowrap">
                委托编号:{{
@@ -205,51 +455,86 @@
                }}
              </tr>
              <tr v-for="(m, i) in item.arr" :key="i">
                <td v-for="(n, j) in m" v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4"
                  :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c" :key="j"
                  :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1" :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1" :style="`background:${n.v.bg ? n.v.bg : ''};color:${n.v.fc
                    };font-size:${n.v.fs}px;width:${handleWidth(
                      n
                    )}px !important;height:${item.style.rowlen[n.r]}px;font-wight:${n.v.bl ? 'bold' : ''
                    };`">
                  <div :class="`content-h-${n.v.ht} content-v-${n.v.vt}`" :style="`width:${handleWidth(n)}px !important;min-height:${item.style.rowlen[n.r]
                    }px;`" class="content">
                    <template v-if="
                      n.v.ps != undefined &&
                      typeof n.v.ps.value === 'string' &&
                      n.v.ps.value.includes('检验值') &&
                      state == 1
                    ">
                      <el-input v-if="getInspectionValueType(n.i) == 1"
                        :key="'abc-' + '000' + index + '000' + i + '000' + j" v-model="n.v.v" :disabled="(getInspectionItemType(n.i) == 1 &&
                          !dataAcquisitionEidtAble) ||
                <td
                  v-for="(n, j) in m"
                  v-if="n.v.mc == undefined || Object.keys(n.v.mc).length === 4"
                  :id="item.templateId + '-' + n.i + '-' + n.r + '-' + n.c"
                  :key="j"
                  :colspan="n.v.mc && n.v.mc.cs ? n.v.mc.cs : 1"
                  :rowspan="n.v.mc && n.v.mc.rs ? n.v.mc.rs : 1"
                  :style="`background:${n.v.bg ? n.v.bg : ''};color:${
                    n.v.fc
                  };font-size:${n.v.fs}px;width:${handleWidth(
                    n
                  )}px !important;height:${
                    item.style.rowlen[n.r]
                  }px;font-wight:${n.v.bl ? 'bold' : ''};`"
                >
                  <div
                    :class="`content-h-${n.v.ht} content-v-${n.v.vt}`"
                    :style="`width:${handleWidth(n)}px !important;min-height:${
                      item.style.rowlen[n.r]
                    }px;`"
                    class="content"
                  >
                    <template
                      v-if="
                        n.v.ps != undefined &&
                        typeof n.v.ps.value === 'string' &&
                        n.v.ps.value.includes('检验值') &&
                        state == 1
                      "
                    >
                      <el-input
                        v-if="getInspectionValueType(n.i) == 1"
                        :key="'abc-' + '000' + index + '000' + i + '000' + j"
                        v-model="n.v.v"
                        :disabled="
                          (getInspectionItemType(n.i) == 1 &&
                            !dataAcquisitionEidtAble) ||
                          (n.u != userId && n.u != undefined && n.u != '')
                          " class="table_input" @change="(m) =>
                        "
                        class="table_input"
                        @change="
                          (m) =>
                            changeInput(
                              m,
                              `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                              n,
                              'getDataType'
                            )
                            " @input="handleInput(n)" @mousewheel.native.prevent @keydown.enter="
                              changeInput(
                                '',
                                `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                                n,
                                'getDataType'
                              )
                              ">
                      </el-input>
                      <el-input v-else-if="getInspectionValueType(n.i) == 2" v-model="n.v.v" :disabled="getInspectionItemType(n.i) == 1 ||
                        (n.u != userId && n.u != undefined && n.u != '')
                        " class="table_input" type="textarea" @change="(m) =>
                        "
                        @input="handleInput(n)"
                        @mousewheel.native.prevent
                        @keydown.enter="
                          changeInput(
                            m,
                            '',
                            `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                            n,
                            'getDataType'
                          )
                          " />
                        "
                      >
                      </el-input>
                      <el-input
                        v-else-if="getInspectionValueType(n.i) == 2"
                        v-model="n.v.v"
                        :disabled="
                          getInspectionItemType(n.i) == 1 ||
                          (n.u != userId && n.u != undefined && n.u != '')
                        "
                        class="table_input"
                        type="textarea"
                        @change="
                          (m) =>
                            changeInput(
                              m,
                              `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                              n,
                              'getDataType'
                            )
                        "
                      />
                      <!-- <el-select v-else-if="getInspectionValueType(n.i) == 5" v-model="n.v.v" :disabled="state > 1 ||
                      getInspectionItemType(n.i) == 1 ||
                      (n.u != userId && n.u != undefined && n.u != '')
@@ -263,116 +548,204 @@
                        " @visible-change="(e) => getDic(e, n.i)">
                      <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
                    </el-select> -->
                      <span v-else-if="getInspectionValueType(n.i) == 4"
                        :style="`font-family:${n.v.ff} !important;`">/</span>
                      <span
                        v-else-if="getInspectionValueType(n.i) == 4"
                        :style="`font-family:${n.v.ff} !important;`"
                        >/</span
                      >
                    </template>
                    <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
                      " v-model="n.v.v" class="table_input" @change="(m) =>
                        changeInput(
                          m,
                          `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                          n,
                          'getDataType',
                          'changeSelect'
                        )
                        ">
                    <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
                        "
                        v-model="n.v.v"
                        class="table_input"
                        @change="
                          (m) =>
                            changeInput(
                              m,
                              `${item.templateId}-${n.r}-${n.c}-${n.i}`,
                              n,
                              'getDataType',
                              'changeSelect'
                            )
                        "
                      >
                        <el-option :value="1" label="合格"></el-option>
                        <el-option :value="0" label="不合格"></el-option>
                        <el-option :value="3" label="不判定"></el-option>
                        <el-option :value="2" label="待定"></el-option>
                      </el-select>
                      <template v-if="state > 1">
                        <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">合格</span>
                        <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">不合格</span>
                        <span v-else-if="n.v.v === 3"
                          :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">不判定</span>
                        <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span>
                        <span
                          v-if="n.v.v === 1"
                          :style="`font-family:${n.v.ff} !important;color: green;`"
                          >合格</span
                        >
                        <span
                          v-else-if="n.v.v === 0"
                          :style="`font-family:${n.v.ff} !important;color: red;`"
                          >不合格</span
                        >
                        <span
                          v-else-if="n.v.v === 3"
                          :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`"
                          >不判定</span
                        >
                        <span
                          v-else
                          :style="`font-family:${n.v.ff} !important;`"
                          >待定</span
                        >
                      </template>
                      <template v-if="getInspectionValueType(n.i) != 2 &&
                        state == 1">
                        <span v-if="n.v.v === 1" :style="`font-family:${n.v.ff} !important;color: green;`">合格</span>
                        <span v-else-if="n.v.v === 0" :style="`font-family:${n.v.ff} !important;color: red;`">不合格</span>
                        <span v-else-if="n.v.v === 3"
                          :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`">不判定</span>
                        <span v-else :style="`font-family:${n.v.ff} !important;`">待定</span>
                      <template
                        v-if="getInspectionValueType(n.i) != 2 && state == 1"
                      >
                        <span
                          v-if="n.v.v === 1"
                          :style="`font-family:${n.v.ff} !important;color: green;`"
                          >合格</span
                        >
                        <span
                          v-else-if="n.v.v === 0"
                          :style="`font-family:${n.v.ff} !important;color: red;`"
                          >不合格</span
                        >
                        <span
                          v-else-if="n.v.v === 3"
                          :style="`font-family:${n.v.ff} !important;color: #3A7BFA;`"
                          >不判定</span
                        >
                        <span
                          v-else
                          :style="`font-family:${n.v.ff} !important;`"
                          >待定</span
                        >
                      </template>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '设备编码' &&
                      state == 1
                    ">
                    <template
                      v-else-if="
                        n.v.ps != undefined &&
                        n.v.ps.value === '设备编码' &&
                        state == 1
                      "
                    >
                      <span>{{ n.v.v }}</span>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined && n.v.ps.value === '设备名称'
                    ">
                      <el-select v-model="n.v.v" :disabled="state > 1" class="table_input" filterable multiple
                        placeholder="设备" remote @change="(val) => changeEquip(val, n)"
                        @visible-change="(e) => getEquipOptions(e, n.i)">
                        <el-option v-for="item in equipOptions" :key="item.value" :label="item.label"
                          :value="item.value">
                    <template
                      v-else-if="
                        n.v.ps != undefined && n.v.ps.value === '设备名称'
                      "
                    >
                      <el-select
                        v-model="n.v.v"
                        :disabled="state > 1"
                        class="table_input"
                        filterable
                        multiple
                        placeholder="设备"
                        remote
                        @change="(val) => changeEquip(val, n)"
                        @visible-change="(e) => getEquipOptions(e, n.i)"
                      >
                        <el-option
                          v-for="item in equipOptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        >
                          {{ item.label + "--" + item.value }}
                        </el-option>
                      </el-select>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '要求值' &&
                      state == 1
                    ">
                    <template
                      v-else-if="
                        n.v.ps != undefined &&
                        n.v.ps.value === '要求值' &&
                        state == 1
                      "
                    >
                      <span :style="`font-family:${n.v.ff} !important;`">{{
                        getTell(n.i)
                      }}</span>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '计算值' &&
                      state == 1
                    "><span :style="`font-family:${n.v.ff} !important;`">{{
                      toFixed(n.v.v, n.v.ct)
                    }}</span></template>
                    <template v-else-if="
                      n.v.ps != undefined &&
                      n.v.ps.value === '最终值' &&
                      state == 1
                    ">
                    <template
                      v-else-if="
                        n.v.ps != undefined &&
                        n.v.ps.value === '计算值' &&
                        state == 1
                      "
                      ><span :style="`font-family:${n.v.ff} !important;`">{{
                        toFixed(n.v.v, n.v.ct)
                      }}</span></template
                    >
                    <template
                      v-else-if="
                        n.v.ps != undefined &&
                        n.v.ps.value === '最终值' &&
                        state == 1
                      "
                    >
                      <span :style="`font-family:${n.v.ff} !important;`">{{
                        toFixed(n.v.v, n.v.ct)
                      }}</span>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined && n.v.ps.value === '样品编号'
                    ">
                      <div :title="currentSample.sampleCode" style="
                        display: flex;
                        flex-wrap: nowrap;
                        align-items: center;
                        width: 100%;
                      ">
                        <i class="el-icon-caret-left table_caret" style="width: 16px" @click="caretSample(-1)"></i>
                    <template
                      v-else-if="
                        n.v.ps != undefined && n.v.ps.value === '样品编号'
                      "
                    >
                      <div
                        :title="currentSample.sampleCode"
                        style="
                          display: flex;
                          flex-wrap: nowrap;
                          align-items: center;
                          width: 100%;
                        "
                      >
                        <i
                          class="el-icon-caret-left table_caret"
                          style="width: 16px"
                          @click="caretSample(-1)"
                        ></i>
                        <div
                          :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`">
                          :style="`font-family:${n.v.ff} !important;overflow: hidden;white-space: nowrap;width: calc(100% - 32px);`"
                        >
                          {{ currentSample.sampleCode }}
                        </div>
                        <i class="el-icon-caret-right table_caret" style="width: 16px" @click="caretSample(1)"></i>
                        <i
                          class="el-icon-caret-right table_caret"
                          style="width: 16px"
                          @click="caretSample(1)"
                        ></i>
                      </div>
                    </template>
                    <template v-else-if="
                      n.v.ps != undefined && n.v.ps.value === '样品型号'
                    ">
                      <div v-if="
                        currentSample.model !== undefined &&
                        currentSample.model !== null
                      " :style="`font-family:${n.v.ff} !important;`">
                    <template
                      v-else-if="
                        n.v.ps != undefined && n.v.ps.value === '样品型号'
                      "
                    >
                      <div
                        v-if="
                          currentSample.model !== undefined &&
                          currentSample.model !== null
                        "
                        :style="`font-family:${n.v.ff} !important;`"
                      >
                        {{ currentSample.model }}
                      </div>
                    </template>
                    <span v-else :style="`font-family:${n.v.ff} !important;`" v-html="getValue(n.v)"></span>
                    <span
                      v-else
                      :style="`font-family:${n.v.ff} !important;`"
                      v-html="getValue(n.v)"
                    ></span>
                  </div>
                </td>
              </tr>
@@ -380,54 +753,147 @@
          </table>
        </template>
      </div>
      <el-upload v-if="state == 1" ref="upload" :action="action" :before-upload="beforeUpload" :data="{
        orderId: id,
      }" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false"
      <el-upload
        v-if="state == 1"
        ref="upload"
        :action="action"
        :before-upload="beforeUpload"
        :data="{
          orderId: id,
        }"
        :headers="uploadHeader"
        :on-error="onError"
        :on-success="handleSuccessUp"
        :show-file-list="false"
        accept=".jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar"
        style="width: 80px !important;margin-top: 10px;">
        <el-button v-if="state == 1" size="small" type="primary">附件上传</el-button></el-upload>
      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
        :height="'calc(100vh - 290px)'" @pagination="pagination" style="height: 100%; margin-top: 16px"></lims-table>
        style="width: 80px !important; margin-top: 10px"
      >
        <el-button v-if="state == 1" size="small" type="primary"
          >附件上传</el-button
        ></el-upload
      >
      <lims-table
        :tableData="tableData"
        :column="column"
        :page="page"
        :tableLoading="tableLoading"
        :height="'calc(100vh - 290px)'"
        @pagination="pagination"
        style="height: 100%; margin-top: 16px"
      ></lims-table>
    </div>
    <el-drawer :size="550" :visible.sync="sampleVisible" title="样品切换">
      <el-table v-if="sampleVisible" ref="productTable" :current-row-key="currentKey" :data="sampleProduct"
                :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border
        :row-class-name="tableRowClassName" :row-key="(record) => record.index" border class="el-table" height="100%"
        highlight-current-row tooltip-effect="dark" @row-click="handleChangeSample">
        <el-table-column :key="Math.random()" align="center" label="序号" type="index" width="70px">
      <el-table
        v-if="sampleVisible"
        ref="productTable"
        :current-row-key="currentKey"
        :data="sampleProduct"
        :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }"
        border
        :row-class-name="tableRowClassName"
        :row-key="(record) => record.index"
        border
        class="el-table"
        height="100%"
        highlight-current-row
        tooltip-effect="dark"
        @row-click="handleChangeSample"
      >
        <el-table-column
          :key="Math.random()"
          align="center"
          label="序号"
          type="index"
          width="70px"
        >
        </el-table-column>
        <el-table-column label="样品编号" min-width="100px" prop="sampleCode" show-overflow-tooltip></el-table-column>
        <el-table-column label="样品型号" min-width="100px" prop="model" show-overflow-tooltip></el-table-column>
        <el-table-column label="检测状态" prop="insState" show-overflow-tooltip width="100px">
        <el-table-column
          label="样品编号"
          min-width="100px"
          prop="sampleCode"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="样品型号"
          min-width="100px"
          prop="model"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          label="检测状态"
          prop="insState"
          show-overflow-tooltip
          width="100px"
        >
          <template slot-scope="scope">
            <el-tag v-for="(item, i) in typeList" v-if="item.value == scope.row.insState" :key="i" :type="item.type"
              size="medium" style="margin-right: 5px">{{ item.label }}</el-tag>
            <el-tag
              v-for="(item, i) in typeList"
              v-if="item.value == scope.row.insState"
              :key="i"
              :type="item.type"
              size="medium"
              style="margin-right: 5px"
              >{{ item.label }}</el-tag
            >
          </template>
        </el-table-column>
        <el-table-column align="center" label="是否留样" prop="isLeave" show-overflow-tooltip width="95px">
        <el-table-column
          align="center"
          label="是否留样"
          prop="isLeave"
          show-overflow-tooltip
          width="95px"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.isLeave == 0 ? "否" : "是" }}</span>
          </template>
        </el-table-column>
        <!-- 检验单会有一个是否有配套样品字段控制显示 -->
        <el-table-column v-if="insOrder.mating > 0" label="配套样品型号" min-width="130px" prop="joinModel"
          show-overflow-tooltip></el-table-column>
        <el-table-column v-if="insOrder.mating > 0" label="配套样品名称" min-width="130px" prop="joinName"
          show-overflow-tooltip></el-table-column>
        <el-table-column v-if="insOrder.mating > 0" label="配套样品数量" min-width="130px" prop="joinNum"
          show-overflow-tooltip></el-table-column>
        <el-table-column
          v-if="insOrder.mating > 0"
          label="配套样品型号"
          min-width="130px"
          prop="joinModel"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          v-if="insOrder.mating > 0"
          label="配套样品名称"
          min-width="130px"
          prop="joinName"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          v-if="insOrder.mating > 0"
          label="配套样品数量"
          min-width="130px"
          prop="joinNum"
          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>
      <lims-table
        :tableData="tableData0"
        :column="column0"
        :page="page0"
        :tableLoading="tableLoading0"
        :height="'calc(100vh - 90px)'"
        :currentChange="handleChangeTask"
      ></lims-table>
    </el-drawer>
    <el-dialog
      title="哑铃片设备试样类型"
      :visible.sync="dialogVisible"
      :before-close="handleDialogCancel"
      width="30%">
      <el-select v-model="deviceDbTableName" placeholder="请选择试样类型" style="width:100%" size="small">
      width="30%"
    >
      <el-select
        v-model="deviceDbTableName"
        placeholder="请选择试样类型"
        style="width: 100%"
        size="small"
      >
        <el-option label="片状" value="TestData"></el-option>
        <el-option label="管状" value="TestData2"></el-option>
      </el-select>
@@ -441,33 +907,67 @@
          <span class="required-span">* </span>不通过的理由:
        </div>
        <div class="search_input" style="width: 100%">
          <el-input v-model="noReason" :autosize="{ minRows: 4 }" clearable size="small" type="textarea"></el-input>
          <el-input
            v-model="noReason"
            :autosize="{ minRows: 4 }"
            clearable
            size="small"
            type="textarea"
          ></el-input>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="reviewDia = false">取 消</el-button>
        <el-button :loading="reviewLoading" type="primary" @click="handleReviewDia">确 定</el-button>
        <el-button
          :loading="reviewLoading"
          type="primary"
          @click="handleReviewDia"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog :visible.sync="addVerifyDia" title="指定复核人员" width="400px">
      <div class="body" style="display: flex; padding: 10px; align-items: center">
      <div
        class="body"
        style="display: flex; padding: 10px; align-items: center"
      >
        <div class="search_label" style="width: 150px">
          <span class="required-span">*</span>复核人
        </div>
        <div class="search_input" style="width: 100%">
          <el-select v-model="verifyUser" clearable filterable placeholder="请选择" size="small" style="width: 100%">
            <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
          <el-select
            v-model="verifyUser"
            clearable
            filterable
            placeholder="请选择"
            size="small"
            style="width: 100%"
          >
            <el-option
              v-for="(item, i) in personList"
              :key="i"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addVerifyDia = false">取 消</el-button>
        <el-button :loading="submitLoading" type="primary" @click="submit()">确 定</el-button>
        <el-button :loading="submitLoading" type="primary" @click="submit()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false"
      :visible.sync="dataGetDia" title="数据采集" width="80%">
    <el-dialog
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
      :visible.sync="dataGetDia"
      title="数据采集"
      width="80%"
    >
      <div>
        <table border="1" cellpadding="10" class="thermal-table">
          <tr>
@@ -484,150 +984,296 @@
              <td style="text-align: left">
                <!-- 添加容器 div -->
                <div class="data-collection-items">
                <el-select v-if="item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
                  :multiple-limit="item.child[0].maxNum" clearable filterable multiple placeholder="请选择"
                  @change="setData(item)">
                  <el-option v-for="(subItem, subIndex) in item.child[0].arr" :key="index + '-' + subIndex" :filter-method="filterMethod"
                    :label="subIndex + 1 + '^' + subItem.result" :value="subIndex + '^' + subItem.result">
                    <span>{{
                      "序号:" +
                      (subIndex + 1) +
                      "," +
                      "结果:" +
                      subItem.result +
                      "," +
                      "厚度:" +
                      subItem.thickness +
                      "," +
                      "时间:" +
                      subItem.mergedDateTime
                    }}</span>
                  </el-option>
                </el-select>
                <el-checkbox-group v-if="!item.child[0].isShowSelect" v-model="item.child[0].getDataIndex1"
                  :max="item.child[0].maxNum">
                  <el-checkbox v-for="(n, j) in item.child[0].arr" :key="index + '-' + j + 'aaaaaa'" :label="j + '^' + n"
                  @change="handleGroupSelect(item.child[0], j, item.child[0].arr.length)" >{{ n }}</el-checkbox>
                </el-checkbox-group>
              </div>
            </td>
          </tr>
          <tr v-for="(m, i) in item.child" v-show="i > 0" :key="index + '-' + i + 'bbbbbbbbbbbbbb'">
            <td>{{ m.name }}</td>
            <td style="text-align: left">
              <!-- 添加容器 div -->
              <div class="data-collection-items">
                <el-select v-if="m.isShowSelect" v-model="m.getDataIndex1" :multiple-limit="m.maxNum" clearable
                  filterable multiple placeholder="请选择">
                  <el-option v-for="(subItem, index1) in m.arr" :key="index + '-' + index1 + 'cccccccc'"
                    :label="index1 + 1 + '^' + subItem.result" :value="index1 + '^' + subItem.result">
                    <span>{{
                      "序号:" +
                      (index1 + 1) +
                      "," +
                      "结果:" +
                      subItem.result +
                      "," +
                      "厚度:" +
                      subItem.thickness +
                      "," +
                      "时间:" +
                      subItem.mergedDateTime
                    }}</span>
                  </el-option>
                </el-select>
                <el-checkbox-group v-if="!m.isShowSelect" v-model="m.getDataIndex1" :max="m.maxNum">
                  <el-checkbox v-for="(n, j) in m.arr" :key="index + '-' + j + 'dddddddd'" :label="j + '^' + n"
                  @change="handleGroupSelect(m, j, m.arr.length)" >{{ n }}</el-checkbox>
                </el-checkbox-group>
              </div>
            </td>
          </tr>
        </template>
      </table>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dataGetDia = false">取 消</el-button>
      <el-button :loading="getDataIndexLoading" type="primary" @click="submitDataGet()">确 定</el-button>
    </span>
  </el-dialog>
                  <el-select
                    v-if="item.child[0].isShowSelect"
                    v-model="item.child[0].getDataIndex1"
                    :multiple-limit="item.child[0].maxNum"
                    clearable
                    filterable
                    multiple
                    placeholder="请选择"
                    @change="setData(item)"
                  >
                    <el-option
                      v-for="(subItem, subIndex) in item.child[0].arr"
                      :key="index + '-' + subIndex"
                      :filter-method="filterMethod"
                      :label="subIndex + 1 + '^' + subItem.result"
                      :value="subIndex + '^' + subItem.result"
                    >
                      <span>{{
                        "序号:" +
                        (subIndex + 1) +
                        "," +
                        "结果:" +
                        subItem.result +
                        "," +
                        "厚度:" +
                        subItem.thickness +
                        "," +
                        "时间:" +
                        subItem.mergedDateTime
                      }}</span>
                    </el-option>
                  </el-select>
                  <el-checkbox-group
                    v-if="!item.child[0].isShowSelect"
                    v-model="item.child[0].getDataIndex1"
                    :max="item.child[0].maxNum"
                  >
                    <el-checkbox
                      v-for="(n, j) in item.child[0].arr"
                      :key="index + '-' + j + 'aaaaaa'"
                      :label="j + '^' + n"
                      @change="
                        handleGroupSelect(
                          item.child[0],
                          j,
                          item.child[0].arr.length
                        )
                      "
                      >{{ n }}</el-checkbox
                    >
                  </el-checkbox-group>
                </div>
              </td>
            </tr>
            <tr
              v-for="(m, i) in item.child"
              v-show="i > 0"
              :key="index + '-' + i + 'bbbbbbbbbbbbbb'"
            >
              <td>{{ m.name }}</td>
              <td style="text-align: left">
                <!-- 添加容器 div -->
                <div class="data-collection-items">
                  <el-select
                    v-if="m.isShowSelect"
                    v-model="m.getDataIndex1"
                    :multiple-limit="m.maxNum"
                    clearable
                    filterable
                    multiple
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="(subItem, index1) in m.arr"
                      :key="index + '-' + index1 + 'cccccccc'"
                      :label="index1 + 1 + '^' + subItem.result"
                      :value="index1 + '^' + subItem.result"
                    >
                      <span>{{
                        "序号:" +
                        (index1 + 1) +
                        "," +
                        "结果:" +
                        subItem.result +
                        "," +
                        "厚度:" +
                        subItem.thickness +
                        "," +
                        "时间:" +
                        subItem.mergedDateTime
                      }}</span>
                    </el-option>
                  </el-select>
                  <el-checkbox-group
                    v-if="!m.isShowSelect"
                    v-model="m.getDataIndex1"
                    :max="m.maxNum"
                  >
                    <el-checkbox
                      v-for="(n, j) in m.arr"
                      :key="index + '-' + j + 'dddddddd'"
                      :label="j + '^' + n"
                      @change="handleGroupSelect(m, j, m.arr.length)"
                      >{{ n }}</el-checkbox
                    >
                  </el-checkbox-group>
                </div>
              </td>
            </tr>
          </template>
        </table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dataGetDia = false">取 消</el-button>
        <el-button
          :loading="getDataIndexLoading"
          type="primary"
          @click="submitDataGet()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog :close-on-click-modal="false" :visible.sync="addCheck" title="指定报告审核人员" width="400px"
      @close="closeAddVerifyDia">
      <div class="body" style="display: flex; padding: 10px; align-items: center">
    <el-dialog
      :close-on-click-modal="false"
      :visible.sync="addCheck"
      title="指定报告审核人员"
      width="400px"
      @close="closeAddVerifyDia"
    >
      <div
        class="body"
        style="display: flex; padding: 10px; align-items: center"
      >
        <div class="search_label" style="width: 150px">
          <span class="required-span">*</span>审核人:
        </div>
        <div class="search_input" style="width: 100%">
          <el-select v-model="checkUser" clearable filterable placeholder="请选择" size="small" style="width: 100%">
            <el-option v-for="(item, i) in personList" :key="i" :label="item.label" :value="item.value">
          <el-select
            v-model="checkUser"
            clearable
            filterable
            placeholder="请选择"
            size="small"
            style="width: 100%"
          >
            <el-option
              v-for="(item, i) in personList"
              :key="i"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeAddVerifyDia">取 消</el-button>
        <el-button :loading="reviewLoading" type="primary" @click="upInsReview(1)">确 定</el-button>
        <el-button
          :loading="reviewLoading"
          type="primary"
          @click="upInsReview(1)"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 添加不合格复测弹框-->
    <add-un-pass v-if="addUnPassDialog" ref="addUnPassDialog" :addUnPassDialog="addUnPassDialog"
      @resetAddUnPass="resetAddUnPass"></add-un-pass>
    <add-un-pass
      v-if="addUnPassDialog"
      ref="addUnPassDialog"
      :addUnPassDialog="addUnPassDialog"
      @resetAddUnPass="resetAddUnPass"
    ></add-un-pass>
    <!-- 不合格处理弹框-->
    <UnPassDialog v-if="unPassDialog" ref="unPassDialog" :orderId="orderId" :unPassDialog="unPassDialog"
      @resetForm="resetForm"></UnPassDialog>
    <UnPassDialog
      v-if="unPassDialog"
      ref="unPassDialog"
      :orderId="orderId"
      :unPassDialog="unPassDialog"
      @resetForm="resetForm"
    ></UnPassDialog>
    <!-- 不合格复测弹框-->
    <InspectionWord v-if="unPassCheck" :inspectorList="inspectorList" :orderId="orderId"
                    :cableTag="temCableTag" :repetitionTag="repetitionTag"
      :rawMaterialTag="rawMaterialTag" :sonLaboratory="sonLaboratory" :state="state" :typeSource="typeSource"
      :unPassCheck="unPassCheck" @closeUnPassCheckDialog="closeUnPassCheckDialog" @refreshView="refreshView" />
    <InspectionWord
      v-if="unPassCheck"
      :inspectorList="inspectorList"
      :orderId="orderId"
      :cableTag="temCableTag"
      :repetitionTag="repetitionTag"
      :rawMaterialTag="rawMaterialTag"
      :sonLaboratory="sonLaboratory"
      :state="state"
      :typeSource="typeSource"
      :unPassCheck="unPassCheck"
      @closeUnPassCheckDialog="closeUnPassCheckDialog"
      @refreshView="refreshView"
    />
    <!-- 进货验证弹框-->
    <purchase-verification v-if="purchaseDialog" ref="purchaseDialog" :orderId="orderId"
      :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification>
    <purchase-verification
      v-if="purchaseDialog"
      ref="purchaseDialog"
      :orderId="orderId"
      :purchaseDialog="purchaseDialog"
      @resetPurchaseDialog="resetPurchaseDialog"
    ></purchase-verification>
    <!--查看工时弹框-->
    <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia>
<!--    IFS物料属性编辑弹框-->
    <viewManHourDia
      ref="viewManHourDia"
      @submit="openAddVerifyDia"
    ></viewManHourDia>
    <!--    IFS物料属性编辑弹框-->
    <el-dialog
      title="更新IFS库存物料批次属性"
      :visible.sync="ifsMaterialPropsVisible"
      width="20%">
      <el-form style="width:100%" :model="ifsMaterialPropsForm">
      width="20%"
    >
      <el-form style="width: 100%" :model="ifsMaterialPropsForm">
        <el-form-item label="载具编号(Attr1):">
          <el-input placeholder="载具编号" size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input>
          <el-input
            placeholder="载具编号"
            size="small"
            v-model="ifsMaterialPropsForm.drumNo"
          ></el-input>
        </el-form-item>
        <el-form-item label="起始米标(Attr2):">
          <el-input @blur="validateQuality()" placeholder="起始米标" size="small" v-model="ifsMaterialPropsForm.startMeterMark">
          <el-input
            @blur="validateQuality()"
            placeholder="起始米标"
            size="small"
            v-model="ifsMaterialPropsForm.startMeterMark"
          >
            <span slot="suffix">km</span>
          </el-input>
        </el-form-item>
        <el-form-item label="截止米标(Attr3):">
          <el-input @blur="validateQuality()" placeholder="截止米标" size="small" v-model="ifsMaterialPropsForm.endMeterMark">
          <el-input
            @blur="validateQuality()"
            placeholder="截止米标"
            size="small"
            v-model="ifsMaterialPropsForm.endMeterMark"
          >
            <span slot="suffix">km</span>
          </el-input>
        </el-form-item>
<!--        <el-form-item label="入库长度">-->
<!--          <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>-->
<!--        </el-form-item>-->
        <!--        <el-form-item label="入库长度">-->
        <!--          <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>-->
        <!--        </el-form-item>-->
        <el-form-item label="外护颜色(Attr4):">
          <el-select size="small" v-model="ifsMaterialPropsForm.outerColor">
            <el-option v-for="(item,index) in outerColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
            <el-option
              v-for="(item, index) in outerColorList"
              :label="item.dictLabel"
              :value="item.dictValue"
              :key="index"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="绝缘颜色(Attr5):">
          <el-select size="small" v-model="ifsMaterialPropsForm.insulationColor">
            <el-option v-for="(item,index) in insulationColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
          <el-select
            size="small"
            v-model="ifsMaterialPropsForm.insulationColor"
          >
            <el-option
              v-for="(item, index) in insulationColorList"
              :label="item.dictLabel"
              :value="item.dictValue"
              :key="index"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="印字信息(Attr8):">
          <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="请选择">
            <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option>
          <el-select
            size="small"
            v-model="ifsMaterialPropsForm.letteringInfo"
            placeholder="请选择"
          >
            <el-option
              v-for="(item, index) in letteringInfoList"
              :label="item.dictLabel"
              :value="item.dictValue"
              :key="index"
            ></el-option>
          </el-select>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
    <el-button @click="closePartPropDialog()">取 消</el-button>
    <el-button type="primary" @click="saveOrUpdatePartProp()">确 定</el-button>
  </span>
        <el-button @click="closePartPropDialog()">取 消</el-button>
        <el-button type="primary" @click="saveOrUpdatePartProp()"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
@@ -656,17 +1302,20 @@
  downFile,
  getFileList,
  delfile,
  inspectionOrderDetailsTaskSwitching
  inspectionOrderDetailsTaskSwitching,
} from "@/api/business/inspectionTask.js";
import InspectionWorker from '@/workers/InspectionWorker.worker.js';
import DataWorker from '@/workers/DataWorker.worker.js';
import InspectionWorker from "@/workers/InspectionWorker.worker.js";
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} from "@/api/business/ifsPartProps.js";
import {getDicts} from "@/api/system/dict/data";
import {
  getOneByIfsId,
  saveOrUpdateProps,
} from "@/api/business/ifsPartProps.js";
import { getDicts } from "@/api/system/dict/data";
export default {
  name: 'Inspection',
  name: "Inspection",
  components: {
    viewManHourDia,
    PurchaseVerification,
@@ -681,22 +1330,22 @@
      dialogResolve: null,
      dialogReject: null,
      dialogVisible: false,
      deviceDbTableName: '',
      outerColorList:[],
      insulationColorList:[],
      deviceDbTableName: "",
      outerColorList: [],
      insulationColorList: [],
      letteringInfoList: [],
      ifsMaterialPropsForm:{
        id:null,
      ifsMaterialPropsForm: {
        id: null,
        ifsInventoryId: null,
        drumNo: '', // 载具编号
        startMeterMark: '', // 起始米标
        endMeterMark: '', // 截止米标
        insulationColor: '', // 绝缘颜色
        outerColor: '', // 外护颜色
        inboundLength: '', // 入库长度
        letteringInfo: '', // 印字信息
        drumNo: "", // 载具编号
        startMeterMark: "", // 起始米标
        endMeterMark: "", // 截止米标
        insulationColor: "", // 绝缘颜色
        outerColor: "", // 外护颜色
        inboundLength: "", // 入库长度
        letteringInfo: "", // 印字信息
      },
      ifsMaterialPropsVisible:false,
      ifsMaterialPropsVisible: false,
      sonLaboratory: null,
      orderId: null,
      state: null,
@@ -827,14 +1476,16 @@
      tableData: [],
      column: [
        {
          label: "类型", prop: "type", dataType: "tag",
          label: "类型",
          prop: "type",
          dataType: "tag",
          formatData: (params) => {
            if (params == 1) {
              return '图片'
              return "图片";
            } else {
              return '文件'
              return "文件";
            }
          }
          },
        },
        { label: "附件名称", prop: "fileName" },
        { label: "上传人", prop: "name" },
@@ -873,28 +1524,32 @@
      // 任务切换列表--开始
      tableData0: [],
      column0: [
        { label: "委托编号", prop: "entrustCode", width: '160px' },
        { label: "检验对象", prop: "sampleType", width: '140px' },
        { label: "委托编号", prop: "entrustCode", width: "160px" },
        { label: "检验对象", prop: "sampleType", width: "140px" },
        {
          label: "紧急程度", prop: "type", dataType: "tag",
          label: "紧急程度",
          prop: "type",
          dataType: "tag",
          formatData: (params) => {
            return this.urgentList.find(m => m.value == params).label
            return this.urgentList.find((m) => m.value == params).label;
          },
          formatType: (params) => {
            return this.urgentList.find(m => m.value == params).type
          }
            return this.urgentList.find((m) => m.value == params).type;
          },
        },
        {
          label: "状态", prop: "insState", dataType: "tag",
          label: "状态",
          prop: "insState",
          dataType: "tag",
          formatData: (params) => {
            return this.typeList.find(m => m.value == params).label
            return this.typeList.find((m) => m.value == params).label;
          },
          formatType: (params) => {
            return this.typeList.find(m => m.value == params).type
          }
            return this.typeList.find((m) => m.value == params).type;
          },
        },
        { label: "约定时间", prop: "appointed", width: '140px' },
        { label: "下发时间", prop: "sendTime", width: '140px' },
        { label: "约定时间", prop: "appointed", width: "140px" },
        { label: "下发时间", prop: "sendTime", width: "140px" },
      ],
      page0: {
        total: 0,
@@ -914,7 +1569,7 @@
    },
  },
  created() {
    let { sonLaboratory, orderId, state, inspectorList, typeSource,isSplit } =
    let { sonLaboratory, orderId, state, inspectorList, typeSource, isSplit } =
      this.$route.query;
    this.sonLaboratory = sonLaboratory;
    this.orderId = orderId;
@@ -945,7 +1600,7 @@
  watch: {
    // 监听任务id,获取任务信息
    id(val) {
      this.refreshView()
      this.refreshView();
    },
    // 监听当前模板变化
    currentTable(val1, val0) {
@@ -1005,7 +1660,7 @@
    // 特殊检验项--监听设备信息改变
    equipForm: {
      deep: true,
      handler(val) { },
      handler(val) {},
    },
  },
  beforeDestroy() {
@@ -1013,87 +1668,99 @@
    this.stopWorker();
  },
  methods: {
    validateQuality(){
      let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark));
    validateQuality() {
      let inboundLength = Number(
        this.calcInbondLength(
          this.ifsMaterialPropsForm.startMeterMark,
          this.ifsMaterialPropsForm.endMeterMark
        )
      );
      let testQuantity = Number(this.insOrder.testQuantity);
      if(inboundLength!=null && testQuantity!==inboundLength){
        this.$message.warning(`入库长度(${inboundLength}km)与检验数量(${testQuantity}km)不符,请确认!`);
      if (inboundLength != null && testQuantity !== inboundLength) {
        this.$message.warning(
          `入库长度(${inboundLength}km)与检验数量(${testQuantity}km)不符,请确认!`
        );
      }
    },
    calcInbondLength(startMeterMark,endMeterMark){
    calcInbondLength(startMeterMark, endMeterMark) {
      let inboundLength = null;
      if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){
      if (
        startMeterMark != null &&
        startMeterMark !== "" &&
        endMeterMark != null &&
        endMeterMark !== ""
      ) {
        let minus = this.$Big(endMeterMark).minus(this.$Big(startMeterMark));
        inboundLength = Math.abs(minus)
        inboundLength = Math.abs(minus);
      }
      return inboundLength;
    },
    getLetteringInfoDicts(){
      getDicts("lettering_info_type").then(res=>{
        if(res.code==200){
          this.letteringInfoList = res.data
    getLetteringInfoDicts() {
      getDicts("lettering_info_type").then((res) => {
        if (res.code == 200) {
          this.letteringInfoList = res.data;
        }
      })
      });
    },
    getInsulationColorDicts(){
      getDicts("insulation_color_type").then(res=>{
        if(res.code==200){
          this.insulationColorList = res.data
    getInsulationColorDicts() {
      getDicts("insulation_color_type").then((res) => {
        if (res.code == 200) {
          this.insulationColorList = res.data;
        }
      })
      });
    },
    getOuterColorDicts(){
      getDicts("outer_color_type").then(res=>{
        if(res.code==200){
          this.outerColorList = res.data
    getOuterColorDicts() {
      getDicts("outer_color_type").then((res) => {
        if (res.code == 200) {
          this.outerColorList = res.data;
        }
      })
      });
    },
    closePartPropDialog(){
    closePartPropDialog() {
      this.ifsMaterialPropsForm = {
        id:null,
        id: null,
        ifsInventoryId: null,
        drumNo: '', // 载具编号
        startMeterMark: '', // 起始米标
        endMeterMark: '', // 截止米标
        insulationColor: '', // 绝缘颜色
        outerColor: '', // 外护颜色
        inboundLength: '', // 入库长度
        letteringInfo: '', // 印字信息
      }
        drumNo: "", // 载具编号
        startMeterMark: "", // 起始米标
        endMeterMark: "", // 截止米标
        insulationColor: "", // 绝缘颜色
        outerColor: "", // 外护颜色
        inboundLength: "", // 入库长度
        letteringInfo: "", // 印字信息
      };
      this.ifsMaterialPropsVisible = false;
    },
    getPartProps(ifsId){
      getOneByIfsId(ifsId).then((res)=>{
        if(res.code==200 && res.data){
    getPartProps(ifsId) {
      getOneByIfsId(ifsId).then((res) => {
        if (res.code == 200 && res.data) {
          this.ifsMaterialPropsForm = res.data;
        }
      })
      });
    },
    saveOrUpdatePartProp(){
      this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId
    saveOrUpdatePartProp() {
      this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId;
      saveOrUpdateProps({
        ...this.ifsMaterialPropsForm,
        partNo: this.insOrder.partNo,
        lotBatchNo: this.insOrder.lotBatchNo,
        contract: this.insOrder.contract
      }).then((res)=>{
        if(res.code==200){
        contract: this.insOrder.contract,
      }).then((res) => {
        if (res.code == 200) {
          this.$message.success("保存成功");
          this.ifsMaterialPropsVisible = false;
          this.refreshView()
          this.refreshView();
        }
      })
      });
    },
    //打开IFS物料属性弹框
    showMaterialPropsDialog(){
      this.getPartProps(this.insOrder.ifsInventoryId)
      this.getOuterColorDicts()
      this.getInsulationColorDicts()
      this.getLetteringInfoDicts()
      this.$nextTick(()=>{
    showMaterialPropsDialog() {
      this.getPartProps(this.insOrder.ifsInventoryId);
      this.getOuterColorDicts();
      this.getInsulationColorDicts();
      this.getLetteringInfoDicts();
      this.$nextTick(() => {
        this.ifsMaterialPropsVisible = true;
      })
      });
    },
    // 文件管理--开始
    getList() {
@@ -1122,19 +1789,21 @@
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(() => {
        delfile({ id: row.id }).then((res) => {
          this.$message.success("删除成功");
          this.getList();
        });
      }).catch(() => { });
      })
        .then(() => {
          delfile({ id: row.id }).then((res) => {
            this.$message.success("删除成功");
            this.getList();
          });
        })
        .catch(() => {});
    },
    // 文件管理--结束
    // 处理整组勾选逻辑的方法
    handleGroupSelect(childItem, clickedIndex, groupSize = 5) {
      if(groupSize == 6){
      if (groupSize == 6) {
        groupSize = 6;
      }else{
      } else {
        groupSize = 5;
      }
      // 计算所在组的起始索引
@@ -1142,15 +1811,23 @@
      // 清空当前已选
      childItem.getDataIndex1 = [];
      // 遍历当前组的 groupSize 个元素,添加到选中列表
      for (let i = groupStartIndex; i < groupStartIndex + groupSize && i < childItem.arr.length; i++) {
        childItem.getDataIndex1.push(i + '^' + childItem.arr[i]);
      for (
        let i = groupStartIndex;
        i < groupStartIndex + groupSize && i < childItem.arr.length;
        i++
      ) {
        childItem.getDataIndex1.push(i + "^" + childItem.arr[i]);
      }
    },
    // 任务切换--开始
    getList0() {
      this.tableLoading0 = true;
      let param = { userId: this.userId, sonLaboratory: this.sonLaboratory, ...this.page0 };
      let param = {
        userId: this.userId,
        sonLaboratory: this.sonLaboratory,
        ...this.page0,
      };
      delete param.total;
      inspectionOrderDetailsTaskSwitching({ ...param })
        .then((res) => {
@@ -1177,12 +1854,12 @@
        laboratory: this.sonLaboratory,
      }).then(async (res) => {
        this.insOrder = res.data.insOrder;
        if(res.data.insOrder.ifsOrderType==='02wg'){
        if (res.data.insOrder.ifsOrderType === "02wg") {
          //查询零件属性
          this.getPartProps(res.data.insOrder.ifsInventoryId)
          this.getPartProps(res.data.insOrder.ifsInventoryId);
        }
        this.supplierDensity = res.data.supplierDensity;
        this.getList()
        this.getList();
        this.urgentList.forEach((m) => {
          if (m.value == this.insOrder.type) {
            this.insOrder.typeName = m.label;
@@ -1333,7 +2010,7 @@
    },
    openDialog() {
      this.dialogVisible = true;
      this.deviceDbTableName = ''; // 重置表单
      this.deviceDbTableName = ""; // 重置表单
      // 返回 Promise,等待用户操作
      return new Promise((resolve, reject) => {
        this.dialogResolve = resolve;
@@ -1350,7 +2027,7 @@
    // 弹框取消/关闭
    handleDialogCancel() {
      console.log(111)
      console.log(111);
      this.dialogVisible = false;
      // 调用 reject,终止后续代码
      this.dialogReject();
@@ -1358,56 +2035,58 @@
    // 数据采集
    async getDataAcquisitionDevice() {
      //过滤选中的设备列表
    let deviceList = []
    for (let item in this.param){
      let val1 = this.param[item]
      for(let item2 in val1){
        if(item2==='equipName'){
          let equipName = val1[item2]
          equipName.forEach(item=>{
            if(item.v.v && Array.isArray(item.v.v)){
              deviceList.push(...item.v.v)
      let deviceList = [];
      for (let item in this.param) {
        let val1 = this.param[item];
        for (let item2 in val1) {
          if (item2 === "equipName") {
            let equipName = val1[item2];
            equipName.forEach((item) => {
              if (item.v.v && Array.isArray(item.v.v)) {
                deviceList.push(...item.v.v);
              }
            });
          }
        }
      }
      //数组去重
      let deviceSetList = [...new Set(deviceList)];
      try {
        if (deviceSetList.includes("NS-YL3141") && !this.deviceDbTableName) {
          await this.openDialog();
        }
        let itemIds = [];
        this.currentSample.insProduct.forEach((item) => {
          if (item.inspectionItemType === "1") {
            itemIds.push(item.id);
          }
        });
        const params = {
          entrustCode: this.insOrder.entrustCode,
          lotBatchNo: this.insOrder.lotBatchNo,
          sampleCode: this.currentSample.sampleCode,
          id: this.currentSample.id,
          itemIds: itemIds,
          dbTable: this.deviceDbTableName,
        };
        this.dataAcquisitionLoading = true;
        dataCollection(params)
          .then((res) => {
            this.dataAcquisitionLoading = false;
            if (res.code != 200) {
              return;
            }
            this.dataAcquisitionInfoNew = this.HaveJson(res.data);
            // 对数采回来的值进行处理
            this.handleDataAcquisition(res.data);
          })
        }
          .catch((err) => {
            this.dataAcquisitionLoading = false;
          });
      } catch (error) {
        console.error("数据采集设备列表处理失败", error);
      }
    }
    //数组去重
    let deviceSetList = [...new Set(deviceList)]
    try{
      if(deviceSetList.includes('NS-YL3141') && !this.deviceDbTableName){
        await this.openDialog();
      }
      let itemIds = [];
      this.currentSample.insProduct.forEach((item) => {
        if (item.inspectionItemType === "1") {
          itemIds.push(item.id);
        }
      });
      const params = {
        entrustCode: this.insOrder.entrustCode,
        lotBatchNo: this.insOrder.lotBatchNo,
        sampleCode: this.currentSample.sampleCode,
        id: this.currentSample.id,
        itemIds: itemIds,
        dbTable: this.deviceDbTableName,
      };
      this.dataAcquisitionLoading = true;
      dataCollection(params).then((res) => {
        this.dataAcquisitionLoading = false;
        if (res.code != 200) {
          return;
        }
        this.dataAcquisitionInfoNew = this.HaveJson(res.data);
        // 对数采回来的值进行处理
        this.handleDataAcquisition(res.data);
      }).catch(err => {
        this.dataAcquisitionLoading = false;
      });
    }catch (error){
      console.error('数据采集设备列表处理失败',error)
    }
  },
    },
    objectOrder(obj) {
      let newkey = Object.keys(obj).sort();
      let newObj = {};
@@ -1534,10 +2213,10 @@
              } else {
                str0 = i + "," + j;
              }
            };
            }
            let list = this.tableList[0].arr;
            let maxNum = 0;
            let itemNum = 0;//包含检验值批注的个数
            let itemNum = 0; //包含检验值批注的个数
            list.forEach((item, index) => {
              let num0 = 0;
              let str = "";
@@ -1576,14 +2255,14 @@
                    ) {
                      num++;
                      const matchArray = n.v.ps.value.match(/\d+/g);
                      if(matchArray){
                      if (matchArray) {
                        const no = Number(matchArray[0]);
                        itemNum = itemNum>= no ? itemNum : no;
                        itemNum = itemNum >= no ? itemNum : no;
                      }
                    }
                  });
                  if (str0 == str) {
                    maxNum = num===itemNum ? num : itemNum;
                    maxNum = num === itemNum ? num : itemNum;
                  }
                }
                // 绑定设备
@@ -1818,9 +2497,9 @@
        id: id,
        type: type,
        laboratory: this.sonLaboratory,
        cableTag: (cableTag ? cableTag : this.temCableTag),
        cableTag: cableTag ? cableTag : this.temCableTag,
        rawMaterialTag: this.rawMaterialTag,
        repetitionTag: this.repetitionTag
        repetitionTag: this.repetitionTag,
      });
      this.tableLoading = false;
      if (res.data.length > 0) {
@@ -2138,21 +2817,24 @@
                let inspectionItemClass =
                  this.currentSample.insProduct[i].inspectionItemClass ==
                    null ||
                    this.currentSample.insProduct[i].inspectionItemClass ==
                  this.currentSample.insProduct[i].inspectionItemClass ==
                    undefined
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItemClass;
                inspectionItemClass = inspectionItemClass.replace(/[\n\r\s]*/g, "");
                inspectionItemClass = inspectionItemClass.replace(
                  /[\n\r\s]*/g,
                  ""
                );
                let inspectionItem =
                  this.currentSample.insProduct[i].inspectionItem == null ||
                    this.currentSample.insProduct[i].inspectionItem == undefined
                  this.currentSample.insProduct[i].inspectionItem == undefined
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItem;
                inspectionItem = inspectionItem.replace(/[\n\r\s]*/g, "");
                let inspectionItemSubclass =
                  this.currentSample.insProduct[i].inspectionItemSubclass ==
                    null ||
                    this.currentSample.insProduct[i].inspectionItemSubclass ==
                  this.currentSample.insProduct[i].inspectionItemSubclass ==
                    undefined
                    ? ""
                    : this.currentSample.insProduct[i].inspectionItemSubclass;
@@ -2167,17 +2849,17 @@
                    (this.currentSample.insProduct[i].templateId ===
                      a.templateId &&
                      inspectionItemClass +
                      inspectionItem +
                      inspectionItemSubclass +
                      unit ===
                      str2) ||
                        inspectionItem +
                        inspectionItemSubclass +
                        unit ===
                        str2) ||
                    (this.currentSample.insProduct[i].templateId ===
                      a.templateId &&
                      !unit2.includes("/") &&
                      inspectionItemClass +
                      inspectionItem +
                      inspectionItemSubclass ===
                      str)
                        inspectionItem +
                        inspectionItemSubclass ===
                        str)
                  ) {
                    ids.push({
                      r: b.r,
@@ -2188,16 +2870,17 @@
                  }
                } else {
                  // 如果相等,那么说明找到了,并且把id存起来,后续检验项也会在页面中显示出来
                  let aa = inspectionItemClass +
                  let aa =
                    inspectionItemClass +
                    inspectionItem +
                    inspectionItemSubclass;
                  if (
                    this.currentSample.insProduct[i].templateId ===
                    a.templateId &&
                      a.templateId &&
                    inspectionItemClass +
                    inspectionItem +
                    inspectionItemSubclass ===
                    str
                      inspectionItem +
                      inspectionItemSubclass ===
                      str
                  ) {
                    ids.push({
                      r: b.r,
@@ -2340,9 +3023,10 @@
              this.param[b.i].insResult = b;
              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
                    }${finalList[i].r + 1})`;
                  b.v.f = `(${
                    this.comparisonList.find((j) => j.value == finalList[i].c)
                      .label
                  }${finalList[i].r + 1})`;
                }
              });
            }
@@ -2354,7 +3038,7 @@
          }
        });
        // 以下是样式处理逻辑
        set = [...set]
        set = [...set];
        // set = set.sort();
        set.forEach((b) => {
          let arr = [];
@@ -2398,7 +3082,7 @@
              );
            }
          }
        } catch (e) { }
        } catch (e) {}
        try {
          // 检验值赋值
          let insValue = JSON.parse(a.insProductResult.insValue);
@@ -2423,7 +3107,7 @@
              // this.param[a.id].insValue[i].u = insValue[i].u
            }
          }
        } catch (e) { }
        } catch (e) {}
        try {
          // 设备编号赋值
          let equipValue = JSON.parse(a.insProductResult.equipValue);
@@ -2431,7 +3115,7 @@
            // 普通设备赋值
            this.param[a.id].equipValue[i].v.v = equipValue[i].v;
          }
        } catch (e) { }
        } catch (e) {}
        try {
          // 设备名称赋值
          let equipName = JSON.parse(a.insProductResult.equipName);
@@ -2462,7 +3146,7 @@
          );
          // 结论赋值
          this.param[a.id].insResult.v.v = a.insResult;
        } catch (e) { }
        } catch (e) {}
      });
      // 对excel函数进行处理
      this.handleExcelMethod();
@@ -2677,13 +3361,13 @@
      let str = v.v
        ? v.v
        : v.v === 0
          ? v.v
          : v.ct && v.ct.s
            ? v.ct.s.length > 0 &&
            v.ct.s[0].v
              .replace(new RegExp("\n", "g"), "<br/>")
              .replace(new RegExp("@", "g"), "<br/>")
            : "";
        ? v.v
        : v.ct && v.ct.s
        ? v.ct.s.length > 0 &&
          v.ct.s[0].v
            .replace(new RegExp("\n", "g"), "<br/>")
            .replace(new RegExp("@", "g"), "<br/>")
        : "";
      // 对数据保留小数点进行处理
      if (v.ct && v.ct.fa && v.ct.fa.includes(".") && str) {
        let num = 0;
@@ -2764,15 +3448,16 @@
    getEquipOptions(e, id) {
      if (e) {
        this.equipOptions = [];
        search({ status: 0 }).then((res) => {
          if (res.code === 200 && res.data) {
            this.equipOptions = res.data.map((m) => {
              m.value = m.managementNumber;
              m.label = m.deviceName;
              return m;
            });
          }
        })
        search({ status: 0 })
          .then((res) => {
            if (res.code === 200 && res.data) {
              this.equipOptions = res.data.map((m) => {
                m.value = m.managementNumber;
                m.label = m.deviceName;
                return m;
              });
            }
          })
          .catch((error) => {
            console.error(error);
          });
@@ -2803,14 +3488,15 @@
          laboratory: this.sonLaboratory,
          tell: null,
          userId: this.checkUser,
        }).then((res) => {
          if (res.code === 200) {
            this.$message.success("操作成功");
            this.goback();
            this.addCheck = false;
          }
          this.reviewLoading = false;
        })
          .then((res) => {
            if (res.code === 200) {
              this.$message.success("操作成功");
              this.goback();
              this.addCheck = false;
            }
            this.reviewLoading = false;
          })
          .catch((error) => {
            console.error(error);
            this.reviewLoading = false;
@@ -2828,13 +3514,14 @@
          type: 0,
          laboratory: this.sonLaboratory,
          tell: this.noReason,
        }).then((res) => {
          if (res.code === 200) {
            this.$message.success("操作成功");
            this.goback();
          }
          this.reviewLoading = false;
        })
          .then((res) => {
            if (res.code === 200) {
              this.$message.success("操作成功");
              this.goback();
            }
            this.reviewLoading = false;
          })
          .catch((error) => {
            console.error(error);
            this.reviewLoading = false;
@@ -2850,21 +3537,22 @@
    openAddVerifyDia() {
      this.addVerifyDia = true;
    },
    confirmSubmit(registerInsResults){
    confirmSubmit(registerInsResults) {
      submitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
        verifyUser: this.verifyUser,
        entrustCode: this.insOrder.entrustCode,
        registerInsResults: registerInsResults
      }).then((res) => {
        if (res.code === 200) {
          this.$message.success("操作成功");
          this.goback();
          this.submitLoading = false;
          this.addVerifyDia = false;
        }
        registerInsResults: registerInsResults,
      })
        .then((res) => {
          if (res.code === 200) {
            this.$message.success("操作成功");
            this.goback();
            this.submitLoading = false;
            this.addVerifyDia = false;
          }
        })
        .catch((error) => {
          console.error(error);
          this.submitLoading = false;
@@ -2875,15 +3563,18 @@
        this.$message.error("请指定复核人员");
        return;
      }
      if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') {
      if (!this.otherForm.humidity && this.insOrder.ifsOrderType !== "02wg") {
        this.$message.error("请输入湿度");
        return;
      }
      if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') {
      if (
        !this.otherForm.temperature &&
        this.insOrder.ifsOrderType !== "02wg"
      ) {
        this.$message.error("请输入温度");
        return;
      }
      if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') {
      if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType === "02wg") {
        this.$message.error("请填写IFS库存物料批次属性");
        return;
      }
@@ -2891,67 +3582,75 @@
      checkSubmitPlan({
        orderId: this.orderId,
        laboratory: this.sonLaboratory,
      }).then((res) => {
        if (res.code === 200) {
          if (!res.data || res.data.errorMsg.length == 0) {
            this.submitLoading = true;
            //检验类型为原材料
            if(this.typeSource==1 && res.data.unInsOrderCount==0 && this.isSplit==1){
              const htmlStr = "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。"
              this.$confirm(htmlStr, '提示', {
                confirmButtonText: '是',
                cancelButtonText: '否',
                type: 'warning',
                dangerouslyUseHTMLString: true
              }).then(() => {
                this.confirmSubmit(true)
              }).catch(() => {
                this.confirmSubmit(false)
              });
            }else{
              this.confirmSubmit(true)
            }
          } else {
            let newData = [];
            const h = this.$createElement;
            for (let i in res.data.errorMsg) {
              const lastChar = res.data.errorMsg[i].slice(-1);
              if (lastChar == "-") {
                res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
      })
        .then((res) => {
          if (res.code === 200) {
            if (!res.data || res.data.errorMsg.length == 0) {
              this.submitLoading = true;
              //检验类型为原材料
              if (
                this.typeSource == 1 &&
                res.data.unInsOrderCount == 0 &&
                this.isSplit == 1
              ) {
                const htmlStr =
                  "是否登记IFS采购检验结果并移库?该操作会登记<span style='color:#ff4949'>同一零件同一订单的所有拆分批次</span>,请谨慎选择。";
                this.$confirm(htmlStr, "提示", {
                  confirmButtonText: "是",
                  cancelButtonText: "否",
                  type: "warning",
                  dangerouslyUseHTMLString: true,
                })
                  .then(() => {
                    this.confirmSubmit(true);
                  })
                  .catch(() => {
                    this.confirmSubmit(false);
                  });
              } else {
                this.confirmSubmit(true);
              }
            } else {
              let newData = [];
              const h = this.$createElement;
              for (let i in res.data.errorMsg) {
                const lastChar = res.data.errorMsg[i].slice(-1);
                if (lastChar == "-") {
                  res.data.errorMsg[i] = res.data.errorMsg[i].slice(0, -1);
                }
                newData.push(
                  h(
                    "p",
                    { style: "font-size: 14px;color: red;" },
                    Number(i) + 1 + "、" + res.data.errorMsg[i]
                  )
                );
              }
              newData.push(
                h(
                  "p",
                  { style: "font-size: 14px;color: red;" },
                  Number(i) + 1 + "、" + res.data.errorMsg[i]
                  {
                    style:
                      "font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh",
                  },
                  "以上项目不合格,确定提交?"
                )
              );
            }
            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.submitLoading = true;
                this.confirmSubmit(false)
              this.$confirm("提示", {
                title: "提示",
                message: h("div", null, newData),
                confirmButtonText: "确定",
                cancelButtonText: "取消",
                type: "",
              })
              .catch(() => { });
                .then(() => {
                  this.submitLoading = true;
                  this.confirmSubmit(false);
                })
                .catch(() => {});
            }
          }
        }
      })
        })
        .catch((error) => {
          console.error(error);
          this.submitLoading = false;
@@ -2968,13 +3667,13 @@
          } else {
            param = this.param;
          }
          let isNoTestValue = ''
          let isNoTestValue = "";
          for (let key in param) {
            if (param[key]) {
              if (param[key].insValue?.length === 0) {
                isNoTestValue = 1
                isNoTestValue = 1;
              } else {
                isNoTestValue = ''
                isNoTestValue = "";
              }
            }
          }
@@ -2984,7 +3683,7 @@
            sampleId: this.currentSample.id,
            orderId: this.orderId,
            sonLaboratory: this.sonLaboratory,
            isNoTestValue: isNoTestValue
            isNoTestValue: isNoTestValue,
          }).then((res) => {
            this.$message.success("已保存");
          });
@@ -3155,10 +3854,11 @@
      this.$refs.upload.clearFiles();
    },
    handleDown(row) {
      downFile({ id: row.id }).then((res) => {
        this.$download.saveAs(res.data.fileUrl, row.fileName)
      })
        .catch((error) => { });
      downFile({ id: row.id })
        .then((res) => {
          this.$download.saveAs(res.data.fileUrl, row.fileName);
        })
        .catch((error) => {});
    },
    /**
     * 将数值v保留ct.fa中'##'后的指定小数位数,并返回格式化后的字符串。
@@ -3181,8 +3881,8 @@
      }
    },
    goback() {
      this.$router.go(-1)
    }
      this.$router.go(-1);
    },
  },
};
</script>
@@ -3339,7 +4039,7 @@
  height: 100%;
}
.table_input>>>.el-input__inner {
.table_input >>> .el-input__inner {
  border-color: rgba(0, 0, 0, 0.5) !important;
}
@@ -3373,19 +4073,19 @@
  opacity: 0.8;
}
>>>input::-webkit-inner-spin-button {
>>> input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  /* 隐藏微调按钮 */
  margin: 0 !important;
  /* 移除微调按钮的边距 */
}
>>>input[type="number"] {
>>> input[type="number"] {
  -moz-appearance: textfield !important;
  /* 针对 Firefox */
}
>>>.el-form-item__content {
>>> .el-form-item__content {
  display: inline-flex;
  align-items: center;
}
@@ -3458,14 +4158,13 @@
  /* 设置最大宽度 */
}
.data-collection-items {
  display: flex;
  flex-wrap: wrap;
}
.data-collection-items .el-select,
.data-collection-items .el-checkbox {
  flex-basis: 20% ;
  flex-basis: 20%;
  box-sizing: border-box;
  padding: 5px 2%;
}
src/views/performance/class/index.vue
@@ -4,131 +4,311 @@
      <div class="search_thing">
        <div class="search_label">选择时间:</div>
        <div class="search_input">
          <el-date-picker v-model="query.year" type="year" size="small" format="yyyy" placeholder="选择年"
            @change="refreshTable()" style="width: 140px" :clearable="false">
          <el-date-picker
            v-model="query.year"
            type="year"
            size="small"
            format="yyyy"
            placeholder="选择年"
            @change="refreshTable()"
            style="width: 140px"
            :clearable="false"
          >
          </el-date-picker>
          <el-select v-model="query.month" clearable placeholder="选择月" style="width: 140px; margin-left: 16px"
            size="small" @change="refreshTable()">
            <el-option v-for="item in monthOptions" :key="item.value" :label="item.label" :value="item.value">
          <el-select
            v-model="query.month"
            clearable
            placeholder="选择月"
            style="width: 140px; margin-left: 16px"
            size="small"
            @change="refreshTable()"
          >
            <el-option
              v-for="item in monthOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
          <el-input v-model="query.userName" placeholder="请输入人员名称" size="small" style="width: 140px; margin: 0 16px"
            clearable @keyup.enter.native="refreshTable()"></el-input>
          <el-select v-model="query.laboratory" placeholder="请选择实验室" style="width: 140px" size="small" clearable
            @change="refreshTable()">
            <el-option v-for="item in laboratory" :key="item.value" :label="item.label" :value="item.value">
          <el-input
            v-model="query.userName"
            placeholder="请输入人员名称"
            size="small"
            style="width: 140px; margin: 0 16px"
            clearable
            @keyup.enter.native="refreshTable()"
          ></el-input>
          <el-select
            v-model="query.laboratory"
            placeholder="请选择实验室"
            style="width: 140px"
            size="small"
            clearable
            @change="refreshTable()"
          >
            <el-option
              v-for="item in laboratory"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </div>
      </div>
      <div class="search_thing" style="padding-left: 30px">
        <el-button size="mini" type="primary" @click="refreshTable()">查 询</el-button>
        <el-button size="mini" type="primary" @click="refreshTable()"
          >查 询</el-button
        >
        <el-button size="mini" @click="refresh()">重置</el-button>
      </div>
      <div class="search_thing btns" style="padding-left: 30px">
        <el-button size="small" type="primary" v-if="checkPermi(['performance:class:time'])"
          @click="configTime">时间配置</el-button>
        <el-button size="small" type="primary" v-if="checkPermi(['performance:class:down'])" @click="handleDown"
          :loading="downLoading">导 出</el-button>
        <el-button size="small" type="primary" @click="schedulingVisible = true"
          v-if="checkPermi(['performance:class:add'])">排 班</el-button>
        <el-button
          size="small"
          type="primary"
          v-if="checkPermi(['performance:class:time'])"
          @click="configTime"
          >时间配置</el-button
        >
        <el-button
          size="small"
          type="primary"
          v-if="checkPermi(['performance:class:down'])"
          @click="handleDown"
          :loading="downLoading"
          >导 出</el-button
        >
        <el-button
          size="small"
          type="primary"
          @click="schedulingVisible = true"
          v-if="checkPermi(['performance:class:add'])"
          >排 班</el-button
        >
      </div>
    </div>
    <div class="center" v-loading="pageLoading">
      <div class="clearfix" style="width: 100%" v-show="query.month">
        <div class="fixed-left">
          <div class="content-title" style="padding-left: 16px; box-sizing: border-box;position: fixed;z-index: 1;background-color: #fff;width:220px">
          <div
            class="content-title"
            style="
              padding-left: 16px;
              box-sizing: border-box;
              position: fixed;
              z-index: 1;
              background-color: #fff;
              width: 220px;
            "
          >
            人员名称
            <span style="color:#ff4949">(人员数量:{{list.length}})</span>
            <span style="color: #ff4949">(人员数量:{{ list.length }})</span>
          </div>
          <div class="content-user" v-for="(item, index) in list">
            <div class="user-pic">
              {{ item.userName ? item.userName.charAt(0) : "" }}
            </div>
            <div class="user-info">
              <p style="
              <p
                style="
                  font-size: 14px;
                  color: #3a7bfa;
                  line-height: 24px;
                  margin: 0;
                ">
                "
              >
                {{ item.userName }}
              </p>
              <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;margin: 0;" v-text="item.monthlyAttendanceStr">
              </p>
              <p
                style="
                  color: #999999;
                  font-size: 12px;
                  transform: scale(0.8) translateX(-20px);
                  white-space: nowrap;
                  width: 150px;
                  margin: 0;
                "
                v-text="item.monthlyAttendanceStr"
              ></p>
              <p style="margin-top: 4px; margin: 0">
                <span style="
                <span
                  style="
                    color: #999999;
                    font-size: 12px;
                    display: inline-block;
                    transform: scale(0.8) translateX(-10px);
                  ">合计出勤: </span><span style="font-size: 16px; color: #ff4902">{{item.monthlyAttendance.totalCount}}天</span>
                  "
                  >合计出勤: </span
                ><span style="font-size: 16px; color: #ff4902"
                  >{{ item.monthlyAttendance.totalCount }}天</span
                >
              </p>
            </div>
          </div>
        </div>
        <div class="scroll-right">
          <div class="content">
            <div class="content-title content-title-right" style="border-bottom: 0;position: fixed;z-index: 1;background-color: #fff;">
              <div class="content-title-item" v-for="(item, index) in weeks" :key="'b' + index">
                <span class="month" style="position: absolute; top: 0px" v-if="item.week == '周日'">{{ item.weekNum
                  }}周</span>
            <div
              class="content-title content-title-right"
              style="
                border-bottom: 0;
                position: fixed;
                z-index: 1;
                background-color: #fff;
              "
            >
              <div
                class="content-title-item"
                v-for="(item, index) in weeks"
                :key="'b' + index"
              >
                <span
                  class="month"
                  style="position: absolute; top: 0px"
                  v-if="item.week == '周日'"
                  >{{ item.weekNum }}周</span
                >
                <p style="height: 26px; position: absolute; bottom: 12px">
                  <span class="day">{{ item.day }}</span>
                  <span class="week">{{ item.week.charAt(1) }}</span>
                </p>
              </div>
            </div>
            <div class="content-body" v-for="(item, index) in list" :key="'c' + index">
              <div class="content-body-item" v-for="(m, i) in item.list" :key="'d' + i"
                :class="{ hoverType: currentUserIndex == index }">
                <el-dropdown trigger="click" placement="bottom" @command="(e) => handleCommand(e, m)"
            <div
              class="content-body"
              v-for="(item, index) in list"
              :key="'c' + index"
            >
              <div
                class="content-body-item"
                v-for="(m, i) in item.list"
                :key="'d' + i"
              >
                <el-dropdown
                  v-if="m"
                  trigger="click"
                  placement="bottom"
                  @command="(e) => handleCommand(e, m)"
                  :disabled="!checkPermi(['performance:class:edit'])"
                  style="width: 100%; height: 100%; cursor: pointer">
                  <el-tooltip :disabled="!m.annotationText" :content="m.annotationText">
                    <el-tag @contextmenu.prevent.native="handleContextMenu(m,$event)" class="work-box" :type="getDictTypeByShift(m.shift)">{{ getShiftByDic(m.shift) }}</el-tag>
                  style="width: 100%; height: 100%; cursor: pointer"
                >
                  <el-tooltip
                    :disabled="m && !m.annotationText"
                    :content="m.annotationText"
                  >
                    <el-tag
                      @contextmenu.prevent.native="handleContextMenu(m, $event)"
                      class="work-box"
                      :type="getDictTypeByShift(m.shift)"
                      >{{ getShiftByDic(m.shift) }}</el-tag
                    >
                  </el-tooltip>
                  <i v-if="m.checkinResult==='success'" class="el-icon-success" style="position: relative;top:-20px;color:#67c23a;"></i>
                  <i v-else-if="m.checkinResult==='fail'" class="el-icon-warning" style="position: relative;top:-20px;color:#f56c6c;"></i>
                  <svg v-if="m.annotationText" style="position: relative;top:-62px;left:31px;" t="1772437700487" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6193" width="12" height="12"><path d="M751.228537 117.332567c-1.023063 7.672974-1.470653 15.601715-1.278829 23.466514l1.278829 41.434062-32.418317 25.768406L473.466862 402.639333l-34.656268 27.494825-42.137418-13.747412a332.495559 332.495559 0 0 0-270.280524 28.965478l193.742604 194.637785 49.107037 49.362802 14.51471 14.642593 193.99837 194.829609a331.21673 331.21673 0 0 0 29.732776-271.559353l-13.747413-42.137418 27.494825-34.656268 194.509902-245.535182 25.768406-32.354375 41.434062 1.278829 4.220136 0.127883c6.522028 0 13.044057-0.44759 19.438202-1.406712l-155.377732-155.24985zM734.539817 0c9.719101 0 19.566085 3.644663 27.111177 11.189754l251.034146 250.650499a38.236989 38.236989 0 0 1-5.946555 59.081903 219.255244 219.255244 0 0 1-119.570518 35.359623c-2.301892 0-4.539843 0-6.841736-0.127882L685.752488 601.689078a413.253615 413.253615 0 0 1-71.742311 388.764038 39.451877 39.451877 0 0 1-58.378547 2.941307l-235.752139-236.775202L64.497325 1012.193211a37.277867 37.277867 0 1 1-52.623816-52.7517l255.510048-255.57399L31.631418 467.092319a39.451877 39.451877 0 0 1 3.197072-58.378548 411.399313 411.399313 0 0 1 258.771063-91.244454c43.480188 0 86.832494 6.905677 128.586263 20.461265l245.407299-194.573843A218.871596 218.871596 0 0 1 702.56909 17.264192a37.981223 37.981223 0 0 1 31.970727-17.264192z" fill="#f56c6c" p-id="6194"></path></svg>
                  <i
                    v-if="m.checkinResult === 'success'"
                    class="el-icon-success"
                    style="position: relative; top: -20px; color: #67c23a"
                  ></i>
                  <i
                    v-else-if="m.checkinResult === 'fail'"
                    class="el-icon-warning"
                    style="position: relative; top: -20px; color: #f56c6c"
                  ></i>
                  <svg
                    v-if="m.annotationText"
                    style="position: relative; top: -62px; left: 31px"
                    t="1772437700487"
                    class="icon"
                    viewBox="0 0 1024 1024"
                    version="1.1"
                    xmlns="http://www.w3.org/2000/svg"
                    p-id="6193"
                    width="12"
                    height="12"
                  >
                    <path
                      d="M751.228537 117.332567c-1.023063 7.672974-1.470653 15.601715-1.278829 23.466514l1.278829 41.434062-32.418317 25.768406L473.466862 402.639333l-34.656268 27.494825-42.137418-13.747412a332.495559 332.495559 0 0 0-270.280524 28.965478l193.742604 194.637785 49.107037 49.362802 14.51471 14.642593 193.99837 194.829609a331.21673 331.21673 0 0 0 29.732776-271.559353l-13.747413-42.137418 27.494825-34.656268 194.509902-245.535182 25.768406-32.354375 41.434062 1.278829 4.220136 0.127883c6.522028 0 13.044057-0.44759 19.438202-1.406712l-155.377732-155.24985zM734.539817 0c9.719101 0 19.566085 3.644663 27.111177 11.189754l251.034146 250.650499a38.236989 38.236989 0 0 1-5.946555 59.081903 219.255244 219.255244 0 0 1-119.570518 35.359623c-2.301892 0-4.539843 0-6.841736-0.127882L685.752488 601.689078a413.253615 413.253615 0 0 1-71.742311 388.764038 39.451877 39.451877 0 0 1-58.378547 2.941307l-235.752139-236.775202L64.497325 1012.193211a37.277867 37.277867 0 1 1-52.623816-52.7517l255.510048-255.57399L31.631418 467.092319a39.451877 39.451877 0 0 1 3.197072-58.378548 411.399313 411.399313 0 0 1 258.771063-91.244454c43.480188 0 86.832494 6.905677 128.586263 20.461265l245.407299-194.573843A218.871596 218.871596 0 0 1 702.56909 17.264192a37.981223 37.981223 0 0 1 31.970727-17.264192z"
                      fill="#f56c6c"
                      p-id="6194"
                    ></path>
                  </svg>
                  <el-dropdown-menu slot="dropdown">
                    <el-dropdown-item v-for="(n, j) in classType" :key="'h' + j" :command="n.dictValue">{{ n.dictLabel
                      }}</el-dropdown-item>
                    <el-dropdown-item
                      v-for="(n, j) in classType"
                      :key="'h' + j"
                      :command="n.dictValue"
                      >{{ n.dictLabel }}</el-dropdown-item
                    >
                  </el-dropdown-menu>
                </el-dropdown>
                <div></div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="clearfix year-table" style="width: 100%" v-show="!query.month">
      <div
        class="clearfix year-table"
        style="width: 100%"
        v-show="!query.month"
      >
        <div class="fixed-left">
          <div class="content-title" style="padding-left: 16px; box-sizing: border-box;position: fixed;z-index: 1;background-color: #fff;width:220px">
          <div
            class="content-title"
            style="
              padding-left: 16px;
              box-sizing: border-box;
              position: fixed;
              z-index: 1;
              background-color: #fff;
              width: 220px;
            "
          >
            人员名称
            <span style="color:#ff4949">(人员数量:{{yearList.length}})</span>
            <span style="color: #ff4949">(人员数量:{{ yearList.length }})</span>
          </div>
          <div class="content-user" v-for="(item, index) in yearList"
            :key="'e' + index">
          <div
            class="content-user"
            v-for="(item, index) in yearList"
            :key="'e' + index"
          >
            <div class="user-pic">
              {{ item.userName ? item.userName.charAt(0) : "" }}
            </div>
            <div class="user-info">
              <p style="
              <p
                style="
                  font-size: 14px;
                  color: #3a7bfa;
                  line-height: 24px;
                  margin: 0;
                ">
                "
              >
                {{ item.userName }}
              </p>
              <p style="color: #999999;font-size: 12px;transform: scale(0.8) translateX(-20px);white-space: nowrap;width: 150px;margin: 0;" v-text="item.sidebarAnnualAttendanceStr"></p>
              <p
                style="
                  color: #999999;
                  font-size: 12px;
                  transform: scale(0.8) translateX(-20px);
                  white-space: nowrap;
                  width: 150px;
                  margin: 0;
                "
                v-text="item.sidebarAnnualAttendanceStr"
              ></p>
              <p style="margin-top: 4px; margin: 0">
                <span style="
                <span
                  style="
                    color: #999999;
                    font-size: 12px;
                    display: inline-block;
                    transform: scale(0.8) translateX(-10px);
                  ">合计出勤: </span><span style="font-size: 16px; color: #ff4902">{{item.sidebarAnnualAttendance.totalCount}}天</span>
                  "
                  >合计出勤: </span
                ><span style="font-size: 16px; color: #ff4902"
                  >{{ item.sidebarAnnualAttendance.totalCount }}天</span
                >
              </p>
            </div>
          </div>
@@ -136,22 +316,47 @@
        <div class="scroll-right">
          <div class="content">
            <div>
              <div class="content-title content-title-right" style="border-bottom: 0; height: 63px;position: fixed;z-index: 1;background-color: #fff;width: calc( 100% - 448px );" :style="`display: grid;
                grid-template-columns: repeat(${monthList.length}, 1fr);`">
                <div class="content-title-item" v-for="(item, index) in monthList" :key="'b' + index"
                  style="height: 52px;">
              <div
                class="content-title content-title-right"
                style="
                  border-bottom: 0;
                  height: 63px;
                  position: fixed;
                  z-index: 1;
                  background-color: #fff;
                  width: calc(100% - 448px);
                "
                :style="`display: grid;
                grid-template-columns: repeat(${monthList.length}, 1fr);`"
              >
                <div
                  class="content-title-item"
                  v-for="(item, index) in monthList"
                  :key="'b' + index"
                  style="height: 52px"
                >
                  <span class="month">{{ item }}月</span>
                </div>
              </div>
              <div class="content-body" v-for="(item, index) in yearList" :key="'c' + index" :style="`display: grid;
              grid-template-columns: repeat(${monthList.length}, 1fr);`">
                <div class="content-body-item" v-for="(m, i) in item.monthlyAttendances" :key="'d' + i"
                  :class="{ hoverType: currentUserIndex == index }">
              <div
                class="content-body"
                v-for="(item, index) in yearList"
                :key="'c' + index"
                :style="`display: grid;
              grid-template-columns: repeat(${monthList.length}, 1fr);`"
              >
                <div
                  class="content-body-item"
                  v-for="(m, i) in item.monthlyAttendances"
                  :key="'d' + i"
                >
                  <p style="color: rgb(153, 153, 153); font-size: 12px">
                    合计出勤:<span style="font-size: 14px; color: #000">{{m.monthlyAttendance.totalCount}}</span>
                    合计出勤:<span style="font-size: 14px; color: #000">{{
                      m.monthlyAttendance.totalCount
                    }}</span>
                  </p>
                  <p style="color: rgb(153, 153, 153); font-size: 12px">
                    <span>{{m.monthlyAttendanceStr}}</span>
                    <span>{{ m.monthlyAttendanceStr }}</span>
                  </p>
                </div>
              </div>
@@ -161,25 +366,43 @@
      </div>
    </div>
    <ul v-show="showMenu"
        class="contextmenu"
        :style="{left:menuX+'px',top:menuY+'px'}"
        @click.stop>
      <li @click="updateAnnotation('edit')"><i class="el-icon-edit-outline"></i> 编辑批注</li>
      <li @click="updateAnnotation('delete')"><i class="el-icon-delete"></i> 删除批注</li>
    <ul
      v-show="showMenu"
      class="contextmenu"
      :style="{ left: menuX + 'px', top: menuY + 'px' }"
      @click.stop
    >
      <li @click="updateAnnotation('edit')">
        <i class="el-icon-edit-outline"></i> 编辑批注
      </li>
      <li @click="updateAnnotation('delete')">
        <i class="el-icon-delete"></i> 删除批注
      </li>
    </ul>
    <el-dialog title="时间配置" :visible.sync="configTimeVisible" width="620px">
      <div v-loading="configTimeVisibleLoading" style="min-height: 200px">
        <div v-for="(item, index) in timeQuery">
          <div class="form" style="display: flex; justify-content: space-between">
          <div
            class="form"
            style="display: flex; justify-content: space-between"
          >
            <div style="margin-bottom: 12px; width: 200px">
              <span class="form_label">班次:</span>
              <span v-if="!item.isEdit"> {{ item.type }} </span>
              <span class="form_input" v-if="item.isEdit">
                <el-select v-model="item.shift" placeholder="请选择" style="width: 70%; margin-right: 8px" clearable
                  size="small">
                  <el-option v-for="obj in timeTypeList" :key="obj.dictValue" :label="obj.dictLabel"
                    :value="obj.dictValue">
                <el-select
                  v-model="item.shift"
                  placeholder="请选择"
                  style="width: 70%; margin-right: 8px"
                  clearable
                  size="small"
                >
                  <el-option
                    v-for="obj in timeTypeList"
                    :key="obj.dictValue"
                    :label="obj.dictLabel"
                    :value="obj.dictValue"
                  >
                  </el-option>
                </el-select>
              </span>
@@ -194,67 +417,114 @@
                }}
              </span>
              <span class="form_input" v-if="item.isEdit">
                <el-time-select placeholder="起始时间" v-model="item.startTime" size="small" :picker-options="{
                  start: '00:00',
                  step: '00:15',
                  end: '24:00',
                }" style="width: 120px">
                </el-time-select>
                <el-time-select style="width: 120px" placeholder="结束时间" v-model="item.endTime" size="small"
                <el-time-select
                  placeholder="起始时间"
                  v-model="item.startTime"
                  size="small"
                  :picker-options="{
                    start: '00:00',
                    step: '00:15',
                    end: '24:00',
                  }">
                  }"
                  style="width: 120px"
                >
                </el-time-select>
                <el-time-select
                  style="width: 120px"
                  placeholder="结束时间"
                  v-model="item.endTime"
                  size="small"
                  :picker-options="{
                    start: '00:00',
                    step: '00:15',
                    end: '24:00',
                  }"
                >
                </el-time-select>
              </span>
            </div>
            <span>
              <i class="el-icon-circle-check" v-if="item.isEdit"
                style="margin-left: 10px; color: #4b79f2; cursor: pointer" @click="saveEdit(item, index)"></i>
              <i class="el-icon-edit" v-if="!item.isEdit" style="margin-left: 10px; color: #4b79f2; cursor: pointer"
                @click="item.isEdit = true"></i>
              <i class="el-icon-delete" v-if="timeQuery.length > 1"
                style="margin-left: 10px; color: #ff4902; cursor: pointer" @click="deleteTime(item, index)"></i>
              <i
                class="el-icon-circle-check"
                v-if="item.isEdit"
                style="margin-left: 10px; color: #4b79f2; cursor: pointer"
                @click="saveEdit(item, index)"
              ></i>
              <i
                class="el-icon-edit"
                v-if="!item.isEdit"
                style="margin-left: 10px; color: #4b79f2; cursor: pointer"
                @click="item.isEdit = true"
              ></i>
              <i
                class="el-icon-delete"
                v-if="timeQuery.length > 1"
                style="margin-left: 10px; color: #ff4902; cursor: pointer"
                @click="deleteTime(item, index)"
              ></i>
            </span>
          </div>
          <el-divider></el-divider>
          <div @click="addTimeForm" style="color: #4b79f2; cursor: pointer" v-if="index === timeQuery.length - 1">
          <div
            @click="addTimeForm"
            style="color: #4b79f2; cursor: pointer"
            v-if="index === timeQuery.length - 1"
          >
            添加时间配置
          </div>
        </div>
        <div @click="addTimeForm" style="color: #4b79f2" v-if="timeQuery.length === 0">
        <div
          @click="addTimeForm"
          style="color: #4b79f2"
          v-if="timeQuery.length === 0"
        >
          添加时间配置
        </div>
      </div>
    </el-dialog>
    <el-dialog title="排班" :visible.sync="schedulingVisible" width="400px">
      <div class="search_thing">
        <div class="search_label" style="width: 90px">
          <span style="color: red; margin-right: 4px">*</span>周次:
        </div>
        <div class="search_input" style="width: calc(100% - 90px)">
          <el-date-picker v-model="schedulingQuery.week" type="week" format="yyyy 第 WW 周" placeholder="选择周次"
            style="width: 100%">
    <el-dialog
      title="排班"
      :visible.sync="schedulingVisible"
      width="20%"
      @close="resetForm"
    >
      <el-form
        ref="schedulingQueryRef"
        :model="schedulingQuery"
        :rules="schedulingQueryRules"
      >
        <el-form-item label="排班时间:" prop="dateRange">
          <el-date-picker
            v-model="schedulingQuery.dateRange"
            type="datetimerange"
            value-format="yyyy-MM-dd HH:mm:ss"
            :default-time="['00:00:00', '23:59:59']"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            style="width: 100%"
          >
          </el-date-picker>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label" style="width: 90px">
          <span style="color: red; margin-right: 4px">*</span>人员名称:
        </div>
        <div class="search_input" style="width: calc(100% - 90px)">
          <el-select v-model="schedulingQuery.userIdList" popper-class="select-with-all" placeholder="请选择" style="width: 100%" multiple collapse-tags clearable>
        </el-form-item>
        <el-form-item label="人员名称:" prop="userIdList">
          <el-select
            v-model="schedulingQuery.userIdList"
            popper-class="select-with-all"
            placeholder="请选择"
            style="width: 100%"
            multiple
            collapse-tags
            clearable
          >
            <template slot="prefix">
              <el-button
                type="text"
                size="mini"
                @click="handleSelectAll"
                style="margin: 4px 0;"
                style="margin: 4px 0"
              >
                {{ isAllSelected ? '取消全选' : '全选' }}
                {{ isAllSelected ? "取消全选" : "全选" }}
              </el-button>
              <el-divider style="margin: 5px 0;" />
              <el-divider style="margin: 5px 0" />
            </template>
            <el-option
              v-for="item in personList"
@@ -263,32 +533,39 @@
              :value="item.id"
            >
              <span style="float: left">{{ item.name }}</span>
              <span style="float: right; color: #8492a6; font-size: 13px">{{ item.account }}</span>
              <span style="float: right; color: #8492a6; font-size: 13px">{{
                item.account
              }}</span>
            </el-option>
          </el-select>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label" style="width: 90px">
          <span style="color: red; margin-right: 4px">*</span>班次:
        </div>
        <div class="search_input" style="width: calc(100% - 90px)">
          <el-select v-model="schedulingQuery.shift" placeholder="请选择" style="width: 100%">
            <el-option v-for="item in classType" :key="item.dictValue" :label="item.dictLabel" :value="item.dictValue">
        </el-form-item>
        <el-form-item label="班次:" prop="shift">
          <el-select
            v-model="schedulingQuery.shift"
            placeholder="请选择"
            style="width: 100%"
          >
            <el-option
              v-for="item in classType"
              :key="item.dictValue"
              :label="item.dictLabel"
              :value="item.dictValue"
            >
            </el-option>
          </el-select>
        </div>
      </div>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="schedulingVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmScheduling" :loading="loading">确 定</el-button>
        <el-button @click="resetForm">取 消</el-button>
        <el-button type="primary" @click="confirmScheduling" :loading="loading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { getYearAndMonthAndDays } from "@/utils/date";
import {
  page,
  pageYear,
@@ -301,20 +578,20 @@
  obtainItemParameterList,
  update,
  editAnnotationText,
  delAnnotationText
  delAnnotationText,
} from "@/api/performance/class";
import {selectUserListByPerformance} from '@/api/system/user'
import {getWorkMonth} from "@/utils/date";
import {transformExcel} from '@/utils/file'
import { selectUserListByPerformance } from "@/api/system/user";
import { getWorkMonth } from "@/utils/date";
import { transformExcel } from "@/utils/file";
export default {
  name: 'Class',
  name: "Class",
  data() {
    return {
      query: {
        userName: "",
        laboratory: "",
        year: new Date(),
        month: getWorkMonth().month()+1,
        month: getWorkMonth().month() + 1,
      },
      monthOptions: [
        {
@@ -374,9 +651,22 @@
      personList: [],
      loading: false,
      schedulingQuery: {
        week: "",
        dateRange: [],
        userIdList: [],
        shift: "",
      },
      schedulingQueryRules: {
        dateRange: {
          required: true,
          message: "请选择排班日期",
          trigger: "change",
        },
        userIdList: {
          required: true,
          message: "请选择人员名称",
          trigger: "change",
        },
        shift: { required: true, message: "请选择班次", trigger: "change" },
      },
      list: [],
      currentPage: 1, // 当前页
@@ -397,16 +687,17 @@
      selectedTarget: null,
    };
  },
  computed:{
  computed: {
    isAllSelected() {
      return this.schedulingQuery.userIdList.length === this.personList.length && this.personList.length > 0;
      return (
        this.schedulingQuery.userIdList.length === this.personList.length &&
        this.personList.length > 0
      );
    },
  },
  watch: {
  },
  watch: {},
  mounted() {
    document.addEventListener('click', this.handleClickOutside)
    document.addEventListener("click", this.handleClickOutside);
    this.selectEnumByCategory();
    this.obtainItemParameterList();
    this.getUsers();
@@ -422,78 +713,89 @@
    this.monthList.reverse();
  },
  destroyed() {
    document.removeEventListener('click', this.handleClickOutside)
    document.removeEventListener("click", this.handleClickOutside);
  },
  methods: {
    resetForm() {
      this.$refs.schedulingQueryRef.resetFields();
      this.$nextTick(() => {
        this.schedulingVisible = false;
      });
    },
    handleSelectAll() {
      if (this.isAllSelected) {
        this.schedulingQuery.userIdList = [];
      } else {
        // 只选中可用选项的value
        this.schedulingQuery.userIdList = this.personList.map(item => item.id);
        this.schedulingQuery.userIdList = this.personList.map(
          (item) => item.id
        );
      }
    },
    handleContextMenu(target,e) {
    handleContextMenu(target, e) {
      // 阻止浏览器默认右键菜单
      e.preventDefault()
      e.preventDefault();
      const menuMinWidth = 105
      const offsetLeft = this.$el.getBoundingClientRect().left // container margin left
      const offsetWidth = this.$el.offsetWidth // container width
      const maxLeft = offsetWidth - menuMinWidth // left boundary
      const left = e.clientX - offsetLeft + 15 // 15: margin right
      const menuMinWidth = 105;
      const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left
      const offsetWidth = this.$el.offsetWidth; // container width
      const maxLeft = offsetWidth - menuMinWidth; // left boundary
      const left = e.clientX - offsetLeft + 15; // 15: margin right
      if (left > maxLeft) {
        this.menuX = maxLeft
        this.menuX = maxLeft;
      } else {
        this.menuX = left
        this.menuX = left;
      }
      this.menuY = e.clientY - 60
      this.menuY = e.clientY - 60;
      // 显示菜单
      this.selectedTarget = target
      this.showMenu = true
      this.selectedTarget = target;
      this.showMenu = true;
    },
    //编辑批注
    updateAnnotation(operation) {
      // 点击菜单后关闭菜单
      this.showMenu = false
      if(this.selectedTarget && !this.selectedTarget.shift){
        this.$message.warning('请先选择班次')
        return
      this.showMenu = false;
      if (this.selectedTarget && !this.selectedTarget.shift) {
        this.$message.warning("请先选择班次");
        return;
      }
      if(operation && operation==='edit'){
        this.$prompt('', '编辑批注', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          inputType:'textarea',
          inputPlaceholder:'填写批注内容',
      if (operation && operation === "edit") {
        this.$prompt("", "编辑批注", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          inputType: "textarea",
          inputPlaceholder: "填写批注内容",
          inputPattern: /^.{0,100}$/,
          inputErrorMessage: '最大输入100个字符'
        }).then(({ value }) => {
          editAnnotationText({
            id:this.selectedTarget.id,
            annotationText:value
          }).then(res=>{
            this.$message.success("提交成功")
            this.refreshTable()
          inputErrorMessage: "最大输入100个字符",
        })
          .then(({ value }) => {
            editAnnotationText({
              id: this.selectedTarget.id,
              annotationText: value,
            }).then((res) => {
              this.$message.success("提交成功");
              this.refreshTable();
            });
          })
        }).catch(() => { });
      }else if(operation && operation==='delete'){
        this.$confirm('是否删除批注内容?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          delAnnotationText(this.selectedTarget.id).then(res=>{
            this.$message.success("删除成功")
            this.refreshTable()
          .catch(() => {});
      } else if (operation && operation === "delete") {
        this.$confirm("是否删除批注内容?", "提示", {
          confirmButtonText: "确定",
          cancelButtonText: "取消",
          type: "warning",
        })
          .then(() => {
            delAnnotationText(this.selectedTarget.id).then((res) => {
              this.$message.success("删除成功");
              this.refreshTable();
            });
          })
        }).catch(() => {});
          .catch(() => {});
      }
    },
    handleClickOutside() {
      this.showMenu = false
      this.showMenu = false;
    },
    getDictTypeByShift(e) {
      let obj = this.classType.find((m) => m.dictValue == e);
@@ -547,22 +849,24 @@
        time: year + "-" + month + "-01 00:00:00",
        userName: this.query.userName,
        laboratory: this.query.laboratory,
      }).then((res) => {
        this.pageLoading = false;
        this.list = res.data.page
        let headerList = res.data.headerList;
        this.weeks = [];
        headerList.forEach((item) => {
          let obj = {
            weekNum: item.weekly,
            week: item.headerTime.split(" ")[1],
            day: item.headerTime.split(" ")[0],
          };
          this.weeks.push(obj);
        });
      }).catch(() => {
        this.pageLoading = false;
      })
        .then((res) => {
          this.pageLoading = false;
          this.list = res.data.page;
          let headerList = res.data.headerList;
          this.weeks = [];
          headerList.forEach((item) => {
            let obj = {
              weekNum: item.weekly,
              week: item.headerTime.split(" ")[1],
              day: item.headerTime.split(" ")[0],
            };
            this.weeks.push(obj);
          });
        })
        .catch(() => {
          this.pageLoading = false;
        });
    },
    initYear() {
      this.pageLoading = true;
@@ -573,53 +877,35 @@
        laboratory: this.query.laboratory,
      }).then((res) => {
        this.pageLoading = false;
        this.yearList = res.data
        this.yearList = res.data;
      });
    },
    confirmScheduling() {
      if (!this.schedulingQuery.week) {
        this.$message.error("请选择周次");
        return;
      }
      let time = this.schedulingQuery.week.getTime();
      let startWeek =
        getYearAndMonthAndDays(new Date(time - 24 * 60 * 60 * 1000)) +
        " 00:00:00";
      let endWeek =
        getYearAndMonthAndDays(new Date(time + 24 * 60 * 60 * 1000 * 5)) +
        " 00:00:00";
      if (
        !this.schedulingQuery.userIdList ||
        this.schedulingQuery.userIdList.length == 0
      ) {
        this.$message.error("请选择人员");
        return;
      }
      if (!this.schedulingQuery.shift) {
        this.$message.error("请选择班次");
        return;
      }
      this.loading = true;
      add({
        startWeek,
        endWeek,
        userIdList: this.schedulingQuery.userIdList,
        shift: this.schedulingQuery.shift,
      })
        .then((res) => {
          this.loading = false;
          this.$message.success("操作成功");
          this.schedulingVisible = false;
          this.schedulingQuery = {
            week: "",
            userIdList: [],
            shift: "",
          };
          this.refresh();
        })
        .catch((err) => {
          this.loading = false;
        });
      this.$refs.schedulingQueryRef.validate((valid) => {
        if (valid) {
          this.loading = true;
          add({
            startTime: this.schedulingQuery.dateRange[0],
            endTime: this.schedulingQuery.dateRange[1],
            userIdList: this.schedulingQuery.userIdList,
            shift: this.schedulingQuery.shift,
          })
            .then((res) => {
              this.loading = false;
              this.$message.success("操作成功");
              this.schedulingVisible = false;
              this.schedulingQuery = {
                week: "",
                userIdList: [],
                shift: "",
              };
              this.refresh();
            })
            .catch((err) => {
              this.loading = false;
            });
        }
      });
    },
    configTime() {
      this.getDicts("sys_class_type").then((response) => {
@@ -829,12 +1115,12 @@
  display: flex;
}
>>>.scroll-pagination {
>>> .scroll-pagination {
  overflow-y: scroll;
  scrollbar-width: none;
}
>>>.scroll-pagination::-webkit-scrollbar {
>>> .scroll-pagination::-webkit-scrollbar {
  display: none;
}
@@ -918,8 +1204,8 @@
  align-items: center;
}
.content-body:nth-child(2){
  padding-top:58px;
.content-body:nth-child(2) {
  padding-top: 58px;
}
.content-body-item {
@@ -950,8 +1236,8 @@
  display: flex;
  align-items: center;
}
.content-user:nth-child(2){
  margin-top:58px;
.content-user:nth-child(2) {
  margin-top: 58px;
}
.user-pic {
  width: 50px;
@@ -968,10 +1254,6 @@
.user-info {
  flex: 1;
  margin-left: 10px;
}
.hoverType {
  background: rgba(58, 123, 250, 0.03);
}
.year-table {
@@ -1018,7 +1300,7 @@
  font-size: 12px;
  font-weight: 400;
  color: #333;
  box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3);
  box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3);
  li {
    margin: 0;
    padding: 7px 16px;
src/views/performance/rewardAndPunishment/index.vue
@@ -197,7 +197,12 @@
      :visible.sync="dialogVisible"
      title="奖惩记录"
      width="50%"
      @open="getUserList"
      @open="
        () => {
          this.getUserList();
          this.getRewardPunishNameList();
        }
      "
    >
      <div style="height: 40vh">
        <el-form ref="form" :model="form" :rules="rules" label-width="120px">
@@ -214,7 +219,7 @@
            <el-col :span="12">
              <el-form-item label="员工姓名" prop="userId">
                <el-select
                  :disabled="form.id"
                  :disabled="form.id == null"
                  v-model="form.userId"
                  placeholder="请选择员工姓名"
                  size="small"
@@ -235,25 +240,31 @@
          <el-row>
            <el-col :span="12">
              <el-form-item label="奖惩名称" prop="rewardPunishName">
                <el-input
                  placeholder="请输入奖惩名称"
                  type="textarea"
                  :rows="1"
                  v-model="form.rewardPunishName"
                <el-select
                  size="small"
                ></el-input>
                  placeholder="请输入奖惩名称"
                  v-model="form.rewardPunishName"
                  style="width: 100%"
                >
                  <el-option
                    :key="index"
                    v-for="(item, index) in rewardPunishNameList"
                    :label="item.dictLabel"
                    :value="item.dictValue"
                  />
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="奖惩时间" prop="rewardPunishTime">
                <el-date-picker
                  v-model="form.rewardPunishTime"
                  format="yyyy-MM-dd"
                  format="yyyy-MM-dd HH:mm:ss"
                  placeholder="选择日期"
                  size="small"
                  style="width: 100%"
                  type="date"
                  value-format="yyyy-MM-dd"
                  type="datetime"
                  value-format="yyyy-MM-dd HH:mm:ss"
                >
                </el-date-picker>
              </el-form-item>
@@ -278,7 +289,6 @@
                  controls-position="right"
                  :precision="2"
                  style="width: 100%"
                  :min="0"
                  v-model="form.rewardPunishSum"
                  size="small"
                  placeholder="请输入奖惩金额"
@@ -318,6 +328,7 @@
} from "@/api/cnas/personal/personRewardPunishmentRecord";
import { selectUserListByPerformance } from "@/api/system/user";
import { transformExcel } from "@/utils/file";
import { getDicts } from "@/api/system/dict/data";
export default {
  data() {
@@ -392,7 +403,7 @@
          {
            required: true,
            message: "请输入奖惩名称",
            trigger: "blur",
            trigger: "change",
          },
        ],
        rewardPunishTime: [
@@ -411,13 +422,21 @@
        ],
      },
      responsibleOptions: [],
      rewardPunishNameList: [],
    };
  },
  mounted() {
    this.getPersonnelTraining();
    this.getUserList();
    this.getRewardPunishNameList();
  },
  methods: {
    getRewardPunishNameList() {
      this.rewardPunishNameList = [];
      getDicts("sys_rewardandpunishment_type").then((res) => {
        this.rewardPunishNameList = res.data;
      });
    },
    refreshTable() {
      this.search.userName = "";
      this.search.searchTimeList = [];
src/views/structural/premises/index.vue
@@ -2,82 +2,190 @@
  <div class="capacity-scope">
    <div class="search">
      <div>
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
        <el-form
          :model="queryParams"
          ref="queryForm"
          size="small"
          :inline="true"
        >
          <el-form-item label="实验室名称" prop="laboratoryName">
            <el-input size="small" placeholder="请输入" clearable v-model="queryParams.laboratoryName"
              @keyup.enter.native="refreshTable"></el-input>
            <el-input
              size="small"
              placeholder="请输入"
              clearable
              v-model="queryParams.laboratoryName"
              @keyup.enter.native="refreshTable"
            ></el-input>
          </el-form-item>
          <el-form-item label="实验室编码" prop="laboratoryNumber">
            <el-input size="small" placeholder="请输入" clearable v-model="queryParams.laboratoryNumber"
              @keyup.enter.native="refreshTable"></el-input>
            <el-input
              size="small"
              placeholder="请输入"
              clearable
              v-model="queryParams.laboratoryNumber"
              @keyup.enter.native="refreshTable"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" size="mini" @click="refreshTable">查询</el-button>
            <el-button type="primary" size="mini" @click="refreshTable"
              >查询</el-button
            >
            <el-button size="mini" @click="refresh">重置</el-button>
          </el-form-item>
        </el-form>
      </div>
      <div>
        <el-button size="small" type="primary" @click="openAdd('add')" icon="el-icon-plus">新增</el-button>
        <el-button
          size="small"
          type="primary"
          @click="openAdd('add')"
          icon="el-icon-plus"
          >新增</el-button
        >
      </div>
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination"
        :page="page" :tableLoading="tableLoading"></lims-table>
      <lims-table
        :tableData="tableData"
        :column="column"
        :height="'calc(100vh - 250px)'"
        @pagination="pagination"
        :page="page"
        :tableLoading="tableLoading"
      ></lims-table>
    </div>
    <!--    新增实验室-->
    <el-dialog :title="formTitle" :visible.sync="addDia" width="450px">
      <el-form ref="laboratoryForm" :model="laboratoryForm" :rules="userRules" label-position="right"
        label-width="100px">
      <el-form
        ref="laboratoryForm"
        :model="laboratoryForm"
        :rules="userRules"
        label-position="right"
        label-width="100px"
      >
        <el-form-item label="实验室名称" prop="laboratoryName">
          <el-input v-model="laboratoryForm.laboratoryName" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.laboratoryName"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="场所编码" prop="laboratoryNumber">
          <el-input v-model="laboratoryForm.laboratoryNumber" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.laboratoryNumber"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="实验室代号" prop="laboratoryCode">
          <el-input v-model="laboratoryForm.laboratoryCode" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.laboratoryCode"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="负责人" prop="head">
          <el-input v-model="laboratoryForm.head" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.head"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="负责人电话" prop="phoneNumber">
          <el-input v-model="laboratoryForm.phoneNumber" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.phoneNumber"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
        <el-form-item label="地址" prop="address">
          <el-input v-model="laboratoryForm.address" size="small" clearable></el-input>
          <el-input
            v-model="laboratoryForm.address"
            size="small"
            clearable
          ></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="reset">取 消</el-button>
        <el-button type="primary" @click="customAdd" :loading="loading">确 定</el-button>
        <el-button type="primary" @click="customAdd" :loading="loading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <el-dialog title="印章管理" :visible.sync="fileVisible" width="60vw">
      <div class="btns">
        <el-button size="medium" type="primary" @click="openUpload">更新印章</el-button>
        <el-button size="medium" type="primary" @click="openUpload"
          >更新印章</el-button
        >
      </div>
      <lims-table :tableData="fileComponentData" :column="fileComponentDataColumn" @pagination="fileComponentPagination"
        height="500px" :page="fileComponentPage" :tableLoading="fileComponentTableLoading"></lims-table>
      <lims-table
        :tableData="fileComponentData"
        :column="fileComponentDataColumn"
        @pagination="fileComponentPagination"
        height="500px"
        :page="fileComponentPage"
        :tableLoading="fileComponentTableLoading"
      ></lims-table>
    </el-dialog>
    <el-dialog title="更新印章" :visible.sync="upFileVisible" width="400px">
      <el-form ref="dataForm" :model="dataForm" :rules="dataFormRules" label-position="right" label-width="80px">
      <el-form
        ref="dataForm"
        :model="dataForm"
        :rules="dataFormRules"
        label-position="right"
        label-width="80px"
      >
        <el-form-item label="所属域" prop="contract">
          <el-select
            v-model="dataForm.contract"
            placeholder="请选择"
            size="small"
            style="width: 100%"
          >
            <el-option label="ZTNS" value="ZTNS" />
            <el-option label="KJNS" value="KJNS" />
          </el-select>
        </el-form-item>
        <el-form-item label="印章类型" prop="type">
          <el-cascader v-model="dataForm.type" :options="options" :show-all-levels="false" :props="props"
            placeholder="请选择" size="small" style="width:100%" collapse-tags clearable></el-cascader>
          <el-cascader
            v-model="dataForm.type"
            :options="options"
            :show-all-levels="false"
            :props="props"
            placeholder="请选择"
            size="small"
            style="width: 100%"
            collapse-tags
            clearable
          ></el-cascader>
        </el-form-item>
        <el-form-item label="印章图片" prop="address">
          <el-upload class="avatar-uploader" :action="action" :headers="uploadHeader"
            accept='image/jpg,image/jpeg,image/png' :show-file-list="false" :on-success="handleSuccess"
            :on-change="beforeUpload" ref="upload" :on-error="onError">
            <img v-if="dataForm.address" :src="javaApi + '/img/' + dataForm.address" class="avatar">
          <el-upload
            class="avatar-uploader"
            :action="action"
            :headers="uploadHeader"
            accept="image/jpg,image/jpeg,image/png"
            :show-file-list="false"
            :on-success="handleSuccess"
            :on-change="beforeUpload"
            ref="upload"
            :on-error="onError"
          >
            <img
              v-if="dataForm.address"
              :src="javaApi + '/img/' + dataForm.address"
              class="avatar"
            />
            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
          </el-upload>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="upFileVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmConnect" :loading="loading">确 定</el-button>
        <el-button type="primary" @click="confirmConnect" :loading="loading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
@@ -91,282 +199,307 @@
  delParameter,
  selectItemParameter,
  selectSeal,
  upParameter
  upParameter,
} from "@/api/structural/laboratoryScope";
import { getCertificationDetail } from "@/api/structural/laboratory";
export default {
  components: {
    limsTable
    limsTable,
  },
  computed: {
    action() {
      return this.javaApi + '/deviceScope/uploadFile'
    }
      return this.javaApi + "/deviceScope/uploadFile";
    },
  },
  data() {
    return {
      queryParams: {
        laboratoryName: '',
        laboratoryNumber: '',
        laboratoryName: "",
        laboratoryNumber: "",
      },
      tableData: [],
      tableLoading: false,
      column: [
        { label: '实验室名称', prop: 'laboratoryName' },
        { label: '场所编码', prop: 'laboratoryNumber' },
        { label: '实验室代号', prop: 'laboratoryCode' },
        { label: '负责人', prop: 'head' },
        { label: '负责人电话', prop: 'phoneNumber' },
        { label: '地址', prop: 'address' },
        { label: '创建人', prop: 'createUserName' },
        { label: '创建时间', prop: 'createTime' },
        { label: "实验室名称", prop: "laboratoryName" },
        { label: "场所编码", prop: "laboratoryNumber" },
        { label: "实验室代号", prop: "laboratoryCode" },
        { label: "负责人", prop: "head" },
        { label: "负责人电话", prop: "phoneNumber" },
        { label: "地址", prop: "address" },
        { label: "创建人", prop: "createUserName" },
        { label: "创建时间", prop: "createTime" },
        {
          dataType: 'action',
          label: '操作',
          dataType: "action",
          label: "操作",
          operation: [
            {
              name: '编辑',
              type: 'text',
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.openAdd('edit', row);
                this.openAdd("edit", row);
              },
            },
            {
              name: '删除',
              type: 'text',
              clickFun: (row) => {
                this.delete(row);
              },
            },
            {
              name: '印章管理',
              type: 'text',
              name: "印章管理",
              type: "text",
              clickFun: (row) => {
                this.fileManagement(row);
              },
            },
          ]
        }
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.delete(row);
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 1
        current: 1,
      },
      addDia: false,
      formTitle: '',
      laboratoryForm: {
      },
      operationType: '',
      formTitle: "",
      laboratoryForm: {},
      operationType: "",
      userRules: {
        laboratoryName: [{ required: true, message: '请输入实验室名称', trigger: 'blur' }],
        laboratoryNumber: [{ required: true, message: '请输入场所编码', trigger: 'blur' }],
        head: [{ required: true, message: '请输入负责人', trigger: 'blur' }],
        phoneNumber: [{ required: true, message: '请输入负责人电话', trigger: 'blur' }],
        laboratoryName: [
          { required: true, message: "请输入实验室名称", trigger: "blur" },
        ],
        laboratoryNumber: [
          { required: true, message: "请输入场所编码", trigger: "blur" },
        ],
        head: [{ required: true, message: "请输入负责人", trigger: "blur" }],
        phoneNumber: [
          { required: true, message: "请输入负责人电话", trigger: "blur" },
        ],
      },
      currentRow: {},
      fileComponentTableLoading: false,
      fileComponentData: [],
      fileComponentDataColumn: [
        { label: '实验室名称', prop: 'laboratoryName' },
        { label: '印章图片', prop: 'address', dataType: 'image' },
        { label: '印章类型', prop: 'type' },
        { label: "实验室名称", prop: "laboratoryName" },
        { label: "所属域", prop: "contract" },
        { label: "印章图片", prop: "address", dataType: "image" },
        { label: "印章类型", prop: "type" },
      ],
      fileComponentPage: {
        total: 0,
        size: 10,
        current: 1,
        layout: 'total, prev, pager, next'
        layout: "total, prev, pager, next",
      },
      fileVisible: false,
      upFileVisible: false,
      loading: false,
      dataForm: {
        type: '',
        address: '',
        contract: "",
        type: "",
        address: "",
      },
      dataFormRules: {
        type: [{ required: true, message: '请选择印章类型', trigger: 'change' }],
        address: [{ required: false, message: '请上传图片', trigger: 'change' }],
        contract: [
          { required: true, message: "请选择所属域", trigger: "change" },
        ],
        type: [
          { required: true, message: "请选择印章类型", trigger: "change" },
        ],
        address: [
          { required: false, message: "请上传图片", trigger: "change" },
        ],
      },
      props: { multiple: false, emitPath: false, },
      props: { multiple: false, emitPath: false },
      options: [
        {
          value: '实验室资质',
          label: '实验室资质',
          children: []
          value: "实验室资质",
          label: "实验室资质",
          children: [],
        },
        {
          value: '委托报告',
          label: '委托报告',
          children: null
          value: "委托报告",
          label: "委托报告",
          children: null,
        },
        {
          value: '进厂报告',
          label: '进厂报告',
          children: null
          value: "进厂报告",
          label: "进厂报告",
          children: null,
        },
      ],
    }
    };
  },
  mounted() {
    this.refreshTable()
    this.refreshTable();
  },
  methods: {
    refreshTable() {
      this.tableLoading = true
      selectItemParameter({ ...this.page, ...this.queryParams }).then(res => {
        this.tableLoading = false
        if (res.code === 200) {
          this.tableData = res.data.records
          this.page.total = res.data.total
        }
      }).catch(err => {
        this.tableLoading = false
      })
      this.tableLoading = true;
      selectItemParameter({ ...this.page, ...this.queryParams })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    // 重置
    refresh() {
      this.resetForm('queryForm')
      this.refreshTable()
      this.resetForm("queryForm");
      this.refreshTable();
    },
    // 分页切换
    pagination(page) {
      this.page.size = page.limit
      this.refreshTable()
      this.page.size = page.limit;
      this.refreshTable();
    },
    openAdd(type, row) {
      this.formTitle = type === 'add' ? '新增实验室' : '编辑实验室'
      this.operationType = type
      if (type === 'edit') {
        this.laboratoryForm = this.HaveJson(row)
      this.formTitle = type === "add" ? "新增实验室" : "编辑实验室";
      this.operationType = type;
      if (type === "edit") {
        this.laboratoryForm = this.HaveJson(row);
      }
      this.addDia = true
      this.addDia = true;
    },
    // 提交新增、编辑实验室表单
    customAdd() {
      this.$refs['laboratoryForm'].validate((valid) => {
      this.$refs["laboratoryForm"].validate((valid) => {
        if (valid) {
          this.loading = true
          if (this.operationType === 'add') {
            addParameter(this.laboratoryForm).then(res => {
              this.loading = false
              if (res.code !== 200) return
              this.$message.success('新增成功')
              this.refreshTable()
              this.reset()
            }).catch(err => {
              this.loading = false
            })
          this.loading = true;
          if (this.operationType === "add") {
            addParameter(this.laboratoryForm)
              .then((res) => {
                this.loading = false;
                if (res.code !== 200) return;
                this.$message.success("新增成功");
                this.refreshTable();
                this.reset();
              })
              .catch((err) => {
                this.loading = false;
              });
          } else {
            upParameter(this.laboratoryForm).then(res => {
              this.loading = false
              if (res.code !== 200) return
              this.$message.success('修改成功')
              this.refreshTable()
              this.reset()
            }).catch(err => {
              this.loading = false
            })
            upParameter(this.laboratoryForm)
              .then((res) => {
                this.loading = false;
                if (res.code !== 200) return;
                this.$message.success("修改成功");
                this.refreshTable();
                this.reset();
              })
              .catch((err) => {
                this.loading = false;
              });
          }
        }
      })
      });
    },
    reset() {
      this.resetForm('laboratoryForm')
      this.addDia = false
      this.resetForm("laboratoryForm");
      this.addDia = false;
    },
    // 删除实验室
    delete(row) {
      this.$confirm('是否删除当前数据?', "警告", {
      this.$confirm("是否删除当前数据?", "警告", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        delParameter({ id: row.id }).then(res => {
          this.$message.success('删除成功')
          this.refreshTable()
        type: "warning",
      })
        .then(() => {
          delParameter({ id: row.id }).then((res) => {
            this.$message.success("删除成功");
            this.refreshTable();
          });
        })
      }).catch(() => { })
        .catch(() => {});
    },
    // 打开印章管理弹框
    fileManagement(row) {
      this.fileVisible = true;
      this.fileComponentTableLoading = true
      this.currentRow = row
      this.getFileComponentList()
      this.fileComponentTableLoading = true;
      this.currentRow = row;
      this.getFileComponentList();
    },
    getFileComponentList() {
      selectSeal({ id: this.currentRow.id, ...this.fileComponentPage }).then(res => {
        this.fileComponentTableLoading = false
        if (res.code === 200) {
          this.fileComponentData = res.data.records
          this.fileComponentPage.total = res.data.total
        }
      }).catch(err => {
        this.fileComponentTableLoading = false
      })
      selectSeal({ id: this.currentRow.id, ...this.fileComponentPage })
        .then((res) => {
          this.fileComponentTableLoading = false;
          if (res.code === 200) {
            this.fileComponentData = res.data.records;
            this.fileComponentPage.total = res.data.total;
          }
        })
        .catch((err) => {
          this.fileComponentTableLoading = false;
        });
    },
    fileComponentPagination(page) {
      this.fileComponentPage.size = page.limit
      this.getFileComponentList()
      this.fileComponentPage.size = page.limit;
      this.getFileComponentList();
    },
    // 打开更新印章弹框
    openUpload() {
      this.dataForm.type = '';
      this.dataForm.address = '';
      this.dataForm.contract = "";
      this.dataForm.type = "";
      this.dataForm.address = "";
      this.upFileVisible = true;
      this.getCertificationOperation()
      this.getCertificationOperation();
    },
    // 查询印章类型
    getCertificationOperation() {
      const params = {
        current: -1,
        size: -1,
      }
      getCertificationDetail(params).then(res => {
        this.options[0].children = res.data.records.map(m => {
      };
      getCertificationDetail(params).then((res) => {
        this.options[0].children = res.data.records.map((m) => {
          m.value = m.name;
          m.label = m.name;
          return m
          return m;
        });
      })
      });
    },
    // 提交更新印章
    confirmConnect() {
      this.$refs['dataForm'].validate((valid) => {
      this.$refs["dataForm"].validate((valid) => {
        if (valid) {
          this.loading = true;
          addSeal({ labId: this.currentRow.id, ...this.dataForm }).then(res => {
            this.loading = false;
            this.getFileComponentList()
            this.upFileVisible = false;
          })
          addSeal({ labId: this.currentRow.id, ...this.dataForm }).then(
            (res) => {
              this.loading = false;
              this.getFileComponentList();
              this.upFileVisible = false;
            }
          );
        }
      })
      });
    },
    handleSuccess(response,) {
    handleSuccess(response) {
      if (response.code === 200) {
        this.dataForm.address = response.data.url
        this.dataForm.address = response.data.url;
      }
    },
    beforeUpload(file, type) {
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        this.$message.error("上传文件不超过10M");
        this.$refs.upload.clearFiles();
        return false;
      } else {
        return true;
      }
    },
    onError(err, file, fileList, type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
      this.$message.error("上传失败");
      this.$refs.upload.clearFiles();
    },
  }
}
  },
};
</script>
<style scoped>
.search {
@@ -393,7 +526,7 @@
}
.avatar-uploader ::v-deep .el-upload:hover {
  border-color: #409EFF;
  border-color: #409eff;
}
.avatar-uploader-icon {
src/workers/InspectionWorker.worker.js
@@ -177,8 +177,8 @@
            // 如果当前检验项是产品检验项,则执行此方法,找到此检验项的要求值
            let ask = currentSample.insProduct.find((m) => m.id == item.i).ask
              ? currentSample.insProduct
                  .find((m) => m.id == item.i)
                  .ask.split("&")
                .find((m) => m.id == item.i)
                .ask.split("&")
              : null;
            // 获取当前结论的参数,也就是当前检验项的最终值
            let res = Object.values(comValue)[0];
@@ -395,14 +395,14 @@
                          let k = m.split("±");
                          return (
                            eval(res) >=
                              eval(
                                handleFraction(k[0]) - handleFraction(k[1])
                              ) &&
                            eval(
                              handleFraction(k[0]) - handleFraction(k[1])
                            ) &&
                            eval(res) <=
                              eval(
                                Number(handleFraction(k[0])) +
                                  Number(handleFraction(k[1]))
                              )
                            eval(
                              Number(handleFraction(k[0])) +
                              Number(handleFraction(k[1]))
                            )
                          );
                        } else {
                          return handleMoreParam(res, m, "±");
@@ -411,12 +411,12 @@
                        let k = m.split("±");
                        return (
                          eval(res) >=
                            eval(handleFraction(k[0]) - handleFraction(k[1])) &&
                          eval(handleFraction(k[0]) - handleFraction(k[1])) &&
                          eval(res) <=
                            eval(
                              Number(handleFraction(k[0])) +
                                Number(handleFraction(k[1]))
                            )
                          eval(
                            Number(handleFraction(k[0])) +
                            Number(handleFraction(k[1]))
                          )
                        );
                      }
                    } else if (m.includes(">")) {
@@ -506,8 +506,8 @@
            // 如果检验值类型是数字输入框
            let tell = currentSample.insProduct.find((m) => m.id == item.i).tell
              ? currentSample.insProduct
                  .find((m) => m.id == item.i)
                  .tell.split("&")
                .find((m) => m.id == item.i)
                .tell.split("&")
              : null;
            isPoint =
              tell &&
@@ -607,9 +607,8 @@
            // 处理excel函数参数列表
            item.valueList.forEach((a) => {
              valueList.push({
                name: `${comparisonList.find((e) => e.value == a.c).label}${
                  a.r + 1
                }`,
                name: `${comparisonList.find((e) => e.value == a.c).label}${a.r + 1
                  }`,
                value: 0,
              });
            });
@@ -796,7 +795,7 @@
        return (
          item >= eval(handleFraction(k[0]) - handleFraction(k[1])) &&
          item <=
            eval(Number(handleFraction(k[0])) + Number(handleFraction(k[1])))
          eval(Number(handleFraction(k[0])) + Number(handleFraction(k[1])))
        );
      case "~":
        let j = str.split("~");
@@ -1249,6 +1248,21 @@
    console.log("error", error);
  }
}
/**
 * 实现平方根函数 SQRT
 * @param {number} num 要开平方的数字
 * @returns {number} 算术平方根,负数返回 NaN
 */
function SQRT(num) {
  // 实数范围内,负数没有平方根,返回 NaN
  if (num < 0) {
    return NaN;
  }
  // 调用 JS 原生高精度平方根函数
  return Math.sqrt(num);
}
/**
 * 获取包含 ABC 字符的列表
 *
@@ -1269,6 +1283,7 @@
      "INT",
      "IF",
      "LOG",
      "SQRT"
    ];
    // 替换特殊字符
    f = f