NULL1222 6 дней назад
Родитель
Сommit
aabd5564b0

+ 4 - 5
src/HManagement/department/staff/list/modules/add.vue

@@ -279,17 +279,16 @@ export default {
 
   },
   methods:{
-    onShow () {
-      this.$store.dispatch('optiontypeselect','tradefield').then(res=>{
-        this.tradefields = res.data
-      })
+    async onShow () {
+      const tradefieldRes = await this.$store.dispatch('optiontypeselect','tradefield')
+      this.tradefields = tradefieldRes.data
       this.dialogFormVisible = true
       this.form.status = 0
       this.list = []
       this.salerList = []
       // this.form.depname = this.depInfo.data.label
       // this.form.departmentid = this.depInfo.data.departmentid
-      this.$store.dispatch('optiontypeselect','sex')
+      await this.$store.dispatch('optiontypeselect','sex')
 
 
     },

+ 4 - 5
src/HManagement/department/staff/list/modules/edit.vue

@@ -318,15 +318,14 @@ export default {
       });
       return arr
     },
-    onShow () {
+    async onShow () {
       this.list = []
       this.salerList = []
       this.query_hrMain()
       this.department()
-      this.$store.dispatch('optiontypeselect','tradefield').then(res=>{
-        this.tradefields = res.data
-      })
-      this.$store.dispatch('optiontypeselect','sex')
+      const tradefieldRes = await this.$store.dispatch('optiontypeselect','tradefield')
+      this.tradefields = tradefieldRes.data
+      await this.$store.dispatch('optiontypeselect','sex')
       this.dialogFormVisible = true
     },
     selectDep  (data) {