From 103f5099541cf640b6b041db940fd2b47a216097 Mon Sep 17 00:00:00 2001 From: memorylkf <312904636@qq.com> Date: Thu, 2 Apr 2026 15:53:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86]?= =?UTF-8?q?=20dl016+dl017?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/comps/template/comps/dl/DL016.vue | 52 ++----------- .../business/comps/template/comps/dl/DL017.vue | 85 ++++------------------ 2 files changed, 18 insertions(+), 119 deletions(-) diff --git a/src/views/business/comps/template/comps/dl/DL016.vue b/src/views/business/comps/template/comps/dl/DL016.vue index 564c9de..80da083 100644 --- a/src/views/business/comps/template/comps/dl/DL016.vue +++ b/src/views/business/comps/template/comps/dl/DL016.vue @@ -17,11 +17,9 @@ + ref="qcxjjyqkTableRef" :columns="stepColumns" :formData="formData"> @@ -61,13 +59,6 @@ export default { }, }, computed: { - // 表格数据 - tableFormData() { - return { - stepTableFormData: this.formData.stepTableFormData || [], - headerSelectFields: {} - } - }, // 备注表单配制 remarkConig() { return [ @@ -189,14 +180,12 @@ export default { // bodyType: 'inputNumber', label: "template.dl.dl016.qsxjjrl", prop: 'qsxjjrl', - width: 280, + width: 180, headerSelectKey: 'qsxjjrldw', fillType: "preFill", headerOptions: this.getDictOptions('business_tjdw'), bodyType: 'inputNumber', bodyFillType: 'actFill', - copyFrom: 'ysqyl', - compareTo: 'ysqyl', } ] }, @@ -217,51 +206,20 @@ export default { // 获取剂量组列表数据 const stepTableFormData = bdnr.jlzTableData || [] - if (stepTableFormData.length === 0) { - // 清空当前的换液情况列表数据 - this.$set(this.formData, 'stepTableFormData', []) - this.$message.warning('前序表单中没有剂量组数据') - return - } - // 从剂量组数据中提取剂量组别和悬液编号 const itemData = stepTableFormData.map(item => ({ jlzb: item.jlzb || '', // 剂量组别 xybh: item.xybh || '', // 悬液编号 qsxjjrl: '', // + id:this.getuuid(), })) - // 使用 $set 更新 formData,触发 CustomTable 的响应式更新 - this.$set(this.formData, 'stepTableFormData', itemData) - - this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) + this.$refs.qcxjjyqkTableRef.updateDataSource(itemData); } catch (error) { console.error('解析前序表单数据失败:', error) this.$message.error('解析前序表单数据失败') } } }, - //选择table header下拉框也要更新体积 - onHeaderSelectChange(data){ - const {key, headerSelectFields,dataSource=[]} = data; - const keys = [ - 'targetStartSolutionVolumeUnit', - 'targetDiluentVolumeUnit', - 'targetSolutionConcentrationUnit', - 'targetSolutionVolumeUnit', - ] - if(keys.includes(key)){ - const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData(); - const params = { - subTargetStartSolution, - headerSelectFields - } - this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) - } - }, - beforeSaveRecord(data){ - const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); - this.onCommonVerifyNdException(formFields,data); - }, //获取已填写的表单数据 getFilledFormData() { return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "qcxjjyqkTableRef", "stepRef","remarkRef"]) diff --git a/src/views/business/comps/template/comps/dl/DL017.vue b/src/views/business/comps/template/comps/dl/DL017.vue index 8b79c72..b321f7d 100644 --- a/src/views/business/comps/template/comps/dl/DL017.vue +++ b/src/views/business/comps/template/comps/dl/DL017.vue @@ -17,11 +17,9 @@ + ref="stepTableRef" :columns="stepColumns" :formData="formData"> @@ -62,13 +60,6 @@ export default { }, }, computed: { - // 表格数据 - tableFormData() { - return { - stepTableFormData: this.formData.stepTableFormData, - headerSelectFields: {} - } - }, // 备注表单配制 remarkConig() { return [ @@ -206,56 +197,56 @@ export default { },{ label: "template.dl.dl017.ddpyy", prop: "ddpyy", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.xd", prop: "xd", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.sj", prop: "sj", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.ds", prop: "ds", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.dy1gd", prop: "dy1gd", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.dy2gd", prop: "dy2gd", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.dy3gd", prop: "dy3gd", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, },{ label: "template.dl.dl017.dy4gd", prop: "dy4gd", - width: 180, + width: 100, bodyType: "checkbox", bodyFillType: "actFill", bodyMaxlength: 10, @@ -282,13 +273,6 @@ export default { // 获取剂量组列表数据 const stepTableFormData = bdnr.jlzTableData || [] - if (stepTableFormData.length === 0) { - // 清空当前的细胞操作情况列表数据 - this.$set(this.formData, 'stepTableFormData', []) - this.$message.warning('前序表单中没有剂量组数据') - return - } - // 从剂量组数据中提取剂量组别和悬液编号 const itemData = stepTableFormData.map(item => ({ jlzb: item.jlzb || '', @@ -303,60 +287,17 @@ export default { dy1gd: '', dy2gd: '', dy3gd: '', - dy4gd: '' + dy4gd: '', + id:this.getuuid(), })) - // 使用 $set 更新 formData,触发 CustomTable 的响应式更新 - this.$set(this.formData, 'stepTableFormData', itemData) - - this.$message.success(`已从前序表单加载 ${itemData.length} 条剂量组数据`) + this.$refs.stepTableRef.updateDataSource(itemData); } catch (error) { - this.$set(this.formData, 'stepTableFormData', []) console.error('解析前序表单数据失败:', error) this.$message.error('解析前序表单数据失败') } } }, - //选择table header下拉框也要更新体积 - onHeaderSelectChange(data){ - const {key, headerSelectFields,dataSource=[]} = data; - const keys = [ - 'targetStartSolutionVolumeUnit', - 'targetDiluentVolumeUnit', - 'targetSolutionConcentrationUnit', - 'targetSolutionVolumeUnit', - ] - if(keys.includes(key)){ - const {targetStartSolution,subTargetStartSolution} = this.$refs.swypyjInfoRef?.getFilledFormData(); - const params = { - subTargetStartSolution, - headerSelectFields - } - this.batchUpdateTargetStartSolutionVolume(dataSource,targetStartSolution,params) - } - }, - beforeSaveRecord(data){ - const formFields = this.$refs.swypyjInfoRef?.getFilledFormData(); - this.onCommonVerifyNdException(formFields,data); - }, - configComplete(val) { - const { rowData, headerSelectFields } = val; - //计算实际目标溶液体积(实际起始溶液体积+实际稀释液体积) - const { total, unit } = addTj([rowData.actStartSolutionVolume, rowData.actDiluentVolume], [headerSelectFields.actStartSolutionVolumeUnit, headerSelectFields.actDiluentVolumeUnit]) - let postData = { - mc: null, - bh: rowData.targetSolutionCode + rowData.subTargetSolutionCode, - nd: rowData.actSolutionConcentration,//实际目标溶液浓度 - nddw: headerSelectFields.actSolutionConcentrationUnit, - studySubjectId: this.formData.studySubjectId, - studyFormId:this.formData.id, - studyId:this.formData.studyId, - kc: total, - kcdw: unit, - } - this.configCompleteRequest(postData); - }, - //获取已填写的表单数据 getFilledFormData() { return this.getFilledFormDataByRefs(["baseInfoRef", "swypyjInfoRef", "stepTableRef", "stepRef","remarkRef"])