licp
2024-07-31 b9e6b361bdb8cd26b9768602734b3a078dcdee26
修改检验任务bug
已修改4个文件
42 ■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/worker.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -2063,15 +2063,30 @@
      upProductSelect(selection, row) {
        this.bsm1DiaList = []
        row.state = row.state == 1 ? 0 : 1
        if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) {
        let arr = this.productList.filter(m=>m.state==1&&row.section.includes(m.section)&&m.ask&&m.section.indexOf('[')==-1)
        if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1&&arr.length==0) {
          if (row.section.indexOf('[') > -1) {
            row.bsmRow = this.HaveJson(row)
          }
          row.bsm1 = true
          this.bsm1DiaList.push(row)
          this.bsm1DiaAll = true
        } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) {
        } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0&&arr.length==0) {
          row.bsm1 = false
        }else if(arr.length>0){
          row.bsmRow = this.HaveJson(row)
          let section = arr[0].section
          let arr0 = JSON.parse(row.section)
          let arr1 = JSON.parse(row.ask)
          let arr2 = JSON.parse(row.manHour)
          let arr3 = JSON.parse(row.price)
          let arr4 = JSON.parse(row.tell)
          let index = arr0.indexOf(section)
          row.section = section
          row.ask = arr1[index]
          row.manHour = arr2[index]
          row.price = arr3[index]
          row.tell = arr4[index]
        }
        if (row.bsm === '1' && row.inspectionItem === '光纤接头损耗' && this.sampleList.length > 1 && row.state === 1&&!this.isBsm2Val2) {
          this.bsm2 = true
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -322,7 +322,7 @@
        </div>
      </div>
      <div class="center-box" id="nav" v-loading="tableLoading" v-if="!tableLists.find(m=>m.templateId==currentTable)||(tableLists.find(m=>m.templateId==currentTable).templateName!='温度循环检验原始记录'&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('热循环')&&!tableLists.find(m=>m.templateId==currentTable).templateName.includes('温升试验'))">
        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index">
        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index+currentTable">
          <tbody>
            <tr v-for="(m,i) in item.arr" :key="i">
              <td :id='item.templateId+"-"+n.i+"-"+n.r+"-"+n.c' v-for="(n,j) in m" :key="j"
@@ -1052,8 +1052,10 @@
        if (val0 != null && val1 != val0) {
          this.tableLists.forEach((m, i) => {
            if (m.templateId == val1) {
              this.tableList = null;
              this.tableList = [(this.tableLists[i])];
              // this.tableList = null;
              // this.tableList = [(this.tableLists[i])];
              this.$delete(this.tableList, 0)
              this.$set(this.tableList, 0, this.tableLists[i])
              this.handleTableData()
            }
          })
@@ -2363,7 +2365,8 @@
            comparisonList:this.comparisonList,
            currentSample:this.currentSample,
            PROJECT:this.PROJECT,
            param:this.param
            param:this.param,
            currentTable:this.currentTable
          }));
        } catch (error) {
          console.log(444,error);
@@ -2799,7 +2802,8 @@
            this.worker.postMessage(JSON.stringify({
              type: 'saveData',
              tableList:this.tableList,
              param:this.param
              param:this.param,
              currentTable:this.currentTable
            }));
          }
        }catch (error) {
src/main.js
@@ -20,7 +20,7 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.92.2:8001';
const javaApi = 'http://192.168.92.249:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
static/js/worker.js
@@ -10,8 +10,13 @@
  value:null
}
let param = null
let currentTable = ''
self.onmessage = function(event) {
  const data = JSON.parse(event.data);
  if(currentTable!=data.currentTable){
    tableList = data.tableList;
  }
  currentTable = data.currentTable;
  if(data.type&&data.type=='saveData'){
    tableList = data.tableList;
    param = data.param;
@@ -341,7 +346,7 @@
                      a[b].v.v = 0
                    }else if(a[b].v.ct&&a[b].v.ct.fa&&typeof a[b].v.ct.fa == 'string'&&a[b].v.ct.fa.includes('.')){
                      let num = 0
                      let str = n.v.ct.fa.split('.')[1]
                      let str = a[b].v.ct.fa.split('.')[1]
                      num = str.length
                      a[b].v.v = comResult?Number(comResult).toFixed(num):0
                    }else{