|
@@ -9,113 +9,115 @@
|
|
|
</div>
|
|
|
<EventBasicInfo />
|
|
|
<div>
|
|
|
+ <div>
|
|
|
<!--超时-->
|
|
|
- <div v-if="getItemTitle.endTime <= '2020.02.10'">
|
|
|
- <br />
|
|
|
- <div class="dec animate__animated animate__bounceInLeft">
|
|
|
- <svg-icon icon-class="handonHint" class="warm-icon" />
|
|
|
- <span class="warm-hint">{{ $t("studentWeb.vote.timeoutHint") }}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div v-if="!showResult">
|
|
|
- <div class="load-box">
|
|
|
- <Load :active.sync="isLoad"
|
|
|
- background-color="#000">
|
|
|
- <template slot="default">
|
|
|
- <svg-icon icon-class="loader" class="loader-icon" />
|
|
|
- </template>
|
|
|
- </Load>
|
|
|
- </div>
|
|
|
- <BillBoardandLightBox :activityData="voteInfo" :voteRes="voteResData" />
|
|
|
- <div class="vote-title">
|
|
|
- <div class="title-rect-group">
|
|
|
- <!-- <div class="title-rect" /> -->
|
|
|
- <h2 class="title-rect-name">{{ $t("studentWeb.vote.bollotbox") }}</h2>
|
|
|
- <p v-if="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></p>
|
|
|
+ <div v-if="getItemTitle.endTime <= '2020.02.10'">
|
|
|
+ <br />
|
|
|
+ <div class="dec animate__animated animate__bounceInLeft">
|
|
|
+ <svg-icon icon-class="handonHint" class="warm-icon" />
|
|
|
+ <span class="warm-hint">{{ $t("studentWeb.vote.timeoutHint") }}</span>
|
|
|
</div>
|
|
|
- <Button v-show="isResult"
|
|
|
- style="float:right;margin-top:-30px"
|
|
|
- size="small" type="success"
|
|
|
- @click="showRes"
|
|
|
- >
|
|
|
- <span style="margin-left:5px">{{$t("studentWeb.vote.voteRes")}}</span>
|
|
|
- </Button>
|
|
|
</div>
|
|
|
- <!-- 投票内容 -->
|
|
|
- <!-- <div class="question-box">
|
|
|
- <span v-html="voteInfo.description"></span>
|
|
|
- </div> -->
|
|
|
- <div class="vote-option">
|
|
|
- <!-- 1票
|
|
|
- <RadioGroup v-model="voteChecked" v-if="voteInfo.voteNum == 1" class="option-group">
|
|
|
- <Radio :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
- <span v-html="item.value"></span>
|
|
|
- </Radio>
|
|
|
- </RadioGroup>
|
|
|
- 多票 不重复
|
|
|
- <CheckboxGroup v-model="voteChecked" v-if="voteInfo.voteNum > 1 && !voteInfo.repeat" class="option-group">
|
|
|
- <Checkbox :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
- <span v-html="item.value"></span>
|
|
|
- </Checkbox>
|
|
|
- </CheckboxGroup>
|
|
|
- 多票 重复
|
|
|
- <CheckboxGroup v-model="voteChecked" v-if="voteInfo.voteNum > 1 && voteInfo.repeat" class="option-group option-repeat">
|
|
|
- <Checkbox :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
- <InputNumber v-model="item.count"
|
|
|
- :min="0"
|
|
|
- size="small"
|
|
|
- :formatter="value => `${value}` +$t('studentWeb.vote.tickets')"
|
|
|
- ></InputNumber>
|
|
|
- <span v-html="item.value"></span>
|
|
|
- </Checkbox>
|
|
|
- </CheckboxGroup> -->
|
|
|
- <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">
|
|
|
- <label class="testBtn">
|
|
|
- <input type="checkbox" :value="item" v-model="voteChecked" @click="getVote(item)" />
|
|
|
- <div class="testbg">
|
|
|
- <div class="vote-info">
|
|
|
- <span style="display:flex;margin-right:5px">{{item.code}}.<span v-html="item.value"></span></span>
|
|
|
- </div>
|
|
|
+ <div v-if="!showResult">
|
|
|
+ <div class="load-box">
|
|
|
+ <Load :active.sync="isLoad"
|
|
|
+ background-color="#000">
|
|
|
+ <template slot="default">
|
|
|
+ <svg-icon icon-class="loader" class="loader-icon" />
|
|
|
+ </template>
|
|
|
+ </Load>
|
|
|
+ </div>
|
|
|
+ <BillBoardandLightBox :activityData="voteInfo" :voteRes="voteResData" />
|
|
|
+ <div class="vote-title">
|
|
|
+ <div class="title-rect-group">
|
|
|
+ <!-- <div class="title-rect" /> -->
|
|
|
+ <h2 class="title-rect-name">{{ $t("studentWeb.vote.bollotbox") }}</h2>
|
|
|
+ <p v-if="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></p>
|
|
|
+ </div>
|
|
|
+ <Button v-show="isResult"
|
|
|
+ style="float:right;margin-top:-30px"
|
|
|
+ size="small" type="success"
|
|
|
+ @click="showRes"
|
|
|
+ >
|
|
|
+ <span style="margin-left:5px">{{$t("studentWeb.vote.voteRes")}}</span>
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ <!-- 投票内容 -->
|
|
|
+ <!-- <div class="question-box">
|
|
|
+ <span v-html="voteInfo.description"></span>
|
|
|
+ </div> -->
|
|
|
+ <div class="vote-option">
|
|
|
+ <!-- 1票
|
|
|
+ <RadioGroup v-model="voteChecked" v-if="voteInfo.voteNum == 1" class="option-group">
|
|
|
+ <Radio :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
+ <span v-html="item.value"></span>
|
|
|
+ </Radio>
|
|
|
+ </RadioGroup>
|
|
|
+ 多票 不重复
|
|
|
+ <CheckboxGroup v-model="voteChecked" v-if="voteInfo.voteNum > 1 && !voteInfo.repeat" class="option-group">
|
|
|
+ <Checkbox :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
+ <span v-html="item.value"></span>
|
|
|
+ </Checkbox>
|
|
|
+ </CheckboxGroup>
|
|
|
+ 多票 重复
|
|
|
+ <CheckboxGroup v-model="voteChecked" v-if="voteInfo.voteNum > 1 && voteInfo.repeat" class="option-group option-repeat">
|
|
|
+ <Checkbox :label="item.code" v-for="(item, index) in voteInfo.options" :key="index" class="option-wrapper">
|
|
|
<InputNumber v-model="item.count"
|
|
|
- :formatter="value => `${value}` +$t('studentWeb.vote.tickets')"
|
|
|
- :parser="value => value.replace($t('studentWeb.vote.tickets'), '')"
|
|
|
- :min="0"
|
|
|
- v-if="voteInfo.repeat"
|
|
|
- @on-change="setVoteNum(item)"
|
|
|
- :disabled="!voteStatus">
|
|
|
- </InputNumber>
|
|
|
- </div>
|
|
|
- </label>
|
|
|
+ :min="0"
|
|
|
+ size="small"
|
|
|
+ :formatter="value => `${value}` +$t('studentWeb.vote.tickets')"
|
|
|
+ ></InputNumber>
|
|
|
+ <span v-html="item.value"></span>
|
|
|
+ </Checkbox>
|
|
|
+ </CheckboxGroup> -->
|
|
|
+ <div class="checkAnswer" v-for="(item, index) in voteInfo.options" :key="index">
|
|
|
+ <label class="testBtn">
|
|
|
+ <input type="checkbox" :value="item" v-model="voteChecked" @click="getVote(item)" />
|
|
|
+ <div class="testbg">
|
|
|
+ <div class="vote-info">
|
|
|
+ <span style="display:flex;margin-right:5px">{{item.code}}.<span v-html="item.value"></span></span>
|
|
|
+ </div>
|
|
|
+ <InputNumber v-model="item.count"
|
|
|
+ :formatter="value => `${value}` +$t('studentWeb.vote.tickets')"
|
|
|
+ :parser="value => value.replace($t('studentWeb.vote.tickets'), '')"
|
|
|
+ :min="0"
|
|
|
+ v-if="voteInfo.repeat"
|
|
|
+ @on-change="setVoteNum(item)"
|
|
|
+ :disabled="!voteStatus">
|
|
|
+ </InputNumber>
|
|
|
+ </div>
|
|
|
+ </label>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <Button :disabled="!isVote" size="large" type="success" @click="submitMessage()">
|
|
|
- <svg-icon icon-class="vote" class="uploadBtn-icon" />
|
|
|
- <span style="margin-left:5px">{{ $t("studentWeb.vote.submitBVote") }}</span>
|
|
|
- </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>
|
|
|
+ <Button :disabled="!isVote" size="large" type="success" @click="submitMessage()">
|
|
|
+ <svg-icon icon-class="vote" class="uploadBtn-icon" />
|
|
|
+ <span style="margin-left:5px">{{ $t("studentWeb.vote.submitBVote") }}</span>
|
|
|
+ </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>
|
|
|
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 投票结果 -->
|
|
|
- <div class="voteResults" v-if="showResult">
|
|
|
- <h3 class="voteResultsMainRow ">
|
|
|
- {{ $t("studentWeb.vote.voteResult") }}
|
|
|
- </h3>
|
|
|
- <div class="question-box">
|
|
|
- <span style="display:block;width:90%" v-html="voteInfo.description"></span>
|
|
|
- <Button style="float:right;margin-top:0px" size="small" type="success" @click="showRes">
|
|
|
- <span style="margin-left:5px">{{$t("studentWeb.vote.voteRecord")}}</span>
|
|
|
- </Button>
|
|
|
- </div>
|
|
|
- <div v-for="(item,index) in voteInfo.options" :key="index">
|
|
|
- <div class="voteResultsItem">
|
|
|
- <p style="display:flex">{{ item.code }}.<span v-html="item.value"></span></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div align="center">
|
|
|
- <VoteResultChart :voteData="voteData" :voteList="voteList" />
|
|
|
+ <!-- 投票结果 -->
|
|
|
+ <div class="voteResults" v-if="showResult">
|
|
|
+ <h3 class="voteResultsMainRow ">
|
|
|
+ {{ $t("studentWeb.vote.voteResult") }}
|
|
|
+ </h3>
|
|
|
+ <div class="question-box">
|
|
|
+ <span style="display:block;width:90%" v-html="voteInfo.description"></span>
|
|
|
+ <Button style="float:right;margin-top:0px" size="small" type="success" @click="showRes">
|
|
|
+ <span style="margin-left:5px">{{$t("studentWeb.vote.voteRecord")}}</span>
|
|
|
+ </Button>
|
|
|
+ </div>
|
|
|
+ <div v-for="(item,index) in voteInfo.options" :key="index">
|
|
|
+ <div class="voteResultsItem">
|
|
|
+ <p style="display:flex">{{ item.code }}.<span v-html="item.value"></span></p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div align="center">
|
|
|
+ <VoteResultChart :voteData="voteData" :voteList="voteList" />
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -195,7 +197,15 @@
|
|
|
this.$api.studentWeb.getVoteInfo(params).then(res => {
|
|
|
if (res) {
|
|
|
if(res.status == 404) {
|
|
|
- this.delActivity()
|
|
|
+ this.isLoad = false
|
|
|
+ this.$Modal.confirm({
|
|
|
+ title: "投票已被删除,是否删除此条记录?",
|
|
|
+ okText: "删除",
|
|
|
+ cancelText: "取消",
|
|
|
+ onOk: () => {
|
|
|
+ this.delActivity()
|
|
|
+ }
|
|
|
+ })
|
|
|
} else if(res.status == 200) {
|
|
|
this.showResult = false
|
|
|
this.isResult = false
|