Browse Source

feat:[模板管理][DL014~DL015完善]

ouqian
ouqian 1 month ago
parent
commit
4954f52071
4 changed files with 339 additions and 223 deletions
  1. +9
    -1
      src/lang/en/template/dl.js
  2. +9
    -1
      src/lang/zh/template/dl.js
  3. +157
    -89
      src/views/business/comps/template/comps/dl/DL014.vue
  4. +164
    -132
      src/views/business/comps/template/comps/dl/DL015.vue

+ 9
- 1
src/lang/en/template/dl.js View File

@ -213,7 +213,15 @@ export default {
}, },
dl015: { dl015: {
...common, ...common,
hyqk: 'Medium Change Status'
hyqk: 'Medium Change Status',
jlzb: 'Dose Group',
xybh: 'Suspension Number',
hyqszqk: 'Growth Before Medium Change',
hyqcdjqk: 'Precipitation Before Medium Change',
hyqqtqk: 'Other Conditions Before Medium Change',
qqpyy: 'Discard Culture Medium',
pbsxd: 'PBS Wash',
pyybrl: 'Culture Medium Volume Added (ul)'
}, },
dl016: { dl016: {
xbxx:'细胞信息', xbxx:'细胞信息',

+ 9
- 1
src/lang/zh/template/dl.js View File

@ -214,7 +214,15 @@ export default {
}, },
dl015: { dl015: {
...common, ...common,
hyqk: '换液情况'
hyqk: '换液情况',
jlzb: '剂量组别',
xybh: '悬液编号',
hyqszqk: '换液前生长情况',
hyqcdjqk: '换液前沉淀情况',
hyqqtqk: '换液前其他情况',
qqpyy: '倾去培养液',
pbsxd: 'PBS洗涤',
pyybrl: '培养液补入量(ul)'
}, },
dl016: { dl016: {
xbxx:'细胞信息', xbxx:'细胞信息',

+ 157
- 89
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -16,43 +16,8 @@
:formData="formData" :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" /> <LineLabel label="template.dl.dl007.yqsyxx" />
<CustomTable <CustomTable
@ -158,8 +123,6 @@ import templateMixin from '../../mixins/templateMixin'
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
gyzj: 'gyzjTableRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef', yqsy: 'yqsyTableRef',
xbInfo: 'xbInfoRef', xbInfo: 'xbInfoRef',
jlzInfo: 'jlzInfoRef', jlzInfo: 'jlzInfoRef',
@ -202,29 +165,102 @@ export default {
} }
}, },
// //
yqsyColumns() {
remarkConfig() {
return [ 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', prop: 'yqbh',
bodyType: 'yq', bodyType: 'yq',
bodyFillType: 'actFill' 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', bodyType: 'input',
bodyDisabled: true, bodyDisabled: true,
bodyFillType: 'actFill', bodyFillType: 'actFill',
@ -332,7 +368,11 @@ export default {
prop: 'gysqgc', prop: 'gysqgc',
bodyType: 'select', bodyType: 'select',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyOptions: this.getDictOptions('business_dl_gysqgc')
bodyOptions: [
{ label: '良好', value: '良好' },
{ label: '中', value: '中' },
{ label: '差', value: '差' }
]
}, },
{ {
label: 'template.dl.dl014.ysplyjrl', label: 'template.dl.dl014.ysplyjrl',
@ -352,6 +392,8 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'ysplyjrlUnit', headerSelectKey: 'ysplyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysplyjrl',
compareTo: 'ysplyjrl',
fillType: 'preFill' fillType: 'preFill'
} }
] ]
@ -377,6 +419,8 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'yss9hhyjrlUnit', headerSelectKey: 'yss9hhyjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'yss9hhyjrl',
compareTo: 'yss9hhyjrl',
fillType: 'preFill' fillType: 'preFill'
} }
) )
@ -408,6 +452,8 @@ export default {
bodyMaxlength: 10, bodyMaxlength: 10,
headerSelectKey: 'ysgspjrlUnit', headerSelectKey: 'ysgspjrlUnit',
headerOptions: this.getDictOptions('business_tjdw'), headerOptions: this.getDictOptions('business_tjdw'),
copyFrom: 'ysgspjrl',
compareTo: 'ysgspjrl',
fillType: 'preFill' fillType: 'preFill'
}, },
{ {
@ -415,7 +461,12 @@ export default {
prop: 'gyhzqk', prop: 'gyhzqk',
bodyType: 'select', bodyType: 'select',
bodyFillType: 'actFill', bodyFillType: 'actFill',
bodyOptions: this.getDictOptions('business_dl_gyhzqk')
bodyOptions: [
{ label: '严重', value: '严重' },
{ label: '中等', value: '中等' },
{ label: '较少', value: '较少' },
{ label: '无', value: '无' }
]
} }
) )
@ -432,7 +483,8 @@ export default {
mounted() { mounted() {
// isSftjs9Yes // isSftjs9Yes
if (this.formData.sftjs9) { if (this.formData.sftjs9) {
this.isSftjs9Yes = this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes'
this.isSftjs9Yes =
this.formData.sftjs9 === '是' || this.formData.sftjs9 === 'Yes'
} }
}, },
methods: { methods: {
@ -443,19 +495,17 @@ export default {
// //
getFilledFormData() { getFilledFormData() {
const baseData = this.$refs[refConf.base]?.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 yqsyData = this.$refs[refConf.yqsy]?.getFilledFormData() || {}
const xbInfoData = this.$refs[refConf.xbInfo]?.getFilledFormData() || {} const xbInfoData = this.$refs[refConf.xbInfo]?.getFilledFormData() || {}
const jlzInfoData = this.$refs[refConf.jlzInfo]?.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() || {} const remarkData = this.$refs[refConf.remark]?.getFilledFormData() || {}
return { return {
...baseData, ...baseData,
...gyzjData,
...sysjData,
...yqsyData, ...yqsyData,
...xbInfoData, ...xbInfoData,
...jlzInfoData, ...jlzInfoData,
@ -470,8 +520,6 @@ export default {
async getFormData() { async getFormData() {
const refsToValidate = [ const refsToValidate = [
refConf.base, refConf.base,
refConf.gyzj,
refConf.sysj,
refConf.yqsy, refConf.yqsy,
refConf.xbInfo, refConf.xbInfo,
refConf.jlzInfo, refConf.jlzInfo,
@ -491,8 +539,6 @@ export default {
async validFields() { async validFields() {
const refsToValidate = [ const refsToValidate = [
refConf.base, refConf.base,
refConf.gyzj,
refConf.sysj,
refConf.yqsy, refConf.yqsy,
refConf.xbInfo, refConf.xbInfo,
refConf.jlzInfo, refConf.jlzInfo,
@ -504,16 +550,36 @@ export default {
return await this.validFormFields(refsToValidate) return await this.validFormFields(refsToValidate)
}, },
getResource() { 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 return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
@ -524,7 +590,7 @@ export default {
const params = { const params = {
yqmc: row.mc, yqmc: row.mc,
yqxh: row.xh, yqxh: row.xh,
xccsjzjdrq: row.jzrq
jzrq: row.jzrq
} }
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
} }
@ -544,12 +610,12 @@ export default {
// //
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData()
const jlzzs = jlzInfoData?.jlzzs const jlzzs = jlzInfoData?.jlzzs
if (!jlzzs || jlzzs <= 0) { if (!jlzzs || jlzzs <= 0) {
this.$message.warning('请先输入剂量组总数') this.$message.warning('请先输入剂量组总数')
return return
} }
// //
const newJlzmcRows = [] const newJlzmcRows = []
for (let i = 0; i < jlzzs; i++) { for (let i = 0; i < jlzzs; i++) {
@ -557,10 +623,10 @@ export default {
jlzzmc: '' jlzzmc: ''
}) })
} }
// formDataCustomTable // formDataCustomTable
this.$set(this.formData, 'jlzmcTableData', newJlzmcRows) this.$set(this.formData, 'jlzmcTableData', newJlzmcRows)
this.$message.success(`已生成 ${jlzzs} 个剂量组名称`) this.$message.success(`已生成 ${jlzzs} 个剂量组名称`)
} }
}, },
@ -569,35 +635,37 @@ export default {
// //
const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData() const jlzInfoData = this.$refs[refConf.jlzInfo]?.getFilledFormData()
const pxpb = jlzInfoData?.pxpb const pxpb = jlzInfoData?.pxpb
if (!pxpb || pxpb <= 0) { if (!pxpb || pxpb <= 0) {
this.$message.warning('请先输入平行瓶数') this.$message.warning('请先输入平行瓶数')
return return
} }
// CustomTable ref // CustomTable ref
const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData() const jlzmcTableData = this.$refs[refConf.jlzmcTable]?.getFilledFormData()
const jlzmcList = jlzmcTableData?.stepTableFormData || [] const jlzmcList = jlzmcTableData?.stepTableFormData || []
if (jlzmcList.length === 0) { if (jlzmcList.length === 0) {
this.$message.warning('请先设置剂量组名称') this.$message.warning('请先设置剂量组名称')
return 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) { if (emptyNames.length > 0) {
this.$message.warning('请填写所有剂量组名称') this.$message.warning('请填写所有剂量组名称')
return return
} }
// //
const newRows = [] const newRows = []
// //
jlzmcList.forEach((jlzmcItem) => { jlzmcList.forEach((jlzmcItem) => {
const jlzzmc = jlzmcItem.jlzzmc const jlzzmc = jlzmcItem.jlzzmc
// pxpb // pxpb
for (let i = 0; i < pxpb; i++) { for (let i = 0; i < pxpb; i++) {
newRows.push({ newRows.push({
@ -615,10 +683,10 @@ export default {
}) })
} }
}) })
// formDataCustomTable // formDataCustomTable
this.$set(this.formData, 'jlzTableData', newRows) this.$set(this.formData, 'jlzTableData', newRows)
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`) this.$message.success(`已生成 ${newRows.length} 行剂量组数据`)
}, },
// //

+ 164
- 132
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,55 +16,38 @@
:formData="formData" :formData="formData"
/> />
<LineLabel label="template.dl.dl015.sysj" />
<CustomTable
:columns="sysjColumns"
:ref="refConf.sysj"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resource" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage
:ref="refConf.xbInfo"
:formConfig="xbInfoFormConfig"
:formData="formData" :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>
@onRegentSubmit="onRegentSubmit"
/>
<LineLabel label="template.dl.dl007.yqsyxx" />
<!-- 换液情况 -->
<LineLabel label="template.dl.dl015.hyqk" />
<CustomTable <CustomTable
:columns="yqsyColumns"
:ref="refConf.yqsy"
:columns="hyqkColumns"
:ref="refConf.hyqk"
@onRegentSubmit="(e) => onRegentSubmit(e)" @onRegentSubmit="(e) => onRegentSubmit(e)"
:showOperation="fillType === 'actFill'"
:showAddRow="fillType === 'actFill'"
:formData="formData"
:prefixKey="`yqsyTable`"
:showOperation="false"
:showAddRow="false"
:formData="hyqkFormData"
:prefixKey="`hyqkTable`"
> >
<template slot="operation" slot-scope="{ row, rowIndex, columns }"> <template slot="operation" slot-scope="{ row, rowIndex, columns }">
<TableOpertaionDelete <TableOpertaionDelete
:row="row" :row="row"
:rowIndex="rowIndex" :rowIndex="rowIndex"
:columns="columns" :columns="columns"
@deleteRow="() => deleteTableRow(rowIndex, 'yqsyTableRef')"
@deleteRow="() => deleteTableRow(rowIndex, 'hyqkTableRef')"
></TableOpertaionDelete> ></TableOpertaionDelete>
</template> </template>
</CustomTable> </CustomTable>
<LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage
:ref="refConf.xbInfo"
:formConfig="xbInfoFormConfig"
:formData="formData"
/>
<!-- 预留区域 - 换液情况 -->
<LineLabel label="template.dl.dl015.hyqk" />
<LineLabel label="template.dl.dl015.czbz" /> <LineLabel label="template.dl.dl015.czbz" />
<Step :ref="refConf.step" :formData="formData.stepData" /> <Step :ref="refConf.step" :formData="formData.stepData" />
@ -89,13 +72,11 @@ import LineLabel from '@/components/Template/LineLabel'
import TableList from '@/components/Template/Table' import TableList from '@/components/Template/Table'
import Step from '@/components/Template/Step' import Step from '@/components/Template/Step'
import templateMixin from '../../mixins/templateMixin' import templateMixin from '../../mixins/templateMixin'
import moment from 'moment'
const refConf = { const refConf = {
base: 'baseInfoRef', base: 'baseInfoRef',
sysj: 'sysjTableRef',
yqsy: 'yqsyTableRef',
xbInfo: 'xbInfoRef', xbInfo: 'xbInfoRef',
hyqk: 'hyqkTableRef',
step: 'stepRef', step: 'stepRef',
remark: 'remarkRef' remark: 'remarkRef'
} }
@ -119,6 +100,13 @@ export default {
} }
}, },
computed: { computed: {
//
hyqkFormData() {
return {
stepTableFormData: this.formData.hyqkTableData || [],
headerSelectFields: {}
}
},
// //
remarkConfig() { remarkConfig() {
return [ return [
@ -174,12 +162,12 @@ export default {
type: 'cellItem', type: 'cellItem',
label: 'template.dl.dl015.czsj', label: 'template.dl.dl015.czsj',
config: { config: {
kssj: {
startDate: {
label: 'template.dl.dl015.kssj', label: 'template.dl.dl015.kssj',
type: 'input', type: 'input',
disabled: true disabled: true
}, },
jssj: {
endDate: {
label: 'template.dl.dl015.jssj', label: 'template.dl.dl015.jssj',
type: 'input', type: 'input',
disabled: true disabled: true
@ -188,98 +176,102 @@ export default {
} }
] ]
}, },
//
sysjColumns() {
//
xbInfoFormConfig() {
return [ return [
{ {
label: 'template.dl.dl015.sjmc',
prop: 'sjmc',
bodyType: 'input',
bodyFillType: 'actFill'
},
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl015.qxbd',
type: 'qxbd',
qxbdType:'DL014',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
bltj: {
label: 'template.dl.dl015.bltj',
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
}
}
}
]
},
//
hyqkColumns() {
return [
{ {
label: 'template.dl.dl015.bh',
prop: 'bh',
label: 'template.dl.dl015.jlzb',
prop: 'jlzb',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
}, },
{ {
label: 'template.dl.dl015.ph',
prop: 'ph',
label: 'template.dl.dl015.xybh',
prop: 'xybh',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'actFill'
bodyFillType: 'actFill',
bodyDisabled: true,
disabled: true
}, },
{ {
label: 'template.dl.dl015.ndhlcd',
prop: 'ndhlcd',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqszqk',
prop: 'hyqszqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '良好', value: '良好' },
{ label: '中', value: '中' },
{ label: '差', value: '差' }
]
}, },
{ {
label: 'template.dl.dl015.ly',
prop: 'ly',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqcdjqk',
prop: 'hyqcdjqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '严重', value: '严重' },
{ label: '中等', value: '中等' },
{ label: '较少', value: '较少' },
{ label: '无', value: '无' }
]
}, },
{ {
label: 'template.dl.dl015.sxr',
prop: 'sxr',
bodyType: 'input',
bodyFillType: 'actFill'
}
]
},
// 使
yqsyColumns() {
return [
{
label: 'template.dl.dl015.yqmc',
prop: 'yqmc',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.hyqqtqk',
prop: 'hyqqtqk',
bodyType: 'select',
bodyFillType: 'actFill',
bodyOptions: [
{ label: '大量贴壁细胞变圆', value: '大量贴壁细胞变圆' },
{ label: '无', value: '无' }
]
}, },
{ {
label: 'template.dl.dl015.yqxh',
prop: 'yqxh',
bodyType: 'input',
bodyFillType: 'actFill'
label: 'template.dl.dl015.qqpyy',
prop: 'qqpyy',
bodyType: 'checkbox',
bodyFillType: 'actFill',
checkboxLabel: ''
}, },
{ {
label: 'template.dl.dl015.yqbh',
prop: 'yqbh',
bodyType: 'yq',
bodyFillType: 'actFill'
label: 'template.dl.dl015.pbsxd',
prop: 'pbsxd',
bodyType: 'checkbox',
bodyFillType: 'actFill',
checkboxLabel: ''
}, },
{ {
label: 'template.dl.dl015.xccsjzjdrq',
prop: 'xccsjzjdrq',
bodyType: 'input',
bodyDisabled: true,
label: 'template.dl.dl015.pyybrl',
prop: 'pyybrl',
bodyType: 'inputNumber',
bodyFillType: 'actFill', bodyFillType: 'actFill',
disabled: true
}
]
},
//
xbInfoFormConfig() {
return [
{
type: 'cellItem',
config: {
qxbd: {
label: 'template.dl.dl015.qxbd',
type: 'qxbd',
fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh']
},
bltj: {
label: 'template.dl.dl015.bltj',
type: 'select',
options: this.getDictOptions('business_bltj'),
fillType: 'preFill',
otherCode: 'bltjOther'
}
}
bodyMaxlength: 10
} }
] ]
} }
@ -297,7 +289,15 @@ export default {
}, },
// //
getFilledFormData() { getFilledFormData() {
return this.getFilledFormDataByRefs(refNames)
const baseData = this.getFilledFormDataByRefs(refNames)
//
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) {
baseData.hyqkTableData = hyqkData.stepTableFormData || []
}
return baseData
}, },
// //
async getFormData() { async getFormData() {
@ -308,32 +308,64 @@ export default {
return await this.validFormFields(refNames) return await this.validFormFields(refNames)
}, },
getResource() { getResource() {
const sysjStepResource = this.$refs.sysjTableRef.getStepResource()
const yqsyStepResource = this.$refs.yqsyTableRef.getStepResource()
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
// 使
this.resourceTmp = [
...(sysjStepResource.sjResource || []),
...(yqsyStepResource.sjResource || []),
...(stepResource.sjResource || [])
]
this.yqResourceTmp = [
...(yqsyStepResource.yqResource || []),
...(stepResource.yqResource || [])
]
const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData()
const hyqkList = hyqkData?.stepTableFormData || []
//
this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || []
//
const sjResourceFromHyqk = hyqkList
.filter(item => item.xybh)
.map(item => ({
bh: item.xybh,
type: 'cell'
}))
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
const { selectInfo, key, rowIndex } = e
const { selectInfo, key } = e
const { row } = selectInfo const { row } = selectInfo
if (key === 'yqbh') {
const params = {
yqmc: row.mc,
yqxh: row.xh,
xccsjzjdrq: row.jzrq
if (key === 'qxbd') {
try {
//
const bdnr = JSON.parse(row.bdnr)
console.log('前序表单数据:', bdnr)
//
const jlzTableData = bdnr.jlzTableData || []
if (jlzTableData.length === 0) {
this.$message.warning('前序表单中没有剂量组数据')
return
}
//
const hyqkData = jlzTableData.map(item => ({
jlzb: item.jlzb || '', //
xybh: item.xybh || '', //
hyqszqk: '', //
hyqcdjqk: '', //
hyqqtqk: '', //
qqpyy: '', //
pbsxd: '', // PBS
pyybrl: '' //
}))
// 使 $set formData CustomTable
this.$set(this.formData, 'hyqkTableData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
} catch (error) {
console.error('解析前序表单数据失败:', error)
this.$message.error('解析前序表单数据失败')
} }
this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params)
} }
}, },
// //

Loading…
Cancel
Save