提交 26ff9073 编写于 作者: tony001's avatar tony001

zpc --- 完善开始流程关闭页面和错误提示

上级 0169ed16
......@@ -850,8 +850,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
});
}
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
......@@ -877,8 +877,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:viewparamResult}, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
}
return;
}
......@@ -906,8 +906,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}
});
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
......@@ -940,8 +940,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const post: Promise<any> = this.service.add(action, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
}
return;
}
......@@ -956,8 +956,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'save', data: data });
});
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
......@@ -1012,8 +1012,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const post: Promise<any> = Object.is(data.srfuf, '1')?this.service.update(action, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator):this.service.add(action,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
post.then((response: any) => {
if (!response.status || response.status !== 200) {
if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage });
if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
}
return;
}
......@@ -1034,8 +1034,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
</#if>
resolve(response);
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
return;
}
......@@ -1109,14 +1109,16 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const result: Promise<any> = this.service.wfstart(_this.WFStartAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流启动失败, ' + response.info });
if(response.data){
this.$Notice.error({ title: '', desc: '工作流启动失败, ' + response.data.message });
}
return;
}
this.$Notice.info({ title: '', desc: '工作流启动成功' });
resolve(response);
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
return;
}
......@@ -1128,8 +1130,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
reject(response);
});
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
return;
}
......@@ -1172,14 +1174,16 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
const result: Promise<any> = this.service.wfsubmit(_this.WFSubmitAction, JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator,localdata);
result.then((response: any) => {
if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.info });
if(response.data){
this.$Notice.error({ title: '', desc: '工作流提交失败, ' + response.data.message });
}
return;
}
this.$Notice.info({ title: '', desc: '工作流提交成功' });
resolve(response);
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
return;
}
......@@ -1191,8 +1195,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
reject(response);
});
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
return;
}
......@@ -1245,8 +1249,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.formState.next({ type: 'updateformitem', ufimode: arg.srfufimode, data: _data });
});
}).catch((response: any) => {
if (response && response.status) {
this.$Notice.error({ title: '错误', desc: response.message });
if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message });
return;
}
if (!response || !response.status || !response.data) {
......
......@@ -36,6 +36,8 @@
if (_this.viewdata) {
_this.$emit('viewdataschange', [{ ..._data }]);
_this.$emit('close');
}else if (this.$tabPageExp) {
this.$tabPageExp.onClose(this.$route.fullPath);
}
});
}
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册