From 2cc706b6e7f0db3869780a916b567a8777953d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AC=A7=E9=AA=9E?= Date: Fri, 13 Mar 2026 17:59:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][DL00?= =?UTF-8?q?7~DL009=E6=A0=B8=E5=AF=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lang/en/template/dl.js | 17 ++-- src/lang/zh/template/dl.js | 16 +-- .../business/comps/template/comps/dl/DL007.vue | 5 +- .../business/comps/template/comps/dl/DL008.vue | 101 +++++++++++-------- .../business/comps/template/comps/dl/DL009.vue | 112 +++++++++++++-------- .../business/comps/template/comps/dl/DL010.vue | 12 ++- 6 files changed, 156 insertions(+), 107 deletions(-) diff --git a/src/lang/en/template/dl.js b/src/lang/en/template/dl.js index 697f361..1f4b018 100644 --- a/src/lang/en/template/dl.js +++ b/src/lang/en/template/dl.js @@ -78,7 +78,7 @@ export default { pykssj: 'Cultivation Start Time', pyjssj: 'Cultivation End Time', jsButton: 'End', - yqsyxxEmpty: 'Please add instrument usage information first' + yqsyxxEmpty: 'Instrument usage information has not been filled in, please fill in before submitting' }, dl008: { ...common, @@ -89,8 +89,8 @@ export default { jzbh2: 'Strain Number', jzbh3: 'Strain Number', jzbh4: 'Strain Number', - yqsyxxEmpty: 'Instrument usage information cannot be empty', - cxqkEmpty: 'Imaging status cannot be empty' + yqsyxxEmpty: 'Instrument usage information has not been filled in, please fill in before submitting', + cxqkEmpty: 'Imaging status has not been filled in, please fill in before submitting' }, dl009: { ...common, @@ -107,8 +107,8 @@ export default { czqkDesc: 'Precipitation codes: "P-" = "None"; "P+" = "Slight"; "P++" = "Moderate"; "P+++" = "Severe".', bjjtDesc: 'Background lawn codes: "N" = "Normal"; "R1" = "Weak, lawn covers 70%-90% of plate area"; "R2" = "Medium, lawn covers 40%-70% of plate area"; "R3" = "Strong, lawn covers 10%-40% of plate area"; "A" = "Absent, no lawn on plate"; "O" = "Precipitation present, affecting lawn assessment";', jlsDesc: 'Colony count special case: "*" indicates pinpoint colonies visible on plate;', - yqsyxxEmpty: 'Instrument usage information cannot be empty', - jgxxEmpty: 'Result information cannot be empty' + yqsyxxEmpty: 'Instrument usage information has not been filled in, please fill in before submitting', + jgxxEmpty: 'Result information has not been filled in, please fill in before submitting' }, dl010: { ...common, @@ -194,7 +194,9 @@ export default { zxg: 'Lower Left Grid (cells)', yxg: 'Lower Right Grid (cells)', cdxxTime: 'Time {index}', - addCdxx: 'Add' + addCdxx: 'Add', + yqsyxxEmpty: 'Instrument usage information has not been filled in, please fill in before submitting', + cdxxEmpty: 'Measurement information has not been filled in, please fill in before submitting' }, dl014: { ...common, @@ -221,7 +223,8 @@ export default { sjgspjrl: 'Actual Test Article Volume', gyhzqk: 'Post-dose Status', qrButton: 'Confirm', - wcButton: 'Complete' + wcButton: 'Complete', + yqsyxxEmpty: 'Instrument usage information has not been filled in, please fill in before submitting' }, dl015: { ...common, diff --git a/src/lang/zh/template/dl.js b/src/lang/zh/template/dl.js index c763d74..d1795d0 100644 --- a/src/lang/zh/template/dl.js +++ b/src/lang/zh/template/dl.js @@ -81,7 +81,7 @@ export default { pykssj: '培养开始时间', pyjssj: '培养结束时间', jsButton: '结束', - yqsyxxEmpty: '请先添加仪器使用信息' + yqsyxxEmpty: '仪器使用信息还未填写,请填写后再提交' }, dl008: { ...common, @@ -92,8 +92,8 @@ export default { jzbh2: '菌种编号', jzbh3: '菌种编号', jzbh4: '菌种编号', - yqsyxxEmpty: '仪器使用信息不能为空', - cxqkEmpty: '成像情况不能为空' + yqsyxxEmpty: '仪器使用信息还未填写,请填写后再提交', + cxqkEmpty: '成像情况还未填写,请填写后再提交' }, dl009: { ...common, @@ -110,8 +110,8 @@ export default { czqkDesc: '沉淀量以代码填入:"P-" 代表 "无沉淀";"P+" 代表 "少量";"P++" 代表 "中等";"P+++" 代表 "严重"。', bjjtDesc: '背景菌苔以代码填入:"N" 代表 "正常";"R1" 代表 "弱,菌苔约占平皿面积 70%-90%";"R2" 代表 "中,菌苔约占平皿面积 40%-70%";"R3" 代表 "强,菌苔约占平皿面积 10%-40%";"A" 代表 "消失,平皿上无菌苔";"O" 代表 "产生沉淀,影响背景菌苔判断";', jlsDesc: '菌落数特殊情况:"*" 该平皿可见针尖样菌落;', - yqsyxxEmpty: '仪器使用信息不能为空', - jgxxEmpty: '结果信息不能为空' + yqsyxxEmpty: '仪器使用信息还未填写,请填写后再提交', + jgxxEmpty: '结果信息还未填写,请填写后再提交' }, dl010: { ...common, @@ -198,8 +198,8 @@ export default { yxg: '右下格(个)', cdxxTime: '第{index}次', addCdxx: '新增', - yqsyxxEmpty: '仪器使用信息不能为空,请添加后再提交', - cdxxEmpty: '测定信息不能为空,请添加后再提交' + yqsyxxEmpty: '仪器使用信息还未填写,请填写后再提交', + cdxxEmpty: '测定信息还未填写,请填写后再提交' }, dl014: { ...common, @@ -227,7 +227,7 @@ export default { gyhzqk: '给药后状态情况', qrButton: '确认', wcButton: '完成', - yqsyxxEmpty: '仪器使用信息不能为空,请添加后再提交' + yqsyxxEmpty: '仪器使用信息还未填写,请填写后再提交' }, dl015: { ...common, diff --git a/src/views/business/comps/template/comps/dl/DL007.vue b/src/views/business/comps/template/comps/dl/DL007.vue index 934a213..7cc2a0d 100644 --- a/src/views/business/comps/template/comps/dl/DL007.vue +++ b/src/views/business/comps/template/comps/dl/DL007.vue @@ -142,7 +142,8 @@ export default { type: 'select', options: this.getDictOptions('business_sydd'), fillType: 'actFill', - otherCode: 'syddOther' + otherCode: 'syddOther', + otherMaxlength: 50 } } }, @@ -220,10 +221,10 @@ export default { disabled: true }, pyjssj: { + // TODO:这里要核对是否要将input改为dateTime还是禁用输入框 label: 'template.dl.dl007.pyjssj', type: 'input', fillType: 'actFill', - maxlength: 200, subType: 'button', subKey: 'pyjssjButton', buttonName: 'template.dl.dl007.jsButton' diff --git a/src/views/business/comps/template/comps/dl/DL008.vue b/src/views/business/comps/template/comps/dl/DL008.vue index 0441972..75d9c66 100644 --- a/src/views/business/comps/template/comps/dl/DL008.vue +++ b/src/views/business/comps/template/comps/dl/DL008.vue @@ -155,6 +155,7 @@ export default { options: this.getDictOptions('business_dl_ameswrqk'), fillType: 'actFill', otherCode: 'cxqkwrqkOther', + otherMaxlength:200, showOtherLabel: false } } @@ -307,14 +308,20 @@ export default { const headerSelectFields = this.formData.headerSelectFields || {} // 如果没有数据或已经加载过,不处理 - if (!stepTableFormData_1 || stepTableFormData_1.length === 0 || this.isDataLoaded) { + if ( + !stepTableFormData_1 || + stepTableFormData_1.length === 0 || + this.isDataLoaded + ) { return } // 从第一行数据中提取列信息(查找 jzbh 开头的 Label 字段) const firstRow = stepTableFormData_1[0] - const labelKeys = Object.keys(firstRow).filter(key => key.match(/^jzbh\d+Label$/)) - + const labelKeys = Object.keys(firstRow).filter((key) => + key.match(/^jzbh\d+Label$/) + ) + if (labelKeys.length === 0) { return } @@ -335,7 +342,7 @@ export default { // 从 headerSelectFields 生成表头 labelKeys.sort().forEach((labelKey, index) => { const colIndex = index + 1 - + // 收集该列的所有 headerSelectFields 值(如 1_1, 1_2, 1_3) const headerValues = [] let rowIndex = 1 @@ -343,10 +350,11 @@ export default { headerValues.push(headerSelectFields[`${colIndex}_${rowIndex}`]) rowIndex++ } - + // 将多个值用空格拼接,如果没有则使用默认值 - const headerLabel = headerValues.length > 0 ? headerValues.join(' ') : `菌种${colIndex}` - + const headerLabel = + headerValues.length > 0 ? headerValues.join(' ') : `菌种${colIndex}` + dynamicColumns.push({ label: headerLabel, prop: `jzbh${colIndex}`, @@ -382,19 +390,19 @@ export default { //获取已填写的表单数据 getFilledFormData() { const baseData = this.getFilledFormDataByRefs(refNames) - + // 从成像情况表格中获取最新数据 const cxqkTableRef = this.$refs[refConf.cxqk] if (cxqkTableRef) { const cxqkData = cxqkTableRef.getFilledFormData() baseData.stepTableFormData_1 = cxqkData.stepTableFormData || [] } - + // 确保 headerSelectFields 被包含在返回的数据中 if (this.formData.headerSelectFields) { baseData.headerSelectFields = this.formData.headerSelectFields } - + return baseData }, //获取填写完成的表单数据 @@ -404,24 +412,25 @@ export default { }, //只做校验 async validFields() { - // 1. 校验仪器使用信息表格是否为空(只在 actFill 时校验) + // 只在 actFill 时校验表格是否为空 if (this.fillType === 'actFill') { + // 1. 校验仪器使用信息表格是否为空 const yqsyTableRef = this.$refs[refConf.yqsy] const yqsyTableData = yqsyTableRef?.getDataSource() || [] - + if (yqsyTableData.length === 0) { this.$message.warning(this.$t('template.dl.dl008.yqsyxxEmpty')) return Promise.reject(this.$t('template.dl.dl008.yqsyxxEmpty')) } - } - // 2. 校验成像情况表格是否为空 - const cxqkTableRef = this.$refs[refConf.cxqk] - const cxqkTableData = cxqkTableRef?.getDataSource() || [] - - if (cxqkTableData.length === 0) { - this.$message.warning(this.$t('template.dl.dl008.cxqkEmpty')) - return Promise.reject(this.$t('template.dl.dl008.cxqkEmpty')) + // 2. 校验成像情况表格是否为空 + const cxqkTableRef = this.$refs[refConf.cxqk] + const cxqkTableData = cxqkTableRef?.getDataSource() || [] + + if (cxqkTableData.length === 0) { + this.$message.warning(this.$t('template.dl.dl008.cxqkEmpty')) + return Promise.reject(this.$t('template.dl.dl008.cxqkEmpty')) + } } // 3. 执行其他表单字段校验 @@ -457,7 +466,7 @@ export default { this.handleCxqkQxbdSelect(row) } }, - + // 处理仪器编号选择 handleYqbhSelect(row, rowIndex) { const params = { @@ -467,15 +476,15 @@ export default { } this.$refs.yqsyTableRef.updateDataSourceByRowIndex(rowIndex, params) }, - + // 处理成像情况前序表单选择 handleCxqkQxbdSelect(row) { // 重置加载标记,允许重新加载数据 this.isDataLoaded = false - + try { const bdnr = JSON.parse(row.bdnr) - + const headerFields = bdnr.headerFields || {} const stepTableFormData_1 = bdnr.stepTableFormData_1 || [] @@ -493,7 +502,10 @@ export default { } // 2. 生成表格数据 - const tableData = this.generateTableData(stepTableFormData_1, dynamicColumns.columnKeys) + const tableData = this.generateTableData( + stepTableFormData_1, + dynamicColumns.columnKeys + ) if (tableData.length === 0) { this.clearCxqkTable() return @@ -501,18 +513,17 @@ export default { // 3. 更新表格 this.updateCxqkTable(dynamicColumns.columns, tableData, headerFields) - } catch (error) { console.error('解析前序表单数据失败:', error) this.clearCxqkTable() } }, - + // 生成动态列配置 generateDynamicColumns(headerFields) { // 获取所有以 _1 结尾的 key,这些代表列的索引 const columnKeys = Object.keys(headerFields) - .filter(key => key.endsWith('_1')) + .filter((key) => key.endsWith('_1')) .sort((a, b) => parseInt(a.split('_')[0]) - parseInt(b.split('_')[0])) if (columnKeys.length === 0) { @@ -534,7 +545,7 @@ export default { columnKeys.forEach((key, index) => { const colIndex = index + 1 const baseColIndex = key.split('_')[0] // 获取列索引,如 "1_1" -> "1" - + // 收集该列的所有 headerFields 值(如 1_1, 1_2, 1_3) const headerValues = [] let rowIndex = 1 @@ -542,10 +553,10 @@ export default { headerValues.push(headerFields[`${baseColIndex}_${rowIndex}`]) rowIndex++ } - + // 将多个值用空格拼接 const headerLabel = headerValues.join(' ') - + columns.push({ label: headerLabel, prop: `jzbh${colIndex}`, @@ -558,42 +569,42 @@ export default { return { columns, columnKeys } }, - + // 生成表格数据 generateTableData(stepTableFormData_1, columnKeys) { const tableData = [] - + stepTableFormData_1.forEach((item) => { const rowData = { jlzb: item.jlzb || '' } - + columnKeys.forEach((_key, index) => { const colIndex = index + 1 const valueKey = `jzbh${colIndex}` - + // 从 DL006 生成的数据中获取 label 值 // DL006 使用的字段名格式是 czrxm_${index}Label const labelValue = item[`czrxm_${index}Label`] || '' - + rowData[`${valueKey}Label`] = labelValue rowData[valueKey] = '' // 空字符串表示初始未填写,不会触发修改确认框 }) - + tableData.push(rowData) }) return tableData }, - + // 更新成像情况表格 updateCxqkTable(columns, tableData, headerFields) { // 更新动态列配置 this.dynamicCxqkColumns = columns - + // 保存 headerFields 到 formData,用于数据回显 if (!this.formData.headerSelectFields) { this.$set(this.formData, 'headerSelectFields', {}) } - Object.keys(headerFields).forEach(key => { + Object.keys(headerFields).forEach((key) => { this.$set(this.formData.headerSelectFields, key, headerFields[key]) }) @@ -602,19 +613,21 @@ export default { if (tableRef) { // 更新表格数据 tableRef.updateDataSource(tableData) - + // 将 oldLocalDataSource 设置为当前数据的副本 // 这样初始加载时不会触发修改确认框,但后续修改会正常触发 this.$nextTick(() => { - tableRef.oldLocalDataSource = JSON.parse(JSON.stringify(tableRef.localDataSource)) + tableRef.oldLocalDataSource = JSON.parse( + JSON.stringify(tableRef.localDataSource) + ) }) } - + this.$set(this.formData, 'stepTableFormData_1', tableData) this.isDataLoaded = true }) }, - + // 清空成像情况表格 clearCxqkTable() { this.dynamicCxqkColumns = [] diff --git a/src/views/business/comps/template/comps/dl/DL009.vue b/src/views/business/comps/template/comps/dl/DL009.vue index 6f8f362..b381fc8 100644 --- a/src/views/business/comps/template/comps/dl/DL009.vue +++ b/src/views/business/comps/template/comps/dl/DL009.vue @@ -339,20 +339,24 @@ export default { const headerSelectFields = this.formData.headerSelectFields || {} // 如果没有数据或已经加载过,不处理 - if (!stepTableFormData_1 || stepTableFormData_1.length === 0 || this.isDataLoaded) { + if ( + !stepTableFormData_1 || + stepTableFormData_1.length === 0 || + this.isDataLoaded + ) { return } // 从第一行数据中提取列信息(查找 jzbh 开头的字段,不包括 Label) const firstRow = stepTableFormData_1[0] const jzbhKeys = Object.keys(firstRow) - .filter(key => key.match(/^jzbh\d+$/) && !key.endsWith('Label')) + .filter((key) => key.match(/^jzbh\d+$/) && !key.endsWith('Label')) .sort((a, b) => { const numA = parseInt(a.replace('jzbh', '')) const numB = parseInt(b.replace('jzbh', '')) return numA - numB }) - + if (jzbhKeys.length === 0) { return } @@ -373,10 +377,11 @@ export default { // 从 headerSelectFields 生成表头 jzbhKeys.forEach((_jzbhKey, index) => { const colIndex = index + 1 - + // 只获取第一个 headerSelectFields 值作为菌种编号(如 T-A02) - const jzbhLabel = headerSelectFields[`${colIndex}_1`] || `菌种${colIndex}` - + const jzbhLabel = + headerSelectFields[`${colIndex}_1`] || `菌种${colIndex}` + // 为每个菌种编号添加四列:菌种编号、沉淀情况、背景菌苔、菌落数 dynamicColumns.push({ label: jzbhLabel, @@ -418,15 +423,19 @@ export default { // 更新动态列配置 this.dynamicJgxxColumns = dynamicColumns - + // 保存 headerSelectFields 到 formData.headerSelectFields(确保数据一致) if (!this.formData.headerSelectFields) { this.$set(this.formData, 'headerSelectFields', {}) } Object.keys(headerSelectFields).forEach((key) => { - this.$set(this.formData.headerSelectFields, key, headerSelectFields[key]) + this.$set( + this.formData.headerSelectFields, + key, + headerSelectFields[key] + ) }) - + this.isDataLoaded = true // 等待列配置更新后,更新表格数据 @@ -434,11 +443,13 @@ export default { const tableRef = this.$refs[refConf.jgxx] if (tableRef) { tableRef.updateDataSource(stepTableFormData_1) - + // 将 oldLocalDataSource 设置为当前数据的副本 // 这样初始加载时不会触发修改确认框,但后续修改会正常触发 this.$nextTick(() => { - tableRef.oldLocalDataSource = JSON.parse(JSON.stringify(tableRef.localDataSource)) + tableRef.oldLocalDataSource = JSON.parse( + JSON.stringify(tableRef.localDataSource) + ) }) } }) @@ -450,7 +461,7 @@ export default { initializeYqsyTableFromFormData() { try { const stepTableFormData = this.formData.stepTableFormData - + if (!stepTableFormData || stepTableFormData.length === 0) { return } @@ -459,10 +470,12 @@ export default { const tableRef = this.$refs[refConf.yqsy] if (tableRef) { tableRef.updateDataSource(stepTableFormData) - + // 将 oldLocalDataSource 设置为当前数据的副本 this.$nextTick(() => { - tableRef.oldLocalDataSource = JSON.parse(JSON.stringify(tableRef.localDataSource)) + tableRef.oldLocalDataSource = JSON.parse( + JSON.stringify(tableRef.localDataSource) + ) }) } }) @@ -473,7 +486,7 @@ export default { // 获取已填写的表单数据 getFilledFormData() { const baseData = this.getFilledFormDataByRefs(refNames) - + // 从仪器使用信息表格中获取最新数据 const yqsyTableRef = this.$refs[refConf.yqsy] if (yqsyTableRef) { @@ -481,7 +494,7 @@ export default { // 仪器使用信息保存到 stepTableFormData(与后端保存的字段名一致) baseData.stepTableFormData = yqsyData.stepTableFormData || [] } - + // 从结果信息表格中获取最新数据 const jgxxTableRef = this.$refs[refConf.jgxx] if (jgxxTableRef) { @@ -489,46 +502,47 @@ export default { // 结果信息保存到 stepTableFormData_1(与后端保存的字段名一致) baseData.stepTableFormData_1 = jgxxData.stepTableFormData || [] } - + // 确保 headerSelectFields 被包含在返回的数据中 if (this.formData.headerSelectFields) { baseData.headerSelectFields = this.formData.headerSelectFields } - + return baseData }, // 获取填写完成的表单数据 async getFormData() { // 先执行自定义校验(包括表格非空校验) const validResult = await this.validFields() - + // 如果校验通过,返回完整的表单数据(包括 headerSelectFields) if (validResult) { return this.getFilledFormData() } - + return validResult }, // 只做校验 async validFields() { - // 1. 校验仪器使用信息表格是否为空(只在 actFill 时校验) + // 表格是否为空只在 actFill 时校验 if (this.fillType === 'actFill') { + // 1. 校验仪器使用信息表格是否为空 const yqsyTableRef = this.$refs[refConf.yqsy] const yqsyTableData = yqsyTableRef?.getDataSource() || [] - + if (yqsyTableData.length === 0) { this.$message.warning(this.$t('template.dl.dl009.yqsyxxEmpty')) return Promise.reject(this.$t('template.dl.dl009.yqsyxxEmpty')) } - } - // 2. 校验结果信息表格是否为空 - const jgxxTableRef = this.$refs[refConf.jgxx] - const jgxxTableData = jgxxTableRef?.getDataSource() || [] - - if (jgxxTableData.length === 0) { - this.$message.warning(this.$t('template.dl.dl009.jgxxEmpty')) - return Promise.reject(this.$t('template.dl.dl009.jgxxEmpty')) + // 2. 校验结果信息表格是否为空 + const jgxxTableRef = this.$refs[refConf.jgxx] + const jgxxTableData = jgxxTableRef?.getDataSource() || [] + + if (jgxxTableData.length === 0) { + this.$message.warning(this.$t('template.dl.dl009.jgxxEmpty')) + return Promise.reject(this.$t('template.dl.dl009.jgxxEmpty')) + } } // 3. 执行其他表单字段校验 @@ -566,28 +580,44 @@ export default { // 处理结果信息前序表单选择 if (key === 'jgxxQxbd') { // 在处理前序表单之前,先保存当前的仪器使用信息和表头数据 - const currentYqsyData = this.formData.stepTableFormData ? JSON.parse(JSON.stringify(this.formData.stepTableFormData)) : [] - const currentHeaderFields = this.formData.headerSelectFields ? JSON.parse(JSON.stringify(this.formData.headerSelectFields)) : {} - + const currentYqsyData = this.formData.stepTableFormData + ? JSON.parse(JSON.stringify(this.formData.stepTableFormData)) + : [] + const currentHeaderFields = this.formData.headerSelectFields + ? JSON.parse(JSON.stringify(this.formData.headerSelectFields)) + : {} + // 使用 $nextTick 确保在下一个 tick 中恢复数据 this.$nextTick(() => { this.handleJgxxQxbdSelect(row) - + // 再次使用 $nextTick 确保在 handleJgxxQxbdSelect 完成后恢复数据 this.$nextTick(() => { - if (currentYqsyData.length > 0 && (!this.formData.stepTableFormData || this.formData.stepTableFormData.length === 0)) { + if ( + currentYqsyData.length > 0 && + (!this.formData.stepTableFormData || + this.formData.stepTableFormData.length === 0) + ) { this.$set(this.formData, 'stepTableFormData', currentYqsyData) - + // 同时更新表格显示 const yqsyTableRef = this.$refs[refConf.yqsy] if (yqsyTableRef) { yqsyTableRef.updateDataSource(currentYqsyData) } } - + // 如果当前表头数据为空,恢复之前的表头数据 - if (Object.keys(currentHeaderFields).length > 0 && (!this.formData.headerSelectFields || Object.keys(this.formData.headerSelectFields).length === 0)) { - this.$set(this.formData, 'headerSelectFields', currentHeaderFields) + if ( + Object.keys(currentHeaderFields).length > 0 && + (!this.formData.headerSelectFields || + Object.keys(this.formData.headerSelectFields).length === 0) + ) { + this.$set( + this.formData, + 'headerSelectFields', + currentHeaderFields + ) } }) }) @@ -791,9 +821,9 @@ export default { if (this.dynamicJgxxColumns.length === 0) { return } - + // 遍历动态列配置,更新 select 类型的 bodyOptions - this.dynamicJgxxColumns.forEach(col => { + this.dynamicJgxxColumns.forEach((col) => { if (col.bodyType === 'select') { if (col.prop.startsWith('czqk')) { col.bodyOptions = this.getDictOptions('business_dl_amescdqk') diff --git a/src/views/business/comps/template/comps/dl/DL010.vue b/src/views/business/comps/template/comps/dl/DL010.vue index a8414ba..8630aef 100644 --- a/src/views/business/comps/template/comps/dl/DL010.vue +++ b/src/views/business/comps/template/comps/dl/DL010.vue @@ -173,6 +173,7 @@ export default { type: 'select', options: this.getDictOptions('business_dwzs'), fillType: 'preFill', + otherMaxlength: 50, otherCode: 'dwzsOther' } } @@ -210,6 +211,7 @@ export default { type: 'select', options: this.getDictOptions('business_cjbw'), fillType: 'preFill', + otherMaxlength: 50, otherCode: 'cjbwOther' } } @@ -479,16 +481,16 @@ export default { // 使用的试剂、仪器 this.resourceTmp = sjxxStepResource.sjResource || [] this.yqResourceTmp = sjxxStepResource.yqResource || [] - + // 获取采集信息表格数据 const sjxxTableData = this.$refs.sjxxTableRef?.getFilledFormData() const sjxxList = sjxxTableData?.stepTableFormData || [] const headerSelectFields = sjxxTableData?.headerSelectFields || {} - + // 提取实际0.9%氯化钠注射液加入量和实际加入血清的数据 // 转换为标准资源格式 const sjxxResource = [] - + sjxxList.forEach((item) => { // 实际0.9%氯化钠注射液加入量 if (item.sjlhnzsjyjrl) { @@ -510,7 +512,7 @@ export default { yxzqdw: null // 有效期单位 }) } - + // 实际加入血清 if (item.sjjrxq) { sjxxResource.push({ @@ -532,7 +534,7 @@ export default { }) } }) - + // 将采集信息数据添加到资源列表中 return [...this.resourceTmp, ...sjxxResource] },