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

列表国际化更新

上级 6512d8a7
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
</#if> </#if>
</div> </div>
<div v-else> <div v-else>
暂无数据 {{ $t('app.commonWords.noData') }}
</div> </div>
</div> </div>
</template> </template>
...@@ -326,7 +326,7 @@ ...@@ -326,7 +326,7 @@
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): 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.list.notConfig.fetchAction') as string) });
return; return;
} }
const arg: any = {...opt}; const arg: any = {...opt};
...@@ -352,7 +352,7 @@ ...@@ -352,7 +352,7 @@
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;
} }
...@@ -377,7 +377,7 @@ ...@@ -377,7 +377,7 @@
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 });
}); });
} }
...@@ -390,7 +390,7 @@ ...@@ -390,7 +390,7 @@
*/ */
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.list.notConfig.removeAction') as string) });
return; return;
} }
if (datas.length === 0) { if (datas.length === 0) {
...@@ -426,10 +426,10 @@ ...@@ -426,10 +426,10 @@
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) => {
...@@ -448,7 +448,7 @@ ...@@ -448,7 +448,7 @@
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;
} }
...@@ -459,8 +459,8 @@ ...@@ -459,8 +459,8 @@
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.list.confirmDel') as string) + ' ' + dataInfo + ',' + (this.$t('app.list.notRecoverable') as string) ,
onOk: () => { onOk: () => {
removeData(); removeData();
}, },
...@@ -485,7 +485,7 @@ ...@@ -485,7 +485,7 @@
try { try {
if(Object.is(item.rowDataState, 'create')){ if(Object.is(item.rowDataState, 'create')){
if(!this.createAction){ if(!this.createAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表createAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.createAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator); let response = await this.service.add(this.createAction, JSON.parse(JSON.stringify(this.context)),item, this.showBusyIndicator);
...@@ -493,7 +493,7 @@ ...@@ -493,7 +493,7 @@
} }
}else if(Object.is(item.rowDataState, 'update')){ }else if(Object.is(item.rowDataState, 'update')){
if(!this.updateAction){ if(!this.updateAction){
this.$Notice.error({ title: '错误', desc: '${view.getName()}视图列表updateAction参数未配置' }); this.$Notice.error({ title: (this.$t('app.commonWords.warning') as string), desc: '${view.getName()}' + (this.$t('app.list.notConfig.updateAction') as string) });
}else{ }else{
Object.assign(item,{viewparams:this.viewparams}); Object.assign(item,{viewparams:this.viewparams});
<#if de??> <#if de??>
...@@ -513,10 +513,10 @@ ...@@ -513,10 +513,10 @@
this.$emit('save', successItems); this.$emit('save', successItems);
this.refresh(); this.refresh();
if(errorItems.length === 0){ if(errorItems.length === 0){
this.$Notice.success({ title: '', desc: '保存成功!' }); this.$Notice.success({ title: '', desc: (this.$t('app.commonWords.saveSuccess') as string) });
}else{ }else{
errorItems.forEach((item:any,index:number)=>{ errorItems.forEach((item:any,index:number)=>{
this.$Notice.error({ title: '保存失败', desc: item.majorentityname+'保存失败!' }); this.$Notice.error({ title: (this.$t('app.commonWords.saveFailed') as string), desc: item.majorentityname+ (this.$t('app.commonWords.saveFailed') as string) + '!' });
console.error(errorMessage[index]); console.error(errorMessage[index]);
}); });
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册