|
|
@ -1,29 +1,32 @@ |
|
|
<!-- 生物样品分析储备液配制表 --> |
|
|
|
|
|
|
|
|
<!-- 生物样品分析溶液配制表 --> |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div class="detail-container"> |
|
|
<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 || |
|
|
|
|
|
$t('template.common.pageTitle') }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
<div class="detail-content"> |
|
|
<div class="detail-content"> |
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
<BaseInfoFormPcakge label="试验基本信息" ref="baseInfoRef" :formConfig="baseInfoFormConfig" |
|
|
|
|
|
:formData="formData" /> |
|
|
|
|
|
<TableList label="试验试剂信息" :columns="sysjColumns" :dataSource="resource" /> |
|
|
|
|
|
<TableList label="仪器使用信息" :columns="yqsColumns" :dataSource="resource" /> |
|
|
|
|
|
<BaseInfoFormPcakge label="存储条件" ref="storageConditionRef" :formConfig="storageFormConfig" |
|
|
|
|
|
:formData="formData" /> |
|
|
|
|
|
<LineLabel label="操作步骤" /> |
|
|
|
|
|
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" ref="baseInfoRef" |
|
|
|
|
|
:formConfig="baseInfoFormConfig" :formData="formData" /> |
|
|
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" |
|
|
|
|
|
:dataSource="resource" /> |
|
|
|
|
|
<TableList label="template.common.instrumentInfo" :columns="yqsColumns" |
|
|
|
|
|
:dataSource="resource" /> |
|
|
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.storageCondition" label="template.common.storageCondition" ref="storageConditionRef" |
|
|
|
|
|
:formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
<div class="template-form-item"> |
|
|
<div class="template-form-item"> |
|
|
<BaseInfoFormPcakge ref="stepFormPackageRef" :formConfig="stepFormConfig" |
|
|
|
|
|
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur" |
|
|
:formData="formData" /> |
|
|
:formData="formData" /> |
|
|
</div> |
|
|
</div> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
<BaseInfoFormPcakge label="备注" ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
|
|
|
|
|
|
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark" ref="remarkRef" :formConfig="remarkConig" |
|
|
|
|
|
:formData="formData" /> |
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- <button @click = "onSave">保存</button> --> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<!-- <button @click = "onSave">保存</button> --> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -33,11 +36,12 @@ import LineLabel from "@/components/Template/LineLabel"; |
|
|
import TableList from "@/components/Template/Table"; |
|
|
import TableList from "@/components/Template/Table"; |
|
|
import Step from "@/components/Template/Step"; |
|
|
import Step from "@/components/Template/Step"; |
|
|
import templateMixin from "../../mixins/templateMixin"; |
|
|
import templateMixin from "../../mixins/templateMixin"; |
|
|
|
|
|
|
|
|
|
|
|
import CustomTable from '@/components/Template/CustomTable.vue'; |
|
|
|
|
|
import { getLatestSn } from '@/api/template'; |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "SWYPFXRYPZB", |
|
|
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step }, |
|
|
|
|
|
|
|
|
name: "SWYPFXCBYPZB", |
|
|
|
|
|
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable }, |
|
|
mixins: [templateMixin], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
fillType: { |
|
|
fillType: { |
|
|
@ -52,10 +56,10 @@ export default { |
|
|
type: "conditionItem", |
|
|
type: "conditionItem", |
|
|
config: { |
|
|
config: { |
|
|
storageCondition: { |
|
|
storageCondition: { |
|
|
label: "存储条件", |
|
|
|
|
|
|
|
|
label: 'template.common.storageConditionLabel', |
|
|
type: "select", |
|
|
type: "select", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
options: this.getDictOptions('business_cctj'), |
|
|
|
|
|
|
|
|
options: this.getDictOptions("business_cctj"), |
|
|
otherCode: "storageConditionOther", |
|
|
otherCode: "storageConditionOther", |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -73,7 +77,7 @@ export default { |
|
|
type: "textarea", |
|
|
type: "textarea", |
|
|
fillType: "actFill", |
|
|
fillType: "actFill", |
|
|
span: 1, |
|
|
span: 1, |
|
|
placeholder: "请输入备注", |
|
|
|
|
|
|
|
|
placeholder: 'template.common.remarkPlaceholder', |
|
|
maxlength: 1000, |
|
|
maxlength: 1000, |
|
|
rows: 5 |
|
|
rows: 5 |
|
|
} |
|
|
} |
|
|
@ -81,40 +85,43 @@ export default { |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
baseInfoFormConfig() { |
|
|
baseInfoFormConfig() { |
|
|
return [ |
|
|
return [ |
|
|
{ |
|
|
{ |
|
|
type: "cardItem", |
|
|
type: "cardItem", |
|
|
config: { |
|
|
config: { |
|
|
studyMc: { |
|
|
studyMc: { |
|
|
label: "试验名称", |
|
|
|
|
|
|
|
|
label: 'template.common.testName', |
|
|
type: "input", |
|
|
type: "input", |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
}, |
|
|
}, |
|
|
studySn: { |
|
|
studySn: { |
|
|
label: "试验编号", |
|
|
|
|
|
|
|
|
label: 'template.common.testNumber', |
|
|
type: "input", |
|
|
type: "input", |
|
|
disabled: true, |
|
|
disabled: true, |
|
|
}, |
|
|
}, |
|
|
methodCode: { |
|
|
methodCode: { |
|
|
label: "方法编号", |
|
|
|
|
|
|
|
|
label: 'template.common.methodCode', |
|
|
type: "input", |
|
|
type: "input", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
|
|
|
maxlength: 50 |
|
|
}, |
|
|
}, |
|
|
versionNum: { |
|
|
versionNum: { |
|
|
label: "版本号", |
|
|
|
|
|
|
|
|
label: 'template.common.versionNumber', |
|
|
type: "input", |
|
|
type: "input", |
|
|
fillType: "actFill" |
|
|
|
|
|
|
|
|
fillType: "actFill", |
|
|
|
|
|
maxlength: 50 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: "conditionItem", |
|
|
type: "conditionItem", |
|
|
label: "试验配制条件", |
|
|
|
|
|
|
|
|
label: 'template.common.testConfigurationConditions', |
|
|
config: { |
|
|
config: { |
|
|
pre: { |
|
|
pre: { |
|
|
label: "预填", |
|
|
|
|
|
|
|
|
label: 'template.common.preFill', |
|
|
type: "select", |
|
|
type: "select", |
|
|
multiple: true, |
|
|
multiple: true, |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
@ -122,25 +129,25 @@ export default { |
|
|
otherCode: "preOther", |
|
|
otherCode: "preOther", |
|
|
}, |
|
|
}, |
|
|
act: { |
|
|
act: { |
|
|
label: "实际", |
|
|
|
|
|
|
|
|
label: 'template.common.actualFill', |
|
|
type: "select", |
|
|
type: "select", |
|
|
fillType: "actFill", |
|
|
fillType: "actFill", |
|
|
otherCode: "actOther", |
|
|
otherCode: "actOther", |
|
|
multiple: true, |
|
|
multiple: true, |
|
|
options: this.getDictOptions('business_pztj'), |
|
|
|
|
|
|
|
|
options: this.getDictOptions('business_pztj') |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
type: "cellItem", |
|
|
type: "cellItem", |
|
|
label: "配置时间", |
|
|
|
|
|
|
|
|
label: 'template.common.configurationTime', |
|
|
config: { |
|
|
config: { |
|
|
startDate: { |
|
|
startDate: { |
|
|
label: "开始时间", |
|
|
|
|
|
|
|
|
label: 'template.common.startTime', |
|
|
type: "input", |
|
|
type: "input", |
|
|
}, |
|
|
}, |
|
|
endDate: { |
|
|
endDate: { |
|
|
label: "结束时间", |
|
|
|
|
|
|
|
|
label: 'template.common.endTime', |
|
|
type: "input", |
|
|
type: "input", |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
@ -153,63 +160,72 @@ export default { |
|
|
type: "step", |
|
|
type: "step", |
|
|
config: { |
|
|
config: { |
|
|
targetName: { |
|
|
targetName: { |
|
|
label: "目标溶液名称", |
|
|
|
|
|
|
|
|
label: 'template.common.targetSolutionName', |
|
|
type: "input", |
|
|
type: "input", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
|
|
|
maxlength: 50 |
|
|
}, |
|
|
}, |
|
|
targetCode: { |
|
|
targetCode: { |
|
|
label: "目标溶液编号", |
|
|
|
|
|
|
|
|
label: 'template.common.targetSolutionCode', |
|
|
type: "input", |
|
|
type: "input", |
|
|
subType: "span", |
|
|
subType: "span", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
subKey: "targetCode1", |
|
|
|
|
|
|
|
|
subKey: "targetCodeSn", |
|
|
|
|
|
maxlength: 20 |
|
|
}, |
|
|
}, |
|
|
targetPreConcentration: { |
|
|
targetPreConcentration: { |
|
|
label: "目标溶液预计浓度", |
|
|
|
|
|
type: "input", |
|
|
|
|
|
|
|
|
label: 'template.common.targetPreConcentration', |
|
|
|
|
|
type: "inputNumber", |
|
|
subType: "select", |
|
|
subType: "select", |
|
|
subKey: "targetPreConcentrationUnit", |
|
|
subKey: "targetPreConcentrationUnit", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
subOptions: this.getDictOptions('business_nddw'), |
|
|
subOptions: this.getDictOptions('business_nddw'), |
|
|
|
|
|
maxlength: 10 |
|
|
}, |
|
|
}, |
|
|
targetActConcentration: { |
|
|
targetActConcentration: { |
|
|
label: "目标溶液实际浓度", |
|
|
|
|
|
type: "input", |
|
|
|
|
|
|
|
|
label: 'template.common.targetActConcentration', |
|
|
|
|
|
type: "inputNumber", |
|
|
subType: "select", |
|
|
subType: "select", |
|
|
subKey: "targetActConcentrationUnit", |
|
|
subKey: "targetActConcentrationUnit", |
|
|
|
|
|
compareTo: "targetPreConcentration",//与哪个字段比较 |
|
|
fillType: "actFill", |
|
|
fillType: "actFill", |
|
|
subFillType: "preFill", |
|
|
subFillType: "preFill", |
|
|
subOptions: this.getDictOptions('business_nddw'), |
|
|
subOptions: this.getDictOptions('business_nddw'), |
|
|
copyFrom: "targetPreConcentration",//复制哪个字段 |
|
|
copyFrom: "targetPreConcentration",//复制哪个字段 |
|
|
|
|
|
maxlength: 10 |
|
|
}, |
|
|
}, |
|
|
targetPreVolume: { |
|
|
targetPreVolume: { |
|
|
label: "目标溶液预计体积", |
|
|
|
|
|
type: "input", |
|
|
|
|
|
|
|
|
label: 'template.common.targetPreVolume', |
|
|
|
|
|
type: "inputNumber", |
|
|
subType: "select", |
|
|
subType: "select", |
|
|
subKey: "targetPreVolumeUnit", |
|
|
subKey: "targetPreVolumeUnit", |
|
|
subOptions: this.getDictOptions('business_tjdw'), |
|
|
subOptions: this.getDictOptions('business_tjdw'), |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
|
|
|
maxlength: 10 |
|
|
}, |
|
|
}, |
|
|
targetActVolume: { |
|
|
targetActVolume: { |
|
|
label: "目标溶液实际体积", |
|
|
|
|
|
type: "input", |
|
|
|
|
|
|
|
|
label: 'template.common.targetActVolume', |
|
|
|
|
|
type: "inputNumber", |
|
|
subType: "select", |
|
|
subType: "select", |
|
|
subKey: "targetActVolumeUnit", |
|
|
subKey: "targetActVolumeUnit", |
|
|
fillType: "actFill", |
|
|
fillType: "actFill", |
|
|
subFillType: "preFill", |
|
|
subFillType: "preFill", |
|
|
subOptions: this.getDictOptions('business_tjdw'), |
|
|
subOptions: this.getDictOptions('business_tjdw'), |
|
|
|
|
|
compareTo: "targetPreVolume",//与哪个字段比较 |
|
|
copyFrom: "targetPreVolume",//复制哪个字段 |
|
|
copyFrom: "targetPreVolume",//复制哪个字段 |
|
|
|
|
|
maxlength: 10 |
|
|
}, |
|
|
}, |
|
|
effectivePeriod: { |
|
|
effectivePeriod: { |
|
|
label: "有效周期", |
|
|
|
|
|
type: "input", |
|
|
|
|
|
|
|
|
label: 'template.common.effectivePeriod', |
|
|
|
|
|
type: "inputNumber", |
|
|
subType: "select", |
|
|
subType: "select", |
|
|
subKey: "effectivePeriodUnit", |
|
|
subKey: "effectivePeriodUnit", |
|
|
fillType: "preFill", |
|
|
fillType: "preFill", |
|
|
subOptions: this.getDictOptions('business_yxqdw'), |
|
|
subOptions: this.getDictOptions('business_yxqdw'), |
|
|
|
|
|
maxlength: 10 |
|
|
}, |
|
|
}, |
|
|
expireDate: { |
|
|
expireDate: { |
|
|
label: "失效日", |
|
|
|
|
|
|
|
|
label: 'template.common.expireDate', |
|
|
type: "input", |
|
|
type: "input", |
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
@ -219,37 +235,84 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
dataSource: [], |
|
|
|
|
|
|
|
|
resource: [], |
|
|
|
|
|
resourceData1: [], |
|
|
sysjColumns: [ |
|
|
sysjColumns: [ |
|
|
{ label: "试剂名称", prop: "reagentName" }, |
|
|
|
|
|
{ label: "编号", prop: "reagentCode" }, |
|
|
|
|
|
{ label: "批号", prop: "reagentNo" }, |
|
|
|
|
|
{ label: "浓度/含量/纯度", prop: "concentration" }, |
|
|
|
|
|
{ label: "来源", prop: "source" }, |
|
|
|
|
|
{ label: "失效日", prop: "expireDate" }, |
|
|
|
|
|
|
|
|
{ label: 'template.common.reagentName', prop: "mc" },//名称 |
|
|
|
|
|
{ label: 'template.common.reagentCode', prop: "bh" },//编号 |
|
|
|
|
|
{ label: 'template.common.reagentNo', prop: "ph" },//批号 试剂,供试品才有 |
|
|
|
|
|
{ label: 'template.common.concentration', prop: "nd" },//浓度 |
|
|
|
|
|
{ label: 'template.common.source', prop: "source" },//来源 |
|
|
|
|
|
{ label: 'template.common.reagentExpireDate', prop: "sxrq" },//失效日期 |
|
|
], |
|
|
], |
|
|
yqsColumns: [ |
|
|
yqsColumns: [ |
|
|
{ label: "仪器名称", prop: "instrumentName" }, |
|
|
|
|
|
{ label: "仪器型号", prop: "instrumentModel" }, |
|
|
|
|
|
{ label: "仪器编号", prop: "instrumentCode" }, |
|
|
|
|
|
{ label: "下次测试/校准/检定日期", prop: "nextTestDate" }, |
|
|
|
|
|
|
|
|
{ label: 'template.common.instrumentName', prop: "instrumentName" }, |
|
|
|
|
|
{ label: 'template.common.instrumentModel', prop: "instrumentModel" }, |
|
|
|
|
|
{ label: 'template.common.instrumentCode', prop: "instrumentCode" }, |
|
|
|
|
|
{ label: 'template.common.nextTestDate', prop: "nextTestDate" }, |
|
|
], |
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
formData: {} |
|
|
formData: {} |
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
formData: { |
|
|
|
|
|
immediate: true, |
|
|
|
|
|
handler(v) { |
|
|
|
|
|
if(!v.targetCodeSn && this.fillType === "actFill"){ |
|
|
|
|
|
this.getCode(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
//获取目标溶液编号 |
|
|
|
|
|
async getCode(){ |
|
|
|
|
|
const result = await getLatestSn({ |
|
|
|
|
|
count: 1, |
|
|
|
|
|
}) |
|
|
|
|
|
if(result.code == 200){ |
|
|
|
|
|
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
//获取已填写的表单数据 |
|
|
|
|
|
getFilledFormData(){ |
|
|
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]) |
|
|
|
|
|
}, |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
return await this.validFormFields(["baseInfoRef", "storageConditionRef","stepFormPackageRef","stepRef","remarkRef"]); |
|
|
|
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]); |
|
|
|
|
|
//生成resource |
|
|
|
|
|
let tmpResource = [] |
|
|
|
|
|
//配置的试剂 |
|
|
|
|
|
tmpResource.push({ |
|
|
|
|
|
mc: content.targetName, |
|
|
|
|
|
bh: content.targetCode+content.targetCodeSn, |
|
|
|
|
|
ph: '', |
|
|
|
|
|
nd: content.targetActConcentration + content.targetActConcentrationUnit, |
|
|
|
|
|
source: 'ELN配制', |
|
|
|
|
|
sxrq: content.expireDate, |
|
|
|
|
|
ndz: content.targetActConcentration, |
|
|
|
|
|
nddw: content.targetActConcentrationUnit, |
|
|
|
|
|
kc: content.targetActVolume, |
|
|
|
|
|
kcdw: content.targetActVolumeUnit, |
|
|
|
|
|
syl: null, |
|
|
|
|
|
syldw:content.targetActVolumeUnit, |
|
|
|
|
|
yxzq:content.effectivePeriod, |
|
|
|
|
|
yxzqdw:content.effectivePeriodUnit, |
|
|
|
|
|
}) |
|
|
|
|
|
//使用的试剂 |
|
|
|
|
|
this.resource=tmpResource |
|
|
|
|
|
|
|
|
|
|
|
return content; |
|
|
}, |
|
|
}, |
|
|
async onSave() { |
|
|
async onSave() { |
|
|
const formData = await this.getFormData(); |
|
|
|
|
|
|
|
|
const formData = await this.getFilledFormData(); |
|
|
|
|
|
|
|
|
console.log(formData, "formData") |
|
|
console.log(formData, "formData") |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|