From 129fecf9a1cc53fc4d8d7ec6d7751e78571e73d0 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 21 八月 2025 17:34:13 +0800 Subject: [PATCH] 出库后刷新 --- src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 87 +++++++++++++++++++++++++++++-------------- 1 files changed, 59 insertions(+), 28 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 7634954..16ac9f7 100644 --- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue +++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue @@ -83,7 +83,7 @@ <template v-for="(n, j) in h.projectList"> <!-- 鐢靛帇椹绘尝姣�/鍚屾瀬鍖栭殧绂诲害/寮傛瀬鍖栭殧绂诲害 --> <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" - v-if="n.inspectionItemSubclass.includes('椹绘尝姣�') || n.inspectionItemSubclass.includes('闅旂搴�')"> + v-if="(n.inspectionItemSubclass.includes('椹绘尝姣�') || n.inspectionItemSubclass.includes('闅旂搴�'))&&isLooks(n)"> <el-col :span="2"> <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> </el-col> @@ -91,7 +91,10 @@ <div style="text-align: center;">{{ n.unit }}</div> </el-col> <el-col :span="2"> - <div style="text-align: center;" v-html="n.ask"></div> + <div style="text-align: center;"> + <el-input size="small" v-model="n.ask" :disabled="state > 1" + ></el-input> + </div> </el-col> <el-col :span="16"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> @@ -100,7 +103,8 @@ <td>绔彛</td> <td v-for="(item, index) in n.portList" :key="index + 'aaa'"> <div style="display: flex;align-items: center;"> - <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state > 1"></el-input> + <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state > 1" + @blur="handleInterface(n.portList, index)"></el-input> </div> </td> </tr> @@ -128,7 +132,7 @@ </el-row> <!-- 浜掕皟 --> <el-row :gutter="5" style="margin: 12px 0 0;display: flex;align-items: center;" - v-if="n.inspectionItemSubclass.includes('浜掕皟')"> + v-if="n.inspectionItemSubclass.includes('浜掕皟')&&isLooks(n)"> <el-col :span="2"> <div style="text-align: center;">{{ n.inspectionItemSubclass }}</div> </el-col> @@ -136,7 +140,10 @@ <div style="text-align: center;">{{ n.unit }}</div> </el-col> <el-col :span="2"> - <div style="text-align: center;" v-html="n.ask"></div> + <div style="text-align: center;"> + <el-input size="small" v-model="n.ask" :disabled="state > 1" + ></el-input> + </div> </el-col> <el-col :span="16"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> @@ -162,7 +169,8 @@ <td>绔彛</td> <td v-for="(item, index) in n.portList" :key="index + 'fff'"> <div style="display: flex;align-items: center;"> - <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state > 1"></el-input> + <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state > 1" + @blur="handleInterface(n.portList, index)"></el-input> </div> </td> </tr> @@ -189,7 +197,7 @@ </div> </el-col> </el-row> - <el-divider v-if="j != h.projectList.length - 1"></el-divider> + <el-divider v-if="j != h.projectList.length - 1&&isLooks(n)"></el-divider> </template> </div> </div> @@ -206,16 +214,16 @@ bandList0: [], portList: [ { - value: '1', + value: 'P1', }, { - value: '2', + value: 'P2', }, { - value: '3', + value: 'P3', }, { - value: '4', + value: 'P4', }, ], angleList: [ @@ -352,7 +360,7 @@ 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 port = 'P1,P2,P3,P4' let value = JSON.parse(m.value) let value0 = [] value.forEach(n => { @@ -368,7 +376,7 @@ } } else { // 濡傛灉涓�鏉℃暟鎹兘娌℃湁锛屽垯琛ュ叏鏁版嵁 - let port = '1,2,3,4' + let port = 'P1,P2,P3,P4' let value = JSON.parse(m.value) let value0 = [] value.forEach(n => { @@ -418,18 +426,18 @@ this.angleList = angleList this.upTemplateState = false } - let ask = '' - if (item.ask.includes(',')) { - item.ask.split(',').forEach((m, i) => { - ask = ask + m + (i == item.ask.split(',').length - 1 ? '' : '<br/>') - }) - } else { - ask = item.ask - } + // let ask = '' + // if (item.ask.includes(',')) { + // item.ask.split(',').forEach((m, i) => { + // ask = ask + m + (i == item.ask.split(',').length - 1 ? '' : '<br/>') + // }) + // } else { + // ask = item.ask + // } let obj = { inspectionItemSubclass: item.inspectionItemSubclass, unit: item.unit, - ask: ask, + ask: n.ask, result: n.result, id: item.id, often: n.often, @@ -465,16 +473,16 @@ item.equipValue = '' this.portList = [ { - value: '1', + value: 'P1', }, { - value: '2', + value: 'P2', }, { - value: '3', + value: 'P3', }, { - value: '4', + value: 'P4', }, ] this.angleList = [ @@ -676,12 +684,22 @@ } }) }, + // 娣诲姞棰戠偣鍗曚綅 handlePort(n) { if (!n.often) { return } if (!n.often.includes('MHz') && !n.often.includes('MHZ')) { n.often = n.often + 'MHz' + } + }, + // 娣诲姞绔彛P + handleInterface(arr, index) { + if (!arr[index].value) { + return + } + if (!arr[index].value.includes('P')) { + this.$set(arr[index], 'value', 'P' + arr[index].value) } }, async methodFocus(item) { @@ -708,7 +726,8 @@ port: item.portList.map(m => m.value).join(','), angle: item.angleList.map(m => m.value).join(','), value: JSON.stringify(item.value), - often: item.often + often: item.often, + ask: item.ask } return obj }) @@ -762,7 +781,8 @@ port: item.portList.map(m => m.value).join(','), angle: item.angleList.map(m => m.value).join(','), value: JSON.stringify(item.value), - often: item.often + often: item.often, + ask: item.ask } return obj }) @@ -823,6 +843,17 @@ }) this.angleList = obj.angleList this.intermodulationNum = obj.intermodulationNum + }, + // 鏌ョ湅鏃跺鏋滄病鏈夋暟鎹紝灏变笉鏄剧ず杩欎釜妫�楠岄」 + isLooks(n){ + if(this.state<2){ + return true + } + let state = n.value.some(m=>m.some(n=>n)) + if(this.state > 1&&state){ + return true + } + return false } } } -- Gitblit v1.9.3