diff --git a/src/views/business/comps/template/comps/dl/DL007.vue b/src/views/business/comps/template/comps/dl/DL007.vue
index 7cc2a0d..4b8e0a7 100644
--- a/src/views/business/comps/template/comps/dl/DL007.vue
+++ b/src/views/business/comps/template/comps/dl/DL007.vue
@@ -221,11 +221,12 @@ export default {
disabled: true
},
pyjssj: {
- // TODO:这里要核对是否要将input改为dateTime还是禁用输入框
label: 'template.dl.dl007.pyjssj',
type: 'input',
fillType: 'actFill',
subType: 'button',
+ disabled: true,
+ subDisabled: this.fillType !== 'actFill',
subKey: 'pyjssjButton',
buttonName: 'template.dl.dl007.jsButton'
}
diff --git a/src/views/business/comps/template/comps/dl/DL011.vue b/src/views/business/comps/template/comps/dl/DL011.vue
index 688b5d8..3e116c6 100644
--- a/src/views/business/comps/template/comps/dl/DL011.vue
+++ b/src/views/business/comps/template/comps/dl/DL011.vue
@@ -198,7 +198,7 @@ export default {
fillType: 'actFill',
subType: 'button',
subKey: 'pykssjButton',
- subDisable: this.fillType !== 'actFill',
+ subDisabled: this.fillType !== 'actFill',
disabled: true,
buttonName: 'template.dl.dl011.pykssjButton'
}
diff --git a/src/views/business/comps/template/comps/dl/DL012.vue b/src/views/business/comps/template/comps/dl/DL012.vue
index 474c117..30429dd 100644
--- a/src/views/business/comps/template/comps/dl/DL012.vue
+++ b/src/views/business/comps/template/comps/dl/DL012.vue
@@ -195,7 +195,7 @@ export default {
subType: 'button',
subKey: 'pykssjButton',
disabled: true,
- subDisable: this.fillType !== 'actFill',
+ subDisabled: this.fillType !== 'actFill',
buttonName: 'template.dl.dl012.pykssjButton'
}
}
diff --git a/src/views/business/comps/template/comps/dl/DL013.vue b/src/views/business/comps/template/comps/dl/DL013.vue
index 01ba62f..6112df9 100644
--- a/src/views/business/comps/template/comps/dl/DL013.vue
+++ b/src/views/business/comps/template/comps/dl/DL013.vue
@@ -254,7 +254,9 @@ export default {
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'actFill',
- otherCode: 'xbmcOther'
+ otherCode: 'xbmcOther',
+ otherMaxlength: 50
+
},
xbbh: {
label: 'template.dl.dl013.xbbh',
@@ -450,13 +452,28 @@ export default {
},
// 新增测定信息
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) {
this.$set(this.formData, 'cdxxConfigs', [])
}
- // 添加新的测定信息配置
- this.formData.cdxxConfigs.push({
+ // 创建新的测定信息配置对象
+ const newCdxxItem = {
id: getuuid(),
xsbs: null,
xbmd: null,
@@ -464,7 +481,10 @@ export default {
ysg: null,
zxg: null,
yxg: null
- })
+ }
+
+ // 添加新的测定信息配置
+ this.formData.cdxxConfigs.push(newCdxxItem)
// 更新测定次数
this.$refs[refConf.cdxx]?.updateFormData(
@@ -476,13 +496,24 @@ export default {
}
)
+ // 检查新增后仪器使用信息是否还在
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)
})
},
// 删除表格行
diff --git a/src/views/business/comps/template/comps/dl/DL014.vue b/src/views/business/comps/template/comps/dl/DL014.vue
index b7961eb..8bb3ecd 100644
--- a/src/views/business/comps/template/comps/dl/DL014.vue
+++ b/src/views/business/comps/template/comps/dl/DL014.vue
@@ -298,14 +298,16 @@ export default {
type: 'select',
options: this.getDictOptions('business_dl_qsxjbltj'),
fillType: 'preFill',
- otherCode: 'bltjOther'
+ otherCode: 'bltjOther',
+ otherMaxlength: 50
},
xbmc: {
label: 'template.dl.dl014.xbmc',
type: 'select',
options: this.getDictOptions('business_dl_xbmc'),
fillType: 'preFill',
- otherCode: 'xbmcOther'
+ otherCode: 'xbmcOther',
+ otherMaxlength: 50
}
}
}
@@ -317,7 +319,8 @@ export default {
pxpb: {
label: 'template.dl.dl014.pxpb',
type: 'inputNumber',
- fillType: 'preFill'
+ fillType: 'preFill',
+ maxlength: 2
},
sftjs9: {
label: 'template.dl.dl014.sftjs9',
@@ -343,7 +346,8 @@ export default {
const jlzzsConfig = {
label: 'template.dl.dl014.jlzzs',
type: 'inputNumber',
- fillType: 'preFill'
+ fillType: 'preFill',
+ maxlength: 2
}
// 只在 preFill 模式下显示确认按钮
@@ -369,7 +373,8 @@ export default {
label: 'template.dl.dl014.jlzzmc',
prop: 'jlzzmc',
bodyType: 'input',
- bodyFillType: 'preFill'
+ bodyFillType: 'preFill',
+ bodyMaxlength: 20
}
]
},
@@ -399,7 +404,8 @@ export default {
label: 'template.dl.dl014.jlzb',
prop: 'jlzb',
bodyType: 'input',
- bodyFillType: 'preFill'
+ bodyFillType: 'preFill',
+ bodyMaxlength: 10
},
{
label: 'template.dl.dl014.xybh',
@@ -584,7 +590,7 @@ export default {
if (this.fillType === 'actFill') {
const yqsyTableRef = this.$refs[refConf.yqsy]
const yqsyTableData = yqsyTableRef?.getDataSource() || []
-
+
if (yqsyTableData.length === 0) {
this.$message.warning(this.$t('template.dl.dl014.yqsyxxEmpty'))
return Promise.reject(this.$t('template.dl.dl014.yqsyxxEmpty'))
@@ -892,6 +898,11 @@ export default {
return
}
+ // 保存当前的剂量组名称表格数据,防止被清空
+ if (jlzmcList.length > 0) {
+ this.$set(this.formData, 'jlzmcTableData', jlzmcList)
+ }
+
// 生成剂量组列表数据
const newRows = []
@@ -920,6 +931,17 @@ export default {
// 直接修改 formData,CustomTable 会自动响应
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} 行剂量组数据`)
},
// 保存
diff --git a/src/views/business/comps/template/comps/dl/DL015.vue b/src/views/business/comps/template/comps/dl/DL015.vue
index 46f943e..d5d67f3 100644
--- a/src/views/business/comps/template/comps/dl/DL015.vue
+++ b/src/views/business/comps/template/comps/dl/DL015.vue
@@ -16,8 +16,16 @@
:formData="formData"
/>
-
-
+
+
{
if (item.xybh && !xybhSet.has(item.xybh)) {
xybhSet.add(item.xybh)
@@ -344,9 +353,9 @@ export default {
})
}
})
-
+
this.resourceTmp = [...this.resourceTmp, ...sjResourceFromHyqk]
-
+
return this.resourceTmp
},
onRegentSubmit(e) {
@@ -370,7 +379,7 @@ export default {
}
// 从剂量组数据中提取剂量组别和悬液编号
- const hyqkData = jlzTableData.map(item => ({
+ const hyqkData = jlzTableData.map((item) => ({
jlzb: item.jlzb || '', // 剂量组别
xybh: item.xybh || '', // 悬液编号
hyqszqk: '', // 换液前生长情况
@@ -384,7 +393,9 @@ export default {
// 使用 $set 更新 formData,触发 CustomTable 的响应式更新
this.$set(this.formData, 'stepTableFormData', hyqkData)
- this.$message.success(`已从前序表单加载 ${hyqkData.length} 条剂量组数据`)
+ this.$message.success(
+ `已从前序表单加载 ${hyqkData.length} 条剂量组数据`
+ )
} catch (error) {
console.error('解析前序表单数据失败:', error)
// 解析失败时也清空当前的换液情况列表数据