spring
2025-02-26 80a5a62c65002bec5080d1503d859c3c970c2b0a
修改报告生成
已修改2个文件
2945 ■■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 1540 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-report-preparation.vue 1405 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -70,17 +70,21 @@
  line-height: 24px;
  margin-top: 5px;
}
.circulateTable {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.opticalProject {
  width: 38%;
}
.temperatureList {
  width: 60%;
}
.temperatureListTitle {
  display: flex;
  flex-direction: row;
@@ -100,10 +104,7 @@
  border-radius: 2px;
}
.ins_order_add
  .el-tree--highlight-current
  .el-tree-node.is-current
  > .el-tree-node__content {
.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  color: #3a7bfa;
}
@@ -137,95 +138,40 @@
  <div class="ins_order_add" style=" display: block; ">
    <div v-show="!configShow && !equipConfigShow && !cableConfigShow">
      <el-row class="title">
        <el-col :span="8" style="padding-left: 20px;text-align: left;"
          >委托单信息&nbsp;&nbsp;&nbsp;单位成本总价:<span
            style="color: #3A7BFA"
            >¥{{ total.toFixed(2) }}</span
          ></el-col
        >
        <el-col :span="8" style="padding-left: 20px;text-align: left;">委托单信息&nbsp;&nbsp;&nbsp;单位成本总价:<span
            style="color: #3A7BFA">¥{{ total.toFixed(2) }}</span></el-col>
        <el-col :span="16" style="text-align: right;">
          <el-select
            v-model="template"
            size="medium"
            placeholder="下单模板"
            style="margin-right: 10px;"
            v-show="active == 1"
            @change="selectInsOrderTemplateById"
          >
            <el-option
              v-for="(a, ai) in templates"
              :key="ai"
              :value="a.id"
              :label="a.name"
            >
          <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;"
            v-show="active == 1" @change="selectInsOrderTemplateById">
            <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name">
              <span style="float: left">{{ a.name }}</span>
              <i
                class="el-icon-delete"
                style="float: right; color: #66b1ff; font-size: 16px"
                @click.stop="handleDelete(a)"
              ></i>
              <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
                @click.stop="handleDelete(a)"></i>
            </el-option>
          </el-select>
          <el-button
            size="medium"
            @click="templateDia = true"
            v-show="active == 1"
          >
          <el-button size="medium" @click="templateDia = true" v-show="active == 1">
            <span style="color: #3A7BFA;">保存模板</span>
          </el-button>
          <el-button
            size="medium"
            type="primary"
            @click="openEquipConfig"
            v-if="active == 1"
            >子样品配置</el-button
          >
          <el-button
            size="medium"
            type="primary"
            @click="save"
            :loading="saveLoad"
            v-show="active == 1"
            >提交</el-button
          >
          <el-button size="medium" type="primary" @click="openEquipConfig" v-if="active == 1">子样品配置</el-button>
          <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active == 1">提交</el-button>
          <!-- 审核 -->
          <el-button
            size="medium"
            @click="upInsOrderOfState(2)"
            :loading="saveLoad"
            v-show="active == 3 && addObj.companyId"
            :disabled="saveLoad"
            >不通过</el-button
          >
          <el-button
            size="medium"
            type="primary"
            @click="upInsOrderOfState(1)"
            :loading="saveLoad"
            v-show="active == 3 && addObj.companyId"
            >通过</el-button
          >
          <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad"
            v-show="active == 3 && addObj.companyId" :disabled="saveLoad">不通过</el-button>
          <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad"
            v-show="active == 3 && addObj.companyId">通过</el-button>
          <el-button size="medium" @click="$parent.playOrder(0)">
            <span style="color: #3A7BFA;">返回</span>
          </el-button>
        </el-col>
      </el-row>
    </div>
    <div
      v-show="!configShow && !equipConfigShow && !cableConfigShow"
      class="container"
    >
    <div v-show="!configShow && !equipConfigShow && !cableConfigShow" class="container">
      <div class="search">
        <el-row>
          <el-col class="search_thing" :span="6">
            <div class="search_label">委托编号:</div>
            <div class="search_input">
              <el-input
                v-model="addObj.entrustCode"
                size="small"
                placeholder="系统生成"
                disabled
              ></el-input>
              <el-input v-model="addObj.entrustCode" size="small" placeholder="系统生成" disabled></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
@@ -233,19 +179,8 @@
              <span class="required-span">* </span>检验类别:
            </div>
            <div class="search_input">
              <el-select
                size="small"
                style="width: 100%;"
                clearable
                v-model="addObj.orderType"
                :disabled="active > 1"
              >
                <el-option
                  v-for="(a, ai) in orderType"
                  :key="ai"
                  :value="a.value"
                  :label="a.label"
                ></el-option>
              <el-select size="small" style="width: 100%;" clearable v-model="addObj.orderType" :disabled="active > 1">
                <el-option v-for="(a, ai) in orderType" :key="ai" :value="a.value" :label="a.label"></el-option>
              </el-select>
            </div>
          </el-col>
@@ -254,12 +189,7 @@
              <span class="required-span">* </span>制单人:
            </div>
            <div class="search_input">
              <el-input
                size="small"
                clearable
                disabled
                v-model="addObj.custom"
              ></el-input>
              <el-input size="small" clearable disabled v-model="addObj.custom"></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
@@ -267,20 +197,9 @@
              <span class="required-span">* </span>委托单位:
            </div>
            <div class="search_input">
              <el-input
                readonly
                size="small"
                v-model="addObj.company"
                placeholder="选择委托单位"
              >
                <template slot="append"
                  ><el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="(selectUserDia = true), (createState = 1)"
                    :disabled="active > 1"
                  ></el-button
                ></template>
              <el-input readonly size="small" v-model="addObj.company" placeholder="选择委托单位">
                <template slot="append"><el-button slot="append" icon="el-icon-search"
                    @click="(selectUserDia = true), (createState = 1)" :disabled="active > 1"></el-button></template>
              </el-input>
            </div>
          </el-col>
@@ -289,13 +208,8 @@
              <span class="required-span">* </span>联系方式:
            </div>
            <div class="search_input">
              <el-input
                size="small"
                placeholder="选择委托客户"
                clearable
                :readonly="active > 1"
                v-model="addObj.phone"
              ></el-input>
              <el-input size="small" placeholder="选择委托客户" clearable :readonly="active > 1"
                v-model="addObj.phone"></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6" v-if="addObj.orderType == 'C'">
@@ -303,20 +217,9 @@
              <span class="required-span">* </span>下单至:
            </div>
            <div class="search_input">
              <el-select
                size="small"
                style="width: 100%;"
                clearable
                v-model="addObj.departmentLimsId"
                :disabled="active > 1"
                placeholder="部门"
              >
                <el-option
                  v-for="(a, ai) in deaprtEnum"
                  :key="ai"
                  :value="a.id"
                  :label="a.name"
                ></el-option>
              <el-select size="small" style="width: 100%;" clearable v-model="addObj.departmentLimsId"
                :disabled="active > 1" placeholder="部门">
                <el-option v-for="(a, ai) in deaprtEnum" :key="ai" :value="a.id" :label="a.name"></el-option>
              </el-select>
            </div>
          </el-col>
@@ -325,19 +228,8 @@
              <span class="required-span">* </span>紧急程度:
            </div>
            <div class="search_input">
              <el-select
                size="small"
                style="width: 100%;"
                clearable
                v-model="addObj.type"
                :disabled="active > 1"
              >
                <el-option
                  v-for="(a, ai) in type"
                  :key="ai"
                  :value="a.value"
                  :label="a.label"
                ></el-option>
              <el-select size="small" style="width: 100%;" clearable v-model="addObj.type" :disabled="active > 1">
                <el-option v-for="(a, ai) in type" :key="ai" :value="a.value" :label="a.label"></el-option>
              </el-select>
            </div>
          </el-col>
@@ -347,14 +239,8 @@
            </div>
            <div class="search_input">
              <el-input readonly size="small" v-model="addObj.sample">
                <template slot="append"
                  ><el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="selectStandardTree = true"
                    :disabled="active > 1"
                  ></el-button
                ></template>
                <template slot="append"><el-button slot="append" icon="el-icon-search"
                    @click="selectStandardTree = true" :disabled="active > 1"></el-button></template>
              </el-input>
            </div>
          </el-col>
@@ -369,16 +255,8 @@
              <span class="required-span">* </span>样品数量:
            </div>
            <div class="search_input">
              <el-input-number
                size="small"
                v-model="addObj.sampleNum"
                :min="1"
                :max="100"
                :precision="0"
                style="width: 100%;"
                @change="addStandardTree"
                :disabled="active > 1"
              ></el-input-number>
              <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0"
                style="width: 100%;" @change="addStandardTree" :disabled="active > 1"></el-input-number>
            </div>
          </el-col>
          <!-- <el-col class="search_thing" :span="6">
@@ -394,58 +272,25 @@
              <span class="required-span">* </span>订单类型:
            </div>
            <div class="search_input">
              <el-select
                v-model="addObj.formType"
                size="small"
                :disabled="active > 1"
                style="width: 100%;"
              >
                <el-option
                  v-for="(a, ai) in formType"
                  :key="ai"
                  :label="a.label"
                  :value="a.value"
                ></el-option>
              <el-select v-model="addObj.formType" size="small" :disabled="active > 1" style="width: 100%;">
                <el-option v-for="(a, ai) in formType" :key="ai" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="6"
            v-if="addObj.formType === '其他成品'"
          >
          <el-col class="search_thing" :span="6" v-if="addObj.formType === '其他成品'">
            <div class="search_label">零件号:</div>
            <div class="search_input">
              <el-input
                size="small"
                :placeholder="active > 1 ? '' : '请输入'"
                clearable
                v-model="addObj.partNo"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" :placeholder="active > 1 ? '' : '请输入'" clearable v-model="addObj.partNo"
                :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="6"
            v-if="addObj.formType != '其他成品' && addObj.formType"
          >
          <el-col class="search_thing" :span="6" v-if="addObj.formType != '其他成品' && addObj.formType">
            <div class="search_label">
              <span class="required-span">* </span>通知至样机员:
            </div>
            <div class="search_input">
              <el-select
                v-model="addObj.issueUser"
                size="small"
                :disabled="active > 1"
                style="width: 100%;"
              >
                <el-option
                  v-for="(a, ai) in personList"
                  :key="ai"
                  :label="a.label"
                  :value="a.value"
                ></el-option>
              <el-select v-model="addObj.issueUser" size="small" :disabled="active > 1" style="width: 100%;">
                <el-option v-for="(a, ai) in personList" :key="ai" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </div>
          </el-col>
@@ -470,25 +315,15 @@
          <el-col class="search_thing" :span="6">
            <div class="search_label">工程名称:</div>
            <div class="search_input">
              <el-input
                size="small"
                :placeholder="active > 1 ? '' : '请输入'"
                clearable
                v-model="addObj.engineering"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" :placeholder="active > 1 ? '' : '请输入'" clearable v-model="addObj.engineering"
                :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
            <div class="search_label">工程名称EN:</div>
            <div class="search_input">
              <el-input
                size="small"
                :placeholder="active > 1 ? '' : '请输入'"
                clearable
                v-model="addObj.engineeringEn"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" :placeholder="active > 1 ? '' : '请输入'" clearable v-model="addObj.engineeringEn"
                :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
@@ -498,20 +333,9 @@
            <div class="search_input">
              <!-- <el-input size="small" placeholder="请输入" clearable v-model="addObj.production"
                :readonly="active>1"></el-input> -->
              <el-input
                size="small"
                v-model="addObj.production"
                placeholder="选择生产单位"
                :readonly="active > 1"
              >
                <template slot="append"
                  ><el-button
                    slot="append"
                    icon="el-icon-search"
                    @click="(selectUserDia = true), (createState = 2)"
                    :disabled="active > 1"
                  ></el-button
                ></template>
              <el-input size="small" v-model="addObj.production" placeholder="选择生产单位" :readonly="active > 1">
                <template slot="append"><el-button slot="append" icon="el-icon-search"
                    @click="(selectUserDia = true), (createState = 2)" :disabled="active > 1"></el-button></template>
              </el-input>
            </div>
          </el-col>
@@ -520,13 +344,8 @@
              <span class="required-span">* </span>生产单位EN:
            </div>
            <div class="search_input">
              <el-input
                size="small"
                placeholder="请输入"
                clearable
                v-model="addObj.productionEn"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" placeholder="请输入" clearable v-model="addObj.productionEn"
                :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <!-- <el-col class="search_thing" :span="6">
@@ -543,11 +362,7 @@
              是否涉及配套样品:
            </div>
            <div class="search_input" style="width: calc(100% - 175px);">
              <el-radio-group
                v-model="addObj.mating"
                @change="$refs.sampleTable.doLayout()"
                :disabled="active > 1"
              >
              <el-radio-group v-model="addObj.mating" @change="$refs.sampleTable.doLayout()" :disabled="active > 1">
                <el-radio :label="1">是</el-radio>
                <el-radio :label="0">否</el-radio>
              </el-radio-group>
@@ -562,13 +377,8 @@
          <el-col class="search_thing" :span="6">
            <div class="search_label">委托人:</div>
            <div class="search_input">
              <el-input
                size="small"
                :placeholder="active > 1 ? '' : '请输入'"
                clearable
                v-model="addObj.prepareUser"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" :placeholder="active > 1 ? '' : '请输入'" clearable v-model="addObj.prepareUser"
                :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
@@ -576,95 +386,43 @@
              <span class="required-span">* </span>约定时间:
            </div>
            <div class="search_input">
              <el-date-picker
                v-model="addObj.appointed"
                :disabled="active > 1"
                type="date"
                placeholder="选择日期"
                size="small"
                format="yyyy-MM-dd"
                value-format="yyyy-MM-dd"
                style="width: 100%;"
              >
              <el-date-picker v-model="addObj.appointed" :disabled="active > 1" type="date" placeholder="选择日期"
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="6"
            v-if="addObj.formType != '其他成品' && addObj.formType"
          >
          <el-col class="search_thing" :span="6" v-if="addObj.formType != '其他成品' && addObj.formType">
            <div class="search_label">
              <span class="required-span">* </span>样机完成时间:
            </div>
            <div class="search_input">
              <el-date-picker
                v-model="addObj.issueTime"
                :disabled="active > 1"
                type="date"
                placeholder="选择日期"
                size="small"
                format="yyyy-MM-dd"
                value-format="yyyy-MM-dd"
                style="width: 100%;"
              >
              <el-date-picker v-model="addObj.issueTime" :disabled="active > 1" type="date" placeholder="选择日期"
                size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </el-col>
          <el-col
            class="search_thing upload"
            :span="4"
            style="align-items: flex-start;height: auto"
            v-if="active == 1"
          >
            <el-upload
              style="margin: 8px 0 0px 50px;"
              action="#"
              :auto-upload="false"
              accept=".jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv"
              :on-change="handleChangeUpload"
            >
          <el-col class="search_thing upload" :span="4" style="align-items: flex-start;height: auto" v-if="active == 1">
            <el-upload style="margin: 8px 0 0px 50px;" action="#" :auto-upload="false"
              accept=".jpg,.jpeg,.png,.gif,.docx,.xls,.xlsx,.pdf,.zip,.rar,.csv" :on-change="handleChangeUpload">
              <el-button size="small" type="primary">上传附件</el-button>
            </el-upload>
          </el-col>
          <el-col class="search_thing" :span="8">
            <div class="search_input" style="width: 100%;margin-left: 40px;">
              <el-radio-group
                v-model="ruleInfo.rule"
                @change="$refs.sampleTable.doLayout()"
                :disabled="active > 1"
              >
              <el-radio-group v-model="ruleInfo.rule" @change="$refs.sampleTable.doLayout()" :disabled="active > 1">
                <el-radio :label="1">不考虑不确定度</el-radio>
                <el-radio :label="2"
                  >考虑不确定度<el-input
                    placeholder=""
                    v-model="ruleInfo.num"
                    style="width: 100px;margin-left: 10px;"
                    size="mini"
                    :disabled="active > 1"
                  >
                <el-radio :label="2">考虑不确定度<el-input placeholder="" v-model="ruleInfo.num"
                    style="width: 100px;margin-left: 10px;" size="mini" :disabled="active > 1">
                    <template slot="append">%</template>
                  </el-input></el-radio
                >
                  </el-input></el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="6"
            style="align-items: flex-start;margin: 8px 0;"
          >
          <el-col class="search_thing" :span="6" style="align-items: flex-start;margin: 8px 0;">
            <div class="search_label">备注:</div>
            <div class="search_input">
              <el-input
                type="textarea"
                :autosize="{ minRows: 2, maxRows: 2 }"
                size="small"
                clearable
                :placeholder="active > 1 ? '' : '请输入'"
                v-model="addObj.remark"
                :readonly="active > 1"
              ></el-input>
              <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 2 }" size="small" clearable
                :placeholder="active > 1 ? '' : '请输入'" v-model="addObj.remark" :readonly="active > 1"></el-input>
            </div>
          </el-col>
          <!-- <el-col class="search_thing" :span="6" v-if="active==1">
@@ -676,39 +434,19 @@
        </el-row>
      </div>
      <div style="height: auto;">
        <div
          class="search"
          v-if="active == 1"
          style="display: flex;background: transparent;"
        >
        <div class="search" v-if="active == 1" style="display: flex;background: transparent;">
          <div class="search_thing">
            <div class="search_label">样品名称:</div>
            <div class="search_input">
              <el-input
                size="small"
                v-model="allInfo.sample"
                @change="changeModel('sample')"
              ></el-input>
              <el-input size="small" v-model="allInfo.sample" @change="changeModel('sample')"></el-input>
            </div>
          </div>
          <div class="search_thing">
            <div class="search_label">样品类别:</div>
            <div class="search_input">
              <el-select
                v-model="allInfo.model"
                :placeholder="active > 1 ? '' : '请输入'"
                filterable
                allow-create
                default-first-option
                size="small"
                @change="changeModel('model')"
              >
                <el-option
                  v-for="item in models"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="allInfo.model" :placeholder="active > 1 ? '' : '请输入'" filterable allow-create
                default-first-option size="small" @change="changeModel('model')">
                <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -716,31 +454,15 @@
          <div class="search_thing">
            <div class="search_label">产品型号:</div>
            <div class="search_input">
              <el-input
                size="small"
                v-model="allInfo.modelNum"
                @change="changeModel('modelNum')"
              ></el-input>
              <el-input size="small" v-model="allInfo.modelNum" @change="changeModel('modelNum')"></el-input>
            </div>
          </div>
          <div class="search_thing">
            <div class="search_label">试验标准:</div>
            <div class="search_input">
              <el-select
                v-model="allInfo.testRequirements"
                :placeholder="active > 1 ? '' : '请输入'"
                filterable
                allow-create
                default-first-option
                size="small"
                @change="changeModel('testRequirements')"
              >
                <el-option
                  v-for="item in standard"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="allInfo.testRequirements" :placeholder="active > 1 ? '' : '请输入'" filterable
                allow-create default-first-option size="small" @change="changeModel('testRequirements')">
                <el-option v-for="item in standard" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -748,351 +470,128 @@
          <div class="search_thing">
            <div class="search_label">检验标准:</div>
            <div class="search_input">
              <el-select
                v-model="standardMethodListId"
                :placeholder="active > 1 ? '' : '请输选择'"
                size="small"
                @focus="methodFocus"
                :loading="methodLoad"
                multiple
                @change="changeStandardMethodListId"
              >
                <el-option
                  v-for="item in methods"
                  :key="item.id"
                  :label="item.code"
                  :value="item.id"
                >
              <el-select v-model="standardMethodListId" :placeholder="active > 1 ? '' : '请输选择'" size="small"
                @focus="methodFocus" :loading="methodLoad" multiple @change="changeStandardMethodListId">
                <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
                </el-option>
              </el-select>
            </div>
          </div>
        </div>
        <el-radio-group
          v-model="currentPage"
          v-if="active > 1"
          size="small"
          style="margin-top: 20px;"
        >
        <el-radio-group v-model="currentPage" v-if="active > 1" size="small" style="margin-top: 20px;">
          <el-radio-button :label="0">样品</el-radio-button>
          <el-radio-button :label="1">附件</el-radio-button>
        </el-radio-group>
        <el-table
          class="el-table sampleTable"
          ref="sampleTable"
          :data="sampleList"
          max-height="400px"
          tooltip-effect="dark"
          border
          @selection-change="selectSample"
          highlight-current-row
          @row-click="rowClick"
          style="margin-top: 10px;"
          v-show="currentPage == 0"
        >
          <el-table-column
            type="selection"
            width="60"
            :selectable="selectable"
            v-if="active == 1"
          ></el-table-column>
          <el-table-column
            type="index"
            label="序号"
            width="65"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="sample"
            label="样品名称"
            align="center"
            min-width="100"
          >
        <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" max-height="400px"
          tooltip-effect="dark" border @selection-change="selectSample" highlight-current-row @row-click="rowClick"
          style="margin-top: 10px;" v-show="currentPage == 0">
          <el-table-column type="selection" width="60" :selectable="selectable" v-if="active == 1"></el-table-column>
          <el-table-column type="index" label="序号" width="65" align="center"></el-table-column>
          <el-table-column prop="sample" label="样品名称" align="center" min-width="100">
            <template slot-scope="scope">
              <el-input
                size="small"
                v-model="scope.row.sample"
                clearable
                :readonly="active > 1"
                placeholder="必填"
              ></el-input>
              <el-input size="small" v-model="scope.row.sample" clearable :readonly="active > 1"
                placeholder="必填"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop="sampleCode"
            label="样品编号"
            min-width="100"
            align="center"
          >
          <el-table-column prop="sampleCode" label="样品编号" min-width="100" align="center">
            <template slot-scope="scope">
              <el-input
                size="small"
                v-model="scope.row.sampleCode"
                clearable
                placeholder="不填写则系统自动生成"
                :readonly="active > 1"
              ></el-input>
              <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="不填写则系统自动生成"
                :readonly="active > 1"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop="model"
            label="样品类别"
            align="center"
            min-width="100"
          >
          <el-table-column prop="model" label="样品类别" align="center" min-width="100">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.model"
                filterable
                allow-create
                default-first-option
                placeholder="样品类别"
                size="small"
                @change="handleChangeModel"
                :disabled="active > 1"
                style="width: 100%;"
              >
                <el-option
                  v-for="item in models"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="样品类别"
                size="small" @change="handleChangeModel" :disabled="active > 1" style="width: 100%;">
                <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column
            prop="modelNum"
            label="产品型号"
            min-width="100"
            align="center"
            v-if="!(active > 1)"
          >
          <el-table-column prop="modelNum" label="产品型号" min-width="100" align="center" v-if="!(active > 1)">
            <template slot-scope="scope">
              <el-input
                size="small"
                v-model="scope.row.modelNum"
                clearable
                placeholder="必填"
                @keyup.enter.native="
                  methodChange(scope.row.standardMethodListId, scope.row)
                "
                @clear="methodChange(scope.row.standardMethodListId, scope.row)"
              ></el-input>
              <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="必填" @keyup.enter.native="
                methodChange(scope.row.standardMethodListId, scope.row)
                " @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop="testRequirements"
            label="试验标准"
            align="center"
            min-width="100"
          >
          <el-table-column prop="testRequirements" label="试验标准" align="center" min-width="100">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.testRequirements"
                :disabled="scope.row.model == null || active > 1"
                placeholder="试验标准"
                size="small"
                :readonly="active > 1"
                style="width: 100%;"
                clearable
                @change="changeModel0(scope.row)"
              >
                <el-option
                  v-for="item in standard"
                  :key="item.id"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="scope.row.testRequirements" :disabled="scope.row.model == null || active > 1"
                placeholder="试验标准" size="small" :readonly="active > 1" style="width: 100%;" clearable
                @change="changeModel0(scope.row)">
                <el-option v-for="item in standard" :key="item.id" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column
            prop="standardMethodListId"
            label="检验标准"
            align="center"
            min-width="100"
          >
          <el-table-column prop="standardMethodListId" label="检验标准" align="center" min-width="100">
            <template slot-scope="scope">
              <el-select
                v-model="scope.row.standardMethodListId"
                :disabled="scope.row.model == null || active > 1"
                placeholder="检验标准"
                size="small"
                :loading="methodLoad"
                @change="value => methodChange(value, scope.row)"
                @focus="methodFocus"
                :readonly="active > 1"
                style="width: 100%;"
                clearable
                @clear="productList = []"
                multiple
              >
                <el-option
                  v-for="item in methods"
                  :key="item.id"
                  :label="item.code"
                  :value="item.id"
                >
              <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model == null || active > 1"
                placeholder="检验标准" size="small" :loading="methodLoad" @change="value => methodChange(value, scope.row)"
                @focus="methodFocus" :readonly="active > 1" style="width: 100%;" clearable @clear="productList = []"
                multiple>
                <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column
            prop="joinName"
            label="配套样品名称"
            width="140"
            align="center"
            v-if="addObj.mating == 1"
          >
          <el-table-column prop="joinName" label="配套样品名称" width="140" align="center" v-if="addObj.mating == 1">
            <template slot-scope="scope">
              <el-input
                size="small"
                type="textarea"
                :autosize="{ minRows: 1, maxRows: 1 }"
                v-model="scope.row.joinName"
              ></el-input>
              <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1 }"
                v-model="scope.row.joinName"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop="joinModel"
            label="配套样品型号"
            width="140"
            align="center"
            v-if="addObj.mating == 1"
          >
          <el-table-column prop="joinModel" label="配套样品型号" width="140" align="center" v-if="addObj.mating == 1">
            <template slot-scope="scope">
              <el-input
                size="small"
                type="textarea"
                :autosize="{ minRows: 1, maxRows: 1 }"
                v-model="scope.row.joinModel"
              ></el-input>
              <el-input size="small" type="textarea" :autosize="{ minRows: 1, maxRows: 1 }"
                v-model="scope.row.joinModel"></el-input>
            </template>
          </el-table-column>
          <el-table-column
            prop="joinNum"
            label="配套样品数量"
            width="140"
            align="center"
            v-if="addObj.mating == 1"
          >
          <el-table-column prop="joinNum" label="配套样品数量" width="140" align="center" v-if="addObj.mating == 1">
            <template slot-scope="scope">
              <el-input-number
                size="small"
                v-model="scope.row.joinNum"
                :min="1"
                :max="100"
                :precision="0"
                :controls="false"
                style="width: 80%;"
              ></el-input-number>
              <el-input-number size="small" v-model="scope.row.joinNum" :min="1" :max="100" :precision="0"
                :controls="false" style="width: 80%;"></el-input-number>
            </template>
          </el-table-column>
          <el-table-column
            prop="proNum"
            label="待检项数量"
            width="105"
            align="center"
          ></el-table-column>
          <el-table-column prop="proNum" label="待检项数量" width="105" align="center"></el-table-column>
        </el-table>
        <el-table
          class="el-table"
          ref="productTable"
          :data="productList"
          max-height="400px"
          tooltip-effect="dark"
          border
          @selection-change="selectProduct"
          style="margin-bottom: 10px;"
          @select="upProductSelect"
          :row-class-name="tableRowClassName"
          v-loading="getProductLoad"
          @select-all="handleAll"
          v-show="currentPage == 0"
        >
          <el-table-column
            type="selection"
            width="65"
            :selectable="selectable"
            v-if="active == 1"
          ></el-table-column>
          <el-table-column
            prop="inspectionItemClass"
            v-if="PROJECT === '装备电缆'"
            label="检验项分类"
            min-width="140"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="inspectionItemClassEn"
            v-if="PROJECT === '装备电缆'"
            label="检验项分类(EN)"
            min-width="140"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="inspectionItem"
            label="检验项"
            min-width="140"
            show-overflow-tooltip
          >
        <el-table class="el-table" ref="productTable" :data="productList" max-height="400px" tooltip-effect="dark"
          border @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
          :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"
          v-show="currentPage == 0">
          <el-table-column type="selection" width="65" :selectable="selectable" v-if="active == 1"></el-table-column>
          <el-table-column prop="inspectionItemClass" v-if="PROJECT === '装备电缆'" label="检验项分类" min-width="140"
            show-overflow-tooltip></el-table-column>
          <el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '装备电缆'" label="检验项分类(EN)" min-width="140"
            show-overflow-tooltip></el-table-column>
          <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip>
            <template slot="header" slot-scope="scope">
              <div
                style="display: flex;align-items: center;flex-direction: column;font-size: 14px"
              >
              <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
                <span>检验项</span>
                <el-input
                  v-if="active == 1"
                  v-model="inspectionItem"
                  @input="searchFilterList"
                  size="mini"
                  placeholder="请输入"
                />
                <el-input v-if="active == 1" v-model="inspectionItem" @input="searchFilterList" size="mini"
                  placeholder="请输入" />
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="inspectionItemSubclass"
            label="检验项子项"
            min-width="140"
            show-overflow-tooltip
          >
          <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140" show-overflow-tooltip>
            <template slot="header" slot-scope="scope">
              <div
                style="display: flex;align-items: center;flex-direction: column;font-size: 14px"
              >
              <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
                <span>检验项子项</span>
                <el-input
                  v-if="active == 1"
                  v-model="inspectionItemSubclass"
                  @input="searchFilterList"
                  size="mini"
                  placeholder="请输入"
                />
                <el-input v-if="active == 1" v-model="inspectionItemSubclass" @input="searchFilterList" size="mini"
                  placeholder="请输入" />
              </div>
            </template>
          </el-table-column>
          <el-table-column prop="tell" label="要求描述" min-width="220px">
            <template slot-scope="scope">
              <el-input
                size="small"
                placeholder="要求描述"
                v-model="scope.row.tell"
                clearable
                type="textarea"
                :autosize="{ minRows: 1, maxRows: 3 }"
                @change="e => requestChange(e, scope.row, 'tell')"
                v-if="active == 1"
                :disabled="
                  !!scope.row.tell &&
                    scope.row.tell.includes('[') &&
                    scope.row.tell.includes(']') &&
                    scope.row.tell.includes(',')
                "
              ></el-input>
              <el-input size="small" placeholder="要求描述" v-model="scope.row.tell" clearable type="textarea"
                :autosize="{ minRows: 1, maxRows: 3 }" @change="e => requestChange(e, scope.row, 'tell')"
                v-if="active == 1" :disabled="!!scope.row.tell &&
                  scope.row.tell.includes('[') &&
                  scope.row.tell.includes(']') &&
                  scope.row.tell.includes(',')
                  "></el-input>
              <span v-else>
                <template>{{ scope.row.tell }}</template>
              </span>
@@ -1100,22 +599,13 @@
          </el-table-column>
          <el-table-column prop="ask" label="要求值" min-width="220px">
            <template slot-scope="scope">
              <el-input
                size="small"
                placeholder="要求值"
                v-model="scope.row.ask"
                clearable
                type="textarea"
                :autosize="{ minRows: 1, maxRows: 3 }"
                @change="e => requestChange(e, scope.row, 'ask')"
                v-if="active == 1 && scope.row.inspectionValueType != '5'"
                :disabled="
                  !!scope.row.ask &&
                    scope.row.ask.includes('[') &&
                    scope.row.ask.includes(']') &&
                    scope.row.ask.includes(',')
                "
              ></el-input>
              <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea"
                :autosize="{ minRows: 1, maxRows: 3 }" @change="e => requestChange(e, scope.row, 'ask')"
                v-if="active == 1 && scope.row.inspectionValueType != '5'" :disabled="!!scope.row.ask &&
                  scope.row.ask.includes('[') &&
                  scope.row.ask.includes(']') &&
                  scope.row.ask.includes(',')
                  "></el-input>
              <span v-else>
                <!-- <template v-if="(scope.row.ask.indexOf('D')>-1
                ||scope.row.ask.indexOf('W')>-1
@@ -1125,141 +615,66 @@
                ||scope.row.ask.indexOf('L')>-1)&&active==1">
                  <input class="askRts" v-model="scope.row.rts" /><br />{{ scope.row.ask }}
                </template>
                <template v-else>{{ scope.row.ask }}</template> -->
      <template v-else>{{ scope.row.ask }}</template> -->
                <template>{{ scope.row.ask }}</template>
              </span>
            </template>
          </el-table-column>
          <el-table-column
            prop="methodS"
            label="试验方法"
            min-width="120"
            show-overflow-tooltip
          >
          <el-table-column prop="methodS" label="试验方法" min-width="120" show-overflow-tooltip>
            <template slot="header" slot-scope="scope">
              <div
                style="display: flex;align-items: center;flex-direction: column;font-size: 14px"
              >
              <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
                <span>试验方法</span>
                <el-input
                  v-if="active == 1"
                  v-model="methodS"
                  @input="searchFilterList"
                  size="mini"
                  placeholder="请输入"
                />
                <el-input v-if="active == 1" v-model="methodS" @input="searchFilterList" size="mini"
                  placeholder="请输入" />
              </div>
            </template>
          </el-table-column>
          <el-table-column
            prop="unit"
            label="计量单位"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="price"
            label="单价"
            width="100"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column prop="unit" label="计量单位" width="100" show-overflow-tooltip></el-table-column>
          <el-table-column prop="price" label="单价" width="100" show-overflow-tooltip></el-table-column>
          <!-- <el-table-column prop="manDay" label="预计时间(天)" width="120" show-overflow-tooltip></el-table-column>
          <el-table-column prop="manHour" label="工时系数" width="100" show-overflow-tooltip></el-table-column> -->
          <!-- <el-table-column prop="deviceGroup" label="设备组" width="120" show-overflow-tooltip></el-table-column> -->
          <el-table-column
            prop="section"
            label="区间"
            min-width="120"
            show-overflow-tooltip
          ></el-table-column>
          <el-table-column
            prop="sonLaboratory"
            label="子实验室"
            min-width="130"
            show-overflow-tooltip
            :filters="filters"
            :filter-method="filterHandler"
          ></el-table-column>
          <el-table-column prop="section" label="区间" min-width="120" show-overflow-tooltip></el-table-column>
          <el-table-column prop="sonLaboratory" label="子实验室" min-width="130" show-overflow-tooltip :filters="filters"
            :filter-method="filterHandler"></el-table-column>
        </el-table>
        <ValueTable
          class="value-table"
          ref="fileList"
          :url="$api.insOrderPlan.getFileList"
          :componentData="componentData0"
          :delUrl="$api.insOrderPlan.delfile"
          style="height: 100%;margin-top: 16px;"
          v-show="currentPage == 1"
        />
        <ValueTable class="value-table" ref="fileList" :url="$api.insOrderPlan.getFileList"
          :componentData="componentData0" :delUrl="$api.insOrderPlan.delfile" style="height: 100%;margin-top: 16px;"
          v-show="currentPage == 1" />
      </div>
    </div>
    <el-dialog title="选择单位" :visible.sync="selectUserDia" width="70%">
      <div class="body" style="height: 60vh;" v-if="selectUserDia">
        <ValueTable
          ref="ValueTable2"
          :url="$api.user.selectCustomPageList"
          :componentData="componentData2"
        />
        <ValueTable ref="ValueTable2" :url="$api.user.selectCustomPageList" :componentData="componentData2" />
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="selectUserDia = false">取 消</el-button>
        <el-button type="primary" @click="selectUser">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="选择样品"
      :visible.sync="selectStandardTree"
      width="500px"
    >
      <div
        class="body"
        style="height: 60vh;overflow-y: auto;user-select: none;"
        v-if="selectStandardTree"
      >
    <el-dialog title="选择样品" :visible.sync="selectStandardTree" width="500px">
      <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree">
        <el-row>
          <el-col :span="24">
            <el-input
              placeholder="输入关键字进行搜索"
              suffix-icon="el-icon-search"
              v-model="search"
              size="small"
              style="margin-bottom: 5px;"
              clearable
              @blur="searchFilter"
              @clear="searchFilter"
              @keyup.enter.native="searchFilter"
            ></el-input>
            <el-input placeholder="输入关键字进行搜索" suffix-icon="el-icon-search" v-model="search" size="small"
              style="margin-bottom: 5px;" clearable @blur="searchFilter" @clear="searchFilter"
              @keyup.enter.native="searchFilter"></el-input>
          </el-col>
        </el-row>
        <el-tree
          :data="list"
          ref="tree"
          :props="{ children: 'children', label: 'label' }"
          node-key="label"
          :filter-node-method="filterNode"
          @node-click="handleNodeClick"
          highlight-current
          @node-expand="nodeOpen"
          @node-collapse="nodeClose"
          :default-expanded-keys="expandedKeys"
          @dblclick.native="activeStandardTree"
        >
        <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="label"
          :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen"
          @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" @dblclick.native="activeStandardTree">
          <div class="custom-tree-node" slot-scope="{ node, data }">
            <el-row>
              <el-col :span="24">
                <span
                  ><i
                    :class="
                      `node_i ${
                        data.children != undefined
                          ? data.code === '[1]'
                            ? 'el-icon-folder-opened'
                            : 'el-icon-folder'
                          : 'el-icon-tickets'
                      }`
                    "
                  ></i>
                  {{ data.code }} {{ data.label }}</span
                >
                <span><i :class="`node_i ${data.children != undefined
                  ? data.code === '[1]'
                    ? 'el-icon-folder-opened'
                    : 'el-icon-folder'
                  : 'el-icon-tickets'
                  }`
                  "></i>
                  {{ data.code }} {{ data.label }}</span>
              </el-col>
            </el-row>
          </div>
@@ -1271,11 +686,7 @@
      </span>
    </el-dialog>
    <el-dialog title="保存模板" :visible.sync="templateDia" width="400px">
      <div
        class="body"
        style="display: flex;align-items: center;"
        v-if="templateDia"
      >
      <div class="body" style="display: flex;align-items: center;" v-if="templateDia">
        <div class="search_label" style="width: 90px;">
          <span class="required-span">* </span>模板名称:
        </div>
@@ -1285,22 +696,11 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="templateDia = false">取 消</el-button>
        <el-button
          type="primary"
          @click="addTemplateDia"
          :loading="templateLoading"
          >确 定</el-button
        >
        <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="检验下发"
      :visible.sync="issuedDialogVisible"
      width="400px"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :show-close="false"
    >
    <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="400px" :close-on-click-modal="false"
      :close-on-press-escape="false" :show-close="false">
      <div class="body" style="max-height: 60vh;">
        <el-row>
          <el-col class="search_thing" :span="22">
@@ -1308,38 +708,19 @@
              <span class="required-span">* </span>约定时间:
            </div>
            <div class="search_input">
              <el-date-picker
                size="small"
                v-model="distributeData.appointed"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
                style="width: 100%;"
                format="yyyy-MM-dd"
              >
              <el-date-picker size="small" v-model="distributeData.appointed" type="date" placeholder="选择日期"
                value-format="yyyy-MM-dd" style="width: 100%;" format="yyyy-MM-dd">
              </el-date-picker>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22">
            <div class="search_label">
              <span class="required-span" v-if="addObj.type == 2">* </span
              >指派人员:
              <span class="required-span" v-if="addObj.type == 2">* </span>指派人员:
            </div>
            <div class="search_input">
              <el-select
                v-model="distributeData.userId"
                placeholder="请选择"
                size="small"
                filterable
                style="width: 100%;"
                @change="changeUser"
              >
                <el-option
                  v-for="item in personList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="distributeData.userId" placeholder="请选择" size="small" filterable style="width: 100%;"
                @change="changeUser">
                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -1349,19 +730,9 @@
              <span class="required-span">* </span>试验室:
            </div>
            <div class="search_input">
              <el-select
                v-model="distributeData.sonLaboratory"
                placeholder="请选择"
                size="small"
                filterable
                style="width: 100%;"
              >
                <el-option
                  v-for="item in sonLaboratoryList"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
              <el-select v-model="distributeData.sonLaboratory" placeholder="请选择" size="small" filterable
                style="width: 100%;">
                <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -1370,16 +741,11 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button
            @click="
              issuedDialogVisible = false;
              $parent.playOrder(0);
            "
            >取 消</el-button
          >
          <el-button type="primary" @click="submitForm2" :loading="upLoad"
            >确 定</el-button
          >
          <el-button @click="
            issuedDialogVisible = false;
          $parent.playOrder(0);
          ">取 消</el-button>
          <el-button type="primary" @click="submitForm2" :loading="upLoad">确 定</el-button>
        </el-row>
      </span>
    </el-dialog>
@@ -1391,92 +757,46 @@
              <span class="required-span">* </span>不通过原因:
            </div>
            <div class="search_input">
              <el-input
                v-model="tell"
                size="small"
                placeholder="请输入不通过原因"
              ></el-input>
              <el-input v-model="tell" size="small" placeholder="请输入不通过原因"></el-input>
            </div>
          </el-col>
        </el-row>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="(noDialogVisible = false), (tell = '')"
            >取 消</el-button
          >
          <el-button type="primary" @click="submitTell" :loading="noLoading"
            >确 定</el-button
          >
          <el-button @click="(noDialogVisible = false), (tell = '')">取 消</el-button>
          <el-button type="primary" @click="submitTell" :loading="noLoading">确 定</el-button>
        </el-row>
      </span>
    </el-dialog>
    <fiberOpticConfig
      :currentId="currentId"
      @saveFiberopticConfig="getTotal()"
      v-if="configShow && examine == 0"
      :active="active"
      :inspectionItemST="inspectionItemST"
    />
    <fiberOpticConfigTwo
      :currentId="currentId"
      v-if="configShow && examine == 1"
      :active="active"
    />
    <equipConfig
      :currentId="currentId"
      v-if="equipConfigShow"
      :active="active"
    />
    <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine == 0"
      :active="active" :inspectionItemST="inspectionItemST" />
    <fiberOpticConfigTwo :currentId="currentId" v-if="configShow && examine == 1" :active="active" />
    <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" />
    <cableConfig v-if="cableConfigShow" :active="active" />
    <!--    单选特殊值处理框-->
    <el-dialog
      title="检测到特殊项,请作出以下选择"
      :visible.sync="bsm1Dia"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      min-width="400px"
      :show-close="false"
      :before-close="beforeClose"
    >
    <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" :close-on-press-escape="false"
      :close-on-click-modal="false" min-width="400px" :show-close="false" :before-close="beforeClose">
      <div class="body" style="max-height: 60vh;">
        <el-row v-if="bsm1">
          <el-col
            class="search_thing"
            :span="24"
            style="height: initial;margin: 5px 0;"
          >
          <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;">
            <div class="search_label" style="width: 80px;">
              <span class="required-span">* </span>选项:
            </div>
            <div class="search_input">
              <el-radio-group v-model="bsm1Val" @input="upBsm1">
                <el-radio
                  v-for="(a, ai) in JSON.parse(bsmRow.section)"
                  :key="ai"
                  :label="a"
                  style="margin-bottom: 2px;margin-top: 2px;"
                ></el-radio>
                <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a"
                  style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="24"
            style="height: initial;margin: 5px 0;"
          >
          <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;">
            <div class="search_label" style="width: 80px;">要求值:</div>
            <div
              class="search_input"
              v-show="bsm1Val !== null && bsm1Val !== ''"
            >
            <div class="search_input" v-show="bsm1Val !== null && bsm1Val !== ''">
              <el-radio-group v-model="bsm1Val" @input="upBsm1">
                <el-radio
                  v-for="(a, ai) in JSON.parse(bsmRow.section)"
                  :key="ai"
                  :label="a"
                  >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio
                >
                <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a">{{
                  JSON.parse(bsmRow.ask)[ai]
                }}</el-radio>
              </el-radio-group>
            </div>
          </el-col>
@@ -1487,57 +807,24 @@
              <span class="required-span">* </span>样品熔接配对数量:
            </div>
            <div class="search_input">
              <el-input-number
                size="medium"
                v-model="bsm2Val"
                :min="1"
                :max="bsm2Val3.length"
                :precision="0"
                style="width: 70%;"
                :controls="false"
                @change="bsm2Up"
              ></el-input-number>
              <el-input-number size="medium" v-model="bsm2Val" :min="1" :max="bsm2Val3.length" :precision="0"
                style="width: 70%;" :controls="false" @change="bsm2Up"></el-input-number>
              <span>MAX:{{ bsm2Val3.length }}</span>
            </div>
          </el-col>
          <el-col style="margin-top: 6px;">
            <el-col v-for="(a, ai) in bsm2Val2" :key="ai">
              <el-col :span="10">
                <el-select
                  v-model="a[0]"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="(item, index) in sampleList"
                    :key="index"
                    :label="index + 1"
                    :value="index + 1"
                  >
                <el-select v-model="a[0]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option v-for="(item, index) in sampleList" :key="index" :label="index + 1" :value="index + 1">
                  </el-option>
                </el-select>
              </el-col>
              <!-- <el-col :span="10" class="pairing">{{a[0]}}</el-col> -->
              <el-col
                :span="4"
                class="pairing"
                style="border: 0;color: rgba(0, 0, 0, 0.2);"
                >——</el-col
              >
              <el-col :span="4" class="pairing" style="border: 0;color: rgba(0, 0, 0, 0.2);">——</el-col>
              <el-col :span="10">
                <el-select
                  v-model="a[1]"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="(item, index) in sampleList"
                    :key="index"
                    :label="index + 1"
                    :value="index + 1"
                  >
                <el-select v-model="a[1]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option v-for="(item, index) in sampleList" :key="index" :label="index + 1" :value="index + 1">
                  </el-option>
                </el-select>
              </el-col>
@@ -1556,65 +843,32 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button type="primary" @click="save2" :loading="saveLoad"
            >确 定</el-button
          >
          <el-button type="primary" @click="save2" :loading="saveLoad">确 定</el-button>
        </el-row>
      </span>
    </el-dialog>
    <!--    全选特殊值处理框-->
    <el-dialog
      title="检测到特殊项,请作出以下选择"
      :visible.sync="bsm1DiaAll"
      min-width="400px"
      :show-close="false"
      :close-on-press-escape="false"
      :close-on-click-modal="false"
      :before-close="beforeClose"
    >
      <div
        class="body"
        style="max-height: 60vh;"
        v-for="(item, index) in bsm1DiaList"
        :key="index"
      >
    <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1DiaAll" min-width="400px" :show-close="false"
      :close-on-press-escape="false" :close-on-click-modal="false" :before-close="beforeClose">
      <div class="body" style="max-height: 60vh;" v-for="(item, index) in bsm1DiaList" :key="index">
        <el-row v-if="item.bsm1">
          <el-col
            class="search_thing"
            :span="24"
            style="height: initial;margin: 5px 0;"
          >
          <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;">
            <div class="search_label" style="width: 80px;">
              <span class="required-span">* </span>选项:
            </div>
            <div class="search_input">
              <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)">
                <el-radio
                  v-for="(a, ai) in JSON.parse(item.bsmRow.section)"
                  :key="ai"
                  :label="a"
                  style="margin-bottom: 2px;margin-top: 2px;"
                ></el-radio>
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" :label="a"
                  style="margin-bottom: 2px;margin-top: 2px;"></el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="24"
            style="height: initial;margin: 5px 0;"
          >
          <el-col class="search_thing" :span="24" style="height: initial;margin: 5px 0;">
            <div class="search_label" style="width: 80px;">要求值:</div>
            <div
              class="search_input"
              v-show="item.bsm1Val !== null && item.bsm1Val !== ''"
            >
            <div class="search_input" v-show="item.bsm1Val !== null && item.bsm1Val !== ''">
              <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)">
                <el-radio
                  v-for="(a, ai) in JSON.parse(item.bsmRow.section)"
                  :key="ai"
                  :label="a"
                  >{{ JSON.parse(item.bsmRow.ask)[ai] }}</el-radio
                >
                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" :label="a">{{
                  JSON.parse(item.bsmRow.ask)[ai] }}</el-radio>
              </el-radio-group>
            </div>
          </el-col>
@@ -1625,57 +879,26 @@
              <span class="required-span">* </span>样品熔接配对数量:
            </div>
            <div class="search_input">
              <el-input-number
                size="medium"
                v-model="item.bsm2Val"
                :min="1"
                :max="item.bsm2Val3.length"
                :precision="0"
                style="width: 70%;"
                :controls="false"
                @change="bsm2Up"
              ></el-input-number>
              <el-input-number size="medium" v-model="item.bsm2Val" :min="1" :max="item.bsm2Val3.length" :precision="0"
                style="width: 70%;" :controls="false" @change="bsm2Up"></el-input-number>
              <span>MAX:{{ item.bsm2Val3.length }}</span>
            </div>
          </el-col>
          <el-col style="margin-top: 6px;">
            <el-col v-for="(a, ai) in item.bsm2Val2" :key="ai">
              <el-col :span="10">
                <el-select
                  v-model="a[0]"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="(item, index) in item.sampleList"
                    :key="index"
                    :label="index + 1"
                    :value="index + 1"
                  >
                <el-select v-model="a[0]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option v-for="(item, index) in item.sampleList" :key="index" :label="index + 1"
                    :value="index + 1">
                  </el-option>
                </el-select>
              </el-col>
              <!-- <el-col :span="10" class="pairing">{{a[0]}}</el-col> -->
              <el-col
                :span="4"
                class="pairing"
                style="border: 0;color: rgba(0, 0, 0, 0.2);"
                >——</el-col
              >
              <el-col :span="4" class="pairing" style="border: 0;color: rgba(0, 0, 0, 0.2);">——</el-col>
              <el-col :span="10">
                <el-select
                  v-model="a[1]"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%;"
                >
                  <el-option
                    v-for="(item, index) in item.sampleList"
                    :key="index"
                    :label="index + 1"
                    :value="index + 1"
                  >
                <el-select v-model="a[1]" placeholder="请选择" size="small" style="width: 100%;">
                  <el-option v-for="(item, index) in item.sampleList" :key="index" :label="index + 1"
                    :value="index + 1">
                  </el-option>
                </el-select>
              </el-col>
@@ -1686,20 +909,12 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button type="primary" @click="save1" :loading="saveLoad"
            >确 定</el-button
          >
          <el-button type="primary" @click="save1" :loading="saveLoad">确 定</el-button>
        </el-row>
      </span>
    </el-dialog>
    <el-dialog
      title="特殊值填写"
      :visible.sync="bsm3Dia"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="800px"
      :show-close="false"
    >
    <el-dialog title="特殊值填写" :visible.sync="bsm3Dia" :close-on-click-modal="false" :close-on-press-escape="false"
      width="800px" :show-close="false">
      <el-table :data="editTable" style="width: 100%" height="80vh">
        <!-- inspectionItemList -->
        <el-table-column prop="inspectionItemList" label="检验项" width="180">
@@ -1711,66 +926,38 @@
        <el-table-column prop="symbolItem" label="识别符号"> </el-table-column>
        <el-table-column prop="value" label="识别符值">
          <template slot-scope="scope">
            <el-input
              v-model="scope.row.value"
              placeholder="请输入"
              @input="inputValueHandler(scope.row, scope.$index)"
              size="small"
            ></el-input>
            <el-input v-model="scope.row.value" placeholder="请输入" @input="inputValueHandler(scope.row, scope.$index)"
              size="small"></el-input>
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="bsm3Dia = false">取 消</el-button>
          <el-button type="primary" @click="save0" :loading="saveLoad"
            >确 定</el-button
          >
          <el-button type="primary" @click="save0" :loading="saveLoad">确 定</el-button>
        </el-row>
      </span>
    </el-dialog>
    <el-dialog
      title="温度循环要求填写"
      :visible.sync="circulateShow"
      width="900px"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :before-close="beforeCirculateShowClose"
      :show-close="false"
    >
    <el-dialog title="温度循环要求填写" :visible.sync="circulateShow" width="900px" :close-on-click-modal="false"
      :close-on-press-escape="false" :before-close="beforeCirculateShowClose" :show-close="false">
      <div class="search" style="display: flex;background: transparent;">
        <div class="search_thing">
          <div class="search_label">保温时间:</div>
          <div class="search_input">
            <el-input
              v-model="circulateForm.entrustTime"
              size="small"
              placeholder=""
              type="number"
            ></el-input>
            <el-input v-model="circulateForm.entrustTime" size="small" placeholder="" type="number"></el-input>
          </div>
        </div>
        <div class="search_thing">
          <div class="search_label">循环次数:</div>
          <div class="search_input">
            <el-input
              v-model="circulateForm.entrustNum"
              size="small"
              placeholder=""
              type="number"
            ></el-input>
            <el-input v-model="circulateForm.entrustNum" size="small" placeholder="" type="number"></el-input>
          </div>
        </div>
        <div class="search_thing">
          <div class="search_label">温度点:</div>
          <div class="search_input">
            <el-input
              @blur="changeTemperatureData"
              v-model="circulateForm.entrustPoint"
              size="small"
              placeholder=""
              type="number"
            ></el-input>
            <el-input @blur="changeTemperatureData" v-model="circulateForm.entrustPoint" size="small" placeholder=""
              type="number"></el-input>
          </div>
        </div>
      </div>
@@ -1779,25 +966,12 @@
          <div style="line-height: 30px;">光纤项目</div>
          <el-divider></el-divider>
          <div>
            <el-table
              ref="multipleTable"
              border
              :header-cell-style="{ 'text-align': 'center' }"
              :cell-style="{ 'text-align': 'center' }"
              :data="opticalProject"
              tooltip-effect="dark"
              style="width: 100%"
              @row-click="rowClickOptical"
              @select="selectOpticalProject"
              @select-all="selectAllOptical"
              @selection-change="handleSelectionChange"
            >
            <el-table ref="multipleTable" border :header-cell-style="{ 'text-align': 'center' }"
              :cell-style="{ 'text-align': 'center' }" :data="opticalProject" tooltip-effect="dark" style="width: 100%"
              @row-click="rowClickOptical" @select="selectOpticalProject" @select-all="selectAllOptical"
              @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="55"> </el-table-column>
              <el-table-column
                prop="value"
                label="光纤项目"
                show-overflow-tooltip
              ></el-table-column>
              <el-table-column prop="value" label="光纤项目" show-overflow-tooltip></el-table-column>
            </el-table>
          </div>
        </div>
@@ -1805,59 +979,30 @@
          <div class="temperatureListTitle">
            <span>温度点集合</span>
            <span>
              <el-button type="primary" size="mini" @click="addTemperatureData"
                >新增</el-button
              >
              <el-button size="mini" @click="deleteTemperatureData"
                >删除</el-button
              >
              <el-button type="primary" size="mini" @click="addTemperatureData">新增</el-button>
              <el-button size="mini" @click="deleteTemperatureData">删除</el-button>
            </span>
          </div>
          <el-divider></el-divider>
          <el-table
            :data="temperatureData"
            border
            :header-cell-style="{ 'text-align': 'center' }"
            :cell-style="{ 'text-align': 'center' }"
            style="width: 100%"
          >
          <el-table :data="temperatureData" border :header-cell-style="{ 'text-align': 'center' }"
            :cell-style="{ 'text-align': 'center' }" style="width: 100%">
            <el-table-column prop="date" label="温度点(℃)" width="120px">
              <template slot-scope="scope">
                <el-input
                  size="small"
                  v-model="scope.row.temperaturePoint"
                  clearable
                  placeholder="请输入"
                  @change="changeTemperature"
                ></el-input>
                <el-input size="small" v-model="scope.row.temperaturePoint" clearable placeholder="请输入"
                  @change="changeTemperature"></el-input>
              </template>
            </el-table-column>
            <el-table-column prop="name" label="要求(dB/Km)">
              <template slot-scope="scope">
                <span>x</span>
                <el-select
                  v-model="scope.row.askSymbol"
                  placeholder="请选择"
                  size="small"
                  style="width: 120px"
                  @change="changeTemperature"
                >
                  <el-option
                    v-for="item in temperatureDataList"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                <el-select v-model="scope.row.askSymbol" placeholder="请选择" size="small" style="width: 120px"
                  @change="changeTemperature">
                  <el-option v-for="item in temperatureDataList" :key="item.value" :label="item.label"
                    :value="item.value">
                  </el-option>
                </el-select>
                <el-input
                  size="small"
                  v-model="scope.row.askNum"
                  clearable
                  placeholder="请输入"
                  style="width: 120px"
                  @change="changeTemperature"
                ></el-input>
                <el-input size="small" v-model="scope.row.askNum" clearable placeholder="请输入" style="width: 120px"
                  @change="changeTemperature"></el-input>
              </template>
            </el-table-column>
          </el-table>
@@ -1868,15 +1013,9 @@
        <el-button type="primary" @click="spliceData">保存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="单根垂直燃烧检测次数填写"
      :visible.sync="singleVerticalCombustionShow"
      width="900px"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      :before-close="beforeCirculateShowClose"
      :show-close="false"
    >
    <el-dialog title="单根垂直燃烧检测次数填写" :visible.sync="singleVerticalCombustionShow" width="900px"
      :close-on-click-modal="false" :close-on-press-escape="false" :before-close="beforeCirculateShowClose"
      :show-close="false">
      <div>111</div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="cleanSpliceData">取消</el-button>
@@ -1884,56 +1023,28 @@
      </span>
    </el-dialog>
    <!-- 电力试验室---温升试验/热循环 -->
    <el-dialog
      :title="temperatureTitle"
      :visible.sync="temperatureShow"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="260px"
      :before-close="temperatureShowClose"
      :show-close="false"
    >
    <el-dialog :title="temperatureTitle" :visible.sync="temperatureShow" :close-on-click-modal="false"
      :close-on-press-escape="false" width="260px" :before-close="temperatureShowClose" :show-close="false">
      <div>
        <div v-if="isShowInput" style="margin-bottom: 6px">
          <span>循环次数:</span>
          <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> -->
          <el-input-number
            v-model="temperatureTestNum"
            :min="2"
            :max="1000000"
            size="small"
            label=""
          ></el-input-number>
          <el-input-number v-model="temperatureTestNum" :min="2" :max="1000000" size="small" label=""></el-input-number>
        </div>
        <el-checkbox-group
          v-model="temperatureTest"
          @change="handleTemperatureTestChange"
          style="display: flex;flex-direction: column;"
        >
          <el-checkbox
            v-for="item in temperatureList"
            :label="item"
            :key="item"
            style="margin-bottom: 6px"
            >{{ item }}</el-checkbox
          >
        <el-checkbox-group v-model="temperatureTest" @change="handleTemperatureTestChange"
          style="display: flex;flex-direction: column;">
          <el-checkbox v-for="item in temperatureList" :label="item" :key="item" style="margin-bottom: 6px">{{ item
            }}</el-checkbox>
        </el-checkbox-group>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="cleanTemperatureTest">取消</el-button>
        <el-button type="primary" @click="spliceTemperatureTest"
          >保存</el-button
        >
        <el-button type="primary" @click="spliceTemperatureTest">保存</el-button>
      </span>
    </el-dialog>
    <!-- 功率容量--填写端口 -->
    <el-dialog
      title="填写端口"
      :visible.sync="powerShow"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      width="50%"
    >
    <el-dialog title="填写端口" :visible.sync="powerShow" :close-on-click-modal="false" :close-on-press-escape="false"
      width="50%">
      <el-table :data="powerTable" border style="width: 100%">
        <el-table-column fixed prop="sample" label="样品" min-width="150">
        </el-table-column>
@@ -1943,13 +1054,7 @@
        </el-table-column>
        <el-table-column prop="ask" label="端口" min-width="120">
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.ask"
              :min="1"
              :max="100"
              label="端口"
              size="small"
            ></el-input-number>
            <el-input-number v-model="scope.row.ask" :min="1" :max="100" label="端口" size="small"></el-input-number>
          </template>
        </el-table-column>
      </el-table>
@@ -1958,18 +1063,9 @@
        <el-button type="primary" @click="savePowerTest">保存</el-button>
      </span>
    </el-dialog>
    <el-dialog
      title="文件预览"
      :visible.sync="lookFileVisible"
      width="60%"
      fullscreen
    >
      <filePreview
        v-if="lookFileVisible"
        :fileUrl="currentFile.url"
        :currentFile="currentFile"
        style="max-height: 87vh;overflow-y: auto;"
      />
    <el-dialog title="文件预览" :visible.sync="lookFileVisible" width="60%" fullscreen>
      <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" :currentFile="currentFile"
        style="max-height: 87vh;overflow-y: auto;" />
    </el-dialog>
    <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">
      双方承诺:<br />
@@ -2238,12 +1334,12 @@
        sort: false,
        init: false,
        do: [
          {
            id: "handleDown",
            font: "下载",
            type: "text",
            method: "handleDown"
          },
          // {
          //   id: "handleDown",
          //   font: "下载",
          //   type: "text",
          //   method: "handleDown"
          // },
          {
            id: "1",
            font: "预览",
@@ -2436,7 +1532,7 @@
            }
          }
        })
        .catch(error => {});
        .catch(error => { });
    },
    handleChangeUpload(file, fileLists) {
      this.fileList = fileLists;
@@ -2873,13 +1969,13 @@
            return code[index] + "" + num;
          }
        }
      } catch (e) {}
      } catch (e) { }
    },
    handleTell(tell, symbolItem, value) {
      try {
        let num = this.replaceAll(tell, symbolItem, value);
        return num;
      } catch (e) {}
      } catch (e) { }
    },
    replaceAll(str, find, value) {
      if (str === undefined) {
@@ -2980,16 +2076,16 @@
                let num0 = set.size;
                set.add(
                  sampleList[i].insProduct[j].inspectionItem +
                    "-" +
                    sampleList[i].insProduct[j].inspectionItemSubclass
                  "-" +
                  sampleList[i].insProduct[j].inspectionItemSubclass
                );
                let num1 = set.size;
                if (num0 == num1) {
                  this.$message.error(
                    sampleList[i].insProduct[j].inspectionItem +
                      "-" +
                      sampleList[i].insProduct[j].inspectionItemSubclass +
                      "重复"
                    "-" +
                    sampleList[i].insProduct[j].inspectionItemSubclass +
                    "重复"
                  );
                  return;
                }
@@ -3494,8 +2590,8 @@
                  a.model =
                    a.model +
                    (a.modelNum == null ||
                    a.modelNum == "" ||
                    a.modelNum == "null"
                      a.modelNum == "" ||
                      a.modelNum == "null"
                      ? ""
                      : "-" + a.modelNum);
                }
@@ -3503,8 +2599,8 @@
                a.model =
                  a.model +
                  (a.modelNum == null ||
                  a.modelNum == "" ||
                  a.modelNum == "null"
                    a.modelNum == "" ||
                    a.modelNum == "null"
                    ? ""
                    : "-" + a.modelNum);
              }
@@ -3899,7 +2995,7 @@
          row.manHour = arr2[index];
          row.price = arr3[index];
          row.tell = arr4[index];
        } catch (e) {}
        } catch (e) { }
      }
      if (
        row.bsm === "1" &&
@@ -4010,8 +3106,8 @@
      this.$axios
        .get(
          this.$api.insOrder.selectInsOrderTemplate +
            "?company=" +
            this.addObj.company
          "?company=" +
          this.addObj.company
        )
        .then(res => {
          if (res.code == 201) return;
@@ -4041,7 +3137,7 @@
              this.$message.error("删除失败");
            });
        })
        .catch(() => {});
        .catch(() => { });
    },
    // 保存模板
    addTemplateDia() {
@@ -4055,7 +3151,7 @@
            .then(() => {
              this.saveTemplateDia();
            })
            .catch(() => {});
            .catch(() => { });
        } else {
          this.saveTemplateDia();
        }
src/components/view/b1-report-preparation.vue
@@ -1,85 +1,90 @@
<style scoped>
  .title {
    height: 60px;
    line-height: 60px;
  }
.title {
  height: 60px;
  line-height: 60px;
}
  .search {
    background-color: #fff;
    height: 80px;
    display: flex;
    align-items: center;
  }
.search {
  background-color: #fff;
  height: 80px;
  display: flex;
  align-items: center;
}
  .search_thing {
    display: flex;
    align-items: center;
    height: 50px;
  }
.search_thing {
  display: flex;
  align-items: center;
  height: 50px;
}
  .search_label {
    width: 120px;
    font-size: 14px;
    text-align: right;
  }
.search_label {
  width: 120px;
  font-size: 14px;
  text-align: right;
}
  .search_input {
    width: calc(100% - 120px);
  }
.search_input {
  width: calc(100% - 120px);
}
  .table {
    margin-top: 10px;
    background-color: #fff;
    width: calc(100% - 40px);
    height: calc(100% - 60px - 80px - 10px - 40px);
    padding: 20px;
  }
.table {
  margin-top: 10px;
  background-color: #fff;
  width: calc(100% - 40px);
  height: calc(100% - 60px - 80px - 10px - 40px);
  padding: 20px;
}
  .el-form-item {
    margin-bottom: 16px;
  }
.el-form-item {
  margin-bottom: 16px;
}
  .full-screen {
    position: absolute;
    right: 52px;
    top: 22px;
  }
.full-screen {
  position: absolute;
  right: 52px;
  top: 22px;
}
  .btns {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translate(0, -50%);
    display: flex;
    align-items: center;
  }
.btns {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translate(0, -50%);
  display: flex;
  align-items: center;
}
  .fullscreen {
    height: 82vh
  }
  .img-list{
    width: 100%;
    display: flex;
  }
  .list{
    display: flex;
    justify-content: flex-start;
    align-items: center;
  }
  .list-item{
    width: 120px;
    height: 120px;
    margin: 4px;
    cursor: pointer;
    box-sizing: border-box;
    border: 1px solid #fff;
  }
  .list-item:hover{
     border: 1px solid #3A7BFA;
  }
  .list-item.active{
     border: 1px solid #3A7BFA;
  }
.fullscreen {
  height: 82vh
}
.img-list {
  width: 100%;
  display: flex;
}
.list {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.list-item {
  width: 120px;
  height: 120px;
  margin: 4px;
  cursor: pointer;
  box-sizing: border-box;
  border: 1px solid #fff;
}
.list-item:hover {
  border: 1px solid #3A7BFA;
}
.list-item.active {
  border: 1px solid #3A7BFA;
}
</style>
<template>
@@ -88,14 +93,15 @@
      <div>
        <el-row class="title">
          <el-col :span="12" style="text-align: left;">
            <el-radio-group v-model="radio"size="medium" fill="#3A7BFA">
            <span>报告编制</span>
            <!-- <el-radio-group v-model="radio"size="medium" fill="#3A7BFA">
              <el-radio-button label="0">报告编制</el-radio-button>
              <el-radio-button label="1">订单</el-radio-button>
            </el-radio-group>
            </el-radio-group> -->
          </el-col>
        </el-row>
      </div>
      <div class="search" style="position: relative;" v-if="radio==0">
      <div class="search" style="position: relative;" v-if="radio == 0">
        <div class="search_thing">
          <div class="search_label">报告编号:</div>
          <div class="search_input"><el-input size="small" placeholder="请输入" clearable
@@ -113,38 +119,28 @@
          <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
        </div>
        <div class="btns">
          <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading" style="margin-right: 16px;">批量下载</el-button>
          <el-upload
            class="upload-demo"
            :action="action"
            :headers="headers"
            :show-file-list="false"
            accept=".zip"
            :limit="1"
            :before-upload="beforeUpload"
            :on-success="handleSuccess"
            ref="upload"
            :on-error="onError">
          <el-button size="small" type="primary" @click="handleDowns" :loading="outLoading"
            style="margin-right: 16px;">批量下载</el-button>
          <el-upload class="upload-demo" :action="action" :headers="headers" :show-file-list="false" accept=".zip"
            :limit="1" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload" :on-error="onError">
            <el-button size="small" type="primary" :loading="inLoading">批量上传</el-button>
          </el-upload>
        </div>
      </div>
      <div class="table" v-if="radio==0">
        <ValueTable ref="ValueTable" :url="$api.insReport.pageInsReport"
                    :isColumnWidth="true"
                    :componentData="componentData"
          :key="upIndex" />
      <div class="table" v-if="radio == 0">
        <ValueTable ref="ValueTable" :url="$api.insReport.pageInsReport" :isColumnWidth="true"
          :componentData="componentData" :key="upIndex" />
      </div>
      <Order v-if="radio==1"/>
      <Order v-if="radio == 1" />
    </div>
    <el-dialog title="在线编制" :visible.sync="claimVisible" width="22cm" :modal-append-to-body="false"
      :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
          v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;">
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
      </div>
      <Word style="height:70vh" :class="{fullscreen:fullscreen}" v-if="claimVisible" ref="Word" :value="value" />
      <Word style="height:70vh" :class="{ fullscreen: fullscreen }" v-if="claimVisible" ref="Word" :value="value" />
      <span slot="footer" class="dialog-footer">
        <el-button @click="claimVisible = false">取 消</el-button>
        <el-button type="primary" @click="confirmClaim">确 定</el-button>
@@ -153,687 +149,688 @@
    <el-dialog title="报告审核" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
      :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
          v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
      </div>
      <div style="height: 78vh;" v-if="issuedVisible">
         <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
         <!-- <filePreview v-if="issuedVisible" :fileUrl="currentFile.url"
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
        <!-- <filePreview v-if="issuedVisible" :fileUrl="currentFile.url"
         :currentFile="currentFile" style="max-height: 100%;overflow-y: auto;"/> -->
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button @click="issuedReasonVisible=true" :disabled="loadingIssued">不通过</el-button>
                <el-button type="primary" @click="subIssued" :loading="loadingIssued">通 过</el-button>
            </span>
        </el-dialog>
        <el-button @click="issuedReasonVisible = true" :disabled="loadingIssued">不通过</el-button>
        <el-button type="primary" @click="subIssued" :loading="loadingIssued">通 过</el-button>
      </span>
    </el-dialog>
    <el-dialog title="不通过原因" :visible.sync="issuedReasonVisible" width="400px" :modal-append-to-body="false">
      <div class="search_thing">
        <div class="search_label">不通过原因:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="reason"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="issuedReasonVisible=false" :disabled="loadingIssuedReason">取消</el-button>
                <el-button type="primary" @click="handleIssuedReason" :loading="loadingIssuedReason">确定</el-button>
            </span>
        </el-dialog>
    <el-dialog title="报告批准" :visible.sync="approveVisible" width="80vw" :modal-append-to-body="false" :fullscreen="fullscreen">
        <el-button @click="issuedReasonVisible = false" :disabled="loadingIssuedReason">取消</el-button>
        <el-button type="primary" @click="handleIssuedReason" :loading="loadingIssuedReason">确定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="报告批准" :visible.sync="approveVisible" width="80vw" :modal-append-to-body="false"
      :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
          v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
      </div>
      <div style="height: 78vh;" v-if="approveVisible">
         <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
         <!-- <filePreview v-if="approveVisible" :fileUrl="currentFile.url"
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
        <!-- <filePreview v-if="approveVisible" :fileUrl="currentFile.url"
         :currentFile="currentFile" style="max-height: 100%;overflow-y: auto;"/> -->
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button @click="approveReasonVisible=true" :disabled="loadingApprove">不批准</el-button>
                <el-button type="primary" @click="subApprove" :loading="loadingApprove">批 准</el-button>
            </span>
        </el-dialog>
        <el-button @click="approveReasonVisible = true" :disabled="loadingApprove">不批准</el-button>
        <el-button type="primary" @click="subApprove" :loading="loadingApprove">批 准</el-button>
      </span>
    </el-dialog>
    <el-dialog title="印章选择" :visible.sync="imgVisible" width="50vw" :modal-append-to-body="false"
    :close-on-click-modal="false"
    :close-on-press-escape="false">
      :close-on-click-modal="false" :close-on-press-escape="false">
      <div class="img-list">
        <label style="width: 120px;">印章选择:</label>
        <div class="list" style="flex: 1;">
          <div class="list-item" :class="{active:currentImg==m.id}" v-for="m in imgList" @click="currentImg = m.id">
            <img :src="javaApi+'/img/'+m.address" alt="" style="width: 118px;height: 118px;">
          <div class="list-item" :class="{ active: currentImg == m.id }" v-for="m in imgList"
            @click="currentImg = m.id">
            <img :src="javaApi + '/img/' + m.address" alt="" style="width: 118px;height: 118px;">
          </div>
        </div>
      </div>
      <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="subApprove0" :loading="loadingApprove">确 认</el-button>
            </span>
        </el-dialog>
        <el-button type="primary" @click="subApprove0" :loading="loadingApprove">确 认</el-button>
      </span>
    </el-dialog>
    <el-dialog title="不批准原因" :visible.sync="approveReasonVisible" width="400px" :modal-append-to-body="false">
      <div class="search_thing">
        <div class="search_label">不批准原因:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="reason"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="approveReasonVisible=false" :disabled="loadingApproveReason">取消</el-button>
                <el-button type="primary" @click="handleApproveReason" :loading="loadingApproveReason">确定</el-button>
            </span>
        </el-dialog>
    <el-dialog
      title="文件预览"
      :visible.sync="lookFileVisible"
       fullscreen :modal="false">
      <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
      :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
        <el-button @click="approveReasonVisible = false" :disabled="loadingApproveReason">取消</el-button>
        <el-button type="primary" @click="handleApproveReason" :loading="loadingApproveReason">确定</el-button>
      </span>
    </el-dialog>
    <el-dialog title="文件预览" :visible.sync="lookFileVisible" fullscreen :modal="false">
      <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url" :currentFile="currentFile"
        style="max-height: 87vh;overflow-y: auto;" />
    </el-dialog>
    <!--报告查看-->
    <el-dialog :fullscreen="fullscreen" top="5vh" :modal-append-to-body="false" :visible.sync="viewIssuedVisible" title="报告查看"
               width="80vw">
    <el-dialog :fullscreen="fullscreen" top="5vh" :modal-append-to-body="false" :visible.sync="viewIssuedVisible"
      title="报告查看" width="80vw">
      <div class="full-screen">
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"></i>
        <img v-else alt="" src="../../../static/img/no-full.svg" style="cursor: pointer;" @click="fullscreen=false;" >
        <i v-if="!fullscreen" class="el-icon-full-screen" style="cursor: pointer;font-size: 18px"
          @click="fullscreen = true;"></i>
        <img v-else alt="" src="../../../static/img/no-full.svg" style="cursor: pointer;" @click="fullscreen = false;">
      </div>
      <div v-if="viewIssuedVisible" style="height: 80vh;">
        <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
      </div>
    </el-dialog>
    </div>
  </div>
</template>
<script>
  import ValueTable from '../tool/value-table.vue'
  import onlyoffice from '../tool/onlyoffice.vue'
  import Order from '../do/b1-report-preparation/order.vue'
  import filePreview from '../tool/file-preview.vue'
  export default {
    components: {
      ValueTable,
      onlyoffice,
      Order,
      filePreview
    },
    data() {
import ValueTable from '../tool/value-table.vue'
import onlyoffice from '../tool/onlyoffice.vue'
import Order from '../do/b1-report-preparation/order.vue'
import filePreview from '../tool/file-preview.vue'
export default {
  components: {
    ValueTable,
    onlyoffice,
    Order,
    filePreview
  },
  data() {
    return {
      lookFileVisible: false,
      currentFile: {
        url: ''
      },
      radio: 0,
      componentData: {
        entity: {
          entrustCode: null,
          code: null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: true,
        select: true,
        selectMethod: 'handleChange',
        do: [
          // {
          //   id: 'handleWeave',
          //   font: '编制',
          //   type: 'text',
          //   method: 'handleWeave',
          //   disabFun: (row, index) => {
          //     return row.isExamine != null
          //   }
          // },
          {
            id: 'download',
            font: '下载',
            type: 'text',
            method: 'download'
          }, {
            id: 'handleUpload',
            font: '上传',
            type: 'upload',
            uploadConfig: {
              url: this.$api.insReport.inReport,
              accept: '.docx'
            },
            method: 'handleUpload',
            disabFun: (row, index) => {
              return row.isExamine != null
            }
          }, {
            id: 'handleRestore',
            font: '还原',
            type: 'text',
            method: 'handleRestore',
            disabFun: (row, index) => {
              return row.isExamine != null
            }
          }, {
            id: 'handleSubmit',
            font: '提交',
            type: 'text',
            method: 'handleSubmit',
            disabFun: (row, index) => {
              return row.state != 0
            }
          }, {
            id: 'handleIssued',
            font: '审核',
            type: 'text',
            method: 'handleIssued',
            disabFun: (row, index) => {
              return row.state == null || row.state == 0 || row.isExamine == 1
            }
          }, {
            id: 'handleApprove',
            font: '批准',
            type: 'text',
            method: 'handleApprove',
            disabFun: (row, index) => {
              return row.state == null || row.state == 0 || row.isExamine == 0 || row.isExamine == null || row
                .isRatify == 1
            }
          }
        ],
        linkEvent: {
          code: {
            method: 'selectAllByOne'
          }
        },
        tagField: {
          isRatify: {
            select: [{
              value: 0,
              type: 'danger',
              label: '不批准'
            }, {
              value: 1,
              type: 'success',
              label: '批准'
            }]
          },
          isExamine: {
            select: [{
              value: 0,
              type: 'danger',
              label: '不通过'
            }, {
              value: 1,
              type: 'success',
              label: '通过'
            }]
          },
          state: {
            select: [{
              value: 0,
              type: 'danger',
              label: '待提交'
            }, {
              value: 1,
              type: 'success',
              label: '已提交'
            }]
          }
        },
        selectField: {},
        requiredAdd: [],
        needSort: ['createTime', 'state', 'writeTime', 'isExamine', 'examineTime', 'ratifyTime'],
        requiredUp: []
      },
      entityCopy: {},
      upIndex: 0,
      statusList: [],
      claimVisible: false,
      issuedVisible: false,
      issuedReasonVisible: false,
      approveVisible: false,
      approveReasonVisible: false,
      fullscreen: false,
      loadingApproveReason: false,
      loadingApprove: false,
      loadingIssuedReason: false,
      loadingIssued: false,
      value: ``,
      reason: '',
      currentInfo: null,
      option: null,
      mutiList: [],
      outLoading: false,
      inLoading: false,
      imgList: [],
      imgVisible: false,
      currentImg: null,
      viewIssuedVisible: false
    }
  },
  computed: {
    headers() {
      return {
        lookFileVisible:false,
        currentFile:{
          url:''
        },
        radio:0,
        componentData: {
          entity: {
            entrustCode: null,
            code: null,
            orderBy: {
              field: 'id',
              order: 'desc'
            }
          },
          isIndex: true,
          showSelect: true,
          select: true,
          selectMethod: 'handleChange',
          do: [
            // {
            //   id: 'handleWeave',
            //   font: '编制',
            //   type: 'text',
            //   method: 'handleWeave',
            //   disabFun: (row, index) => {
            //     return row.isExamine != null
            //   }
            // },
            {
              id: 'download',
              font: '下载',
              type: 'text',
              method: 'download'
            }, {
              id: 'handleUpload',
              font: '上传',
              type: 'upload',
              uploadConfig: {
                url: this.$api.insReport.inReport,
                accept: '.docx'
              },
              method: 'handleUpload',
              disabFun: (row, index) => {
                return row.isExamine != null
              }
            }, {
              id: 'handleRestore',
              font: '还原',
              type: 'text',
              method: 'handleRestore',
              disabFun: (row, index) => {
                return row.isExamine != null
              }
            }, {
              id: 'handleSubmit',
              font: '提交',
              type: 'text',
              method: 'handleSubmit',
              disabFun: (row, index) => {
                return row.state != 0
              }
            }, {
              id: 'handleIssued',
              font: '审核',
              type: 'text',
              method: 'handleIssued',
              disabFun: (row, index) => {
                return row.state == null || row.state == 0 || row.isExamine == 1
              }
            }, {
              id: 'handleApprove',
              font: '批准',
              type: 'text',
              method: 'handleApprove',
              disabFun: (row, index) => {
                return row.state == null || row.state == 0 || row.isExamine == 0 || row.isExamine == null || row
                  .isRatify == 1
              }
            }
          ],
          linkEvent: {
            code: {
              method: 'selectAllByOne'
            }
          },
          tagField: {
            isRatify: {
              select: [{
                value: 0,
                type: 'danger',
                label: '不批准'
              }, {
                value: 1,
                type: 'success',
                label: '批准'
              }]
            },
            isExamine: {
              select: [{
                value: 0,
                type: 'danger',
                label: '不通过'
              }, {
                value: 1,
                type: 'success',
                label: '通过'
              }]
            },
            state: {
              select: [{
                value: 0,
                type: 'danger',
                label: '待提交'
              }, {
                value: 1,
                type: 'success',
                label: '已提交'
              }]
            }
          },
          selectField: {},
          requiredAdd: [],
          needSort: ['createTime', 'state', 'writeTime', 'isExamine', 'examineTime', 'ratifyTime'],
          requiredUp: []
        },
        entityCopy: {},
        upIndex: 0,
        statusList: [],
        claimVisible: false,
        issuedVisible: false,
        issuedReasonVisible: false,
        approveVisible: false,
        approveReasonVisible: false,
        fullscreen: false,
        loadingApproveReason: false,
        loadingApprove: false,
        loadingIssuedReason: false,
        loadingIssued: false,
        value: ``,
        reason: '',
        currentInfo: null,
        option:null,
        mutiList:[],
        outLoading:false,
        inLoading:false,
        imgList:[],
        imgVisible:false,
        currentImg:null,
        viewIssuedVisible:false
        'token': sessionStorage.getItem('token')
      }
    },
    computed: {
            headers() {
                return {
                    'token': sessionStorage.getItem('token')
                }
            },
            action() {
                return this.javaApi + this.$api.insReport.upAll
            }
        },
    mounted() {
      this.entityCopy = this.HaveJson(this.componentData.entity)
      this.getPower()
    action() {
      return this.javaApi + this.$api.insReport.upAll
    }
  },
  mounted() {
    this.entityCopy = this.HaveJson(this.componentData.entity)
    this.getPower()
      // let that = this;
      // let input = document.getElementById('input');
      // input.onchange = function(){
      //   let file = this.files[0];
      //   let reader = new FileReader();
      //   reader.readAsArrayBuffer(file);
      //   reader.onload = function(loadEvent){
      //     convertToHtml({
      //     arrayBuffer: loadEvent.target.result })
      //     .then(res=>{
      //       that.value = res.value
      //         .replace('<h1>', '<h1 style="text-align: center;">')
      //         .replace('<h2>', '<h2 style="text-align: center;">')
      //         .replace('<img ','<img style="height:3.6cm;width:3.6cm"')
      //         .replace(/<table>/g, '<table style="border-collapse: collapse;border: 1px solid #000;">')
      //         .replace(/<tr>/g, '<tr style="height: 30px;">')
      //         .replace(/<td>/g, '<td style="border: 1px solid #000;">')
      //         .replace(/<p>/g, '<p style="text-indent: 2em;">')
      //         .replace(/<a [^>]*>/g, "")
      //         .replace(/<\/a>/g, "")
      //       console.log(11111111111,that.value)
      //       that.claimVisible = true;
      //     })
      //     .done();
      //   }
      // }
    // let that = this;
    // let input = document.getElementById('input');
    // input.onchange = function(){
    //   let file = this.files[0];
    //   let reader = new FileReader();
    //   reader.readAsArrayBuffer(file);
    //   reader.onload = function(loadEvent){
    //     convertToHtml({
    //     arrayBuffer: loadEvent.target.result })
    //     .then(res=>{
    //       that.value = res.value
    //         .replace('<h1>', '<h1 style="text-align: center;">')
    //         .replace('<h2>', '<h2 style="text-align: center;">')
    //         .replace('<img ','<img style="height:3.6cm;width:3.6cm"')
    //         .replace(/<table>/g, '<table style="border-collapse: collapse;border: 1px solid #000;">')
    //         .replace(/<tr>/g, '<tr style="height: 30px;">')
    //         .replace(/<td>/g, '<td style="border: 1px solid #000;">')
    //         .replace(/<p>/g, '<p style="text-indent: 2em;">')
    //         .replace(/<a [^>]*>/g, "")
    //         .replace(/<\/a>/g, "")
    //       console.log(11111111111,that.value)
    //       that.claimVisible = true;
    //     })
    //     .done();
    //   }
    // }
  },
  methods: {
    handleChange(arr) {
      this.mutiList = arr
    },
    methods: {
      handleChange(arr){
        this.mutiList = arr
      },
      handleDowns(){
        if(this.mutiList.length==0){
          this.$message.error('请选择报告')
          return
        }
        let str = this.mutiList.map(m=>m.id).join(',')
        this.outLoading = true
        this.$axios.get(this.$api.insReport.downAll+'?ids='+str).then(res => {
          this.outLoading = false
          this.$message.success('导出成功')
          // const blob = new Blob([res],{ type: 'application/octet-stream' });
          // const url = URL.createObjectURL(blob);
          // const link = document.createElement('a');
          // link.href = url;
          // link.download = '报告.zip';
          // link.click();
          const link = document.createElement('a');
          link.href = this.javaApi + res.message;
          link.target = '_blank';
          document.body.appendChild(link);
          link.click();
        })
      },
      beforeUpload(file){
        const isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
        if (!isZip) {
          this.$message.error('上传文件只能是 ZIP 格式!');
        }
        if(isZip){
          this.inLoading = true;
        }
        return isZip;
      },
      handleSuccess(response,){
        this.inLoading = false;
        if (response.code == 200) {
          this.$message.success('导入成功')
          this.refreshTable()
                }else{
          this.$message.error(response.message)
        }
      },
      async selectSeal(row){
        await this.$axios.post(this.$api.sealScope.selectSeal,{
          entity: {
            labId:row.labId,
                        orderBy: {
                            field: 'id',
                            order: 'asc'
                        }
                    },
          page:{
            current:-1,
            size:-1
          }
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res=>{
          this.imgList = res.data.body.records.map((m,i)=>{
            m.id = i + 1
            return m
          })
        })
      },
      onError(err, file, fileList,type) {
                this.$message.error('上传失败')
                this.$refs.upload.clearFiles()
            },
      refreshTable(e) {
        this.$refs['ValueTable'].selectList(e)
      },
      refresh() {
        this.componentData.entity = this.HaveJson(this.entityCopy)
        this.upIndex++
        this.$refs['ValueTable'].selectList(e)
      },
      async handleWeave(row) {
        let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
        fileName = fileName.replace('/word/','')
        const userName = JSON.parse(localStorage.getItem("user")).name;
        //参考vabOnlyOffice组件参数配置
        const { href } = this.$router.resolve({
          path: `/wordEdit`,
          query: {
            url: this.javaApi + "/word/" + fileName,
            isEdit: true,
            fileType: "docx",
            title: fileName,
            lang: 'zh-CN',
            isPrint: true,
            user_id: 1,
            user_name: userName,
            editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
          }
        })
        window.open(href, '_blank');
      },
      // 权限分配
      getPower(radio) {
        let power = JSON.parse(sessionStorage.getItem('power'))
        let edit = false
        let up = false
        let res = false
        let sub = false
        let issued = true
        let approve = true
        for (var i = 0; i < power.length; i++) {
          if (power[i].menuMethod == 'upReportFile') {
            edit = true
          }
          if (power[i].menuMethod == 'inReport') {
            up = true
          }
          if (power[i].menuMethod == 'upReportUrl') {
            res = true
          }
          if (power[i].menuMethod == 'writeReport') {
            sub = true
          }
          if (power[i].menuMethod == 'ratifyReport') {
            approve = true
          }
          if (power[i].menuMethod == 'examineReport') {
            issued = true
          }
        }
        if (!approve) {
          this.componentData.do.splice(5, 1)
        }
        if (!issued) {
          this.componentData.do.splice(4, 1)
        }
        if (!sub) {
          this.componentData.do.splice(3, 1)
        }
        if (!res) {
          this.componentData.do.splice(2, 1)
        }
        if (!up) {
          this.componentData.do.splice(1, 1)
        }
        // if (!edit) {
        //   this.componentData.do.splice(0, 1)
        // }
      },
      confirmClaim() {
        // console.log(this.$refs.Word.getValue())
      },
      async selectAllByOne(row) {
        // let url = row.urlS ? row.urlS : row.url;
        // this.currentFile.url = this.javaApi + url;
        // let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
        // fileName = fileName.replace('/word/','')
        // const userName = JSON.parse(localStorage.getItem("user")).name;
        // //参考vabOnlyOffice组件参数配置
        // const { href } = this.$router.resolve({
        //   path: `/wordEdit`,
        //   query: {
        //     url: this.javaApi + "/word/" + fileName,
        //     isEdit: false,
        //     fileType: "docx",
        //     title: fileName,
        //     lang: 'zh-CN',
        //     isPrint: true,
        //     user_id: 1,
        //     user_name: userName,
        //   }
        // })
        // window.open(href, '_blank');
        // this.lookFileVisible = true
        this.currentInfo = row;
        console.log(`output->row`,row);
        let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
        let fileType = "docx"
        if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
          fileName = row.tempUrlPdf
          fileType = "pdf"
        }
        fileName = fileName.replace('/word/','')
        const userName = JSON.parse(localStorage.getItem("user")).name;
        this.option = {
          url: this.javaApi + "/word/" + fileName,
          isEdit: false,
          fileType: fileType,
          title: fileName,
          lang: 'zh-CN',
          isPrint: false,
          user_id: 1,
          user_name: userName,
          editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
        }
        // console.log(this.javaApi + "/word/" + fileName);
        this.viewIssuedVisible = true;
      },
      download(row) {
        // 判断row对象中是否存在urlS属性,若存在则使用urlS,否则使用url
        let url = row.urlS ? row.urlS : row.url;
        // 创建一个<a>标签元素
    handleDowns() {
      if (this.mutiList.length == 0) {
        this.$message.error('请选择报告')
        return
      }
      let str = this.mutiList.map(m => m.id).join(',')
      this.outLoading = true
      this.$axios.get(this.$api.insReport.downAll + '?ids=' + str).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        // const blob = new Blob([res],{ type: 'application/octet-stream' });
        // const url = URL.createObjectURL(blob);
        // const link = document.createElement('a');
        // link.href = url;
        // link.download = '报告.zip';
        // link.click();
        const link = document.createElement('a');
        // 设置<a>标签的href属性,为javaApi和url的组合
        link.href = this.javaApi + url;
        // 设置<a>标签的target属性为'_blank',表示在新窗口中打开链接
        link.href = this.javaApi + res.message;
        link.target = '_blank';
        // 将<a>标签添加到文档的主体中
        document.body.appendChild(link);
        link.click();
      },
      // 还原操作
      handleRestore(row) {
        this.$axios.post(this.$api.insReport.upReportUrl, {
          id: row.id
        }).then(res => {
          if (res.code === 200) {
            this.$message.success('操作成功')
            this.refreshTable('page')
      })
    },
    beforeUpload(file) {
      const isZip = file.type === 'application/zip' || file.name.endsWith('.zip');
      if (!isZip) {
        this.$message.error('上传文件只能是 ZIP 格式!');
      }
      if (isZip) {
        this.inLoading = true;
      }
      return isZip;
    },
    handleSuccess(response,) {
      this.inLoading = false;
      if (response.code == 200) {
        this.$message.success('导入成功')
        this.refreshTable()
      } else {
        this.$message.error(response.message)
      }
    },
    async selectSeal(row) {
      await this.$axios.post(this.$api.sealScope.selectSeal, {
        entity: {
          labId: row.labId,
          orderBy: {
            field: 'id',
            order: 'asc'
          }
        },
        page: {
          current: -1,
          size: -1
        }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      }).then(res => {
        this.imgList = res.data.body.records.map((m, i) => {
          m.id = i + 1
          return m
        })
      },
      handleIssued(row) {
        this.currentInfo = row;
        // let url = row.urlS ? row.urlS : row.url;
        // this.currentFile.url = this.javaApi + url;
        let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
        fileName = fileName.replace('/word/','')
        const userName = JSON.parse(localStorage.getItem("user")).name;
        //参考vabOnlyOffice组件参数配置
        this.option = {
      })
    },
    onError(err, file, fileList, type) {
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    refreshTable(e) {
      this.$refs['ValueTable'].selectList(e)
    },
    refresh() {
      this.componentData.entity = this.HaveJson(this.entityCopy)
      this.upIndex++
      this.$refs['ValueTable'].selectList(e)
    },
    async handleWeave(row) {
      let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
      fileName = fileName.replace('/word/', '')
      const userName = JSON.parse(localStorage.getItem("user")).name;
      //参考vabOnlyOffice组件参数配置
      const { href } = this.$router.resolve({
        path: `/wordEdit`,
        query: {
          url: this.javaApi + "/word/" + fileName,
          isEdit: false,
          isEdit: true,
          fileType: "docx",
          title: fileName,
          lang: 'zh-CN',
          isPrint: true,
          user_id: 1,
          user_name: userName,
          editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
        }
        this.issuedVisible = true;
      },
      // 审核通过
      subIssued() {
        this.loadingIssued = true;
        this.$axios.post(this.$api.insReport.examineReport, {
          id: this.currentInfo.id,
          isExamine: 1
      })
      window.open(href, '_blank');
    },
    // 权限分配
    getPower(radio) {
      let power = JSON.parse(sessionStorage.getItem('power'))
      let edit = false
      let up = false
      let res = false
      let sub = false
      let issued = true
      let approve = true
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == 'upReportFile') {
          edit = true
        }
        if (power[i].menuMethod == 'inReport') {
          up = true
        }
        if (power[i].menuMethod == 'upReportUrl') {
          res = true
        }
        if (power[i].menuMethod == 'writeReport') {
          sub = true
        }
        if (power[i].menuMethod == 'ratifyReport') {
          approve = true
        }
        if (power[i].menuMethod == 'examineReport') {
          issued = true
        }
      }
      if (!approve) {
        this.componentData.do.splice(5, 1)
      }
      if (!issued) {
        this.componentData.do.splice(4, 1)
      }
      if (!sub) {
        this.componentData.do.splice(3, 1)
      }
      if (!res) {
        this.componentData.do.splice(2, 1)
      }
      if (!up) {
        this.componentData.do.splice(1, 1)
      }
      // if (!edit) {
      //   this.componentData.do.splice(0, 1)
      // }
    },
    confirmClaim() {
      // console.log(this.$refs.Word.getValue())
    },
    async selectAllByOne(row) {
      // let url = row.urlS ? row.urlS : row.url;
      // this.currentFile.url = this.javaApi + url;
      // let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
      // fileName = fileName.replace('/word/','')
      // const userName = JSON.parse(localStorage.getItem("user")).name;
      // //参考vabOnlyOffice组件参数配置
      // const { href } = this.$router.resolve({
      //   path: `/wordEdit`,
      //   query: {
      //     url: this.javaApi + "/word/" + fileName,
      //     isEdit: false,
      //     fileType: "docx",
      //     title: fileName,
      //     lang: 'zh-CN',
      //     isPrint: true,
      //     user_id: 1,
      //     user_name: userName,
      //   }
      // })
      // window.open(href, '_blank');
      // this.lookFileVisible = true
      this.currentInfo = row;
      console.log(`output->row`, row);
      let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
      let fileType = "docx"
      if (row.tempUrlPdf != null || row.tempUrlPdf === '') {
        fileName = row.tempUrlPdf
        fileType = "pdf"
      }
      fileName = fileName.replace('/word/', '')
      const userName = JSON.parse(localStorage.getItem("user")).name;
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: fileType,
        title: fileName,
        lang: 'zh-CN',
        isPrint: false,
        user_id: 1,
        user_name: userName,
        editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName
      }
      // console.log(this.javaApi + "/word/" + fileName);
      this.viewIssuedVisible = true;
    },
    download(row) {
      // 判断row对象中是否存在urlS属性,若存在则使用urlS,否则使用url
      let url = row.urlS ? row.urlS : row.url;
      // 创建一个<a>标签元素
      const link = document.createElement('a');
      // 设置<a>标签的href属性,为javaApi和url的组合
      link.href = this.javaApi + url;
      // 设置<a>标签的target属性为'_blank',表示在新窗口中打开链接
      link.target = '_blank';
      // 将<a>标签添加到文档的主体中
      document.body.appendChild(link);
      link.click();
    },
    // 还原操作
    handleRestore(row) {
      this.$axios.post(this.$api.insReport.upReportUrl, {
        id: row.id
      }).then(res => {
        if (res.code === 200) {
          this.$message.success('操作成功')
          this.refreshTable('page')
        }
      })
    },
    handleIssued(row) {
      this.currentInfo = row;
      // let url = row.urlS ? row.urlS : row.url;
      // this.currentFile.url = this.javaApi + url;
      let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
      fileName = fileName.replace('/word/', '')
      const userName = JSON.parse(localStorage.getItem("user")).name;
      //参考vabOnlyOffice组件参数配置
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: "docx",
        title: fileName,
        lang: 'zh-CN',
        isPrint: true,
        user_id: 1,
        user_name: userName,
      }
      this.issuedVisible = true;
    },
    // 审核通过
    subIssued() {
      this.loadingIssued = true;
      this.$axios.post(this.$api.insReport.examineReport, {
        id: this.currentInfo.id,
        isExamine: 1
      }).then(res => {
        this.loadingIssued = false;
        if (res.code === 201) {
          return
        }
        this.$message.success('提交成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.issuedVisible = false;
      }).catch(e => {
        this.$message.error('提交失败')
        this.loadingIssued = false;
      })
    },
    handleApprove(row) {
      this.currentInfo = row;
      // let url = row.urlS ? row.urlS : row.url;
      // this.currentFile.url = this.javaApi + url;
      let fileName = (row.urlS === null || row.urlS === '') ? row.url : row.urlS
      fileName = fileName.replace('/word/', '')
      const userName = JSON.parse(localStorage.getItem("user")).name;
      //参考vabOnlyOffice组件参数配置
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: "docx",
        title: fileName,
        lang: 'zh-CN',
        isPrint: true,
        user_id: 1,
        user_name: userName,
      }
      this.approveVisible = true;
    },
    // 批准通过
    async subApprove() {
      // this.currentInfo
      await this.selectSeal(this.currentInfo)
      this.approveVisible = false;
      this.imgVisible = true;
    },
    // 提交操作
    handleSubmit(row) {
      this.$confirm('是否提交当前报告?', "提交", {
        confirmButtonText: "提交",
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$axios.post(this.$api.insReport.writeReport, {
          id: row.id
        }).then(res => {
          this.loadingIssued = false;
          if (res.code === 201) {
            return
          }
          this.$message.success('提交成功')
          this.refreshTable('page')
          this.currentInfo = null;
          this.issuedVisible = false;
        }).catch(e => {
          this.$message.error('提交失败')
          this.loadingIssued = false;
        })
      },
      handleApprove(row) {
        this.currentInfo = row;
        // let url = row.urlS ? row.urlS : row.url;
        // this.currentFile.url = this.javaApi + url;
        let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS
        fileName = fileName.replace('/word/','')
        const userName = JSON.parse(localStorage.getItem("user")).name;
        //参考vabOnlyOffice组件参数配置
        this.option = {
          url: this.javaApi + "/word/" + fileName,
          isEdit: false,
          fileType: "docx",
          title: fileName,
          lang: 'zh-CN',
          isPrint: true,
          user_id: 1,
          user_name: userName,
        }
        this.approveVisible = true;
      },
      // 批准通过
      async subApprove() {
        // this.currentInfo
        await this.selectSeal(this.currentInfo)
        this.approveVisible = false;
        this.imgVisible = true;
      },
      // 提交操作
      handleSubmit(row) {
        this.$confirm('是否提交当前报告?', "提交", {
          confirmButtonText: "提交",
          cancelButtonText: "取消",
          type: "warning"
        }).then(() => {
          this.$axios.post(this.$api.insReport.writeReport, {
            id: row.id
          }).then(res => {
            if (res.code === 201) {
              return
            }
            this.$message.success('提交成功')
            this.refreshTable('page')
          }).catch(e => {
            this.$message.error('提交失败')
          })
        }).catch(() => {})
      },
      // 审核不通过原因提交
      handleIssuedReason() {
        if (!this.reason) {
          return this.$message.error('请输入原因')
        }
        this.loadingIssuedReason = true;
        this.$axios.post(this.$api.insReport.examineReport, {
          id: this.currentInfo.id,
          isExamine: 0,
          examineTell: this.reason
        }).then(res => {
          this.loadingIssuedReason = false;
          if (res.code === 201) {
            return
          }
          this.$message.success('操作成功')
          this.refreshTable('page')
          this.currentInfo = null;
          this.reason = '';
          this.issuedVisible = false;
          this.issuedReasonVisible = false;
        }).catch(e => {
          this.$message.error('操作失败')
          this.loadingIssuedReason = false;
        })
      },
      // 不批准原因提交
      handleApproveReason() {
        if (!this.reason) {
          return this.$message.error('请输入原因')
        }
        this.loadingApproveReason = true
        this.$axios.post(this.$api.insReport.examineReport, {
          id: this.currentInfo.id,
          isExamine: 0,
          examineTell: this.reason
        }).then(res => {
          this.loadingApproveReason = false
          if (res.code === 201) {
            return
          }
          this.$message.success('操作成功')
          this.refreshTable('page')
          this.currentInfo = null;
          this.reason = '';
          this.issuedVisible = false;
          this.issuedReasonVisible = false;
        }).catch(e => {
          this.$message.error('操作失败')
          this.loadingIssuedReason = false;
        })
      },
      subApprove0(){
        if(!(this.currentImg&&this.imgList.find(m=>m.id==this.currentImg))){
          this.$message.error('请选择印章')
      }).catch(() => { })
    },
    // 审核不通过原因提交
    handleIssuedReason() {
      if (!this.reason) {
        return this.$message.error('请输入原因')
      }
      this.loadingIssuedReason = true;
      this.$axios.post(this.$api.insReport.examineReport, {
        id: this.currentInfo.id,
        isExamine: 0,
        examineTell: this.reason
      }).then(res => {
        this.loadingIssuedReason = false;
        if (res.code === 201) {
          return
        }
        this.loadingApprove = true;
        this.$axios.post(this.$api.insReport.ratifyReport, {
          id: this.currentInfo.id,
          isRatify: 1,
          sealUrl:this.imgList.find(m=>m.id==this.currentImg).address
        }).then(res => {
          this.loadingApprove = false;
          if (res.code == 201) {
            this.$message.error('批准失败')
            return
          }
          this.$message.success('已批准')
          this.refreshTable('page')
          this.currentInfo = null;
          this.currentImg = null;
          this.imgVisible = false;
        })
        this.$message.success('操作成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.reason = '';
        this.issuedVisible = false;
        this.issuedReasonVisible = false;
      }).catch(e => {
        this.$message.error('操作失败')
        this.loadingIssuedReason = false;
      })
    },
    // 不批准原因提交
    handleApproveReason() {
      if (!this.reason) {
        return this.$message.error('请输入原因')
      }
      this.loadingApproveReason = true
      this.$axios.post(this.$api.insReport.examineReport, {
        id: this.currentInfo.id,
        isExamine: 0,
        examineTell: this.reason
      }).then(res => {
        this.loadingApproveReason = false
        if (res.code === 201) {
          return
        }
        this.$message.success('操作成功')
        this.refreshTable('page')
        this.currentInfo = null;
        this.reason = '';
        this.issuedVisible = false;
        this.issuedReasonVisible = false;
      }).catch(e => {
        this.$message.error('操作失败')
        this.loadingIssuedReason = false;
      })
    },
    subApprove0() {
      if (!(this.currentImg && this.imgList.find(m => m.id == this.currentImg))) {
        this.$message.error('请选择印章')
        return
      }
      this.loadingApprove = true;
      this.$axios.post(this.$api.insReport.ratifyReport, {
        id: this.currentInfo.id,
        isRatify: 1,
        sealUrl: this.imgList.find(m => m.id == this.currentImg).address
      }).then(res => {
        this.loadingApprove = false;
        if (res.code == 201) {
          this.$message.error('批准失败')
          return
        }
        this.$message.success('已批准')
        this.refreshTable('page')
        this.currentInfo = null;
        this.currentImg = null;
        this.imgVisible = false;
      })
    }
  }
}
</script>