spring
2025-03-13 893efaff3c2523976993063543dfedf4a5b412f3
Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
已修改15个文件
已删除1个文件
4615 ■■■■■ 文件已修改
src/api/business/reportPreparation.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/device.js 291 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/standard/standardLibrary.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Table/lims-table.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/borrow.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/fault.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/maintenance.vue 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/record.vue 54 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/device/component/state.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/add.vue 146 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/cable-config.vue 311 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/equip-config.vue 820 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/fiberoptic-config-readonly.vue 1859 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/fiberoptic-config.vue 576 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionOrder/index.vue 440 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/reportPreparation/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/business/reportPreparation.js
@@ -154,3 +154,12 @@
        params: params
    })
}
export function getURL(params) {
    return resquest({
        url: '/file/attachmentType/getURL',
        method: 'get',
        params: params
    })
}
src/api/cnas/resourceDemand/device.js
@@ -155,9 +155,9 @@
  });
}
//使用记录 å¯¼å‡º
export function exportUseRecord(query) {
export function deviceRecordExport(query) {
  return request({
    url: "/deviceRecord/exportUseRecord",
    url: "/deviceRecord/deviceRecordExport",
    method: "get",
    responseType: "blob",
    params: query,
@@ -398,41 +398,6 @@
  });
}
//设备维护删除
export function deleteDeviceMaintenance(query) {
  return request({
    url: "/deviceMaintain/deleteDeviceMaintenance",
    method: "delete",
    params: query,
  });
}
//设备维护删除
export function deviceMaintenanceExport(query) {
  return request({
    url: "/deviceMaintain/deviceMaintenanceExport",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// æ–°å¢žè®¾å¤‡ç»´æŠ¤ä¿å…»
export function addDeviceMaintenance(data) {
  return request({
    url: "/deviceMaintain/addDeviceMaintenance",
    method: "post",
    data: data,
  });
}
//设备维护表 æŸ¥è¯¢
export function getDeviceMaintenancePage(query) {
  return request({
    url: "/deviceMaintain/getDeviceMaintenancePage",
    method: "get",
    params: query,
  });
}
// å€Ÿç”¨-保存
export function saveDeviceBorrow(data) {
  return request({
@@ -534,208 +499,6 @@
    params: query,
  });
}
//设备报废申请列表
export function pageDeviceScrapped(query) {
  return request({
    url: "/deviceScrapped/pageDeviceScrapped",
    method: "get",
    params: query,
  });
}
// å¯¼å‡º
export function exportDeviceScrapped(query) {
  return request({
    url: "/deviceScrapped/exportDeviceScrapped",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//删除设备报废申请
export function delDeviceScrapped(query) {
  return request({
    url: "/deviceScrapped/delDeviceScrapped",
    method: "delete",
    params: query,
  });
}
//查询设备报废申请
export function getDeviceScrapped(query) {
  return request({
    url: "/deviceScrapped/getDeviceScrapped",
    method: "get",
    params: query,
  });
}
// æ–°å¢žè®¾å¤‡æŠ¥åºŸç”³è¯·
export function addDeviceScrapped(data) {
  return request({
    url: "/deviceScrapped/addDeviceScrapped",
    method: "post",
    data: data,
  });
}
//设备故障维修列表
export function pageDeviceBreakdownMaintenance(query) {
  return request({
    url: "/deviceBreakdownMaintenance/pageDeviceBreakdownMaintenance",
    method: "get",
    params: query,
  });
}
// è®¾å¤‡æ•…障与维修-导出
export function exportDeviceBreakdownMaintenance(query) {
  return request({
    url: "/deviceBreakdownMaintenance/exportDeviceBreakdownMaintenance",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//删除设备故障维修
export function delDeviceBreakdownMaintenance(query) {
  return request({
    url: "/deviceBreakdownMaintenance/delDeviceBreakdownMaintenance",
    method: "delete",
    params: query,
  });
}
//查询设备故障维修
export function getDeviceBreakdownMaintenance(query) {
  return request({
    url: "/deviceBreakdownMaintenance/getDeviceBreakdownMaintenance",
    method: "get",
    params: query,
  });
}
// æ–°å¢žè®¾å¤‡æ•…障维修
export function addDeviceBreakdownMaintenance(data) {
  return request({
    url: "/deviceBreakdownMaintenance/addDeviceBreakdownMaintenance",
    method: "post",
    data: data,
  });
}
//分页查询设备点检记录
export function getDeviceInspectionRecordByPage(query) {
  return request({
    url: "/deviceInspectionRecord/getDeviceInspectionRecordByPage",
    method: "get",
    params: query,
  });
}
// å¯¼å‡ºè®¾å¤‡ç‚¹æ£€è®°å½•
export function exportDeviceInspectionRecord(query) {
  return request({
    url: "/deviceInspectionRecord/exportDeviceInspectionRecord",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//删除设备点检记录
export function deleteDeviceInspectionRecord(query) {
  return request({
    url: "/deviceInspectionRecord/deleteDeviceInspectionRecord",
    method: "delete",
    params: query,
  });
}
//设备点检记录详情
export function getDeviceInspectionRecord(query) {
  return request({
    url: "/deviceInspectionRecord/getDeviceInspectionRecord",
    method: "get",
    params: query,
  });
}
// æ–°å¢žè®¾å¤‡ç‚¹æ£€è®°å½•
export function addDeviceInspectionRecord(data) {
  return request({
    url: "/deviceInspectionRecord/addDeviceInspectionRecord",
    method: "post",
    data: data,
  });
}
// ä¿®æ”¹è®¾å¤‡ç‚¹æ£€è®°å½•
export function updateDeviceInspectionRecord(data) {
  return request({
    url: "/deviceInspectionRecord/updateDeviceInspectionRecord",
    method: "post",
    data: data,
  });
}
// å¤æ ¸è®¾å¤‡ç‚¹æ£€è®°å½•
export function reviewDeviceInspectionRecord(data) {
  return request({
    url: "/deviceInspectionRecord/reviewDeviceInspectionRecord",
    method: "post",
    data: data,
  });
}
//设备事故报告列表
export function pageDeviceAccidentReport(query) {
  return request({
    url: "/deviceAccidentReport/pageDeviceAccidentReport",
    method: "get",
    params: query,
  });
}
// å¯¼å‡ºè®¾å¤‡äº‹æ•…
export function exportDeviceAccidentReport(query) {
  return request({
    url: "/deviceAccidentReport/exportDeviceAccidentReport",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//删除设备事故报告
export function delDeviceAccidentReport(query) {
  return request({
    url: "/deviceAccidentReport/delDeviceAccidentReport",
    method: "delete",
    params: query,
  });
}
//查询设备事故报告
export function getDeviceAccidentReport(query) {
  return request({
    url: "/deviceAccidentReport/getDeviceAccidentReport",
    method: "get",
    params: query,
  });
}
// æ–°å¢žè®¾å¤‡äº‹æ•…报告
export function addDeviceAccidentReport(data) {
  return request({
    url: "/deviceAccidentReport/addDeviceAccidentReport",
    method: "post",
    data: data,
  });
}
//作业指导书查询
export function pageByPageQueryOfHomeworkInstructions(query) {
  return request({
@@ -821,14 +584,7 @@
    params: query,
  });
}
// è®¾å¤‡è¿è¡Œæ€»è§ˆ-根据id获取设备故障数据
export function device(query) {
  return request({
    url: "/deviceFaults/device",
    method: "get",
    params: query,
  });
}
//设备验收中四个table表格的删除功能
export function deleteIncidentReportAll(query) {
  return request({
@@ -879,6 +635,14 @@
    responseType: "blob"
  });
}
// è®¾å¤‡è¿è¡Œæ€»è§ˆ-根据id获取设备故障数据
export function device(query) {
  return request({
    url: "/deviceFaults/device",
    method: "get",
    params: query,
  });
}
//添加设备故障
export function addOrUpdateDeviceFaultOne(query) {
  return request({
@@ -913,4 +677,37 @@
    params: query,
  });
}
//设备维护 å¯¼å‡º
export function deviceMaintenanceExport(query) {
  return request({
    url: "/deviceMaintain/deviceMaintenanceExport",
    method: "get",
    params: query,
    responseType: "blob"
  });
}
//设备维护 åˆ é™¤
export function deleteMaintain(query) {
  return request({
    url: "/deviceMaintain/delete",
    method: "delete",
    params: query,
  });
}
//设备维护 æ–°å¢ž
export function addMaintain(query) {
  return request({
    url: "/deviceMaintain/add",
    method: "post",
    data: query,
  });
}
//设备维护 æŸ¥è¯¢
export function getDeviceMaintenancePage(query) {
  return request({
    url: "/deviceMaintain/getDeviceMaintenancePage",
    method: "get",
    params: query,
  });
}
src/api/standard/standardLibrary.js
@@ -159,3 +159,12 @@
    method: "get",
  });
}
// ä»…获取光纤的型号
export function getStandTreeBySampleType(query) {
  return request({
    url: "/standardTree/getStandTreeBySampleType",
    method: "get",
    params:query
  });
}
src/components/Table/lims-table.vue
@@ -1,7 +1,8 @@
<template>
  <div>
    <!-- è¡¨æ ¼ -->
    <el-table ref="multipleTable" v-loading="tableLoading" :border="border" :data="tableData"
    <el-table ref="multipleTable" v-loading="tableLoading" element-loading-text="加载中..."
      element-loading-spinner="el-icon-loading" :border="border" :data="tableData"
      :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" :height="height"
      :highlight-current-row="highlightCurrentRow" :row-class-name="rowClassName" :row-style="rowStyle"
      :row-key="rowKey" :span-method="spanMethod" :stripe="stripe" style="width: 100%" tooltip-effect="dark"
src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -58,7 +58,7 @@
              </el-col>
              <el-col :span="12">
                <el-form-item label="借用人联系方式:" prop="borrowerContactInformation" label-width="150px">
                  <el-input v-model="form.borrowerContactInformation" size="small"></el-input>
                  <el-input v-model="form.borrowerContactInformation" :disabled="currentStep > 0" size="small"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
@@ -341,7 +341,7 @@
    // ç›‘听点击el-tree的数据,进行数据刷新
    clickNodeVal(newVal) {
      if (newVal.value) {
        thisqueryParams.deviceId = this.clickNodeVal.value
        this.queryParams.deviceId = this.clickNodeVal.value
        this.refreshTable()
      }
    },
src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -525,7 +525,7 @@
      exportRewardAndPunishmentRecords({deviceId: this.clickNodeVal.value}).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$dowmload.saveAs(blob, '设备故障表.xlsx')
        this.$download.saveAs(blob, '设备故障表.xlsx')
      })
    },
    selectAllByOne(row) {
src/views/CNAS/resourceDemand/device/component/maintenance.vue
@@ -68,12 +68,14 @@
          <el-col :span="24">
            <el-form-item :rules="[{ required: true, message: '请输入维护内容', trigger: 'blur' }]" label="维护内容:"
                          prop="content">
              <el-input v-model="formData.content" placeholder="请输入" size="small" type="textarea"></el-input>
              <el-input v-model="formData.content" :disabled="!this.editMode" placeholder="请输入" size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item :rules="[{ required: true, message: '请选择维护时间', trigger: 'blur' }]" label="维护时间:" prop="date">
              <el-date-picker v-model="formData.date" format="yyyy-MM-dd" placeholder="选择日期" size="small"
              <el-date-picker v-model="formData.date" format="yyyy-MM-dd" placeholder="选择日期"
                              size="small"
                              :disabled="!this.editMode"
                              style="width:100%" type="date" value-format="yyyy-MM-dd">
              </el-date-picker>
            </el-form-item>
@@ -92,6 +94,7 @@
                          prop="nextDate">
              <el-date-picker
                  v-model="formData.nextDate"
                  :disabled="!this.editMode"
                  :picker-options="{ disabledDate: this.disabledDate }"
                  format="yyyy-MM-dd"
                  placeholder="选择日期" size="small"
@@ -103,12 +106,12 @@
          </el-col>
          <el-col :span="12">
            <el-form-item :rules="[{ required: true, message: '请输入维护人', trigger: 'blur' }]" label="维护人:" prop="name">
              <el-input v-model="formData.name" clearable placeholder="请输入" size="small"></el-input>
              <el-input v-model="formData.name" clearable placeholder="请输入" :disabled="!this.editMode" size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="备注:">
              <el-input v-model="formData.comments" placeholder="请输入" size="small" type="textarea"></el-input>
              <el-input v-model="formData.comments" placeholder="请输入" :disabled="!this.editMode" size="small" type="textarea"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -123,12 +126,12 @@
<script>
import {
  exportMaintenanceRecord,
  deleteDeviceMaintenance,
  selectDeviceByCode,
  addDeviceMaintenance,
  getDeviceMaintenancePage, deviceMaintenanceExport,
} from '@/api/cnas/resourceDemand/device.js'
  addMaintain,
  deleteMaintain,
  deviceMaintenanceExport, getDeviceMaintenancePage,
  selectDeviceByCode
} from "@/api/cnas/resourceDemand/device";
export default {
  props: {
    clickNodeVal: {
@@ -168,6 +171,15 @@
      }
      return false
    },
    //导出
    handleDown() {
      this.outLoading = true
      deviceMaintenanceExport({deviceId: this.clickNodeVal.value}).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '设备维护.xlsx')
      })
    },
    handleSizeChange(val) {
      this.search.size = val
      this.getAllMessage(this.clickNodeVal.value)
@@ -182,15 +194,6 @@
      this.dialogVisible = true;
      this.formData = row;
    },
    // å¯¼å‡º
    handleDownOne() {
      this.outLoading = true
      deviceMaintenanceExport({ deviceId: this.clickNodeVal.value }).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '设备维护.xlsx')
      })
    },
    //操作详情删除
    handleDeleteClick(index, row) {
      this.$confirm('此操作将永久删除该文件, æ˜¯å¦ç»§ç»­?', '提示', {
@@ -198,8 +201,8 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        deleteDeviceMaintenance({ id: row.id }).then(res => {
          this.getAllMessage(this.clickNodeVal.value)
        deleteMaintain({id: row.id}).then(res => {
          this.MaintainParam.splice(index, 1);
          this.$message({
            type: 'success',
            message: '删除成功!'
@@ -228,15 +231,15 @@
      this.$refs['form'].validate((valid) => {
        if (valid) {
          this.formData.deviceId = this.clickNodeVal.value;
          addDeviceMaintenance(this.formData).then(res => {
          addMaintain(this.formData).then(res => {
            if (res.code == 200) {
              this.$message.success('添加成功');
              this.getAllMessage(this.clickNodeVal.value)
              // this.MaintainParam.push(this.formData)
              this.dialogVisible = false;
              this.formData = {}; //清空表单
              this.getAllMessage(this.clickNodeVal.value)
            }
          })
          // this.MaintainParam.push(this.formData)
        }
      })
    },
@@ -251,10 +254,13 @@
    },
    //获取表单设备维护信息
    getAllMessage(deviceId) {
      getDeviceMaintenancePage({
        deviceId,
        ...this.search
      }).then(res => {
      const params = {
        deviceId: deviceId,
        size: this.search.size,
        current: this.search.current,
        deviceNumber: this.search.deviceNumber,
      }
      getDeviceMaintenancePage(params).then(res => {
        if (res.code == 200) {
          this.MaintainParam = res.data.records
          this.search.total = res.data.total
@@ -303,10 +309,10 @@
.search {
  background-color: #fff;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
  margin-top: 10px;
}
.search_thing {
@@ -339,7 +345,4 @@
  transform: translate(0, -50%);
}
.form .search_label {
  width: 120px;
}
</style>
src/views/CNAS/resourceDemand/device/component/record.vue
@@ -112,7 +112,7 @@
                        type="textarea"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
          <el-col :span="24">
            <el-form-item :rules="[{ required: true, message: '请输入使用日期', trigger: 'blur' }]" label="使用日期:"
                          prop="useDateList">
@@ -125,24 +125,13 @@
                  start-placeholder="开始日期"
                  end-placeholder="结束日期">
              </el-date-picker>
              <!-- <el-date-picker
                v-model="form.useDateList" :disabled="isShow" end-placeholder="结束日期" format="yyyy-MM-dd HH:mm:ss"
                size="small"
                start-placeholder="开始日期"
                style="width:100%"
                type="datetimerange"
                value-format="yyyy-MM-dd HH:mm:ss">
              </el-date-picker> -->
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item :rules="[{ required: true, message: '请输入使用人', trigger: 'change' }]" label="使用人:"
            <el-form-item :rules="[{ required: true, message: '请输入使用人', trigger: 'blur' }]"
                          label="使用人:"
                          prop="usePerson">
              <el-input v-model="form.usePerson" :disabled="isShow" size="small" style="width:100%"></el-input>
              <!-- <el-select v-model="form.usePerson" placeholder="请选择" :disabled="isShow" size="small" style="width:100%">
                <el-option v-for="item in responsiblePersonList" :key="item.name" :label="item.name" :value="item.id">
                </el-option>
              </el-select> -->
            </el-form-item>
          </el-col>
          <el-col :span="24">
@@ -162,11 +151,9 @@
<script>
import {
  deviceRecordPage,
  exportUseRecord,
  selectDeviceByCode,
  saveDeviceRecord,
  updateDeviceRecord,
  deleteDeviceRecord,
  deleteDeviceRecord, deviceRecordExport,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/system/user";
export default {
@@ -224,7 +211,6 @@
        remark: '',
      },
      dialogVisible: false,
      operationType: '',
      formParamList: [],
    }
  },
@@ -264,25 +250,20 @@
        }
      })
    },
    // æ‰“开导出弹框选择编制人、批准人
    openHandleOut() {
      this.ratifyDialog = true
    },
    //导出
    handleDown() {
      this.outLoading = true
      exportUseRecord({
      deviceRecordExport({
        deviceId: this.clickNodeVal.value,
        exportDate: this.exportDate
      }).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '设备使用记录.doc')
        this.$download.saveAs(blob, '设备使用记录.xlsx')
      })
    },
    //新建
    openAdd() {
      this.operationType = 'add'
      this.getUserList()
      selectDeviceByCode({ id: this.clickNodeVal.value }).then(res => {
        this.form.deviceName = res.data.deviceName
@@ -292,12 +273,6 @@
        })
      });
    },
    usePersonName(value) {
      const index = this.userList.findIndex(item => item.id === value)
      if (index > -1) {
        this.form.usePerson = this.userList[index].name
      }
    },
    //确认添加记录
    saveRecord() {
      this.$refs.form.validate((valid) => {
@@ -305,7 +280,6 @@
          this.form.useStartDate = this.form.useDateList[0]
          this.form.useEndDate = this.form.useDateList[1]
          this.form.deviceId = this.clickNodeVal.value
          if (this.operationType === 'add') {
            saveDeviceRecord(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('新增成功')
@@ -314,24 +288,14 @@
              }
            })
            this.dialogVisible = false;
          } else {
            updateDeviceRecord(this.form).then(res => {
              if (res.code == 200) {
                this.$message.success('修改成功')
                this.getTableList(this.clickNodeVal.value)
                this.dialogVisible = false
              }
            })
            this.dialogVisible = false;
          }
        }
      });
    },
    //查看详情
    showDetailsDialog(type, row) {
      this.operationType = type;
    showDetailsDialog(row) {
      console.log(row)
      this.dialogVisible = true;
      this.isShow = true;
      this.getUserList()
      this.form = row;
      let list = []
@@ -459,7 +423,7 @@
}
.search_label {
  width: 140px;
  width: 74px;
  font-size: 14px;
  text-align: right;
  margin-right: 10px;
src/views/CNAS/resourceDemand/device/component/state.vue
@@ -43,10 +43,9 @@
        <el-table-column label="当前状态" min-width="130" prop="currentState"></el-table-column>
        <el-table-column label="当前责任人" min-width="180" prop="currentResponsible"></el-table-column>
        <!-- æ“ä½œæŒ‰é’® -->
        <el-table-column fixed="right" label="操作" min-width="150">
        <el-table-column fixed="right" label="操作" min-width="120" align="center">
          <template #default="{ row }">
            <el-button size="small" type="text" @click="handleViewClick(row)">查看</el-button>
            <el-button size="small" type="text" @click="handleDownOne(row)">导出</el-button>
            <el-button size="small" type="text" @click="handleDeleteClick(row)">删除</el-button>
          </template>
        </el-table-column>
@@ -240,7 +239,6 @@
import {
  saveDeviceState,
  selectDeviceByCode,
  exportDeviceStatus,
  deleteDeviceState,
  deviceStateExport,
  getDeviceStatePage,
@@ -422,15 +420,6 @@
        this.$refs['form'].clearValidate()
      })
      this.dialogVisible = true
    },
    // å¯¼å‡º
    handleDownOne(row) {
      this.outLoading = true
      exportDeviceStatus({ deviceId: row.deviceId, processNumber: row.processNumber }).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '设备停/启用.doc')
      })
    },
    // åˆ é™¤
    handleDeleteClick(row) {
src/views/business/inspectionOrder/add.vue
@@ -1,9 +1,6 @@
<template>
  <div class="bg-1">
    <div
      v-show="!configShow && !equipConfigShow && !cableConfigShow"
      style="margin: 5px 15px"
    >
    <div style="margin: 5px 15px" v-show="!configShow && !equipConfigShow">
      <el-row class="title">
        <el-col :span="6"
          >委托单信息&nbsp;&nbsp;&nbsp;总价:<span style="color: #3a7bfa"
@@ -80,17 +77,17 @@
            v-show="active == 3 && addObj.companyId"
            >通过</el-button
          >
          <el-button size="medium" @click="$router.go(-1)">
          <el-button
            size="medium"
            @click="$router.push('/business/inspectionOrder')"
          >
            <span style="color: #3a7bfa">返回</span>
          </el-button>
        </el-col>
      </el-row>
    </div>
    <basic-container>
      <div
        class="search"
        v-show="!configShow && !equipConfigShow && !cableConfigShow"
      >
    <basic-container v-show="!configShow && !equipConfigShow">
      <div class="search">
        <el-form
          :model="addObj"
          :rules="formRule"
@@ -395,7 +392,7 @@
    </basic-container>
    <div
      class="search"
      v-if="active == 1"
      v-if="active == 1 && !configShow && !equipConfigShow"
      style="display: flex; background: transparent"
    >
      <div style="display: flex; align-items: center">
@@ -443,7 +440,7 @@
        </div>
      </div>
    </div>
    <basic-container>
    <basic-container v-show="!configShow && !equipConfigShow">
      <div style="height: auto">
        <el-table
          class="el-table sampleTable"
@@ -909,22 +906,21 @@
    <el-dialog
      title="检验下发"
      :visible.sync="issuedDialogVisible"
      width="400px"
      width="450px"
      :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">
            <div class="search_label">
              <span class="required-span">* </span>约定时间:
            </div>
            <div class="search_input">
        <el-row style="margin-bottom: 20px">
          <el-col :span="8" style="text-align: right">
            <div><span class="required-span">* </span>约定时间:</div>
          </el-col>
          <el-col :span="16">
              <el-date-picker
                size="small"
                v-model="distributeData.appointed"
                :picker-options="pickerOptions"
              :picker-options="{ disabledDate: this.disabledDate }"
                type="date"
                placeholder="选择日期"
                value-format="yyyy-MM-dd"
@@ -932,14 +928,16 @@
                format="yyyy-MM-dd"
              >
              </el-date-picker>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22">
            <div class="search_label">
        </el-row>
        <el-row style="margin-bottom: 20px">
          <el-col :span="8" style="text-align: right">
            <div>
              <span class="required-span" v-if="addObj.type == 2">* </span
              >指派人员:
            </div>
            <div class="search_input">
          </el-col>
          <el-col :span="16">
              <el-select
                multiple
                v-model="distributeData.userId"
@@ -963,17 +961,16 @@
                  </el-option>
                </el-option-group>
              </el-select>
            </div>
          </el-col>
          <el-col
            class="search_thing"
            :span="22"
        </el-row>
        <el-row
            v-if="distributeData.userId.length > 0"
          style="margin-bottom: 20px"
          >
            <div class="search_label">
              <span class="required-span">* </span>试验室:
            </div>
            <div class="search_input">
          <el-col :span="8" style="text-align: right">
            <div><span class="required-span">* </span>试验室:</div>
          </el-col>
          <el-col :span="16">
              <el-select
                v-model="distributeData.sonLaboratory"
                placeholder="请选择"
@@ -989,13 +986,13 @@
                >
                </el-option>
              </el-select>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22">
            <div class="search_label">
              <span class="required-span">* </span>创建委托单:
            </div>
            <div class="search_input">
        </el-row>
        <el-row style="margin-bottom: 20px">
          <el-col :span="8" style="text-align: right">
            <div><span class="required-span">* </span>创建委托单:</div>
          </el-col>
          <el-col :span="16">
              <el-select
                v-model="distributeData.isCreate"
                placeholder="请选择"
@@ -1006,7 +1003,6 @@
                <el-option label="是" :value="true"></el-option>
                <el-option label="否" :value="false"></el-option>
              </el-select>
            </div>
          </el-col>
        </el-row>
      </div>
@@ -1022,17 +1018,15 @@
    <el-dialog title="不通过原因" :visible.sync="noDialogVisible" width="400px">
      <div class="body" style="max-height: 60vh">
        <el-row>
          <el-col class="search_thing" :span="22">
            <div class="search_label">
              <span class="required-span">* </span>不通过原因:
            </div>
            <div class="search_input">
          <el-col :span="8" style="text-align: right">
            <div><span class="required-span">* </span>不通过原因:</div>
          </el-col>
          <el-col :span="16">
              <el-input
                v-model="tell"
                size="small"
                placeholder="请输入不通过原因"
              ></el-input>
            </div>
          </el-col>
        </el-row>
      </div>
@@ -1055,7 +1049,7 @@
      :active="active"
      :inspectionItemST="inspectionItemST"
    />
    <fiberOpticConfigTwo
    <fiberOpticConfigReadOnly
      :currentId="currentId"
      v-if="configShow && examine == 1"
      :active="active"
@@ -1065,7 +1059,6 @@
      v-if="equipConfigShow"
      :active="active"
    />
    <cableConfig v-if="cableConfigShow" :active="active" />
    <!--    å•选特殊值处理框-->
    <el-dialog
      title="检测到特殊项,请作出以下选择"
@@ -1572,7 +1565,6 @@
import fiberOpticConfig from "./fiberoptic-config.vue";
import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue";
import equipConfig from "./equip-config.vue";
import cableConfig from "./cable-config.vue";
import getLodop from "@/utils/lodop";
import { bigEval } from "@/utils/bigEval";
import { getDicts } from "@/api/system/dict/data";
@@ -1581,7 +1573,6 @@
    fiberOpticConfig,
    fiberOpticConfigReadOnly,
    equipConfig,
    cableConfig,
  },
  computed: {
    ...mapGetters(["nickName", "loginUserInfo"]),
@@ -1593,14 +1584,6 @@
      examine: 0,
      active: 0,
      currentId: 0,
      pickerOptions: {
        disabledDate(time) {
          // å½“前时间加上三天的时间戳
          const threeDaysLater = Date.now() + 24 * 60 * 60 * 1000;
          // ç¦ç”¨ä¸‰å¤©åŽä¹‹å‰çš„æ‰€æœ‰æ—¥æœŸ
          return time.getTime() < threeDaysLater;
        },
      },
      fiberLoss: [],
      qrDataList: [],
      isFocus: false,
@@ -1769,7 +1752,6 @@
      bsm1Dia: false,
      bsm1DiaAll: false,
      equipConfigShow: false,
      cableConfigShow: false,
      bsm2: false,
      bsm2Val: null,
      bsm2Dia: false,
@@ -1887,7 +1869,7 @@
    },
  },
  created() {
    this.active = this.$route.query.active;
    this.active = Number(this.$route.query.active);
    this.currentId = this.$route.query.currentId;
    this.examine = this.$route.query.examine;
    this.isReview = this.$route.query.isReview;
@@ -1934,6 +1916,15 @@
    }
  },
  methods: {
    //下次核查日期:禁用在核查日期前的日期
    disabledDate(time) {
      if (time) {
        let now = new Date();
        now.setHours(0, 0, 0, 0);
        return time < now.getTime();
      }
      return false;
    },
    changeType(type) {
      this.hasSendUrgentOrder(type)
        .then((res) => {
@@ -3324,6 +3315,20 @@
          b.id = null;
          delete b.bsmRow;
        });
        if (a.bushing && a.bushing.length > 0) {
          a.bushing.forEach((b) => {
            b.fiber.forEach((c) => {
              c.productList.forEach((d) => {
                d.id = null;
              });
            });
            b.fibers.forEach((c) => {
              c.productList.forEach((d) => {
                d.id = null;
              });
            });
          });
        }
      });
      this.editTable.forEach((item) => {
        sampleList.forEach((a) => {
@@ -3358,7 +3363,7 @@
          if (res.code === 200) {
            this.$message.success("已提交");
            this.bsm3Dia = false;
            this.$router.go(-1);
            this.$router.push("/business/inspectionOrder");
          }
          this.saveLoad = false;
        })
@@ -3369,7 +3374,6 @@
    },
    upInsOrderOfState(state) {
      if (state == 1) {
        //this.saveLoad = true
        this.issuedDialogVisible = true;
        selectOrderManDay({
          id: this.currentId,
@@ -3378,7 +3382,6 @@
            if (res.code === 200) {
              this.distributeData.orderId = this.currentId;
              this.distributeData.appointed = res.data;
              console.log("约定时间", this.distributeData.appointed);
            }
          })
          .catch((error) => {
@@ -3530,7 +3533,7 @@
                this.$message.success("提交成功");
                this.issuedDialogVisible = false;
                this.upLoad = false;
                this.$router.go(-1);
                this.$router.replace("/business/inspectionOrder");
                //审核通过后,自动打印二维码
                //TODO: ç”µåŠ›è¯•éªŒå®¤æš‚æ—¶ä¸ç”¨æ ‡ç­¾æ‰“å°
                if (
@@ -3808,7 +3811,6 @@
      val.forEach((a) => {
        this.productIds.push(a.id);
      });
      console.log("selectChange", this.sampleList);
    },
    rowClick(row, column, event) {
      this.currentMethod = row;
@@ -4622,7 +4624,7 @@
            this.tell = "";
            this.$message.success("提交成功");
            this.issuedDialogVisible = false;
            this.$router.go(-1);
            this.$router.push("/business/inspectionOrder");
          }
        })
        .catch((error) => {
@@ -4695,20 +4697,6 @@
          return;
        }
        this.equipConfigShow = true;
      } else {
        if (this.sampleId === null) {
          this.$message.error("未选中样品");
          return;
        }
      }
    },
    openCableConfig() {
      if (this.active === 1) {
        if (this.sampleIds.length === 0) {
          this.$message.error("未选择样品");
          return;
        }
        this.cableConfigShow = true;
      } else {
        if (this.sampleId === null) {
          this.$message.error("未选中样品");
src/views/business/inspectionOrder/cable-config.vue
ÎļþÒÑɾ³ý
src/views/business/inspectionOrder/equip-config.vue
@@ -2,54 +2,152 @@
  <div class="ins_order_config">
    <div>
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;text-align: left;">子样品配置</el-col>
        <el-col :span="18" style="text-align: right;">
          <el-button size="medium" type="primary" @click="addChild" v-if="active==1">添加子样品</el-button>
          <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">保 å­˜</el-button>
        <el-col :span="6" style="padding-left: 20px; text-align: left"
          >子样品配置</el-col
        >
        <el-col :span="18" style="text-align: right">
          <el-button
            size="medium"
            type="primary"
            @click="addChild"
            v-if="active == 1"
            >添加子样品</el-button
          >
          <el-button
            size="medium"
            type="primary"
            @click="save"
            :loading="saveLoad"
            v-if="active == 1"
            >保 å­˜</el-button
          >
          <el-button size="medium" @click="outConfig">
            <span style="color: #3A7BFA;">返 å›ž</span>
            <span style="color: #3a7bfa">返 å›ž</span>
          </el-button>
        </el-col>
      </el-row>
    </div>
    <div class="center">
      <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="50%" tooltip-effect="dark"
        border highlight-current-row @row-click="rowClick" @current-change="selectSample">
        <!-- <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"
        height="50%"
        tooltip-effect="dark"
        border
        highlight-current-row
        @row-click="rowClick"
        @current-change="selectSample"
      >
        <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"></el-input>
            <el-input
              size="small"
              v-model="scope.row.sample"
              clearable
              :readonly="active > 1"
            ></el-input>
          </template>
        </el-table-column>
        <el-table-column prop="sampleCode" label="样品编号" min-width="140" align="center">
        <el-table-column
          prop="sampleCode"
          label="样品编号"
          min-width="140"
          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="型号参数" width="130" align="center" v-if="!(active>1)">
        <el-table-column
          prop="modelNum"
          label="型号参数"
          width="130"
          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="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%;">
              <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%"
            >
              <el-option
                v-for="item in methods"
                :key="item.id"
                :label="item.code"
                :value="item.id"
              >
              </el-option>
            </el-select>
          </template>
@@ -58,59 +156,162 @@
        </el-table-column>
        <el-table-column label="操作" width="120">
          <template slot-scope="scope">
            <el-button @click.native.prevent="deleteRow(scope.$index, sampleList)" type="text"
              size="small">删除</el-button>
            <el-button
              @click.native.prevent="deleteRow(scope.$index, sampleList)"
              type="text"
              size="small"
              >删除</el-button
            >
          </template>
        </el-table-column>
      </el-table>
      <el-table class="el-table" ref="productTable" :data="productList" height="50%" tooltip-effect="dark" border
        @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
        :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll">
        <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column>
        <el-table-column prop="inspectionItem" label="检验项" min-width="140" show-overflow-tooltip></el-table-column>
        <el-table-column prop="inspectionItemSubclass" label="检验项子项" min-width="140"
          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="methodS" label="试验方法" min-width="120" show-overflow-tooltip>
      <el-table
        class="el-table"
        ref="productTable"
        :data="productList"
        height="50%"
        tooltip-effect="dark"
        border
        @selection-change="selectProduct"
        style="margin-bottom: 10px"
        @select="upProductSelect"
        :row-class-name="tableRowClassName"
        v-loading="getProductLoad"
        @select-all="handleAll"
      >
        <el-table-column
          type="selection"
          width="65"
          :selectable="selectable"
          v-if="active == 1"
        ></el-table-column>
        <el-table-column
          prop="inspectionItem"
          label="检验项"
          min-width="140"
          show-overflow-tooltip
        ></el-table-column>
        <el-table-column
          prop="inspectionItemSubclass"
          label="检验项子项"
          min-width="140"
          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="methodS"
          label="试验方法"
          min-width="120"
          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="section" label="区间" min-width="120" 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="section"
          label="区间"
          min-width="120"
          show-overflow-tooltip
        ></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)"
              v-if="active==1&&isAskOnlyRead"></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)"
              v-if="active == 1 && isAskOnlyRead"
            ></el-input>
            <span v-else>{{ scope.row.ask }}</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <el-dialog title="选择子样品" :visible.sync="selectStandardTree" width="400px" @closed="addObj.sampleNum = 1">
      <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree">
        <el-row style="margin-bottom: 10px;">
    <el-dialog
      title="选择子样品"
      :visible.sync="selectStandardTree"
      width="400px"
      @closed="addObj.sampleNum = 1"
    >
      <div
        class="body"
        style="height: 60vh; overflow-y: auto; user-select: none"
        v-if="selectStandardTree"
      >
        <el-row style="margin-bottom: 10px">
          <el-col :span="24">
            <label>样品数量:</label>
            <el-input-number v-model="addObj.sampleNum" :min="1" label="请输入数量" size="small"></el-input-number>
            <el-input-number
              v-model="addObj.sampleNum"
              :min="1"
              label="请输入数量"
              size="small"
            ></el-input-number>
          </el-col>
        </el-row>
        <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>
@@ -121,24 +322,42 @@
        <el-button type="primary" @click="activeStandardTree">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false"
      :before-close="beforeClose">
      <div class="body" style="max-height: 60vh;">
    <el-dialog
      title="检测到特殊项,请作出以下选择"
      :visible.sync="bsm1Dia"
      width="500px"
      :show-close="false"
      :before-close="beforeClose"
    >
      <div class="body" style="max-height: 60vh">
        <el-row v-if="bsm1">
          <el-col class="search_thing" :span="22">
            <div class="search_label"><span class="required-span">* </span>护套密度:</div>
            <div class="search_label">
              <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"></el-radio>
                <el-radio
                  v-for="(a, ai) in JSON.parse(bsmRow.section)"
                  :key="ai"
                  :label="a"
                ></el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22">
            <div class="search_label">要求值:</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>
@@ -149,11 +368,18 @@
</template>
<script>
import {
  getStandTreeBySampleType,
  selectStandardTreeList2,
  selectStandardMethodEnum,
  selectsStandardMethodByFLSSM,
  selectStandardProductList,
} from "@/api/standard/standardLibrary";
  export default {
    props: {
      active: {
        type: Number,
        default: () => 0
      default: () => 0,
      },
    },
    data() {
@@ -166,7 +392,7 @@
        sampleIds: [],
        isAskOnlyRead: false,
        selectStandardTree: false,
        search: '',
      search: "",
        expandedKeys: [],
        addObj: {
          sampleNum: 1,
@@ -183,7 +409,7 @@
          modelNum: null,
          sampleNum: 1,
          isLeave: 0,
          unit: null
        unit: null,
        },
        currentMethod: null,
        methods: [],
@@ -194,336 +420,391 @@
        bsm1Val: null,
        bsm1Dia: false,
        list: [],
        parentSample: []
      }
      parentSample: [],
    };
    },
    mounted() {
      this.selectStandardTreeList()
      this.selectStandardMethods()
      this.$parent.sampleIds.forEach(a => {
    this.selectStandardTreeList();
    this.selectStandardMethods();
    this.$parent.sampleIds.forEach((a) => {
        for (var i = 0; i < this.$parent.sampleList.length; i++) {
          if (this.$parent.sampleList[i].id == a) {
            this.sampleList = this.$parent.sampleList[i].childSampleList
            this.parentSample.push(this.$parent.sampleList[i])
            break
          this.sampleList = this.$parent.sampleList[i].childSampleList;
          this.parentSample.push(this.$parent.sampleList[i]);
          break;
          }
        }
      })
    });
    },
    methods: {
      selectStandardTreeList() {
        this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => {
          this.list = res.data
          this.list.forEach(a => {
            this.expandedKeys.push(a.label)
      selectStandardTreeList()
        .then((res) => {
          if (res.code === 200) {
            this.list = res.data;
            this.list.forEach((a) => {
              this.expandedKeys.push(a.label);
            });
          }
          })
        })
        .catch((error) => {
          console.error(error);
        });
      },
      save() {
        if (this.sampleList.length === 0) {
          this.$message.error('缺少配置无法保存')
          return
        this.$message.error("缺少配置无法保存");
        return;
        }
        this.parentSample.forEach(a => {
          a.childSampleList = this.sampleList
        })
        this.$message.success('已保存')
      this.parentSample.forEach((a) => {
        a.childSampleList = this.sampleList;
      });
      this.$message.success("已保存");
      },
      deleteRow(index, rows) {
        this.productList = []
      this.productList = [];
        rows.splice(index, 1);
      },
      outConfig() {
        this.$parent.equipConfigShow = false
      this.$parent.equipConfigShow = false;
      },
      addChild() {
        this.selectStandardTree = true
      this.selectStandardTree = true;
      },
      selectSample(val) {
        if (val === null) return
        this.sampleIds = [val.id]
      if (val === null) return;
      this.sampleIds = [val.id];
      },
      rowClick(row, column, event) {
        this.currentMethod = row
        let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
        if (obj && obj.code == '委托要求') {
          this.isAskOnlyRead = true
      this.currentMethod = row;
      let obj = this.methods.find(
        (a) => a.id == this.currentMethod.standardMethodListId
      );
      if (obj && obj.code == "委托要求") {
        this.isAskOnlyRead = true;
        } else {
          this.isAskOnlyRead = false
        this.isAskOnlyRead = false;
        }
        this.sampleId = row.id
      this.sampleId = row.id;
        if (this.active !== 1) {
          this.sampleIds = []
          this.sampleIds.push(row.id)
        this.sampleIds = [];
        this.sampleIds.push(row.id);
        }
        this.productList = row.insProduct
      this.productList = row.insProduct;
        setTimeout(() => {
          this.productList.forEach(a => {
            if (a.state == 1) this.toggleSelection(a)
          })
        }, 200)
        this.productList.forEach((a) => {
          if (a.state == 1) this.toggleSelection(a);
        });
      }, 200);
      },
      toggleSelection(row) {
        this.$refs.productTable.toggleRowSelection(row, true);
      },
      selectable() {
        if (this.active > 1) {
          return false
        return false;
        } else {
          return true
        return true;
        }
      },
      handleChangeModel(e) {
        let num = this.selectTree.split('-').length;
      let num = this.selectTree.split("-").length;
        if (num != 5) {
          this.selectTree = this.selectTree + ' - ' + e
        this.selectTree = this.selectTree + " - " + e;
        } else {
          let arr = this.selectTree.split('-')
          let arr0 = arr.slice(0, arr.length - 1)
          this.selectTree = arr0.join('-') + '- ' + e
        let arr = this.selectTree.split("-");
        let arr0 = arr.slice(0, arr.length - 1);
        this.selectTree = arr0.join("-") + "- " + e;
        }
      },
      methodChange(val, row) {
        if (val === null || val === '') return
        this.currentMethod = row
        let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId)
        if (obj && obj.code == '委托要求') {
          this.isAskOnlyRead = true
      if (val === null || val === "") return;
      this.currentMethod = row;
      let obj = this.methods.find(
        (a) => a.id == this.currentMethod.standardMethodListId
      );
      if (obj && obj.code == "委托要求") {
        this.isAskOnlyRead = true;
        } else {
          this.isAskOnlyRead = false
        this.isAskOnlyRead = false;
        }
        this.getProductLoad = true
        this.$axios.post(this.$api.standardTree.selectStandardProductList, {
          model: row.model + '-' + row.modelNum,
      this.getProductLoad = true;
      selectStandardProductList({
        model: row.model + "-" + row.modelNum,
          standardMethodListId: val,
          factory: this.selectTree,
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          res.data.forEach(a => {
            a.state = 0
          })
          row.insProduct = this.HaveJson(res.data)
          this.getProductLoad = false
          this.productList = row.insProduct
          this.$refs.sampleTable.setCurrentRow(row)
        .then((res) => {
          if (res.code === 200) {
            res.data.forEach((a) => {
              a.state = 0;
            });
            row.insProduct = this.HaveJson(res.data);
            this.getProductLoad = false;
            this.productList = row.insProduct;
            this.$refs.sampleTable.setCurrentRow(row);
          setTimeout(() => {
            this.productList.forEach(a => {
              if (a.state == 1) this.toggleSelection(a)
              this.productList.forEach((a) => {
                if (a.state == 1) this.toggleSelection(a);
              });
            }, 200);
          }
            })
          }, 200)
        })
        .catch((error) => {
          console.error(error);
        });
      },
      methodFocus() {
        this.selectsStandardMethodByFLSSM()
      this.selectsStandardMethodByFLSSM();
      },
      selectStandardMethods() {
        this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => {
          this.methods = res.data
      selectStandardMethodEnum()
        .then((res) => {
          if (res.code === 200) {
            this.methods = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      selectsStandardMethodByFLSSM() {
        this.methodLoad = true
        this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree: this.selectTree
        }).then(res => {
          this.methodLoad = false
          try {
            if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) {
              let arr = this.selectTree.split('-')
              let arr0 = arr.slice(0, arr.length - 1)
              let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
              this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
                tree: selectTree
              }).then(ress => {
                this.methods = ress.data.standardMethodList
      this.methodLoad = true;
      selectsStandardMethodByFLSSM({
        tree: this.selectTree,
              })
        .then((res) => {
          if (res.code === 200) {
            this.methodLoad = false;
            try {
              if (
                res.data.standardMethodList.length == 0 &&
                this.selectTree.split("-").length == 5
              ) {
                let arr = this.selectTree.split("-");
                let arr0 = arr.slice(0, arr.length - 1);
                let selectTree = arr0
                  .join("-")
                  .substring(0, arr0.join("-").length - 1);
                selectsStandardMethodByFLSSM({
                  tree: selectTree,
                })
                  .then((res) => {
                    if (res.code === 200) {
                      this.methods = res.data.standardMethodList;
                    }
                  })
                  .catch((error) => {
                    console.error(error);
                  });
            } else {
              this.methods = res.data.standardMethodList
                this.methods = res.data.standardMethodList;
            }
          } catch (e) {}
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      selectProduct(val) {
        this.productIds = []
        val.forEach(a => {
          this.productIds.push(a.id)
        })
      this.productIds = [];
      val.forEach((a) => {
        this.productIds.push(a.id);
      });
      },
      upProductSelect(selection, row) {
        row.state = row.state == 1 ? 0 : 1
        if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
          if (row.section.indexOf('[') > -1) {
            this.bsmRow = this.HaveJson(row)
      row.state = row.state == 1 ? 0 : 1;
      if (
        row.bsm === "1" &&
        row.section !== "" &&
        row.section !== null &&
        row.state === 1
      ) {
        if (row.section.indexOf("[") > -1) {
          this.bsmRow = this.HaveJson(row);
          }
          this.bsm1 = true
          this.bsm1Dia = true
        } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
          this.bsm1 = false
        this.bsm1 = true;
        this.bsm1Dia = true;
      } else if (
        row.bsm === "1" &&
        row.section !== "" &&
        row.section !== null &&
        row.state === 0
      ) {
        this.bsm1 = false;
        }
        this.sampleList.map(item => {
      this.sampleList.map((item) => {
          if (this.sampleIds.indexOf(item.id) > -1) {
            item.insProduct.map(m => {
          item.insProduct.map((m) => {
              if (m.id == row.id) {
                m.state = row.state;
              }
              return m;
            })
          });
          }
          return item
        })
        return item;
      });
      },
      tableRowClassName({
        row,
        rowIndex
      }) {
    tableRowClassName({ row, rowIndex }) {
        if (row.state === 0) {
          return 'warning-row';
        return "warning-row";
        }
        return '';
      return "";
      },
      handleAll(e) {
        if (e.length > 0) {
          this.productList.map(m => {
            m.state = 1
            return m
          })
        this.productList.map((m) => {
          m.state = 1;
          return m;
        });
        } else {
          this.productList.map(m => {
            m.state = 0
            return m
          })
        this.productList.map((m) => {
          m.state = 0;
          return m;
        });
        }
        this.productList.forEach(p => {
          if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) {
            if (p.section.indexOf('[') > -1) {
              this.bsmRow = this.HaveJson(p)
      this.productList.forEach((p) => {
        if (
          p.bsm === "1" &&
          p.section !== "" &&
          p.section !== null &&
          p.state === 1
        ) {
          if (p.section.indexOf("[") > -1) {
            this.bsmRow = this.HaveJson(p);
            }
            this.bsm1 = true
            this.bsm1Dia = true
          } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) {
            this.bsm1 = false
          this.bsm1 = true;
          this.bsm1Dia = true;
        } else if (
          p.bsm === "1" &&
          p.section !== "" &&
          p.section !== null &&
          p.state === 0
        ) {
          this.bsm1 = false;
          }
        })
      });
        if (e.length > 0) {
          this.sampleList.map(item => {
        this.sampleList.map((item) => {
            if (this.sampleIds.indexOf(item.id) > -1) {
              item.insProduct.map(m => {
                m.state = 1
            item.insProduct.map((m) => {
              m.state = 1;
                return m;
              })
            });
            }
            return item
          })
          return item;
        });
        } else {
          this.sampleList.map(item => {
        this.sampleList.map((item) => {
            if (this.sampleIds.indexOf(item.id) > -1) {
              item.insProduct.map(m => {
                m.state = 0
            item.insProduct.map((m) => {
              m.state = 0;
                return m;
              })
            });
            }
            return item
          })
          return item;
        });
        }
        this.$nextTick(() => {
          this.$refs.productTable.doLayout()
        })
        this.$refs.productTable.doLayout();
      });
      },
      filterHandler(value, row, column) {
        const property = column['property'];
      const property = column["property"];
        return row[property] === value;
      },
      requestChange(e, row) {
        this.sampleList.map(item => {
      this.sampleList.map((item) => {
          if (this.sampleIds.indexOf(item.id) > -1) {
            item.insProduct.map(m => {
          item.insProduct.map((m) => {
              if (m.id == row.id) {
                m.ask = e;
              }
              return m;
            })
          });
          }
          return item
        })
        return item;
      });
      },
      activeStandardTree() {
        let trees = this.selectTree.split(" - ")
      let trees = this.selectTree.split(" - ");
        if (trees.length < 4) {
          this.$message.error('未选择子产品')
          return
        this.$message.error("未选择子产品");
        return;
        }
        this.addObj.factory = trees[0]
        this.addObj.laboratory = trees[1]
        this.addObj.sampleType = trees[2]
        if(trees[3]===''){
          this.addObj.sample = (trees[4] == undefined ? null : trees[4])
      this.addObj.factory = trees[0];
      this.addObj.laboratory = trees[1];
      this.addObj.sampleType = trees[2];
      if (trees[3] === "") {
        this.addObj.sample = trees[4] == undefined ? null : trees[4];
        }else if(trees[3]===undefined){
          this.addObj.sample = trees[2]
        this.addObj.sample = trees[2];
        }else{
          this.addObj.sample = trees[3]
        this.addObj.sample = trees[3];
        }
        this.addObj.model = (trees[4] == undefined ? null : trees[4])
        this.selectStandardTree = false
        this.sample.joinName = null
        this.sample.joinModel = null
        this.sample.joinNum = 1
        this.sample.sample = this.addObj.sample
        this.sample.model = this.addObj.model
        this.sample.unit = this.addObj.unit
        this.sample.standardMethodListId = null
        this.sample.insProduct = []
        this.sample.id = this.count
        this.sample.num = this.addObj.sampleNum
        this.sampleList.push(this.HaveJson(this.sample))
        this.count++
        this.$refs.sampleTable.doLayout()
      this.addObj.model = trees[4] == undefined ? null : trees[4];
      this.selectStandardTree = false;
      this.sample.joinName = null;
      this.sample.joinModel = null;
      this.sample.joinNum = 1;
      this.sample.sample = this.addObj.sample;
      this.sample.model = this.addObj.model;
      this.sample.unit = this.addObj.unit;
      this.sample.standardMethodListId = null;
      this.sample.insProduct = [];
      this.sample.id = this.count;
      this.sample.num = this.addObj.sampleNum;
      this.sampleList.push(this.HaveJson(this.sample));
      this.count++;
      this.$refs.sampleTable.doLayout();
      },
      searchFilter() {
        this.$refs.tree.filter(this.search)
      this.$refs.tree.filter(this.search);
      },
      filterNode(value, data) {
        if (!value) return true;
        return data.label.indexOf(value) !== -1;
      },
      handleNodeClick(val, node, el) {
        this.selectTree = ''
        this.models = val.children
        this.getNodeParent(node)
        this.selectTree = this.selectTree.replace(' - ', '')
        let data = this.selectTree.split(' - ')
        let data2 = ''
      this.selectTree = "";
      this.models = val.children;
      this.getNodeParent(node);
      this.selectTree = this.selectTree.replace(" - ", "");
      let data = this.selectTree.split(" - ");
      let data2 = "";
        for (let index = data.length - 1; index >= 0; index--) {
          data2 += " - " + data[index]
        data2 += " - " + data[index];
        }
        this.selectTree = data2.replace(' - ', '')
      this.selectTree = data2.replace(" - ", "");
      },
      getNodeParent(val) {
        if (val.parent != null) {
          if (val.data.children === null) {
            this.selectTree += ' - ' + val.label + ' - ' + ''
          this.selectTree += " - " + val.label + " - " + "";
          } else {
            this.selectTree += ' - ' + val.label
          this.selectTree += " - " + val.label;
          }
          this.getNodeParent(val.parent)
        this.getNodeParent(val.parent);
        }
      },
      nodeOpen(data, node, el) {
        $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened')
      $($(el.$el).find(".node_i")[0]).attr(
        "class",
        "node_i el-icon-folder-opened"
      );
      },
      nodeClose(data, node, el) {
        $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder')
      $($(el.$el).find(".node_i")[0]).attr("class", "node_i el-icon-folder");
      },
      beforeClose(done) {
        if (this.bsm1) {
          if (this.bsm1Val === null || this.bsm1Val === '') {
            this.$message.error('特殊项目必须处理')
            return
        if (this.bsm1Val === null || this.bsm1Val === "") {
          this.$message.error("特殊项目必须处理");
          return;
          }
        }
        done()
      done();
      },
      upBsm1(val) {
        let sections = JSON.parse(this.bsmRow.section);
@@ -533,21 +814,21 @@
        let prices = JSON.parse(this.bsmRow.price);
        for (var a in sections) {
          if (val === sections[a]) {
            this.productList.forEach(p => {
          this.productList.forEach((p) => {
              if (p.id === this.bsmRow.id) {
                p.section = sections[a]
                p.ask = asks[a]
                p.tell = tells[a]
                p.manHour = manHours[a]
                p.price = prices[a]
              p.section = sections[a];
              p.ask = asks[a];
              p.tell = tells[a];
              p.manHour = manHours[a];
              p.price = prices[a];
              }
            })
            break
          });
          break;
          }
        }
      },
    }
  }
  },
};
</script>
<style scoped>
  .ins_order_config {
@@ -570,7 +851,6 @@
    width: 100%;
    height: calc(100% - 60px);
  }
  >>>.all-disabled .el-checkbox__input .el-checkbox__inner {
    background-color: #edf2fc;
src/views/business/inspectionOrder/fiberoptic-config-readonly.vue
@@ -2,67 +2,128 @@
  <div class="ins_order_config">
    <div>
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;text-align: left;">光纤配置</el-col>
        <el-col :span="18" style="text-align: right;">
          <!-- <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">保 å­˜</el-button> -->
        <el-col :span="6" style="padding-left: 20px; text-align: left"
          >光纤配置</el-col
        >
        <el-col :span="18" style="text-align: right">
          <el-button size="medium" @click="outConfig">
            <span style="color: #3A7BFA;">返 å›ž</span>
            <span style="color: #3a7bfa">返 å›ž</span>
          </el-button>
        </el-col>
      </el-row>
    </div>
    <div class="center">
      <el-row :gutter="10" style="margin-bottom: 10px;">
      <el-row :gutter="10" style="margin-bottom: 10px">
        <el-col :span="9">
          <div class="grid-content">
            <h5>套管</h5>
            <div
              style="display: flex;align-items: center;justify-content: space-between;padding: 0 12px;box-sizing: border-box;">
              style="
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 12px;
                box-sizing: border-box;
              "
            >
              <div class="search-item">
                <label style="width: 70px;">样品型号</label>
                <label style="width: 70px">样品型号</label>
                <span class="models" :title="models">{{models}}</span>
              </div>
              <el-radio-group v-model="packageInfo.radio" size="small" @change="isInspection()" :disabled="active!=1">
              <el-radio-group
                v-model="packageInfo.radio"
                size="small"
                @change="isInspection()"
                :disabled="active != 1"
              >
                <el-radio :label="0">全检</el-radio>
                <el-radio :label="1">抽检</el-radio>
              </el-radio-group>
            </div>
            <div
              style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 8px;padding: 0 12px;box-sizing: border-box;">
              <div class="search-item" style="margin-right: 10px;">
              style="
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 8px;
                padding: 0 12px;
                box-sizing: border-box;
              "
            >
              <div class="search-item" style="margin-right: 10px">
                <label>套管数目</label>
                <el-input v-model="packageInfo.num1" placeholder="请输入" size="small" @blur="addBushing" :disabled="active!=1"></el-input>
                <el-input
                  v-model="packageInfo.num1"
                  placeholder="请输入"
                  size="small"
                  @blur="addBushing"
                  :disabled="active != 1"
                ></el-input>
              </div>
              <div class="search-item" style="margin-right: 10px;">
              <div class="search-item" style="margin-right: 10px">
                <label style="width: 100px">每根管抽检标准量</label>
                <el-input v-model="packageInfo.standNum" placeholder="请输入" size="small" @blur="addStandNum" :disabled="active!=1" style="width:70px"></el-input>
                <el-input
                  v-model="packageInfo.standNum"
                  placeholder="请输入"
                  size="small"
                  @blur="addStandNum"
                  :disabled="active != 1"
                  style="width: 70px"
                ></el-input>
              </div>
              <div class="search-item">
                <label style="width: 100px">每根管抽检检测量</label>
                <el-input v-model="packageInfo.testNum" placeholder="请输入" size="small" @blur="addTestNum"
                <el-input
                  v-model="packageInfo.testNum"
                  placeholder="请输入"
                  size="small"
                  @blur="addTestNum"
                style="width:70px"
                  :disabled="packageInfo.radio===0||active!=1"></el-input>
                  :disabled="packageInfo.radio === 0 || active != 1"
                ></el-input>
              </div>
            </div>
            <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small"
            <el-table
              ref="table0"
              :data="bushing"
              tooltip-effect="dark"
              style="width: 100%"
              height="203px"
              size="small"
              @selection-change="handleSelectionChange1"
              :header-cell-class-name="setClassName0">
              <!-- <el-table-column
              type="selection"
              width="45"
              :selectable="()=>(active==1)">
              </el-table-column> -->
              :header-cell-class-name="setClassName0"
            >
              <el-table-column label="管色标" show-overflow-tooltip>
                <template slot-scope="scope">
                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable >
                    <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                      :value="color.value"></el-option>
                  <el-select
                    v-model="scope.row.color"
                    size="mini"
                    :disabled="active != 1"
                    allow-create
                    filterable
                  >
                    <el-option
                      v-for="(color, i) in colors"
                      :key="i"
                      :label="color.dictLable"
                      :value="color.dictValue"
                    ></el-option>
                  </el-select>
                </template>
              </el-table-column>
              <el-table-column prop="standNum" label="标量" show-overflow-tooltip align="center">
              <el-table-column
                prop="standNum"
                label="标量"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column prop="testNum" label="测试量" show-overflow-tooltip align="center">
              <el-table-column
                prop="testNum"
                label="测试量"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
            </el-table>
          </div>
@@ -70,37 +131,83 @@
        <el-col :span="15">
          <div class="grid-content">
            <h5>检测项信息</h5>
            <el-table ref="productTable" :data="detectionItems" tooltip-effect="dark" style="width: 100%"
            <el-table
              ref="productTable"
              :data="detectionItems"
              tooltip-effect="dark"
              style="width: 100%"
            :row-class-name="tableRowClassName"
            :header-cell-class-name="setClassName"
            height="283px"
              size="small" @selection-change="handleSelectionChange2"
              size="small"
              @selection-change="handleSelectionChange2"
              @select-all="handleAll"
              @select="upProductSelect"
              >
              <!-- <el-table-column type="selection" width="55"
              :selectable="()=>((currentDetectionItems||this.selectFiberList.length > 0 || this.multiFiberList.length > 0)&&active==1)">
              </el-table-column> -->
              <el-table-column label="实验室" show-overflow-tooltip prop="sonLaboratory" ></el-table-column>
              <el-table-column prop="inspectionItem" label="检验项" show-overflow-tooltip>
              <el-table-column
                label="实验室"
                show-overflow-tooltip
                prop="sonLaboratory"
              ></el-table-column>
              <el-table-column
                prop="inspectionItem"
                label="检验项"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column prop="inspectionItemSubclass" label="检验项子项" show-overflow-tooltip width="100px">
              <el-table-column
                prop="inspectionItemSubclass"
                label="检验项子项"
                show-overflow-tooltip
                width="100px"
              >
              </el-table-column>
              <el-table-column prop="methodS" label="试验方法" min-width="90" show-overflow-tooltip>
              <el-table-column
                prop="methodS"
                label="试验方法"
                min-width="90"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column prop="price" label="单价" width="70" show-overflow-tooltip>
              <el-table-column
                prop="price"
                label="单价"
                width="70"
                show-overflow-tooltip
              >
              </el-table-column>
              <el-table-column prop="unit" label="单位" width="70" show-overflow-tooltip>
              <el-table-column
                prop="unit"
                label="单位"
                width="70"
                show-overflow-tooltip
              >
              </el-table-column>
              <!-- <el-table-column prop="manDay" label="预计时间" width="90" show-overflow-tooltip>
              </el-table-column> -->
              <el-table-column prop="ask" label="检测要求" show-overflow-tooltip width="200px">
              <el-table-column
                prop="ask"
                label="检测要求"
                show-overflow-tooltip
                width="200px"
              >
                <template slot-scope="scope">
                  <el-input v-model="scope.row.ask" placeholder="请输入" size="small" :disabled="active!=1" v-if="!isAskOnlyRead"></el-input>
                  <el-input
                    v-model="scope.row.ask"
                    placeholder="请输入"
                    size="small"
                    :disabled="active != 1"
                    v-if="!isAskOnlyRead"
                  ></el-input>
                  <span v-else>{{ scope.row.ask }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="tell" label="要求描述" show-overflow-tooltip width="150">
              <el-table-column
                prop="tell"
                label="要求描述"
                show-overflow-tooltip
                width="150"
              >
              </el-table-column>
            </el-table>
          </div>
@@ -109,240 +216,365 @@
      <el-row :gutter="10">
        <el-col :span="12" v-if="packageInfo.ismiers">
          <div class="grid-content">
            <h5>光纤带
              <el-button size="mini" type="primary" class="btns" @click="addFibers"
                 v-if="active==1">生成光纤带</el-button>
              <!-- <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">清除</el-button> -->
            <h5>
              å…‰çº¤å¸¦
              <el-button
                size="mini"
                type="primary"
                class="btns"
                @click="addFibers"
                v-if="active == 1"
                >生成光纤带</el-button
              >
            </h5>
            <div
              style="display: flex;align-items: center;justify-content: space-between;margin:4px 0 6px 0;padding: 0 12px;box-sizing: border-box;">
              <!-- <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">纤带类型</label>
                <el-select v-model="miresModel" placeholder="请选择" size="small" style="width: 100%;"
              style="
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin: 4px 0 6px 0;
                padding: 0 12px;
                box-sizing: border-box;
              "
            >
              <div class="search-item" style="width: 50%; margin-right: 16px">
                <label style="width: 80px">纤带类型</label>
                <el-select
                  v-model="miresModel"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%"
                  :disabled="selectBushing.length===0||active!=1"
                  >
                  <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </div> -->
              <!-- <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="miresStandard" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()"
                  @change="(value)=>methodChange2(value)">
                  <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id">
                  </el-option>
                </el-select>
              </div> -->
              <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">纤带类型</label>
                <el-select v-model="miresModel" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="selectBushing.length===0||active!=1"
                  <el-option
                    v-for="(item, a) in miresModels"
                    :key="a"
                    :label="item.label"
                    :value="item.value"
                  >
                  <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </div>
              <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="miresStandard" placeholder="请选择" size="small" style="width: 100%;"
              <div class="search-item" style="width: 50%">
                <label style="width: 80px">参考标准</label>
                <el-select
                  v-model="miresStandard"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%"
                :disabled="miresModel===null||active!=1"
                 @focus="selectsStandardMethodByFLSSM2()"
                  @change="(value)=>methodChange2(value)">
                  <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id">
                  @change="(value) => methodChange2(value)"
                >
                  <el-option
                    v-for="item in miresStandards"
                    :key="item.id"
                    :label="item.code"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>
            <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px"
              size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)"
              :header-cell-class-name="setClassName0">
              <!-- <el-table-column
              type="selection"
              width="55"
              :selectable="()=>(active==1)">
              </el-table-column> -->
              <el-table-column prop="color" label="管套色标" width="90" align="center">
            <el-table
              ref="table2"
              :data="fibersList"
              tooltip-effect="dark"
              style="width: 100%"
              height="270px"
              size="small"
              @selection-change="handleSelectionChange"
              highlight-current-row
              @row-click="
                (row, column, event) => rowClickFiber(row, column, event, 1)
              "
              :header-cell-class-name="setClassName0"
            >
              <el-table-column
                prop="color"
                label="管套色标"
                width="90"
                align="center"
              >
              </el-table-column>
              <el-table-column prop="code" label="光纤带编号" show-overflow-tooltip align="center">
                <!-- <template slot-scope="scope">
                  <el-input v-model="scope.row.code" placeholder="请输入" size="mini" ></el-input>
                </template> -->
              <el-table-column
                prop="code"
                label="光纤带编号"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column prop="model" label="光纤带规格" show-overflow-tooltip align="center">
                <!-- <template slot-scope="scope">
                  <el-input v-model="scope.row.model" placeholder="请输入" size="mini" ></el-input>
                </template> -->
              <el-table-column
                prop="model"
                label="光纤带规格"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column prop="standard" label="参考标准" show-overflow-tooltip align="center">
                <!-- <template slot-scope="scope">
                  <el-input v-model="scope.row.standard" placeholder="请输入" size="mini" ></el-input>
                </template> -->
              <el-table-column
                prop="standard"
                label="参考标准"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column prop="num" label="光纤检测量" show-overflow-tooltip align="center">
                <!-- <template slot-scope="scope">
                  <el-input v-model="scope.row.num" placeholder="请输入" size="mini" ></el-input>
                </template> -->
              <el-table-column
                prop="num"
                label="光纤检测量"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
            </el-table>
          </div>
        </el-col>
        <el-col :span="!packageInfo.ismiers?24:12">
          <div class="grid-content">
            <h5>光纤
              <el-button size="mini" type="primary" class="btns" @click="addFiber"
                 v-if="active==1">光纤配色</el-button>
            <h5>
              å…‰çº¤
              <el-button
                size="mini"
                type="primary"
                class="btns"
                @click="addFiber"
                v-if="active == 1"
                >光纤配色</el-button
              >
              </h5>
            <div
              style="display: flex;align-items: center;justify-content: space-between;margin: 4px 0 6px 0;padding: 0 12px;box-sizing: border-box;">
              <!-- <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">光纤类型</label>
                <el-select v-model="mireModel" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="selectBushing.length===0||active!=1">
                  <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </div>
              <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="mireStandard" placeholder="请选择" size="small" style="width: 100%;"
                  :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()"
                  @change="(value)=>methodChange(value)" :loading="mireStandardLoading">
                  <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id">
                  </el-option>
                </el-select>
              </div> -->
              <div class="search-item" style="width: 50%;margin-right: 16px;">
                <label style="width: 80px;">光纤类型</label>
                <el-select v-model="mireModel" placeholder="请选择" size="small" style="width: 100%;"
              style="
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin: 4px 0 6px 0;
                padding: 0 12px;
                box-sizing: border-box;
              "
               >
                  <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value">
              <div class="search-item" style="width: 50%; margin-right: 16px">
                <label style="width: 80px">光纤类型</label>
                <el-select
                  v-model="mireModel"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%"
                >
                  <el-option
                    v-for="(item, a) in mireModels"
                    :key="a"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </div>
              <div class="search-item" style="width: 50%;">
                <label style="width: 80px;">参考标准</label>
                <el-select v-model="mireStandard" placeholder="请选择" size="small" style="width: 100%;"
              <div class="search-item" style="width: 50%">
                <label style="width: 80px">参考标准</label>
                <el-select
                  v-model="mireStandard"
                  placeholder="请选择"
                  size="small"
                  style="width: 100%"
                :disabled="mireModel===null||active!=1"
                 @focus="selectsStandardMethodByFLSSM()"
                  @change="(value)=>methodChange(value)" :loading="mireStandardLoading">
                  <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id">
                  @change="(value) => methodChange(value)"
                  :loading="mireStandardLoading"
                >
                  <el-option
                    v-for="item in mireStandards"
                    :key="item.id"
                    :label="item.code"
                    :value="item.id"
                  >
                  </el-option>
                </el-select>
              </div>
            </div>
            <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px"
              size="small" highlight-current-row @selection-change="handleSelectionChange4"
              @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)"
              :header-cell-class-name="setClassName0">
              <!-- <el-table-column
              type="selection"
              width="55"
              :selectable="()=>(active==1)">
              </el-table-column> -->
              <el-table-column prop="bushColor" label="管套色标" width="90" align="center">
            <el-table
              ref="table3"
              :data="fiberList"
              tooltip-effect="dark"
              style="width: 100%"
              height="270px"
              size="small"
              highlight-current-row
              @selection-change="handleSelectionChange4"
              @row-click="
                (row, column, event) => rowClickFiber(row, column, event, 0)
              "
              :header-cell-class-name="setClassName0"
            >
              <el-table-column
                prop="bushColor"
                label="管套色标"
                width="90"
                align="center"
              >
              </el-table-column>
              <el-table-column prop="color" label="光纤色标" width="120">
                <!-- <template slot-scope="scope">
                  <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable >
                    <el-option v-for="(color,i) in colors" :key="i" :label="color.lable"
                      :value="color.value"></el-option>
                  </el-select>
                </template> -->
              </el-table-column>
              <el-table-column prop="model" label="光纤规格" show-overflow-tooltip align="center">
              <el-table-column
                prop="model"
                label="光纤规格"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
              <el-table-column prop="standard" label="参考标准" show-overflow-tooltip align="center">
              <el-table-column
                prop="standard"
                label="参考标准"
                show-overflow-tooltip
                align="center"
              >
              </el-table-column>
            </el-table>
          </div>
        </el-col>
      </el-row>
    </div>
    <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose">
      <div class="body" style="max-height: 60vh;">
    <el-dialog
      title="检测到特殊项,请作出以下选择"
      :visible.sync="bsm1Dia"
      width="500px"
      :show-close="false"
      :before-close="beforeClose"
    >
      <div class="body" style="max-height: 60vh">
        <el-row v-if="bsm1">
          <el-col class="search_thing" :span="22">
            <div class="search_label"><span class="required-span">* </span>护套密度:</div>
            <div class="search_label">
              <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"></el-radio>
                <el-radio
                  v-for="(a, ai) in JSON.parse(bsmRow.section)"
                  :key="ai"
                  :label="a"
                ></el-radio>
              </el-radio-group>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22">
            <div class="search_label">要求值:</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>
          <el-col class="search_thing" :span="22">
            <div class="search_label">单价:</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.price)[ai]}}</el-radio>
                <el-radio
                  v-for="(a, ai) in JSON.parse(bsmRow.section)"
                  :key="ai"
                  :label="a"
                  >{{ JSON.parse(bsmRow.price)[ai] }}</el-radio
                >
              </el-radio-group>
            </div>
          </el-col>
        </el-row>
        <el-row v-if="bsm2">
          <el-col class="search_thing" :span="22">
            <div class="search_label" style="width: 220px;"><span class="required-span">* </span>样品熔接配对数量:</div>
            <div class="search_label" style="width: 220px">
              <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 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-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">
                    :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-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">
                    :value="index + 1"
                  >
                  </el-option>
                </el-select>
              </el-col>
              <!-- <el-col :span="10" class="pairing">{{a[1]}}</el-col> -->
            </el-col>
          </el-col>
        </el-row>
        <!-- <el-row v-if="bsm3">
          <el-col class="search_thing" :span="22" style="display: flex;align-items: center;">
            <div class="search_label"><span class="required-span">* </span>RTS:</div>
            <div class="search_input">
              <el-input size="small" placeholder="请输入" clearable v-model="bsm3Val"></el-input>
            </div>
          </el-col>
        </el-row> -->
      </div>
    </el-dialog>
    <el-dialog title="RTS填写" :visible.sync="bsm3Dia" width="500px" :show-close="false" :before-close="beforeClose0">
    <el-dialog
      title="RTS填写"
      :visible.sync="bsm3Dia"
      width="500px"
      :show-close="false"
      :before-close="beforeClose0"
    >
      <el-row>
        <el-col class="search_thing" :span="22" style="display: flex;align-items: center;">
          <div class="search_label"><span class="required-span">* </span>RTS:</div>
        <el-col
          class="search_thing"
          :span="22"
          style="display: flex; align-items: center"
        >
          <div class="search_label">
            <span class="required-span">* </span>RTS:
          </div>
          <div class="search_input">
            <el-input size="small" placeholder="请输入" clearable v-model="bsm3Val"></el-input>
            <el-input
              size="small"
              placeholder="请输入"
              clearable
              v-model="bsm3Val"
            ></el-input>
          </div>
        </el-col>
      </el-row>
@@ -351,12 +583,19 @@
</template>
<script>
import { set } from 'vue'
import { getDicts } from "@/api/system/dict/data";
import {
  getStandTreeBySampleType,
  selectStandardTreeList2,
  selectStandardMethodEnum,
  selectsStandardMethodByFLSSM,
  selectStandardProductList,
} from "@/api/standard/standardLibrary";
  export default {
    props: {
      active: {
        type: Number,
        default: () => 0
      default: () => 0,
      },
    },
    data() {
@@ -371,15 +610,15 @@
          num1: null,
          standNum: null,
          testNum: null,
          ismiers: false
        ismiers: false,
        },
        tableData: [],
        tape: {
          value: ''
        value: "",
        },
        options: [],
        sample: [],
        models: '',
      models: "",
        colors: [],
        wires: [],
        bushing: [],
@@ -415,182 +654,180 @@
        bsm3Val: null,
        bsmRow3: null,
        bsm3Dia: false,
        sorted: false
      }
      sorted: false,
    };
    },
    computed: {
      isAllDisabled() {
        return this.multiFiberList.length > 0||this.currentDetectionItems||this.active!=1
      return (
        this.multiFiberList.length > 0 ||
        this.currentDetectionItems ||
        this.active != 1
      );
      },
    },
    watch: {
      // mireModel(val1,val0) {
      //   if(val1!=val0){
      //     this.mireStandards = []
      //     this.fiberList = []
      //     this.multiFiberList = []
      //     this.detectionItems = []
      //     this.currentDetectionItems = null;
      //   }
      // },
      // mireStandard(val1,val0) {
      //   if(val1!=val0){
      //     this.fiberList = []
      //     this.multiFiberList = []
      //     this.detectionItems = []
      //     this.currentDetectionItems = null;
      //   }
      // }
    },
  watch: {},
    mounted() {
      this.$parent.sampleIds.forEach(a => {
    this.$parent.sampleIds.forEach((a) => {
        for (var i = 0; i < this.$parent.sampleList.length; i++) {
          if (this.$parent.sampleList[i].id == a) {
            this.sample.push(this.$parent.sampleList[i])
            this.models += (',' + this.$parent.sampleList[i].model)
            break
          this.sample.push(this.$parent.sampleList[i]);
          this.models += "," + this.$parent.sampleList[i].model;
          break;
          }
        }
      })
    });
      console.log(111, this.sample);
      this.models = this.models.replace(',', '')
      this.packageInfo.ismiers = this.models.split(',').every(e=>(e.indexOf('d')>-1||e.indexOf('D')>-1)&&!e.includes('ADSS'))
      if(this.sample[0].bushing === undefined || this.sample[0].bushing === null){
        this.bushing = []
    this.models = this.models.replace(",", "");
    this.packageInfo.ismiers = this.models
      .split(",")
      .every(
        (e) =>
          (e.indexOf("d") > -1 || e.indexOf("D") > -1) && !e.includes("ADSS")
      );
    if (
      this.sample[0].bushing === undefined ||
      this.sample[0].bushing === null
    ) {
      this.bushing = [];
      }else{
        this.bushing = this.HaveJson(this.sample[0].bushing)
        this.packageInfo.num1 = this.sample[0].bushing.length
        this.packageInfo.standNum = this.sample[0].bushing[0].standNum
        this.packageInfo.testNum = this.sample[0].bushing[0].testNum
        this.bushing.forEach(a=>{
          if(a.fibers==null || a.fibers.length ==0)a.fibers=[]
          if(a.fiber==null || a.fiber.length == 0)a.fiber=[]
      this.bushing = this.HaveJson(this.sample[0].bushing);
      this.packageInfo.num1 = this.sample[0].bushing.length;
      this.packageInfo.standNum = this.sample[0].bushing[0].standNum;
      this.packageInfo.testNum = this.sample[0].bushing[0].testNum;
      this.bushing.forEach((a) => {
        if (a.fibers == null || a.fibers.length == 0) a.fibers = [];
        if (a.fiber == null || a.fiber.length == 0) a.fiber = [];
          // åˆ¤æ–­æ˜¯å¦å«æœ‰å…‰çº¤å¸¦
          if(this.packageInfo.ismiers){
            // this.fibersList = [] // æ–°å¢ž
            // this.fiberList = []  // æ–°å¢ž
            if(a.fibers.length>0){
              a.fibers.sort((a,b)=>a.id-b.id)
              a.fibers.forEach(b=>{
                this.$set(b,'color',a.color)
            a.fibers.sort((a, b) => a.id - b.id);
            a.fibers.forEach((b) => {
              this.$set(b, "color", a.color);
              // å…‰çº¤å¸¦
              this.fibersList.push(b)
              this.fibersList.push(b);
              // å…‰çº¤
              b.fiber.forEach(c=>{
                this.fiberList.push(c)
              })
            })
              b.fiber.forEach((c) => {
                this.fiberList.push(c);
              });
            });
            } else {
              a.fiber.forEach(b=>{
              this.fiberList.push(b)
            })
            a.fiber.forEach((b) => {
              this.fiberList.push(b);
            });
            }
          }else{
           // this.fiberList = []
            a.fiber.forEach(b=>{
              this.fiberList.push(b)
            })
          a.fiber.forEach((b) => {
            this.fiberList.push(b);
          });
          }
        })
      });
      }
      this.getTypeDicts1()
      this.getStandTreeBySampleType()
      this.getStandTreeBySampleType2()
      this.selectsStandardMethodByFLSSM2()
    this.getTypeDicts1();
    this.getStandTreeBySampleType();
    this.getStandTreeBySampleType2();
    this.selectsStandardMethodByFLSSM2();
    },
    methods: {
      handleSelectionChange(val) {
        // this.selectFibers = val
        this.multiFiberList = val
      this.multiFiberList = val;
      },
      handleSelectionChange1(val) {
        this.selectBushing = val
      this.selectBushing = val;
      },
      handleSelectionChange2(val){
        this.detectionSelect = val
      this.detectionSelect = val;
        // èµ‹å€¼æ£€æµ‹é¡¹ä¿¡æ¯ å…‰çº¤å¸¦
        if(this.detectionItems.type == 1) {
          this.multiFiberList.forEach(item => {
            this.fibersList.forEach(a => {
        this.multiFiberList.forEach((item) => {
          this.fibersList.forEach((a) => {
              if(a.ident == item.ident){
                a.productList  =  []
                this.fibersList.find(a => a.ident == item.ident).productList = this.detectionSelect
              a.productList = [];
              this.fibersList.find((a) => a.ident == item.ident).productList =
                this.detectionSelect;
              }
            })
          })
          });
        });
      }
      if(this.detectionItems.type == 0) {
        // èµ‹å€¼æ£€æµ‹é¡¹ä¿¡æ¯ å…‰çº¤
        console.log('000',this.selectFiberList);
        this.selectFiberList.forEach(item => {
            this.fiberList.forEach(a => {
        console.log("000", this.selectFiberList);
        this.selectFiberList.forEach((item) => {
          this.fiberList.forEach((a) => {
              if(a.ident == item.ident){
                a.productList  =  []
                this.fiberList.find(a => a.ident == item.ident).productList = this.detectionSelect
              a.productList = [];
              this.fiberList.find((a) => a.ident == item.ident).productList =
                this.detectionSelect;
              }
            })
          })
          });
        });
        }
      },
      handleSelectionChange4(val){
        this.selectFiberList = val
      this.selectFiberList = val;
      },
      outConfig() {
        this.$parent.configShow = false
      this.$parent.configShow = false;
      },
      getTypeDicts1() {
        this.$axios.post(this.$api.enums.selectEnumByCategory, {
          category: "色标"
        }).then(res => {
          this.colors = res.data
      getDicts("fiber_color_type")
        .then((res) => {
          if (res.code === 200) {
            this.colors = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      // å¥—管数目生成表格数据
      addBushing() {
        this.bushing = []
      this.bushing = [];
        for(let i = 0; i < this.packageInfo.num1; i++){
          let bushing = {
            ident: this.bushing.length + 1,
            color: this.colors[i].label,
          color: this.colors[i].dictLabel,
            standNum: null,
            testNum: null,
            fibers: [],
            fiber: []
          }
          this.bushing.push(bushing)
          fiber: [],
        };
        this.bushing.push(bushing);
        }
      },
      // å¥—管标准量赋值
      addStandNum() {
        if(this.selectBushing.length > 0) {
          this.bushing.forEach(item => {
          this.selectBushing.forEach(a => {
        this.bushing.forEach((item) => {
          this.selectBushing.forEach((a) => {
            if(item.ident == a.ident) {
              item.standNum = this.packageInfo.standNum
              item.standNum = this.packageInfo.standNum;
            }
          })
        })
          });
        });
        }
      },
      // å¥—管检测量赋值
      addTestNum() {
        if(this.selectBushing.length > 0) {
          this.bushing.forEach(item => {
          this.selectBushing.forEach(a => {
        this.bushing.forEach((item) => {
          this.selectBushing.forEach((a) => {
            if(item.ident == a.ident) {
              item.testNum = this.packageInfo.testNum
              item.testNum = this.packageInfo.testNum;
            }
          })
        })
          });
        });
        }
      },
      isInspection() {
        this.fiberList = []
        this.fibersList = []
        this.detectionItems = []
      this.fiberList = [];
      this.fibersList = [];
      this.detectionItems = [];
        // é¡µé¢æ˜¯å¦å«æœ‰å…‰çº¤å¸¦
        if(this.packageInfo.ismiers) {
@@ -599,90 +836,100 @@
          // æ ¹æ®æ ‡å‡†é‡èµ‹å€¼æ£€æµ‹é‡
          if(parseInt(this.packageInfo.standNum) > 0 ) {
            // ç»™å…‰çº¤å¸¦èµ‹å€¼
            this.packageInfo.testNum = this.packageInfo.standNum
            this.selectBushing = this.bushing
            this.addFibers()
            this.multiFiberList = this.fibersList
            this.packageInfo.testNum = this.packageInfo.standNum;
            this.selectBushing = this.bushing;
            this.addFibers();
            this.multiFiberList = this.fibersList;
            // é»˜è®¤å‹¾é€‰
            setTimeout(() => {
              this.selectBushing.forEach(item =>{
              let rowToSelect =  this.bushing.find(a => a.ident == item.ident)
              this.$refs.table0.toggleRowSelection(rowToSelect, true)
              })
              this.selectBushing.forEach((item) => {
                let rowToSelect = this.bushing.find(
                  (a) => a.ident == item.ident
                );
                this.$refs.table0.toggleRowSelection(rowToSelect, true);
              });
              this.multiFiberList.forEach(item =>{
              let rowToSelect =  this.fibersList.find(a => a.ident == item.ident)
              this.$refs.table2.toggleRowSelection(rowToSelect, true)
              })
            }, 200)
              this.multiFiberList.forEach((item) => {
                let rowToSelect = this.fibersList.find(
                  (a) => a.ident == item.ident
                );
                this.$refs.table2.toggleRowSelection(rowToSelect, true);
              });
            }, 200);
        }
      }
        }else {
          if(this.packageInfo.radio == 0) {
            if(parseInt(this.packageInfo.standNum) > 0 ) {
              this.packageInfo.testNum = this.packageInfo.standNum
              this.selectBushing = this.bushing
              this.addFiber()
            this.packageInfo.testNum = this.packageInfo.standNum;
            this.selectBushing = this.bushing;
            this.addFiber();
              // é»˜è®¤å‹¾é€‰
            setTimeout(() => {
              this.selectBushing.forEach(item =>{
              let rowToSelect =  this.bushing.find(a => a.ident == item.ident)
              this.$refs.table0.toggleRowSelection(rowToSelect, true)
              })
            }, 200)
              this.selectBushing.forEach((item) => {
                let rowToSelect = this.bushing.find(
                  (a) => a.ident == item.ident
                );
                this.$refs.table0.toggleRowSelection(rowToSelect, true);
              });
            }, 200);
            }
          }
        }
      },
      upNum() {
        this.fiberList = []
        this.fibersList = []
        this.detectionItems = []
      this.fiberList = [];
      this.fibersList = [];
      this.detectionItems = [];
        if (this.packageInfo.radio === 0) {
          this.packageInfo.testNum = this.packageInfo.standNum
        this.packageInfo.testNum = this.packageInfo.standNum;
        }
        if (parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum)) {
          this.packageInfo.testNum = this.packageInfo.standNum
      if (
        parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum)
      ) {
        this.packageInfo.testNum = this.packageInfo.standNum;
        }
        if (this.packageInfo.num1 !== null && this.packageInfo.num1 !== '' &&
          this.packageInfo.standNum !== null && this.packageInfo.standNum !== '' &&
          this.packageInfo.testNum != null && this.packageInfo.testNum !== '') {
          let colors2 = []
      if (
        this.packageInfo.num1 !== null &&
        this.packageInfo.num1 !== "" &&
        this.packageInfo.standNum !== null &&
        this.packageInfo.standNum !== "" &&
        this.packageInfo.testNum != null &&
        this.packageInfo.testNum !== ""
      ) {
        let colors2 = [];
          if (this.packageInfo.num1 / this.colors.length > 1) {
            let num = this.packageInfo.num1 / this.colors.length
            if (this.packageInfo.num1 % this.colors.length > 0) num += 1
          let num = this.packageInfo.num1 / this.colors.length;
          if (this.packageInfo.num1 % this.colors.length > 0) num += 1;
            for (var i = 0; i < num; i++) {
              colors2 = colors2.concat(this.colors)
            colors2 = colors2.concat(this.colors);
            }
          } else {
            colors2 = colors2.concat(this.colors)
          colors2 = colors2.concat(this.colors);
          }
          this.bushing = []
        this.bushing = [];
          for (var i = 0; i < this.packageInfo.num1; i++) {
            let bushing = {
              color: colors2[i].label,
            color: colors2[i].dictLabel,
              standNum: this.packageInfo.standNum,
              testNum: this.packageInfo.testNum,
              fibers: [],
              fiber: []
            }
            this.bushing.push(bushing)
            fiber: [],
          };
          this.bushing.push(bushing);
          }
          // ç»™å…‰çº¤å¸¦èµ‹å€¼
          if(this.selectBushing.length===0){
            this.selectBushing = this.bushing
          this.selectBushing = this.bushing;
        }
        // this.miresModels çº¤å¸¦ç±»åž‹
        // this.miresStandards å‚考标准
        this.fibersList = []
        this.packageInfo.ismiers = true
        this.fiberList = []
        this.selectBushing.forEach(a => {
          a.fiber = []
          a.fibers = []
        this.fibersList = [];
        this.packageInfo.ismiers = true;
        this.fiberList = [];
        this.selectBushing.forEach((a) => {
          a.fiber = [];
          a.fibers = [];
              for(let j = 0; j < parseInt(a.testNum); j++){
                let fibers = {
                  id: this.fibersList.length + 1,
@@ -692,402 +939,287 @@
                  standard: null,
                  num: a.testNum,
                  productList: this.HaveJson(this.productList2),
                  fiber: []
              fiber: [],
            };
            a.fibers.push(fibers);
            this.fibersList.push(fibers);
                }
                a.fibers.push(fibers)
                this.fibersList.push(fibers)
              }
        })
        });
      } else {
          this.bushing = []
        this.bushing = [];
        }
      },
      getStandTreeBySampleType() {
        this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, {
          laboratory: '通信产品实验室',
          sampleType: '光纤'
        }).then(res => {
          this.mireModels = []
          res.data.forEach(a => {
      getStandTreeBySampleType({
        laboratory: "通信产品实验室",
        sampleType: "光纤",
      })
        .then((res) => {
          if (res.code === 200) {
            this.mireModels = [];
            res.data.forEach((a) => {
            this.mireModels.push({
              label: a.model,
              value: a.sample + ' - ' + a.model
                value: a.sample + " - " + a.model,
              });
            });
          }
            })
          })
        })
        .catch((error) => {
          console.error(error);
        });
      },
      getStandTreeBySampleType2() {
        this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, {
          laboratory: '通信产品实验室',
          sampleType: '光纤带'
        }).then(res => {
          this.miresModels = []
          res.data.forEach(a => {
      getStandTreeBySampleType({
        laboratory: "通信产品实验室",
        sampleType: "光纤带",
      })
        .then((res) => {
          if (res.code === 200) {
            this.miresModels = [];
            res.data.forEach((a) => {
            this.miresModels.push({
              label: a.model,
              value: a.model
                value: a.model,
              });
            });
          }
            })
          })
        })
        .catch((error) => {
          console.error(error);
        });
      },
      selectsStandardMethodByFLSSM() {
        this.mireStandards = []
        this.mireStandardLoading = true
        this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤ - ' + this.mireModel
        }).then(res => {
          this.mireStandardLoading = false
          this.mireStandards = res.data.standardMethodList
      this.mireStandards = [];
      this.mireStandardLoading = true;
      selectsStandardMethodByFLSSM({
        tree: "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤ - " + this.mireModel,
        })
        .then((res) => {
          if (res.code === 200) {
            this.mireStandardLoading = false;
            this.mireStandards = res.data.standardMethodList;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      selectsStandardMethodByFLSSM2() {
        this.miresStandards = []
        this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - ' + this.miresModel
        }).then(res => {
          this.miresStandards = res.data.standardMethodList
      this.miresStandards = [];
      selectsStandardMethodByFLSSM({
        tree: "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " + this.miresModel,
        })
        .then((res) => {
          if (res.code === 200) {
            this.miresStandards = res.data.standardMethodList;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      methodChange(val) {
        // if (val === null || val === '') return
        // this.$axios.post(this.$api.standardTree.selectStandardProductList, {
        //   model: this.mireModel.split(' - ')[1],
        //   standardMethodListId: val,
        //   factory: ''
        // }, {
        //   headers: {
        //     'Content-Type': 'application/json'
        //   }
        // }).then(res => {
        //   res.data.forEach(a => {
        //     a.state = 0
        //   })
        //   this.productList = res.data
        //   setTimeout(() => {
        //     this.productList.forEach(a => {
        //       if (a.state == 1) this.toggleSelection(a)
        //     })
        //     this.addFiber()
        //   }, 200)
        // })
          // å°†ä¸‹æ‹‰æ¡†å€¼èµ‹å€¼ç»™å…‰çº¤  ç›‘听去除
          if(this.selectFiberList.length == 0) {
            this.$message.error('请选择数据')
            return
        this.$message.error("请选择数据");
        return;
          }
          this.selectFiberList.forEach(item => {
            this.fiberList.forEach(a => {
      this.selectFiberList.forEach((item) => {
        this.fiberList.forEach((a) => {
              if(a.ident == item.ident){
                a.model = this.mireModel.split(' - ')[1] // å…‰çº¤è§„æ ¼
                a.noSplitModel = this.mireModel // å…‰çº¤è§„æ ¼
            a.model = this.mireModel.split(" - ")[1]; // å…‰çº¤è§„æ ¼
            a.noSplitModel = this.mireModel; // å…‰çº¤è§„æ ¼
                if(this.mireStandards != null) {
                  a.standard = this.mireStandards.find(a => a.id == this.mireStandard).code  // å‚考标准
              a.standard = this.mireStandards.find(
                (a) => a.id == this.mireStandard
              ).code; // å‚考标准
                }
              }
            })
          })
         if (val === null || val === '') return
         if(this.mireStandards == null ) return
        this.$axios.post(this.$api.standardTree.selectStandardProductList, {
          model: this.mireModel.split(' - ')[1],
        });
      });
      if (val === null || val === "") return;
      if (this.mireStandards == null) return;
      selectStandardProductList({
        model: this.mireModel.split(" - ")[1],
          standardMethodListId: val,
          factory: ''
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          this.detectionItems = []
        factory: "",
      })
        .then((res) => {
          if (res.code === 200) {
            this.detectionItems = [];
          if(res.data != null && res.data.length != 0){
           res.data.forEach(a => {
            a.state = 0
          })
          this.detectionItems = res.data
          this.detectionType = 0
           this.$set(this.detectionItems,'type',0)
              res.data.forEach((a) => {
                a.state = 0;
              });
              this.detectionItems = res.data;
              this.detectionType = 0;
              this.$set(this.detectionItems, "type", 0);
          }
          }
        })
        .catch((error) => {
          console.error(error);
        });
      },
      methodChange2(val) {
        // if (val === null || val === '') return
        // this.$axios.post(this.$api.standardTree.selectStandardProductList, {
        //   model: '',
        //   standardMethodListId: val,
        //   factory: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - ' + this.miresModel + ' - ',
        // }, {
        //   headers: {
        //     'Content-Type': 'application/json'
        //   }
        // }).then(res => {
        //   res.data.forEach(a => {
        //     a.state = 0
        //   })
        //   this.productList2 = res.data
        //   setTimeout(() => {
        //     this.productList2.forEach(a => {
        //       if (a.state == 1) this.toggleSelection(a)
        //     })
        //     this.addFibers()
        //   }, 200)
        // })
        if(this.multiFiberList.length == 0) {
          this.$message.error('请选择需要更改的数据')
          return
        this.$message.error("请选择需要更改的数据");
        return;
        }
        if (val === null || val === '') return
        this.$axios.post(this.$api.standardTree.selectStandardProductList, {
          model: '',
      if (val === null || val === "") return;
      selectStandardProductList({
        model: "",
          standardMethodListId: val,
          factory: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - ' + this.miresModel + ' - ',
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          // å°†èŽ·å–çš„æ£€æµ‹é¡¹ä¿¡æ¯èµ‹å€¼
          this.detectionItems = []
          if(res.data != null && res.data.length != 0){
            res.data.forEach(a => {
              a.state = 0
        factory:
          "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " +
          this.miresModel +
          " - ",
            })
            this.detectionItems = res.data
            this.detectionType = 1
            this.$set(this.detectionItems,'type',1)
        .then((res) => {
          if (res.code === 200) {
            // å°†èŽ·å–çš„æ£€æµ‹é¡¹ä¿¡æ¯èµ‹å€¼
            this.detectionItems = [];
            if (res.data != null && res.data.length != 0) {
              res.data.forEach((a) => {
                a.state = 0;
              });
              this.detectionItems = res.data;
              this.detectionType = 1;
              this.$set(this.detectionItems, "type", 1);
          }
          // ç»™é€‰ä¸­çš„光纤带赋值
        for(let i= 0; i < this.fibersList.length; i++){
            this.multiFiberList.forEach(item => {
              this.multiFiberList.forEach((item) => {
              if(this.fibersList[i].ident == item.ident){
                this.fibersList[i].model = this.miresModel // çº¤å¸¦è§„æ ¼
                this.fibersList[i].num = this.miresModel.replace('芯','') // å…‰çº¤æ£€æµ‹é‡
                this.fibersList[i].productList = this.detectionItems // æ£€æµ‹é¡¹
                this.miresStandards.forEach(a => {
                  this.fibersList[i].model = this.miresModel; // çº¤å¸¦è§„æ ¼
                  this.fibersList[i].num = this.miresModel.replace("芯", ""); // å…‰çº¤æ£€æµ‹é‡
                  this.fibersList[i].productList = this.detectionItems; // æ£€æµ‹é¡¹
                  this.miresStandards.forEach((a) => {
                  if(a.id == this.miresStandard) {
                    this.fibersList[i].standard = a.code // å‚考标准
                      this.fibersList[i].standard = a.code; // å‚考标准
                    }
                  });
                }
              });
            }
                  }
                })
              }
            })
        }
      })
        .catch((error) => {
          console.error(error);
        });
      },
      addFiber() {
        // æœ€æ–°
        let colors2 = []
      let colors2 = [];
        if (this.packageInfo.num1 / this.colors.length > 1) {
          let num = this.packageInfo.num1 / this.colors.length
          if (this.packageInfo.num1 % this.colors.length > 0) num += 1
        let num = this.packageInfo.num1 / this.colors.length;
        if (this.packageInfo.num1 % this.colors.length > 0) num += 1;
          for (var i = 0; i < num; i++) {
            colors2 = colors2.concat(this.colors)
          colors2 = colors2.concat(this.colors);
          }
        } else {
          colors2 = colors2.concat(this.colors)
        colors2 = colors2.concat(this.colors);
        }
        this.fiberList = []
      this.fiberList = [];
        // é€‰æ‹©äº†å…‰çº¤å¸¦
        if (this.packageInfo.ismiers) {
          if(this.multiFiberList.length != 0){
          this.multiFiberList.forEach((a,index) => {
            a.fiber = []
            a.fiber = [];
            for (var i = 0; i < parseInt(a.num); i++) {
              let fiber = {
                ident: this.fiberList.length + 1,
                bushColor: a.color,
                color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
                color:
                  colors2[
                    i + parseInt(a.num) * index > colors2.length
                      ? 0
                      : i + parseInt(a.num) * index * index
                  ].dictLabel,
                model: null,
                noSplitModel: null,
                standard: null,
                fibersIdent: a.ident,
                productList: []
                productList: [],
              };
              this.fiberList.push(fiber);
              }
              this.fiberList.push(fiber)
            }
          })
          });
        } else {
          this.selectBushing.forEach((a,index) => {
            a.fiber = []
            a.fiber = [];
            for (var i = 0; i < parseInt(a.testNum); i++) {
              let fiber = {
                ident: this.fiberList.length + 1,
                bushColor: a.color,
                color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label,
                color:
                  colors2[
                    i + parseInt(a.testNum) * index > colors2.length
                      ? 0
                      : i + parseInt(a.testNum) * index
                  ].dictLabel,
                model: null,
                noSplitModel: null,
                standard: null,
                productList: []
                productList: [],
              };
              this.fiberList.push(fiber);
              }
              this.fiberList.push(fiber)
            }
          })
          });
        }
      }else {
        this.fiberList = []
        let flag = true
        this.fiberList = [];
        let flag = true;
        // æŒ‰ç…§é¡ºåºç”Ÿæˆå…‰çº¤è‰²æ ‡
        let colors2 = []
        let colors2 = [];
        if (this.packageInfo.num1 / this.colors.length > 1) {
          let num = this.packageInfo.num1 / this.colors.length
          if (this.packageInfo.num1 % this.colors.length > 0) num += 1
          let num = this.packageInfo.num1 / this.colors.length;
          if (this.packageInfo.num1 % this.colors.length > 0) num += 1;
          for (var i = 0; i < num; i++) {
            colors2 = colors2.concat(this.colors)
            colors2 = colors2.concat(this.colors);
          }
        } else {
          colors2 = colors2.concat(this.colors)
          colors2 = colors2.concat(this.colors);
        }
        // æ ¹æ®å¥—管的测试量生成对应的数量的光纤数据
        this.selectBushing.forEach((item,index) =>{
          if(item.testNum != null && item.testNum != ''){
          if (item.testNum != null && item.testNum != "") {
            for(let i =0; i < parseInt(item.testNum); i++){
              let fiber = {
                ident: this.fiberList.length + 1,
                bushColor: item.color,
                color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label,
                color:
                  colors2[
                    i + parseInt(item.testNum) * index > colors2.length
                      ? 0
                      : i + parseInt(item.testNum) * index * index
                  ].dictLabel,
                model:  null,
                standard: null,
                productList: []
              }
              this.fiberList.push(fiber)
                productList: [],
              };
              this.fiberList.push(fiber);
            }
          }else {
            flag = false
            flag = false;
          }
        })
        });
        if(!flag){
          this.$message.error('请填写光纤检测量')
          return
          this.$message.error("请填写光纤检测量");
          return;
        }
      }
        // äºŒä»£
        // // æ˜¯å¦é€‰æ‹©å¥—管
        // if(this.selectBushing.length == 0) {
        //   this.$message.error('未选择套管')
        //   return
        // }
        // this.fiberList = []
        // let flag = true
        // // æŒ‰ç…§é¡ºåºç”Ÿæˆå…‰çº¤è‰²æ ‡
        // let colors2 = []
        // if (this.packageInfo.num1 / this.colors.length > 1) {
        //   let num = this.packageInfo.num1 / this.colors.length
        //   if (this.packageInfo.num1 % this.colors.length > 0) num += 1
        //   for (var i = 0; i < num; i++) {
        //     colors2 = colors2.concat(this.colors)
        //   }
        // } else {
        //   colors2 = colors2.concat(this.colors)
        // }
        // // æ ¹æ®å¥—管的测试量生成对应的数量的光纤数据
        // this.selectBushing.forEach((item,index) =>{
        //   if(item.testNum != null && item.testNum != ''){
        //     for(let i =0; i < parseInt(item.testNum); i++){
        //       let fiber = {
        //         ident: this.fiberList.length + 1,
        //         bushColor: item.color,
        //         color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label,
        //         model:  null,
        //         standard: null,
        //         productList: []
        //       }
        //       this.fiberList.push(fiber)
        //     }
        //   }else {
        //     flag = false
        //   }
        // })
        // if(!flag){
        //   this.$message.error('请填写光纤检测量')
        //   return
        // }
        // æœ€åˆ
        // let colors2 = []
        // if (this.packageInfo.num1 / this.colors.length > 1) {
        //   let num = this.packageInfo.num1 / this.colors.length
        //   if (this.packageInfo.num1 % this.colors.length > 0) num += 1
        //   for (var i = 0; i < num; i++) {
        //     colors2 = colors2.concat(this.colors)
        //   }
        // } else {
        //   colors2 = colors2.concat(this.colors)
        // }
        // this.fiberList = []
        // let model = this.mireModel.split(' - ')[1]
        // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code
        // if (this.packageInfo.ismiers) {
        //   if(this.selectFibers.length === 0){
        //     this.$message.error('未选择光纤带')
        //     return
        //   }
        //   this.selectFibers.forEach((a,index) => {
        //     a.fiber = []
        //     for (var i = 0; i < parseInt(a.num); i++) {
        //       let fiber = {
        //         bushColor: a.color,
        //         color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
        //         model: model,
        //         standard: standard,
        //         productList: this.HaveJson(this.productList)
        //       }
        //       a.fiber.push(fiber)
        //       this.fiberList.push(fiber)
        //     }
        //   })
        // } else {
        //   this.selectBushing.forEach((a,index) => {
        //     a.fiber = []
        //     for (var i = 0; i < parseInt(a.testNum); i++) {
        //       let fiber = {
        //         bushColor: a.color,
        //         color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label,
        //         model: model,
        //         standard: standard,
        //         productList: this.HaveJson(this.productList)
        //       }
        //       a.fiber.push(fiber)
        //       this.fiberList.push(fiber)
        //     }
        //   })
        // }
      },
      addFibers() {
        // if(this.selectBushing.length===0){
        //   this.$message.error('未选择套管')
        //   return
        // }
        // this.fibersList = []
        // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code
        // this.packageInfo.ismiers = true
        // this.fiberList = []
        // this.selectBushing.forEach(a => {
        //   a.fiber = []
        //   a.fibers = []
        //   for (var i = 0; i < parseInt(a.testNum); i++) {
        //     let fibers = {
        //       code: null,
        //       color: a.color,
        //       model: this.miresModel,
        //       standard: standard,
        //       num: a.testNum,
        //       productList: this.HaveJson(this.productList2),
        //       fiber: []
        //     }
        //     a.fibers.push(fibers)
        //     this.fibersList.push(fibers)
        //   }
        // })
        if(this.selectBushing.length == 0) {
          this.$message.error('未选择套管')
          return
        this.$message.error("未选择套管");
        return;
        }
        // å¥—管的测试量  *  é€‰æ‹©çš„光纤带数量
        this.fibersList = []
        this.selectBushing.forEach(item => {
      this.fibersList = [];
      this.selectBushing.forEach((item) => {
          for(let i = 0; i < parseInt(this.packageInfo.testNum); i++){
          let fibers = {
            ident: this.fibersList.length + 1,
@@ -1097,195 +1229,124 @@
            standard: null,
            num: null,
            fiber: [],
            productList: []
            productList: [],
          };
          this.fibersList.push(fibers);
          }
          this.fibersList.push(fibers)
        }
        })
      });
      },
      rowClickFiber(row, column, event,type){
        console.log('row',row);
      console.log("row", row);
        if(type == 1) {
          this.fiberList = row.fiber
        this.fiberList = row.fiber;
          if(row.productList != null && row.productList.length > 0) {
            this.detectionItems = []
            this.detectionItems = row.productList
          this.detectionItems = [];
          this.detectionItems = row.productList;
          }
          if(row.fiber != null && row.fiber.length > 0) {
            this.fiberList = []
            this.fiberList = row.fiber
          this.fiberList = [];
          this.fiberList = row.fiber;
          }
        }else if (type == 0){
          this.detectionItems = []
          this.detectionItems = row.productList
        this.detectionItems = [];
        this.detectionItems = row.productList;
        }
      //   if(type == 1) {
      //     if((row.model == null || row.model == '') && (row.standard == null || row.standard == '')){
      //       this.detectionItems = []
      //       return
      //     }
      //     if(row.model != null && row.model != ''){
      //     this.miresModel = row.model
      //     this.selectsStandardMethodByFLSSM2()
      //   }
      //   setTimeout(() => {
      //     if(row.standard !=null && row.standard != ''){
      //     this.miresStandard = this.miresStandards.find(a => a.code == row.standard).id
      //   }
      //     this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      //     model: '',
      //     standardMethodListId: this.miresStandard,
      //     factory: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - ' + this.miresModel + ' - ',
      //   }, {
      //     headers: {
      //       'Content-Type': 'application/json'
      //     }
      //   }).then(res => {
      //     // å°†èŽ·å–çš„æ£€æµ‹é¡¹ä¿¡æ¯èµ‹å€¼
      //     this.detectionItems = []
      //     if(res.data != null && res.data.length != 0){
      //       this.detectionItems = res.data
      //       this.detectionType = 1
      //       this.$set(this.detectionItems,'type',1)
      //       if (row.productList != null && row.productList.length > 0) {
      //         let product =  JSON.parse(JSON.stringify(row.productList))
      //         setTimeout(() => {
      //           product.forEach(p => {
      //           let rowToSelect = this.detectionItems.find(item => item.id === p.id);
      //           if (rowToSelect) {
      //             this.toggleSelection(rowToSelect);
      //           }
      //         });
      //       },200)
      //       }
      //     }
      //   })
      //   },1000)
      // }else if(type == 0) {
      //   if((row.noSplitModel == null || row.noSplitModel == '') && (row.standard == null || row.standard == '')){
      //       this.detectionItems = []
      //       return
      //     }
      //   if(row.model != null && row.model != ''){
      //     this.mireModel = row.noSplitModel
      //     this.selectsStandardMethodByFLSSM()
      //   }
      //   setTimeout(() => {
      //     if(row.standard !=null && row.standard != ''){
      //     this.mireStandard = this.mireStandards.find(a => a.code == row.standard).id
      //   }
      //   this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      //     model: this.mireModel.split(' - ')[1],
      //     standardMethodListId: this.mireStandard,
      //     factory: ''
      //   }, {
      //     headers: {
      //       'Content-Type': 'application/json'
      //     }
      //   }).then(res => {
      //     this.detectionItems = []
      //     if(res.data != null && res.data.length != 0){
      //      res.data.forEach(a => {
      //       a.state = 0
      //     })
      //     this.detectionItems = res.data
      //     this.detectionType = 0
      //     this.$set(this.detectionItems,'type',0)
      //     if (row.productList != null && row.productList.length > 0) {
      //       let product =  JSON.parse(JSON.stringify(row.productList))
      //       setTimeout(() => {
      //         product.forEach(p => {
      //           let rowToSelect = this.detectionItems.find(item => item.id === p.id);
      //           if (rowToSelect) {
      //             this.toggleSelection(rowToSelect);
      //           }
      //         });
      //       },200)
      //       }
      //     }
      //   })
      //   },1000);
      // }
    },
      toggleSelection(row) {
        this.$refs.productTable.toggleRowSelection(row, true);
      },
      tableRowClassName({
        row,
        rowIndex
      }) {
    tableRowClassName({ row, rowIndex }) {
        if (row.state === 0) {
          return 'warning-row';
        return "warning-row";
        }
        return '';
      return "";
      },
      handleAll(e) {
        if (e.length > 0) {
          console.log(this.detectionItems);
          this.detectionItems.map(m => {
            m.state = 1
            return m
          })
        this.detectionItems.map((m) => {
          m.state = 1;
          return m;
        });
        } else {
          this.detectionItems.map(m => {
            m.state = 0
            return m
          })
        this.detectionItems.map((m) => {
          m.state = 0;
          return m;
        });
        }
        if (e.length > 0) {
          if(this.multiFiberList.length > 0){
            this.multiFiberList.map(item => {
              item.productList.map(m=>{
          this.multiFiberList.map((item) => {
            item.productList.map((m) => {
                m.state = 1;
                return m;
              })
              return item
            })
            });
            return item;
          });
          }else{
          this.currentDetectionItems.productList.map(m=>{
          this.currentDetectionItems.productList.map((m) => {
              m.state = 1;
              return m;
            })
          });
          }
        } else {
          if(this.multiFiberList.length > 0){
            this.multiFiberList.map(item => {
              item.productList.map(m=>{
          this.multiFiberList.map((item) => {
            item.productList.map((m) => {
                m.state = 0;
                return m;
              })
              return item
            })
            });
            return item;
          });
          }else{
            this.currentDetectionItems.productList.map(m=>{
          this.currentDetectionItems.productList.map((m) => {
              m.state = 0;
              return m;
            });
          }
        }
        this.bsmRow3 = []
        this.detectionItems.forEach(p => {
      this.bsmRow3 = [];
      this.detectionItems.forEach((p) => {
          if(this.type==1){
            if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) {
              if (p.section.indexOf('[') > -1) {
                this.bsmRow = this.HaveJson(p)
          if (
            p.bsm === "1" &&
            p.section !== "" &&
            p.section !== null &&
            p.state === 1
          ) {
            if (p.section.indexOf("[") > -1) {
              this.bsmRow = this.HaveJson(p);
              }
              this.bsm1 = true
              this.bsm1Dia = true
            } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) {
              this.bsm1 = false
            this.bsm1 = true;
            this.bsm1Dia = true;
          } else if (
            p.bsm === "1" &&
            p.section !== "" &&
            p.section !== null &&
            p.state === 0
          ) {
            this.bsm1 = false;
            }
            if (p.bsm === '1' && p.inspectionItem === '光纤接头损耗' && this.sampleList.length > 1 && p.state === 1) {
              this.bsm2 = true
              this.bsm1Dia = true
          if (
            p.bsm === "1" &&
            p.inspectionItem === "光纤接头损耗" &&
            this.sampleList.length > 1 &&
            p.state === 1
          ) {
            this.bsm2 = true;
            this.bsm1Dia = true;
              if(this.bsm2Val2.length === 0){
                this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2
                this.computationalPairing(this.sampleList.length)
                this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
              this.bsm2Val =
                ((this.sampleList.length - 1) * this.sampleList.length) / 2;
              this.computationalPairing(this.sampleList.length);
              this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
              }
            } else if (p.bsm === '1' && p.inspectionItem === '光纤接头损耗' && p.state === 1) {
              this.bsm2 = false
          } else if (
            p.bsm === "1" &&
            p.inspectionItem === "光纤接头损耗" &&
            p.state === 1
          ) {
            this.bsm2 = false;
            }
          }
          // if (p.ask.includes('RTS')&&p.state === 1) {
@@ -1294,47 +1355,47 @@
          //   this.bsm3Dia = true
          //   this.bsmRow3.push(p)
          // }
        })
      });
        if (e.length > 0) {
          this.sampleList.map(item => {
        this.sampleList.map((item) => {
            if (this.sampleIds.indexOf(item.id) > -1) {
              item.insProduct.map(m => {
                m.state = 1
            item.insProduct.map((m) => {
              m.state = 1;
                return m;
              })
            });
            }
            return item
          })
          return item;
        });
        } else {
          this.sampleList.map(item => {
        this.sampleList.map((item) => {
            if (this.sampleIds.indexOf(item.id) > -1) {
              item.insProduct.map(m => {
                m.state = 0
            item.insProduct.map((m) => {
              m.state = 0;
                return m;
              })
            });
            }
            return item
          })
          return item;
        });
        }
        this.$nextTick(() => {
          this.$refs.productTable.doLayout()
        })
        this.$refs.productTable.doLayout();
      });
      },
      upProductSelect(selection, row) {
        row.state = row.state == 1 ? 0 : 1
      row.state = row.state == 1 ? 0 : 1;
        if(this.selectFiberList.length > 0){
          this.selectFiberList.map(item => {
            item.productList.map(m=>{
        this.selectFiberList.map((item) => {
          item.productList.map((m) => {
              if(m.id == row.id){
                m.state = row.state;
              }
              return m
            })
            return item
          })
            return m;
          });
          return item;
        });
        }else{
          this.currentDetectionItems.productList.map(m=>{
        this.currentDetectionItems.productList.map((m) => {
            if(m.id == row.id){
                m.state = row.state;
              }
@@ -1342,149 +1403,144 @@
            });
        }
        if(this.type==1){
          if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
            if (row.section.indexOf('[') > -1) {
              this.bsmRow = this.HaveJson(row)
        if (
          row.bsm === "1" &&
          row.section !== "" &&
          row.section !== null &&
          row.state === 1
        ) {
          if (row.section.indexOf("[") > -1) {
            this.bsmRow = this.HaveJson(row);
            }
            this.bsm1 = true
            this.bsm1Dia = true
          } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
            this.bsm1 = false
          this.bsm1 = true;
          this.bsm1Dia = true;
        } else if (
          row.bsm === "1" &&
          row.section !== "" &&
          row.section !== null &&
          row.state === 0
        ) {
          this.bsm1 = false;
          }
          if (row.bsm === '1' && row.inspectionItem === '光纤接头损耗' && this.sampleList.length > 1 && row.state === 1) {
          this.bsm2 = true
          this.bsm1Dia = true
        if (
          row.bsm === "1" &&
          row.inspectionItem === "光纤接头损耗" &&
          this.sampleList.length > 1 &&
          row.state === 1
        ) {
          this.bsm2 = true;
          this.bsm1Dia = true;
            if(this.bsm2Val2.length === 0){
              this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2
              this.computationalPairing(this.sampleList.length)
              this.bsm2Val2 = this.HaveJson(this.bsm2Val3)
            this.bsm2Val =
              ((this.sampleList.length - 1) * this.sampleList.length) / 2;
            this.computationalPairing(this.sampleList.length);
            this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
            }
          } else if (row.bsm === '1' && row.inspectionItem === '光纤接头损耗' && row.state === 1) {
            this.bsm2 = false
        } else if (
          row.bsm === "1" &&
          row.inspectionItem === "光纤接头损耗" &&
          row.state === 1
        ) {
          this.bsm2 = false;
          }
        }else{
          this.bsm1Dia = false
        this.bsm1Dia = false;
        }
        // if (row.ask.includes('RTS')&&row.state === 1) {
        //   this.bsmRow3 = null;
        //   row.rts = ''
        //   this.bsm3Val = ''
        //   this.bsm3Dia = true
        //   this.bsmRow3 = row
        // }else{
        //   this.bsm3Dia = false
        // }
      },
      computationalPairing(n){
        const nums = [];
        for (let i = 1; i <= n; i++) {
          nums.push(i);
        }
        this.bsm2Val3 = this.HaveJson(this.permute(nums))
      this.bsm2Val3 = this.HaveJson(this.permute(nums));
      },
      setClassName({ column }) {
        if (column.type == 'selection' && !this.isAllDisabled) {
          return 'all-disabled'
      if (column.type == "selection" && !this.isAllDisabled) {
        return "all-disabled";
        }
      },
      setClassName0({ column }){
        if (column.type == 'selection' && this.active!=1) {
          return 'all-disabled'
      if (column.type == "selection" && this.active != 1) {
        return "all-disabled";
        }
      },
      clearFibers(){
        this.packageInfo.ismiers = false
        this.fibersList = []
        this.bushing.forEach(a=>{
          a.fibers = []
        })
      this.packageInfo.ismiers = false;
      this.fibersList = [];
      this.bushing.forEach((a) => {
        a.fibers = [];
      });
      },
      save(){
        // if(this.bushing.length === 0){
        //   this.$message.error('缺少配置无法保存')
        //   return
        // }
        // for(let a in this.bushing){
        //   if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){
        //     this.$message.error(this.bushing[a].color+'管色标套管缺少配置无法保存')
        //     return
        //   }
        // }
        // this.sample.forEach(a=>{
        //   a.bushing = this.bushing
        // })
        // this.$message.success('已保存')
        // this.$emit('saveFiberopticConfig')
        if(this.bushing.length === 0){
          this.$message.error('缺少套管无法保存')
          return
        this.$message.error("缺少套管无法保存");
        return;
        }
        this.bushing.forEach(item=>{
      this.bushing.forEach((item) => {
          // å¦‚果光纤带有值
          if(this.fibersList.length != 0) {
              this.fibersList.forEach(a=>{
                a.fiber = this.fiberList.filter(b=>b.fibersIdent == a.ident)
              })
              item.fibers = this.fibersList // å…‰çº¤å¸¦
              item.fiber = [] // å…‰çº¤
          this.fibersList.forEach((a) => {
            a.fiber = this.fiberList.filter((b) => b.fibersIdent == a.ident);
          });
          item.fibers = this.fibersList; // å…‰çº¤å¸¦
          item.fiber = []; // å…‰çº¤
          }else {
            // å¦‚果光纤带没有值
            item.fibers = [] // å…‰çº¤å¸¦
            item.fiber = this.fiberList // å…‰çº¤
          item.fibers = []; // å…‰çº¤å¸¦
          item.fiber = this.fiberList; // å…‰çº¤
          }
        })
        this.sample.forEach(a=>{
          a.bushing = this.bushing
        })
        this.$message.success('已保存')
      });
      this.sample.forEach((a) => {
        a.bushing = this.bushing;
      });
      this.$message.success("已保存");
        this.$emit("saveFiberopticConfig");
      },
      beforeClose(done){
        if (this.bsm1) {
          if (this.bsm1Val === null || this.bsm1Val === '') {
            this.$message.error('特殊项目必须处理')
            return
        if (this.bsm1Val === null || this.bsm1Val === "") {
          this.$message.error("特殊项目必须处理");
          return;
          }
        }
        if (this.bsm2) {
          if (this.bsm2Val2.length === 0) {
            this.$message.error('特殊项目必须处理')
            return
          this.$message.error("特殊项目必须处理");
          return;
          }
          let set = new Set()
        let set = new Set();
          for (let i=0;i<this.bsm2Val2.length;i++){
            let num0 = set.size
            set.add(JSON.stringify(this.bsm2Val2[i]))
            let num1 = set.size
          let num0 = set.size;
          set.add(JSON.stringify(this.bsm2Val2[i]));
          let num1 = set.size;
            if(num1==num0){
              this.$message.error('关联项目不能重复')
              return
            this.$message.error("关联项目不能重复");
            return;
            }
            set.add(JSON.stringify(this.bsm2Val2[i].reverse()))
            let num2 = set.size
          set.add(JSON.stringify(this.bsm2Val2[i].reverse()));
          let num2 = set.size;
            if(num1==num2){
              this.$message.error('关联项目不能重复')
              return
            this.$message.error("关联项目不能重复");
            return;
            }
          }
        }
        done()
      done();
      },
      beforeClose0(done){
        if(!this.bsm3Val){
          this.$message.error('RST必须填写')
          return
        this.$message.error("RST必须填写");
        return;
        }else{
          if(Array.isArray(this.bsmRow3)){
            this.bsmRow3.forEach(item=>{
              item.rts = this.bsm3Val
            })
          this.bsmRow3.forEach((item) => {
            item.rts = this.bsm3Val;
          });
          }else{
            this.bsmRow3.rts = this.bsm3Val
          this.bsmRow3.rts = this.bsm3Val;
          }
        }
        done()
      done();
      },
      upBsm1(val) {
        let sections = JSON.parse(this.bsmRow.section);
@@ -1494,36 +1550,36 @@
        let prices = JSON.parse(this.bsmRow.price);
        for (var a in sections) {
          if (val === sections[a]) {
            this.productList.forEach(p => {
          this.productList.forEach((p) => {
              if (p.id === this.bsmRow.id) {
                p.section = sections[a]
                p.ask = asks[a]
                p.tell = tells[a]
                p.manHour = manHours[a]
                p.price = prices[a]
              p.section = sections[a];
              p.ask = asks[a];
              p.tell = tells[a];
              p.manHour = manHours[a];
              p.price = prices[a];
              }
            })
            break
          });
          break;
          }
        }
      },
      bsm2Up(val){
        let list = []
      let list = [];
        for(let a=1;a < this.bsm2Val3.length + 1;a++){
          list.push(a)
        list.push(a);
        }
        let set = new Set()
        let size1 = set.length
      let set = new Set();
      let size1 = set.length;
        while(set.size < val){
          set.add(Math.ceil(Math.random() * this.bsm2Val3.length))
        set.add(Math.ceil(Math.random() * this.bsm2Val3.length));
        }
        this.bsm2Val2 = []
      this.bsm2Val2 = [];
        for(let a of set){
          this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a-1]))
        this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a - 1]));
        }
      }
    }
  }
    },
  },
};
</script>
<style scoped>
@@ -1532,6 +1588,7 @@
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  padding: 10px 15px;
  }
  .ins_order_config::-webkit-scrollbar {
@@ -1555,7 +1612,7 @@
  }
  .grid-content h5 {
    color: #3A7BFA;
  color: #3a7bfa;
    font-weight: 400;
    line-height: 32px;
    padding-left: 16px;
@@ -1591,7 +1648,7 @@
  }
  .models{
    font-size:14px;
    width:320px;
  width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
src/views/business/inspectionOrder/fiberoptic-config.vue
@@ -119,8 +119,8 @@
                    <el-option
                      v-for="(color, i) in colors"
                      :key="i"
                      :label="color.lable"
                      :value="color.value"
                      :label="color.dictLable"
                      :value="color.dictValue"
                    ></el-option>
                  </el-select>
                </template>
@@ -551,8 +551,8 @@
                    <el-option
                      v-for="(color, i) in colors"
                      :key="i"
                      :label="color.lable"
                      :value="color.value"
                      :label="color.dictLable"
                      :value="color.dictValue"
                    ></el-option>
                  </el-select>
                </template>
@@ -796,6 +796,15 @@
</template>
<script>
import { getDicts } from "@/api/system/dict/data";
import {
  getStandTreeBySampleType,
  selectStandardTreeList2,
  selectStandardMethodEnum,
  selectsStandardMethodByFLSSM,
  selectStandardProductList,
} from "@/api/standard/standardLibrary";
import { permute } from "@/api/business/inspectionOrder";
export default {
  props: {
    active: {
@@ -999,8 +1008,8 @@
          let color = this.colors[i];
          for (let j = 0; j < newFiberList.length; j++) {
            let newColor = newFiberList[j];
            if (color.value == newColor[0]) {
              newFiberList[j].push(color.orderNum);
            if (color.dictValue == newColor[0]) {
              newFiberList[j].push(color.dictSort);
            }
          }
        }
@@ -1279,12 +1288,14 @@
      this.$parent.configShow = false;
    },
    getTypeDicts1() {
      this.$axios
        .post(this.$api.enums.selectEnumByCategory, {
          category: "色标",
        })
      getDicts("fiber_color_type")
        .then((res) => {
          if (res.code === 200) {
          this.colors = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    // å¥—管数目生成表格数据
@@ -1293,7 +1304,7 @@
      for (let i = 0; i < this.packageInfo.num1; i++) {
        let bushing = {
          ident: this.bushing.length + 1,
          color: this.colors[i].label,
          color: this.colors[i].dictLabel,
          standNum: null,
          testNum: null,
          fibers: [],
@@ -1366,11 +1377,6 @@
            this.multiFiberList = this.fibersList;
            // é»˜è®¤å‹¾é€‰
            setTimeout(() => {
              // this.selectBushing.forEach(item =>{
              // let rowToSelect =  this.bushing.find(a => a.ident == item.ident)
              // this.$refs.table0.toggleRowSelection(rowToSelect, true)
              // })
              this.multiFiberList.forEach((item) => {
                let rowToSelect = this.fibersList.find(
                  (a) => a.ident == item.ident
@@ -1401,10 +1407,6 @@
            this.addFiber(1);
            // é»˜è®¤å‹¾é€‰
            setTimeout(() => {
              // this.selectBushing.forEach(item =>{
              // let rowToSelect =  this.bushing.find(a => a.ident == item.ident)
              // this.$refs.table0.toggleRowSelection(rowToSelect, true)
              // })
              this.fiberList.forEach((item) => {
                this.$refs.table3.toggleRowSelection(item, true);
              });
@@ -1446,7 +1448,7 @@
        this.bushing = [];
        for (var i = 0; i < this.packageInfo.num1; i++) {
          let bushing = {
            color: colors2[i].label,
            color: colors2[i].dictLabel,
            standNum: this.packageInfo.standNum,
            testNum: this.packageInfo.testNum,
            fibers: [],
@@ -1486,12 +1488,12 @@
      }
    },
    getStandTreeBySampleType() {
      this.$axios
        .post(this.$api.standardTree.getStandTreeBySampleType, {
      getStandTreeBySampleType({
          laboratory: "通信产品实验室",
          sampleType: "光纤",
        })
        .then((res) => {
          if (res.code === 200) {
          this.mireModels = [];
          res.data.forEach((a) => {
            this.mireModels.push({
@@ -1499,15 +1501,19 @@
              value: a.sample + " - " + a.model,
            });
          });
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    getStandTreeBySampleType2() {
      this.$axios
        .post(this.$api.standardTree.getStandTreeBySampleType, {
      getStandTreeBySampleType({
          laboratory: "通信产品实验室",
          sampleType: "光纤带",
        })
        .then((res) => {
          if (res.code === 200) {
          this.miresModels = [];
          res.data.forEach((a) => {
            this.miresModels.push({
@@ -1515,54 +1521,43 @@
              value: a.model,
            });
          });
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    selectsStandardMethodByFLSSM() {
      this.mireStandards = [];
      this.mireStandardLoading = true;
      this.$axios
        .post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
      selectsStandardMethodByFLSSM({
          tree: "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤ - " + this.mireModel,
        })
        .then((res) => {
          if (res.code === 200) {
          this.mireStandardLoading = false;
          this.mireStandards = res.data.standardMethodList;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    selectsStandardMethodByFLSSM2() {
      this.miresStandards = [];
      this.$axios
        .post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree:
            "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " + this.miresModel,
      selectsStandardMethodByFLSSM({
        tree: "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " + this.miresModel,
        })
        .then((res) => {
          if (res.code === 200) {
          this.miresStandards = res.data.standardMethodList;
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    methodChange(val) {
      // if (val === null || val === '') return
      // this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      //   model: this.mireModel.split(' - ')[1],
      //   standardMethodListId: val,
      //   factory: ''
      // }, {
      //   headers: {
      //     'Content-Type': 'application/json'
      //   }
      // }).then(res => {
      //   res.data.forEach(a => {
      //     a.state = 0
      //   })
      //   this.productList = res.data
      //   setTimeout(() => {
      //     this.productList.forEach(a => {
      //       if (a.state == 1) this.toggleSelection(a)
      //     })
      //     this.addFiber()
      //   }, 200)
      // })
      // å°†ä¸‹æ‹‰æ¡†å€¼èµ‹å€¼ç»™å…‰çº¤  ç›‘听去除
      if (this.selectFiberList.length == 0) {
        this.$message.error("请选择数据");
@@ -1571,21 +1566,13 @@
      if (val === null || val === "") return;
      if (this.mireStandards == null) return;
      this.$axios
        .post(
          this.$api.standardTree.selectStandardProductList,
          {
      selectStandardProductList({
            model: this.mireModel.split(" - ")[1],
            standardMethodListId: val,
            factory: "",
          },
          {
            headers: {
              "Content-Type": "application/json",
            },
          }
        )
      })
        .then((res) => {
          if (res.code === 200) {
          this.detectionItems = [];
          if (res.data != null && res.data.length != 0) {
            res.data.forEach((a) => {
@@ -1611,53 +1598,28 @@
              }
            });
          });
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    methodChange2(val) {
      // if (val === null || val === '') return
      // this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      //   model: '',
      //   standardMethodListId: val,
      //   factory: '中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - ' + this.miresModel + ' - ',
      // }, {
      //   headers: {
      //     'Content-Type': 'application/json'
      //   }
      // }).then(res => {
      //   res.data.forEach(a => {
      //     a.state = 0
      //   })
      //   this.productList2 = res.data
      //   setTimeout(() => {
      //     this.productList2.forEach(a => {
      //       if (a.state == 1) this.toggleSelection(a)
      //     })
      //     this.addFibers()
      //   }, 200)
      // })
      if (this.multiFiberList.length == 0) {
        this.$message.error("请选择需要更改的数据");
        return;
      }
      if (val === null || val === "") return;
      this.$axios
        .post(
          this.$api.standardTree.selectStandardProductList,
          {
      selectStandardProductList({
            model: "",
            standardMethodListId: val,
            factory:
              "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " +
              this.miresModel +
              " - ",
          },
          {
            headers: {
              "Content-Type": "application/json",
            },
          }
        )
      })
        .then((res) => {
          if (res.code === 200) {
          // å°†èŽ·å–çš„æ£€æµ‹é¡¹ä¿¡æ¯èµ‹å€¼
          this.detectionItems = [];
          if (res.data != null && res.data.length != 0) {
@@ -1672,21 +1634,6 @@
              ? (this.isAskOnlyRead = false)
              : (this.isAskOnlyRead = true);
          }
          // ç»™é€‰ä¸­çš„光纤带赋值
          // for(let i= 0; i < this.fibersList.length; i++){
          //     this.multiFiberList.forEach(item => {
          //       if(this.fibersList[i].ident == item.ident){
          //         this.fibersList[i].model = this.miresModel // çº¤å¸¦è§„æ ¼
          //         this.fibersList[i].num = this.miresModel.replace('芯','') // å…‰çº¤æ£€æµ‹é‡
          //         this.fibersList[i].productList = this.detectionItems // æ£€æµ‹é¡¹
          //         this.miresStandards.forEach(a => {
          //           if(a.id == this.miresStandard) {
          //             this.fibersList[i].standard = a.code // å‚考标准
          //           }
          //         })
          //       }
          //     })
          // }
          for (let i = 0; i < this.multiFiberList.length; i++) {
            for (let j = 0; j < this.fibersList.length; j++) {
              if (this.multiFiberList[i].ident == this.fibersList[j].ident) {
@@ -1700,6 +1647,10 @@
              }
            }
          }
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    addFiber(isInspection) {
@@ -1762,7 +1713,7 @@
                let fiber = {
                  ident: this.fiberList.length + 1,
                  bushColor: item.color,
                  color: colors3[count].label,
                  color: colors3[count].dictLabel,
                  model: null,
                  noSplitModel: null,
                  standard: null,
@@ -1775,65 +1726,6 @@
              }
            }
          });
          // this.multiFiberList.forEach((a, index) => {
          //   a.fiber = [];
          //   if (index > 0 && index < this.multiFiberList.length) {
          //     if (
          //       this.multiFiberList[index].color ==
          //       this.multiFiberList[index - 1].color
          //     ) {
          //       // æ ¹æ®æ¯æ ¹ç®¡æŠ½æ£€æ ‡å‡†é‡ ç¡®å®š é¢œè‰²å¾ªçޝ
          //       //let colors3 = colors2.slice(0,this.packageInfo.standNum)
          //       for (var i = 0; i < parseInt(a.num); i++) {
          //         let fiber = {
          //           ident: this.fiberList.length + 1,
          //           bushColor: a.color,
          //           // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
          //           color: colors2[count].label,
          //           model: null,
          //           noSplitModel: null,
          //           standard: null,
          //           fibersIdent: a.ident,
          //           productList: [],
          //         };
          //         this.fiberList.push(fiber);
          //         count++;
          //       }
          //     } else {
          //       // æ ¹æ®æ¯æ ¹ç®¡æŠ½æ£€æ ‡å‡†é‡ ç¡®å®š é¢œè‰²å¾ªçޝ
          //       let colors3 = colors2.slice(0, this.packageInfo.standNum);
          //       for (var i = 0; i < parseInt(a.num); i++) {
          //         let fiber = {
          //           ident: this.fiberList.length + 1,
          //           bushColor: a.color,
          //           // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
          //           color: colors3[i].label,
          //           model: null,
          //           noSplitModel: null,
          //           standard: null,
          //           fibersIdent: a.ident,
          //           productList: [],
          //         };
          //         this.fiberList.push(fiber);
          //       }
          //     }
          //   } else {
          //     for (var i = 0; i < parseInt(a.num); i++) {
          //       let fiber = {
          //         ident: this.fiberList.length + 1,
          //         bushColor: a.color,
          //         // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
          //         color: colors2[i].label,
          //         model: null,
          //         noSplitModel: null,
          //         standard: null,
          //         fibersIdent: a.ident,
          //         productList: [],
          //       };
          //       this.fiberList.push(fiber);
          //     }
          //   }
          // });
        } else {
          let count = 0;
          let colors3 = colors2.slice(0, this.packageInfo.standNum);
@@ -1844,7 +1736,7 @@
                let fiber = {
                  ident: this.fiberList.length + 1,
                  bushColor: item.color,
                  color: colors3[count].label,
                  color: colors3[count].dictLabel,
                  model: null,
                  standard: null,
                  productList: [],
@@ -1880,7 +1772,7 @@
              let fiber = {
                ident: this.fiberList.length + 1,
                bushColor: item.color,
                color: colors3[count].label,
                color: colors3[count].dictLabel,
                model: null,
                standard: null,
                productList: [],
@@ -1889,24 +1781,6 @@
              count++;
              count = count % item.standNum;
            }
            //  else {
            //   for (let i = 0; i < parseInt(item.testNum); i++) {
            //     let fiber = {
            //       ident: this.fiberList.length + 1,
            //       bushColor: item.color,
            //       color:
            //         colors2[
            //           i + parseInt(item.testNum) * index > colors2.length
            //             ? 0
            //             : i + parseInt(item.testNum) * index * index
            //         ].label,
            //       model: null,
            //       standard: null,
            //       productList: [],
            //     };
            //     this.fiberList.push(fiber);
            //   }
            // }
          } else {
            flag = false;
          }
@@ -1917,125 +1791,8 @@
          return;
        }
      }
      // äºŒä»£
      // // æ˜¯å¦é€‰æ‹©å¥—管
      // if(this.selectBushing.length == 0) {
      //   this.$message.error('未选择套管')
      //   return
      // }
      // this.fiberList = []
      // let flag = true
      // // æŒ‰ç…§é¡ºåºç”Ÿæˆå…‰çº¤è‰²æ ‡
      // let colors2 = []
      // if (this.packageInfo.num1 / this.colors.length > 1) {
      //   let num = this.packageInfo.num1 / this.colors.length
      //   if (this.packageInfo.num1 % this.colors.length > 0) num += 1
      //   for (var i = 0; i < num; i++) {
      //     colors2 = colors2.concat(this.colors)
      //   }
      // } else {
      //   colors2 = colors2.concat(this.colors)
      // }
      // // æ ¹æ®å¥—管的测试量生成对应的数量的光纤数据
      // this.selectBushing.forEach((item,index) =>{
      //   if(item.testNum != null && item.testNum != ''){
      //     for(let i =0; i < parseInt(item.testNum); i++){
      //       let fiber = {
      //         ident: this.fiberList.length + 1,
      //         bushColor: item.color,
      //         color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label,
      //         model:  null,
      //         standard: null,
      //         productList: []
      //       }
      //       this.fiberList.push(fiber)
      //     }
      //   }else {
      //     flag = false
      //   }
      // })
      // if(!flag){
      //   this.$message.error('请填写光纤检测量')
      //   return
      // }
      // æœ€åˆ
      // let colors2 = []
      // if (this.packageInfo.num1 / this.colors.length > 1) {
      //   let num = this.packageInfo.num1 / this.colors.length
      //   if (this.packageInfo.num1 % this.colors.length > 0) num += 1
      //   for (var i = 0; i < num; i++) {
      //     colors2 = colors2.concat(this.colors)
      //   }
      // } else {
      //   colors2 = colors2.concat(this.colors)
      // }
      // this.fiberList = []
      // let model = this.mireModel.split(' - ')[1]
      // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code
      // if (this.packageInfo.ismiers) {
      //   if(this.selectFibers.length === 0){
      //     this.$message.error('未选择光纤带')
      //     return
      //   }
      //   this.selectFibers.forEach((a,index) => {
      //     a.fiber = []
      //     for (var i = 0; i < parseInt(a.num); i++) {
      //       let fiber = {
      //         bushColor: a.color,
      //         color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label,
      //         model: model,
      //         standard: standard,
      //         productList: this.HaveJson(this.productList)
      //       }
      //       a.fiber.push(fiber)
      //       this.fiberList.push(fiber)
      //     }
      //   })
      // } else {
      //   this.selectBushing.forEach((a,index) => {
      //     a.fiber = []
      //     for (var i = 0; i < parseInt(a.testNum); i++) {
      //       let fiber = {
      //         bushColor: a.color,
      //         color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label,
      //         model: model,
      //         standard: standard,
      //         productList: this.HaveJson(this.productList)
      //       }
      //       a.fiber.push(fiber)
      //       this.fiberList.push(fiber)
      //     }
      //   })
      // }
    },
    addFibers() {
      // if(this.selectBushing.length===0){
      //   this.$message.error('未选择套管')
      //   return
      // }
      // this.fibersList = []
      // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code
      // this.packageInfo.ismiers = true
      // this.fiberList = []
      // this.selectBushing.forEach(a => {
      //   a.fiber = []
      //   a.fibers = []
      //   for (var i = 0; i < parseInt(a.testNum); i++) {
      //     let fibers = {
      //       code: null,
      //       color: a.color,
      //       model: this.miresModel,
      //       standard: standard,
      //       num: a.testNum,
      //       productList: this.HaveJson(this.productList2),
      //       fiber: []
      //     }
      //     a.fibers.push(fibers)
      //     this.fibersList.push(fibers)
      //   }
      // })
      if (this.selectBushing.length == 0) {
        this.$message.error("未选择套管");
        return;
@@ -2058,7 +1815,7 @@
          let fibers = {
            ident: this.fibersList.length + 1,
            color: item.color,
            colorShow: item.color + "-" + colors2[i].label,
            colorShow: item.color + "-" + colors2[i].dictLabel,
            code: null,
            model: null,
            standard: null,
@@ -2071,45 +1828,6 @@
      });
    },
    rowClickFiber(row, column, event, type) {
      // console.log("row", row);
      // this.type = type
      // if(this.active===1){
      //   if(type==0){
      //     let standard = null;
      //     try{
      //       standard = this.miresStandards.find(a => a.id == this.miresStandards)
      //     }catch(e){}
      //     if(standard&&standard.code=='委托要求'){
      //       this.isAskOnlyRead = false;
      //     }else{
      //       this.isAskOnlyRead = true;
      //     }
      //   }else{
      //     let standard = null;
      //     try{
      //       standard = this.mireStandards.find(a => a.id == this.mireStandard)
      //     }catch(e){}
      //     if(standard&&standard.code=='委托要求'){
      //       this.isAskOnlyRead = false;
      //     }else{
      //       this.isAskOnlyRead = true;
      //     }
      //   }
      // }
      // if(this.type==1){
      //   if (this.active !== 1) {
      //     this.sampleIds = []
      //     this.sampleIds.push(row.id)
      //   }
      // }
      // this.currentDetectionItems = row
      // this.detectionItems = row.productList
      // if(this.detectionItems === null) return
      // setTimeout(() => {
      //   this.detectionItems.forEach(a => {
      //     if (a.state == 1) this.toggleSelection(a)
      //   })
      // }, 200)
      if (type == 1) {
        this.fiberList = row.fiber;
        if (
@@ -2129,24 +1847,16 @@
              (a) => a.code == row.standard
            ).id;
          }
          this.$axios
            .post(
              this.$api.standardTree.selectStandardProductList,
              {
          selectStandardProductList({
                model: "",
                standardMethodListId: this.miresStandard,
                factory:
                  "中天科技检测中心 - é€šä¿¡äº§å“å®žéªŒå®¤ - å…‰çº¤å¸¦ - " +
                  this.miresModel +
                  " - ",
              },
              {
                headers: {
                  "Content-Type": "application/json",
                },
              }
            )
          })
            .then((res) => {
              if (res.code === 200) {
              // å°†èŽ·å–çš„æ£€æµ‹é¡¹ä¿¡æ¯èµ‹å€¼
              this.detectionItems = [];
              if (res.data != null && res.data.length != 0) {
@@ -2187,6 +1897,10 @@
                  }, 200);
                }
              }
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }, 500);
      } else if (type == 0) {
@@ -2207,21 +1921,13 @@
              (a) => a.code == row.standard
            ).id;
          }
          this.$axios
            .post(
              this.$api.standardTree.selectStandardProductList,
              {
          selectStandardProductList({
                model: this.mireModel.split(" - ")[1],
                standardMethodListId: this.mireStandard,
                factory: "",
              },
              {
                headers: {
                  "Content-Type": "application/json",
                },
              }
            )
          })
            .then((res) => {
              if (res.code === 200) {
              this.detectionItems = [];
              if (res.data != null && res.data.length != 0) {
                res.data.forEach((a) => {
@@ -2261,6 +1967,10 @@
                  }, 200);
                }
              }
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }, 500);
      }
@@ -2298,12 +2008,6 @@
            return item;
          });
        }
        // else {
        //   this.currentDetectionItems.productList.map((m) => {
        //     m.state = 1;
        //     return m;
        //   });
        // }
      } else {
        if (this.multiFiberList.length > 0) {
          this.multiFiberList.map((item) => {
@@ -2314,12 +2018,6 @@
            return item;
          });
        }
        // else {
        //   this.currentDetectionItems.productList.map((m) => {
        //     m.state = 0;
        //     return m;
        //   });
        // }
      }
      this.bsmRow3 = [];
      this.detectionItems.forEach((p) => {
@@ -2372,12 +2070,6 @@
            this.bsm2 = false;
          }
        }
        // if (p.ask.includes('RTS')&&p.state === 1) {
        //   p.rts = ''
        //   this.bsm3Val = ''
        //   this.bsm3Dia = true
        //   this.bsmRow3.push(p)
        // }
      });
      if (e.length > 0) {
@@ -2423,28 +2115,8 @@
            this.$message.error("关联项目不能重复");
            return;
          }
          // set.add(JSON.stringify(tempList[i].reverse()))
          // let num2 = set.size
          // if (num1 == num2) {
          //   console.log(111,set);
          //   console.log(111,tempList);
          //   this.$message.error('关联项目不能重复')
          //   return
          // }
        }
        //转换熔接配对的编号
        // let transformList = []
        // for(let i=0;i<this.bsm2Val2.length;i++){
        //   let colorIndex1 = Number(this.bsm2Val2[i][0]-1)
        //   let colorIndex2 = Number(this.bsm2Val2[i][1]-1)
        //   let code1 = this.sampleList[0].sampleCode + '-' + this.fiberList[colorIndex1].bushColor + '-' + this.fiberList[colorIndex1].color
        //   let code2 = this.sampleList[1].sampleCode + '-' + this.fiberList[colorIndex2].bushColor + '-' + this.fiberList[colorIndex2].color
        //   transformList.push([code1,code2])
        // }
        this.isBsm2Val2 = true;
        // console.log(this.bsm2Val2);
        // console.log(transformList);
        // this.$parent.fiberPairing = JSON.stringify(this.bsm2Val2)
      }
      this.bsm1Dia = false;
      this.isBsm2Val2 = false;
@@ -2465,9 +2137,6 @@
        );
      }
      let arr = [...new Set(this.fiberLoss)];
      console.log("list", list);
      console.log("this.fiberLoss", this.fiberLoss);
      console.log("arr", arr);
      row.state = row.state == 1 ? 0 : 1;
      if (this.selectFiberList.length > 0) {
        this.selectFiberList.map((item) => {
@@ -2527,23 +2196,6 @@
            console.log("arr", arr);
            if (this.bsm2) {
              this.computationalPairing(this.selectFiberList.length);
              // é»˜è®¤å±•示一对一
              // this.bsm2Up(this.selectFiberList.length);
              // if (this.bsm2Val2.length === 0) {
              //   this.bsm2Val = this.selectFiberList.length;
              //   this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
              //   console.log(222, this.bsm2Val2);
              // } else {
              //   this.bsm2Val = this.selectFiberList.length;
              // }
              // if (this.bsm2Val2.length === 0) {
              //   this.bsm2Val =
              //     ((this.fiberList.length + 1) * this.fiberList.length) / 2;
              //   this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
              //   console.log(222, this.bsm2Val2);
              // } else {
              //   this.bsm2Val = this.fiberPairing.length;
              // }
            }
          }
        } else if (
@@ -2556,15 +2208,6 @@
      } else {
        this.bsm1Dia = false;
      }
      // if (row.ask.includes('RTS')&&row.state === 1) {
      //   this.bsmRow3 = null;
      //   row.rts = ''
      //   this.bsm3Val = ''
      //   this.bsm3Dia = true
      //   this.bsmRow3 = row
      // }else{
      //   this.bsm3Dia = false
      // }
    },
    checkSampleCodeHasNull() {
      const emptyCodeArr = this.sampleList.filter(
@@ -2575,25 +2218,26 @@
    computationalPairing(n, isValue = false) {
      this.bsm1Dia = true;
      this.isLoading = true;
      this.$axios
        .get(this.$api.insOrder.permute + "?num=" + n + "&isValue=" + isValue)
      permute({
        num: n,
        isValue: isValue,
      })
        .then((res) => {
          if (res.code === 200) {
          this.bsm2Val3Length = this.HaveJson(res.data.resultData);
          if (this.bsm2Val2.length === 0) {
            this.bsm2Val = this.selectFiberList.length;
            this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
            console.log(222, this.bsm2Val2);
          } else {
            this.bsm2Val = this.selectFiberList.length;
          }
          this.bsm2Up(this.selectFiberList.length);
          this.isLoading = false;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      // const nums = [];
      // for (let i = 1; i <= n; i++) {
      //   nums.push(i);
      // }
      // this.bsm2Val3 = this.HaveJson(this.permute(nums));
    },
    permute(nums) {
      const result = [];
@@ -2632,30 +2276,6 @@
      });
    },
    save() {
      // if(this.bushing.length === 0){
      //   this.$message.error('缺少配置无法保存')
      //   return
      // }
      // for(let a in this.bushing){
      //   if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){
      //     this.$message.error(this.bushing[a].color+'管色标套管缺少配置无法保存')
      //     return
      //   }
      // }
      // this.sample.forEach(a=>{
      //   a.bushing = this.bushing
      // })
      // this.$message.success('已保存')
      // this.$emit('saveFiberopticConfig')
      // if(this.inspectionItemST == 1) {
      //   this.$message.success('已保存')
      //   this.sample.forEach(a=>{
      //   a.bushing = this.bushing
      // })
      // this.$emit('saveFiberopticConfig')
      // return
      // }
      let flag = true;
      let flags = true;
@@ -3268,8 +2888,8 @@
          let color = this.colors[i];
          for (let j = 0; j < newFiberList.length; j++) {
            let newColor = newFiberList[j];
            if (color.value == newColor[0]) {
              newFiberList[j].push(color.orderNum);
            if (color.dictValue == newColor[0]) {
              newFiberList[j].push(color.dictSort);
            }
          }
        }
@@ -3297,19 +2917,6 @@
        this.bsm2Val2 = resultList;
        console.log("this.bsm2Val2", this.bsm2Val2);
      } else {
        // if (val == this.bsm2Val3.length) {
        //   this.bsm2Val2 = [];
        //   this.computationalPairing(this.selectFiberList.length,true);
        //   if (this.bsm2Val2.length === 0) {
        //     this.bsm2Val =
        //       ((this.selectFiberList.length + 1) * this.selectFiberList.length) / 2;
        //     this.bsm2Val2 = this.HaveJson(this.bsm2Val3);
        //   } else {
        //     this.bsm2Val = this.selectFiberList.length;
        //   }
        //   this.bsm1DiaLoading = false;
        //   console.log('loading',this,this.bsm1DiaLoading);
        // } else {
        // ä¸€å¯¹ä¸€
        this.bsm1DiaLoading = true;
        let list = [];
@@ -3352,6 +2959,7 @@
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px 15px;
}
.models {
  font-size: 14px;
src/views/business/inspectionOrder/index.vue
@@ -238,7 +238,7 @@
        >
          <p style="font-size: 16px; color: #333333" v-if="!isQuash">
            å§”托编号<span style="color: #34bd66">{{
              this.insOrderRow.entrustCode
              this.insOrderRow.outEntrustCode
            }}</span
            >的信息是否撤销
          </p>
@@ -258,14 +258,10 @@
            </el-form-item>
          </el-form>
          <span slot="footer" class="dialog-footer">
            <el-row v-if="!isQuash">
              <el-button @click="handleClose">取 æ¶ˆ</el-button>
              <el-button type="primary" @click="submitForm" :loading="upLoad"
                >ç¡® å®š</el-button
              >
            </el-row>
            <el-row v-else>
              <el-button @click="handleClose">返 å›ž</el-button>
            <el-row>
              <el-button @click="handleClose">{{
                isQuash ? "返 å›ž" : "取 æ¶ˆ"
              }}</el-button>
              <el-button type="primary" @click="submitForm" :loading="upLoad"
                >ç¡® å®š</el-button
              >
@@ -390,18 +386,6 @@
          width="80%"
        >
          <div class="table-container" v-if="deleteDialogVisible">
            <!-- <ValueTable
            ref="ValueTableDataDelete"
            :url="
              $api.insOrder.selectNoProducts +
              '?orderId=' +
              orderId +
              '&ids=' +
              this.revocationInsProductIds
            "
            :componentData="componentDataDelete"
            :isColumnWidth="true"
          /> -->
            <el-table
              height="500px"
              ref="revokeTable"
@@ -822,28 +806,39 @@
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import {
  selectInsOrderParameter,
  labelPrinting,
  exportChecked,
  selectSampleAndProductByOrderId,
  hasSendUrgentOrder,
  delCustomById,
  upCustom,
  selectSampleByOrderId,
  selectProductsBySampleId,
  revoke,
  viewDetails,
  downReport,
  selectTemperatureByProductId,
  selectTemperatureNumberByProductId,
  revokeReviewTemperatureByProductId,
  revokeReviewConsistentByProductId,
  revokeReviewProduct,
  revokeReviewSample,
  upPlanUser2,
  updateStatus,
  updateInspected,
  revocationPassed,
  revocationCancel,
} from "@/api/business/inspectionOrder";
import { getDicts } from "@/api/system/dict/data";
import vueQr from "vue-qr";
import getLodop from "@/utils/lodop";
import Add from "./add.vue";
import { mapGetters } from "vuex";
import LimsTable from "@/components/Table/lims-table.vue";
import limsTable from "@/components/Table/lims-table.vue";
export default {
  components: {
    limsTable,
    Add,
    vueQr,
    LimsTable,
  },
  computed: {
    ...mapGetters(["permissions"]),
@@ -1026,7 +1021,9 @@
            {
              name: "审核",
              type: "text",
              clickFun: (row) => {},
              clickFun: (row) => {
                this.handleVerify(row);
              },
              disabled: (row, index) => {
                return row.state != 0;
              },
@@ -1034,7 +1031,9 @@
            {
              name: "撤销",
              type: "text",
              clickFun: (row) => {},
              clickFun: (row) => {
                this.handlEquash(row);
              },
              disabled: (row, index) => {
                return row.state != 1 && row.state != 0;
              },
@@ -1042,7 +1041,9 @@
            {
              name: "撤销审核",
              type: "text",
              clickFun: (row) => {},
              clickFun: (row) => {
                this.handlEquashCheck(row);
              },
              disabled: (row, index) => {
                return (
                  (row.state != 1 && row.state != 0) ||
@@ -1429,13 +1430,9 @@
        entrustCode: row.entrustCode,
        sampleCode: row.sampleCode,
      };
      this.$axios
        .post(this.$api.insOrder.viewDetails, data, {
          headers: {
            "Content-Type": "application/json",
          },
        })
      viewDetails(data)
        .then((res) => {
          if (res.code === 200) {
          this.viewDetailsList = res.data;
          if (res.data[0].tableHeader) {
            this.tableHeader = res.data[0].tableHeader;
@@ -1446,6 +1443,10 @@
              },
            ];
          }
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    getLabelPrinting(selection) {
@@ -1663,16 +1664,7 @@
      //   document.body.appendChild(link);
      //   link.click();
      // }
      this.$axios
        .get(
          this.$api.insReport.downReport + "?id=" + row.reportId + "&type=1",
          {
            headers: {
              "Content-Type": "application/json",
            },
            responseType: "blob",
          }
        )
      downReport({ id: row.reportId })
        .then((res) => {
          let fileName = row.tempUrlPdf;
          if (fileName.includes("_")) {
@@ -1685,14 +1677,21 @@
          link.download = fileName;
          document.body.appendChild(link);
          link.click();
        })
        .catch((error) => {
          console.error(error);
        });
    },
    // å®¡æ ¸
    handleVerify(row) {
      // this.verifyDialogVisible = true;
      this.active = 3;
      this.currentId = row.id;
      this.examine = 1;
      this.$router.push({
        name: "showDetails",
        query: {
          active: 3,
          currentId: row.id,
          examine: 1,
        },
      });
    },
    // å…¨é€‰
    handleSelectionAll(val) {
@@ -1909,108 +1908,108 @@
      if (this.deleteTilte == "撤销") {
        // æ˜¯å¦æ˜¯æ¸©åº¦å¾ªçޝ
        if (tree.temperature) {
          this.$axios
            .get(
              this.$api.insOrder.selectTemperatureByProductId +
                "?productId=" +
                tree.id
            )
          selectTemperatureByProductId({ productId: tree.id })
            .then((res) => {
              if (res.code === 200) {
              this.loadRecursion(this.treeTableData, tree.id, res.data);
              resolve(res.data);
              this.recursionTreeTableData(this.revokeData, this.treeTableData);
                this.recursionTreeTableData(
                  this.revokeData,
                  this.treeTableData
                );
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }
        // æ˜¯å¦æ˜¯æ£€éªŒæ¬¡æ•°
        else if (tree.temperatureNumber) {
          this.$axios
            .get(
              this.$api.insOrder.selectTemperatureNumberByProductId +
                "?parentId=" +
                tree.parentId +
                "&inspectionItem=" +
                tree.inspectionItemTwo
            )
          selectTemperatureNumberByProductId({
            parentId: tree.parentId,
            inspectionItem: tree.inspectionItemTwo,
          })
            .then((res) => {
              if (res.code === 200) {
              this.loadRecursion(this.treeTableData, tree.id, res.data);
              resolve(res.data);
              this.recursionTreeTableData(this.revokeData, this.treeTableData);
                this.recursionTreeTableData(
                  this.revokeData,
                  this.treeTableData
                );
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        } else {
          this.$axios
            .get(
              this.$api.insOrder.selectProductsBySampleId +
                "?sampleId=" +
                tree.id +
                "&orderId=" +
                this.orderId
            )
          selectProductsBySampleId({
            sampleId: tree.id,
            orderId: this.orderId,
          })
            .then((res) => {
              if (res.code === 200) {
              this.treeTableData.forEach((m, index) => {
                if (m.sampleId == tree.id) {
                  m.children = res.data;
                }
              });
              resolve(res.data);
              this.recursionTreeTableData(this.revokeData, this.treeTableData);
              // // å¦‚果该样品已经被勾选 é‚£ä¹ˆæ‰€å¾—到的检验项也要进行勾选
              // let data = this.revokeData.map((item) => item.id);
              // if (data.includes(tree.id)) {
              //   this.treeTableData.forEach((m, index) => {
              //     if (m.children) {
              //       m.children.forEach((n, i) => {
              //         if (tree.id == n.sampleId) {
              //           this.$refs.revokeTable.toggleRowSelection(n, true);
              //         }
              //       });
              //     }
              //   });
              // }
                this.recursionTreeTableData(
                  this.revokeData,
                  this.treeTableData
                );
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }
      } else if (this.deleteTilte == "撤销审核") {
        // æ˜¯å¦æ˜¯æ¸©åº¦å¾ªçޝ
        if (tree.temperature) {
          this.$axios
            .get(
              this.$api.insOrder.revokeReviewTemperatureByProductId +
                "?productId=" +
                tree.id
            )
          revokeReviewTemperatureByProductId({ productId: tree.id })
            .then((res) => {
              if (res.code === 200) {
              resolve(res.data);
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }
        // æ˜¯å¦æ˜¯å¾ªçŽ¯æ¬¡æ•°
        else if (tree.temperatureNumber) {
          this.$axios
            .get(
              this.$api.insOrder.revokeReviewConsistentByProductId +
                "?parentId=" +
                tree.parentId +
                "&inspectionItem=" +
                tree.inspectionItemTwo
            )
          revokeReviewConsistentByProductId({
            parentId: tree.parentId,
            inspectionItem: tree.inspectionItemTwo,
          })
            .then((res) => {
              if (res.code === 200) {
              resolve(res.data);
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        } else {
          this.$axios
            .get(
              this.$api.insOrder.revokeReviewProduct +
                "?sampleId=" +
                tree.id +
                "&orderId=" +
                this.orderId
            )
          revokeReviewProduct({
            sampleId: tree.id,
            orderId: this.orderId,
          })
            .then((res) => {
              if (res.code === 200) {
              resolve(res.data);
              treeNode.loading = false;
              }
            })
            .catch((error) => {
              console.error(error);
            });
        }
      }
@@ -2021,18 +2020,20 @@
        this.quashDialogVisible = true;
        this.insOrderRow = row;
      } else {
        // this.componentDataDelete.entity.orderId = row.id
        this.orderId = row.id;
        this.$axios
          .get(this.$api.insOrder.selectSampleByOrderId + "?orderId=" + row.id)
        selectSampleByOrderId({
          orderId: row.id,
        })
          .then((res) => {
            console.log("res", res);
            if (res.code === 200) {
            this.treeTableData = res.data;
            this.treeTableData2 = JSON.parse(JSON.stringify(res.data));
            }
          })
          .catch((error) => {
            console.error(error);
          });
        this.revocationInsProductIds = "";
        this.componentDataDelete.showSelect = true;
        this.componentDataDelete.select = true;
        this.deleteTilte = "撤销";
        this.deleteDialogVisible = true;
      }
@@ -2082,25 +2083,13 @@
            }
          });
          productIds = [...new Set(productIds)];
          console.log("data", data);
          console.log("data1", data1);
        }
        //
        console.log("sampleId", sampleIds);
        console.log("productIds", productIds);
        let data = {
          orderId: this.orderId,
          sampleIds: sampleIds,
          productIds: productIds,
        };
        this.$axios
          .post(this.$api.insOrder.revoke, data, {
            headers: {
              "Content-Type": "application/json",
            },
            noQs: true,
          })
        revoke(data)
          .then((res) => {
            if (res.code === 200) {
              this.deleteDialogVisible = false;
@@ -2109,47 +2098,14 @@
              this.refreshTable();
              this.$message.success("撤销成功");
            }
          })
          .catch((error) => {
            console.error(error);
          });
        console.log("revokeData", this.revokeData);
        console.log("data", data);
        // let ids = this.deleteList.map((m) => m.id).join(",");
        // this.printLoading = true;
        // this.axios
        //   .put(
        //     this.$api.insOrder.updateInspected +
        //       "?ids=" +
        //       ids +
        //       "&orderId=" +
        //       this.orderId
        //   )
        //   .then((res) => {
        //     if (res.code === 200) {
        //       this.printLoading = false;
        //       this.deleteDialogVisible = false;
        //       this.refreshTable("page");
        //       this.$message.success("更新成功");
        //     }
        //   });
      } else {
        // this.axios
        //   .post(
        //     this.$api.insOrder.checkUpdate +
        //       "?orderId=" +
        //       this.orderId +
        //       "&state=" +
        //       1
        //   )
        //   .then((res) => {
        //     if (res.code === 200) {
        //       this.printLoading = false;
        //       this.deleteDialogVisible = false;
        //       this.refreshTable("page");
        //       this.$message.success("更新成功");
        //     }
        //   });
        this.axios
          .get(this.$api.insOrder.revocationPassed + "?orderId=" + this.orderId)
        revocationPassed({
          orderId: this.orderId,
        })
          .then((res) => {
            if (res.code === 200) {
              this.printLoading = false;
@@ -2157,28 +2113,26 @@
              this.refreshTable();
              this.$message.success("更新成功");
            }
          })
          .catch((error) => {
            console.error(error);
          });
      }
    },
    handlEquashCheck(row) {
      // // this.componentDataDelete.entity.orderId = row.id
      // this.orderId = row.id;
      // this.revocationInsProductIds = row.revocationInsProductIds;
      // this.componentDataDelete.showSelect = false;
      // this.componentDataDelete.select = false;
      // this.deleteTilte = "撤销审核";
      // this.deleteDialogVisible = true;
      this.orderId = row.id;
      this.revocationInsProductIds = row.revocationInsProductIds;
      this.componentDataDelete.showSelect = false;
      this.componentDataDelete.select = false;
      this.deleteTilte = "撤销审核";
      this.$axios
        .get(this.$api.insOrder.revokeReviewSample + "?orderId=" + row.id)
      revokeReviewSample({
        orderId: row.id,
      })
        .then((res) => {
          console.log("撤销审核样品查询", res);
          if (res.code === 200) {
          this.treeTableData = res.data;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      this.deleteDialogVisible = true;
    },
@@ -2187,24 +2141,9 @@
        this.deleteDialogVisible = false;
        this.revokeData = [];
      } else {
        // this.axios
        //   .post(
        //     this.$api.insOrder.checkUpdate +
        //       "?orderId=" +
        //       this.orderId +
        //       "&state=" +
        //       0
        //   )
        //   .then((res) => {
        //     if (res.code === 200) {
        //       this.printLoading = false;
        //       this.deleteDialogVisible = false;
        //       this.refreshTable("page");
        //       this.$message.success("更新成功");
        //     }
        //   });
        this.axios
          .get(this.$api.insOrder.revocationCancel + "?orderId=" + this.orderId)
        revocationCancel({
          orderId: this.orderId,
        })
          .then((res) => {
            if (res.code === 200) {
              this.printLoading = false;
@@ -2212,24 +2151,30 @@
              this.refreshTable();
              this.$message.success("更新成功");
            }
          })
          .catch((error) => {
            console.error(error);
          });
      }
    },
    // ä¸‹å‘
    handleIssued(row) {
      this.issuedDialogVisible = true;
      this.$axios
        .post(this.$api.insOrder.selectOrderManDay, {
      selectOrderManDay({
          id: row.id,
        })
        .then((res) => {
          if (res.code === 200) {
          this.distributeData.orderId = row.id;
          this.distributeData.sampleId = row.sampleId;
          this.distributeData.appointed = res.data;
          this.distributeData.type = row.type;
          }
        })
        .catch((error) => {
          console.error(error);
        });
      this.$axios
        .post(this.$api.insOrderPlan.upPlanUser2, {
      upPlanUser2({
          orderId: row.id,
        })
        .then((res) => {
@@ -2242,6 +2187,9 @@
              });
            });
          }
        })
        .catch((error) => {
          console.error(error);
        });
    },
    submitForm2() {
@@ -2269,22 +2217,13 @@
        return;
      }
      this.upLoad = true;
      this.$axios
        .post(
          this.$api.insOrder.upInsOrder,
          {
      upInsOrder({
            orderId: this.distributeData.orderId,
            sampleId: this.distributeData.sampleId,
            appointed: this.distributeData.appointed,
            userIdList: [this.distributeData.userId],
            sonLaboratory: this.distributeData.sonLaboratory,
          },
          {
            headers: {
              "Content-Type": "application/json",
            },
          }
        )
      })
        .then((res) => {
          if (res.code === 201) {
            this.upLoad = false;
@@ -2295,7 +2234,8 @@
          this.issuedDialogVisible = false;
          this.refreshTable();
        })
        .catch((e) => {
        .catch((error) => {
          console.error(error);
          this.$message.error("修改失败");
          this.upLoad = false;
        });
@@ -2303,10 +2243,9 @@
    submitForm() {
      this.upLoad = true;
      if (this.tabIndex == 1) {
        this.axios
          .put(
            this.$api.insOrder.updateInspected + "?id=" + this.insOrderRow.id
          )
        updateInspected({
          id: this.insOrderRow.id,
        })
          .then((res) => {
            if (res.code === 200) {
              this.upLoad = false;
@@ -2314,10 +2253,14 @@
              this.refreshTable();
              this.$message.success("更新成功");
            }
          })
          .catch((error) => {
            console.error(error);
          });
      } else {
        this.axios
          .put(this.$api.insOrder.updateStatus + "?id=" + this.insOrderRow.id)
        updateStatus({
          id: this.insOrderRow.id,
        })
          .then((res) => {
            if (res.code === 200) {
              this.upLoad = false;
@@ -2325,17 +2268,11 @@
              this.refreshTable();
              this.$message.success("更新成功");
            }
          })
          .catch((error) => {
            console.error(error);
          });
      }
      let authorizedPerson =
        this.formData.authorizedPerson.length > 0
          ? this.formData.authorizedPerson.join(",")
          : "";
      delete this.formData.createTime;
      delete this.formData.updateTime;
      delete this.formData.createUser;
      delete this.formData.updateUser;
      this.formData.authorizedPerson = authorizedPerson;
    },
    // ä¸‹å•
    playOrder(num) {
@@ -2353,49 +2290,6 @@
      this.tabIndex = i;
      this.queryParams.state = m.value;
      this.getList();
    },
    getUserMenu() {
      this.$axios.get(this.$api.user.getUserMenu).then((res) => {
        let data = [];
        res.data.forEach((a) => {
          data.push({
            label: a.name,
            value: a.id,
          });
        });
        this.componentData.tagField.createUser.select = data;
      });
    },
    getInsStateDicts() {
      this.$axios
        .post(this.$api.enums.selectEnumByCategory, {
          category: "检验任务状态",
        })
        .then((res) => {
          let data = res.data;
          this.insStateList = data;
          data.forEach((ele) => {
            //0:待检验 1:检验中 2:已检验 3:待复核 4:复核未通过 5:复核通过
            if (["2", "5"].includes(ele.value)) {
              ele.type = "success";
            } else if (["1", "3"].includes(ele.value)) {
              ele.type = "warning";
            } else if (["0", "4"].includes(ele.value)) {
              ele.type = "danger";
            }
          });
          this.componentDataDataLook.tagField.insState.select = data;
          this.componentDataDelete.tagField.insState.select = data;
        });
    },
    selectEnumByCategoryForOrderType() {
      this.$axios
        .post(this.$api.enums.selectEnumByCategory, {
          category: "检验类别",
        })
        .then((res) => {
          this.componentData.tagField.orderType.select = res.data;
        });
    },
    changeUser() {
      if (this.sonLaboratoryList.length > 0) {
src/views/business/reportPreparation/index.vue
@@ -857,6 +857,7 @@
  examineReport,
  downLoad,
  getReportInfo,
  getURL
} from "../../../api/business/reportPreparation";
export default {
@@ -1798,11 +1799,17 @@
    },
    handleApprove(row) {
      this.currentInfo = row;
      getURL().then(res => {
      })
      let fileName = row.urlS === null || row.urlS === "" ? row.url : row.urlS;
      fileName = fileName.replace("/word/", "");
      const userName = JSON.parse(localStorage.getItem("user")).name;
      const userName = this.$store.state.user.name;
      this.option = {
        url: this.javaApi + "/word/" + fileName,
        url: javaApi + "/word/" + fileName,
        isEdit: false,
        fileType: "docx",
        title: fileName,