From a20109bc9662cd6638900fe1a6975d69cbd3f896 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 09 十二月 2024 16:15:20 +0800 Subject: [PATCH] 电路试验互调数采 --- src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 66 ++++++++++++++++++++------------ 1 files changed, 41 insertions(+), 25 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue index 4a506c4..dd90199 100644 --- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue +++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue @@ -36,9 +36,8 @@ <el-col :span="7" v-if="!isLook"> <div style="display: flex;align-items: center;justify-content: flex-end;" class="btns"> <el-button type="primary" size="small" @click="addList(allBandList,'棰戞')" :disabled="state>1" style="margin: 4px;">娣诲姞棰戞</el-button> - <el-button size="small" @click="deleteList(allBandList.length-1,allBandList,'鍒犻櫎棰戞')" :disabled="state>1" style="margin: 4px;">鍒犻櫎棰戞</el-button> - <el-button type="primary" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">娣诲姞瑙掑害</el-button> - <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">鍒犻櫎瑙掑害</el-button> + <el-button type="success" size="small" @click="addList(angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;">娣诲姞瑙掑害</el-button> + <el-button size="small" @click="deleteList(angleList.length-1,angleList)" v-if="!(state>1)&&intermodulationNum>0" style="margin: 4px;" type="danger">鍒犻櫎瑙掑害</el-button> </div> </el-col> </el-row> @@ -70,8 +69,9 @@ :value="item.value"> </el-option> </el-select> + <el-button size="small" @click="deleteList(y,allBandList,'鍒犻櫎棰戞')" :disabled="state>1" style="margin-left: 16px;" type="danger">鍒犻櫎棰戞</el-button> <el-button type="primary" size="small" @click="addList(h.projectList,'浜掕皟')" style="margin-left: 16px;" v-if="intermodulationNum>0&&!(state>1)">娣诲姞浜掕皟</el-button> - <el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" v-if="intermodulationNum>0&&!(state>1)">鍒犻櫎浜掕皟</el-button> + <!-- <el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" v-if="intermodulationNum>0&&!(state>1)">鍒犻櫎浜掕皟</el-button> --> <el-button type="primary" size="small" @click="save(h,y)" :disabled="state>1" :loading="loading[y]" style="margin-left: 16px;" v-show="!isLook">淇� 瀛�</el-button> </div> <el-divider></el-divider> @@ -86,7 +86,7 @@ <div style="text-align: center;">{{ n.unit }}</div> </el-col> <el-col :span="2"> - <div style="text-align: center;" v-html="n.tell"></div> + <div style="text-align: center;" v-html="n.ask"></div> </el-col> <el-col :span="16"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> @@ -127,7 +127,7 @@ <div style="text-align: center;">{{ n.unit }}</div> </el-col> <el-col :span="2"> - <div style="text-align: center;" v-html="n.tell"></div> + <div style="text-align: center;" v-html="n.ask"></div> </el-col> <el-col :span="16"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> @@ -145,6 +145,7 @@ :value="item.value"> </el-option> </el-select> + <el-button type="danger" icon="el-icon-delete" circle size="small" @click="deleteList(j,h.projectList,'浜掕皟')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0" style="margin-left: 20px;"></el-button> </div> </td> </tr> @@ -213,7 +214,7 @@ { inspectionItemSubclass:'鐢靛帇椹绘尝姣�', unit:'/', - tell:'鈮�1.45', + ask:'鈮�1.45', result:0, portList:[], angleList:[], @@ -222,7 +223,7 @@ { inspectionItemSubclass:'鍚屾瀬鍖栭殧绂诲害', unit:'dB', - tell:'鈮�1.45', + ask:'鈮�1.45', result:0, portList:[], angleList:[], @@ -232,7 +233,7 @@ inspectionItemSubclass:'浜掕皟', often:'',//浜掕皟鐗规湁瀛楁 unit:'dB', - tell:'鈮�1.45', + ask:'鈮�1.45', result:0, portList:[], angleList:[], @@ -350,18 +351,18 @@ this.angleList = angleList this.upTemplateState = false } - let tell = '' - if(item.tell.includes(',')){ - item.tell.split(',').forEach((m,i)=>{ - tell = tell + m+ (i==item.tell.split(',').length-1?'':'<br/>') + let ask = '' + if(item.ask.includes(',')){ + item.ask.split(',').forEach((m,i)=>{ + ask = ask + m+ (i==item.ask.split(',').length-1?'':'<br/>') }) }else{ - tell = item.tell + ask = item.ask } let obj = { inspectionItemSubclass: item.inspectionItemSubclass, unit:item.unit, - tell:tell, + ask:ask, result:n.result, id:item.id, often:n.often, @@ -454,11 +455,11 @@ this.upTemplateState = false if(list.length>1){ if(type=='浜掕皟'){ - let index = null; + // let index = null; let num = 0; list.forEach((m,i)=>{ if(m.inspectionItemSubclass.includes('浜掕皟')){ - index = i; + // index = i; num++ } }) @@ -649,8 +650,8 @@ this.$set( this.loading, y, true) // this.loading[y] = true this.$axios.post(this.$api.insOrderPlan.saveInsContext2, { - orderId:this.orderId, - sampleId:this.sampleId, + // orderId:this.orderId, + sampleId:this.orderId, sonLaboratory:h.projectList[0].sonLaboratory, frequency:h.band, insProductResult2s:arr @@ -673,16 +674,28 @@ console.log(err) }) }, + saveAll(){ + if(this.allBandList.find(m=>!m.band)){ + this.$message.error('璇峰厛濉啓棰戞') + return false + }else{ + this.allBandList.forEach((h,j)=>{ + this.save(h,j) + }) + return true + } + }, // 鏇存柊妯℃澘 upTemplate(obj){ this.upTemplateState = true; // return obj.allBandList.forEach((item,index)=>{ if(!this.allBandList[index]){ - this.allBandList[index] = { - projectList:this.HaveJson(this.allBandList[0].projectList), - band:item.band - } + this.$set(this.allBandList, index, {projectList:this.HaveJson(this.allBandList[0].projectList)}) + // this.allBandList[index] = { + // projectList:this.HaveJson(this.allBandList[0].projectList), + // band:item.band + // } } let arr = [] item.projectList.forEach((m,i)=>{ @@ -691,13 +704,16 @@ angleList:m.angleList, portList:m.portList, portNum:m.portNum, - value:m.value, + // value:m.value, valueType:m.valueType } + this.$set(obj0,'value',m.value) arr.push({...this.allBandList[index].projectList.find(n=>n.inspectionItemSubclass==m.inspectionItemSubclass),...obj0}) } }) - this.allBandList[index].projectList = arr + // this.allBandList[index].projectList = arr + this.$delete(this.allBandList[index],'projectList') + this.$set(this.allBandList[index],'projectList',arr) }) this.angleList = obj.angleList this.intermodulationNum = obj.intermodulationNum -- Gitblit v1.9.3