|
|
|
@ -2,8 +2,8 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="detail-container"> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{formData.templateMc || "生物样品内标工作液制备表"}}<img |
|
|
|
src="@/assets/images/detail-title.png" /></div> |
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc || |
|
|
|
"生物样品内标工作液制备表" }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
<div class="detail-content"> |
|
|
|
<div class="content"> |
|
|
|
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig" |
|
|
|
@ -13,118 +13,70 @@ |
|
|
|
<BaseInfoFormPcakge label="存储条件" ref="storageConditionRef" :formConfig="storageFormConfig" |
|
|
|
:formData="formData" /> |
|
|
|
<LineLabel label="操作步骤" /> |
|
|
|
<div v-if = "fillType === 'preFill'" class = "mt-20"> |
|
|
|
<div v-if="fillType === 'preFill'" class="mt-20"> |
|
|
|
<el-button type="primary" @click="handleAddParalle">新增平行配制</el-button> |
|
|
|
<el-button type="primary" @click="handleAddLadder">新增阶梯配制</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 阶梯配制区域 --> |
|
|
|
<div |
|
|
|
v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" |
|
|
|
:key="'ladder_' + ladderIndex" |
|
|
|
> |
|
|
|
|
|
|
|
<div v-for="(ladderConfig, ladderIndex) in formData.ladderConfigs" :key="'ladder_' + ladderIndex"> |
|
|
|
|
|
|
|
<div class="template-form-item"> |
|
|
|
<div class="config-header"> |
|
|
|
<div>阶梯配制</div> |
|
|
|
<el-button |
|
|
|
v-if = "fillType === 'preFill'" |
|
|
|
type="text" |
|
|
|
icon="el-icon-delete" |
|
|
|
@click="deleteLadderConfig(ladderIndex)" |
|
|
|
>删除</el-button> |
|
|
|
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" |
|
|
|
@click="deleteLadderConfig(ladderIndex)">删除</el-button> |
|
|
|
</div> |
|
|
|
<BaseInfoFormPcakge |
|
|
|
@clickable="handleClickable" |
|
|
|
:ref="`ladderStepFormPackageRef_${ladderIndex}`" |
|
|
|
:formConfig="ladderStepFormConfig" |
|
|
|
@blur="onHandleBlur" |
|
|
|
:formData="ladderConfig" |
|
|
|
fieldItemLabel = "阶梯配制" |
|
|
|
:prefixKey = "'ladder_'+ladderIndex" |
|
|
|
/> |
|
|
|
<CustomTable |
|
|
|
@blur="onHandleTableBlur" |
|
|
|
:ref="`ladderStepTableRef_${ladderIndex}`" |
|
|
|
:columns="ladderStepColumns" |
|
|
|
:formData="ladderConfig" |
|
|
|
:prefixKey = "'ladder_'+ladderIndex" |
|
|
|
fieldItemLabel = "阶梯配制" |
|
|
|
> |
|
|
|
<BaseInfoFormPcakge @clickable="(e) => handleClickable('ladder', ladderIndex, e)" |
|
|
|
:ref="`ladderStepFormPackageRef_${ladderIndex}`" :formConfig="ladderStepFormConfig" |
|
|
|
@blur="onHandleBlur" :formData="ladderConfig" fieldItemLabel="阶梯配制" |
|
|
|
:prefixKey="'ladder_' + ladderIndex" /> |
|
|
|
<CustomTable @blur="(e)=>onHandleTableBlur('ladder', ladderIndex,e)" :ref="`ladderStepTableRef_${ladderIndex}`" |
|
|
|
:columns="ladderStepColumns" :formData="ladderConfig" :prefixKey="'ladder_' + ladderIndex" |
|
|
|
fieldItemLabel="阶梯配制"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
|
<TableOpertaion |
|
|
|
:fillType="fillType" |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex, 'ladder', ladderIndex)" |
|
|
|
></TableOpertaion> |
|
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex, 'ladder', ladderIndex)"> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<Step |
|
|
|
class="mt-0" |
|
|
|
:ref="`ladderStepRef_${ladderIndex}`" |
|
|
|
:formData="ladderConfig.ladderStepData" |
|
|
|
fieldItemLabel = "阶梯配制" |
|
|
|
:prefixKey = "'ladder_'+ladderIndex" |
|
|
|
></Step> |
|
|
|
|
|
|
|
<Step class="mt-0" :ref="`ladderStepRef_${ladderIndex}`" |
|
|
|
:formData="ladderConfig.ladderStepData" fieldItemLabel="阶梯配制" |
|
|
|
:prefixKey="'ladder_' + ladderIndex"></Step> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 平行配制区域 --> |
|
|
|
<div |
|
|
|
label="平行配制" |
|
|
|
v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
:key="'paralle_' + paralleIndex" |
|
|
|
> |
|
|
|
|
|
|
|
<div label="平行配制" v-for="(paralleConfig, paralleIndex) in formData.paralleConfigs" |
|
|
|
:key="'paralle_' + paralleIndex"> |
|
|
|
|
|
|
|
<div class="template-form-item"> |
|
|
|
<div class="config-header"> |
|
|
|
<div>平行配制</div> |
|
|
|
<el-button |
|
|
|
v-if = "fillType === 'preFill'" |
|
|
|
type="text" |
|
|
|
icon="el-icon-delete" |
|
|
|
@click="deleteParalleConfig(paralleIndex)" |
|
|
|
>删除</el-button> |
|
|
|
<el-button v-if="fillType === 'preFill'" type="text" icon="el-icon-delete" |
|
|
|
@click="deleteParalleConfig(paralleIndex)">删除</el-button> |
|
|
|
</div> |
|
|
|
<BaseInfoFormPcakge |
|
|
|
@clickable="handleClickable" |
|
|
|
:ref="`paralleStepFormPackageRef_${paralleIndex}`" |
|
|
|
:formConfig="paralleStepFormConfig" |
|
|
|
@blur="onHandleBlur" |
|
|
|
:formData="paralleConfig" |
|
|
|
:prefixKey = "'paralle'+paralleIndex" |
|
|
|
fieldItemLabel = "平行配制" |
|
|
|
/> |
|
|
|
<CustomTable |
|
|
|
@blur="onHandleTableBlur" |
|
|
|
:ref="`paralleStepTableRef_${paralleIndex}`" |
|
|
|
:columns="paralleStepColumns" |
|
|
|
:formData="paralleConfig" |
|
|
|
:prefixKey = "'paralle'+paralleIndex" |
|
|
|
fieldItemLabel = "平行配制" |
|
|
|
> |
|
|
|
<BaseInfoFormPcakge @clickable="(e) => handleClickable('paralle', paralleIndex, e)" |
|
|
|
:ref="`paralleStepFormPackageRef_${paralleIndex}`" :formConfig="paralleStepFormConfig" |
|
|
|
@blur="onHandleBlur" :formData="paralleConfig" :prefixKey="'paralle' + paralleIndex" |
|
|
|
fieldItemLabel="平行配制" /> |
|
|
|
<CustomTable @blur="(e)=>onHandleTableBlur('paralle', paralleIndex,e)" :ref="`paralleStepTableRef_${paralleIndex}`" |
|
|
|
:columns="paralleStepColumns" :formData="paralleConfig" |
|
|
|
:prefixKey="'paralle' + paralleIndex" fieldItemLabel="平行配制"> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex}"> |
|
|
|
<TableOpertaion |
|
|
|
:fillType="fillType" |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex, 'paralle', paralleIndex)" |
|
|
|
></TableOpertaion> |
|
|
|
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" |
|
|
|
@deleteRow="(rowIndex) => deleteRow(rowIndex, 'paralle', paralleIndex)"> |
|
|
|
</TableOpertaion> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<Step |
|
|
|
class="mt-0" |
|
|
|
:ref="`paralleStepRef_${paralleIndex}`" |
|
|
|
:formData="paralleConfig.paralleStepData" |
|
|
|
fieldItemLabel = "平行配制" |
|
|
|
:prefixKey = "'paralle'+paralleIndex" |
|
|
|
></Step> |
|
|
|
|
|
|
|
<Step class="mt-0" :ref="`paralleStepRef_${paralleIndex}`" |
|
|
|
:formData="paralleConfig.paralleStepData" fieldItemLabel="平行配制" |
|
|
|
:prefixKey="'paralle' + paralleIndex"></Step> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
|
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -145,7 +97,7 @@ 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" |
|
|
|
import {getLadderColumnsConfig,getParallelColumnsConfig} from "../../formConfig/paralleAndLadderConfig.js"; |
|
|
|
import { getLadderColumnsConfig, getParallelColumnsConfig, getLadderFormConfig, getBaseInfoFormConfig, getRemarkFormConfig, getStorageConditionFormConfig, getParalleStepFormConfig } from "../../formConfig/paralleAndLadderConfig.js"; |
|
|
|
export default { |
|
|
|
name: "SWYPBQGZYZBB", |
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, |
|
|
|
@ -167,217 +119,22 @@ export default { |
|
|
|
computed: { |
|
|
|
// 存储条件表单配置 |
|
|
|
storageFormConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: "conditionItem", |
|
|
|
config: { |
|
|
|
storageCondition1: { |
|
|
|
label: "存储条件", |
|
|
|
type: "select", |
|
|
|
fillType: "preFill", |
|
|
|
options: this.getDictOptions('business_cctj'), |
|
|
|
otherCode: "other1", |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
]; |
|
|
|
return getStorageConditionFormConfig(this); |
|
|
|
}, |
|
|
|
// 备注表单配置 |
|
|
|
remarkConig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: "cellItem", |
|
|
|
config: { |
|
|
|
remark: { |
|
|
|
label: "", |
|
|
|
type: "textarea", |
|
|
|
fillType: "actFill", |
|
|
|
span: 1, |
|
|
|
placeholder: "请输入备注", |
|
|
|
maxlength: 1000, |
|
|
|
rows: 5 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
return getRemarkFormConfig(); |
|
|
|
}, |
|
|
|
// 试验基本信息表单配置 |
|
|
|
baseInfoFormConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: "cardItem", |
|
|
|
config: { |
|
|
|
studyMc: { |
|
|
|
label: "试验名称", |
|
|
|
type: "input", |
|
|
|
disabled: true, |
|
|
|
}, |
|
|
|
studySn: { |
|
|
|
label: "试验编号", |
|
|
|
type: "input", |
|
|
|
disabled: true, |
|
|
|
}, |
|
|
|
methodCode: { |
|
|
|
label: "方法编号", |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
maxlength: 50, |
|
|
|
}, |
|
|
|
versionNum: { |
|
|
|
label: "版本号", |
|
|
|
type: "inputNumber", |
|
|
|
fillType: "actFill", |
|
|
|
prepend: "V", |
|
|
|
maxlength: 50, |
|
|
|
}, |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "conditionItem", |
|
|
|
label: "试验配制条件", |
|
|
|
config: { |
|
|
|
pre: { |
|
|
|
label: "预填", |
|
|
|
type: "select", |
|
|
|
multiple: true, |
|
|
|
fillType: "preFill", |
|
|
|
options: this.getDictOptions('business_pztj'), |
|
|
|
otherCode: "preOther", |
|
|
|
}, |
|
|
|
act: { |
|
|
|
label: "实际", |
|
|
|
type: "select", |
|
|
|
fillType: "actFill", |
|
|
|
otherCode: "actOther", |
|
|
|
multiple: true, |
|
|
|
options: this.getDictOptions('business_pztj') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "cellItem", |
|
|
|
config: { |
|
|
|
containerMaterial: { |
|
|
|
label: "容器材质", |
|
|
|
type: "select", |
|
|
|
options: this.getDictOptions('business_rqcz'), |
|
|
|
fillType: "actFill", |
|
|
|
otherCode: "containerMaterialOther", |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: "cellItem", |
|
|
|
label: "处理时间", |
|
|
|
config: { |
|
|
|
startDate: { |
|
|
|
label: "开始时间", |
|
|
|
type: "input", |
|
|
|
}, |
|
|
|
endDate: { |
|
|
|
label: "结束时间", |
|
|
|
type: "input", |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
return getBaseInfoFormConfig(this); |
|
|
|
}, |
|
|
|
paralleStepFormConfig(){ |
|
|
|
return[ |
|
|
|
{ |
|
|
|
type:"step", |
|
|
|
config:{ |
|
|
|
solution: { |
|
|
|
label: "稀释液", |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
stepStorageCondition: { |
|
|
|
label: "存储条件", |
|
|
|
type: "select", |
|
|
|
fillType: "preFill", |
|
|
|
options: this.getDictOptions('business_cctj'), |
|
|
|
otherCode: "stepStorageConditionOther", |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
paralleStepFormConfig() { |
|
|
|
return getParalleStepFormConfig(this); |
|
|
|
}, |
|
|
|
// 操作步骤表单配置 |
|
|
|
ladderStepFormConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: "step", |
|
|
|
config: { |
|
|
|
startSolution: { |
|
|
|
label: "起始源溶液", |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subStartSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
targetStartSolution: { |
|
|
|
label: "预设起始源溶液浓度", |
|
|
|
type: "inputNumber", |
|
|
|
subType: "select", |
|
|
|
fillType: "preFill", |
|
|
|
subOptions: this.getDictOptions('business_nddw'), |
|
|
|
subKey: "subTargetStartSolution", |
|
|
|
maxlength: 10, |
|
|
|
}, |
|
|
|
targetAcSolution: { |
|
|
|
label: "实际起始源溶液浓度", |
|
|
|
type: "input", |
|
|
|
fillType: "actFill", |
|
|
|
disabled: true, |
|
|
|
maxlength: 10, |
|
|
|
}, |
|
|
|
solution: { |
|
|
|
label: "稀释液", |
|
|
|
type: "input", |
|
|
|
fillType: "preFill", |
|
|
|
subType: "clickable", |
|
|
|
subKey: "subSolution", |
|
|
|
subFillType: "actFill", |
|
|
|
maxlength: 20, |
|
|
|
}, |
|
|
|
codeSTD: { |
|
|
|
label: "起始编号STD", |
|
|
|
type: "input", |
|
|
|
maxlength: 10, |
|
|
|
fillType: "preFill", |
|
|
|
}, |
|
|
|
stepStorageCondition: { |
|
|
|
label: "存储条件", |
|
|
|
type: "select", |
|
|
|
fillType: "preFill", |
|
|
|
options: this.getDictOptions('business_cctj'), |
|
|
|
otherCode: "stepStorageConditionOther", |
|
|
|
}, |
|
|
|
|
|
|
|
effectivePeriod: { |
|
|
|
label: "目标溶液有效周期", |
|
|
|
type: "input", |
|
|
|
subType: "select", |
|
|
|
subKey: "effectivePeriodUnit", |
|
|
|
fillType: "preFill", |
|
|
|
subOptions: this.getDictOptions('business_yxqdw'), |
|
|
|
}, |
|
|
|
expireDate: { |
|
|
|
label: "目标溶液失效日", |
|
|
|
type: "input", |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
return getLadderFormConfig(this); |
|
|
|
}, |
|
|
|
paralleStepColumns() { |
|
|
|
return getParallelColumnsConfig(this); |
|
|
|
@ -392,22 +149,9 @@ export default { |
|
|
|
selectReagentVisible: false, |
|
|
|
subSolutionVisible: false, |
|
|
|
currentSubKey: "",//当前点击的子项key |
|
|
|
currentType: "",//当前点击的类型 |
|
|
|
currentRowIndex: "",//当前点击的行索引 |
|
|
|
dataSource: [], |
|
|
|
stepTableDataSource: [], |
|
|
|
sysjColumns: [ |
|
|
|
{ label: "试剂名称", prop: "reagentName" }, |
|
|
|
{ label: "编号", prop: "reagentCode" }, |
|
|
|
{ label: "批号", prop: "reagentNo" }, |
|
|
|
{ label: "浓度/含量/纯度", prop: "concentration" }, |
|
|
|
{ label: "来源", prop: "source" }, |
|
|
|
{ label: "失效日", prop: "expireDate" }, |
|
|
|
], |
|
|
|
yqsColumns: [ |
|
|
|
{ label: "仪器名称", prop: "instrumentName" }, |
|
|
|
{ label: "仪器型号", prop: "instrumentModel" }, |
|
|
|
{ label: "仪器编号", prop: "instrumentCode" }, |
|
|
|
{ label: "下次测试/校准/检定日期", prop: "nextTestDate" }, |
|
|
|
], |
|
|
|
|
|
|
|
}; |
|
|
|
}, |
|
|
|
@ -420,7 +164,6 @@ export default { |
|
|
|
if (!this.formData.paralleConfigs) { |
|
|
|
this.$set(this.formData, 'paralleConfigs', []); |
|
|
|
} |
|
|
|
|
|
|
|
// 添加新的平行配制配置 |
|
|
|
this.formData.paralleConfigs.push({ |
|
|
|
paralleStepData: [], |
|
|
|
@ -434,7 +177,7 @@ export default { |
|
|
|
if (!this.formData.ladderConfigs) { |
|
|
|
this.$set(this.formData, 'ladderConfigs', []); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 添加新的阶梯配制配置 |
|
|
|
this.formData.ladderConfigs.push({ |
|
|
|
ladderStepData: [], |
|
|
|
@ -452,10 +195,9 @@ export default { |
|
|
|
}, |
|
|
|
// 添加表格行 |
|
|
|
handleAddRow(type, rowIndex, configIndex = 0) { |
|
|
|
const tableRef = type === 'ladder' ? |
|
|
|
this.$refs[`ladderStepTableRef_${configIndex}`] : |
|
|
|
const tableRef = type === 'ladder' ? |
|
|
|
this.$refs[`ladderStepTableRef_${configIndex}`] : |
|
|
|
this.$refs[`paralleStepTableRef_${configIndex}`]; |
|
|
|
console.log(tableRef,"refff") |
|
|
|
if (tableRef && tableRef[0].addRow) { |
|
|
|
tableRef[0].addRow({}); |
|
|
|
} |
|
|
|
@ -475,26 +217,68 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickable(item) { |
|
|
|
|
|
|
|
// 表格失去焦点事件 |
|
|
|
onHandleTableBlur(type, configIndex, e) { |
|
|
|
const { colKey = "",item } = e; |
|
|
|
if (colKey === "targetStartSolutionConcentration" || colKey === "targetSolutionVolume" || colKey === "targetSolutionConcentration" || colKey === "targetStartSolutionVolumePrecision" || colKey === "targetDiluentVolumePrecision") { |
|
|
|
if(type === "ladder"){ |
|
|
|
const volume = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetStartSolution") || 0; |
|
|
|
if (volume) { |
|
|
|
this.updateTargetStartSolutionVolume(item, volume); |
|
|
|
} |
|
|
|
}else if(type === "paralle"){ |
|
|
|
const volumne = item.targetStartSolutionConcentration || 0; |
|
|
|
if (volumne) { |
|
|
|
this.updateTargetStartSolutionVolume(item, volumne); |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(colKey === "actStartSolutionVolume" || colKey === "actDiluentVolume"){//实际起始溶液体积和实际目标溶液体积 |
|
|
|
if(type === "ladder"){ |
|
|
|
const targetAcSolution = this.$refs[`ladderStepFormPackageRef_${configIndex}`][0]?.getFormDataByKey("targetAcSolution") || 0;//获取实际起始溶液浓度 |
|
|
|
if(targetAcSolution){ |
|
|
|
this.updateSjmbrynd(item,targetAcSolution); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
}, |
|
|
|
handleClickable(type, rowIndex, item) { |
|
|
|
if (this.fillType === "preFill") { |
|
|
|
// return; |
|
|
|
return; |
|
|
|
} |
|
|
|
console.log(type, rowIndex, item, "handle") |
|
|
|
const { subKey = "" } = item; |
|
|
|
if (subKey === "subStartSolution" || subKey === "subSolution") {//起始源溶液点击事件 |
|
|
|
this.selectReagentVisible = true; |
|
|
|
this.currentSubKey = subKey; |
|
|
|
this.currentType = type; |
|
|
|
this.currentRowIndex = rowIndex; |
|
|
|
} |
|
|
|
}, |
|
|
|
//选择试剂提交事件 |
|
|
|
onSelectReagentSubmit(code) { |
|
|
|
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
|
onSelectReagentSubmit(code,row) { |
|
|
|
const { currentSubKey } = this; |
|
|
|
if (this.currentType === "ladder") { |
|
|
|
const packageRef = this.$refs[`ladderStepFormPackageRef_${this.currentRowIndex}`][0]; |
|
|
|
if (currentSubKey === "subStartSolution") { |
|
|
|
packageRef.updateFormData("targetAcSolution", row.sjnd); |
|
|
|
} |
|
|
|
packageRef.updateFormData(currentSubKey, code); |
|
|
|
|
|
|
|
} else if (this.currentType === "paralle") { |
|
|
|
this.$refs.paralleStepFormPackageRef_[this.currentRowIndex].updateFormData(this.currentSubKey, { |
|
|
|
reagentCode: code, |
|
|
|
}); |
|
|
|
} |
|
|
|
// this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code); |
|
|
|
this.selectReagentVisible = false; |
|
|
|
}, |
|
|
|
//只做校验 |
|
|
|
async validFields(){ |
|
|
|
async validFields() { |
|
|
|
// 构建需要验证的引用数组 |
|
|
|
let refsToValidate = ["baseInfoRef", "storageConditionRef", "remarkRef"]; |
|
|
|
|
|
|
|
|
|
|
|
// 添加阶梯配制相关的引用 |
|
|
|
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) { |
|
|
|
for (let i = 0; i < this.formData.ladderConfigs.length; i++) { |
|
|
|
@ -503,7 +287,7 @@ export default { |
|
|
|
refsToValidate.push(`ladderStepRef_${i}`); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 添加平行配制相关的引用 |
|
|
|
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) { |
|
|
|
for (let i = 0; i < this.formData.paralleConfigs.length; i++) { |
|
|
|
@ -514,10 +298,10 @@ export default { |
|
|
|
} |
|
|
|
return await this.validFormFields(refsToValidate); |
|
|
|
}, |
|
|
|
getFilledFormData(){ |
|
|
|
const baseData = this.$refs.baseInfoRef.getFilledFormData(); |
|
|
|
getFilledFormData() { |
|
|
|
const baseData = this.$refs.baseInfoRef.getFilledFormData(); |
|
|
|
const conditionData = this.$refs.storageConditionRef.getFilledFormData(); |
|
|
|
|
|
|
|
|
|
|
|
// 获取所有阶梯配制数据 |
|
|
|
const ladderConfigsData = []; |
|
|
|
if (this.formData.ladderConfigs && this.formData.ladderConfigs.length > 0) { |
|
|
|
@ -525,16 +309,16 @@ export default { |
|
|
|
const ladderFormData = this.$refs[`ladderStepFormPackageRef_${i}`][0].getFilledFormData(); |
|
|
|
const ladderTableFormData = this.$refs[`ladderStepTableRef_${i}`][0].getFilledFormData(); |
|
|
|
const ladderStepData = this.$refs[`ladderStepRef_${i}`][0].getFilledFormData(); |
|
|
|
|
|
|
|
|
|
|
|
ladderConfigsData.push({ |
|
|
|
...ladderFormData, |
|
|
|
...ladderTableFormData, |
|
|
|
ladderStepData:ladderStepData.stepData, |
|
|
|
ladderStepData: ladderStepData.stepData, |
|
|
|
showLadderConfig: true |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 获取所有平行配制数据 |
|
|
|
const paralleConfigsData = []; |
|
|
|
if (this.formData.paralleConfigs && this.formData.paralleConfigs.length > 0) { |
|
|
|
@ -542,18 +326,17 @@ export default { |
|
|
|
const paralleFormData = this.$refs[`paralleStepFormPackageRef_${i}`][0].getFilledFormData(); |
|
|
|
const paralleTableFormData = this.$refs[`paralleStepTableRef_${i}`][0].getFilledFormData(); |
|
|
|
const paralleStepData = this.$refs[`paralleStepRef_${i}`][0].getFilledFormData(); |
|
|
|
|
|
|
|
|
|
|
|
paralleConfigsData.push({ |
|
|
|
...paralleFormData, |
|
|
|
...paralleTableFormData, |
|
|
|
paralleStepData:paralleStepData.stepData, |
|
|
|
paralleStepData: paralleStepData.stepData, |
|
|
|
showParalleConfig: true |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const remarkData = this.$refs.remarkRef.getFilledFormData(); |
|
|
|
|
|
|
|
return { |
|
|
|
...baseData, |
|
|
|
...conditionData, |
|
|
|
@ -565,7 +348,7 @@ export default { |
|
|
|
async getFormData() { |
|
|
|
//先校验再获取值 |
|
|
|
const validFlag = await this.validFields(); |
|
|
|
if(!validFlag){ |
|
|
|
if (!validFlag) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return this.getFilledFormData(); |
|
|
|
@ -609,7 +392,7 @@ export default { |
|
|
|
color: #f78989; |
|
|
|
} |
|
|
|
|
|
|
|
.mt-0{ |
|
|
|
.mt-0 { |
|
|
|
margin-top: 0; |
|
|
|
} |
|
|
|
</style> |