lxp
2024-08-07 083bc1030f7dda031f04976c7f02109d31eeff0e
Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before
已修改9个文件
已添加1个文件
566 ■■■■ 文件已修改
index.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 122 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/value-table.vue 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/timer.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker0.js 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html
@@ -2,10 +2,10 @@
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="Expires" CONTENT="0">
  <meta http-equiv="Cache-Control" CONTENT="no-cache">
  <meta http-equiv="Pragma" CONTENT="no-cache">
  <meta http-equiv="pragram" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="expires" content="0">
  <title>LIMS实验室管理系统</title>
  <link rel="icon" type="image/x-icon" href="./static/img/logo.png">
src/components/do/b1-ins-order/add.vue
@@ -154,10 +154,10 @@
          <el-button size="medium" type="primary" @click="openConfig" v-if="addObj.sampleType==='光缆'">光纤配置</el-button>
          <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">提交</el-button>
          <!-- å®¡æ ¸ -->
          <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3"
          <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3&&addObj.companyId"
            :disabled="saveLoad">不通过</el-button>
          <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad"
            v-show="active==3">通过</el-button>
            v-show="active==3&&addObj.companyId">通过</el-button>
          <el-button size="medium" @click="$parent.playOrder(0)">
            <span style="color: #3A7BFA;">返回</span>
          </el-button>
@@ -367,7 +367,7 @@
            </div>
          </div>
        </div>
        <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark"
        <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" max-height="400px" tooltip-effect="dark"
          border @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;">
          <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>
@@ -428,7 +428,7 @@
          </el-table-column>
          <el-table-column prop="proNum" label="待检项数量" width="105" align="center"></el-table-column>
        </el-table>
        <el-table class="el-table" ref="productTable" :data="productList" height="380px" tooltip-effect="dark" border
        <el-table class="el-table" ref="productTable" :data="productList" max-height="400px" tooltip-effect="dark" border
          @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect"
          :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll">
          <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column>
@@ -475,7 +475,7 @@
            <template slot-scope="scope">
              <el-input size="small" placeholder="要求值" v-model="scope.row.ask" clearable type="textarea"
                :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row,'ask')"
                v-if="active==1&&isAskOnlyRead"></el-input>
                v-if="active==1&&isAskOnlyRead&&scope.row.inspectionValueType!='5'"></el-input>
              <span v-else>
                <!-- <template v-if="(scope.row.ask.indexOf('D')>-1
                ||scope.row.ask.indexOf('W')>-1
@@ -563,7 +563,8 @@
        <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="400px">
    <el-dialog title="检验下发" :visible.sync="issuedDialogVisible" width="400px" :close-on-click-modal="false"
    :close-on-press-escape="false" :show-close="false">
      <div class="body" style="max-height: 60vh;">
        <el-row>
          <el-col class="search_thing" :span="22">
@@ -596,7 +597,7 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
          <el-button @click="issuedDialogVisible=false">取 æ¶ˆ</el-button>
          <el-button @click="issuedDialogVisible=false;$parent.playOrder(0)">取 æ¶ˆ</el-button>
          <el-button type="primary" @click="submitForm2" :loading="upLoad">ç¡® å®š</el-button>
        </el-row>
      </span>
@@ -783,7 +784,7 @@
          prop="value"
          label="识别符值">
          <template slot-scope="scope">
            <el-input v-model="scope.row.value" placeholder="请输入" size="small"></el-input>
            <el-input v-model="scope.row.value" placeholder="请输入" @input="inputValueHandler(scope.row,scope.$index)" size="small"></el-input>
          </template>
        </el-table-column>
      </el-table>
@@ -929,6 +930,7 @@
    },
    data() {
      return {
        sampleSelectionList: [],//样品表格选中数据
        editTable:[],
        template: null,
        templates: [],
@@ -1172,6 +1174,21 @@
      }
    },
    methods: {
      //特殊值填写处理
      inputValueHandler(row,index){
        if(row){
          const nextIndex = index+1
          for (let i = nextIndex; i < this.editTable.length; i++) {
            const element = this.editTable[i];
            if(element.model==row.model){
              this.editTable[i].value = row.value
            }else{
              break;
            }
          }
        }
      },
      spliceData () {
        if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) {
          this.$message.error('请填写完整数据')
@@ -1556,10 +1573,38 @@
              isHaveBushing = false
            }
          })
          //过滤检测项:去除特殊项
          let filterProductList = this.productListSelected.filter(ele=>ele.bsm==0&&/[0-9]/.test(ele.ask)).filter(ele=>{
              if(select[1].indexOf('通信')>=0 && ['光缆','光纤'].includes(select[2])){
                return !['温度循环','光纤接头损耗'].includes(ele.inspectionItem)
              }
              return true
          }).filter(ele=>{
              if(select[1].indexOf('电力')>=0){
                return !['温升试验','热循环'].includes(ele.inspectionItem)
              }
              return true
          })
          //校验检验项的要求值和要求描述
          const isTrue = this.checkRequiredValueAndRemark(filterProductList)
          if(!isTrue){
            this.$message.error('检验项的要求值与要求描述不匹配, è¯·æ£€æŸ¥')
            return
          }
          console.log('isHaveBushing===', this.totalArr)
          // inspectionItem
          let spcialItem = null//this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('松套管'))
          // console.log('isHaveBushing===', isHaveBushing)
          if (productListSelected && select[2] === '光缆' && isHaveBushing === false) {
            this.$message.error('光缆温度循环项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
            this.openConfig()
            return
          }else if(spcialItem&& isHaveBushing === false){
            this.$message.error('松套管项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
@@ -1589,6 +1634,50 @@
            this.saveMethod(sampleList)
          }
        }
      },
      checkRequiredValueAndRemark(data){
        let isTrue = true
        try{
          data.forEach(ele=>{
            if(['≤','≥','>','<','='].includes(ele.ask[0])){
              const askVal = ele.ask.substring(1,ele.ask.length)
              if(isNaN(askVal) || ele.tell.indexOf(askVal)<0){
                isTrue = false
              }
            }
            if(ele.ask.indexOf('-')>0 && ele.ask.length>1){
              let tell = ele.tell
              if(ele.tell.indexOf('~')>0){
                tell = ele.tell.replace('~','-')
              }
              const splits = ele.ask.split('-')
              if(splits.length==2 && !isNaN(splits[0]) && !isNaN(splits[1])){
                let min = Math.min(...splits)
                let max = Math.max(...splits)
                if(ele.tell.indexOf('±')<0&&tell.indexOf(ele.ask)<0){
                  isTrue = false
                }else if(ele.tell.indexOf('±')>0&&ele.tell!=ele.ask){
                  let splitNums = ele.tell.split('±')
                  if(splitNums.length<2){
                    isTrue = false
                  }else{
                    let minTell = Number(splitNums[0])-Number(splitNums[1])
                    let maxTell = Number(splitNums[0])+Number(splitNums[1])
                    if(minTell!=min || maxTell!=max){
                      isTrue = false
                    }
                  }
                }
              }else{
                isTrue = false
              }
            }
          })
        }catch(error){
          console.log(error);
          isTrue = false
        }
        return isTrue
      },
      save0(){
        if(this.editTable.every(m=>m.value)){
@@ -1805,7 +1894,6 @@
      },
      saveMethod(sampleList){
        this.saveLoad = true
        console.log(333333,sampleList)
        this.$axios.post(this.$api.insOrder.addInsOrder, {
          str: JSON.stringify({
            insOrder: this.addObj,
@@ -1939,8 +2027,8 @@
        })
      },
      getProNum() {
        this.sampleList.forEach((m, i) => {
          Vue.set(this.sampleList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
        this.sampleSelectionList.forEach((m, i) => {
          Vue.set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length)
        })
        this.$refs.sampleTable.doLayout()
      },
@@ -2073,6 +2161,7 @@
        val.forEach(a => {
          this.sampleIds.push(a.id)
        })
        this.sampleSelectionList = val
      },
      delSample() {
        this.sampleIds.forEach(a => {
@@ -2104,7 +2193,11 @@
        this.sampleId = row.id
        if (this.active !== 1) {
          this.sampleIds = []
          this.sampleIds.push(row.id)
          this.sampleSelectionList.forEach(ele=>{
            if(ele.id == row.id){
              this.sampleIds.push(row.id)
            }
          })
        }
        this.productList = row.insProduct
        this.productList0 = JSON.parse(JSON.stringify(this.productList))
@@ -2139,6 +2232,7 @@
          row.bsm1 = false
        }else if(arr.length>0){
          try{
          row.bsmRow = this.HaveJson(row)
          let section = arr[0].section
          let arr0 = JSON.parse(row.section)
          let arr1 = JSON.parse(row.ask)
@@ -2456,6 +2550,7 @@
        }
      },
      handleAll(e) {
        console.log(1111,this.bsm1DiaAll,this.bsm1Dia)
        // console.log('e---', e)
        if (e.length > 0) {
          this.productList.map(m => {
@@ -2604,6 +2699,7 @@
            this.$message.error('未选中样品')
            return
          }
          this.sampleIds = [this.sampleId]
          this.$axios.post(this.$api.insBushing.selectBushingBySampleId, {
            sampleId: this.sampleId
          }).then(res => {
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -22,7 +22,7 @@
  .search .form-inline {
    padding-top: 20px;
    padding-left: 50px;
    padding-left: 0px;
  }
  .center {
@@ -254,18 +254,20 @@
      </el-col>
    </el-row>
    <div class="search">
      <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px">
      <el-form :inline="true" :model="searchForm" class="form-inline" label-width="100px" label-position="right">
        <el-form-item label="委托编号:">
          <el-input clearable v-model="insOrder.entrustCode" disabled size="small" placeholder="请输入"></el-input>
        </el-form-item>
        <el-form-item label="样品编号:">
          <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请输入"></el-input>
          <el-tooltip :disabled="!currentSample.sampleCode" :content="currentSample.sampleCode">
            <el-input clearable v-model="currentSample.sampleCode" disabled size="small" placeholder="请输入" ></el-input>
          </el-tooltip>
        </el-form-item>
        <el-form-item label="样品名称:">
          <el-input clearable v-model="currentSample.sample" disabled size="small" placeholder="请输入"></el-input>
        </el-form-item>
        <el-form-item label="样品数量:">
          <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入"></el-input>
          <el-input clearable v-model="sampleProduct.length" disabled size="small" placeholder="请输入" ></el-input>
        </el-form-item>
        <el-form-item label="下发时间:">
          <el-input clearable v-model="insOrder.sendTime" disabled size="small" placeholder="请输入"></el-input>
@@ -279,6 +281,10 @@
        <el-form-item label="当前样品位数:">
          <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>
        </el-form-item>
        <el-form-item label="备注:">
          <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>
          <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> -->
        </el-form-item>
      </el-form>
    </div>
    <div class="center">
@@ -291,8 +297,19 @@
          </el-radio-group>
        </div>
        <div style="display: flex;align-items: center;">
          <span v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'">&nbsp;&nbsp;套管:</span>
          <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,3)" v-if="casing.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName=='成品缆检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
            <el-option
              v-for="item in casing"
              :key="item.id"
              :label="item.color"
              :value="item.id">
              <span style="float: left">{{ item.color}}</span>
              <el-tag :type="item.state==1?'success':'danger'" style="float: right;margin-top: 5px;" size="small">{{ item.state==1?'已检':'未检' }}</el-tag>
            </el-option>
          </el-select>
          <span v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'">&nbsp;&nbsp;光纤带:</span>
          <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small">
          <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,1)" v-if="fibers.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
            <el-option
              v-for="item in fibers"
              :key="item.value"
@@ -303,7 +320,7 @@
            </el-option>
          </el-select>
          <span v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'">&nbsp;&nbsp;光纤:</span>
          <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small">
          <el-select v-model="currentTab" placeholder="请选择" @change="m=>handleChange(m,2)" v-if="fiber.length>0&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'" size="small" :loading="getReportModelLoading" @focus="getReportModel(currentSample.id)">
            <el-option
              v-for="item in fiber"
              :label="item.bushColor+'-'+item.color"
@@ -747,6 +764,7 @@
              size="medium" style="margin-right: 5px;">{{item.label}}</el-tag>
          </template>
        </el-table-column>
        <el-table-column prop="checkName" label="检验人" min-width="80px" show-overflow-tooltip></el-table-column>
        <el-table-column prop="isLeave" label="是否留样" width="95px" show-overflow-tooltip align="center">
          <template slot-scope="scope">
            <span>{{ scope.row.isLeave==0?'否':'是' }}</span>
@@ -925,6 +943,7 @@
          requiredUp: []
        },
        upIndex: 0,
        getReportModelLoading:false,
        insOrder: {},
        sampleProduct: [],
        typeList: [],
@@ -967,6 +986,7 @@
        temptList:null,
        fiber:[],
        fibers:[],
        casing:[],
        currentTab:null,
        wareForm:{
          inspectionItem:1,
@@ -1162,11 +1182,14 @@
                this.tableList = this.tableLists.filter(m => m.templateId == val1)
                this.handleTableData()
              }
              // this.$delete(this.tableList,0)
              // this.$set(this.tableList, 0, m)
              // this.handleTableData()
            }
          })
          this.handleCasing()
          if(this.tableLists.find(m=>m.templateId==val1)&&(this.tableLists.find(m=>m.templateId==val1).templateName=='成品缆检验原始记录')){
            if(this.casing.length>0){
              this.handleChange(this.casing[0].id,3)
            }
          }
        }
      },
      equipForm:{
@@ -1272,6 +1295,32 @@
                value:data[i][j].result,
                frequency:data[i].frequency
              }
              let list = this.tableList[0].arr
              list.forEach((item,index)=>{
                let num0 = 0;
                let str = ''
                let str0 = i+','+j
                item.forEach(m=>{
                  if(m.v.ps&&(m.v.ps.value=='检验子项'||m.v.ps.value=='检验项')){
                    if(m.v.ps&&m.v.ps.value=='检验项'){
                      if(num0==0){
                        str = m.v.v+','
                        num0++
                      }
                    }
                    if(m.v.ps&&m.v.ps.value=='检验子项'){
                      if(num0==1){
                        str = str+m.v.v
                      }
                    }
                  }
                  if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备编码'&&str0==str){
                    if(!m.v.v){
                      this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
                    }
                  }
                })
              })
            }else if(j!='frequency'&&data[i][j]&&Array.isArray(data[i][j].result)){
              let str0 = i+','+j
              let list = this.tableList[0].arr
@@ -1302,6 +1351,7 @@
                      maxNum = num
                    }
                  }
                  console.log('data[i][j].equipName',data[i][j].equipName,'data[i][j].equipValue',data[i][j].equipValue,'m.v',m.v,'m.v.ps',m.v.ps,'m.v.ps.value',m.v.ps.value,'str0',str0,'str',str,'m.v.v',m.v.v)
                  if(data[i][j].equipName&&data[i][j].equipValue&&m.v&&m.v.ps&&m.v.ps.value=='设备编码'&&str0==str){
                    if(!m.v.v){
                      this.changeEquip(data[i][j].equipValue,m,data[i][j].equipName)
@@ -1999,6 +2049,7 @@
        this.currentSample = this.HaveJson(row)
        let list = await this.getCurrentProduct(row.id,0)
        this.currentSample.insProduct = this.HaveJson(list)
        this.handleCasing()
        this.currentSample.insProduct.forEach(a => {
          this.param[a.id] = {
            insValue: [],
@@ -2025,13 +2076,21 @@
          currentTable:this.currentTable
        }));
      },
      handleCasing(){
        if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName!='成品缆检验原始记录')){
          this.currentSample.insProduct = this.currentSample.insProduct.filter(m=>!m.inspectionItem.includes('松套管'))
        }
      },
      getReportModel(id){
        if(this.PROJECT!='检测中心'){
          return
        }
        this.getReportModelLoading = true
        this.$axios.post(this.$api.insOrderPlan.getReportModel+'?sampleId='+id, {}).then(res => {
          this.getReportModelLoading = false
          this.fibers = res.data['光纤带']
          this.fiber = res.data['光纤']
          this.casing = res.data['套管']
        })
      },
      async handleChange(m,type){
@@ -2054,7 +2113,8 @@
              type: 'saveData',
              tableList:this.tableList,
              param:this.param,
              currentTable:this.currentTable
              currentTable:this.currentTable,
              bushing:m
            }));
          }else{
            this.tableLists = []
@@ -2559,33 +2619,33 @@
        this.handleExcelMethod()
      },
      changeInput(m, code, n) {
        let str = code.split('-')
        let pId = str[3]
        if(!this.param[pId].equipValue||this.param[pId].equipValue.length==0||!this.param[pId].equipValue[0].v.v){
          let inspectionItem = ''
          let idS = []
          let child = 0
          for (let i in this.currentSample.insProduct) {
            if(this.currentSample.insProduct[i].id==pId){
              inspectionItem = this.currentSample.insProduct[i].inspectionItem
            }
          }
          for (let i in this.currentSample.insProduct) {
            if(this.currentSample.insProduct[i].inspectionItem==inspectionItem&&this.currentSample.insProduct[i].id!=pId){
              idS.push(this.currentSample.insProduct[i].id)
            }
          }
          for (let i = 0;i<idS.length;i++) {
            if(this.param[idS[i]].equipValue&&this.param[idS[i]].equipValue.length>0&&this.param[idS[i]].equipValue[0].v.v){
              child++
            }
          }
          if(child==0){
            n.v.v = null
            this.$message.error('请先填写设备信息')
            return
          }
        }
        // let str = code.split('-')
        // let pId = str[3]
        // if(!this.param[pId].equipValue||this.param[pId].equipValue.length==0||!this.param[pId].equipValue[0].v.v){
        //   let inspectionItem = ''
        //   let idS = []
        //   let child = 0
        //   for (let i in this.currentSample.insProduct) {
        //     if(this.currentSample.insProduct[i].id==pId){
        //       inspectionItem = this.currentSample.insProduct[i].inspectionItem
        //     }
        //   }
        //   for (let i in this.currentSample.insProduct) {
        //     if(this.currentSample.insProduct[i].inspectionItem==inspectionItem&&this.currentSample.insProduct[i].id!=pId){
        //       idS.push(this.currentSample.insProduct[i].id)
        //     }
        //   }
        //   for (let i = 0;i<idS.length;i++) {
        //     if(this.param[idS[i]].equipValue&&this.param[idS[i]].equipValue.length>0&&this.param[idS[i]].equipValue[0].v.v){
        //       child++
        //     }
        //   }
        //   if(child==0){
        //     n.v.v = null
        //     this.$message.error('请先填写设备信息')
        //     return
        //   }
        // }
        if (n) {
          // if (this.PROJECT === '装备电缆') {
          //   let num2 = new this.$Big(n.v.v)
@@ -2635,18 +2695,6 @@
                    }
                  }
                }
                // let obj = this.param[code.split('-')[3]]
                // this.tableList[0].arr.forEach(item=>{
                //   item.forEach(m=>{
                //     if(obj&&obj.insResult&&m.c==obj.insResult.c&&m.r==obj.insResult.r){
                //       m.v.v = obj.insResult.v.v
                //     }
                //     if(obj&&obj.resValue&&m.c==obj.resValue.c&&m.r==obj.resValue.r){
                //       m.v.v = obj.resValue.v.v
                //     }
                //   })
                // })
                // console.log(this.tableList,this.param)
                this.saveInsContext()
              })
              break;
@@ -3067,8 +3115,6 @@
      },
      changeEquip(val, n,v) {
        this.$set(n.v,'v',val)
        console.log(3333,val,n)
        this.$set(n.v,'v',val)
        this.tableList[0].arr.forEach((item,index)=>{
          item.forEach((m,i)=>{
            if(this.param[m.i]){
@@ -3095,13 +3141,20 @@
          }
        }
        for (let i in this.equipOptions) {
          if (this.equipOptions[i].value === val) {
          if (this.equipOptions[i].value == val) {
            for (let i1 in this.param[n.i].equipName) {
              if (this.param[n.i].equipName[i1].i === n.i && this.param[n.i].equipName[i1].r === n.r) {
                this.$delete(this.param[n.i].equipValue[i1].v,'v')
                this.$set(this.param[n.i].equipValue[i1].v,'v',val)
                this.$delete(this.param[n.i].equipName[i1].v,'v')
                this.$set(this.param[n.i].equipName[i1].v,'v',this.equipOptions[i].label)
                this.tableList[0].arr.forEach((item,index)=>{
                  item.forEach((m)=>{
                    if(m.i==n.i&&m.v.ps&&m.v.ps.value=='设备名称'){
                      this.$set(m.v,'v',this.equipOptions[i].label)
                    }
                  })
                })
              }
            }
          }
@@ -3163,6 +3216,7 @@
        this.currentSample = this.HaveJson(this.sampleProduct[index - 1])
        let list = await this.getCurrentProduct(this.currentSample.id,0)
        this.currentSample.insProduct = this.HaveJson(list)
        this.handleCasing()
        this.param = {}
        this.currentSample.insProduct.forEach(a => {
          this.param[a.id] = {
src/components/tool/value-table.vue
@@ -123,7 +123,7 @@
        </el-table-column>
        <el-table-column type="index" align="center" label="序号" :width="selectionWidth" v-if="data.isIndex" :key="Math.random()">
        </el-table-column>
        <el-table-column :prop="a.label" :label="a.value" :sortable="a.sort === 'custom' ? 'custom' : false" :isColumnWidth="isColumnWidth" :width="a.width" :isShowZero="isShowZero"
        <el-table-column :prop="a.label" :label="a.value" :sortable="a.sort === 'custom' ? 'custom' : false" :isColumnWidth="isColumnWidth" :isShowZero="isShowZero"
          v-for="(a, ai) in tableHead" :key="ai" show-overflow-tooltip :min-width="columnMinWidth" v-if="!data.headNoShow||(data.headNoShow&&data.headNoShow.length==0)||(data.headNoShow&&data.headNoShow.length>0&&!data.headNoShow.find(d=>d==a.label))">
          <template slot-scope="scope">
            <div v-if="showType(a.label, data.tagField) != null">
@@ -645,25 +645,27 @@
          if (this.tableData.length === 0 && this.page.current > 1) {
            this.selectList('lastPage')
          }
          if (this.isColumnWidth) {
            this.tableHead.forEach(item => {
              if (item.value.length === 4) {
                item.width = 120
              } else if (item.value.length === 3){
                item.width = item.label.includes('Hours') ? 50 : 100
              } else if (item.value.length === 5){
                item.width = 130
              } else if (item.value.length === 7){
                item.width = 160
              } else if (item.value.length === 6){
                item.width = 150
              }  else if (item.value.length === 2){
                item.width = item.label.includes('Hours') ? 52 : 86
              } else {
                item.width = item.label.includes('Hours') ? 46 : 86
              }
            })
          }
          // if (this.isColumnWidth) {
          //   this.tableHead.forEach(item => {
          //     if(!item.width){
          //       if (item.value.length === 4) {
          //         item.width = 120
          //       } else if (item.value.length === 3){
          //         item.width = item.label.includes('Hours') ? 50 : 100
          //       } else if (item.value.length === 5){
          //         item.width = 130
          //       } else if (item.value.length === 7){
          //         item.width = 160
          //       } else if (item.value.length === 6){
          //         item.width = 150
          //       }  else if (item.value.length === 2){
          //         item.width = item.label.includes('Hours') ? 52 : 86
          //       } else {
          //         item.width = item.label.includes('Hours') ? 46 : 86
          //       }
          //     }
          //   })
          // }
          // console.log(JSON.stringify(this.tableHead)+"---------"+JSON.stringify(this.tableData))
          for (var a in this.data.selectField) {
src/components/view/b1-inspect-order-plan.vue
@@ -203,7 +203,13 @@
            <Add :active="activeFace" :currentId="currentId"/>
        </div>
    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :state="state"/>
    </div>
      <el-dialog title="数据查看" :visible.sync="dataDialogVisible" width="80%">
                <div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
                    <ValueTable ref="ValueTableDataLook" :url="$api.insOrder.selectSampleAndProductByOrderId"
                        :componentData="componentDataDataLook"/>
                </div>
            </el-dialog>
  </div>
</template>
<script>
@@ -213,6 +219,7 @@
        getYearAndMonthAndDays
    } from '../../util/date'
    import Add from '../do/b1-ins-order/add.vue'
import { CellGroup } from 'iview'
    export default {
        components: {
            ValueTable,
@@ -231,6 +238,55 @@
                tabList: [],
                active: 1,
                tabIndex: 0,
        componentDataDataLook: {
                    entity: {
                        id: 0,
                        orderBy: {
                            field: 'sampleCode',
                            order: 'asc'
                        }
                    },
                    isIndex: false,
                    showSelect: false,
                    select: false,
                    do: [],
                    tagField: {
                        insState: {
                            select: []
                        },
                        insResult: {
                            select: [{
                                value: 1,
                                label: '合格',
                                type: 'success'
                            },{
                                value: 0,
                                label: '不合格',
                                type: 'danger'
                            }]
                        }
                    },
                    selectField: {},
          spanConfig:{
            rows:[
              {
                name:'sampleCode',
                index:0
              },
              {
                name:'sample',
                index:1
              },
              {
                name:'model',
                index:5
              }
            ]
          },
                    requiredAdd: [],
                    requiredUp: []
                },
        dataDialogVisible: false,
                componentData: {
                    entity: {
                        sonLaboratory: null,
@@ -243,6 +299,19 @@
                    init: false,
          needSort: ['createTime', 'sendTime', 'type', 'appointed', 'insState'],
                    do: [{
                        id: '',
                        font: '数据查看',
                        type: 'text',
                        method: 'handleDataLook',
            disabFun: (row, index) => {
              const user = JSON.parse(localStorage.getItem('user'))
              let currentUserName = ''
              if(user){
                currentUserName = user.name
              }
                            return row.userName!=currentUserName && row.checkName!=currentUserName
                        }
                    },{
                            id: '',
                            font: '检验',
                            type: 'text',
@@ -343,6 +412,11 @@
      this.getPower()
        },
        methods: {
            // æ•°æ®æŸ¥çœ‹
            handleDataLook(row) {
                this.componentDataDataLook.entity.id = row.id
                this.dataDialogVisible = true;
            },
      // æƒé™åˆ†é…
            getPower(radio) {
                let power = JSON.parse(sessionStorage.getItem('power'))
src/components/view/b1-inspection-order.vue
@@ -182,7 +182,7 @@
            <div class="search_thing" style="width: 20%;">
              <div class="search_label">样品名称:</div>
              <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                  v-model="componentData.entity.sample" @keyup.enter.native="refreshTable()"></el-input></div>
                  v-model="componentData.entity.sampleName" @keyup.enter.native="refreshTable()"></el-input></div>
            </div>
            <div class="search_thing" style="width: 20%;">
              <div class="search_label">样品型号:</div>
@@ -374,7 +374,7 @@
                          <el-col  style="font-weight: bold;"><span>规格型号:&nbsp; </span>{{ item.model }}</el-col>
                        </el-row>
                        <el-row style="margin-top: 1px;font-size: 14px;">
                          <el-col  style="font-weight: bold;"><span>样品名称:&nbsp; </span>{{ item.sampleName }}</el-col>
                          <el-col  style="font-weight: bold;"><span>样品名称:&nbsp; </span>{{ item.sample }}</el-col>
                        </el-row>
                        <el-row style="margin-top: 1px;font-size: 14px;" class="ellipsis-multiline">
                          <el-col  style="font-weight: bold;"><span>检测项目:&nbsp; </span>{{ item.item }}</el-col>
@@ -401,31 +401,31 @@
      </span>
    </el-dialog>
    <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
        <div id="printMOrder" class="printMOrder">
          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.16cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
        <div id="printMOrder" class="printMOrder" ref="printMOrder">
          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
            <div style="display: flex;">
              <div>
                <el-col :span="10" :offset="2">
                  <vueQr :text="JSON.stringify(item.sampleCode)" :size="60" :margin="2"></vueQr>
                </el-col>
              </div>
              <div style="margin-left: 0.32cm;line-height: 0.21cm;">
              <div style="margin-left: 0.32cm;line-height: 0.22cm;">
                <el-row>
                  <el-col  style="font-size: 0.16cm;"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                  <el-col  style="font-size: 0.20cm;width: 4cm;" class="single-line-ellipsis"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                <el-row style="font-size: 0.20cm;">
                  <el-col><span>委托单号:&nbsp; </span>{{ item.code }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                <el-row style="font-size: 0.20cm;">
                  <el-col><span>规格型号:&nbsp; </span>{{ item.model }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                  <el-col ><span>样品名称:&nbsp; </span>{{ item.sampleName }}</el-col>
                <el-row style="font-size: 0.20cm;">
                  <el-col ><span>样品名称:&nbsp; </span>{{ item.sample }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;width: 5.6cm;">
                <el-row style="font-size: 0.20cm;width: 4cm;">
                  <el-col class="ellipsis-multiline"><span>检测项目:&nbsp; </span>{{ item.item }}</el-col>
                </el-row>
                <el-row style="margin-top: 0.01cm;font-size: 0.16cm;">
                <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
                  <el-col  style="display: flex;align-items: center;"><span>样品状态:&nbsp;
                  </span>
                    <span style="white-space: nowrap;"><span v-if="item.insState==0">√</span><span class="scor" v-if="item.insState!=0"></span>待检
@@ -818,7 +818,7 @@
              targetStyles:['*'],
              style: `@page {
                margin:0;
                size: 360px 175px collapse;
                size: 400px 75px collapse;
                margin-top:3px;
                &:first-of-type{
                  margin-top:0 !important;
@@ -828,13 +828,13 @@
                zoom:100%;
              }
              @media print{
                width: 360px;
                height: 175px;
                width: 400px;
                height: 75px;
                margin:0;
              }`,
              onPrintDialogClose: this.erexcel=false,
              targetStyles: ["*"], // ä½¿ç”¨dom的所有样式,很重要
              font_size: '0.16cm',
              font_size: '0.20cm',
        });
      },
      print(){
src/view/index.vue
@@ -394,6 +394,7 @@
      </span>
    </el-dialog>
    <notice ref="notice" @goNoticeDetail="checkForUnreadData()" />
    <timer></timer>
    </div>
</template>
@@ -411,9 +412,10 @@
    import menus from '../../static/js/menu.js'
    import nullFace from '../view/404.vue'
  import notice from './notice.vue'
  import timer from './timer.vue';
    comObj['nullFace'] = nullFace
    export default {
        components: {...comObj,notice},
        components: {...comObj,notice,timer},
        data() {
            return {
                userName: "value",
src/view/timer.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
<template>
  <div>
    <el-dialog
    title="提示"
    :visible.sync="dialogVisible"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :show-close="false"
    width="30%">
      <div style="display: flex;align-items: center;"><i class="el-icon-warning" style="color: red;font-size: 40px;margin-right: 20px;"></i><span>代码正在部署,请30分钟后重新进入系统!</span></div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data(){
    return{
      timer:null,
      closeTimeout:null,
      dialogVisible:false,
    }
  },
  mounted() {
    this.startScheduler();
  },
  methods: {
    startScheduler() {
      this.checkTime();
      // æ¯åˆ†é’Ÿæ£€æŸ¥ä¸€æ¬¡
      this.timer = setInterval(this.checkTime, 60 * 1000);
    },
    checkTime() {
      const now = new Date();
      const hours = now.getHours();
      const minutes = now.getMinutes();
      if (hours === 20 && minutes === 0) {
        this.performTask();
        // è®¾ç½®20分钟后提示关闭
        this.closeTimeout = setTimeout(() => {
          this.promptToClose();
        }, 20 * 60 * 1000); // 20分钟
      }
    },
    performTask() {
      // åœ¨è¿™é‡Œæ‰§è¡Œä½ æƒ³è¦çš„定时任务
      console.log("任务执行了!");
      this.dialogVisible = true;
      // è¿™é‡Œå¯ä»¥è§¦å‘一个 Vuex åŠ¨ä½œã€å‘èµ·ä¸€ä¸ª HTTP è¯·æ±‚,或者其他操作
    },
    promptToClose() {
      // æç¤ºç”¨æˆ·å…³é—­
      // alert("请记得在20分钟后关闭任务!");
      this.dialogVisible = true;
    }
  },
  beforeDestroy() {
    // ç»„件销毁时清除定时器
    if (this.timer) {
      clearInterval(this.timer);
    }
    if (this.closeTimeout) {
      clearTimeout(this.closeTimeout);
    }
  }
}
</script>
<style scoped>
</style>
static/js/worker.js
@@ -5,6 +5,7 @@
let comparisonList = []
let currentSample = {}
let PROJECT = ''
let bushing = ''
let result = {
  method:'',
  value:null
@@ -20,6 +21,12 @@
  if(data.type&&data.type=='saveData'){
    tableList = data.tableList;
    param = data.param;
    return
  }
  if(data.bushing&&(data.bushing!=bushing)&&data.type=='saveData'){
    tableList = data.tableList;
    param = data.param;
    bushing = data.bushing;
    return
  }
  code = data.code;
@@ -106,8 +113,7 @@
          let ask = currentSample.insProduct.find(m => m.id == item.i).ask?currentSample.insProduct.find(m => m.id == item.i).ask.split('&'):null;
          let res = Object.values(comValue)[0]
          let comp = []
          if(res==''||res==null||res==undefined||res=='Infinity'){
          if(res===''||res===null||res===undefined||res==='Infinity'){
            item.v.v = null
            list.forEach(a => {
              if (a[0].r == item.r) {
@@ -167,6 +173,7 @@
                    }
                  }else{
                    let str = handleFraction(m.split('≤')[1])
                    console.log(555555,res,str)
                    return eval(res) <= eval(str)
                  }
                }else if (m.includes('<')) {
@@ -282,7 +289,7 @@
                }
              })
            }
            // console.log(tableList)
            // console.log(5555,tableList)
          }
          // console.log('1234567789', tableList,getParam())
          result = {
@@ -482,16 +489,20 @@
        b.i &&b.v.v&& param[b.i].comValue.push(b)
      }
      if (b.v.ps != undefined && b.v.ps.value === '设备编码') {
        b.i &&b.v.v&& param[b.i].equipValue.push(b)
        b.i &&b.v&& param[b.i].equipValue.push(b)
      }
      if (b.v.ps != undefined && b.v.ps.value === '设备名称') {
        b.i &&b.v.v&& param[b.i].equipName.push(b)
        b.i &&b.v&& param[b.i].equipName.push(b)
      }
      if (b.v.ps != undefined && b.v.ps.value === '最终值') {
        b.i &&b.v.v&& (param[b.i].resValue = b)
        b.i &&b.v&& (param[b.i].resValue = b)
      }
      if (b.v.ps != undefined && b.v.ps.value === '结论') {
        b.i &&(b.v.v||b.v.v===0||b.v.v==='0')&& (param[b.i].insResult = b)
        if(b.i &&(b.v.v||b.v.v===0||b.v.v==='0')){
          if(b.v.v != '合格'&&b.v.v != '不合格'){
            param[b.i].insResult = b
          }
        }
      }
    })
  })
@@ -508,7 +519,7 @@
function SUM(...val){
  try {
    let num = null;
    if(val&&val.length>0){
    if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
      val.forEach(item=>{
        num+=item;
      })
@@ -527,7 +538,7 @@
function MAX(...val){
  try {
    let max = null;
    if(val&&val.length>0){
    if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
      val = val.filter(item=>item!=null&&item!=='')
      if(val.length>0){
        max = Math.max(...val)
@@ -549,7 +560,7 @@
function MIN(...val){
  try {
    let min = null;
    if(val&&val.length>0){
    if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
      val = val.filter(item=>item!=null&&item!=='')
      if(val.length>0){
        min = Math.min(...val)
@@ -570,8 +581,8 @@
  try {
    let num = null;
    let arr = [];
    if(val&&val.length>0){
      arr = val.filter(item=>item!=null&&item!=''&&item!=undefined)
    if(val!=null&&val!=undefined&&val!='undefined'&&val.length>0){
      arr = val.filter(item=>item!==null&&item!==''&&item!=undefined)
      arr.forEach(item=>{
        num+=item;
      })
static/js/worker0.js
@@ -9,6 +9,7 @@
  const data = JSON.parse(event.data);
  dataAcquisitionInfo = data.dataAcquisitionInfo;
  list = data.list;
  // console.log(111,dataAcquisitionInfo)
  handleData()
}
@@ -45,9 +46,9 @@
                    setTimeout(()=>{
                      let num0 = 0
                      if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
                        let str = n.v.ct.fa.split('.')[1]
                        num0 = str.length
                        n.v.v = dataAcquisitionInfo[str].value[i]?dataAcquisitionInfo[str].value[i].toFixed(num0):dataAcquisitionInfo[str].value[i]
                        let str0 = n.v.ct.fa.split('.')[1]
                        num0 = str0.length
                        n.v.v = dataAcquisitionInfo[str].value[i]?Number(dataAcquisitionInfo[str].value[i]).toFixed(num0):dataAcquisitionInfo[str].value[i]
                      }else{
                        n.v.v = dataAcquisitionInfo[str].value[i]
                      }
@@ -67,9 +68,9 @@
                  setTimeout(()=>{
                    let num0 = 0
                    if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
                      let str = n.v.ct.fa.split('.')[1]
                      num0 = str.length
                      n.v.v = dataAcquisitionInfo[str].value?dataAcquisitionInfo[str].value.toFixed(num0):dataAcquisitionInfo[str].value
                      let str0 = n.v.ct.fa.split('.')[1]
                      num0 = str0.length
                      n.v.v = dataAcquisitionInfo[str].value?Number(dataAcquisitionInfo[str].value).toFixed(num0):dataAcquisitionInfo[str].value
                    }else{
                      n.v.v = dataAcquisitionInfo[str].value
                    }
@@ -87,8 +88,8 @@
                    setTimeout(()=>{
                      let num0 = 0
                      if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
                        let str = n.v.ct.fa.split('.')[1]
                        num0 = str.length
                        let str0 = n.v.ct.fa.split('.')[1]
                        num0 = str0.length
                        n.v.v = dataAcquisitionInfo[str].value?Number(dataAcquisitionInfo[str].value).toFixed(num0):dataAcquisitionInfo[str].value
                      }else{
                        n.v.v = dataAcquisitionInfo[str].value