提交 d14004ad 编写于 作者: KK's avatar KK

属性值规则

上级 df20d6e8
...@@ -323,13 +323,13 @@ import schema from 'async-validator'; ...@@ -323,13 +323,13 @@ import schema from 'async-validator';
* @param {{ name: string }} { name } * @param {{ name: string }} { name }
* @memberof ${srfclassname('${ctrl.codeName}')}Base * @memberof ${srfclassname('${ctrl.codeName}')}Base
*/ */
public verifyDeRules(name:string) :{isPast:boolean,infoMessage:string}{ public verifyDeRules(name:string,rule:any = this.deRules) :{isPast:boolean,infoMessage:string}{
let falg = {isPast:true,infoMessage:""}; let falg = {isPast:true,infoMessage:""};
if(!this.deRules[name]){ if(!rule[name]){
return falg; return falg;
} }
this.deRules[name].forEach((item:any) => { rule[name].forEach((item:any) => {
if(item.type == 'SIMPLE' && this.data[name] != item.paramValue){ if(item.type == 'SIMPLE' && this.data[item.deName] != item.paramValue){
falg.isPast = false; falg.isPast = false;
falg.infoMessage = item.ruleInfo; falg.infoMessage = item.ruleInfo;
} }
...@@ -343,7 +343,9 @@ import schema from 'async-validator'; ...@@ -343,7 +343,9 @@ import schema from 'async-validator';
falg.isPast = false; falg.isPast = false;
falg.infoMessage = item.ruleInfo; falg.infoMessage = item.ruleInfo;
} }
}
if(item.type == 'GROUP'){
this.verifyDeRules('group',item)
} }
}); });
return falg; return falg;
......
...@@ -50,6 +50,9 @@ ${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == tr ...@@ -50,6 +50,9 @@ ${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == tr
<#if condItem.getMinValue?? && condItem.getMinValue()??> <#if condItem.getMinValue?? && condItem.getMinValue()??>
minValue:${condItem.getMinValue()?c}, minValue:${condItem.getMinValue()?c},
</#if> </#if>
<#if condItem.getDEFName?? && condItem.getDEFName()??>
deName:${condItem.getDEFName()},
</#if>
condOP:"<#if condItem.getCondOp?? && condItem.getCondOp()??>${condItem.getCondOp()}</#if>", condOP:"<#if condItem.getCondOp?? && condItem.getCondOp()??>${condItem.getCondOp()}</#if>",
ruleInfo:"<#if condItem.getRuleInfo?? && condItem.getRuleInfo()??>${condItem.getRuleInfo()}</#if>", ruleInfo:"<#if condItem.getRuleInfo?? && condItem.getRuleInfo()??>${condItem.getRuleInfo()}</#if>",
group:[ group:[
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册