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

提示多语言

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