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-parameters1.vue | 119 +++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 79 insertions(+), 40 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue index b43b65f..8e9f083 100644 --- a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue +++ b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue @@ -6,7 +6,8 @@ <el-row> <el-col :span="23" style="display: flex;flex-wrap: wrap;"> <table border="1" cellpadding="10" style="margin: 4px 10px 10px 0;width: 32%;" - v-for="(item, index) in insProductNew" :key="index + 'ppp'" v-show="isMore ? true : (index < 3 ? true : false)"> + v-for="(item, index) in insProductNew" :key="index + 'ppp'" + v-show="isMore ? true : (index < 3 ? true : false)"> <tr> <td style="text-align: center;background: #F0F1F5;"> <el-tooltip effect="dark" :content="item.inspectionItemSubclass" placement="top-start"><span @@ -70,8 +71,8 @@ <el-option v-for="item in bandList" :key="item.value" :label="item.label" :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 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;" :disabled="state > 1" v-show="!isLook && intermodulationNum > 0">娣诲姞浜掕皟</el-button> <!-- <el-button size="small" @click="deleteList(0,h.projectList,'浜掕皟')" :disabled="state>1" v-show="!isLook&&intermodulationNum>0">鍒犻櫎浜掕皟</el-button> --> @@ -83,7 +84,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 +92,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 +104,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> @@ -123,13 +128,14 @@ </el-col> <el-col :span="1"> <div style="text-align: center;" :class="{ red: n.result === 0, green: n.result === 1 }">{{ - n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : (n.result === 3 ?'涓嶅垽瀹�':'寰呭畾'))) }} + n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : (n.result === 3 + ? '涓嶅垽瀹�' : '寰呭畾'))) }} </div> </el-col> </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> @@ -137,7 +143,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;"> @@ -163,7 +172,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> <!-- <td :rowspan="n.angleList.length+1"> @@ -191,13 +201,14 @@ </el-col> <el-col :span="1"> <div style="text-align: center;" :class="{ red: n.result === 0, green: n.result === 1 }">{{ - n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : (n.result === 3 ?'涓嶅垽瀹�':'寰呭畾'))) }} + n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : (n.result === 3 + ? '涓嶅垽瀹�' : '寰呭畾'))) }} </div> </el-col> </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> @@ -205,7 +216,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;"> @@ -242,13 +256,13 @@ </el-col> <el-col :span="1"> <div style="text-align: center;" :class="{ red: n.result === 0, green: n.result === 1 }">{{ - n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ?'涓嶅垽瀹�':'寰呭畾')) }} + n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : '寰呭畾')) }} </div> </el-col> </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> @@ -256,7 +270,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="17"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> @@ -285,11 +302,11 @@ </el-col> <el-col :span="1"> <div style="text-align: center;" :class="{ red: n.result === 0, green: n.result === 1 }">{{ - n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ?'涓嶅垽瀹�':'寰呭畾')) }} + n.result === 0 ? '涓嶅悎鏍�' : (n.result === 1 ? '鍚堟牸' : (n.result === 3 ? '涓嶅垽瀹�' : '寰呭畾')) }} </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> @@ -306,16 +323,16 @@ bandList0: [], portList: [ { - value: '1', + value: 'P1', }, { - value: '2', + value: 'P2', }, { - value: '3', + value: 'P3', }, { - value: '4', + value: 'P4', }, ], angleList: [ @@ -491,7 +508,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 => { @@ -507,7 +524,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 => { @@ -554,19 +571,19 @@ 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 - } - console.log(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 + // } + // console.log(ask) let obj = { inspectionItemSubclass: item.inspectionItemSubclass, unit: item.unit, - ask: ask, + ask: n.ask, result: n.result, id: item.id, often: n.often, @@ -604,16 +621,16 @@ // 璧嬪�肩鍙e拰瑙掑害 this.portList = [ { - value: '1', + value: 'P1', }, { - value: '2', + value: 'P2', }, { - value: '3', + value: 'P3', }, { - value: '4', + value: 'P4', }, ] this.angleList = [ @@ -830,6 +847,15 @@ 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) + } + }, save(h, y) { let arr = h.projectList.map(item => { if (item.portList && item.portList.length > 0) { @@ -844,7 +870,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 }) @@ -897,7 +924,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 }) @@ -957,6 +985,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