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

看板视图国际化更新

上级 bc368751
...@@ -384,7 +384,7 @@ draggable, ...@@ -384,7 +384,7 @@ draggable,
*/ */
public load(opt: any = {}, isReset: boolean = false): void { public load(opt: any = {}, isReset: boolean = false): void {
if(!this.fetchAction){ if(!this.fetchAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表fetchAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -408,7 +408,7 @@ draggable, ...@@ -408,7 +408,7 @@ draggable,
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
if (response.errorMessage) { if (response.errorMessage) {
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
} }
return; return;
} }
...@@ -438,7 +438,7 @@ draggable, ...@@ -438,7 +438,7 @@ draggable,
if (response && response.status === 401) { if (response && response.status === 401) {
return; return;
} }
this.$Notice.error({ title: '错误', desc: response.errorMessage }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.errorMessage });
}); });
} }
...@@ -451,7 +451,7 @@ draggable, ...@@ -451,7 +451,7 @@ draggable,
*/ */
public async remove(datas: any[]): Promise<any> { public async remove(datas: any[]): Promise<any> {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图表格removeAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string)', desc: '${view.getName()}' + (this.$t('app.kanban.notConfig.removeAction') as string) });
return; return;
} }
let _datas:any[] = []; let _datas:any[] = [];
...@@ -500,10 +500,10 @@ draggable, ...@@ -500,10 +500,10 @@ draggable,
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: '', desc: '删除数据失败,' + response.info }); this.$Notice.error({ title: '', desc: (this.$t('app.commonWords.delDataFail') as string) + ',' + response.info });
return; return;
} else { } else {
this.$Notice.success({ title: '', desc: '删除成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.deleteSuccess') as string) });
} }
//删除items中已删除的项 //删除items中已删除的项
_datas.forEach((data: any) => { _datas.forEach((data: any) => {
...@@ -522,7 +522,7 @@ draggable, ...@@ -522,7 +522,7 @@ draggable,
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
reject(response); reject(response);
return; return;
} }
...@@ -533,8 +533,8 @@ draggable, ...@@ -533,8 +533,8 @@ draggable,
dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, ''); dataInfo = dataInfo.replace(/[null]/g, '').replace(/[undefined]/g, '').replace(/[ ]/g, '');
this.$Modal.confirm({ this.$Modal.confirm({
title: '警告', title: (this.$t('app.commonWords.warning') as string),
content: '确认要删除 ' + dataInfo + ',删除操作将不可恢复?', content: (this.$t('app.kanban.delete1') as string) + dataInfo + ',' + (this.$t('app.kanban.delete2') as string),
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -560,7 +560,7 @@ draggable, ...@@ -560,7 +560,7 @@ draggable,
post.then((response: any) => { post.then((response: any) => {
if (!response.status || response.status !== 200) { if (!response.status || response.status !== 200) {
if (response.data) { if (response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
this.setGroups(); this.setGroups();
return; return;
...@@ -571,11 +571,11 @@ draggable, ...@@ -571,11 +571,11 @@ draggable,
this.$emit('update', this.items); this.$emit('update', this.items);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: '错误', desc: '系统异常' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册