Browse Source

fix:[模板管理][DL007~DL015功能核验]

ouqian
ouqian 1 month ago
parent
commit
e3f562f4ef
6 changed files with 98 additions and 33 deletions
  1. +2
    -1
      src/views/business/comps/template/comps/dl/DL007.vue
  2. +1
    -1
      src/views/business/comps/template/comps/dl/DL011.vue
  3. +1
    -1
      src/views/business/comps/template/comps/dl/DL012.vue
  4. +41
    -10
      src/views/business/comps/template/comps/dl/DL013.vue
  5. +29
    -7
      src/views/business/comps/template/comps/dl/DL014.vue
  6. +24
    -13
      src/views/business/comps/template/comps/dl/DL015.vue

+ 2
- 1
src/views/business/comps/template/comps/dl/DL007.vue View File

@ -221,11 +221,12 @@ export default {
disabled: true disabled: true
}, },
pyjssj: { pyjssj: {
// TODOinputdateTime
label: 'template.dl.dl007.pyjssj', label: 'template.dl.dl007.pyjssj',
type: 'input', type: 'input',
fillType: 'actFill', fillType: 'actFill',
subType: 'button', subType: 'button',
disabled: true,
subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton', subKey: 'pyjssjButton',
buttonName: 'template.dl.dl007.jsButton' buttonName: 'template.dl.dl007.jsButton'
} }

+ 1
- 1
src/views/business/comps/template/comps/dl/DL011.vue View File

@ -198,7 +198,7 @@ export default {
fillType: 'actFill', fillType: 'actFill',
subType: 'button', subType: 'button',
subKey: 'pykssjButton', subKey: 'pykssjButton',
subDisable: this.fillType !== 'actFill',
subDisabled: this.fillType !== 'actFill',
disabled: true, disabled: true,
buttonName: 'template.dl.dl011.pykssjButton' buttonName: 'template.dl.dl011.pykssjButton'
} }

+ 1
- 1
src/views/business/comps/template/comps/dl/DL012.vue View File

@ -195,7 +195,7 @@ export default {
subType: 'button', subType: 'button',
subKey: 'pykssjButton', subKey: 'pykssjButton',
disabled: true, disabled: true,
subDisable: this.fillType !== 'actFill',
subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl012.pykssjButton' buttonName: 'template.dl.dl012.pykssjButton'
} }
} }

+ 41
- 10
src/views/business/comps/template/comps/dl/DL013.vue View File

@ -254,7 +254,9 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_xbmc'), options: this.getDictOptions('business_dl_xbmc'),
fillType: 'actFill', fillType: 'actFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
}, },
xbbh: { xbbh: {
label: 'template.dl.dl013.xbbh', label: 'template.dl.dl013.xbbh',
@ -450,13 +452,28 @@ export default {
}, },
// //
handleCdxxAdd() { handleCdxxAdd() {
// 使
const yqsyTableRef = this.$refs[refConf.yqsy]
const beforeData = yqsyTableRef?.getDataSource() || []
// 使
const currentYqsyData = yqsyTableRef?.getFilledFormData() || {}
// formData使
if (currentYqsyData.stepTableFormData && currentYqsyData.stepTableFormData.length > 0) {
// 使$set
this.$set(this.formData, 'yqsyTablestepTableFormData', currentYqsyData.stepTableFormData)
this.$set(this.formData, 'yqsyTableheaderSelectFields', currentYqsyData.headerSelectFields || {})
this.$set(this.formData, 'yqsyTableheaderFields', currentYqsyData.headerFields || {})
}
// //
if (!this.formData.cdxxConfigs) { if (!this.formData.cdxxConfigs) {
this.$set(this.formData, 'cdxxConfigs', []) this.$set(this.formData, 'cdxxConfigs', [])
} }
//
this.formData.cdxxConfigs.push({
//
const newCdxxItem = {
id: getuuid(), id: getuuid(),
xsbs: null, xsbs: null,
xbmd: null, xbmd: null,
@ -464,7 +481,10 @@ export default {
ysg: null, ysg: null,
zxg: null, zxg: null,
yxg: null yxg: null
})
}
//
this.formData.cdxxConfigs.push(newCdxxItem)
// //
this.$refs[refConf.cdxx]?.updateFormData( this.$refs[refConf.cdxx]?.updateFormData(
@ -476,13 +496,24 @@ export default {
} }
) )
// 使
this.$nextTick(() => { this.$nextTick(() => {
//
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null
})
const afterData = yqsyTableRef?.getDataSource() || []
//
if (afterData.length === 0 && beforeData.length > 0) {
yqsyTableRef?.updateDataSource(beforeData)
}
//
setTimeout(() => {
EventBus.$emit('onModifyRecord', {
type: 'fieldChanged',
newRecord: null,
resourceList: null,
source: 'cdxxAdd'
})
}, 100)
}) })
}, },
// //

+ 29
- 7
src/views/business/comps/template/comps/dl/DL014.vue View File

@ -298,14 +298,16 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'), options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
}, },
xbmc: { xbmc: {
label: 'template.dl.dl014.xbmc', label: 'template.dl.dl014.xbmc',
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_xbmc'), options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'xbmcOther'
otherCode: 'xbmcOther',
otherMaxlength: 50
} }
} }
} }
@ -317,7 +319,8 @@ export default {
pxpb: { pxpb: {
label: 'template.dl.dl014.pxpb', label: 'template.dl.dl014.pxpb',
type: 'inputNumber', type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
}, },
sftjs9: { sftjs9: {
label: 'template.dl.dl014.sftjs9', label: 'template.dl.dl014.sftjs9',
@ -343,7 +346,8 @@ export default {
const jlzzsConfig = { const jlzzsConfig = {
label: 'template.dl.dl014.jlzzs', label: 'template.dl.dl014.jlzzs',
type: 'inputNumber', type: 'inputNumber',
fillType: 'preFill'
fillType: 'preFill',
maxlength: 2
} }
// preFill // preFill
@ -369,7 +373,8 @@ export default {
label: 'template.dl.dl014.jlzzmc', label: 'template.dl.dl014.jlzzmc',
prop: 'jlzzmc', prop: 'jlzzmc',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 20
} }
] ]
}, },
@ -399,7 +404,8 @@ export default {
label: 'template.dl.dl014.jlzb', label: 'template.dl.dl014.jlzb',
prop: 'jlzb', prop: 'jlzb',
bodyType: 'input', bodyType: 'input',
bodyFillType: 'preFill'
bodyFillType: 'preFill',
bodyMaxlength: 10
}, },
{ {
label: 'template.dl.dl014.xybh', label: 'template.dl.dl014.xybh',
@ -584,7 +590,7 @@ export default {
if (this.fillType === 'actFill') { if (this.fillType === 'actFill') {
const yqsyTableRef = this.$refs[refConf.yqsy] const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || [] const yqsyTableData = yqsyTableRef?.getDataSource() || []
if (yqsyTableData.length === 0) { if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty')) this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty')) return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty'))
@ -892,6 +898,11 @@ export default {
return return
} }
//
if (jlzmcList.length > 0) {
this.$set(this.formData, 'jlzmcTableData', jlzmcList)
}
// //
const newRows = [] const newRows = []
@ -920,6 +931,17 @@ export default {
// formDataCustomTable // formDataCustomTable
this.$set(this.formData, 'jlzTableData', newRows) this.$set(this.formData, 'jlzTableData', newRows)
//
this.$nextTick(() => {
const jlzmcTableRef = this.$refs[refConf.jlzmcTable]
const currentJlzmcData = jlzmcTableRef?.getDataSource() || []
//
if (currentJlzmcData.length === 0 && jlzmcList.length > 0) {
jlzmcTableRef?.updateDataSource(jlzmcList)
}
})
this.$message.success(`已生成 ${newRows.length} 行剂量组数据`) this.$message.success(`已生成 ${newRows.length} 行剂量组数据`)
}, },
// //

+ 24
- 13
src/views/business/comps/template/comps/dl/DL015.vue View File

@ -16,8 +16,16 @@
:formData="formData" :formData="formData"
/> />
<TableList label="template.common.reagentInfo" :columns="sysjColumns" :dataSource="resourceSj" />
<TableList label="template.common.instrumentInfo" :columns="yqColumns" :dataSource="yqResource" />
<TableList
label="template.common.reagentInfo"
:columns="sysjColumns"
:dataSource="resourceSj"
/>
<TableList
label="template.common.instrumentInfo"
:columns="yqColumns"
:dataSource="yqResource"
/>
<LineLabel label="template.dl.dl015.xbxx" /> <LineLabel label="template.dl.dl015.xbxx" />
<BaseInfoFormPackage <BaseInfoFormPackage
@ -185,7 +193,7 @@ export default {
qxbd: { qxbd: {
label: 'template.dl.dl015.qxbd', label: 'template.dl.dl015.qxbd',
type: 'qxbd', type: 'qxbd',
qxbdType:'DL014',
qxbdType: 'DL014',
fillType: 'actFill', fillType: 'actFill',
filledCodes: ['bdmc', 'bdbh'] filledCodes: ['bdmc', 'bdbh']
}, },
@ -194,7 +202,8 @@ export default {
type: 'select', type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'), options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill', fillType: 'preFill',
otherCode: 'bltjOther'
otherCode: 'bltjOther',
otherMaxlength: 50
} }
} }
} }
@ -290,14 +299,14 @@ export default {
// //
getFilledFormData() { getFilledFormData() {
const baseData = this.getFilledFormDataByRefs(refNames) const baseData = this.getFilledFormDataByRefs(refNames)
// stepTableFormData // stepTableFormData
const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData() const hyqkData = this.$refs[refConf.hyqk]?.getFilledFormData()
if (hyqkData) { if (hyqkData) {
baseData.stepTableFormData = hyqkData.stepTableFormData || [] baseData.stepTableFormData = hyqkData.stepTableFormData || []
baseData.headerSelectFields = hyqkData.headerSelectFields || {} baseData.headerSelectFields = hyqkData.headerSelectFields || {}
} }
return baseData return baseData
}, },
// //
@ -312,16 +321,16 @@ export default {
const stepResource = this.$refs.stepRef.getStepResource() const stepResource = this.$refs.stepRef.getStepResource()
const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData() const hyqkData = this.$refs.hyqkTableRef?.getFilledFormData()
const hyqkList = hyqkData?.stepTableFormData || [] const hyqkList = hyqkData?.stepTableFormData || []
// //
this.resourceTmp = stepResource.sjResource || [] this.resourceTmp = stepResource.sjResource || []
this.yqResourceTmp = stepResource.yqResource || [] this.yqResourceTmp = stepResource.yqResource || []
// //
// Set // Set
const xybhSet = new Set() const xybhSet = new Set()
const sjResourceFromHyqk = [] const sjResourceFromHyqk = []
hyqkList.forEach((item) => { hyqkList.forEach((item) => {
if (item.xybh && !xybhSet.has(item.xybh)) { if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh) xybhSet.add(item.xybh)
@ -344,9 +353,9 @@ export default {
}) })
} }
}) })
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk] this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
return this.resourceTmp return this.resourceTmp
}, },
onRegentSubmit(e) { onRegentSubmit(e) {
@ -370,7 +379,7 @@ export default {
} }
// //
const hyqkData = jlzTableData.map(item => ({
const hyqkData = jlzTableData.map((item) => ({
jlzb: item.jlzb || '', // jlzb: item.jlzb || '', //
xybh: item.xybh || '', // xybh: item.xybh || '', //
hyqszqk: '', // hyqszqk: '', //
@ -384,7 +393,9 @@ export default {
// 使 $set formData CustomTable // 使 $set formData CustomTable
this.$set(this.formData, 'stepTableFormData', hyqkData) this.$set(this.formData, 'stepTableFormData', hyqkData)
this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
this.$message.success(
`已从前序表单加载 ${hyqkData.length} 条剂量组数据`
)
} catch (error) { } catch (error) {
console.error('解析前序表单数据失败:', error) console.error('解析前序表单数据失败:', error)
// //

Loading…
Cancel
Save