From 6fb9ccefdb939d728340fc7b626e97b26f2eab57 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期三, 04 十二月 2024 13:44:18 +0800
Subject: [PATCH] 修改电路试验保存

---
 src/components/do/b1-inspect-order-plan/circuit-parameters1.vue |   11 +++++++++++
 src/components/do/b1-inspect-order-plan/circuit-parameters2.vue |   11 +++++++++++
 src/components/do/b1-inspect-order-plan/Inspection.vue          |    9 +++++++--
 src/components/view/b1-inspect-order-plan.vue                   |    2 +-
 src/view/index.vue                                              |    8 +++++---
 src/components/view/index-index.vue                             |   15 ++++++++-------
 6 files changed, 43 insertions(+), 13 deletions(-)

diff --git a/src/components/do/b1-inspect-order-plan/Inspection.vue b/src/components/do/b1-inspect-order-plan/Inspection.vue
index 32ee71d..038c937 100644
--- a/src/components/do/b1-inspect-order-plan/Inspection.vue
+++ b/src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -259,7 +259,7 @@
     <el-row class="title">
       <el-col :span="12" style="padding-left: 20px;text-align: left;" :class="{noShow:noBack}">妫�楠屽崟璇︽儏
       </el-col>
-      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 16px;">
+      <el-col :span="12" style="text-align: right;display: flex;align-items: center;justify-content: end;margin-top: 0px;">
         <el-button size="small" type="primary" @click="versionDialogVisible=true" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')">鐢佃皟/闈炵數璋冩ā鏉垮垏鎹�</el-button>
         <el-select v-model="template" size="medium" placeholder="鐢佃矾棰勮妯℃澘" style="margin-right: 10px;margin-left: 10px;" v-if="state==1&&tableLists.find(m=>m.templateId==currentTable)&&tableLists.find(m=>m.templateId==currentTable).templateName.includes('鐢佃矾璇曢獙')"
           @change="selectInsProductTemplateById">
@@ -3317,6 +3317,9 @@
           this.$message.error('璇疯緭鍏ユ箍搴�')
           return
         }
+        if(this.sonLaboratory === '鐢佃矾璇曢獙'&&!this.$refs.CircuitParameters.saveAll()){
+          return
+        }
         this.experimentDia = true
         this.newUserInfo = []
         this.userInfo.name.forEach((item,index)=>{
@@ -3820,7 +3823,9 @@
             cancelButtonText: '鍙栨秷',
             type: 'warning'
           }).then(() => {
-            this.$emit('goback')
+            if(this.$refs.CircuitParameters.saveAll()){
+              this.$emit('goback')
+            }
           })
         }else{
           this.$emit('goback')
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 b58a998..6c61c11 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -797,6 +797,17 @@
         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;
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 4e84e59..6cb01b7 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -673,6 +673,17 @@
         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;
diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue
index 0a3f2cf..c96f0ae 100644
--- a/src/components/view/b1-inspect-order-plan.vue
+++ b/src/components/view/b1-inspect-order-plan.vue
@@ -332,7 +332,7 @@
 		<div style="width: 100%;height: 100%;" v-if="activeFace >0">
 			<Add :active="activeFace" :currentId="currentId" :examine="examine"/>
 		</div>
-    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" />
+    <Inspection v-if="state>0" @goback="goback" :orderId="orderId" :inspectorList="inspectorList" :sonLaboratory="componentData.entity.sonLaboratory" :state="state" :orderStateId="orderStateId" :version="version" :isLook="isLook" :num1="num1" :orderId0="orderId0" :userInfo="userInfo" ref="Inspection" />
       <el-dialog title="鏁版嵁鏌ョ湅" :visible.sync="dataDialogVisible" width="80%">
 				<div style="height: 70vh;overflow-y: auto;" v-if="dataDialogVisible">
 					<ValueTable ref="ValueTableDataLook" :rowKey="'insProductId'" :url="$api.insOrder.selectSampleAndProductByOrderId"
diff --git a/src/components/view/index-index.vue b/src/components/view/index-index.vue
index 5f9be9f..f6fc701 100644
--- a/src/components/view/index-index.vue
+++ b/src/components/view/index-index.vue
@@ -296,13 +296,14 @@
                 <div>
                   <span style="font-size: 12px;margin-bottom: 8px;">{{ m.text }}</span>
                   <div class="tags" style="display: flex;align-items: end;flex-wrap: wrap;margin-bottom: 8px;">
-                    <el-tag
-                      v-for="(item,index) in m.sample.split(',')"
-                      :key="index"
-                      :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')"
-                      effect="dark" size="mini" style="margin: 2px;">
-                      {{ item }}
-                    </el-tag>
+                    <el-tooltip class="item" effect="dark" :content="item" placement="top" v-for="(item,index) in m.sample?m.sample.split(','):[]"
+                    :key="index">
+                      <el-tag
+                        :color="m.type==0?'#70A090':(m.type==1?'#EBD476':'#FF3838')"
+                        effect="dark" size="mini" style="margin: 2px;" class="single-line-ellipsis">
+                        {{ item }}
+                      </el-tag>
+                    </el-tooltip>
                   </div>
                   <span style="display: inline-block;height: 22px;width: 70px;border-radius: 10px;line-height: 22px;text-align: center;background: #C0C4CC;color: #fff;font-size: 14px;">{{ m.name }}</span>
                 </div>
diff --git a/src/view/index.vue b/src/view/index.vue
index 5a8417f..efe8884 100644
--- a/src/view/index.vue
+++ b/src/view/index.vue
@@ -519,9 +519,11 @@
             cancelButtonText: '鍙栨秷',
             type: 'warning'
           }).then(() => {
-            this.tabs.splice(index, 1);
-            let data = this.tabs[this.tabs.length - 1]
-            this.upTabActive(data.k)
+            if(obj.$refs.Inspection.$refs.CircuitParameters.saveAll()){
+              this.tabs.splice(index, 1);
+              let data = this.tabs[this.tabs.length - 1]
+              this.upTabActive(data.k)
+            }
           })
           return
         }

--
Gitblit v1.9.3