diff --git a/src/ts/scripting/core/rule/ValidateHandler.ts b/src/ts/scripting/core/rule/ValidateHandler.ts index 264e0bda1bfd87998f60bd8eaf8c03fc70e815d1..d5ed64fb1df3671e27b96c33348d55c50fa285c1 100644 --- a/src/ts/scripting/core/rule/ValidateHandler.ts +++ b/src/ts/scripting/core/rule/ValidateHandler.ts @@ -194,7 +194,10 @@ export default class ValidateHandler implements IService { for (const sheet of Object.values(formInfo.sheets)) { const sheetData = data[sheet.attributeId!] || {}; for (const [cell, config] of Object.entries(sheet.cells)) { - if (config.dataType != '输入型') { + if ( + config.rule.value?.type != '输入型' && + config.rule.value?.type != '属性型' + ) { continue; } if (config.rule?.isRequired && valueIsNull(sheetData[cell])) { @@ -239,7 +242,7 @@ export default class ValidateHandler implements IService { let formId = warn.formId || ''; if (formId) { info.formId = formId; - info.name = this.graph.service.formInfo[formId]?.form.name || formId; + info.name = this.graph.service.formInfo[formId]?.form.name || formId; } } addInfo.push(info); @@ -248,7 +251,7 @@ export default class ValidateHandler implements IService { this.validationInfo = [...updateInfo, ...addInfo]; this.graph.service.model.validation = this.validationInfo; - + const allData = [ _.cloneDeep(updateInfo).map(v => { v.type = "修改"; return v; }), _.cloneDeep(addInfo).map(v => { v.type = "新增"; return v; }),