Selaa lähdekoodia

Merge branch 'develop5.0-tmd' of http://106.12.23.251:10000/TEAMMODEL/TEAMModelOS into develop5.0-tmd

liqk 3 vuotta sitten
vanhempi
commit
bf39e0149d

+ 5 - 3
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/Vote.vue

@@ -41,7 +41,7 @@
                 <div class="vote-title">
                     <div class="title-rect-group">
                         <h2 class="title-rect-name">{{ $t("studentWeb.vote.bollotbox") }}</h2>
-                        <p v-if="isVote && (voteInfo.times != 'once' || voteInfo.repeat)" style="margin-left:15px;margin-top:2px">
+                        <p v-if="!isVoteOK && (voteInfo.times != 'once' || voteInfo.repeat)" style="margin-left:15px;margin-top:2px">
                             {{ $t("studentWeb.vote.surplusTickets")}}
                             <span style="font-size:16px">{{ voteCount }}</span>
                             <span> {{ $t("studentWeb.vote.tickets")}} </span>
@@ -86,7 +86,7 @@
                     </Button>
                     <span class="clickbutnoChoosehint"
                         v-if="clickbutnoChoose == true && voteChecked == ''">{{ $t("studentWeb.vote.note") }}</span>
-                    <span v-if="isOverCount" style="margin-top:5px;margin-left:15px;color:red">{{$t("studentWeb.vote.warning2")}}</span>
+                    <span v-if="isOverCount && !isVoteOK" style="margin-top:5px;margin-left:15px;color:red">{{$t("studentWeb.vote.warning2")}}</span>
                 </div>
             <!-- </div> -->
         </div>
@@ -203,7 +203,9 @@
             doCountTotal(arr, code) {
                 let result = 0
                 arr.forEach(i => {
-                    result += i.opt[code]
+                    if(i.opt[code]) {
+                        result += i.opt[code]
+                    }
                 })
                 // 未投票的选项会显示NaN
                 if(Number.isNaN(result)) {