From 6ef9e5189ac1888b8c4c504d5c5d3f431807ff56 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期六, 15 三月 2025 11:57:40 +0800
Subject: [PATCH] 修改电路试验单位

---
 src/components/do/b1-inspect-order-plan/circuit-parameters1.vue |   52 +++++++++++++++++++++++++++++++++-------------------
 1 files changed, 33 insertions(+), 19 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..12cdaf7 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> -->
@@ -100,7 +101,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,7 +125,8 @@
             </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>
@@ -163,7 +166,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,7 +195,8 @@
             </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>
@@ -242,7 +247,7 @@
             </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>
@@ -285,7 +290,7 @@
             </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>
@@ -306,16 +311,16 @@
       bandList0: [],
       portList: [
         {
-          value: '1',
+          value: 'P1',
         },
         {
-          value: '2',
+          value: 'P2',
         },
         {
-          value: '3',
+          value: 'P3',
         },
         {
-          value: '4',
+          value: 'P4',
         },
       ],
       angleList: [
@@ -491,7 +496,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 +512,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 => {
@@ -604,16 +609,16 @@
           // 璧嬪�肩鍙e拰瑙掑害
           this.portList = [
             {
-              value: '1',
+              value: 'P1',
             },
             {
-              value: '2',
+              value: 'P2',
             },
             {
-              value: '3',
+              value: 'P3',
             },
             {
-              value: '4',
+              value: 'P4',
             },
           ]
           this.angleList = [
@@ -830,6 +835,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) {

--
Gitblit v1.9.3