|
@@ -75,10 +75,14 @@
|
|
|
<i-col :xs="24" :sm="24" :md="12" :lg="9">
|
|
|
<!-- 评测、作业 -->
|
|
|
<Card class="barCard" :bordered="true">
|
|
|
- <p slot="title" style="font-weight: bolder">
|
|
|
+ <div slot="title" style="font-weight: bolder">
|
|
|
<svg-icon class="titleIcon" icon-class="selflearning" />
|
|
|
<span class="title">{{ $t("studentWeb.missionListCardTitle1") }}</span>
|
|
|
- </p>
|
|
|
+ <div class="list-date" style="float: right;">
|
|
|
+ <span>{{ $t("studentWeb.choiceTime") }}:</span>
|
|
|
+ <DatePicker type="date" :value="choDate" :options="options" @on-change="choiceDate" :placeholder="$t('studentWeb.missionListCardPlace')" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<hwMissionListCard :testData="examandHw" :choDate="choDate ? choDate : ''" @choiceDate="choiceDate" />
|
|
|
</Card>
|
|
|
</i-col>
|
|
@@ -89,7 +93,7 @@
|
|
|
<svg-icon class="titleIcon" icon-class="target" />
|
|
|
<span class="title">{{ $t("studentWeb.myProgressBar.tasksCompletionRate") }}</span>
|
|
|
</p>
|
|
|
- <div class="myProgressBar">
|
|
|
+ <!-- <div class="myProgressBar">
|
|
|
<span class="myTestProgressNum">
|
|
|
{{ finishAct }}
|
|
|
<span style="font-size: 20px"> %</span>
|
|
@@ -99,6 +103,24 @@
|
|
|
:stroke-color="['#108ee9', '#87d068']"
|
|
|
:hide-info="true"
|
|
|
/>
|
|
|
+ </div> -->
|
|
|
+ <div style="display: flex;">
|
|
|
+ <div class="activity-num">
|
|
|
+ <p>{{ $t('studentWeb.home.exam') }}</p>
|
|
|
+ <span>{{ noFinish.exam }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="activity-num">
|
|
|
+ <p>{{ $t('studentWeb.home.homework') }}</p>
|
|
|
+ <span>{{ noFinish.homeWork }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="activity-num">
|
|
|
+ <p>{{ $t('studentWeb.home.vote') }}</p>
|
|
|
+ <span>{{ noFinish.vote }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="activity-num">
|
|
|
+ <p>{{ $t('studentWeb.home.survey') }}</p>
|
|
|
+ <span>{{ noFinish.survey }}</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</Card>
|
|
|
<!-- 今日截至活动 -->
|
|
@@ -112,7 +134,7 @@
|
|
|
<div class="todaydaylineList">
|
|
|
<div v-if="!todayData.length" class="no-data">{{ $t("studentWeb.public.noData") }}</div>
|
|
|
<div class="list-block"
|
|
|
- style='height: 27vh'
|
|
|
+ style='height: 20vh'
|
|
|
v-else
|
|
|
>
|
|
|
<div :id="`tditem${index}`"
|
|
@@ -230,10 +252,14 @@
|
|
|
</Card>
|
|
|
<!-- 投票、问卷 -->
|
|
|
<Card class="barCard" :bordered="true">
|
|
|
- <p slot="title" style="font-weight: bolder">
|
|
|
+ <div slot="title" style="font-weight: bolder;">
|
|
|
<svg-icon class="titleIcon" icon-class="selflearning" />
|
|
|
<span class="title">{{ $t("studentWeb.missionListCardTitle2") }}</span>
|
|
|
- </p>
|
|
|
+ <div class="list-date" style="float: right;">
|
|
|
+ <span>{{ $t("studentWeb.choiceTime") }}:</span>
|
|
|
+ <DatePicker type="date" :value="choDate" :options="options" @on-change="choiceDate" :placeholder="$t('studentWeb.missionListCardPlace')" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<newMissionListCard :testData="voteandSur" :choDate="choDate ? choDate : ''" @choiceDate="choiceDate" />
|
|
|
</Card>
|
|
|
</i-col>
|
|
@@ -321,6 +347,17 @@ export default {
|
|
|
voteandSur: [],
|
|
|
examandHw: [],
|
|
|
countDown: null,
|
|
|
+ noFinish: {
|
|
|
+ exam: 0,
|
|
|
+ homeWork: 0,
|
|
|
+ vote: 0,
|
|
|
+ survey: 0,
|
|
|
+ },
|
|
|
+ options: {
|
|
|
+ disabledDate (date) {
|
|
|
+ return date && date.valueOf() > Date.now() - 86400000;
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
beforeDestroy () {
|
|
@@ -746,6 +783,32 @@ export default {
|
|
|
userInfo: state => state.userInfo,
|
|
|
user: state => state.user,
|
|
|
})
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ testData: {
|
|
|
+ deep: true,
|
|
|
+ handler(n, o) {
|
|
|
+ this.noFinish = {
|
|
|
+ exam: 0,
|
|
|
+ homeWork: 0,
|
|
|
+ vote: 0,
|
|
|
+ survey: 0,
|
|
|
+ }
|
|
|
+ n.forEach(item => {
|
|
|
+ if(item.progress === 'going' && item.taskStatus === -1) {
|
|
|
+ if(item.type === 'Exam') {
|
|
|
+ this.noFinish.exam += 1
|
|
|
+ } else if(item.type === 'Homework') {
|
|
|
+ this.noFinish.homeWork += 1
|
|
|
+ } else if(item.type === 'Vote') {
|
|
|
+ this.noFinish.vote += 1
|
|
|
+ } else if(item.type === 'Survey') {
|
|
|
+ this.noFinish.survey += 1
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|