|
|
@ -695,24 +695,24 @@ export default { |
|
|
return convertConcentration.convert(con + unit, targetSolutionConcentrationUnit) |
|
|
return convertConcentration.convert(con + unit, targetSolutionConcentrationUnit) |
|
|
}) |
|
|
}) |
|
|
const mbyjndArr = (concentration + '').split("/");//目标预计浓度
|
|
|
const mbyjndArr = (concentration + '').split("/");//目标预计浓度
|
|
|
if (initNdArr.length == 1 || mbyjndArr.length == initNdArr.length) { |
|
|
|
|
|
//预设体积
|
|
|
|
|
|
const ystjArr = mbyjndArr.map((con, index) => { |
|
|
|
|
|
const ystj = Number((con * convertTargetVol) / (transNdArr[index] || transNdArr[0])) |
|
|
|
|
|
const convertYsVol = volumeConverter.convert(ystj + targetStartVolUnit, targetStartSolutionVolumeUnit) |
|
|
|
|
|
const xstj = (convertTargetVol1 - convertYsVol)//稀释体积
|
|
|
|
|
|
return {qsrytj:convertYsVol,xstj} |
|
|
|
|
|
}) |
|
|
|
|
|
item.targetStartSolutionVolume = ystjArr.map((item) => { |
|
|
|
|
|
return Number((item.qsrytj).toFixed(precision)) |
|
|
|
|
|
}).join("/"); |
|
|
|
|
|
item.targetDiluentVolume = ystjArr.map((item) => { |
|
|
|
|
|
return Number((volumeConverter.convert(item.xstj + targetStartSolutionVolumeUnit, targetDiluentVolumeUnit)).toFixed(precision1)) |
|
|
|
|
|
}).join("/"); |
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
if(mbyjndArr.length !== initNdArr.length){ |
|
|
this.$message.error("起始溶液浓度和目标溶液浓度格式不一致,请重新输入") |
|
|
this.$message.error("起始溶液浓度和目标溶液浓度格式不一致,请重新输入") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
//预设体积
|
|
|
|
|
|
const ystjArr = mbyjndArr.map((con, index) => { |
|
|
|
|
|
const ystj = Number((con * convertTargetVol) / (transNdArr[index] || transNdArr[0])) |
|
|
|
|
|
const convertYsVol = volumeConverter.convert(ystj + targetStartVolUnit, targetStartSolutionVolumeUnit) |
|
|
|
|
|
const xstj = (convertTargetVol1 - convertYsVol)//稀释体积
|
|
|
|
|
|
return {qsrytj:convertYsVol,xstj} |
|
|
|
|
|
}) |
|
|
|
|
|
item.targetStartSolutionVolume = ystjArr.map((item) => { |
|
|
|
|
|
return Number((item.qsrytj).toFixed(precision)) |
|
|
|
|
|
}).join("/"); |
|
|
|
|
|
item.targetDiluentVolume = ystjArr.map((item) => { |
|
|
|
|
|
return Number((volumeConverter.convert(item.xstj + targetStartSolutionVolumeUnit, targetDiluentVolumeUnit)).toFixed(precision1)) |
|
|
|
|
|
}).join("/"); |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
// 导出excel模板
|
|
|
// 导出excel模板
|
|
|
exportExcel(headerArray, title = '导出模板') { |
|
|
exportExcel(headerArray, title = '导出模板') { |
|
|
|