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

增加 loadDraft 仿真主键

上级 547c066e
...@@ -274,8 +274,9 @@ export class ControlServiceBase { ...@@ -274,8 +274,9 @@ export class ControlServiceBase {
public async loadDraft(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> { public async loadDraft(action: string, context: any = {}, data: any = {}, isLoading?: boolean): Promise<HttpResponse> {
await this.onBeforeAction(action, context, data, isLoading); await this.onBeforeAction(action, context, data, isLoading);
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
let PrimaryKey = Util.createUUID();
//仿真主键数据 //仿真主键数据
data[this.appDeKey] = Util.createUUID(); data[this.appDeKey] = PrimaryKey;
let response: HttpResponse; let response: HttpResponse;
if (Util.isFunction(this.service[action])) { if (Util.isFunction(this.service[action])) {
response = await this.service[action](context, data); response = await this.service[action](context, data);
...@@ -286,6 +287,7 @@ export class ControlServiceBase { ...@@ -286,6 +287,7 @@ export class ControlServiceBase {
response = this.handleResponse(action, response, true); response = this.handleResponse(action, response, true);
this.mergeDefaults(response); this.mergeDefaults(response);
} }
response.data[this.appDeKey] = PrimaryKey;
await this.onAfterAction(action, context, response); await this.onAfterAction(action, context, response);
return response; return response;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册