Browse Source

feat: [模板管理] PCR001用SP001

lkf
memorylkf 2 months ago
parent
commit
4948814271
8 changed files with 19 additions and 350 deletions
  1. +3
    -1
      src/lang/en/template/lba.js
  2. +3
    -8
      src/lang/en/template/pcr.js
  3. +3
    -1
      src/lang/en/template/yp.js
  4. +3
    -1
      src/lang/zh/template/lba.js
  5. +1
    -3
      src/lang/zh/template/pcr.js
  6. +3
    -1
      src/lang/zh/template/yp.js
  7. +3
    -3
      src/views/business/comps/template/TemplateTable.vue
  8. +0
    -332
      src/views/business/comps/template/comps/pcr/PCR001.vue

+ 3
- 1
src/lang/en/template/lba.js View File

@ -1,2 +1,4 @@
//LBA //LBA
export default {}
export default {
lba001: {} //用的SP001
}

+ 3
- 8
src/lang/en/template/pcr.js View File

@ -1,9 +1,7 @@
//PCR //PCR
export default { export default {
// PCR分析溶液配制记录表 // PCR分析溶液配制记录表
pcr001: {
title: 'PCR分析溶液配制记录表'
},
pcr001: {}, //用的SP001
// PCR分析工作液制备表 // PCR分析工作液制备表
pcr002: { pcr002: {
title: 'PCR分析工作液制备表', title: 'PCR分析工作液制备表',
@ -34,7 +32,7 @@ export default {
sjqsyrynd: 'Actual Concentration of Source Solution', sjqsyrynd: 'Actual Concentration of Source Solution',
xsy: 'Diluent', xsy: 'Diluent',
rqcz: 'Container Material', rqcz: 'Container Material',
cctj: 'Storage Condition',
cctj: 'Storage Condition'
}, },
// 生物样品标曲工作液制备表 // 生物样品标曲工作液制备表
sp003: { sp003: {
@ -44,10 +42,8 @@ export default {
qsyry: 'Source Solution', qsyry: 'Source Solution',
ysqsyrynd: 'Expected Concentration of Source Solution', ysqsyrynd: 'Expected Concentration of Source Solution',
qsbhstd: 'STD Starting Number', qsbhstd: 'STD Starting Number',
mbrybh: 'Target Solution ID', mbrybh: 'Target Solution ID',
qsrybh: 'Source Solution ID', qsrybh: 'Source Solution ID',
ysqsrytj: 'Expected Volume of Source Solution', ysqsrytj: 'Expected Volume of Source Solution',
@ -85,8 +81,7 @@ export default {
sjqsyrynd: 'Actual Concentration of Source Solution', sjqsyrynd: 'Actual Concentration of Source Solution',
xsy: 'Diluent', xsy: 'Diluent',
rqcz: 'Container Material',
rqcz: 'Container Material'
}, },
// 生物样品分析方法学样品制备表-准确度与精密度 // 生物样品分析方法学样品制备表-准确度与精密度
sp008: { sp008: {

+ 3
- 1
src/lang/en/template/yp.js View File

@ -1,2 +1,4 @@
//样品 //样品
export default {}
export default {
yp001: {} //用的SP001
}

+ 3
- 1
src/lang/zh/template/lba.js View File

@ -1,2 +1,4 @@
//LBA //LBA
export default {}
export default {
lba001: {} //用的SP001
}

+ 1
- 3
src/lang/zh/template/pcr.js View File

@ -1,9 +1,7 @@
//PCR //PCR
export default { export default {
// PCR分析溶液配制记录表 // PCR分析溶液配制记录表
pcr001: {
title: 'PCR分析溶液配制记录表'
},
pcr001: {}, //用的SP001
// PCR分析工作液制备表 // PCR分析工作液制备表
pcr002: { pcr002: {
title: 'PCR分析工作液制备表', title: 'PCR分析工作液制备表',

+ 3
- 1
src/lang/zh/template/yp.js View File

@ -1,2 +1,4 @@
//样品 //样品
export default {}
export default {
yp001: {} //用的SP001
}

+ 3
- 3
src/views/business/comps/template/TemplateTable.vue View File

@ -48,7 +48,7 @@ import MJYLQSQD from "./comps/gsp/MJYLQSQD.vue";
import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue"; import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue";
// PCR // PCR
import PCR001 from "./comps/pcr/PCR001.vue";
//PCR001-使SP001
import PCR002 from "./comps/pcr/PCR002.vue"; import PCR002 from "./comps/pcr/PCR002.vue";
//LBA //LBA
@ -65,7 +65,7 @@ export default {
// //
SP001, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018, SP001, SP003, SP00456,SP007, SP008, SP009, SP010, SP011, SP012, SP013, SP014, SP015, SP016, SP017, SP018,
// PCR // PCR
PCR001, PCR002
PCR002
}, },
props: { props: {
sn: { sn: {
@ -115,7 +115,7 @@ export default {
'MJYLQSQD': 'MJYLQSQD', 'MJYLQSQD': 'MJYLQSQD',
'DMYPPZJLB': 'DMYPPZJLB', 'DMYPPZJLB': 'DMYPPZJLB',
//PCR //PCR
'PCR001': 'PCR001',
'PCR001': 'SP001',
'PCR002': 'PCR002', 'PCR002': 'PCR002',
//LBA //LBA
'LBA001': 'SP001', 'LBA001': 'SP001',

+ 0
- 332
src/views/business/comps/template/comps/pcr/PCR001.vue View File

@ -1,332 +0,0 @@
<!-- PCR分析溶液配制记录表 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.pcr.pcr001.title') }}<img src="@/assets/images/detail-title.png" /></div>
<div class="detail-content">
<div class="content">
<BaseInfoFormPackage 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.wzInfo" :columns="sywzColumns" :dataSource="resourceWz" v-if="resourceWz.length>0"/>
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<BaseInfoFormPackage fieldItemLabel="template.common.storageCondition"
label="template.common.storageCondition" ref="storageConditionRef"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<el-button class="print-btn" v-if="fillType === 'actFill'" type="primary"
@click="printTag">标签打印</el-button>
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPackage fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
</div>
<!-- <button @click="onSave">保存</button> -->
</div>
</template>
<script>
import BaseInfoFormPackage from "@/components/Template/BaseInfoFormPackage";
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'
export default {
name: "PCR001",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
//
storageFormConfig() {
return [
{
type: "conditionItem",
config: {
storageCondition: {
label: 'template.common.storageConditionLabel',
type: "select",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
},
//
remarkConig() {
return [
{
type: "cellItem",
config: {
remark: {
label: "",
type: "textarea",
fillType: "actFill",
span: 1,
placeholder: 'template.common.remarkPlaceholder',
maxlength: 1000,
rows: 5
}
}
}
]
},
//
baseInfoFormConfig() {
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.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')
}
}
},
{
type: "cellItem",
label: 'template.common.configurationTime',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
//
stepFormConfig() {
return [
{
type: "step",
config: {
targetName: {
label: 'template.common.targetSolutionName',
type: "input",
fillType: "preFill",
maxlength: 50
},
targetCode: {
label: 'template.common.targetSolutionCode',
type: "input",
subType: "span",
fillType: "preFill",
subKey: "targetCodeSn",
maxlength: 20
},
targetPreConcentration: {
label: 'template.common.targetPreConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetPreConcentrationUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
maxlength: 10,
selectTo: "targetActConcentrationUnit",//
},
targetActConcentration: {
label: 'template.common.targetActConcentration',
type: "inputNumber",
subType: "select",
subKey: "targetActConcentrationUnit",
compareTo: "targetPreConcentration",//
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_nddw'),
copyFrom: "targetPreConcentration",//
maxlength: 10
},
targetPreVolume: {
label: 'template.common.targetPreVolume',
type: "inputNumber",
subType: "select",
subKey: "targetPreVolumeUnit",
subOptions: this.getDictOptions('business_tjdw'),
fillType: "preFill",
maxlength: 10,
selectTo: "targetActVolumeUnit",//
},
targetActVolume: {
label: 'template.common.targetActVolume',
type: "inputNumber",
subType: "select",
subKey: "targetActVolumeUnit",
fillType: "actFill",
subFillType: "preFill",
subOptions: this.getDictOptions('business_tjdw'),
compareTo: "targetPreVolume",//
copyFrom: "targetPreVolume",//
maxlength: 10
},
effectivePeriod: {
label: 'template.common.effectivePeriod',
type: "inputNumber",
subType: "select",
subKey: "effectivePeriodUnit",
fillType: "preFill",
subOptions: this.getDictOptions('business_yxqdw'),
maxlength: 10
},
expireDate: {
label: 'template.common.expireDate',
type: "input",
},
}
}
]
},
},
data() {
return {
formData: {}
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
if(!formData.targetCodeSn&& this.fillType === "actFill"){
this.getCode(formData);
}
},
methods: {
//
printTag() {
const printConfig = this.getBasePrintConfig();
const { storageCondition, targetCodeSn } = this.formData;
printConfig["存储条件"] = storageCondition;
printConfig["编号"] = targetCodeSn;
EventBus.$emit('showTagPrintDialog', { printConfig })
},
//
getCode: debounce(async function (v) {
const result = await getLatestSn({
count: 1,
pre:v.targetCode,
type:1
})
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data[0])
}
}, 100),
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"])
},
//
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
if (this.fillType === "actFill") {
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode + content.targetCodeSn,
ph: '',
ndz: content.targetActConcentration + content.targetActConcentrationUnit,
nd: content.targetActConcentration,
nddw: content.targetActConcentrationUnit,
ly: 'ELN配制',
sxrq: content.expireDate,
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
type: null,
elnType: this.product,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp =uniqeResource(tmpResource,stepResource.sjResource||[])
this.yqResourceTmp = stepResource.yqResource||[]
return content;
},
//
async onSave() {
let content = this.$refs.stepRef.getStepResource();
console.log(content);
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
</style>

Loading…
Cancel
Save