|
|
@ -29,7 +29,7 @@ export default { |
|
|
'business_sp_xskkx', //色谱-编号-稀释可靠性
|
|
|
'business_sp_xskkx', //色谱-编号-稀释可靠性
|
|
|
'business_sp_cbydb', //色谱-编号-储备液对比
|
|
|
'business_sp_cbydb', //色谱-编号-储备液对比
|
|
|
'business_pcr_gzy', // PCR-编号-工作液
|
|
|
'business_pcr_gzy', // PCR-编号-工作液
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
'business_lba_jg' // LBA006-结果
|
|
|
'business_lba_jg' // LBA006-结果
|
|
|
], |
|
|
], |
|
|
props: { |
|
|
props: { |
|
|
@ -359,7 +359,7 @@ export default { |
|
|
subTargetStartSolution, |
|
|
subTargetStartSolution, |
|
|
headerSelectFields |
|
|
headerSelectFields |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arr.forEach((item, rowIndex) => { |
|
|
arr.forEach((item, rowIndex) => { |
|
|
this.updateTargetStartSolutionVolume( |
|
|
this.updateTargetStartSolutionVolume( |
|
|
item, |
|
|
item, |
|
|
@ -447,7 +447,7 @@ export default { |
|
|
// 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积);
|
|
|
// 实际目标溶液浓度 = 实际源溶液浓度÷(实际终体积÷源溶液加入体积);
|
|
|
const actNd = ( |
|
|
const actNd = ( |
|
|
parseFloat(targetAcSolution) / ( |
|
|
parseFloat(targetAcSolution) / ( |
|
|
parseFloat(actVol)/parseFloat(actStartSolutionVolume) |
|
|
|
|
|
|
|
|
parseFloat(actVol)/parseFloat(actStartSolutionVolume) |
|
|
) |
|
|
) |
|
|
).toFixed(precision) |
|
|
).toFixed(precision) |
|
|
const nd = actNd === 'Infinity' ? 0 : Number(actNd) |
|
|
const nd = actNd === 'Infinity' ? 0 : Number(actNd) |
|
|
@ -487,19 +487,19 @@ export default { |
|
|
const {subTargetStartSolution,headerSelectFields} = unitParams |
|
|
const {subTargetStartSolution,headerSelectFields} = unitParams |
|
|
const {targetSolutionConcentrationUnit,targetSolutionVolumeUnit,targetStartSolutionVolumeUnit,targetDiluentVolumeUnit} = headerSelectFields |
|
|
const {targetSolutionConcentrationUnit,targetSolutionVolumeUnit,targetStartSolutionVolumeUnit,targetDiluentVolumeUnit} = headerSelectFields |
|
|
const targetStartVolUnit = targetSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
const targetStartVolUnit = targetSolutionConcentrationUnit.split("/")[1];//先按照预设目标溶液浓度的单位标准
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( |
|
|
if( |
|
|
isValueEmpty(concentration) || |
|
|
|
|
|
|
|
|
isValueEmpty(concentration) || |
|
|
isValueEmpty(targetVolume)|| |
|
|
isValueEmpty(targetVolume)|| |
|
|
isValueEmpty(subTargetStartSolution)|| |
|
|
isValueEmpty(subTargetStartSolution)|| |
|
|
isValueEmpty(targetSolutionConcentrationUnit)|| |
|
|
isValueEmpty(targetSolutionConcentrationUnit)|| |
|
|
isValueEmpty(targetSolutionVolumeUnit)|| |
|
|
isValueEmpty(targetSolutionVolumeUnit)|| |
|
|
isValueEmpty(targetStartSolutionVolumeUnit)|| |
|
|
|
|
|
|
|
|
isValueEmpty(targetStartSolutionVolumeUnit)|| |
|
|
isValueEmpty(targetDiluentVolumeUnit) |
|
|
isValueEmpty(targetDiluentVolumeUnit) |
|
|
){ |
|
|
){ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
//将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
|
|
|
|
|
|
|
|
|
//将起始溶液浓度转换为和预设目标溶液浓度一样的单位再计算;
|
|
|
const converStartCon = convertConcentration.convert(volume+subTargetStartSolution,targetSolutionConcentrationUnit) |
|
|
const converStartCon = convertConcentration.convert(volume+subTargetStartSolution,targetSolutionConcentrationUnit) |
|
|
//将预设目标溶液体积转换为和预设目标溶液浓度单位的分母一样的单位再计算;如:预设目标溶液浓度单位为mg/mL,预设目标溶液体积单位为uL,则将预设目标溶液体积转换为mL
|
|
|
//将预设目标溶液体积转换为和预设目标溶液浓度单位的分母一样的单位再计算;如:预设目标溶液浓度单位为mg/mL,预设目标溶液体积单位为uL,则将预设目标溶液体积转换为mL
|
|
|
const convertTargetVol = volumeConverter.convert(targetVolume+targetSolutionVolumeUnit,targetStartVolUnit) |
|
|
const convertTargetVol = volumeConverter.convert(targetVolume+targetSolutionVolumeUnit,targetStartVolUnit) |
|
|
@ -521,6 +521,40 @@ export default { |
|
|
item.targetDiluentVolume = volumeConverter.convert(result1+targetStartSolutionVolumeUnit,targetDiluentVolumeUnit) |
|
|
item.targetDiluentVolume = volumeConverter.convert(result1+targetStartSolutionVolumeUnit,targetDiluentVolumeUnit) |
|
|
// this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, { targetDiluentVolume: result1 });
|
|
|
// this.$refs.stepTableRef.updateDataSourceByRowIndex(rowIndex, { targetDiluentVolume: result1 });
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
// 导出excel模板
|
|
|
|
|
|
exportExcel(rows, title) { |
|
|
|
|
|
let that = this |
|
|
|
|
|
that.$modal.loading() |
|
|
|
|
|
var tabelStr = |
|
|
|
|
|
'<table border="1" class="html-tabel">' + |
|
|
|
|
|
'<tr style="background:#eee;">' |
|
|
|
|
|
|
|
|
|
|
|
rows.forEach(item => { |
|
|
|
|
|
tabelStr = tabelStr + '<th style="text-align: center;">' + item + '</th>' |
|
|
|
|
|
}) |
|
|
|
|
|
tabelStr = tabelStr + ' </tr><table>' |
|
|
|
|
|
|
|
|
|
|
|
// Worksheet名
|
|
|
|
|
|
var worksheet = title ? title : '导入模板' |
|
|
|
|
|
var uri = 'data:application/vnd.ms-excel;base64,' |
|
|
|
|
|
// 真正要导出(下载)的HTML模板
|
|
|
|
|
|
var exportTemplate = `<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel"
|
|
|
|
|
|
xmlns="http://www.w3.org/TR/REC-html40"> |
|
|
|
|
|
<head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet> |
|
|
|
|
|
<x:Name>${worksheet}</x:Name> |
|
|
|
|
|
<x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet> |
|
|
|
|
|
</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--> |
|
|
|
|
|
</head> |
|
|
|
|
|
<body> |
|
|
|
|
|
${tabelStr} |
|
|
|
|
|
</body> |
|
|
|
|
|
</html>` |
|
|
|
|
|
var a = document.createElement('a') |
|
|
|
|
|
a.download = worksheet + '.xls' |
|
|
|
|
|
a.href = uri + window.btoa(unescape(encodeURIComponent(exportTemplate))) |
|
|
|
|
|
a.click() |
|
|
|
|
|
that.$modal.closeLoading() |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |