licp
2024-12-10 81150f2c6e86f747a7e7539e91f7b75e9fa87075
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -798,15 +798,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
        }
      }
    },
    // 更新模板