Quellcode durchsuchen

补充时间状态

zhousheng vor 4 Jahren
Ursprung
Commit
42cf669fcb

+ 11 - 2
TEAMModelOS/ClientApp/src/components/student-web/HomeView/MissionListCard.vue

@@ -32,10 +32,10 @@
                                 <span v-show="item.eventType == 'Survey'" class="list-item-typeMark">{{item.scope == 'school'? $t('studentWeb.public.schoolSurvey'):$t('studentWeb.public.privateSurvey')}}</span>
                                 <span>{{ item.name }}</span>
                                 <div style="float:right;margin-top:-20px">
-                                    <div class="list-item-unDone" v-show="item.progress == 'going'">
+                                    <div class="list-item-unDone" v-show="timeStatus(item) == 'going'">
                                         <span class="isAllowRetry">{{$t("studentWeb.public.going")}}</span>
                                     </div>
-                                    <div class="list-item-unDone" v-show="item.progress == 'finish'">
+                                    <div class="list-item-unDone" v-show="timeStatus(item) == 'finish'">
                                         <span class="isOvertime">{{$t("studentWeb.public.finish")}}</span>
                                     </div>
                                 </div>
@@ -148,6 +148,15 @@
             randomScore: function () {
                 return Random.integer(70, 96);
             },
+            timeStatus(data) {
+                console.log(data)
+                let date = (new Date()).getTime() //当前时间
+                if (date >= data.endTime) {
+                    return 'finish'
+                } else {
+                    return 'going'
+                }
+            },
             sentSelectedEventTitle: function (item) {
                 this.$router.push({path: "/studentWeb/eventView",
                   query: {