提交 b069eab9 编写于 作者: Mosher's avatar Mosher

调整错误提示信息

上级 cb19db08
...@@ -671,8 +671,8 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -671,8 +671,8 @@ import CodeListService from "@/codelist/codelist-service";
const post: Promise<any> = this.service.search(this.fetchAction, this.context?JSON.parse(JSON.stringify(this.context)):{}, arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction, this.context?JSON.parse(JSON.stringify(this.context)):{}, arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -714,7 +714,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -714,7 +714,7 @@ import CodeListService from "@/codelist/codelist-service";
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
...@@ -355,8 +355,8 @@ ...@@ -355,8 +355,8 @@
const promice: Promise<any> = this.service.get(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator); const promice: Promise<any> = this.service.get(this.fetchAction,JSON.parse(JSON.stringify(this.context)),arg, this.showBusyIndicator);
promice.then((response: any) => { promice.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -370,7 +370,7 @@ ...@@ -370,7 +370,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
...@@ -387,8 +387,8 @@ ...@@ -387,8 +387,8 @@
const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator); const promice: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)),{viewparams:this.viewparams}, this.showBusyIndicator);
promice.then((response: any) => { promice.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -398,7 +398,7 @@ ...@@ -398,7 +398,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
...@@ -699,8 +699,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -699,8 +699,8 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); let post: Promise<any> = this.service.loadDraft(this.loaddraftAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
......
...@@ -831,8 +831,8 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -831,8 +831,8 @@ import CodeListService from "@/codelist/codelist-service";
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -877,7 +877,7 @@ import CodeListService from "@/codelist/codelist-service"; ...@@ -877,7 +877,7 @@ import CodeListService from "@/codelist/codelist-service";
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
...@@ -496,8 +496,8 @@ FullCalendar, ...@@ -496,8 +496,8 @@ FullCalendar,
const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.loadAction, JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -508,7 +508,7 @@ FullCalendar, ...@@ -508,7 +508,7 @@ FullCalendar,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
...@@ -698,8 +698,8 @@ FullCalendar, ...@@ -698,8 +698,8 @@ FullCalendar,
const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.update(itemType, JSON.parse(JSON.stringify(_context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -707,7 +707,7 @@ FullCalendar, ...@@ -707,7 +707,7 @@ FullCalendar,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
...@@ -467,8 +467,8 @@ draggable, ...@@ -467,8 +467,8 @@ draggable,
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -498,7 +498,7 @@ draggable, ...@@ -498,7 +498,7 @@ draggable,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
...@@ -828,8 +828,8 @@ ${gridColumn.getName()} ...@@ -828,8 +828,8 @@ ${gridColumn.getName()}
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -885,7 +885,7 @@ ${gridColumn.getName()} ...@@ -885,7 +885,7 @@ ${gridColumn.getName()}
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
...@@ -970,7 +970,7 @@ ${gridColumn.getName()} ...@@ -970,7 +970,7 @@ ${gridColumn.getName()}
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status != 200) { if (response && response.status != 200) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.message}); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
...@@ -2086,8 +2086,8 @@ ${gridColumn.getName()} ...@@ -2086,8 +2086,8 @@ ${gridColumn.getName()}
public getAggData(){ public getAggData(){
this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{ this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -2099,7 +2099,7 @@ ${gridColumn.getName()} ...@@ -2099,7 +2099,7 @@ ${gridColumn.getName()}
} }
this.remoteData = {}; this.remoteData = {};
this.isDisplay = true; this.isDisplay = true;
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data && response.data.message ? response.data.message : "" });
}) })
} }
</#if> </#if>
...@@ -2322,8 +2322,8 @@ ${gridColumn.getName()} ...@@ -2322,8 +2322,8 @@ ${gridColumn.getName()}
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator); let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
......
...@@ -643,8 +643,8 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -643,8 +643,8 @@ import { FormItemModel } from '@/model/form-detail';
const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator); const post: Promise<any> = this.service.search(this.fetchAction,JSON.parse(JSON.stringify(this.context)), arg, this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data.message });
} }
return; return;
} }
...@@ -684,7 +684,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -684,7 +684,7 @@ import { FormItemModel } from '@/model/form-detail';
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
...@@ -1486,8 +1486,8 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1486,8 +1486,8 @@ import { FormItemModel } from '@/model/form-detail';
public getAggData(){ public getAggData(){
this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{ this.service.getAggData(this.aggAction,JSON.parse(JSON.stringify(this.context)),this.showBusyIndicator).then((response:any) =>{
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data && response.data.message ? response.data.message : "" });
} }
return; return;
} }
...@@ -1499,7 +1499,7 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1499,7 +1499,7 @@ import { FormItemModel } from '@/model/form-detail';
} }
this.remoteData = {}; this.remoteData = {};
this.isDisplay = true; this.isDisplay = true;
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data && response.data.message ? response.data.message : ""});
}) })
} }
</#if> </#if>
...@@ -1655,8 +1655,8 @@ import { FormItemModel } from '@/model/form-detail'; ...@@ -1655,8 +1655,8 @@ import { FormItemModel } from '@/model/form-detail';
let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator); let post: Promise<any> = this.service.loadDraft(this.loaddraftAction, JSON.parse(JSON.stringify(this.context)), args[0], this.showBusyIndicator);
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data.message });
} }
return; return;
} }
......
...@@ -104,8 +104,8 @@ ...@@ -104,8 +104,8 @@
const _this: any = this; const _this: any = this;
this.wf_Step(item, $event, data).then((response: any) => { this.wf_Step(item, $event, data).then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.errorMessage) { if (response.data && response.data.message) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data.message });
} }
return; return;
} }
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: '错误', desc: response.data && response.data.message ? response.data.message : "" });
}); });
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册