Browse Source

feat: [模板管理] 色谱模板

lkf
memorylkf 3 months ago
parent
commit
1d00e32215
6 changed files with 797 additions and 11 deletions
  1. +12
    -4
      src/lang/en/template/sp.js
  2. +10
    -2
      src/lang/zh/template/sp.js
  3. +5
    -1
      src/views/business/comps/template/TemplateTable.vue
  4. +374
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue
  5. +374
    -0
      src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue
  6. +22
    -4
      src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js

+ 12
- 4
src/lang/en/template/sp.js View File

@ -17,10 +17,9 @@ export default {
sjjzxql: 'Actual Blank Substrate Extraction Volume', sjjzxql: 'Actual Blank Substrate Extraction Volume',
hhwznd: 'Target Solution Concentration' hhwznd: 'Target Solution Concentration'
}, },
// 生物样品分析方法学样品制备表-Recovery
// 生物样品分析方法学样品制备表-Recovery
sp009: { sp009: {
title:
'Bioanalytical Methods Sample Preparation Record (Recovery)',
title: 'Bioanalytical Methods Sample Preparation Record (Recovery)',
clpbh: 'Analysis Batch Number', clpbh: 'Analysis Batch Number',
rqcz: 'Container Material', rqcz: 'Container Material',
clsj: 'Work Time', clsj: 'Work Time',
@ -47,5 +46,14 @@ export default {
yjxsyxql: 'Expected Blank Diluent Extraction Volume', yjxsyxql: 'Expected Blank Diluent Extraction Volume',
sjxsyxql: 'Actual Blank Diluent Extraction Volume' sjxsyxql: 'Actual Blank Diluent Extraction Volume'
}, },
//生物样品分析方法学样品制备表(Haemolysed matrix effect)-生物样品分析方法学样品制备表(溶血基质效应)
sp012: {
title:
'Bioanalytical Methods Sample Preparation Record (Haemolytic Matrix Effect)'
},
//生物样品分析方法学样品制备表(Matrix effect)-生物样品分析方法学样品制备表(基质效应)
sp013: {
title: 'Bioanalytical Methods Sample Preparation Record (Matrix Effect)',
kbjzbh: 'Blank Substrate Serial Number'
}
} }

+ 10
- 2
src/lang/zh/template/sp.js View File

@ -38,10 +38,18 @@ export default {
}, },
//生物样品分析方法学样品制备表(Solution stability)-生物样品分析方法学样品制备表-储备液和工作液稳定性 //生物样品分析方法学样品制备表(Solution stability)-生物样品分析方法学样品制备表-储备液和工作液稳定性
sp011: { sp011: {
title: '生物样品分析方法学样品制备表-储备液和工作液稳定性',
title: '生物样品分析方法学样品制备表(储备液和工作液稳定性)',
xzxsy: '选择稀释液', xzxsy: '选择稀释液',
yjxsyxql: '预计稀释液吸取量', yjxsyxql: '预计稀释液吸取量',
sjxsyxql: '实际稀释液吸取量' sjxsyxql: '实际稀释液吸取量'
}, },
//生物样品分析方法学样品制备表(Haemolysed matrix effect)-生物样品分析方法学样品制备表(溶血基质效应)
sp012: {
title: '生物样品分析方法学样品制备表(溶血基质效应)'
},
//生物样品分析方法学样品制备表(Matrix effect)-生物样品分析方法学样品制备表(基质效应)
sp013: {
title: '生物样品分析方法学样品制备表(基质效应)',
kbjzbh: '空白基质编号'
}
} }

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

@ -20,6 +20,8 @@ import ZQDYJMD from "./comps/sp/SWYPFXFFXYPZBB/ZQDYJMD.vue";
import QXWDX from "./comps/sp/SWYPFXFFXYPZBB/QXWDX.vue"; import QXWDX from "./comps/sp/SWYPFXFFXYPZBB/QXWDX.vue";
import CBYHGZYWDX from "./comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue"; import CBYHGZYWDX from "./comps/sp/SWYPFXFFXYPZBB/CBYHGZYWDX.vue";
import Recovery from "./comps/sp/SWYPFXFFXYPZBB/Recovery.vue"; import Recovery from "./comps/sp/SWYPFXFFXYPZBB/Recovery.vue";
import RXJZXY from "./comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue";
import JZXY from "./comps/sp/SWYPFXFFXYPZBB/JZXY.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";
@ -29,7 +31,7 @@ export default {
name: "TemplateTable", name: "TemplateTable",
components: { components: {
MJYLQSQD, SYWZPZJHB, MJYLQSQD, SYWZPZJHB,
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX,CBYHGZYWDX,Recovery
SP001, SWYPFXRYPZB, Demo, SWYPFXCBYPZB, SWYPBQGZYZBB, SWYPNBGZYZBB,ZQDYJMD,QXWDX,CBYHGZYWDX,Recovery,RXJZXY,JZXY
}, },
props: { props: {
sn: { sn: {
@ -62,6 +64,8 @@ export default {
'SP009': 'Recovery', 'SP009': 'Recovery',
'SP010': 'QXWDX', 'SP010': 'QXWDX',
'SP011': 'CBYHGZYWDX', 'SP011': 'CBYHGZYWDX',
'SP012': 'RXJZXY',
'SP013': 'JZXY',
'SYWZPZJHB': 'SYWZPZJHB', 'SYWZPZJHB': 'SYWZPZJHB',
'MJYLQSQD': 'MJYLQSQD', 'MJYLQSQD': 'MJYLQSQD',
} }

+ 374
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/JZXY.vue View File

@ -0,0 +1,374 @@
<!-- 生物样品分析方法学样品制备表Matrix effect-生物样品分析方法学样品制备表基质效应 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.sp.sp013.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"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<!-- <BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig"
:formData="formData" @clickable="handleJzClickable" /> -->
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
<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> -->
<SelectReagentDialog
@submit="onSelectReagentSubmit"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</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 {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue';
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog },
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.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",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.sp.sp008.rqcz',
config: {
rqcz: {
type: "select",
multiple: true,
fillType: "actFill",
options: this.getDictOptions('business_rqcz'),
otherCode: "rqczOther",
},
}
},
{
type: "cellItem",
label: 'template.sp.sp008.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp011.xzxsy',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this,'business_sp_rxjzxy',true,true);
},
},
data() {
return {
reagentType: "",//12
currentSubKey: "",//key
rowIndex:0,//
resource: [],
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(this.fillType === "actFill"){
this.getCode(v);
}
}
}
},
methods: {
//
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
},
//
onSelectReagentSubmit(code,row){
if(this.reagentType===1){
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
}else{
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{
[this.currentSubKey]: code,
})
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
handleClickable(col, rowIndex) {
//
this.reagentType = 2
this.rowIndex = rowIndex
this.currentSubKey = col.prop;
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
}
},
//
async getCode(v){
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData.length,
})
if(result.code == 200){
if(stepTableFormData.length===0){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
[bhCode]: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
}
}
}
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
//resource
let tmpResource = []
let tableList = content.stepTableFormData
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjjzxql+item.sjryxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
//使
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>

+ 374
- 0
src/views/business/comps/template/comps/sp/SWYPFXFFXYPZBB/RXJZXY.vue View File

@ -0,0 +1,374 @@
<!-- 生物样品分析方法学样品制备表Haemolysed matrix effect-生物样品分析方法学样品制备表溶血基质效应 -->
<template>
<div>
<div class="detail-container">
<div class="detail-title"><img src="@/assets/images/detail-title.png">{{ formData.bdmc ||
$t('template.sp.sp012.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"
:formConfig="storageFormConfig" :formData="formData" />
<LineLabel label="template.common.operationSteps" />
<div class="template-form-item">
<BaseInfoFormPcakge fieldItemLabel="template.common.operationSteps" ref="stepFormPackageRef" :formConfig="stepFormConfig"
:formData="formData" @clickable="handleJzClickable" />
<CustomTable
@blur="onHandleTableBlur"
:ref="`tableRef`"
:columns="tableStepColumns"
:formData="formData"
:prefixKey = "`table`"
@clickable="handleClickable"
fieldItemLabel = "template.common.operationSteps"
>
<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> -->
<SelectReagentDialog
@submit="onSelectReagentSubmit"
ref="selectReagentDialogRef" >
</SelectReagentDialog>
</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 {getSWYPFXFFXYPZBBTableConfig} from "../../../formConfig/SWYPFXFFXYPZBBTableConfig.js";
import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"
import SelectReagentDialog from '../../../dialog/SelectReagentDialog.vue';
export default {
name: "SWYPFXRYPZB",
components: { BaseInfoFormPcakge, LineLabel, TableList, Step, CustomTable,TableOpertaion,SelectReagentDialog },
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.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",
},
act: {
label: 'template.common.actualFill',
type: "select",
fillType: "actFill",
otherCode: "actOther",
multiple: true,
options: this.getDictOptions('business_pztj')
}
}
},
{
type: "cellItem",
label: 'template.sp.sp008.rqcz',
config: {
rqcz: {
type: "select",
multiple: true,
fillType: "actFill",
options: this.getDictOptions('business_rqcz'),
otherCode: "rqczOther",
},
}
},
{
type: "cellItem",
label: 'template.sp.sp008.clsj',
config: {
startDate: {
label: 'template.common.startTime',
type: "input",
},
endDate: {
label: 'template.common.endTime',
type: "input",
},
}
}
]
},
stepFormConfig() {
return [
{
type: "step",
config: {
jz: {
label: 'template.sp.sp011.xzxsy',
type: "input",
fillType: "preFill",
subType: "clickable",
subKey: "subJz",
subFillType: "actFill",
maxlength: 20,
labelWidth: 80,
},
}
}
]
},
tableStepColumns() {
return getSWYPFXFFXYPZBBTableConfig(this,'business_sp_rxjzxy',true);
},
},
data() {
return {
reagentType: "",//12
currentSubKey: "",//key
rowIndex:0,//
resource: [],
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(this.fillType === "actFill"){
this.getCode(v);
}
}
}
},
methods: {
//
handleJzClickable(obj){
this.reagentType = 1//
this.currentSubKey = obj.subKey;
this.$refs.selectReagentDialogRef.show()
},
//
onSelectReagentSubmit(code,row){
if(this.reagentType===1){
this.$refs.stepFormPackageRef.updateFormData(this.currentSubKey, code);
}else{
this.$refs.tableRef.updateDataSourceByRowIndex(this.rowIndex,{
[this.currentSubKey]: code,
})
}
this.$refs.selectReagentDialogRef.onCancel()
},
//
handleClickable(col, rowIndex) {
//
this.reagentType = 2
this.rowIndex = rowIndex
this.currentSubKey = col.prop;
console.log("clickable",rowIndex, col)
if(col.prop === "sjry"){
//-
this.$refs.selectReagentDialogRef.show()
}
},
//
async getCode(v){
const {stepTableFormData = []} = v;
if(stepTableFormData && stepTableFormData.length>0 && !stepTableFormData[0].bhCode){
const result = await getLatestSn({
count: stepTableFormData.length,
})
if(result.code == 200){
if(stepTableFormData.length===0){
this.$refs.tableRef.updateDataSourceByRowIndex(0,{
[bhCode]: result.data,
})
}else{
for(let i=0;i<stepTableFormData.length;i++){
this.$refs.tableRef.updateDataSourceByRowIndex(i,{
bhCode: result.data[i],
})
}
}
}
}
},
//
getFilledFormData(){
return this.getFilledFormDataByRefs(["baseInfoRef", "storageConditionRef", "stepFormPackageRef", "tableRef","stepRef", "remarkRef"])
},
async getFormData() {
let content = await this.validFormFields(["baseInfoRef", "storageConditionRef", "stepFormPackageRef","tableRef" ,"stepRef", "remarkRef"]);
//resource
let tmpResource = []
let tableList = content.stepTableFormData
for(let i=0;i<tableList.length;i++){
//
let item = tableList[i]
tmpResource.push({
mc: null,
bh: item.bh+item.bhCode,
ph: null,
nd: item.hhwznd + content.headerSelectFields.hhwzndUnit,
source: 'ELN配制',
sxrq: null,
ndz: item.hhwznd,
nddw: content.headerSelectFields.hhwzndUnit,
kc: item.sjjzxql+item.sjryxql,//todo -
kcdw: content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --
syl: null,
syldw:content.headerSelectFields.sjryxqlUnit || content.headerSelectFields.sjjzxqlUnit,//todo --,
yxzq:null,
yxzqdw:null,
})
}
//使
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>

+ 22
- 4
src/views/business/comps/template/formConfig/SWYPFXFFXYPZBBTableConfig.js View File

@ -1,8 +1,14 @@
// 生物样品分析方法学样品制备表-表格配置 // 生物样品分析方法学样品制备表-表格配置
// selectKey:编号选择的数据源key // selectKey:编号选择的数据源key
// isXsy是否时稀释液:稀释液的名称不一样 // isXsy是否时稀释液:稀释液的名称不一样
export const getSWYPFXFFXYPZBBTableConfig = ($this, selectKey, isXsy) => {
return [
// showKbjz 是否显示空白机制的列:生物样品分析方法学样品制备表(Matrix effect)-生物样品分析方法学样品制备表(基质效应)
export const getSWYPFXFFXYPZBBTableConfig = (
$this,
selectKey,
isXsy,
showKbjz
) => {
let arr = [
{ {
label: 'template.sp.sp008.bh', label: 'template.sp.sp008.bh',
prop: 'bh', prop: 'bh',
@ -48,7 +54,8 @@ export const getSWYPFXFFXYPZBBTableConfig = ($this, selectKey, isXsy) => {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
bodyCompareTo: 'yjryxql'
bodyCompareTo: 'yjryxql',
copyFrom: 'yjryxql'
}, },
{ {
label: isXsy ? 'template.sp.sp011.yjxsyxql' : 'template.sp.sp008.yjjzxql', label: isXsy ? 'template.sp.sp011.yjxsyxql' : 'template.sp.sp008.yjjzxql',
@ -71,7 +78,8 @@ export const getSWYPFXFFXYPZBBTableConfig = ($this, selectKey, isXsy) => {
bodyType: 'inputNumber', bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyMaxlength: 10, bodyMaxlength: 10,
bodyCompareTo: 'yjjzxql'
bodyCompareTo: 'yjjzxql',
copyFrom: 'yjjzxql'
}, },
{ {
label: 'template.sp.sp008.hhwznd', label: 'template.sp.sp008.hhwznd',
@ -85,4 +93,14 @@ export const getSWYPFXFFXYPZBBTableConfig = ($this, selectKey, isXsy) => {
bodyMaxlength: 10 bodyMaxlength: 10
} }
] ]
if (showKbjz) {
arr.splice(4, 0, {
label: 'template.sp.sp013.kbjzbh',
prop: 'kbjzbh',
bodyType: 'clickable',
bodyFillType: 'actFill',
width: 280
})
}
return arr
} }

Loading…
Cancel
Save