Browse Source

feat:[模板管理]PCR005

lkf
HanLong 2 months ago
parent
commit
d201e98ccd
9 changed files with 378 additions and 129 deletions
  1. +4
    -1
      src/lang/en/template/commonTemplate.js
  2. +3
    -48
      src/lang/en/template/pcr.js
  3. +5
    -2
      src/lang/zh/template/commonTemplate.js
  4. +3
    -67
      src/lang/zh/template/pcr.js
  5. +4
    -2
      src/views/business/comps/template/TemplateTable.vue
  6. +1
    -4
      src/views/business/comps/template/comps/pcr/PCR002.vue
  7. +1
    -2
      src/views/business/comps/template/comps/pcr/PCR003.vue
  8. +2
    -3
      src/views/business/comps/template/comps/pcr/PCR004.vue
  9. +355
    -0
      src/views/business/comps/template/comps/pcr/PCR005.vue

+ 4
- 1
src/lang/en/template/commonTemplate.js View File

@ -12,7 +12,7 @@ export default {
remark: 'Comments', remark: 'Comments',
step: 'Step', step: 'Step',
bqdy: 'Label Print', bqdy: 'Label Print',
//平行配制,阶梯配制 //平行配制,阶梯配制
xzpxpz:'新增平行配制', xzpxpz:'新增平行配制',
pxpz:'平行配制', pxpz:'平行配制',
@ -26,6 +26,7 @@ export default {
methodCode: 'Method Number', methodCode: 'Method Number',
versionNumber: 'Version', versionNumber: 'Version',
testConfigurationConditions: 'Work Condition', testConfigurationConditions: 'Work Condition',
processCondition: 'Process Condition',
preFill: 'Preset', preFill: 'Preset',
actualFill: 'Actual', actualFill: 'Actual',
configurationTime: 'Work Time', configurationTime: 'Work Time',
@ -48,6 +49,8 @@ export default {
saveBtn: 'Save', saveBtn: 'Save',
addBtn: 'Add', addBtn: 'Add',
deleteBtn: 'Delete', deleteBtn: 'Delete',
downloadTemplate: 'Download Template',
importTemplate: 'Import Template',
// 错误提示 // 错误提示
addStepError: 'Please add steps', addStepError: 'Please add steps',

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

@ -34,54 +34,9 @@ export default {
rqcz: 'Container Material', rqcz: 'Container Material',
cctj: 'Storage Condition' cctj: 'Storage Condition'
}, },
// 生物样品标曲工作液制备表
sp003: {
title: '生物样品标曲工作液制备表',
rqcz: 'Container Material',
cctj: 'Storage Condition',
qsyry: 'Source Solution',
ysqsyrynd: 'Expected Concentration of Source Solution',
qsbhstd: 'STD Starting Number',
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: {
title: '生物样品内标工作液制备表',
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',
sjqsyrynd: 'Actual Concentration of Source Solution',
xsy: 'Diluent',
rqcz: 'Container Material'
// PCR分析样品处理表
pcr005: {
clpbh: 'Analysis Batch Number',
}, },
// 生物样品分析方法学样品制备表-准确度与精密度 // 生物样品分析方法学样品制备表-准确度与精密度
sp008: { sp008: {

+ 5
- 2
src/lang/zh/template/commonTemplate.js View File

@ -12,7 +12,7 @@ export default {
step: '步骤', step: '步骤',
remark: '备注', remark: '备注',
bqdy: '标签打印', bqdy: '标签打印',
//平行配制,阶梯配制 //平行配制,阶梯配制
xzpxpz:'新增平行配制', xzpxpz:'新增平行配制',
pxpz:'平行配制', pxpz:'平行配制',
@ -26,6 +26,7 @@ export default {
methodCode: '方法编号', methodCode: '方法编号',
versionNumber: '版本号', versionNumber: '版本号',
testConfigurationConditions: '试验配制条件', testConfigurationConditions: '试验配制条件',
processCondition: '处理条件',
preFill: '预填', preFill: '预填',
actualFill: '实际', actualFill: '实际',
configurationTime: '配制时间', configurationTime: '配制时间',
@ -49,6 +50,8 @@ export default {
addBtn: '新增', addBtn: '新增',
saveBtn: '保存', saveBtn: '保存',
deleteBtn: '刪除', deleteBtn: '刪除',
downloadTemplate: '下载模板',
importTemplate: '导入模板',
// 错误提示 // 错误提示
addStepError: '请添加步骤', addStepError: '请添加步骤',
@ -60,7 +63,7 @@ export default {
concentration: '浓度/含量/纯度', concentration: '浓度/含量/纯度',
source: '来源', source: '来源',
reagentExpireDate: '失效日', reagentExpireDate: '失效日',
// 物资信息列 // 物资信息列
wzName: '名称', wzName: '名称',
wzCode: '编号', wzCode: '编号',

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

@ -32,74 +32,10 @@ export default {
rqcz: '容器材质', rqcz: '容器材质',
cctj: '存储条件' cctj: '存储条件'
}, },
// 生物样品标曲工作液制备表
sp003: {
title: '生物样品标曲工作液制备表',
rqcz: '容器材质',
cctj: '存储条件',
qsyry: '起始源溶液',
ysqsyrynd: '预设起始源溶液浓度',
sjqsyrynd: '实际起始源溶液浓度',
xsy: '稀释液',
qsbhstd: '起始编号STD',
mbryyxzq: '目标溶液有效周期',
mbrysxr: '目标溶液失效日',
mbrybh: '目标溶液编号',
qsrybh: '起始溶液编号',
ysqsrytj: '预设起始溶液体积',
sjqsrytj: '实际起始溶液体积',
ysxsytj: '预设稀释液体积',
sjxsytj: '实际稀释液体积',
ysmbrynd: '预设目标溶液浓度',
sjmbrynd: '实际目标溶液浓度',
ysmbrytj: '预设目标溶液体积',
sjmbrytj: '实际目标溶液体积'
},
// 生物样品内标工作液制备表
sp00456: {
title: '生物样品内标工作液制备表',
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: '存储条件'
},
// 生物样品分析方法学样品制备表-准确度与精密度
sp008: {
title: '生物样品分析方法学样品制备表(准确度与精密度)',
// PCR分析样品处理表
pcr005: {
clpbh: '处理批编号', clpbh: '处理批编号',
rqcz: '容器材质',
clsj: '处理时间',
xzjz: '选择基质',
bh: '编号',
ysry: '预设溶液',
sjry: '实际溶液',
yjryxql: '预计溶液吸取量',
sjryxql: '实际溶液吸取量',
yjjzxql: '预计基质吸取量',
sjjzxql: '实际基质吸取量',
hhwznd: '化合物终浓度'
}, },
// 生物样品分析方法学样品制备表-Recovery // 生物样品分析方法学样品制备表-Recovery
sp009: { sp009: {

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

@ -48,6 +48,7 @@ import DMYPPZJLB from "./comps/gsp/DMYPPZJLB.vue";
import PCR002 from "./comps/pcr/PCR002.vue"; import PCR002 from "./comps/pcr/PCR002.vue";
import PCR003 from "./comps/pcr/PCR003.vue"; import PCR003 from "./comps/pcr/PCR003.vue";
import PCR004 from "./comps/pcr/PCR004.vue"; import PCR004 from "./comps/pcr/PCR004.vue";
import PCR005 from "./comps/pcr/PCR005.vue";
//LBA //LBA
// LBA001-使SP001 // LBA001-使SP001
@ -78,7 +79,7 @@ export default {
// //
SP001, SP003, SP00456,SP007, SP008, SP009, SP001, SP003, SP00456,SP007, SP008, SP009,
// PCR // PCR
PCR002,
PCR002, PCR003, PCR004, PCR005,
//LBA //LBA
LBA002, LBA002,
LBA003, LBA003,
@ -128,7 +129,7 @@ export default {
'SP017': 'SP008', 'SP017': 'SP008',
'SP018': 'SP008', 'SP018': 'SP008',
// //
'GSP001': 'DMYPPZJLB', 'GSP001': 'DMYPPZJLB',
'GSP002': 'GSP002', 'GSP002': 'GSP002',
'GSP003': 'GSP003', 'GSP003': 'GSP003',
@ -150,6 +151,7 @@ export default {
'PCR002': 'PCR002', 'PCR002': 'PCR002',
'PCR003': 'PCR003', 'PCR003': 'PCR003',
'PCR004': 'PCR004', 'PCR004': 'PCR004',
'PCR005': 'PCR005',
//LBA //LBA
'LBA001': 'SP001', 'LBA001': 'SP001',
'LBA002': 'LBA002', 'LBA002': 'LBA002',

+ 1
- 4
src/views/business/comps/template/comps/pcr/PCR002.vue View File

@ -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.pcr.pcr002.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"
@ -19,8 +18,6 @@
@onSureModifyRecord="onSureModifyRecord" @onSureModifyRecord="onSureModifyRecord"
@resetRecord="resetRecord" @resetRecord="resetRecord"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" /> :formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<el-button type="primary" @click="exportExcel(['a','b','c','d'])">下载模板</el-button>
<el-button type="primary" @click="showImportExcelDialog">导入模板</el-button>
<CustomTable <CustomTable
@blur="onHandleTableBlur" @blur="onHandleTableBlur"
:ref="`stepTableRef`" :ref="`stepTableRef`"

+ 1
- 2
src/views/business/comps/template/comps/pcr/PCR003.vue View File

@ -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.pcr.pcr002.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"

+ 2
- 3
src/views/business/comps/template/comps/pcr/PCR004.vue View File

@ -1,9 +1,8 @@
<!-- PCR生物分析标准曲线制备表 -->
<!-- PCR生物分析质控样品制备表 -->
<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.pcr.pcr002.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"

+ 355
- 0
src/views/business/comps/template/comps/pcr/PCR005.vue View File

@ -0,0 +1,355 @@
<!-- PCR分析样品处理表 -->
<template>
<div>
<div class="detail-container">
<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="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.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPackage fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
@clickable="handleFormClickable" @resetRecord="resetRecord" :formConfig="stepFormConfig"
@blur="onHandleBlur" :formData="formData" />
<el-button type="primary" @click="exportExcel(['a', 'b', 'c', 'd'])">{{ $t('template.common.downloadTemplate') }}</el-button>
<el-button type="primary" @click="showImportExcelDialog">{{ $t('template.common.importTemplate') }}</el-button>
<CustomTable @blur="onHandleTableBlur" :ref="`stepTableRef`" :columns="tableStepColumns"
:formData="formData" :prefixKey="`table`" @clickable="handleClickable"
fieldItemLabel="template.common.operationSteps">
<template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex" :columns="columns"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
</template>
</CustomTable>
</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>
<SelectReagentDialog @submit="onSelectReagentSubmit" ref="selectReagentDialogRef">
</SelectReagentDialog>
<!-- <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.js";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSnArr } from '@/api/template';
import { EventBus } from "@/utils/eventBus";
import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue';
import { getLadderColumnsConfig } from "../../formConfig/PCRTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools";
export default {
name: "PCR002",
components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, TableOpertaion, SelectReagentDialog },
mixins: [templateMixin],
props: {
fillType: {
type: String,
default: 'preFill',
},
},
computed: {
tableStepColumns() {
return getLadderColumnsConfig(this, 'business_pcr_fxzkypzbb');
},
//
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,
},
}
},
{
type: "conditionItem",
label: 'template.common.processCondition',
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.pcr.pcr005.clpbh',
config: {
act: {
label: '',
type: "input",
fillType: "actFill",
otherCode: "preOther",
}
}
},
{
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: {
solution: {
labelWidth: 80,
label: 'template.pcr.pcr002.xsy',
type: 'input',
fillType: 'preFill',
subType: 'sj',
subKey: 'subSolution',
subFillType: 'actFill',
maxlength: 20
},
}
}
]
},
},
data() {
return {
reagentType: null, // 1- 2-
formData: {},
currentSubKey: "",//key
currentType: "",//
currentRowIndex: "",//
};
},
mounted() {
const formData = this.getFormDataByTemplateData();
},
methods: {
//
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]);
return content;
},
getResource() {
let content = this.getFilledFormData();
console.log(content)
//resource
let tmpResource = []
if (this.fillType === "actFill") {
let tableList = content.stepTableFormData
if (tableList && tableList.length > 0) {
for (let i = 0; i < tableList.length; i++) {
//
let item = tableList[i]
console.log('表格item:' + JSON.stringify(item))
//使
//
tmpResource.push({
mc: null,
bh: item.startSolutionCode,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.actStartSolutionVolume,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.actStartSolutionVolumeUnit,
yxzq: null,
yxzqdw: null,
})
//
tmpResource.push({
mc: null,
bh: content.subSolution,
ph: null,
ndz: null,
nd: null,
nddw: null,
ly: 'ELN配制',
sxrq: null,
kc: null,
kcdw: null,
syl: item.actDiluentVolume,
type: 1,
elnType: this.product,
syldw: content.headerSelectFields.actDiluentVolumeUnit,
yxzq: null,
yxzqdw: null,
})
//
let fzTotal = 0//
if (item.fzsj && item.fzsj.fzList && item.fzsj.fzList.length > 0) {
for (let j = 0; j < item.fzsj.fzList.length; j++) {
let fzItem = item.fzsj.fzList[j]
tmpResource.push({
mc: null,
bh: item.fzsj.mybh + fzItem.preCode + fzItem.subCode,
ph: null,
ndz: item.hhwznd + content.headerSelectFields.hhwzndUnit,
nd: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
ly: 'ELN配制',
sxrq: null,
kc: fzItem.num,
kcdw: item.fzsj.dw,
syl: null,
type: null,
elnType: this.product,
syldw: item.fzsj.dw,
yxzq: null,
yxzqdw: null,
})
fzTotal = addDecimals(fzTotal, fzItem.num)
}
}
//
// const { total, unit } = addTj([item.sjjzxql, item.sjryxql], [content.headerSelectFields.sjjzxqlUnit, content.headerSelectFields.sjryxqlUnit])
const { total, unit } = addTj([item.actStartSolutionVolume, item.actDiluentVolume], [content.headerSelectFields.actStartSolutionVolumeUnit, content.headerSelectFields.actDiluentVolumeUnit])
tmpResource.push({
mc: null,
bh: item.targetSolutionCode + item.subTargetSolutionCode,
ph: null,
ndz: item.actSolutionConcentration + content.headerSelectFields.actSolutionConcentrationUnit,
nd: item.actSolutionConcentration,
nddw: content.headerSelectFields.actSolutionConcentrationUnit,
ly: 'ELN配制',
sxrq: null,
kc: total,
kcdw: unit,
type: null,
elnType: this.product,
syl: fzTotal > 0 ? fzTotal : null,
syldw: fzTotal > 0 ? item.fzsj.dw : unit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
}
}
}
if (tmpResource.length > 0) {
tmpResource = uniqeResourceOne(tmpResource)
}
//使
const stepResource = this.$refs.stepRef.getStepResource()
this.resourceTmp = uniqeResource(tmpResource, stepResource.sjResource || [])
this.yqResourceTmp = stepResource.yqResource || []
return this.resourceTmp;
},
//
async onSave() {
let content = this.$refs.stepRef.getStepResource();
console.log(content);
},
//
deleteRow(rowIndex) {
const stepTableRef = this.$refs['stepTableRef'];
if (stepTableRef) {
stepTableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
.print-btn {
margin-bottom: 20px;
}
</style>

Loading…
Cancel
Save