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) => {