|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="template-form-item"> |
|
|
|
<div class="config-header"> |
|
|
|
<div>{{ $t('template.common.jtpz') }}</div> |
|
|
|
<div>{{ $t(fieldItemLabel) }}</div> |
|
|
|
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" |
|
|
|
@click="deleteConfig">{{ |
|
|
|
$t('template.common.deleteBtn') |
|
|
|
@ -18,8 +18,8 @@ |
|
|
|
@bodySelectChange="bodySelectChange" |
|
|
|
@beforeSaveRecord="(data) => onBeforeSaveRecord(data )" |
|
|
|
@headerSelectChange="(data) => onHeaderSelectChange(data)" |
|
|
|
@beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data, paralleIndex, paralleConfig)" |
|
|
|
@onRegentSubmit="(data) => onTableRegentSubmit('paralle', paralleIndex, data)" |
|
|
|
@beforeReagentSubmit="(data) => onTableBeforeReagentSubmit(data)" |
|
|
|
@onRegentSubmit="(data) => onTableRegentSubmit( data)" |
|
|
|
:prefixKey="prefixKey" :fieldItemLabel="fieldItemLabel"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaion @printTag="(e) => printTag(e)" |
|
|
|
@ -32,7 +32,7 @@ |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<Step class="mt-0 s-container" ref="stepRef" :formData="currentFormData.ladderStepData" |
|
|
|
<Step class="mt-0 s-container" ref="stepRef" :formData="currentFormData.stepData" |
|
|
|
:fieldItemLabel="fieldItemLabel" :prefixKey="prefixKey"></Step> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
@ -107,11 +107,10 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 实现getFormData方法,用于表单验证 |
|
|
|
getFormData() { |
|
|
|
const baseFormData = this.$refs.formPackageRef?.getFormData(); |
|
|
|
const tableData = this.$refs.tableRef?.getFormData(); |
|
|
|
const stepData = this.$refs.stepRef?.getFormData(); |
|
|
|
|
|
|
|
async getFormData() { |
|
|
|
const baseFormData = await this.$refs.formPackageRef?.getFormData(); |
|
|
|
const tableData = await this.$refs.tableRef?.getFormData(); |
|
|
|
const stepData =await this.$refs.stepRef?.getFormData(); |
|
|
|
// 检查所有组件是否都返回了有效的数据 |
|
|
|
if (!baseFormData || !tableData || !stepData) { |
|
|
|
return false; |
|
|
|
@ -179,7 +178,7 @@ export default { |
|
|
|
// 表格失去焦点事件 |
|
|
|
onHandleTableBlur(e) { |
|
|
|
const { configType } = this; |
|
|
|
const { colKey = "", item, rowIndex, headerSelectFields } = e; |
|
|
|
const { colKey = "", item, rowIndex, headerSelectFields,dataSource } = e; |
|
|
|
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { |
|
|
|
if (configType === "ladder") { |
|
|
|
const { targetStartSolution, subTargetStartSolution } = this.$refs.formPackageRef?.getFilledFormData(); |
|
|
|
@ -196,9 +195,15 @@ export default { |
|
|
|
} else if (colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume") {//实际起始溶液体积和实际目标溶液体积 |
|
|
|
if (configType === "ladder") { |
|
|
|
const targetAcSolution = this.$refs.formPackageRef?.getFormDataByKey("targetAcSolution");//获取实际起始溶液浓度 |
|
|
|
let initNd = 0; |
|
|
|
if(rowIndex === 0){ |
|
|
|
initNd = targetAcSolution; |
|
|
|
}else{ |
|
|
|
initNd = dataSource[rowIndex - 1].actSolutionConcentration; |
|
|
|
} |
|
|
|
const params = this.getLadderNdParamsByIndex(); |
|
|
|
if (targetAcSolution) { |
|
|
|
const volResult = this.updateSjmbrynd(item, targetAcSolution, params); |
|
|
|
const volResult = this.updateSjmbrynd(item, initNd, params); |
|
|
|
if (!volResult) { |
|
|
|
return |
|
|
|
} |
|
|
|
@ -315,7 +320,6 @@ export default { |
|
|
|
const { rowData, headerSelectFields } = val; |
|
|
|
//计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) |
|
|
|
const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) |
|
|
|
debugger |
|
|
|
let postData = { |
|
|
|
mc: null, |
|
|
|
bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, |
|
|
|
@ -366,7 +370,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
//平行配置 table选择试剂确定弹窗 |
|
|
|
onTableRegentSubmit(type, configIndex, data) { |
|
|
|
onTableRegentSubmit(data) { |
|
|
|
const { selectInfo, rowIndex, key, rowData } = data; |
|
|
|
const { row, selectedId } = selectInfo; |
|
|
|
if (key === "actStartSolutionCode") {//实际原始溶液编号点击事件 |
|
|
|
@ -390,6 +394,9 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
updateDataSourceByRowIndex(rowIndex, data) { |
|
|
|
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, data); |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|