|
|
|
@ -16,43 +16,8 @@ |
|
|
|
:formData="formData" |
|
|
|
/> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl014.gyzjxx" /> |
|
|
|
<CustomTable |
|
|
|
:columns="gyzjColumns" |
|
|
|
:ref="refConf.gyzj" |
|
|
|
:showOperation="fillType === 'actFill'" |
|
|
|
:showAddRow="fillType === 'actFill'" |
|
|
|
:formData="formData" |
|
|
|
:prefixKey="`gyzjTable`" |
|
|
|
> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
:columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'gyzjTableRef')" |
|
|
|
></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl014.sysj" /> |
|
|
|
<CustomTable |
|
|
|
:columns="sysjColumns" |
|
|
|
:ref="refConf.sysj" |
|
|
|
:showOperation="fillType === 'actFill'" |
|
|
|
:showAddRow="fillType === 'actFill'" |
|
|
|
:formData="formData" |
|
|
|
:prefixKey="`sysjTable`" |
|
|
|
> |
|
|
|
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> |
|
|
|
<TableOpertaionDelete |
|
|
|
:row="row" |
|
|
|
:rowIndex="rowIndex" |
|
|
|
:columns="columns" |
|
|
|
@deleteRow="() => deleteTableRow(rowIndex, 'sysjTableRef')" |
|
|
|
></TableOpertaionDelete> |
|
|
|
</template> |
|
|
|
</CustomTable> |
|
|
|
<TableList label="template.common.gyzjInfo" :columns="gyzjColumns" :dataSource="resourceGyzj" /> |
|
|
|
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" /> |
|
|
|
|
|
|
|
<LineLabel label="template.dl.dl007.yqsyxx" /> |
|
|
|
<CustomTable |
|
|
|
@ -158,8 +123,6 @@ import templateMixin from '../../mixins/templateMixin' |
|
|
|
|
|
|
|
const refConf = { |
|
|
|
base: 'baseInfoRef', |
|
|
|
gyzj: 'gyzjTableRef', |
|
|
|
sysj: 'sysjTableRef', |
|
|
|
yqsy: 'yqsyTableRef', |
|
|
|
xbInfo: 'xbInfoRef', |
|
|
|
jlzInfo: 'jlzInfoRef', |
|
|
|
@ -202,29 +165,102 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 备注表单配置 |
|
|
|
yqsyColumns() { |
|
|
|
remarkConfig() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.yqmc', |
|
|
|
prop: 'yqmc', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
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 |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.yqxh', |
|
|
|
prop: 'yqxh', |
|
|
|
bodyType: 'input', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
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' |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.yqbh', |
|
|
|
type: 'cellItem', |
|
|
|
label: 'template.dl.dl014.czsj', |
|
|
|
config: { |
|
|
|
startDate: { |
|
|
|
label: 'template.dl.dl014.kssj', |
|
|
|
type: 'input', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
endDate: { |
|
|
|
label: 'template.dl.dl014.jssj', |
|
|
|
type: 'input', |
|
|
|
disabled: true |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
// 仪器使用信息 |
|
|
|
yqsyColumns() { |
|
|
|
return [ |
|
|
|
{ |
|
|
|
label: 'template.dl.dl007.yqbh', |
|
|
|
prop: 'yqbh', |
|
|
|
bodyType: 'yq', |
|
|
|
bodyFillType: 'actFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.xccsjzjdrq', |
|
|
|
prop: 'xccsjzjdrq', |
|
|
|
label: 'template.dl.dl007.yqmc', |
|
|
|
prop: 'yqmc', |
|
|
|
bodyType: 'input', |
|
|
|
bodyDisabled: true, |
|
|
|
bodyFillType: 'actFill', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl007.yqxh', |
|
|
|
prop: 'yqxh', |
|
|
|
bodyType: 'input', |
|
|
|
bodyDisabled: true, |
|
|
|
bodyFillType: 'actFill', |
|
|
|
disabled: true |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl007.xccsjzjdrq', |
|
|
|
prop: 'jzrq', |
|
|
|
bodyType: 'input', |
|
|
|
bodyDisabled: true, |
|
|
|
bodyFillType: 'actFill', |
|
|
|
@ -332,7 +368,11 @@ export default { |
|
|
|
prop: 'gysqgc', |
|
|
|
bodyType: 'select', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyOptions: this.getDictOptions('business_dl_gysqgc') |
|
|
|
bodyOptions: [ |
|
|
|
{ label: '良好', value: '良好' }, |
|
|
|
{ label: '中', value: '中' }, |
|
|
|
{ label: '差', value: '差' } |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: 'template.dl.dl014.ysplyjrl', |
|
|
|
@ -352,6 +392,8 @@ export default { |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysplyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
copyFrom: 'ysplyjrl', |
|
|
|
compareTo: 'ysplyjrl', |
|
|
|
fillType: 'preFill' |
|
|
|
} |
|
|
|
] |
|
|
|
@ -377,6 +419,8 @@ export default { |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'yss9hhyjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
copyFrom: 'yss9hhyjrl', |
|
|
|
compareTo: 'yss9hhyjrl', |
|
|
|
fillType: 'preFill' |
|
|
|
} |
|
|
|
) |
|
|
|
@ -408,6 +452,8 @@ export default { |
|
|
|
bodyMaxlength: 10, |
|
|
|
headerSelectKey: 'ysgspjrlUnit', |
|
|
|
headerOptions: this.getDictOptions('business_tjdw'), |
|
|
|
copyFrom: 'ysgspjrl', |
|
|
|
compareTo: 'ysgspjrl', |
|
|
|
fillType: 'preFill' |
|
|
|
}, |
|
|
|
{ |
|
|
|
@ -415,7 +461,12 @@ export default { |
|
|
|
prop: 'gyhzqk', |
|
|
|
bodyType: 'select', |
|
|
|
bodyFillType: 'actFill', |
|
|
|
bodyOptions: this.getDictOptions('business_dl_gyhzqk') |
|
|
|
bodyOptions: [ |
|
|
|
{ label: '严重', value: '严重' }, |
|
|
|
{ label: '中等', value: '中等' }, |
|
|
|
{ label: '较少', value: '较少' }, |
|
|
|
{ label: '无', value: '无' } |
|
|
|
] |
|
|
|
} |
|
|
|
) |
|
|
|
|
|
|
|
@ -432,7 +483,8 @@ export default { |
|
|
|
mounted() { |
|
|
|
// 初始化 isSftjs9Yes 状态 |
|
|
|
if (this.formData.sftjs9) { |
|
|
|
this.isSftjs9Yes = this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes' |
|
|
|
this.isSftjs9Yes = |
|
|
|
this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes' |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
@ -443,19 +495,17 @@ export default { |
|
|
|
// 获取已填写的表单数据 |
|
|
|
getFilledFormData() { |
|
|
|
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 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, |
|
|
|
@ -470,8 +520,6 @@ export default { |
|
|
|
async getFormData() { |
|
|
|
const refsToValidate = [ |
|
|
|
refConf.base, |
|
|
|
refConf.gyzj, |
|
|
|
refConf.sysj, |
|
|
|
refConf.yqsy, |
|
|
|
refConf.xbInfo, |
|
|
|
refConf.jlzInfo, |
|
|
|
@ -491,8 +539,6 @@ export default { |
|
|
|
async validFields() { |
|
|
|
const refsToValidate = [ |
|
|
|
refConf.base, |
|
|
|
refConf.gyzj, |
|
|
|
refConf.sysj, |
|
|
|
refConf.yqsy, |
|
|
|
refConf.xbInfo, |
|
|
|
refConf.jlzInfo, |
|
|
|
@ -504,16 +550,36 @@ export default { |
|
|
|
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 || []), |
|
|
|
...(jlzTableResource.sjResource || []) |
|
|
|
] |
|
|
|
this.yqResourceTmp = yqsyStepResource.yqResource || [] |
|
|
|
// 从仪器使用信息表格中提取仪器资源 |
|
|
|
const yqsyData = this.$refs.yqsyTableRef?.getFilledFormData() |
|
|
|
const yqsyList = yqsyData?.stepTableFormData || [] |
|
|
|
|
|
|
|
// 提取仪器资源 |
|
|
|
this.yqResourceTmp = yqsyList |
|
|
|
.filter(item => item.yqbh) |
|
|
|
.map(item => ({ |
|
|
|
bh: item.yqbh, |
|
|
|
mc: item.yqmc, |
|
|
|
xh: item.yqxh |
|
|
|
})) |
|
|
|
|
|
|
|
// 从剂量组表格中提取试剂资源(如果有 S9混合液编号或细胞编号) |
|
|
|
const jlzData = this.$refs.jlzTableRef?.getFilledFormData() |
|
|
|
const jlzList = jlzData?.stepTableFormData || [] |
|
|
|
|
|
|
|
const sjResourceFromJlz = [] |
|
|
|
jlzList.forEach(item => { |
|
|
|
// 如果有细胞编号,添加到试剂资源 |
|
|
|
if (item.xybh) { |
|
|
|
sjResourceFromJlz.push({ |
|
|
|
bh: item.xybh, |
|
|
|
type: 'cell' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
this.resourceTmp = sjResourceFromJlz |
|
|
|
|
|
|
|
return this.resourceTmp |
|
|
|
}, |
|
|
|
onRegentSubmit(e) { |
|
|
|
@ -524,7 +590,7 @@ export default { |
|
|
|
const params = { |
|
|
|
yqmc: row.mc, |
|
|
|
yqxh: row.xh, |
|
|
|
xccsjzjdrq: row.jzrq |
|
|
|
jzrq: row.jzrq |
|
|
|
} |
|
|
|
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) |
|
|
|
} |
|
|
|
@ -544,12 +610,12 @@ export default { |
|
|
|
// 获取剂量组总数 |
|
|
|
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++) { |
|
|
|
@ -557,10 +623,10 @@ export default { |
|
|
|
jlzzmc: '' |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 直接修改 formData,CustomTable 会自动响应 |
|
|
|
this.$set(this.formData, 'jlzmcTableData', newJlzmcRows) |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(`已生成 ${jlzzs} 个剂量组名称`) |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -569,35 +635,37 @@ export default { |
|
|
|
// 获取平行瓶数 |
|
|
|
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() === '') |
|
|
|
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({ |
|
|
|
@ -615,10 +683,10 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// 直接修改 formData,CustomTable 会自动响应 |
|
|
|
this.$set(this.formData, 'jlzTableData', newRows) |
|
|
|
|
|
|
|
|
|
|
|
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`) |
|
|
|
}, |
|
|
|
// 保存 |
|
|
|
|