From 81150f2c6e86f747a7e7539e91f7b75e9fa87075 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期二, 10 十二月 2024 14:14:38 +0800
Subject: [PATCH] 电路试验退出保存优化
---
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 43 ++++++++++++++++++++++++++++++++++++++++---
1 files changed, 40 insertions(+), 3 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 dd90199..a03c9a6 100644
--- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
+++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -674,15 +674,52 @@
console.log(err)
})
},
- saveAll(){
+ async saveAll(){
if(this.allBandList.find(m=>!m.band)){
this.$message.error('璇峰厛濉啓棰戞')
return false
}else{
+ let arr0 = []
this.allBandList.forEach((h,j)=>{
- this.save(h,j)
+ // this.save(h,j)
+ let arr = h.projectList.map(item=>{
+ if(item.portList&&item.portList.length>0){
+ item.value.forEach(m=>{
+ m = m.splice(item.portList.length)
+ })
+ }
+ let obj = {
+ insProductId:item.id,
+ equipValue:this.insProductNew.find(m=>m.id==item.id).equipValue,
+ equipName:this.insProductNew.find(m=>m.id==item.id).equipName,
+ port:item.portList.map(m=>m.value).join(','),
+ angle:item.angleList.map(m=>m.value).join(','),
+ value:JSON.stringify(item.value),
+ often:item.often
+ }
+ return obj
+ })
+ let obj0 = {
+ sampleId:this.orderId,
+ sonLaboratory:h.projectList[0].sonLaboratory,
+ frequency:h.band,
+ insProductResult2s:arr
+ }
+ arr0.push(obj0)
})
- return true
+ let res = await this.$axios.post(this.$api.insOrderPlan.saveInsContext2s, {insProductResultDtos:arr0
+ }, {
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ noQs:true})
+ if(res.code===201){
+ this.$message.error('淇濆瓨澶辫触')
+ return false
+ }else{
+ this.$message.success('宸蹭繚瀛�')
+ return true
+ }
}
},
// 鏇存柊妯℃澘
--
Gitblit v1.9.3