From 444a58f5379ffdc1b17249527fd547f8b37c8732 Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Mon, 9 Feb 2026 22:57:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:[=E6=A8=A1=E6=9D=BF=E7=AE=A1=E7=90=86][upd?= =?UTF-8?q?ate]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Template/CustomTable.vue | 4 +- src/utils/conTools.js | 2 +- .../business/comps/template/comps/sp/SP003.vue | 5 +- .../business/comps/template/comps/sp/SP00456.vue | 39 ++++++++-- .../template/formConfig/paralleAndLadderConfig.js | 16 ++-- .../comps/template/mixins/templateMixin.js | 86 ++++++++++++++-------- 6 files changed, 101 insertions(+), 51 deletions(-) diff --git a/src/components/Template/CustomTable.vue b/src/components/Template/CustomTable.vue index 2d1ad05..910bc53 100644 --- a/src/components/Template/CustomTable.vue +++ b/src/components/Template/CustomTable.vue @@ -481,10 +481,12 @@ export default { }, // 表头选择器变化 onHeaderSelectChange(col, value) { + console.log(col,"ccc") if (col.headerSelectTo) { this.headerSelectFields[col.headerSelectTo] = value; } this.headerSelectFields[col.headerSelectKey] = value; + console.log(this.headerSelectFields, "this.headerSelectFields") // 输入时清除对应表单项的错误状态 this.formErrors = this.formErrors.filter(error => !(error.rowIndex === -1 && @@ -724,7 +726,7 @@ export default { } } - this.$emit("blur", { rowIndex, colKey, value, item: this.localDataSource[rowIndex] }); + this.$emit("blur", { rowIndex, colKey, value,dataSource:this.localDataSource, item: this.localDataSource[rowIndex] }); }, onSubBlur(rowIndex, colKey, value) { // 查找对应的列配置 diff --git a/src/utils/conTools.js b/src/utils/conTools.js index c8bd164..da25f3a 100644 --- a/src/utils/conTools.js +++ b/src/utils/conTools.js @@ -5,7 +5,7 @@ * @returns {boolean} 是否属于同一系列 */ -export const isConUnitDiff = (startUnit, units) => { +export const isCommonUnit = (startUnit, units) => { if (!startUnit || !Array.isArray(units) || units.length === 0) { return false; } diff --git a/src/views/business/comps/template/comps/sp/SP003.vue b/src/views/business/comps/template/comps/sp/SP003.vue index 820efa1..73f1a27 100644 --- a/src/views/business/comps/template/comps/sp/SP003.vue +++ b/src/views/business/comps/template/comps/sp/SP003.vue @@ -50,7 +50,7 @@ import SelectReagentDialog from '../../dialog/SelectReagentDialog.vue'; import TableOpertaion from "@/components/Template/operation/TableOpertaion.vue"; import { EventBus } from "@/utils/eventBus"; import { addTj, uniqeResource, uniqeResourceOne, addDecimals } from "@/utils/calUnitTools"; -import { isConUnitDiff } from "@/utils/conTools"; +import { isCommonUnit } from "@/utils/conTools"; export default { name: "SP003", components: { BaseInfoFormPackage, LineLabel, TableList, Step, CustomTable, SelectReagentDialog, TableOpertaion }, @@ -563,11 +563,10 @@ export default { }, async getFormData() { let content = await this.validFormFields(["baseInfoRef", "stepFormPackageRef", "stepTableRef", "stepRef", "remarkRef"]); - console.log(content,"content") if(content){ const {headerSelectFields = {},subTargetStartSolution} = content; const {targetSolutionConcentrationUnit,actSolutionConcentrationUnit} = headerSelectFields; - if(!isConUnitDiff(subTargetStartSolution,[targetSolutionConcentrationUnit,actSolutionConcentrationUnit])){ + if(!isCommonUnit(subTargetStartSolution,[targetSolutionConcentrationUnit,actSolutionConcentrationUnit])){ this.$message.error("起始浓度单位与目标浓度单位不符,请重新选择!"); return false; } diff --git a/src/views/business/comps/template/comps/sp/SP00456.vue b/src/views/business/comps/template/comps/sp/SP00456.vue index da1e099..6fc0448 100644 --- a/src/views/business/comps/template/comps/sp/SP00456.vue +++ b/src/views/business/comps/template/comps/sp/SP00456.vue @@ -37,7 +37,7 @@ :formData="ladderConfig" :fieldItemLabel="$t('template.common.jtpz')" :prefixKey="'ladder_' + ladderIndex" />