提交 f1489a44 编写于 作者: Neuromancer255's avatar Neuromancer255

补充表单项值项填充的功能

上级 f2266a45
......@@ -439,6 +439,23 @@ import schema from 'async-validator';
}
}
/**
* 值项填充
*
* @public
* @param {{ name: string, newVal: any, oldVal: any }} { name, newVal, oldVal }
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public linkedFormData({ name, newVal, oldVal }: { name: string, newVal: any, oldVal: any }): void {
<#list ctrl.getPSDEFormItems() as item>
<#if item.getValueItemName?? && item.getValueItemName()??>
if (Object.is(name, '${item.getValueItemName()}')) {
this.onFormItemValueChange({ name: '${item.getName()}', value: newVal });
}
</#if>
</#list>
}
/**
* 重置表单项值
*
......@@ -533,6 +550,7 @@ import schema from 'async-validator';
if (this.ignorefieldvaluechange) {
return;
}
this.linkedFormData({name: name, newVal: newVal, oldVal: oldVal});
this.resetFormData({ name: name, newVal: newVal, oldVal: oldVal });
this.formLogic({ name: name, newVal: newVal, oldVal: oldVal });
this.dataChang.next(JSON.stringify(this.data));
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册