|
|
|
@ -81,8 +81,58 @@ |
|
|
|
:formData="formData" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 预留区域 - 剂量组配制信息 --> |
|
|
|
<!-- 剂量组配制信息 --> |
|
|
|
<LineLabel label="template.dl.dl014.jlzpzxx" /> |
|
|
|
<div class="template-form-item"> |
|
|
|
<BaseInfoFormPackage |
|
|
|
fieldItemLabel="" |
|
|
|
label="" |
|
|
|
:ref="refConf.jlzInfo" |
|
|
|
:formConfig="jlzInfoFormConfig" |
|
|
|
:formData="formData" |
|
|
|
@select="onSftjs9Change" |
|
|
|
@clickButton="handleJlzzsButton" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 剂量组名称列表 --> |
|
|
|
<CustomTable |
|
|
|
:columns="jlzmcTableColumns" |
|
|
|
:ref="refConf.jlzmcTable" |
|
|
|
:showOperation="false" |
|
|
|
:showAddRow="false" |
|
|
|
:formData="jlzmcTableFormData" |
|
|
|
:prefixKey="`jlzmcTable`" |
|
|
|
></CustomTable> |
|
|
|
|
|
|
|
<!-- 完成按钮 --> |
|
|
|
<div class="jlzmc-complete-btn" v-if="fillType === 'preFill'"> |
|
|
|
<el-button type="primary" @click="handleJlzmcComplete">{{ |
|
|
|
$t('template.dl.dl014.wcButton') |
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 剂量组列表 --> |
|
|
|
<CustomTable |
|
|
|
:columns="jlzTableColumns" |
|
|
|
:ref="refConf.jlzTable" |
|
|
|
:showOperation="false" |
|
|
|
:showAddRow="false" |
|
|
|
:formData="jlzTableFormData" |
|
|
|
:prefixKey="`jlzTable`" |
|
|
|
> |
|
|
|
<template |
|
|
|
slot="operation" |
|
|
|
slot-scope="{ row, rowIndex, columns }" |
|
|
|
> |
|
|
|
<TableOpertaionDelete |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
:columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'jlzTableRef')" |
|
|
|
></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
</div> |
|
|
|
|
|
|
|
<BaseInfoFormPackage |
|
|
|
fieldItemLabel="template.dl.dl007.bz" |
|
|
|
@ -105,7 +155,6 @@ import LineLabel from '@/components/Template/LineLabel' |
|
|
|
import TableList from '@/components/Template/Table' |
|
|
|
import Step from '@/components/Template/Step' |
|
|
|
import templateMixin from '../../mixins/templateMixin' |
|
|
|
import moment from 'moment' |
|
|
|
|
|
|
|
const refConf = { |
|
|
|
base: 'baseInfoRef', |
|
|
|
@ -113,6 +162,9 @@ const refConf = { |
|
|
|
sysj: 'sysjTableRef', |
|
|
|
yqsy: 'yqsyTableRef', |
|
|
|
xbInfo: 'xbInfoRef', |
|
|
|
jlzInfo: 'jlzInfoRef', |
|
|
|
jlzmcTable: 'jlzmcTableRef', |
|
|
|
jlzTable: 'jlzTableRef', |
|
|
|
remark: 'remarkRef' |
|
|
|
} |
|
|
|
const refNames = Object.values(refConf) |
|
|
|
@ -135,152 +187,21 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
// 备注表单配置 |
|
|
|
remarkConfig() { |
|
|
|
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.dl.dl014.sydd', |
|
|
|
config: { |
|
|
|
sydd: { |
|
|
|
span: 1, |
|
|
|
label: 'template.dl.dl014.sydd', |
|
|
|
type: 'select', |
|
|
|
options: this.getDictOptions('business_sydd'), |
|
|
|
fillType: 'actFill', |
|
|
|
otherCode: 'syddOther' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'cellItem', |
|
|
|
label: 'template.dl.dl014.czsj', |
|
|
|
config: { |
|
|
|
kssj: { |
|
|
|
label: 'template.dl.dl014.kssj', |
|
|
|
type: 'input', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
jssj: { |
|
|
|
label: 'template.dl.dl014.jssj', |
|
|
|
type: 'input', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 给药制剂信息 |
|
|
|
gyzjColumns() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.mc', |
|
|
|
prop: 'mc', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.bh', |
|
|
|
prop: 'bh', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.wzly', |
|
|
|
prop: 'wzly', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.nd', |
|
|
|
prop: 'nd', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sxr', |
|
|
|
prop: 'sxr', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
} |
|
|
|
] |
|
|
|
// 剂量组名称表格数据 |
|
|
|
jlzmcTableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.jlzmcTableData || [], |
|
|
|
headerSelectFields: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 试验试剂信息 |
|
|
|
sysjColumns() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sjmc', |
|
|
|
prop: 'sjmc', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.bh', |
|
|
|
prop: 'bh', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ph', |
|
|
|
prop: 'ph', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ndhlcd', |
|
|
|
prop: 'ndhlcd', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ly', |
|
|
|
prop: 'ly', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sxr', |
|
|
|
prop: 'sxr', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
} |
|
|
|
] |
|
|
|
// 剂量组列表表格数据 |
|
|
|
jlzTableFormData() { |
|
|
|
return { |
|
|
|
stepTableFormData: this.formData.jlzTableData || [], |
|
|
|
headerSelectFields: this.formData.jlzHeaderSelectFields || {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 仪器使用信息 |
|
|
|
// 备注表单配置 |
|
|
|
yqsyColumns() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
@ -320,26 +241,198 @@ export default { |
|
|
|
bltj: { |
|
|
|
label: 'template.dl.dl014.bltj', |
|
|
|
type: 'select', |
|
|
|
options: this.getDictOptions('business_bltj'), |
|
|
|
options: this.getDictOptions('business_dl_qsxjbltj'), |
|
|
|
fillType: 'preFill', |
|
|
|
otherCode: 'bltjOther' |
|
|
|
}, |
|
|
|
xbmc: { |
|
|
|
label: 'template.dl.dl014.xbmc', |
|
|
|
type: 'select', |
|
|
|
options: this.getDictOptions('business_xbmc'), |
|
|
|
options: this.getDictOptions('business_dl_xbmc'), |
|
|
|
fillType: 'preFill', |
|
|
|
otherCode: 'xbmcOther' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 剂量组配制信息表单配置 |
|
|
|
jlzInfoFormConfig() { |
|
|
|
const firstStepConfig = { |
|
|
|
pxpb: { |
|
|
|
label: 'template.dl.dl014.pxpb', |
|
|
|
type: 'inputNumber', |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
sftjs9: { |
|
|
|
label: 'template.dl.dl014.sftjs9', |
|
|
|
type: 'select', |
|
|
|
options: [ |
|
|
|
{ label: '是', value: '是' }, |
|
|
|
{ label: '否', value: '否' } |
|
|
|
], |
|
|
|
fillType: 'preFill' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 如果选择了添加S9,则添加S9混合液编号字段 |
|
|
|
if (this.isSftjs9Yes) { |
|
|
|
firstStepConfig.s9hhybh = { |
|
|
|
label: 'template.dl.dl014.s9hhybh', |
|
|
|
type: 'sj', |
|
|
|
fillType: 'actFill' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 添加剂量组总数字段 |
|
|
|
firstStepConfig.jlzzs = { |
|
|
|
label: 'template.dl.dl014.jlzzs', |
|
|
|
type: 'inputNumber', |
|
|
|
fillType: 'preFill', |
|
|
|
subType: 'button', |
|
|
|
subKey: 'jlzzsButton', |
|
|
|
buttonName: 'template.dl.dl014.qrButton' |
|
|
|
} |
|
|
|
|
|
|
|
return [ |
|
|
|
{ |
|
|
|
type: 'step', |
|
|
|
config: firstStepConfig |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 剂量组名称表格列配置 |
|
|
|
jlzmcTableColumns() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.jlzzmc', |
|
|
|
prop: 'jlzzmc', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'preFill' |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 剂量组表格列配置 |
|
|
|
jlzTableColumns() { |
|
|
|
const columns = [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.jlzb', |
|
|
|
prop: 'jlzb', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.xybh', |
|
|
|
prop: 'xybh', |
|
|
|
bodyType: 'sj', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.gysqgc', |
|
|
|
prop: 'gysqgc', |
|
|
|
bodyType: 'select', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyOptions: this.getDictOptions('business_dl_gysqgc') |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ysplyjrl', |
|
|
|
prop: 'ysplyjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'preFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysplyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sjplyjrl', |
|
|
|
prop: 'sjplyjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysplyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
} |
|
|
|
] |
|
|
|
|
|
|
|
// 如果选择了添加S9,则添加S9相关列 |
|
|
|
if (this.isSftjs9Yes) { |
|
|
|
columns.push( |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.yss9hhyjrl', |
|
|
|
prop: 'yss9hhyjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'preFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'yss9hhyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sjs9hhyjrl', |
|
|
|
prop: 'sjs9hhyjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'yss9hhyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
} |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
// 添加剩余的列 |
|
|
|
columns.push( |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.gspbh', |
|
|
|
prop: 'gspbh', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ysgspjrl', |
|
|
|
prop: 'ysgspjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'preFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysgspjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.sjgspjrl', |
|
|
|
prop: 'sjgspjrl', |
|
|
|
bodyType: 'inputNumber', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysgspjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.gyhzqk', |
|
|
|
prop: 'gyhzqk', |
|
|
|
bodyType: 'select', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyOptions: this.getDictOptions('business_dl_gyhzqk') |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
return columns |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
formData: {}, |
|
|
|
refConf |
|
|
|
refConf, |
|
|
|
isSftjs9Yes: false // 是否添加S9 |
|
|
|
} |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
// 初始化 isSftjs9Yes 状态 |
|
|
|
if (this.formData.sftjs9) { |
|
|
|
this.isSftjs9Yes = this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes' |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -349,23 +442,76 @@ export default { |
|
|
|
}, |
|
|
|
// 获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
return this.getFilledFormDataByRefs(refNames) |
|
|
|
const baseData = this.$refs[refConf.base]?.getFilledFormData() || {} |
|
|
|
const gyzjData = this.$refs[refConf.gyzj]?.getFilledFormData() || {} |
|
|
|
const sysjData = this.$refs[refConf.sysj]?.getFilledFormData() || {} |
|
|
|
const yqsyData = this.$refs[refConf.yqsy]?.getFilledFormData() || {} |
|
|
|
const xbInfoData = this.$refs[refConf.xbInfo]?.getFilledFormData() || {} |
|
|
|
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() || {} |
|
|
|
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData() || {} |
|
|
|
const jlzTableData = this.$refs[refConf.jlzTable]?.getFilledFormData() || {} |
|
|
|
const remarkData = this.$refs[refConf.remark]?.getFilledFormData() || {} |
|
|
|
|
|
|
|
return { |
|
|
|
...baseData, |
|
|
|
...gyzjData, |
|
|
|
...sysjData, |
|
|
|
...yqsyData, |
|
|
|
...xbInfoData, |
|
|
|
...jlzInfoData, |
|
|
|
...remarkData, |
|
|
|
// 保存两个表格的数据到 formData |
|
|
|
jlzmcTableData: jlzmcTableData.stepTableFormData || [], |
|
|
|
jlzTableData: jlzTableData.stepTableFormData || [], |
|
|
|
jlzHeaderSelectFields: jlzTableData.headerSelectFields || {} |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取填写完成的表单数据 |
|
|
|
async getFormData() { |
|
|
|
return await this.validFormFields(refNames) |
|
|
|
const refsToValidate = [ |
|
|
|
refConf.base, |
|
|
|
refConf.gyzj, |
|
|
|
refConf.sysj, |
|
|
|
refConf.yqsy, |
|
|
|
refConf.xbInfo, |
|
|
|
refConf.jlzInfo, |
|
|
|
refConf.jlzmcTable, |
|
|
|
refConf.jlzTable, |
|
|
|
refConf.remark |
|
|
|
] |
|
|
|
|
|
|
|
const validFlag = await this.validFormFields(refsToValidate) |
|
|
|
if (!validFlag) { |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
|
return this.getFilledFormData() |
|
|
|
}, |
|
|
|
// 只做校验 |
|
|
|
async validFields() { |
|
|
|
return await this.validFormFields(refNames) |
|
|
|
const refsToValidate = [ |
|
|
|
refConf.base, |
|
|
|
refConf.gyzj, |
|
|
|
refConf.sysj, |
|
|
|
refConf.yqsy, |
|
|
|
refConf.xbInfo, |
|
|
|
refConf.jlzInfo, |
|
|
|
refConf.jlzmcTable, |
|
|
|
refConf.jlzTable, |
|
|
|
refConf.remark |
|
|
|
] |
|
|
|
|
|
|
|
return await this.validFormFields(refsToValidate) |
|
|
|
}, |
|
|
|
getResource() { |
|
|
|
const sysjStepResource = this.$refs.sysjTableRef.getStepResource() |
|
|
|
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource() |
|
|
|
const jlzTableResource = this.$refs.jlzTableRef.getStepResource() |
|
|
|
// 使用的试剂、仪器 |
|
|
|
this.resourceTmp = [ |
|
|
|
...(sysjStepResource.sjResource || []), |
|
|
|
...(yqsyStepResource.sjResource || []) |
|
|
|
...(yqsyStepResource.sjResource || []), |
|
|
|
...(jlzTableResource.sjResource || []) |
|
|
|
] |
|
|
|
this.yqResourceTmp = yqsyStepResource.yqResource || [] |
|
|
|
return this.resourceTmp |
|
|
|
@ -383,6 +529,98 @@ export default { |
|
|
|
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 处理是否添加S9的变化 |
|
|
|
onSftjs9Change(e) { |
|
|
|
const { key, value } = e |
|
|
|
if (key === 'sftjs9') { |
|
|
|
// 更新 isSftjs9Yes 状态,computed 属性会自动响应 |
|
|
|
this.isSftjs9Yes = value === '是' || value === 'Yes' |
|
|
|
} |
|
|
|
}, |
|
|
|
// 处理剂量组总数确认按钮 |
|
|
|
handleJlzzsButton(item) { |
|
|
|
const { subKey } = item || {} |
|
|
|
if (subKey === 'jlzzsButton') { |
|
|
|
// 获取剂量组总数 |
|
|
|
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() |
|
|
|
const jlzzs = jlzInfoData?.jlzzs |
|
|
|
|
|
|
|
if (!jlzzs || jlzzs <= 0) { |
|
|
|
this.$message.warning('请先输入剂量组总数') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 生成剂量组名称表格数据 |
|
|
|
const newJlzmcRows = [] |
|
|
|
for (let i = 0; i < jlzzs; i++) { |
|
|
|
newJlzmcRows.push({ |
|
|
|
jlzzmc: '' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
// 直接修改 formData,CustomTable 会自动响应 |
|
|
|
this.$set(this.formData, 'jlzmcTableData', newJlzmcRows) |
|
|
|
|
|
|
|
this.$message.success(`已生成 ${jlzzs} 个剂量组名称`) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 处理剂量组名称完成按钮 |
|
|
|
handleJlzmcComplete() { |
|
|
|
// 获取平行瓶数 |
|
|
|
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() |
|
|
|
const pxpb = jlzInfoData?.pxpb |
|
|
|
|
|
|
|
if (!pxpb || pxpb <= 0) { |
|
|
|
this.$message.warning('请先输入平行瓶数') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 从 CustomTable ref 获取最新的剂量组名称列表数据 |
|
|
|
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData() |
|
|
|
const jlzmcList = jlzmcTableData?.stepTableFormData || [] |
|
|
|
|
|
|
|
if (jlzmcList.length === 0) { |
|
|
|
this.$message.warning('请先设置剂量组名称') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 检查是否所有剂量组名称都已填写 |
|
|
|
const emptyNames = jlzmcList.filter(item => !item.jlzzmc || item.jlzzmc.trim() === '') |
|
|
|
if (emptyNames.length > 0) { |
|
|
|
this.$message.warning('请填写所有剂量组名称') |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
// 生成剂量组列表数据 |
|
|
|
const newRows = [] |
|
|
|
|
|
|
|
// 遍历每个剂量组名称 |
|
|
|
jlzmcList.forEach((jlzmcItem) => { |
|
|
|
const jlzzmc = jlzmcItem.jlzzmc |
|
|
|
|
|
|
|
// 为每个剂量组名称生成 pxpb 行数据 |
|
|
|
for (let i = 0; i < pxpb; i++) { |
|
|
|
newRows.push({ |
|
|
|
jlzb: jlzzmc, // 剂量组别使用剂量组名称 |
|
|
|
xybh: '', |
|
|
|
gysqgc: '', |
|
|
|
ysplyjrl: '', |
|
|
|
sjplyjrl: '', |
|
|
|
yss9hhyjrl: '', |
|
|
|
sjs9hhyjrl: '', |
|
|
|
gspbh: '', |
|
|
|
ysgspjrl: '', |
|
|
|
sjgspjrl: '', |
|
|
|
gyhzqk: '' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
// 直接修改 formData,CustomTable 会自动响应 |
|
|
|
this.$set(this.formData, 'jlzTableData', newRows) |
|
|
|
|
|
|
|
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`) |
|
|
|
}, |
|
|
|
// 保存 |
|
|
|
async onSave() { |
|
|
|
const formData = this.getStepResource() |
|
|
|
@ -399,13 +637,10 @@ export default { |
|
|
|
.print-btn { |
|
|
|
margin-bottom: 20px; |
|
|
|
} |
|
|
|
.config-header-end { |
|
|
|
|
|
|
|
.jlzmc-complete-btn { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 15px; |
|
|
|
font-weight: bold; |
|
|
|
font-size: 16px; |
|
|
|
color: #303133; |
|
|
|
justify-content: center; |
|
|
|
margin: 15px 0; |
|
|
|
} |
|
|
|
</style> |