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

表单国际化更新——fix1

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