Browse Source

修改记录时间修复

wolyshaw 4 năm trước cách đây
mục cha
commit
f31c693a82
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  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: {