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

加载参数

上级 ef75aa4f
...@@ -40,7 +40,7 @@ export class CalendarServiceBase extends MdServiceBase { ...@@ -40,7 +40,7 @@ export class CalendarServiceBase extends MdServiceBase {
} }
return this.formatItem(response, calendarItem); return this.formatItem(response, calendarItem);
} }
const response: HttpResponse = await this.service[action](context, data); const response: Httpresponse = await this.service[action](context, data, isLoading);
if (response.isError && response.isError()) { if (response.isError && response.isError()) {
return Promise.reject(response); return Promise.reject(response);
} }
......
...@@ -110,7 +110,7 @@ export class ControlServiceBase { ...@@ -110,7 +110,7 @@ export class ControlServiceBase {
*/ */
protected async onBeforeAction(action?: string, context: any = {}, data: any = {}, isLoading: boolean = true): Promise<any> { protected async onBeforeAction(action?: string, context: any = {}, data: any = {}, isLoading: boolean = true): Promise<any> {
if (isLoading) { if (isLoading) {
this.showLoading(); // this.showLoading();
} }
if (!this.service) { if (!this.service) {
this.service = await this.getService(this.appDEName); this.service = await this.getService(this.appDEName);
...@@ -141,7 +141,7 @@ export class ControlServiceBase { ...@@ -141,7 +141,7 @@ export class ControlServiceBase {
* @memberof ControlServiceBase * @memberof ControlServiceBase
*/ */
protected async onAfterAction(action?: string, context: any = {}, response?: any): Promise<any> { protected async onAfterAction(action?: string, context: any = {}, response?: any): Promise<any> {
this.hiddenLoading(); // this.hiddenLoading();
this.afterAction(action, context, response); this.afterAction(action, context, response);
} }
......
...@@ -40,9 +40,9 @@ export class FormServiceBase extends ControlServiceBase { ...@@ -40,9 +40,9 @@ export class FormServiceBase extends ControlServiceBase {
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
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, isLoading);
} else { } else {
response = await this.service.Create(context, data); response = await this.service.Create(context, data, isLoading);
} }
if (!response.isError()) { if (!response.isError()) {
response = this.handleResponse(action, response); response = this.handleResponse(action, response);
...@@ -67,7 +67,7 @@ export class FormServiceBase extends ControlServiceBase { ...@@ -67,7 +67,7 @@ export class FormServiceBase extends ControlServiceBase {
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
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, isLoading);
} else { } else {
response = await this.service.WFSubmit(context, data, wfdata); response = await this.service.WFSubmit(context, data, wfdata);
} }
......
...@@ -25,7 +25,7 @@ export class WizardPanelServiceBase extends ControlServiceBase { ...@@ -25,7 +25,7 @@ export class WizardPanelServiceBase extends ControlServiceBase {
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
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, isLoading);
} else { } else {
response = await this.service.Create(context, data); response = await this.service.Create(context, data);
} }
...@@ -51,7 +51,7 @@ export class WizardPanelServiceBase extends ControlServiceBase { ...@@ -51,7 +51,7 @@ export class WizardPanelServiceBase extends ControlServiceBase {
data = this.handleRequestData(action, context, data); data = this.handleRequestData(action, context, data);
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, isLoading);
} else { } else {
response = await this.service.Update(context, data); response = await this.service.Update(context, data);
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册