Browse Source

Merge remote-tracking branch 'origin/fix-timemap'

lex-xin 4 years ago
parent
commit
20e1e688c4
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/views/teamDetail/componentCourse/infoMsg.vue

+ 5 - 1
src/views/teamDetail/componentCourse/infoMsg.vue

@@ -64,6 +64,10 @@ export default {
     })
   },
   methods: {
+    getRealTime(time) {
+      const parsenum = parseInt(time)
+      return ('' + time).indexOf(' ') > -1 ? time : parsenum
+    },
     filterKeys(item) {
       const teachingTeacherNames = (item.teachingTeacherNames || '').split(',').sort((a, b) => (a || '').localeCompare((b || ''), 'zh'))
       return {
@@ -82,7 +86,7 @@ export default {
       return item.operatorName + ' 在 ' + item.createTime + ' 修改了'
     },
     getTimers (item) {
-      return diffTimerFormMinute(dayjs(item.classDate).format('YYYY-MM-DD'), dayjs(item.startClassTime).format('HH:mm'), dayjs(item.endClassTime).format('HH:mm'))
+      return diffTimerFormMinute(dayjs(item.classDate).format('YYYY-MM-DD'), dayjs(this.getRealTime(item.startClassTime)).format('HH:mm'), dayjs(this.getRealTime(item.endClassTime)).format('HH:mm'))
     }
   },
   computed: {