| | |
| | | this.$message.error('请填写完整数据') |
| | | return |
| | | } |
| | | |
| | | const opticalProjectList = JSON.parse(JSON.stringify(this.opticalProjectList)) |
| | | let entrustTime = this.circulateForm.entrustTime |
| | | let entrustNum = this.circulateForm.entrustNum |
| | | let temperaturePoint1 = JSON.parse(JSON.stringify(this.temperatureData)) |
| | | |
| | | temperaturePoint1.forEach(t => { |
| | | if (!t.temperaturePoint || !t.askSymbol || !t.askNum) { |
| | | throw this.$message.error('请填写完整数据') |
| | | } |
| | | }) |
| | | let temperaturePoint = JSON.parse(JSON.stringify(this.temperatureData)) |
| | | temperaturePoint.unshift({temperaturePoint: 20, askSymbol: null, askNum: null}) |
| | | temperaturePoint.unshift({temperaturePoint: 20}) |
| | | let askArr = [] |
| | | let opticalProjectArr = [] |
| | | // 拼接要求值ask |
| | | opticalProjectList.forEach(o => { |
| | | opticalProjectArr.push(o.value) |
| | | temperaturePoint.forEach(t => { |
| | | t.temperaturePoint = t.temperaturePoint + '℃' |
| | | const askObj = t.temperaturePoint + ',' + o.value + ',' + t.askSymbol + t.askNum |
| | | askArr.push(askObj) |
| | | if (!t.askSymbol) { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + null |
| | | askArr.push(askObj) |
| | | } else { |
| | | const askObj = t.temperaturePoint + '℃' + ',' + o.value + ',' + t.askSymbol + t.askNum |
| | | askArr.push(askObj) |
| | | } |
| | | }) |
| | | }) |
| | | askArr.push(this.circulateForm.entrustNum) |
| | |
| | | temperaturePointList.push(t.temperaturePoint) |
| | | }) |
| | | temperaturePoint1.forEach(t => { |
| | | if (!t.temperaturePoint || !t.askSymbol || !t.askNum) { |
| | | throw this.$message.error('请填写完整数据') |
| | | } |
| | | t.temperaturePoint = t.temperaturePoint + '℃' |
| | | askNum.push(t.askSymbol + t.askNum + 'dB/Km') |
| | | temperaturePointList2.push(t.temperaturePoint) |
| | |
| | | askNum.forEach(a => { |
| | | additionArr.push(temperaturePointList2.join(',') + a) |
| | | }) |
| | | temperaturePointList2.unshift(20 + '℃') |
| | | const tell = '温度范围:' + temperaturePointList2.join(',') + ';' + '保温时间:' + entrustTime + ';' + '循环次数:' |
| | | + entrustNum + ';' + '光纤(' + opticalProjectArr.join(',') + ')' + '附加衰减绝对值:' + additionArr.join(';') |
| | | this.productList.forEach(item => { |
| | |
| | | item.tell = tell |
| | | } |
| | | }) |
| | | console.log('ask---', ask) |
| | | console.log('tell---', tell) |
| | | this.circulateShow = false |
| | | }, |
| | | beforeCirculateShowClose () { |
| | |
| | | }) |
| | | }else if(type==1){ |
| | | let arr = this.editTable.filter(b => b.sampleId == item.id) |
| | | arr.forEach(f => { |
| | | if(a.ask.includes(f.symbolItem)){ |
| | | let ask = calBack(a.ask, f.symbolItem,f.value) |
| | | if (ask) { |
| | | a.ask = ask |
| | | for (var i=0;i<arr.length;i++){ |
| | | if(a.ask){ |
| | | if(a.ask.includes(arr[i].symbolItem)){ |
| | | let ask = calBack(a.ask, arr[i].symbolItem,arr[i].value) |
| | | if (ask) { |
| | | a.ask = ask |
| | | } |
| | | let tell = this.handleTell(a.tell, arr[i].symbolItem,arr[i].value) |
| | | if (tell) { |
| | | a.tell = tell |
| | | } |
| | | } |
| | | let tell = this.handleTell(a.tell, f.symbolItem,f.value) |
| | | if (tell) { |
| | | a.tell = tell |
| | | } |
| | | }else{ |
| | | this.$message.error('要求值为空,需要去标准库维护!') |
| | | } |
| | | }) |
| | | } |
| | | // arr.forEach(f => { |
| | | // if(a.ask){ |
| | | // if(a.ask.includes(f.symbolItem)){ |
| | | // let ask = calBack(a.ask, f.symbolItem,f.value) |
| | | // if (ask) { |
| | | // a.ask = ask |
| | | // } |
| | | // let tell = this.handleTell(a.tell, f.symbolItem,f.value) |
| | | // if (tell) { |
| | | // a.tell = tell |
| | | // } |
| | | // } |
| | | // }else{} |
| | | // }) |
| | | } |
| | | } |
| | | }) |