提交 40c82b56 编写于 作者: tony001's avatar tony001

update:更新

上级 bcb8cf1a
...@@ -80,11 +80,17 @@ export class AppSysAction { ...@@ -80,11 +80,17 @@ export class AppSysAction {
case 'RemoveAndExit': case 'RemoveAndExit':
this.removeAndExit(params); this.removeAndExit(params);
break; break;
case 'SaveAndNew':
this.saveAndNew(params);
break;
case 'ToggleFilter': case 'ToggleFilter':
this.toggleFilter(params); this.toggleFilter(params);
break; break;
default: default:
console.log(`未支持${tag}`); App.getNotificationService().info({
message: '提示',
description: `暂未支持${tag}`
});
} }
} }
...@@ -252,7 +258,6 @@ export class AppSysAction { ...@@ -252,7 +258,6 @@ export class AppSysAction {
*/ */
public static async saveAndExit(params: IUIActionParams) { public static async saveAndExit(params: IUIActionParams) {
const { actionEnvironment } = params; const { actionEnvironment } = params;
// 视图里获取多数据部件
if (hasFunction(actionEnvironment.xDataControl, "save")) { if (hasFunction(actionEnvironment.xDataControl, "save")) {
await actionEnvironment.xDataControl.save(); await actionEnvironment.xDataControl.save();
} else if (isExist(actionEnvironment.save)) { } else if (isExist(actionEnvironment.save)) {
...@@ -262,6 +267,30 @@ export class AppSysAction { ...@@ -262,6 +267,30 @@ export class AppSysAction {
this.exit(params); this.exit(params);
} }
/**
* 保存并新建
*
* @static
* @param {IUIActionParams} params
* @memberof AppSysAction
*/
public static async saveAndNew(params: IUIActionParams) {
const { actionEnvironment } = params;
if (hasFunction(actionEnvironment.xDataControl, "save")) {
await actionEnvironment.xDataControl.save();
} else if (isExist(actionEnvironment.save)) {
await actionEnvironment.save();
}
// 跳转新建页面
const view = App.getViewInfo(actionEnvironment.state.viewCodeName);
if (!view) {
return;
}
// 准备数据参数
Object.assign(params.viewParams, { w: new Date().getTime() });
ViewUtil.newData(view, params);
}
/** /**
* 删除并关闭 * 删除并关闭
* *
......
...@@ -613,7 +613,7 @@ export class FormControl extends MainControl { ...@@ -613,7 +613,7 @@ export class FormControl extends MainControl {
// 处理请求参数 // 处理请求参数
let _context = deepCopy(context); let _context = deepCopy(context);
let _viewParams = deepCopy(viewParams); let _viewParams = deepCopy(viewParams);
const arg: any = opt[0]; const arg: any = opt;
Object.assign(arg, _viewParams); Object.assign(arg, _viewParams);
// 发起请求处理与解析请求 // 发起请求处理与解析请求
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册