From 71bb727f27033d3428b7bf2cb331c78892f6a7cb Mon Sep 17 00:00:00 2001 From: luojie <125330818@qq.com> Date: Thu, 2 Apr 2026 21:47:47 +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/App.vue | 4 +++ src/components/Template/HandleFormItem.vue | 4 +-- .../Template/StepComponents/CdmdComp.vue | 42 +++++++++++++--------- src/components/Template/StepFormPackage.vue | 7 ++++ 4 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/App.vue b/src/App.vue index c0c9f75..028a004 100644 --- a/src/App.vue +++ b/src/App.vue @@ -123,6 +123,10 @@ export default { #app .theme-picker { display: none; } +html{ + color:#606266; + font-size: 14px; +} .el-dialog__header { box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1) !important; diff --git a/src/components/Template/HandleFormItem.vue b/src/components/Template/HandleFormItem.vue index df7e410..13c7c69 100644 --- a/src/components/Template/HandleFormItem.vue +++ b/src/components/Template/HandleFormItem.vue @@ -1198,8 +1198,7 @@ export default { if (!isOldValueEmpty && !(isSame) && (this.templateFillType === "actFill" || this.templateFillType === "blxjsh") && this.type !== "attachment") { console.log("需要电子签名") // 通过EventBus触发电子签名弹窗 - // EventBus.$emit('showEditSignDialog', { uuid: this.uuid }); - this.handleUpdateRecord() + EventBus.$emit('showEditSignDialog', { uuid: this.uuid }); } else {//如果是第一次填写,不需要密码验证 this.handleUpdateRecord() } @@ -1370,6 +1369,7 @@ export default { fieldLabelEn = this.$i18n.t(parentLabel, "en_US") + this.$i18n.t("template.common.unit", "en_US"); } const commonInfo = { + type:this.type, userNameCn: nickName, userNameEn: name, key: this.fieldKey, diff --git a/src/components/Template/StepComponents/CdmdComp.vue b/src/components/Template/StepComponents/CdmdComp.vue index df889d1..a0eaf6b 100644 --- a/src/components/Template/StepComponents/CdmdComp.vue +++ b/src/components/Template/StepComponents/CdmdComp.vue @@ -11,6 +11,8 @@ 稀释倍数 细胞密度(个/mL) @@ -29,18 +31,26 @@ @@ -86,7 +96,8 @@ export default { type: 'inputNumber', fillType: 'actFill', precision: 0, - } + }, + errorFields: {} } }, @@ -113,20 +124,19 @@ export default { }, // 实现validateFormData方法,用于表单验证 validateFormData() { - - // 调用CustomTable的同步验证方法 - const validateResult = this.$refs.tableRef.validateFormData(); - - // 如果验证通过,还需要检查是否有数据行 - if (validateResult.valid) { - const filledData = this.$refs.tableRef.getFilledFormData(); - const { stepTableFormData = [] } = filledData; - if (stepTableFormData.length === 0) { - return { valid: false, error: '请添加取板数据' }; - } - } - console.log("validateResult",validateResult); - return validateResult; + let isValid = true; + const errorFields = {}; + const requiredFields = ['xsbs', 'zsg', 'zxg', 'ysg', 'yxg']; + this.tableData.map((item,index)=>{ + requiredFields.forEach(field=>{ + if(!item[field]) { + errorFields[field+index] = true; + isValid = false; + } + }) + }) + this.errorFields = errorFields; + return { valid: isValid, error: isValid? '' : '请填写细胞密度信息' }; }, onDataChange() { // 构建表格数据 @@ -208,7 +218,7 @@ export default { } .fixed-text { - color: #595959; + // color: #595959; font-size: 14px; } diff --git a/src/components/Template/StepFormPackage.vue b/src/components/Template/StepFormPackage.vue index 62436bc..60c3aff 100644 --- a/src/components/Template/StepFormPackage.vue +++ b/src/components/Template/StepFormPackage.vue @@ -206,6 +206,13 @@ export default { if (jcbCompRef) { refs.push(jcbCompRef); } + }else if(sItem.type === 'cdmd'){ + const refName = `cdmdComp_${key}`; + const cdmdCompRef = this.$refs[refName]; + // 检查ZLSubPackage组件的表单验证 + if (cdmdCompRef) { + refs.push(cdmdCompRef); + } } } }