提交 677c662e 编写于 作者: tony001's avatar tony001

Revert "表单值规则常规规则修复"

This reverts commit 0a7be27c.
上级 0a7be27c
...@@ -389,6 +389,27 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi ...@@ -389,6 +389,27 @@ import ${srfclassname('${_appde.getCodeName()}')}Service from '@/service/${srffi
return {context:tempContext,data:requestData}; return {context:tempContext,data:requestData};
} }
/**
* 通过属性名称获取表单项名称
*
* @param name 实体属性名称
* @memberof ${srfclassname('${ctrl.codeName}')}Service
*/
public getItemNameByDeName(name:string) :string{
let itemName = name;
let mode: any = this.getMode();
if (!mode && mode.getDataItems instanceof Function) {
return name;
}
let formItemItems: any[] = mode.getDataItems();
formItemItems.forEach((item:any)=>{
if(item.prop === name){
itemName = item.name;
}
});
return itemName.trim();
}
<#ibizinclude> <#ibizinclude>
./SERVICE_BOTTOM.ts.ftl ./SERVICE_BOTTOM.ts.ftl
</#ibizinclude> </#ibizinclude>
\ No newline at end of file
...@@ -341,10 +341,10 @@ import schema from 'async-validator'; ...@@ -341,10 +341,10 @@ import schema from 'async-validator';
} }
} }
rule[name].forEach((item:any) => { rule[name].forEach((item:any) => {
let dataValue = this.data[name]; let dataValue = item.deName?this.data[this.service.getItemNameByDeName(item.deName)]:"";
// 常规规则 // 常规规则
if(item.type == 'SIMPLE'){ if(item.type == 'SIMPLE'){
startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,this.data,item.isKeyCond)); startOp(!this.$verify.checkFieldSimpleRule(dataValue,item.condOP,item.paramValue,item.ruleInfo,item.paramType,{},item.isKeyCond));
falg.infoMessage = item.ruleInfo; falg.infoMessage = item.ruleInfo;
} }
// 数值范围 // 数值范围
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册