From e841b95caeeb3ba3f512fab431976f64f1061a9e Mon Sep 17 00:00:00 2001 From: lxp <1928192722@qq.com> Date: 星期五, 09 八月 2024 17:58:19 +0800 Subject: [PATCH] Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before --- src/components/do/b1-ins-order/fiberoptic-config-two.vue | 54 +++++++++--------- static/js/worker.js | 15 ++++ src/components/do/b1-ins-order/add.vue | 5 - static/js/worker0.js | 19 ++++++ src/main.js | 2 src/components/do/b1-inspect-order-plan/Inspection.vue | 33 +++++++++- src/components/do/b1-ins-order/fiberoptic-config.vue | 2 7 files changed, 91 insertions(+), 39 deletions(-) diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue index ceb28b6..f383120 100644 --- a/src/components/do/b1-ins-order/add.vue +++ b/src/components/do/b1-ins-order/add.vue @@ -620,8 +620,7 @@ </el-row> </span> </el-dialog> - <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine == 0" :active="active" /> - <fiberOpticConfigTwo :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow && examine == 1" :active="active" /> + <fiberOpticConfig :currentId="currentId" @saveFiberopticConfig="getTotal()" v-if="configShow" :active="active" /> <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" /> <cableConfig v-if="cableConfigShow" :active="active" /> <!-- 鍗曢�夌壒娈婂�煎鐞嗘--> @@ -3002,7 +3001,7 @@ this.totalArr = [] this.total = 0; this.sampleList.forEach(item => { - if (item.insProduct && item.insProduct.length > 0) { + if (item.insProduct && item.insProduct.length > 0) { item.insProduct.forEach(a => { this.totalArr.push(a) }) diff --git a/src/components/do/b1-ins-order/fiberoptic-config-two.vue b/src/components/do/b1-ins-order/fiberoptic-config-two.vue index 5226d13..4e8b4b0 100644 --- a/src/components/do/b1-ins-order/fiberoptic-config-two.vue +++ b/src/components/do/b1-ins-order/fiberoptic-config-two.vue @@ -35,12 +35,12 @@ </div> <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:100px"></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" - style="width:100px" + style="width:70px" :disabled="packageInfo.radio===0||active!=1"></el-input> </div> </div> @@ -480,7 +480,7 @@ this.fiberList.push(b) }) } - + }else{ this.fiberList = [] a.fiber.forEach(b=>{ @@ -489,7 +489,7 @@ } }) } - + this.getTypeDicts1() this.getStandTreeBySampleType() this.getStandTreeBySampleType2() @@ -515,7 +515,7 @@ } }) }) - + } if(this.detectionItems.type == 0) { // 璧嬪�兼娴嬮」淇℃伅 鍏夌氦 @@ -586,7 +586,7 @@ this.fiberList = [] this.fibersList = [] this.detectionItems = [] - + // 椤甸潰鏄惁鍚湁鍏夌氦甯� if(this.packageInfo.ismiers) { // 鍏ㄦ @@ -629,8 +629,8 @@ } } - - + + }, upNum() { this.fiberList = [] @@ -691,7 +691,7 @@ } a.fibers.push(fibers) this.fibersList.push(fibers) - } + } }) } else { this.bushing = [] @@ -765,7 +765,7 @@ // this.addFiber() // }, 200) // }) - + // 灏嗕笅鎷夋鍊艰祴鍊肩粰鍏夌氦 鐩戝惉鍘婚櫎 if(this.selectFiberList.length == 0) { this.$message.error('璇烽�夋嫨鏁版嵁') @@ -802,7 +802,7 @@ this.detectionType = 0 this.$set(this.detectionItems,'type',0) } - + }) }, methodChange2(val) { @@ -899,7 +899,7 @@ fibersIdent: a.ident, productList: [] } - this.fiberList.push(fiber) + this.fiberList.push(fiber) } }) } else { @@ -920,7 +920,7 @@ }) } }else { - this.fiberList = [] + this.fiberList = [] let flag = true // 鎸夌収椤哄簭鐢熸垚鍏夌氦鑹叉爣 let colors2 = [] @@ -962,7 +962,7 @@ // this.$message.error('鏈�夋嫨濂楃') // return // } - // this.fiberList = [] + // this.fiberList = [] // let flag = true // // 鎸夌収椤哄簭鐢熸垚鍏夌氦鑹叉爣 // let colors2 = [] @@ -1113,7 +1113,7 @@ }else if (type == 0){ this.detectionItems = [] this.detectionItems = row.productList - } + } // if(type == 1) { // if((row.model == null || row.model == '') && (row.standard == null || row.standard == '')){ // this.detectionItems = [] @@ -1146,11 +1146,11 @@ // let product = JSON.parse(JSON.stringify(row.productList)) // setTimeout(() => { // product.forEach(p => { - // let rowToSelect = this.detectionItems.find(item => item.id === p.id); - // if (rowToSelect) { + // let rowToSelect = this.detectionItems.find(item => item.id === p.id); + // if (rowToSelect) { // this.toggleSelection(rowToSelect); // } - // }); + // }); // },200) // } // } @@ -1171,7 +1171,7 @@ // } // this.$axios.post(this.$api.standardTree.selectStandardProductList, { // model: this.mireModel.split(' - ')[1], - // standardMethodListId: this.mireStandard, + // standardMethodListId: this.mireStandard, // factory: '' // }, { // headers: { @@ -1186,16 +1186,16 @@ // 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)) + + // 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) { + // product.forEach(p => { + // let rowToSelect = this.detectionItems.find(item => item.id === p.id); + // if (rowToSelect) { // this.toggleSelection(rowToSelect); - // } - // }); + // } + // }); // },200) // } // } diff --git a/src/components/do/b1-ins-order/fiberoptic-config.vue b/src/components/do/b1-ins-order/fiberoptic-config.vue index 59c3e2b..7ae348a 100644 --- a/src/components/do/b1-ins-order/fiberoptic-config.vue +++ b/src/components/do/b1-ins-order/fiberoptic-config.vue @@ -40,7 +40,7 @@ <div class="search-item"> <label style="width: 100px">姣忔牴绠℃娊妫�妫�娴嬮噺</label> <el-input v-model="packageInfo.testNum" placeholder="璇疯緭鍏�" size="small" @blur="addTestNum" - :disabled="packageInfo.radio===0||active!=1" style="width:100px"></el-input> + :disabled="packageInfo.radio===0||active!=1" style="width:70px"></el-input> </div> </div> <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small" diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue index c454335..713522c 100644 --- a/src/components/do/b1-inspect-order-plan/Inspection.vue +++ b/src/components/do/b1-inspect-order-plan/Inspection.vue @@ -242,7 +242,7 @@ <!-- <el-button size="small" type="primary" @click="fiberOpticVisible=true" v-if="fiberOptic.length>0">鍏夌氦鍒囨崲</el-button> <el-button size="small" type="primary" @click="fiberOpticTapeVisible=true" v-if="fiberOpticTape.length>0">鍏夌氦甯﹀垏鎹�</el-button> <el-button size="small" type="primary" @click="bushingVisible=true" v-if="bushing.length>0">濂楃鍒囨崲</el-button> --> - <el-button size="small" type="primary" @click="sampleVisible=true">鏍峰搧鍒囨崲</el-button> + <el-button size="small" type="primary" @click="sampleVisible=true;uploadSample()">鏍峰搧鍒囨崲</el-button> <el-button size="small" type="primary" @click="taskVisible=true">浠诲姟鍒囨崲</el-button> <el-button size="small" type="primary" @click="addVerifyDia = true" v-if="state==1" :loading="submitLoading">鎻愪氦</el-button> @@ -1057,6 +1057,7 @@ getDataIndex:[], getDataIndexLoading:false, changeType:null, + getDataTypeId:'' } }, computed: { @@ -1397,6 +1398,7 @@ // 鍚� Worker 鍙戦�佹秷鎭紝寮�濮嬪鐞嗛�昏緫 this.getDataIndexLoading = false this.dataGetDia = false + this.getDataTypeId = '' this.worker0.postMessage(JSON.stringify({ dataAcquisitionInfo: this.dataAcquisitionInfo, list:this.tableList[0].arr @@ -1412,6 +1414,8 @@ let {list,n} = result.value this.$set(this.tableList[0],'arr',list) this.changeInput('',`${this.currentSample.insProduct[0].templateId}-${n.r}-${n.c}-${n.i}`,n) + }else if(result.getDataTypeId){ + this.getDataTypeId = result.getDataTypeId } }; }, @@ -1984,6 +1988,14 @@ this.fileAdd = fileAdd this.collected = collected this.temDataAcquisition = temDataAcquisition + }, + uploadSample(){ + this.$axios.post(this.$api.insOrderPlan.doInsOrder, { + id: this.id, + laboratory: this.sonLaboratory + }).then(async res => { + this.sampleProduct = res.data.sampleProduct + }) }, async getCurrentProduct(id,type){ this.tableLoading = true; @@ -2672,7 +2684,7 @@ let str = code.split('-') let pId = str[3] for(let i =0;i<this.currentSample.insProduct.length;i++){ - if(this.currentSample.insProduct[i].id==pId&&(this.currentSample.insProduct[i].ask=='-'||this.currentSample.insProduct[i].ask=='/')){ + if(this.currentSample.insProduct[i].id==pId&&(this.currentSample.insProduct[i].ask=='-'||this.currentSample.insProduct[i].ask=='/'||this.currentSample.insProduct[i].ask=='鈥�')){ this.tableList[0].arr.forEach(item=>{ item.forEach(m=>{ if(m.i==pId&&m.v.ps&&m.v.ps.value=='缁撹'){ @@ -2714,15 +2726,20 @@ currentSample:this.currentSample, PROJECT:this.PROJECT, param:this.param, - currentTable:this.currentTable + currentTable:this.currentTable, + getDataTypeId:this.getDataTypeId })); } 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(()=>{ @@ -2738,7 +2755,13 @@ } } } - this.saveInsContext() + if(this.isGet&&!this.dataAcquisitionEidtAble&&!getDataType){ + return + } + setTimeout(()=>{ + this.saveInsContext() + },2000) + // this.saveInsContext() }) break; case 'tableList': @@ -3132,8 +3155,8 @@ return }, saveInsContext() { - console.log(1111,this.param) try { + console.log(1111,this.param) if(this.param){ this.$axios.post(this.$api.insOrderPlan.saveInsContext, { param: JSON.stringify(this.param) diff --git a/src/main.js b/src/main.js index c3b1ea1..ddc5532 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.0.104:8001'; +const javaApi = 'http://192.168.92.249: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 f8d2e8d..696fd94 100644 --- a/static/js/worker.js +++ b/static/js/worker.js @@ -12,6 +12,7 @@ } let param = null let currentTable = '' +let getDataTypeId = null self.onmessage = function(event) { const data = JSON.parse(event.data); if(currentTable!=data.currentTable){ @@ -30,6 +31,11 @@ return } code = data.code; + if(data.getDataTypeId){ + getDataTypeId = data.getDataTypeId + }else{ + getDataTypeId = null + } if(tableList){ let str = code.split('-') let r = str[1] @@ -292,11 +298,18 @@ // console.log(5555,tableList) } // console.log('1234567789', tableList,getParam()) + // console.log('1234567789', item) + let getDataType0 = false + console.log('1234567789', item.i,getDataTypeId) + if(item.i==getDataTypeId){ + getDataType0 = true + } result = { method:'saveInsContext', value:{ tableList, - param:getParam() + param:getParam(), + getDataTypeId:getDataType0?getDataTypeId:'' } } self.postMessage(JSON.stringify(result)) diff --git a/static/js/worker0.js b/static/js/worker0.js index d3ae118..680a2a9 100644 --- a/static/js/worker0.js +++ b/static/js/worker0.js @@ -4,12 +4,15 @@ method:'', value:null } - +let arrSpecial = [] +let numSpecial = 0; self.onmessage = function(event) { const data = JSON.parse(event.data); dataAcquisitionInfo = data.dataAcquisitionInfo; list = data.list; // console.log(111,dataAcquisitionInfo) + arrSpecial = [] + numSpecial = 0 handleData() } @@ -43,6 +46,8 @@ if(Array.isArray(dataAcquisitionInfo[str].value)){ for (let i = 0; i < dataAcquisitionInfo[str].value.length; i++) { if(i+1==arr[1]){ + arrSpecial.push(n.i) + numSpecial++ setTimeout(()=>{ let num0 = 0 if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ @@ -65,6 +70,8 @@ } }else{ if(arr[1] ==dataAcquisitionInfo[str].frequency){ + arrSpecial.push(n.i) + numSpecial++ setTimeout(()=>{ let num0 = 0 if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ @@ -85,6 +92,8 @@ },2000) }else if(Number(dataAcquisitionInfo[str].frequency)>num){ if(n.v.ps.value.includes(num)){ + arrSpecial.push(n.i) + numSpecial++ setTimeout(()=>{ let num0 = 0 if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){ @@ -112,4 +121,12 @@ } }) }) + if(arrSpecial[numSpecial-1]){ + setTimeout(()=>{ + result = { + getDataTypeId:arrSpecial[numSpecial-1], + } + self.postMessage(JSON.stringify(result)) + },0) + } } -- Gitblit v1.9.3