Browse Source

feat: [模板管理] 生物样品分析方法学样品制备表(准确度与精密度)

lkf
memorylkf 3 months ago
parent
commit
4914c7f36d
5 changed files with 444 additions and 21 deletions
  1. +14
    -10
      src/lang/en/template/commonTemplate.js
  2. +14
    -10
      src/lang/zh/template/commonTemplate.js
  3. +3
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +312
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBBZQDYJMD.vue
  5. +101
    -0
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBConfig.js

+ 14
- 10
src/lang/en/template/commonTemplate.js View File

@ -1,7 +1,7 @@
export default { export default {
// 页面标题 // 页面标题
pageTitle: 'Biological Sample Analysis Solution Preparation Table', pageTitle: 'Biological Sample Analysis Solution Preparation Table',
// 标签 // 标签
baseInfo: 'Test Basic Information', baseInfo: 'Test Basic Information',
reagentInfo: 'Test Reagent Information', reagentInfo: 'Test Reagent Information',
@ -9,7 +9,7 @@ export default {
storageCondition: 'Storage Conditions', storageCondition: 'Storage Conditions',
operationSteps: 'Operation Steps', operationSteps: 'Operation Steps',
remark: 'Remarks', remark: 'Remarks',
// 字段标签 // 字段标签
storageConditionLabel: 'Storage Conditions', storageConditionLabel: 'Storage Conditions',
testName: 'Test Name', testName: 'Test Name',
@ -30,16 +30,20 @@ export default {
targetActVolume: 'Target Solution Actual Volume', targetActVolume: 'Target Solution Actual Volume',
effectivePeriod: 'Effective Period', effectivePeriod: 'Effective Period',
expireDate: 'Expiry Date', expireDate: 'Expiry Date',
clpbh: 'Analysis Batch Number',
rqcz: 'Container Material',
clsj: 'Work Time',
xzjz: 'Select substrate',
// 占位符 // 占位符
remarkPlaceholder: 'Please enter remarks', remarkPlaceholder: 'Please enter remarks',
// 按钮 // 按钮
saveBtn: 'Save', saveBtn: 'Save',
// 错误提示 // 错误提示
addStepError: 'Please add steps', addStepError: 'Please add steps',
// 试剂信息列 // 试剂信息列
reagentName: 'Reagent Name', reagentName: 'Reagent Name',
reagentCode: 'Code', reagentCode: 'Code',
@ -47,13 +51,13 @@ export default {
concentration: 'Concentration/Content/Purity', concentration: 'Concentration/Content/Purity',
source: 'Source', source: 'Source',
reagentExpireDate: 'Expiry Date', reagentExpireDate: 'Expiry Date',
// 仪器使用信息列 // 仪器使用信息列
instrumentName: 'Instrument Name', instrumentName: 'Instrument Name',
instrumentModel: 'Instrument Model', instrumentModel: 'Instrument Model',
instrumentCode: 'Instrument Number', instrumentCode: 'Instrument Number',
nextTestDate: 'Next Test/Calibration/Verification Date', nextTestDate: 'Next Test/Calibration/Verification Date',
// 试验物质配制计划列 // 试验物质配制计划列
administrationDoseOrGroup: 'Administration Dose or Group', administrationDoseOrGroup: 'Administration Dose or Group',
preparationConcentration: 'Preparation Concentration', preparationConcentration: 'Preparation Concentration',
@ -61,6 +65,6 @@ export default {
other: 'Other', other: 'Other',
otherInfo: 'Other Information', otherInfo: 'Other Information',
unit: 'unit', unit: 'unit',
pleaseFillIn:"Please fill in",
pleaseSelect:"Please select"
pleaseFillIn: 'Please fill in',
pleaseSelect: 'Please select'
} }

+ 14
- 10
src/lang/zh/template/commonTemplate.js View File

@ -1,7 +1,7 @@
export default { export default {
// 页面标题 // 页面标题
pageTitle: '生物样品分析溶液配制表', pageTitle: '生物样品分析溶液配制表',
// 标签 // 标签
baseInfo: '试验基本信息', baseInfo: '试验基本信息',
reagentInfo: '试验试剂信息', reagentInfo: '试验试剂信息',
@ -9,7 +9,7 @@ export default {
storageCondition: '存储条件', storageCondition: '存储条件',
operationSteps: '操作步骤', operationSteps: '操作步骤',
remark: '备注', remark: '备注',
// 字段标签 // 字段标签
storageConditionLabel: '存储条件', storageConditionLabel: '存储条件',
testName: '试验名称', testName: '试验名称',
@ -30,16 +30,20 @@ export default {
targetActVolume: '目标溶液实际体积', targetActVolume: '目标溶液实际体积',
effectivePeriod: '有效周期', effectivePeriod: '有效周期',
expireDate: '失效日', expireDate: '失效日',
clpbh: '处理批编号',
rqcz: '容器材质',
clsj: '处理时间',
xzjz: '选择基质',
// 占位符 // 占位符
remarkPlaceholder: '请输入备注', remarkPlaceholder: '请输入备注',
// 按钮 // 按钮
saveBtn: '保存', saveBtn: '保存',
// 错误提示 // 错误提示
addStepError: '请添加步骤', addStepError: '请添加步骤',
// 试剂信息列 // 试剂信息列
reagentName: '试剂名称', reagentName: '试剂名称',
reagentCode: '编号', reagentCode: '编号',
@ -47,13 +51,13 @@ export default {
concentration: '浓度/含量/纯度', concentration: '浓度/含量/纯度',
source: '来源', source: '来源',
reagentExpireDate: '失效日', reagentExpireDate: '失效日',
// 仪器使用信息列 // 仪器使用信息列
instrumentName: '仪器名称', instrumentName: '仪器名称',
instrumentModel: '仪器型号', instrumentModel: '仪器型号',
instrumentCode: '仪器编号', instrumentCode: '仪器编号',
nextTestDate: '下次测试/校准/检定日期', nextTestDate: '下次测试/校准/检定日期',
// 试验物质配制计划列 // 试验物质配制计划列
administrationDoseOrGroup: '给药剂量或组别', administrationDoseOrGroup: '给药剂量或组别',
preparationConcentration: '配制浓度', preparationConcentration: '配制浓度',
@ -61,6 +65,6 @@ export default {
other: '其他', other: '其他',
otherInfo: '其他信息', otherInfo: '其他信息',
unit: '单位', unit: '单位',
pleaseFillIn:"请输入",
pleaseSelect:"请选择"
pleaseFillIn: '请输入',
pleaseSelect: '请选择'
} }

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

@ -15,6 +15,7 @@ import SWYPFXRYPZB from "./comps/sp/SWYPFXRYPZB.vue";
import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue"; import SWYPFXCBYPZB from "./comps/sp/SWYPFXCBYPZB.vue";
import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue"; import SWYPBQGZYZBB from "./comps/sp/SWYPBQGZYZBB.vue";
import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue"; import SWYPNBGZYZBB from "./comps/sp/SWYPNBGZYZBB.vue";
import SWYPFXFFXYPZBBZQDYJMD from "./comps/sp/SWYPFXFFXYPZBBZQDYJMD.vue";
import Demo from "./comps/sp/Demo.vue"; import Demo from "./comps/sp/Demo.vue";
// //
import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue"; import SYWZPZJHB from "./comps/gy/SYWZPZJHB.vue";
@ -24,7 +25,7 @@ export default {
name: "TemplateTable", name: "TemplateTable",
components: { components: {
MJYLQSQD, SYWZPZJHB, MJYLQSQD, SYWZPZJHB,
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,SWYPFXFFXYPZBBZQDYJMD
}, },
props: { props: {
sn: { sn: {
@ -53,6 +54,7 @@ export default {
'SP002': 'SWYPFXCBYPZB', 'SP002': 'SWYPFXCBYPZB',
'SP003': 'SWYPBQGZYZBB', 'SP003': 'SWYPBQGZYZBB',
'SP004': 'SWYPNBGZYZBB', 'SP004': 'SWYPNBGZYZBB',
'SP008': 'SWYPFXFFXYPZBB-ZQDYJMD',
'SYWZPZJHB': 'SYWZPZJHB', 'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD', 'MJYLQSQD': 'MJYLQSQD',
} }

+ 312
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBBZQDYJMD.vue View File

@ -0,0 +1,312 @@
<!-- 生物样品分析溶液配制表 -->
<template>
<div>
<div class="detail-container">
<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="content">
<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">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "'table'"
fieldItemLabel = "平行配制"
>
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
</template>
</CustomTable>
</div>
<Step ref="stepRef" :formData="formData.stepData"></Step>
<BaseInfoFormPcakge 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 BaseInfoFormPcakge from "@/components/Template/BaseInfoFormPcakge";
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 {getSWYPFXFFXYPZBBConfig} from "../../formConfig/SWYPFXFFXYPZBBConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion },
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: "input",
fillType: "actFill",
maxlength: 50
},
//
clpbg: {
label: 'template.common.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",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.common.rqcz',
config: {
rqcz: {
type: "input",
fillType: "actFill",
maxlength: 50
},
}
},
{
type: "cellItem",
label: 'template.common.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.common.xzjz',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subSolution",
subFillType: "actFill",
maxlength: 20,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBConfig(this);
},
},
data() {
return {
resource: [],
resourceData1: [],
sysjColumns: [
{ 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: [
{ 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: {}
};
},
mounted() {
},
watch: {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
this.getCode();
}
}
}
},
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() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
debugger
//
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() {
const formData = await this.getFilledFormData();
console.log(formData, "formData")
},
//
deleteRow(rowIndex) {
const tableRef = this.$refs['tableRef'];
if (tableRef) {
tableRef.deleteRow(rowIndex);
}
},
}
};
</script>
<style rel="stylesheet/scss" lang="scss">
.mt-20 {
margin-top: 20px;
}
</style>

+ 101
- 0
src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBConfig.js View File

@ -0,0 +1,101 @@
// 生物样品分析方法学样品制备表-表格配置
export const getSWYPFXFFXYPZBBConfig = ($this) => {
return [
{
label: '编号',
prop: 'targetSolutionCode',
bodyType: 'select',
bodyOptions: [
{
label: '溶液1',
value: '1'
}
],
subType: 'span',
subKey: 'subTargetSolutionCode',
bodyFillType: 'preFill',
width: 280
},
{
label: '预设溶液',
prop: 'ysry',
bodyType: 'select',
bodyOptions: [
{
label: '溶液1',
value: '1'
}
],
bodyFillType: 'preFill',
width: 280
},
{
label: '实际溶液',
prop: 'sjry',
bodyType: 'select',
bodyOptions: [
{
label: '溶液1',
value: '1'
}
],
bodyFillType: 'actFill',
width: 280
},
{
label: '预计溶液吸取量',
prop: 'yjryxql',
width: 280,
headerSelectKey: 'yjryxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: '实际溶液吸取量',
prop: 'sjryxql',
width: 280,
headerSelectKey: 'sjryxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10
},
{
label: '预计基质吸取量',
prop: 'yjjzxql',
width: 280,
headerSelectKey: 'yjjzxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: '实际基质吸取量',
prop: 'sjjzxql',
width: 280,
headerSelectKey: 'sjjzxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10
},
{
label: '化合物终浓度',
prop: 'hhwznd',
width: 280,
headerSelectKey: 'hhwzndUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
}
]
}

Loading…
Cancel
Save