diff --git a/src/lang/en/template/lba.js b/src/lang/en/template/lba.js index 8f2b7e7..8f775b7 100644 --- a/src/lang/en/template/lba.js +++ b/src/lang/en/template/lba.js @@ -5,5 +5,9 @@ export default { cztj: 'Work Condition', czsj: 'Work Time', jcbmc: 'Analysis Plate Name' + }, + lba003: { + jclc: 'Testing Process', + fj: 'Attachment' } } diff --git a/src/lang/en/template/sp.js b/src/lang/en/template/sp.js index f629f76..31a22ae 100644 --- a/src/lang/en/template/sp.js +++ b/src/lang/en/template/sp.js @@ -1,66 +1,64 @@ //色谱 export default { // 生物样品分析溶液配制表 - sp001:{ - - }, + sp001: {}, // 生物样品分析储备液配制表 - sp002:{ - - }, + sp002: {}, // 生物样品标曲工作液制备表 - sp003:{ + sp003: { rqcz: 'Container Material', - cctj:'Storage Condition', - qsyry:'Source Solution', - ysqsyrynd:'Expected Concentration of Source Solution', - sjqsyrynd:'Actual Concentration of Source Solution', - xsy:'Diluent', - qsbhstd:'STD Starting Number', - mbryyxzq:'Validity Period of Target Solution', - mbrysxr:'Expiration Date of Target Solution', - mbrybh:'Target Solution ID', - qsrybh:'Source Solution ID', - ysqsrytj:'Expected Volume of Source Solution', - sjqsrytj:'Actual Source Solution Volume', - ysxsytj:'Expected Volume of Diluent', - sjxsytj:'Actual Volume of Diluent', - ysmbrynd:'Expected Concentration of Target Solution', - sjmbrynd:'Actual Concentration of Target Solution', - ysmbrytj:'Expected Volume of Target Solution', - sjmbrytj:'Actual Volume of Target Solution', + cctj: 'Storage Condition', + qsyry: 'Source Solution', + ysqsyrynd: 'Expected Concentration of Source Solution', + sjqsyrynd: 'Actual Concentration of Source Solution', + xsy: 'Diluent', + qsbhstd: 'STD Starting Number', + mbryyxzq: 'Validity Period of Target Solution', + mbrysxr: 'Expiration Date of Target Solution', + mbrybh: 'Target Solution ID', + qsrybh: 'Source Solution ID', + ysqsrytj: 'Expected Volume of Source Solution', + sjqsrytj: 'Actual Source Solution Volume', + ysxsytj: 'Expected Volume of Diluent', + sjxsytj: 'Actual Volume of Diluent', + ysmbrynd: 'Expected Concentration of Target Solution', + sjmbrynd: 'Actual Concentration of Target Solution', + ysmbrytj: 'Expected Volume of Target Solution', + sjmbrytj: 'Actual Volume of Target Solution' }, - // 生物样品内标工作液制备表 - sp00456:{ - mbrybh:'Target Solution ID', - qsrybh:'Source Solution ID', - ysqsrytj:'Expected Volume of Source Solution', - sjqsrytj:'Actual Source Solution Volume', - ysxsytj:'Expected Volume of Diluent', - sjxsytj:'Actual Volume of Diluent', - ysmbrynd:'Expected Concentration of Target Solution', - sjmbrynd:'Actual Concentration of Target Solution', - ysmbrytj:'Expected Volume of Target Solution', - sjmbrytj:'Actual Volume of Target Solution', - mbryyxzq:'Validity Period of Target Solution', - mbrysxr:'Expiration Date of Target Solution', - ysysrybh:'预设原始溶液编号', - sjysrybh:'实际原始溶液编号', - ysysrynd:'预设原始溶液浓度', - sjysrynd:'实际原始溶液浓度', - ysysrytj:'预设原始溶液体积', - sjysrytj:'实际原始溶液体积', - yjxsytj:'Expected Volume of Diluent', - sjxsytj:'Actual Volume of Diluent', - qsyry:'Source Solution', - ysqsyrynd:'Expected Concentration of Source Solution', - sjqsyrynd:'Actual Concentration of Source Solution', - xsy:'Diluent', + // 生物样品内标工作液制备表 + sp00456: { + mbrybh: 'Target Solution ID', + qsrybh: 'Source Solution ID', + ysqsrytj: 'Expected Volume of Source Solution', + sjqsrytj: 'Actual Source Solution Volume', + ysxsytj: 'Expected Volume of Diluent', + sjxsytj: 'Actual Volume of Diluent', + ysmbrynd: 'Expected Concentration of Target Solution', + sjmbrynd: 'Actual Concentration of Target Solution', + ysmbrytj: 'Expected Volume of Target Solution', + sjmbrytj: 'Actual Volume of Target Solution', + mbryyxzq: 'Validity Period of Target Solution', + mbrysxr: 'Expiration Date of Target Solution', + ysysrybh: '预设原始溶液编号', + sjysrybh: '实际原始溶液编号', + ysysrynd: '预设原始溶液浓度', + sjysrynd: '实际原始溶液浓度', + ysysrytj: '预设原始溶液体积', + sjysrytj: '实际原始溶液体积', + yjxsytj: 'Expected Volume of Diluent', + sjxsytj: 'Actual Volume of Diluent', + qsyry: 'Source Solution', + ysqsyrynd: 'Expected Concentration of Source Solution', + sjqsyrynd: 'Actual Concentration of Source Solution', + xsy: 'Diluent', rqcz: 'Container Material', - cctj:'Storage Condition', + cctj: 'Storage Condition' }, - sp007:{ + sp007: { title: '生物样品分析样本处理表', + ybsm: 'Sample Description', + bt: 'Title' }, // 生物样品分析方法学样品制备表-准确度与精密度 sp008: { diff --git a/src/lang/zh/template/lba.js b/src/lang/zh/template/lba.js index 1e220c6..191723f 100644 --- a/src/lang/zh/template/lba.js +++ b/src/lang/zh/template/lba.js @@ -5,5 +5,9 @@ export default { cztj: '操作条件', czsj: '操作时间', jcbmc: '检测板名称' + }, + lba003: { + jclc: '检测流程', + fj: '附件' } } diff --git a/src/lang/zh/template/sp.js b/src/lang/zh/template/sp.js index e503ecc..0812b65 100644 --- a/src/lang/zh/template/sp.js +++ b/src/lang/zh/template/sp.js @@ -1,66 +1,64 @@ //色谱 export default { // 生物样品分析溶液配制表 - sp001:{ - - }, + sp001: {}, // 生物样品分析储备液配制表 - sp002:{ - - }, + sp002: {}, // 生物样品标曲工作液制备表 - sp003:{ + sp003: { rqcz: '容器材质', - cctj:'存储条件', - qsyry:'起始源溶液', - ysqsyrynd:'预设起始源溶液浓度', - sjqsyrynd:'实际起始源溶液浓度', - xsy:'稀释液', - qsbhstd:'起始编号STD', - mbryyxzq:'目标溶液有效周期', - mbrysxr:'目标溶液失效日', - mbrybh:'目标溶液编号', - qsrybh:'起始溶液编号', - ysqsrytj:'预设起始溶液体积', - sjqsrytj:'实际起始溶液体积', - ysxsytj:'预设稀释液体积', - sjxsytj:'实际稀释液体积', - ysmbrynd:'预设目标溶液浓度', - sjmbrynd:'实际目标溶液浓度', - ysmbrytj:'预设目标溶液体积', - sjmbrytj:'实际目标溶液体积', + cctj: '存储条件', + qsyry: '起始源溶液', + ysqsyrynd: '预设起始源溶液浓度', + sjqsyrynd: '实际起始源溶液浓度', + xsy: '稀释液', + qsbhstd: '起始编号STD', + mbryyxzq: '目标溶液有效周期', + mbrysxr: '目标溶液失效日', + mbrybh: '目标溶液编号', + qsrybh: '起始溶液编号', + ysqsrytj: '预设起始溶液体积', + sjqsrytj: '实际起始溶液体积', + ysxsytj: '预设稀释液体积', + sjxsytj: '实际稀释液体积', + ysmbrynd: '预设目标溶液浓度', + sjmbrynd: '实际目标溶液浓度', + ysmbrytj: '预设目标溶液体积', + sjmbrytj: '实际目标溶液体积' }, // 生物样品内标工作液制备表 - sp00456:{ - mbrybh:'目标溶液编号', - qsrybh:'起始溶液编号', - ysqsrytj:'预设起始溶液体积', - sjqsrytj:'实际起始溶液体积', - ysxsytj:'预设稀释液体积', - sjxsytj:'实际稀释液体积', - ysmbrynd:'预设目标溶液浓度', - sjmbrynd:'实际目标溶液浓度', - ysmbrytj:'预设目标溶液体积', - sjmbrytj:'实际目标溶液体积', - mbryyxzq:'目标溶液有效周期', - mbrysxr:'目标溶液失效日', - ysysrybh:'预设原始溶液编号', - sjysrybh:'实际原始溶液编号', - ysysrynd:'预设原始溶液浓度', - sjysrynd:'实际原始溶液浓度', - ysysrytj:'预设原始溶液体积', - sjysrytj:'实际原始溶液体积', - yjxsytj:'预计稀释液体积', - sjxsytj:'实际稀释液体积', - qsyry:'起始源溶液', - ysqsyrynd:'预设起始源溶液浓度', - sjqsyrynd:'实际起始源溶液浓度', - xsy:'稀释液', + sp00456: { + mbrybh: '目标溶液编号', + qsrybh: '起始溶液编号', + ysqsrytj: '预设起始溶液体积', + sjqsrytj: '实际起始溶液体积', + ysxsytj: '预设稀释液体积', + sjxsytj: '实际稀释液体积', + ysmbrynd: '预设目标溶液浓度', + sjmbrynd: '实际目标溶液浓度', + ysmbrytj: '预设目标溶液体积', + sjmbrytj: '实际目标溶液体积', + mbryyxzq: '目标溶液有效周期', + mbrysxr: '目标溶液失效日', + ysysrybh: '预设原始溶液编号', + sjysrybh: '实际原始溶液编号', + ysysrynd: '预设原始溶液浓度', + sjysrynd: '实际原始溶液浓度', + ysysrytj: '预设原始溶液体积', + sjysrytj: '实际原始溶液体积', + yjxsytj: '预计稀释液体积', + sjxsytj: '实际稀释液体积', + qsyry: '起始源溶液', + ysqsyrynd: '预设起始源溶液浓度', + sjqsyrynd: '实际起始源溶液浓度', + xsy: '稀释液', rqcz: '容器材质', - cctj:'存储条件', + cctj: '存储条件' }, - sp007:{ + sp007: { title: '生物样品分析样本处理表', + ybsm: '样本说明', + bt: '标题' }, // 生物样品分析方法学样品制备表-准确度与精密度 sp008: { diff --git a/src/views/business/comps/template/comps/lba/LBA003.vue b/src/views/business/comps/template/comps/lba/LBA003.vue index b75bddf..3ef94b7 100644 --- a/src/views/business/comps/template/comps/lba/LBA003.vue +++ b/src/views/business/comps/template/comps/lba/LBA003.vue @@ -2,8 +2,7 @@ - {{ formData.bdmc || - $t('template.sp.sp007.title') }} + {{ formData.bdmc }} - - - + + + + - - - 保存 + @@ -36,16 +31,13 @@ import LineLabel from "@/components/Template/LineLabel"; import TableList from "@/components/Template/Table"; import Step from "@/components/Template/Step"; import templateMixin from "../../mixins/templateMixin"; -import CustomTable from '@/components/Template/CustomTable.vue'; -import { getLatestSn } from '@/api/template'; import { EventBus } from "@/utils/eventBus"; import { uniqeResource } from "@/utils/calUnitTools"; import { debounce } from 'lodash-es'; -import {getBaseInfoFormConfig, getRemarkFormConfig,getStorageFormConfig,getYbFormConfig,getfjFormConfig} from "../../formConfig/sp/SP007"; export default { name: "LBA003", - components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable }, + components: { BaseInfoFormPackage, LineLabel, TableList, Step }, mixins: [templateMixin], props: { fillType: { @@ -54,25 +46,109 @@ export default { }, }, computed: { - // 配置条件 - storageFormConfig() { - return getStorageFormConfig(this); - }, // 备注表单配置 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() { - 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() { - return getfjFormConfig(this); + return [ + { + type: "attachment", + config: { + attTitle: { + label: 'template.lba.lba003.fj', + type: "attachment", + fillType: "preFill", + }, + } + } + ] }, }, @@ -84,27 +160,21 @@ export default { mounted() { }, methods: { - //打印标签 - printTag() { - const printConfig = this.getBasePrintConfig(); - const { storageCondition, targetCodeSn } = this.formData; - printConfig["存储条件"] = storageCondition; - printConfig["编号"] = targetCodeSn; - - EventBus.$emit('showTagPrintDialog', { printConfig }) - }, - //获取已填写的表单数据 getFilledFormData() { - return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "ybRef","stepRef", "remarkRef","fjRef"]) + return this.getFilledFormDataByRefs(["baseInfoRef","stepRef", "remarkRef","fjRef"]) }, //获取填写完成的表单数据 async getFormData() { - let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "ybRef","stepRef", "remarkRef","fjRef"]); + let content = await this.validFormFields(["baseInfoRef","stepRef", "remarkRef","fjRef"]); return content; }, getResource() { let content = this.getFilledFormData(); + //使用的试剂、仪器 + const stepResource = this.$refs.stepRef.getStepResource() + this.resourceTmp = stepResource.sjResource || [] + this.yqResourceTmp = stepResource.yqResource || [] return this.resourceTmp; }, //保存 diff --git a/src/views/business/comps/template/comps/sp/SP007.vue b/src/views/business/comps/template/comps/sp/SP007.vue index ded75d0..6f8d673 100644 --- a/src/views/business/comps/template/comps/sp/SP007.vue +++ b/src/views/business/comps/template/comps/sp/SP007.vue @@ -14,13 +14,13 @@ - - @@ -105,6 +105,10 @@ export default { }, getResource() { let content = this.getFilledFormData(); + //使用的试剂、仪器 + const stepResource = this.$refs.stepRef.getStepResource() + this.resourceTmp = stepResource.sjResource || [] + this.yqResourceTmp = stepResource.yqResource || [] return this.resourceTmp; }, //保存 diff --git a/src/views/business/comps/template/formConfig/sp/SP007.js b/src/views/business/comps/template/formConfig/sp/SP007.js index f2d649b..116f0ba 100644 --- a/src/views/business/comps/template/formConfig/sp/SP007.js +++ b/src/views/business/comps/template/formConfig/sp/SP007.js @@ -1,160 +1,159 @@ export const 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 - }, - clpbh: { - label: '处理批编号', - type: "input", - fillType: "actFill", - maxlength: 50 - }, - - } + 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 }, - { - type: "conditionItem", - label: 'template.common.testConfigurationConditions', - 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') - } - } + versionNum: { + label: 'template.common.versionNumber', + type: 'inputNumber', + fillType: 'actFill', + prepend: 'V', + maxlength: 50 + }, + clpbh: { + label: 'template.sp.sp008.clpbh', + type: 'input', + fillType: 'actFill', + maxlength: 50 + } + } + }, + { + type: 'conditionItem', + label: 'template.common.testConfigurationConditions', + config: { + pre: { + label: 'template.common.preFill', + type: 'select', + multiple: true, + fillType: 'preFill', + options: $this.getDictOptions('business_pztj'), + otherCode: 'preOther' }, - { - type: "cellItem", - config: { - containerMaterial: { - label: "template.sp.sp003.rqcz", - type: "select", - options: $this.getDictOptions('business_rqcz'), - fillType: "actFill", - otherCode: "containerMaterialOther", - } - } + act: { + label: 'template.common.actualFill', + type: 'select', + fillType: 'actFill', + otherCode: 'actOther', + multiple: true, + compareTo: 'pre', + options: $this.getDictOptions('business_pztj') + } + } + }, + { + type: 'cellItem', + config: { + containerMaterial: { + label: 'template.sp.sp003.rqcz', + type: 'select', + options: $this.getDictOptions('business_rqcz'), + fillType: 'actFill', + otherCode: 'containerMaterialOther' + } + } + }, + { + type: 'cellItem', + label: 'template.sp.sp008.clsj', + config: { + startDate: { + label: 'template.common.startTime', + type: 'input' }, - { - type: "cellItem", - label: 'template.sp.sp008.clsj', - config: { - startDate: { - label: 'template.common.startTime', - type: "input", - }, - endDate: { - label: 'template.common.endTime', - type: "input", - }, - } + endDate: { + label: 'template.common.endTime', + type: 'input' } - ] + } + } + ] } //备注 export const getRemarkFormConfig = () => { - return [ - { - type: "cellItem", - config: { - remark: { - label: "", - type: "textarea", - fillType: "actFill", - span: 1, - placeholder: 'template.common.remarkPlaceholder', - maxlength: 1000, - rows: 5 - } - } + return [ + { + type: 'cellItem', + config: { + remark: { + label: '', + type: 'textarea', + fillType: 'actFill', + span: 1, + placeholder: 'template.common.remarkPlaceholder', + maxlength: 1000, + rows: 5 } - ] + } + } + ] } //样本说明 export const getYbFormConfig = () => { - return [ - { - type: "cellItem", - config: { - remark: { - label: "", - type: "textarea", - fillType: "actFill", - span: 1, - placeholder: '样本说明', - maxlength: 1000, - rows: 5 - } - } + return [ + { + type: 'cellItem', + config: { + remark: { + label: '', + type: 'textarea', + fillType: 'actFill', + span: 1, + placeholder: 'template.sp.sp007.ybsm', + maxlength: 1000, + rows: 5 } - ] + } + } + ] } //存储条件 export const getStorageFormConfig = ($this) => { - return [ - { - type: "conditionItem", - config: { - storageCondition: { - label: 'template.common.storageConditionLabel', - type: "select", - fillType: "preFill", - options: $this.getDictOptions("business_cctj"), - otherCode: "storageConditionOther", - }, - } - } - ] + return [ + { + type: 'conditionItem', + config: { + storageCondition: { + label: 'template.common.storageConditionLabel', + type: 'select', + fillType: 'preFill', + options: $this.getDictOptions('business_cctj'), + otherCode: 'storageConditionOther' + } + } + } + ] } //存储条件 export const getfjFormConfig = () => { - return [ - { - type: "attachment", - config: { - attTitle: { - label: '标题', - type: "attachment", - fillType: "preFill", - }, - } - } - ] -} \ No newline at end of file + return [ + { + type: 'attachment', + config: { + attTitle: { + label: 'template.sp.sp007.bt', + type: 'attachment', + fillType: 'preFill' + } + } + } + ] +}