From 551e8f6756abbb1277566dd1225a14422c774d6f Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期四, 26 十二月 2024 14:33:08 +0800
Subject: [PATCH] 完成标准物质领用迁移
---
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 86 ++++++++++++++++++++++++++++++++++--------
1 files changed, 69 insertions(+), 17 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 a03c9a6..311b594 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -159,7 +159,7 @@
</tr>
<tr v-for="(item,index) in n.angleList" :key="index + 'eee'">
<td>
- <el-input size="small" placeholder="瑙掑害" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index)"></el-input>
+ <el-input size="small" placeholder="瑙掑害" v-model="item.value" :disabled="state>1" @blur="handleAngle(item.value,index,h.band)"></el-input>
</td>
<td v-for="(m,i) in n.portList" :key="i+'ggg'">
<el-input size="small" placeholder="鏈�宸��" v-model="n.value[index][i]" v-if="n.value[index]" :disabled="state>1"></el-input>
@@ -310,9 +310,14 @@
// 鍒濆鍖栨暟鎹�
initData(){
this.allBandList = []
+ this.intermodulationNum = 0
// 澶勭悊椤圭洰
this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('鐢佃矾璇曢獙'))
- this.insProductNew.forEach(async item => {
+ this.insProductNew.forEach( item => {
+ // 鏄惁瀛樺湪浜掕皟妫�楠岄」鐩�
+ if(item.inspectionItemSubclass.includes('浜掕皟')){
+ this.intermodulationNum++
+ }
// 鑾峰彇璁惧鍒楄〃
item.equipOptions = []
})
@@ -320,6 +325,55 @@
// 宸茬粡瀛樺湪鍊兼椂锛岃祴鍊�
let bandList = this.insProductNew[0].insProductResult2.map(m=>m.frequency)
bandList = Array.from(new Set(bandList))
+ // 涓婁紶闄勪欢鍚庯紝璁剧疆妫�楠岄」鏁版嵁涓虹┖鐨勫唴瀹�
+ let sample = this.insProductNew[0];//鑾峰彇椹绘尝姣旂殑鏁版嵁锛屽鏋滈┗娉㈡瘮鍊煎瓨鍦ㄨ�屽叾浠栨楠岄」鍊间笉瀛樺湪锛屽垯鏍规嵁椹绘尝姣旇缃粯璁ゆ暟鎹�
+ if(sample.insProductResult2&&sample.insProductResult2.length>0){
+ this.insProductNew.forEach(item => {
+ if(!item.inspectionItemSubclass.includes('椹绘尝姣�')&&(!item.insProductResult2||item.insProductResult2.length==0||item.insProductResult2.length<bandList.length)){
+ if(!(item.insProductResult2.length>0&&item.insProductResult2.length<bandList.length)){
+ item.insProductResult2 = []
+ }
+ sample.insProductResult2.forEach(m=>{
+ let obj = this.HaveJson(m)
+ // 濡傛灉鏁版嵁鏈夛紝浣嗘槸涓嶅鎵�鏈夐娈电殑鏁伴噺锛屽垯琛ュ叏鏁版嵁
+ if(item.insProductResult2.length>0&&item.insProductResult2.length<bandList.length){
+ let obj0 = item.insProductResult2.find(n=>m.frequency==n.frequency)
+ if(!obj0){
+ let port = '1,2,3,4'
+ let value = JSON.parse(m.value)
+ let value0 = []
+ value.forEach(n=>{
+ if(!item.inspectionItemSubclass.includes('鑰﹀悎搴�')){
+ value0.push(['','','',''])
+ }else{
+ value0.push([''])
+ }
+ })
+ obj.port = port
+ obj.value = JSON.stringify(value0)
+ item.insProductResult2.push(obj)
+ }
+ }else{
+ // 濡傛灉涓�鏉℃暟鎹兘娌℃湁锛屽垯琛ュ叏鏁版嵁
+ let port = '1,2,3,4'
+ let value = JSON.parse(m.value)
+ let value0 = []
+ value.forEach(n=>{
+ if(!item.inspectionItemSubclass.includes('鑰﹀悎搴�')){
+ value0.push(['','','',''])
+ }else{
+ value0.push([''])
+ }
+ })
+ obj.port = port
+ obj.value = JSON.stringify(value0)
+ item.insProductResult2.push(obj)
+ }
+ })
+ }
+ })
+ }
+ // 缁х画鍥炴樉鏁版嵁
this.allBandList = []
for(let i = 0;i<bandList.length;i++){
let arr = []
@@ -393,10 +447,6 @@
}else{
// 娌℃湁鍊兼椂锛屽垵濮嬪寲椤甸潰
this.insProductNew.forEach(async item => {
- // 鏄惁瀛樺湪浜掕皟妫�楠岄」鐩�
- if(item.inspectionItemSubclass.includes('浜掕皟')){
- this.intermodulationNum++
- }
// 璧嬪�艰澶�
item.equipName = ''
item.equipValue = ''
@@ -589,8 +639,8 @@
}
return arr
},
- // 缁熶竴淇敼瑙掑害锛屽鏋滆搴︽病鏈夊甫掳锛屽垯鎷兼帴涓�涓�
- handleAngle(e,index){
+ // 缁熶竴淇敼鍚屼竴棰戞鐨勮搴︼紝濡傛灉瑙掑害娌℃湁甯β帮紝鍒欐嫾鎺ヤ竴涓�
+ handleAngle(e,index,band){
if(!e){
return
}
@@ -599,15 +649,17 @@
val = val + '掳'
}
this.allBandList.forEach(item=>{
- item.projectList.forEach(m=>{
- if(m.inspectionItemSubclass.includes('浜掕皟')){
- m.angleList.forEach((n,i)=>{
- if(index==i){
- n.value = val
- }
- })
- }
- })
+ if(item.band==band){
+ item.projectList.forEach(m=>{
+ if(m.inspectionItemSubclass.includes('浜掕皟')){
+ m.angleList.forEach((n,i)=>{
+ if(index==i){
+ n.value = val
+ }
+ })
+ }
+ })
+ }
})
},
handlePort(n){
--
Gitblit v1.9.3