|
|
@ -2,8 +2,7 @@ |
|
|
<template> |
|
|
<template> |
|
|
<div> |
|
|
<div> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-container"> |
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc || |
|
|
|
|
|
$t('template.sp.sp007.title') }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
|
|
|
|
|
|
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc }}<img src="@/assets/images/detail-title.png" /></div> |
|
|
<div class="detail-content"> |
|
|
<div class="detail-content"> |
|
|
<div class="content"> |
|
|
<div class="content"> |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.baseInfo" label="template.common.baseInfo" |
|
|
@ -11,22 +10,18 @@ |
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" v-if="resourceWz.length>0"/> |
|
|
<TableList label="template.common.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" v-if="resourceWz.length>0"/> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" /> |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition" |
|
|
|
|
|
label="template.common.storageCondition" ref="storageConditionRef" |
|
|
|
|
|
:formConfig="storageFormConfig" :formData="formData" /> |
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="样本说明" label="样本说明" |
|
|
|
|
|
ref="ybRef" :formConfig="ybFormConfig" :formData="formData" /> |
|
|
|
|
|
<LineLabel label="template.common.operationSteps" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<LineLabel label="template.lba.lba003.jclc" /> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
<Step ref="stepRef" :formData="formData.stepData"></Step> |
|
|
|
|
|
<BaseInfoFormPackage fieldItemLabel="template.lba.lba003.fj" label="template.lba.lba003.fj" |
|
|
|
|
|
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" /> |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark" |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
ref="remarkRef" :formConfig="remarkConig" :formData="formData" /> |
|
|
<BaseInfoFormPackage fieldItemLabel="附件" label="附件" |
|
|
|
|
|
ref="fjRef" :formConfig="getFjFormConfig" :formData="formData" /> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<button @click="onSave">保存</button> |
|
|
|
|
|
|
|
|
<!-- <button @click="onSave">保存</button> --> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -36,16 +31,13 @@ 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'; |
|
|
|
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
import { uniqeResource } from "@/utils/calUnitTools"; |
|
|
import { uniqeResource } from "@/utils/calUnitTools"; |
|
|
import { debounce } from 'lodash-es'; |
|
|
import { debounce } from 'lodash-es'; |
|
|
import {getBaseInfoFormConfig, getRemarkFormConfig,getStorageFormConfig,getYbFormConfig,getfjFormConfig} from "../../formConfig/sp/SP007"; |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "LBA003", |
|
|
name: "LBA003", |
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable }, |
|
|
|
|
|
|
|
|
components: { BaseInfoFormPackage, LineLabel, TableList, Step }, |
|
|
mixins: [templateMixin], |
|
|
mixins: [templateMixin], |
|
|
props: { |
|
|
props: { |
|
|
fillType: { |
|
|
fillType: { |
|
|
@ -54,25 +46,109 @@ export default { |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
|
// 配置条件 |
|
|
|
|
|
storageFormConfig() { |
|
|
|
|
|
return getStorageFormConfig(this); |
|
|
|
|
|
}, |
|
|
|
|
|
// 备注表单配置 |
|
|
// 备注表单配置 |
|
|
remarkConig() { |
|
|
remarkConig() { |
|
|
return getRemarkFormConfig(); |
|
|
|
|
|
}, |
|
|
|
|
|
// 样本说明 |
|
|
|
|
|
ybFormConfig() { |
|
|
|
|
|
return getYbFormConfig(); |
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: "cellItem", |
|
|
|
|
|
config: { |
|
|
|
|
|
remark: { |
|
|
|
|
|
label: "", |
|
|
|
|
|
type: "textarea", |
|
|
|
|
|
fillType: "actFill", |
|
|
|
|
|
span: 1, |
|
|
|
|
|
placeholder: 'template.common.remarkPlaceholder', |
|
|
|
|
|
maxlength: 1000, |
|
|
|
|
|
rows: 5 |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 试验基本信息表单配置 |
|
|
// 试验基本信息表单配置 |
|
|
baseInfoFormConfig() { |
|
|
baseInfoFormConfig() { |
|
|
return getBaseInfoFormConfig(this); |
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: "cardItem", |
|
|
|
|
|
config: { |
|
|
|
|
|
studyMc: { |
|
|
|
|
|
label: 'template.common.testName', |
|
|
|
|
|
type: "input", |
|
|
|
|
|
disabled: true, |
|
|
|
|
|
}, |
|
|
|
|
|
studySn: { |
|
|
|
|
|
label: 'template.common.testNumber', |
|
|
|
|
|
type: "input", |
|
|
|
|
|
disabled: true, |
|
|
|
|
|
}, |
|
|
|
|
|
methodCode: { |
|
|
|
|
|
label: 'template.common.methodCode', |
|
|
|
|
|
type: "input", |
|
|
|
|
|
fillType: "preFill", |
|
|
|
|
|
maxlength: 50 |
|
|
|
|
|
}, |
|
|
|
|
|
versionNum: { |
|
|
|
|
|
label: 'template.common.versionNumber', |
|
|
|
|
|
type: "inputNumber", |
|
|
|
|
|
fillType: "actFill", |
|
|
|
|
|
prepend: "V", |
|
|
|
|
|
maxlength: 50 |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
type: "conditionItem", |
|
|
|
|
|
label: 'template.lba.lba002.cztj', |
|
|
|
|
|
config: { |
|
|
|
|
|
pre: { |
|
|
|
|
|
label: 'template.common.preFill', |
|
|
|
|
|
type: "select", |
|
|
|
|
|
multiple: true, |
|
|
|
|
|
fillType: "preFill", |
|
|
|
|
|
options: this.getDictOptions('business_pztj'), |
|
|
|
|
|
otherCode: "preOther", |
|
|
|
|
|
}, |
|
|
|
|
|
act: { |
|
|
|
|
|
label: 'template.common.actualFill', |
|
|
|
|
|
type: "select", |
|
|
|
|
|
fillType: "actFill", |
|
|
|
|
|
otherCode: "actOther", |
|
|
|
|
|
multiple: true, |
|
|
|
|
|
compareTo: "pre", |
|
|
|
|
|
options: this.getDictOptions('business_pztj') |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
type: "cellItem", |
|
|
|
|
|
label: 'template.lba.lba002.czsj', |
|
|
|
|
|
config: { |
|
|
|
|
|
startDate: { |
|
|
|
|
|
label: 'template.common.startTime', |
|
|
|
|
|
type: "input", |
|
|
|
|
|
}, |
|
|
|
|
|
endDate: { |
|
|
|
|
|
label: 'template.common.endTime', |
|
|
|
|
|
type: "input", |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
}, |
|
|
}, |
|
|
// 附件表单配置 |
|
|
// 附件表单配置 |
|
|
getFjFormConfig() { |
|
|
getFjFormConfig() { |
|
|
return getfjFormConfig(this); |
|
|
|
|
|
|
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
type: "attachment", |
|
|
|
|
|
config: { |
|
|
|
|
|
attTitle: { |
|
|
|
|
|
label: 'template.lba.lba003.fj', |
|
|
|
|
|
type: "attachment", |
|
|
|
|
|
fillType: "preFill", |
|
|
|
|
|
}, |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
@ -84,27 +160,21 @@ export default { |
|
|
mounted() { |
|
|
mounted() { |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
//打印标签 |
|
|
|
|
|
printTag() { |
|
|
|
|
|
const printConfig = this.getBasePrintConfig(); |
|
|
|
|
|
const { storageCondition, targetCodeSn } = this.formData; |
|
|
|
|
|
printConfig["存储条件"] = storageCondition; |
|
|
|
|
|
printConfig["编号"] = targetCodeSn; |
|
|
|
|
|
|
|
|
|
|
|
EventBus.$emit('showTagPrintDialog', { printConfig }) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取已填写的表单数据 |
|
|
//获取已填写的表单数据 |
|
|
getFilledFormData() { |
|
|
getFilledFormData() { |
|
|
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "ybRef","stepRef", "remarkRef","fjRef"]) |
|
|
|
|
|
|
|
|
return this.getFilledFormDataByRefs(["baseInfoRef","stepRef", "remarkRef","fjRef"]) |
|
|
}, |
|
|
}, |
|
|
//获取填写完成的表单数据 |
|
|
//获取填写完成的表单数据 |
|
|
async getFormData() { |
|
|
async getFormData() { |
|
|
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "ybRef","stepRef", "remarkRef","fjRef"]); |
|
|
|
|
|
|
|
|
let content = await this.validFormFields(["baseInfoRef","stepRef", "remarkRef","fjRef"]); |
|
|
return content; |
|
|
return content; |
|
|
}, |
|
|
}, |
|
|
getResource() { |
|
|
getResource() { |
|
|
let content = this.getFilledFormData(); |
|
|
let content = this.getFilledFormData(); |
|
|
|
|
|
//使用的试剂、仪器 |
|
|
|
|
|
const stepResource = this.$refs.stepRef.getStepResource() |
|
|
|
|
|
this.resourceTmp = stepResource.sjResource || [] |
|
|
|
|
|
this.yqResourceTmp = stepResource.yqResource || [] |
|
|
return this.resourceTmp; |
|
|
return this.resourceTmp; |
|
|
}, |
|
|
}, |
|
|
//保存 |
|
|
//保存 |
|
|
|