|
@@ -10,16 +10,18 @@ export default {
|
|
|
formTranslateReady: false
|
|
|
}
|
|
|
},
|
|
|
- beforeMount() {
|
|
|
+ created() {
|
|
|
this.loadTranslateForm()
|
|
|
},
|
|
|
methods: {
|
|
|
- async loadTranslateForm() {
|
|
|
- this.formTypeList = await this.getFormTypeListByCache()
|
|
|
- this.formStatusList = await this.getFormStatusListByCache()
|
|
|
- this.formAuditList = await this.getFormAuditListByCache()
|
|
|
- this.formTranslateReady = true
|
|
|
- this.translateFormReady()
|
|
|
+ loadTranslateForm() {
|
|
|
+ Promise.all([this.getFormTypeListByCache(), this.getFormStatusListByCache(), this.getFormAuditListByCache()]).then(res => {
|
|
|
+ this.formTypeList = res[0];
|
|
|
+ this.formStatusList = res[1];
|
|
|
+ this.formAuditList = res[2];
|
|
|
+ this.formTranslateReady = true
|
|
|
+ this.translateFormReady()
|
|
|
+ });
|
|
|
},
|
|
|
translateFormReady() {
|
|
|
//to be overrided for non-computed needs
|