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" />