提交 c5c6cbdf 编写于 作者: RedPig97's avatar RedPig97

update: 重置

上级 4edebd97
......@@ -12,6 +12,21 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
// 重置
if (actionContext.viewType === 'APPLOGINVIEW') {
const length = Object.keys(actionContext.layoutData).length;
for (let i = length - 1; i >= 0; i--) {
const name = Object.keys(actionContext.layoutData)[i];
if (actionContext.layoutData.hasOwnProperty(name) && !Object.is(actionContext.layoutDetailsModel[name].itemType, 'CONTAINER')) {
actionContext.handleValueChange(name, { name, value: null });
}
}
} else {
const parentRef = actionContext.$parent;
if (parentRef.closeView && (parentRef.closeView instanceof Function)) {
parentRef.closeView(args);
} else if (actionContext.closeView && (actionContext.closeView instanceof Function)) {
actionContext.closeView(args);
}
}
}
</#macro>
\ No newline at end of file
......@@ -12,7 +12,7 @@
* @param {*} [srfParentDeName] 父实体名称
*/
public ${item.getFullCodeName()}(args: any[], contextJO?:any, params?: any, $event?: any, xData?: any, actionContext?:any, srfParentDeName?:string) {
const layoutData = args[0];
const layoutData = args.length > 0 ? args[0] : {};
const layoutModelDetails: any = actionContext.layoutModelDetails || {};
let userNameKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_USERID')) || '';
let passwordKey: string = Object.keys(layoutModelDetails).find((key: string) => Object.is(layoutModelDetails[key].predefinedType, 'AUTH_PASSWORD')) || '';
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册