|
|
|
@ -16,8 +16,12 @@ |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPcakge @clickable="handleClickable" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
|
:formData="formData" /> |
|
|
|
<CustomTable ref="stepTable" :columns="stepColumns" |
|
|
|
:formData="formData" /> |
|
|
|
<CustomTable @blur="onHandleTableBlur" :showOperation="fillType === 'actFillill'" ref="stepTableRef" :columns="stepColumns" |
|
|
|
:formData="formData" > |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" @deleteRow="deleteRow"></TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
<Step ref="stepRef" :formData="formData"></Step> |
|
|
|
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
|
@ -42,10 +46,11 @@ import Step from "@/components/Template/Step"; |
|
|
|
import templateMixin from "../../mixins/templateMixin"; |
|
|
|
import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; |
|
|
|
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue" |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "SWYPBQGZYZBB", |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog }, |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, |
|
|
|
mixins: [templateMixin], |
|
|
|
props: { |
|
|
|
value: { |
|
|
|
@ -63,7 +68,13 @@ export default { |
|
|
|
handler(v) { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
fillType: { |
|
|
|
immediate: true, |
|
|
|
handler(v) { |
|
|
|
console.log(v,"fillType") |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 存储条件表单配置 |
|
|
|
@ -96,7 +107,7 @@ export default { |
|
|
|
fillType: "actFill", |
|
|
|
span: 1, |
|
|
|
placeholder: "请输入备注", |
|
|
|
maxlength: 500, |
|
|
|
maxlength: 1000, |
|
|
|
rows: 5 |
|
|
|
} |
|
|
|
} |
|
|
|
@ -127,8 +138,9 @@ export default { |
|
|
|
}, |
|
|
|
versionNum: { |
|
|
|
label: "版本号", |
|
|
|
type: "input", |
|
|
|
type: "inputNumber", |
|
|
|
fillType: "actFill", |
|
|
|
prepend:"V", |
|
|
|
maxlength: 50, |
|
|
|
}, |
|
|
|
|
|
|
|
@ -197,19 +209,23 @@ export default { |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subStartSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
targetStartSolution: { |
|
|
|
label: "预设起始源溶液浓度", |
|
|
|
type: "input", |
|
|
|
type: "inputNumber", |
|
|
|
subType: "select", |
|
|
|
fillType: "preFill", |
|
|
|
subOptions: this.$store.state.template.mgOptions, |
|
|
|
subKey: "subTargetStartSolution", |
|
|
|
maxlength: 10, |
|
|
|
}, |
|
|
|
targetAcSolution: { |
|
|
|
label: "实际起始源溶液浓度", |
|
|
|
type: "input", |
|
|
|
fillType: "actFill", |
|
|
|
disabled: true, |
|
|
|
maxlength: 10, |
|
|
|
}, |
|
|
|
solution: { |
|
|
|
label: "稀释液", |
|
|
|
@ -218,6 +234,7 @@ export default { |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
codeSTD: { |
|
|
|
label: "起始编号STD", |
|
|
|
@ -262,14 +279,16 @@ export default { |
|
|
|
width: 280 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "起始溶液编号", prop: "startSolutionCode", |
|
|
|
label: "起始溶液编号", |
|
|
|
prop: "startSolutionCode", |
|
|
|
width: 280, |
|
|
|
bodyType: "input", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预设起始溶液体积", prop: "targetStartSolutionVolume", |
|
|
|
label: "预设起始溶液体积", |
|
|
|
prop: "targetStartSolutionVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "targetStartSolutionVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
@ -277,21 +296,119 @@ export default { |
|
|
|
defaultValue: "mg", |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodySubType: "inputNumber", |
|
|
|
bodySubKey: "subTargetStartSolutionPrecision", |
|
|
|
bodySubKey: "targetStartSolutionVolumePrecision", |
|
|
|
bodyFillType: "preFill", |
|
|
|
bodySubFillType: "preFill", |
|
|
|
showBodySub: this.fillType === "preFill", |
|
|
|
bodyDisabled: true, |
|
|
|
bodyPrecisionKey: "subTargetStartSolutionPrecision", |
|
|
|
bodyPrecisionKey: "targetStartSolutionVolumePrecision", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodySubPlaceholder: "请输入保留小数位数", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "实际起始溶液体积", prop: "actStartSolutionVolume", |
|
|
|
label: "实际起始溶液体积", |
|
|
|
prop: "actStartSolutionVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "actStartSolutionVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
copyFrom: "targetStartSolutionVolume",//复制哪个字段 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预设稀释液体积", |
|
|
|
prop: "targetDiluentVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "targetDiluentVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
defaultValue: "mg", |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodySubType: "inputNumber", |
|
|
|
bodySubKey: "targetDiluentVolumePrecision", |
|
|
|
bodyFillType: "preFill", |
|
|
|
bodySubFillType: "preFill", |
|
|
|
showBodySub: this.fillType === "preFill", |
|
|
|
bodyDisabled: true, |
|
|
|
bodyPrecisionKey: "targetDiluentVolumePrecision", |
|
|
|
bodyMaxlength: 10, |
|
|
|
bodySubPlaceholder: "请输入保留小数位数", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "实际稀释液体积", |
|
|
|
prop: "actDiluentVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "actDiluentVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
copyFrom: "targetDiluentVolume",//复制哪个字段 |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预设目标溶液浓度", |
|
|
|
prop: "targetSolutionConcentration", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "targetSolutionConcentrationUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodyFillType: "preFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "实际目标溶液浓度", |
|
|
|
prop: "actSolutionConcentration", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "actSolutionConcentrationUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
defaultValue: "mg", |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodySubType: "inputNumber", |
|
|
|
bodySubKey: "actSolutionConcentrationPrecision", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodySubFillType: "preFill", |
|
|
|
showBodySub: this.fillType === "preFill", |
|
|
|
bodyDisabled: true, |
|
|
|
bodyPrecisionKey: "actSolutionConcentrationPrecision", |
|
|
|
bodyMaxlength: 10, |
|
|
|
copyFrom: "targetSolutionConcentration",//复制哪个字段 |
|
|
|
bodySubPlaceholder: "请输入保留小数位数", |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "预设目标溶液体积", |
|
|
|
prop: "targetSolutionVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "targetSolutionVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodyFillType: "preFill", |
|
|
|
bodyMaxlength: 10, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: "实际目标溶液体积", |
|
|
|
prop: "actSolutionVolume", |
|
|
|
width: 280, |
|
|
|
headerSelectKey: "actSolutionVolumeUnit", |
|
|
|
fillType: "preFill", |
|
|
|
headerOptions: this.$store.state.template.volumeOptions, |
|
|
|
defaultValue: "mg", |
|
|
|
bodyType: "inputNumber", |
|
|
|
bodySubType: "inputNumber", |
|
|
|
bodySubKey: "actSolutionVolumePrecision", |
|
|
|
bodyFillType: "actFill", |
|
|
|
bodySubFillType: "preFill", |
|
|
|
showBodySub: this.fillType === "preFill", |
|
|
|
bodyDisabled: true, |
|
|
|
bodyPrecisionKey: "actSolutionVolumePrecision", |
|
|
|
bodyMaxlength: 10, |
|
|
|
copyFrom: "targetSolutionVolume",//复制哪个字段 |
|
|
|
bodySubPlaceholder: "请输入保留小数位数", |
|
|
|
}, |
|
|
|
] |
|
|
|
}, |
|
|
|
@ -325,13 +442,17 @@ export default { |
|
|
|
this.formData = { |
|
|
|
effectivePeriodUnit: "days",//设置默认值 |
|
|
|
createTime: "2026-01-02 18:05:36",//设置默认值 |
|
|
|
stepTableFormData: [ |
|
|
|
{ actStartSolutionVolume: 1, subActStartSolutionVolume: "ul", subTargetStartSolutionPrecision: 3 }, |
|
|
|
{ targetStartSolutionVolume: 3, subTargetStartSolutionVolume: "mg", subTargetStartSolutionPrecision: 2 }, |
|
|
|
], |
|
|
|
versionNum:1, |
|
|
|
stepTableFormData: [], |
|
|
|
headerSelectFields: { |
|
|
|
targetStartSolutionVolumeUnit: "mg", |
|
|
|
actStartSolutionVolumeUnit: "ul", |
|
|
|
actStartSolutionVolumeUnit: "mg", |
|
|
|
targetDiluentVolumeUnit: "mg", |
|
|
|
actDiluentVolumeUnit: "mg", |
|
|
|
targetSolutionConcentrationUnit: "mg", |
|
|
|
actSolutionConcentrationUnit: "mg", |
|
|
|
targetSolutionVolumeUnit: "mg", |
|
|
|
actSolutionVolumeUnit: "mg", |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -349,16 +470,14 @@ export default { |
|
|
|
}, |
|
|
|
//选择试剂提交事件 |
|
|
|
onSelectReagentSubmit(code){ |
|
|
|
this.formData[this.currentSubKey] = code; |
|
|
|
this.$set(this.formData, this.currentSubKey, code); |
|
|
|
this.formData = {...this.formData} |
|
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
|
this.selectReagentVisible = false; |
|
|
|
}, |
|
|
|
async getFormData() { |
|
|
|
const baseData = await this.$refs.baseInfoRef.getFormData(); |
|
|
|
const conditionData = await this.$refs.storageConditionRef.getFormData(); |
|
|
|
const stepFormData = await this.$refs.stepFormPackageRef.getFormData(); |
|
|
|
const stepDataFormData = await this.$refs.stepTable.getFormData(); |
|
|
|
const stepDataFormData = await this.$refs.stepTableRef.getFormData(); |
|
|
|
const stepData = await this.$refs.stepRef.getFormData(); |
|
|
|
if (!stepData.length) { |
|
|
|
this.$message.error("请添加步骤"); |
|
|
|
@ -376,8 +495,8 @@ export default { |
|
|
|
}, |
|
|
|
async onSave() { |
|
|
|
// const formData = await this.getFormData(); |
|
|
|
const stepDataFormData = await this.$refs.stepTable.getFormData(); |
|
|
|
console.log(stepDataFormData, "formData") |
|
|
|
const formData = await this.$refs.stepTableRef.getFormData(); |
|
|
|
console.log(formData, "formData") |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|