Browse Source

feat:[模板管理][生物样品分析方法学样品制备表(Recovery)]

lkf
HanLong 3 months ago
parent
commit
e11fe673c3
4 changed files with 210 additions and 77 deletions
  1. +7
    -1
      src/lang/en/template/sp.js
  2. +7
    -1
      src/lang/zh/template/sp.js
  3. +79
    -75
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue
  4. +117
    -0
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js

+ 7
- 1
src/lang/en/template/sp.js View File

@ -31,7 +31,13 @@ export default {
sjryxql: 'Actual Solution Extraction Volume',
yjjzxql: 'Expected Blank Substrate Extraction Volume',
sjjzxql: 'Actual Blank Substrate Extraction Volume',
hhwznd: 'Target Solution Concentration'
hhwznd: 'Target Solution Concentration',
xzgzy: 'Select Working Solution',
xzxsy: 'Select Diluent',
yjgzyxql: 'Expected Working Solution Extraction Volume',
sjgzyxql: 'Actual Working Solution Extraction Volume',
yjxsyxql: 'Expected Diluent Extraction Volume',
sjxsyxql: 'Actual Diluent Extraction Volume',
},
//生物样品分析方法学样品制备表(全血稳定)
sp010: {

+ 7
- 1
src/lang/zh/template/sp.js View File

@ -30,7 +30,13 @@ export default {
sjryxql: '实际溶液吸取量',
yjjzxql: '预计基质吸取量',
sjjzxql: '实际基质吸取量',
hhwznd: '化合物终浓度'
hhwznd: '化合物终浓度',
xzgzy: '选择工作液',
xzxsy: '选择稀释液',
yjgzyxql: '预计工作液吸取量',
sjgzyxql: '实际工作液吸取量',
yjxsyxql: '预计稀释液吸取量',
sjxsyxql: '实际稀释液吸取量',
},
//生物样品分析方法学样品制备表(全血稳定)
sp010: {

+ 79
- 75
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/Recovery.vue View File

@ -3,68 +3,48 @@
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.templateMc ||
$t('template.sp.sp009.title') }}<img src="@/assets/images/detail-title.png" /></div>
$t('template.sp.sp009.title') }}<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"
<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" />
<span>基质</span>
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="stepFormConfig" @blur="onHandleBlur" :formData="formData" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "这个是什么"
>
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="tableStepColumns"
:formData="formData" :prefixKey="`table`" @clickable="handleClickable"
fieldItemLabel="这个是什么">
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
<TableOpertaion :fillType="fillType" :row="row" :rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"></TableOpertaion>
</template>
</CustomTable>
</div>
<div class="template-form-item">
<span>test</span>
<span>溶液</span>
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig" @blur="onHandleBlur"
:formData="formData" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "这个是什么"
>
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef"
:formConfig="rongyeStepFormConfig" @blur="onHandleBlur" :formData="formData" />
<CustomTable @blur="onHandleTableBlur" :ref="`tableRef`" :columns="rongyeTableStepColumns"
:formData="formData" :prefixKey="`table`" @clickable="handleClickable"
fieldItemLabel="这个是什么">
<template slot="operation" slot-scope="{ row, rowIndex}">
<TableOpertaion
:fillType="fillType"
:row="row"
:rowIndex="rowIndex"
@deleteRow="(rowIndex) => deleteRow(rowIndex)"
></TableOpertaion>
<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" />
<BaseInfoFormPcakge fieldItemLabel="template.common.remark" label="template.common.remark"
ref="remarkRef" :formConfig="remarkConig" :formData="formData" />
</div>
</div>
@ -81,12 +61,12 @@ import Step from "@/components/Template/Step";
import templateMixin from "../../../mixins/templateMixin";
import CustomTable from '@/components/Template/CustomTable.vue';
import { getLatestSn } from '@/api/template';
import {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import { getSWYPFXFFXYPZBBTableConfig, getSWYPFXFFXYPZBBTQHSLTableConfig } from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion },
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable, TableOpertaion },
mixins: [templateMixin],
props: {
fillType: {
@ -107,7 +87,6 @@ export default {
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
},
}
}
];
@ -222,17 +201,41 @@ export default {
{
type: "step",
config: {
jz1: {
label: 'template.sp.sp009.xzjz',
type: "span",
label: 'template.common.storageConditionLabel',
jz: {
label: 'template.sp.sp008.xzjz',
type: "input",
fillType: "preFill",
options: this.getDictOptions("business_cctj"),
otherCode: "storageConditionOther",
subType: "clickable",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
jz: {
label: 'template.sp.sp009.xzjz',
}
}
]
},
rongyeStepFormConfig() {
return [
{
type: "step",
config: {
gzy: {
label: 'template.sp.sp009.xzgzy',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subSolution",
subFillType: "actFill",
maxlength: 20,
},
}
},
{
type: "step",
config: {
xsy: {
label: 'template.sp.sp009.xzxsy',
type: "input",
fillType: "preFill",
subType: "clickable",
@ -240,14 +243,15 @@ export default {
subFillType: "actFill",
maxlength: 20,
},
}
},
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this);
return getSWYPFXFFXYPZBBTableConfig(this, 'business_sp_tqhsl', false);
},
rongyeTableStepColumns() {
return getSWYPFXFFXYPZBBTQHSLTableConfig(this, 'business_sp_tqhsl');
},
},
data() {
@ -278,7 +282,7 @@ export default {
formData: {
immediate: true,
handler(v) {
if(!v.targetCodeSn && this.fillType === "actFill"){
if (!v.targetCodeSn && this.fillType === "actFill") {
this.getCode();
}
}
@ -287,36 +291,36 @@ export default {
methods: {
//
handleClickable(col, rowIndex) {
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
console.log("clickable", rowIndex, col)
if (col.prop === "sjry") {
//
}
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex,{
this.$refs.tableRef.updateDataSourceByRowIndex(rowIndex, {
sjry: "我是填充进来的数据",
})
},
//
async getCode(){
async getCode() {
const result = await getLatestSn({
count: 1,
})
if(result.code == 200){
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn",result.data)
if (result.code == 200) {
this.$refs.stepFormPackageRef.updateFormData("targetCodeSn", result.data)
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
getFilledFormData() {
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef", "stepRef", "remarkRef"]);
//resource
let tmpResource = []
debugger
//
tmpResource.push({
mc: content.targetName,
bh: content.targetCode+content.targetCodeSn,
bh: content.targetCode + content.targetCodeSn,
ph: '',
nd: content.targetActConcentration + content.targetActConcentrationUnit,
source: 'ELN配制',
@ -326,12 +330,12 @@ export default {
kc: content.targetActVolume,
kcdw: content.targetActVolumeUnit,
syl: null,
syldw:content.targetActVolumeUnit,
yxzq:content.effectivePeriod,
yxzqdw:content.effectivePeriodUnit,
syldw: content.targetActVolumeUnit,
yxzq: content.effectivePeriod,
yxzqdw: content.effectivePeriodUnit,
})
//使
this.resource=tmpResource
this.resource = tmpResource
return content;
},

+ 117
- 0
src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js View File

@ -104,3 +104,120 @@ export const getSWYPFXFFXYPZBBTableConfig = (
}
return arr
}
// 提取回收率-溶液稀释
export const getSWYPFXFFXYPZBBTQHSLTableConfig = (
$this,
selectKey,
) => {
let arr = [
{
label: 'template.sp.sp008.bh',
prop: 'bh',
bodyType: 'select',
bodyOptions: $this.getDictOptions(selectKey),
bodySubType: 'span',
bodySubKey: 'bhCode',
bodyFillType: 'preFill',
width: 280
},
{
label: 'template.sp.sp008.ysry',
prop: 'ysry',
bodyType: 'input',
bodyFillType: 'preFill',
width: 280
},
{
label: 'template.sp.sp008.sjry',
prop: 'sjry',
bodyType: 'clickable',
bodyFillType: 'actFill',
width: 280
},
{
label: 'template.sp.sp008.yjryxql',
prop: 'yjryxql',
width: 320,
headerSelectKey: 'yjryxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp008.sjryxql',
prop: 'sjryxql',
width: 300,
headerSelectKey: 'sjryxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodyCompareTo: 'yjryxql',
copyFrom: 'yjryxql'
},
{
label: 'template.sp.sp009.yjgzyxql',
prop: 'yjgzyxql',
width: 350,
headerSelectKey: 'yjgzyxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp009.sjgzyxql',
prop: 'sjgzyxql',
width: 350,
headerSelectKey: 'sjgzyxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodyCompareTo: 'yjjzxql',
copyFrom: 'yjjzxql'
},
{
label: 'template.sp.sp009.yjxsyxql',
prop: 'yjxsyxql',
width: 350,
headerSelectKey: 'yjxsyxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
},
{
label: 'template.sp.sp009.sjxsyxql',
prop: 'sjxsyxql',
width: 350,
headerSelectKey: 'sjxsyxqlUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_tjdw'),
bodyType: 'inputNumber',
bodyFillType: 'actFill',
bodyMaxlength: 10,
bodyCompareTo: 'yjjzxql',
copyFrom: 'yjjzxql'
},
{
label: 'template.sp.sp008.hhwznd',
prop: 'hhwznd',
width: 280,
headerSelectKey: 'hhwzndUnit',
fillType: 'preFill',
headerOptions: $this.getDictOptions('business_nddw'),
bodyType: 'inputNumber',
bodyFillType: 'preFill',
bodyMaxlength: 10
}
]
return arr
}

Loading…
Cancel
Save