Parcourir la source

Merge branch '03/08netWorkReset' into test

mo il y a 3 ans
Parent
commit
cdf1b3992b

+ 5 - 7
src/views/teacherManager/teacherDetail/components/teacherInfo.vue

@@ -214,11 +214,6 @@ export default {
       topForm: {}
     }
   },
-  activated () {
-    this.teacherId = this.$route.query.teacherId
-    this.teacherGet()
-    // console.log(this.$route.query.teacherId);
-  },
   mounted () {
     this.teacherId = this.$route.query.teacherId
     this.teacherGet()
@@ -237,7 +232,10 @@ export default {
           tempData.entryDate = this.formatTimer(tempData.entryDate)
           tempData.jobNature = this.jobNature(tempData.jobNature)
           tempData.birthdate = this.formatTimer(tempData.birthdate)
-          tempData.gender = tempData.gender ? '男' : '女'
+          if(tempData.gender !='男'&&tempData.gender!='女'){
+            tempData.gender = tempData.gender ? '男' : '女'
+          }
+
           this.topForm = this.teacherInfo
           if(this.topForm.demissionDate){
              this.topForm.demissionDate = dayjs(this.topForm.demissionDate).format('YYYY-MM-DD')
@@ -277,7 +275,7 @@ export default {
       let str = ''
       this.topForm.isSupportExtraPracticeLesson ? str = '是' : str = "否"
       return str
-    }
+    },
   }
 }
 </script>