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

提示多语言

上级 01d44420
...@@ -309,16 +309,16 @@ import moment from 'moment'; ...@@ -309,16 +309,16 @@ import moment from 'moment';
}); });
if (datas.length < 5) { if (datas.length < 5) {
infoStr = infoStr + ' 共' + datas.length + '条数据'; infoStr = infoStr + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} else { } else {
infoStr = infoStr + '...' + ' 共' + datas.length + '条数据'; infoStr = infoStr + '...' + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const _remove = async () => { const _remove = async () => {
let _context: any = { [appde]: keys.join(';') } let _context: any = { [appde]: keys.join(';') }
const response: any = await this.service.delete(this.activeItem, { ...this.context, ..._context }, arg, this.showBusyIndicator); const response: any = await this.service.delete(this.activeItem, { ...this.context, ..._context }, arg, this.showBusyIndicator);
if (response && response.status === 200) { if (response && response.status === 200) {
this.$notice.success('删除成功'); this.$notice.success(this.$t('app.message.deleteSccess'));
this.formatData(this.currentDate); this.formatData(this.currentDate);
resolve(response); resolve(response);
} else { } else {
...@@ -329,8 +329,8 @@ import moment from 'moment'; ...@@ -329,8 +329,8 @@ import moment from 'moment';
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '警告', title: this.$t('app.message.warning'),
message: '确认要删除 ' + infoStr + ',删除操作将不可恢复?', message: this.$t('app.message.confirmToDelete') + infoStr +','+ this.$t('app.message.unrecoverable') + '?',
}).then(() => { }).then(() => {
_remove(); _remove();
}).catch(() => { }).catch(() => {
......
...@@ -364,16 +364,16 @@ ...@@ -364,16 +364,16 @@
}); });
if (datas.length < 5) { if (datas.length < 5) {
infoStr = infoStr + ' 共' + datas.length + '条数据'; infoStr = infoStr + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} else { } else {
infoStr = infoStr + '...' + ' 共' + datas.length + '条数据'; infoStr = infoStr + '...' + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const _remove = async () => { const _remove = async () => {
let _context: any = { ${appde.getCodeName()?lower_case}: keys.join(';') } let _context: any = { ${appde.getCodeName()?lower_case}: keys.join(';') }
const response: any = await this.service.delete(this.removeAction, Object.assign({}, this.context, _context), arg, this.showBusyIndicator); const response: any = await this.service.delete(this.removeAction, Object.assign({}, this.context, _context), arg, this.showBusyIndicator);
if (response && response.status === 200) { if (response && response.status === 200) {
this.$notice.success('删除成功'); this.$notice.success(this.$t('app.message.deleteSccess'));
this.load(); this.load();
resolve(response); resolve(response);
} else { } else {
...@@ -383,8 +383,8 @@ ...@@ -383,8 +383,8 @@
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '警告', title: this.$t('app.message.warning'),
message: '确认要删除 ' + infoStr + ',删除操作将不可恢复?', message: this.$t('app.message.confirmToDelete') + infoStr +','+ this.$t('app.message.unrecoverable') + '?',
}).then(() => { }).then(() => {
_remove(); _remove();
}).catch(() => { }).catch(() => {
......
...@@ -372,16 +372,16 @@ ...@@ -372,16 +372,16 @@
}); });
if (datas.length < 5) { if (datas.length < 5) {
infoStr = infoStr + ' 共' + datas.length + '条数据'; infoStr = infoStr + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} else { } else {
infoStr = infoStr + '...' + ' 共' + datas.length + '条数据'; infoStr = infoStr + '...' + this.$t('app.message.totle') + datas.length + this.$t('app.message.data');
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const _remove = async () => { const _remove = async () => {
let _context: any = { ${appde.getCodeName()?lower_case}: keys.join(';') } let _context: any = { ${appde.getCodeName()?lower_case}: keys.join(';') }
const response: any = await this.service.delete(this.removeAction, Object.assign({}, this.context, _context), arg, this.showBusyIndicator); const response: any = await this.service.delete(this.removeAction, Object.assign({}, this.context, _context), arg, this.showBusyIndicator);
if (response && response.status === 200) { if (response && response.status === 200) {
this.$notice.success('删除成功'); this.$notice.success(this.$t('app.message.deleteSccess'));
this.load(); this.load();
resolve(response); resolve(response);
} else { } else {
...@@ -391,8 +391,8 @@ ...@@ -391,8 +391,8 @@
} }
this.$dialog.confirm({ this.$dialog.confirm({
title: '警告', title: this.$t('app.message.warning'),
message: '确认要删除 ' + infoStr + ',删除操作将不可恢复?', message: this.$t('app.message.confirmToDelete') + infoStr +','+ this.$t('app.message.unrecoverable') + '?',
}).then(() => { }).then(() => {
_remove(); _remove();
}).catch(() => { }).catch(() => {
......
...@@ -979,7 +979,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -979,7 +979,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}); });
<#if ctrl.getFormFuncMode()?lower_case != 'wizardform'> <#if ctrl.getFormFuncMode()?lower_case != 'wizardform'>
if (showResultInfo) { if (showResultInfo) {
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;保存成功!'); this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ this.$t('app.message.savedSuccess'));
} }
</#if> </#if>
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
...@@ -1016,7 +1016,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1016,7 +1016,7 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
this.$emit('remove', data); this.$emit('remove', data);
this.formState.next({ type: 'remove', data: data }); this.formState.next({ type: 'remove', data: data });
this.data.ismodify = false; this.data.ismodify = false;
this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;删除成功!'); this.$notice.success((data.srfmajortext ? data.srfmajortext : '') + '&nbsp;'+ this.$t('app.message.deleteSccess'));
} else if (response && response.status !== 401) { } else if (response && response.status !== 401) {
const { error: _data } = response; const { error: _data } = response;
this.$notice.error(_data.message); this.$notice.error(_data.message);
......
...@@ -77,6 +77,17 @@ export default { ...@@ -77,6 +77,17 @@ export default {
}, },
view:"View", view:"View",
notConfig:" Parameter not configured", notConfig:" Parameter not configured",
message: {
success: "successfully",
fail: "failed",
savedSuccess: "Saved successfully",
deleteSccess: "successfully deleted",
warning: " Warning ",
confirmToDelete: "Confirm to delete",
unrecoverable: "Will the delete operation be unrecoverable",
totle: "A total of",
data: "data"
},
statusMessage:{ statusMessage:{
200: 'The server successfully returned the requested data', 200: 'The server successfully returned the requested data',
201: 'New or modified data is successful.', 201: 'New or modified data is successful.',
......
...@@ -78,6 +78,17 @@ export default { ...@@ -78,6 +78,17 @@ export default {
}, },
view:"视图", view:"视图",
notConfig:"参数未配置", notConfig:"参数未配置",
message:{
success: "成功",
fail: "失败",
savedSuccess: "保存成功",
deleteSccess: "删除成功",
warning: "警告",
confirmToDelete: "确认删除 ",
unrecoverable: " 删除操作将不可恢复",
totle: "共",
data: "条数据"
},
statusMessage:{ statusMessage:{
200: '服务器成功返回请求的数据。', 200: '服务器成功返回请求的数据。',
201: '新建或修改数据成功。', 201: '新建或修改数据成功。',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册