From daa9a0f42e96f8643f69d6c1412496c4a011de66 Mon Sep 17 00:00:00 2001
From: lxp <1928192722@qq.com>
Date: 星期六, 10 八月 2024 17:27:46 +0800
Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before

---
 static/js/worker.js                                    |    5 +-
 src/components/do/b1-ins-order/add.vue                 |    7 +--
 src/main.js                                            |    2 
 src/components/do/b1-inspect-order-plan/Inspection.vue |   90 ++++++++++++++++++++++++++++++++------------
 src/components/view/b1-inspect-order-plan.vue          |    9 ++++
 5 files changed, 80 insertions(+), 33 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index f383120..5f0baee 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -759,7 +759,7 @@
                width="800px" :show-close="false">
       <el-table
       :data="editTable"
-      style="width: 100%">
+      style="width: 100%" height="80vh">
       <!-- inspectionItemList -->
       <el-table-column
           prop="inspectionItemList"
@@ -1184,12 +1184,11 @@
       inputValueHandler(row,index){
         if(row){
           const nextIndex = index+1
+          console.log(nextIndex, this.editTable)
           for (let i = nextIndex; i < this.editTable.length; i++) {
             const element = this.editTable[i];
-            if(element.model==row.model){
+            if(element.model==row.model&&row.symbolItem==element.symbolItem){
               this.editTable[i].value = row.value
-            }else{
-              break;
             }
           }
         }
diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 713522c..85c477c 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -358,7 +358,7 @@
                     <el-input v-if="getInspectionValueType(n.i) == 1" class="table_input" v-model="n.v.v"
                               :disabled="(getInspectionItemType(n.i) == 1 && !dataAcquisitionEidtAble )|| (n.u != userId && n.u != undefined && n.u != '')"
                               @input="handleInput(n)"
-                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n)" @mousewheel.native.prevent :key="'abc-'+'000'+index+'000'+i+'000'+j"
+                              @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`, n,'getDataType')" @mousewheel.native.prevent :key="'abc-'+'000'+index+'000'+i+'000'+j"
                               @keydown.enter="changeInput('',`${item.templateId}-${n.r}-${n.c}-${n.i}`, n)">
                       <!-- <el-button slot="append" type="primary" icon="el-icon-edit" size="mini"
                         v-if="getInspectionItemType(n.i) == 1" @click="getSystemValue(n)"></el-button> -->
@@ -366,10 +366,10 @@
                     <el-input v-else-if="getInspectionValueType(n.i) == 2" class="table_input" type="textarea"
                       v-model="n.v.v"
                       :disabled="getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')"
-                      @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)" />
+                      @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,'getDataType')" />
                     <el-select v-else-if="getInspectionValueType(n.i) == 5" class="table_input" v-model="n.v.v"
                       :disabled="state>1||getInspectionItemType(n.i) == 1 || (n.u != userId && n.u != undefined && n.u != '')" @visible-change="e=>getDic(e,n.i)"
-                       @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`)">
+                       @change="m=>changeInput(m,`${item.templateId}-${n.r}-${n.c}-${n.i}`,'getDataType')">
                       <el-option v-for="(e, i) in enumList" :key="i" :label="e.label" :value="e.value"></el-option>
                     </el-select>
                     <span :style="`font-family:${n.v.ff} !important;`"
@@ -828,7 +828,7 @@
               <td style="text-align: left;">
                 <el-checkbox-group
                   v-model="getDataIndex" :max="item.child[0].maxNum">
-                  <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j+'ppppppppp'">{{n}}</el-checkbox>
+                  <el-checkbox v-for="(n,j) in item.child[0].arr" :label="j" :key="j">{{n}}</el-checkbox>
                 </el-checkbox-group>
               </td>
             </tr>
@@ -837,7 +837,7 @@
               <td style="text-align: left;">
                 <el-checkbox-group
                   v-model="getDataIndex" :max="m.maxNum">
-                  <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j+'bbbbbbbbbbbbbb'">{{n}}</el-checkbox>
+                  <el-checkbox v-for="(n,j) in m.arr" :label="j" :key="j">{{n}}</el-checkbox>
                 </el-checkbox-group>
               </td>
             </tr>
@@ -856,7 +856,7 @@
   import file from '../../../util/file'
   import excelFunction from '../../../util/excelFountion'
   export default {
-    props: ['sonLaboratory', 'orderId', 'state'],
+    props: ['sonLaboratory', 'orderId', 'state','inspectorList'],
     components: {
       ValueTable,
     },
@@ -1057,7 +1057,8 @@
         getDataIndex:[],
         getDataIndexLoading:false,
         changeType:null,
-        getDataTypeId:''
+        getDataTypeId:'',
+        getDataType:null
       }
     },
     computed: {
@@ -1296,6 +1297,11 @@
         }
       },
       handleDataAcquisition(data){
+        if(this.dataAcquisitionEidtAble){
+          this.getDataType = 1;
+        }else{
+          this.getDataType = 2;
+        }
         this.dataAcquisitionInfo = {}
         this.getData = []
         for (let i in data){
@@ -1304,8 +1310,14 @@
             child:[]
           }
           for(let j in data[i]){
+            let str0 = ''
+            if(i==j){
+              str0 = i+','
+            }else{
+              str0 = i+','+j
+            }
             if(j!='frequency'&&data[i][j]&&typeof data[i][j].result == 'string'){
-              this.dataAcquisitionInfo[i+','+j] = {
+              this.dataAcquisitionInfo[str0] = {
                 value:data[i][j].result,
                 frequency:data[i].frequency
               }
@@ -1313,7 +1325,6 @@
               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=='妫�楠岄」'){
@@ -1336,7 +1347,12 @@
                 })
               })
             }else if(j!='frequency'&&data[i][j]&&Array.isArray(data[i][j].result)){
-              let str0 = i+','+j
+              let str0 = ''
+              if(i==j){
+                str0 = i+','
+              }else{
+                str0 = i+','+j
+              }
               let list = this.tableList[0].arr
               let maxNum = 0
               list.forEach((item,index)=>{
@@ -1372,6 +1388,13 @@
                   }
                 })
               })
+              // let arr3 = []
+              // for (let l=0 ;i<data[i][j].result.length;i++){
+              //   arr3.push({
+              //     id:,
+              //     value:
+              //   })
+              // }
               let obj0 = {
                 name:j,
                 arr:data[i][j].result,
@@ -1381,7 +1404,7 @@
               if(data[i][j].result&&Array.isArray(data[i][j].result)&&data[i][j].result.length>maxNum){
                 obj.child.push(obj0)
               }else{
-                this.dataAcquisitionInfo[i+','+j] = {
+                this.dataAcquisitionInfo[str0] = {
                   value:data[i][j].result
                 }
               }
@@ -1393,6 +1416,7 @@
         }
         if(this.getData.length>0){
           this.dataGetDia = true
+          this.getDataIndex = []
         }else{
           try {
             // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫
@@ -2626,6 +2650,7 @@
           } catch (e) {}
           try {
             let equipName = JSON.parse(a.insProductResult.equipName)
+            // console.log(2222222,equipName)
             if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('鐑惊鐜�')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('娓╁崌璇曢獙'))){
               this.param[a.id].equipName = []
               for (let i = 0; i < equipName.length; i++) {
@@ -2637,7 +2662,8 @@
               }
             }
             for (let i = 0; i < equipName.length; i++) {
-              if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='鐑惊鐜楠屽師濮嬭褰�'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁崌璇曢獙鍘熷璁板綍妯℃澘')){
+              if(this.tableLists.find(m=>m.templateId==this.currentTable)&&(this.tableLists.find(m=>m.templateId==this.currentTable).templateName=='娓╁害寰幆妫�楠屽師濮嬭褰�'||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('鐑惊鐜�')||this.tableLists.find(m=>m.templateId==this.currentTable).templateName.includes('娓╁崌璇曢獙'))){
+                console.log(2222222,equipName)
                 // 娓╁害寰幆璧嬪��
                 this.$set(this.equipForm,`value`+i,equipName[i].v)
                 this.param[a.id].equipName[i].v.v = equipName[i].v
@@ -2653,7 +2679,10 @@
         })
         this.handleExcelMethod()
       },
-      changeInput(m, code, n) {
+      changeInput(m, code, n,getDataType) {
+        if(getDataType=='getDataType'){
+          this.getDataType = 2;
+        }
         // 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){
@@ -2732,14 +2761,10 @@
         } catch (error) {
           console.log(444,error);
         }
-        let getDataType = false
 
         // 鐩戝惉 Worker 杩斿洖鐨勭粨鏋�
         this.worker.onmessage = (event) => {
           this.result = JSON.parse(event.data);
-          if(this.result.value.getDataTypeId){
-            getDataType = true
-          }
           switch (this.result.method){
             case 'saveInsContext':
               this.$nextTick(()=>{
@@ -2755,13 +2780,28 @@
                     }
                   }
                 }
-                if(this.isGet&&!this.dataAcquisitionEidtAble&&!getDataType){
-                  return
-                }
-                setTimeout(()=>{
+                console.log(99999,this.result.value.getDataTypeId)
+                if(this.isGet&&!this.dataAcquisitionEidtAble){
+                  if(this.result.value.getDataTypeId==''){
+                    return
+                  }
+                  setTimeout(()=>{
+                    this.saveInsContext()
+                  },2000)
+                }else if(this.isGet&&this.dataAcquisitionEidtAble){
+                  if(this.getDataType==1){
+                    if(this.result.value.getDataTypeId==''){
+                      return
+                    }
+                    setTimeout(()=>{
+                      this.saveInsContext()
+                    },2000)
+                  }else{
+                    this.saveInsContext()
+                  }
+                }else{
                   this.saveInsContext()
-                },2000)
-                // this.saveInsContext()
+                }
               })
               break;
             case 'tableList':
@@ -3230,9 +3270,9 @@
       getAuthorizedPerson() {
         this.$axios.get(this.$api.user.getUserMenu).then(res => {
           let data = []
-          let userName = JSON.parse(localStorage.getItem("user")).name;
+          // let userName = JSON.parse(localStorage.getItem("user")).name;
           res.data.forEach(a => {
-            if(a.name !== userName) {
+            if(!this.inspectorList.includes(a.name)) {
               data.push({
               label: a.name,
               value: a.id
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index 998a99d..68dd071 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -202,7 +202,7 @@
 		<div style="width: 100%;height: 100%;" v-if="activeFace >0">
 			<Add :active="activeFace" :currentId="currentId" :examine="examine"/>
 		</div>
-    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :sonLaboratory="componentData.entity.sonLaboratory" :state="state"/>
+    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state"/>
       <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"
@@ -229,6 +229,7 @@
 		data() {
 			return {
 				examine: null,
+        inspectorList: [],//妫�楠屼汉鍛樺垪琛�
 				alone: false,
 				sampleUserForm: {
 					entrustCode: null,
@@ -592,6 +593,12 @@
 				this.refreshTable('page')
 			},
       handleInspection(row){
+        //褰撳墠妫�楠屼换鍔$殑妫�楠屼汉鍒楄〃
+        let inspectorList = []
+        if(row.userName){
+          inspectorList = row.userName.split(',')
+        }
+        this.inspectorList = inspectorList
         this.state = 1;
 				this.orderId = row.id
       },
diff --git a/src/main.js b/src/main.js
index ddc5532..c3b1ea1 100644
--- a/src/main.js
+++ b/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.249:8001';
+const javaApi = 'http://192.168.0.104:8001';
 //浜�
 // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
 // const javaApi = 'http://114.132.189.42:1234';
diff --git a/static/js/worker.js b/static/js/worker.js
index 696fd94..580ae6e 100644
--- a/static/js/worker.js
+++ b/static/js/worker.js
@@ -300,7 +300,6 @@
           // console.log('1234567789', tableList,getParam())
           // console.log('1234567789', item)
           let getDataType0 = false
-          console.log('1234567789', item.i,getDataTypeId)
           if(item.i==getDataTypeId){
             getDataType0 = true
           }
@@ -326,7 +325,7 @@
             isPoint = PROJECT=='瑁呭鐢电紗'&&tell&&tell.length>0&&typeof tell[0] =='string'&&tell[0].includes('/') // 鍒ゆ柇瑕佹眰鍊兼槸鍚︿负鍒嗘暟
             comResult = compute(item.v.f.replace(/=/g, ' '),comValue, isPoint)
             let list3 = list2.map(item=>item+'')
-            isToExponential = list3.some(val => val.includes('e+'))
+            isToExponential = list3.some(val => val.includes('e+')||val.includes('e-'))
             // 瑁呭椤圭洰妫�楠屽�艰浆鍖�
             if (PROJECT === '瑁呭鐢电紗' && isToExponential) {
               let num2 = new Big(comResult)
@@ -369,6 +368,8 @@
                       let str = a[b].v.ct.fa.split('.')[1]
                       num = str.length
                       a[b].v.v = comResult?Number(comResult).toFixed(num):comResult
+                    }else if(comResult.includes('e+')|| comResult.includes('e-')){
+                      a[b].v.v = comResult
                     }else{
                       let val = parseFloat(Number(comResult).toFixed(3))
                       a[b].v.v = isNaN(val) ? comResult : val

--
Gitblit v1.9.3