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

表单国际化更新——fix1

上级 3124ddf4
...@@ -676,7 +676,7 @@ import schema from 'async-validator'; ...@@ -676,7 +676,7 @@ import schema from 'async-validator';
if (value && value.startsWith('%') && value.endsWith('%')) { if (value && value.startsWith('%') && value.endsWith('%')) {
const key: string = value.substring(1, value.length - 1); const key: string = value.substring(1, value.length - 1);
if (!this.data.hasOwnProperty(key)) { if (!this.data.hasOwnProperty(key)) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: `${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}` }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: `${(this.$t('app.formpage.desc1') as string)}${r'${key}'},${(this.$t('app.formpage.desc2') as string)}` });
return false; return false;
} }
value = this.data[key]; value = this.data[key];
...@@ -906,7 +906,7 @@ import schema from 'async-validator'; ...@@ -906,7 +906,7 @@ import schema from 'async-validator';
*/ */
public load(opt: any = {}): void { public load(opt: any = {}): void {
if(!this.loadAction){ if(!this.loadAction){
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loadAction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loadAction') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -923,11 +923,11 @@ import schema from 'async-validator'; ...@@ -923,11 +923,11 @@ import schema from 'async-validator';
} }
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), 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: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -941,7 +941,7 @@ import schema from 'async-validator'; ...@@ -941,7 +941,7 @@ import schema from 'async-validator';
*/ */
public loadDraft(opt: any = {}): void { public loadDraft(opt: any = {}): void {
if(!this.loaddraftAction){ if(!this.loaddraftAction){
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.loaddraftaction') as string) });
return; return;
} }
const arg: any = { ...opt } ; const arg: any = { ...opt } ;
...@@ -950,7 +950,7 @@ import schema from 'async-validator'; ...@@ -950,7 +950,7 @@ import schema from 'async-validator';
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: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -979,11 +979,11 @@ import schema from 'async-validator'; ...@@ -979,11 +979,11 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), 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: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1005,7 +1005,7 @@ import schema from 'async-validator'; ...@@ -1005,7 +1005,7 @@ import schema from 'async-validator';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1013,7 +1013,7 @@ import schema from 'async-validator'; ...@@ -1013,7 +1013,7 @@ import schema from 'async-validator';
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: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -1039,12 +1039,12 @@ import schema from 'async-validator'; ...@@ -1039,12 +1039,12 @@ import schema from 'async-validator';
onCancel: () => { } onCancel: () => { }
}); });
}else{ }else{
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), 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: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
...@@ -1063,7 +1063,7 @@ import schema from 'async-validator'; ...@@ -1063,7 +1063,7 @@ import schema from 'async-validator';
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
showResultInfo = showResultInfo === undefined ? true : false; showResultInfo = showResultInfo === undefined ? true : false;
if (!this.formValidateStatus()) { if (!this.formValidateStatus()) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.valuecheckex') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.valuecheckex') as string) });
return; return;
} }
const arg: any = { ...opt }; const arg: any = { ...opt };
...@@ -1088,7 +1088,7 @@ import schema from 'async-validator'; ...@@ -1088,7 +1088,7 @@ import schema from 'async-validator';
const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction; const action: any = Object.is(data.srfuf, '1') ? this.updateAction : this.createAction;
if(!action){ if(!action){
let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction"; let actionName:any = Object.is(data.srfuf, '1')?"updateAction":"createAction";
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.actionname') as string) });
return; return;
} }
Object.assign(arg,{viewparams:this.viewparams}); Object.assign(arg,{viewparams:this.viewparams});
...@@ -1096,7 +1096,7 @@ import schema from 'async-validator'; ...@@ -1096,7 +1096,7 @@ import schema from 'async-validator';
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: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
} }
return; return;
} }
...@@ -1128,13 +1128,13 @@ import schema from 'async-validator'; ...@@ -1128,13 +1128,13 @@ import schema from 'async-validator';
onCancel: () => { } onCancel: () => { }
}); });
}else{ }else{
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
} }
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); 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;
} }
...@@ -1153,7 +1153,7 @@ import schema from 'async-validator'; ...@@ -1153,7 +1153,7 @@ import schema from 'async-validator';
public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> { public remove(opt:Array<any> = [],showResultInfo?: boolean): Promise<any> {
return new Promise((resolve: any, reject: any) => { return new Promise((resolve: any, reject: any) => {
if(!this.removeAction){ if(!this.removeAction){
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.removeaction') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '${view.getName()}' + (this.$t('app.formpage.notconfig.removeaction') as string) });
return; return;
} }
const arg: any = opt[0]; const arg: any = opt[0];
...@@ -1209,12 +1209,12 @@ import schema from 'async-validator'; ...@@ -1209,12 +1209,12 @@ import schema from 'async-validator';
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); 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;
} }
...@@ -1222,12 +1222,12 @@ import schema from 'async-validator'; ...@@ -1222,12 +1222,12 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); 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;
} }
...@@ -1286,12 +1286,12 @@ import schema from 'async-validator'; ...@@ -1286,12 +1286,12 @@ import schema from 'async-validator';
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); 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;
} }
...@@ -1299,12 +1299,12 @@ import schema from 'async-validator'; ...@@ -1299,12 +1299,12 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: response.data.message }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: response.data.message });
reject(response); reject(response);
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); 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;
} }
...@@ -1333,7 +1333,7 @@ import schema from 'async-validator'; ...@@ -1333,7 +1333,7 @@ import schema from 'async-validator';
const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading); const post: Promise<any> = this.service.frontLogic(mode,JSON.parse(JSON.stringify(this.context)),arg, showloading);
post.then((response: any) => { post.then((response: any) => {
if (!response || response.status !== 200) { if (!response || response.status !== 200) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.updateerror') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.formpage.updateerror') as string) });
return; return;
} }
const data = response.data; const data = response.data;
...@@ -1356,11 +1356,11 @@ import schema from 'async-validator'; ...@@ -1356,11 +1356,11 @@ import schema from 'async-validator';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: (this.$t('app.formpage.error') as string), 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: (this.$t('app.formpage.error') as string), desc: (this.$t('app.formpage.sysabnormality') as string) }); this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: (this.$t('app.commonWords.sysException') as string) });
return; return;
} }
}); });
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
reqException: "Request exception", reqException: "Request exception",
sysException: "System abnormality", sysException: "System abnormality",
warning: "Warning", warning: "Warning",
wrong: "Error",
}, },
local:{ local:{
new: "New" new: "New"
...@@ -97,7 +98,6 @@ export default { ...@@ -97,7 +98,6 @@ export default {
}, },
saveerror: "Error saving data", saveerror: "Error saving data",
savecontent: "The data is inconsistent. The background data may have been modified. Do you want to reload the data?", savecontent: "The data is inconsistent. The background data may have been modified. Do you want to reload the data?",
sysabnormality: "System abnormality",
valuecheckex: "Value rule check exception", valuecheckex: "Value rule check exception",
savesuccess: "Saved successfully!", savesuccess: "Saved successfully!",
deletesuccess: "Successfully deleted!", deletesuccess: "Successfully deleted!",
......
...@@ -22,6 +22,7 @@ export default { ...@@ -22,6 +22,7 @@ export default {
reqException: "请求异常", reqException: "请求异常",
sysException: "系统异常", sysException: "系统异常",
warning: "警告", warning: "警告",
wrong: "错误",
}, },
local:{ local:{
new: "新建" new: "新建"
...@@ -86,7 +87,6 @@ export default { ...@@ -86,7 +87,6 @@ export default {
</#list> </#list>
}, },
formpage:{ formpage:{
error: "错误",
desc1: "操作失败,未能找到当前表单项", desc1: "操作失败,未能找到当前表单项",
desc2: "无法继续操作", desc2: "无法继续操作",
notconfig: { notconfig: {
...@@ -97,7 +97,6 @@ export default { ...@@ -97,7 +97,6 @@ export default {
}, },
saveerror: "保存数据发生错误", saveerror: "保存数据发生错误",
savecontent: "数据不一致,可能后台数据已经被修改,是否要重新加载数据?", savecontent: "数据不一致,可能后台数据已经被修改,是否要重新加载数据?",
sysabnormality: "系统异常",
valuecheckex: "值规则校验异常", valuecheckex: "值规则校验异常",
savesuccess: "保存成功!", savesuccess: "保存成功!",
deletesuccess: "删除成功!", deletesuccess: "删除成功!",
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册