|
@@ -101,6 +101,10 @@
|
|
|
<Icon type="md-podium" />
|
|
|
{{ isOptionView ? $t('vote.stuListView') : $t('vote.optionView') }}
|
|
|
</span>
|
|
|
+ <span class="hw-box-header-tools-tool" @click="isShowDetail = true" v-if="isFromRecord">
|
|
|
+ <Icon type="md-information-circle" size="18" />
|
|
|
+ {{ $t('vote.voteDetails') }}
|
|
|
+ </span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -130,6 +134,31 @@
|
|
|
</div>
|
|
|
</Split>
|
|
|
</div>
|
|
|
+ <Drawer :title="$t('vote.voteDetails')" v-model="isShowDetail" width="400" :inner="true" :transfer="false">
|
|
|
+ <!-- <BaseHwForm :editItem="currentVote" @onAddSuccess="onAddSuccess" ref="voteForm" @onCancelVote="onCancelVote"></BaseHwForm> -->
|
|
|
+ <div class="activity-info-item">
|
|
|
+ <p class="activity-info-item-title">{{ $t('vote.form.name') }}</p>
|
|
|
+ <p class="activity-info-item-content">{{ currentVote.name }}</p>
|
|
|
+ </div>
|
|
|
+ <div class="activity-info-item">
|
|
|
+ <p class="activity-info-item-title">{{ $t('learnActivity.createEv.startTime') }}</p>
|
|
|
+ <p class="activity-info-item-content">{{ $tools.formatTime(currentVote.startTime,'yyyy-MM-dd hh:mm') }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="activity-info-item">
|
|
|
+ <p class="activity-info-item-title">{{ $t('learnActivity.createEv.endTime') }}</p>
|
|
|
+ <p class="activity-info-item-content">{{ $tools.formatTime(currentVote.endTime,'yyyy-MM-dd hh:mm') }}
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ <div class="activity-info-item">
|
|
|
+ <p class="activity-info-item-title">{{ $t('vote.form.description') }}</p>
|
|
|
+ <p class="activity-info-item-content" v-html="currentVote.description"></p>
|
|
|
+ </div>
|
|
|
+ <div class="activity-info-item">
|
|
|
+ <p class="activity-info-item-title">{{ $t('homework.form.other') }}</p>
|
|
|
+ <Tag color="geekblue" v-if="currentVote.secret">{{ $t('vote.secret') }}</Tag>
|
|
|
+ </div>
|
|
|
+ </Drawer>
|
|
|
<!-- 修改活动结束时间 -->
|
|
|
<Modal v-model="editTimeStatus" footer-hide className="ed-name-modal">
|
|
|
<div slot="header" class="modal-header">
|
|
@@ -174,6 +203,8 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ isShowDetail:false,
|
|
|
+ routerAc:null,
|
|
|
isAddActivity:false,
|
|
|
editTime:null,
|
|
|
editTimeStatus:false,
|
|
@@ -307,8 +338,42 @@
|
|
|
// 校本课纲与个人课纲切换
|
|
|
handleTabClick(index) {
|
|
|
this.tabIndex = index
|
|
|
- setTimeout(() => {
|
|
|
- this.getVoteList(index === 0 ? 'school' : 'private')
|
|
|
+ setTimeout(async () => {
|
|
|
+ if(this.$route.params.ac){
|
|
|
+ let item = this.$route.params.ac
|
|
|
+ let fullItem = item.id ? await this.getVoteDetails(item) : item
|
|
|
+ this.currentVote = fullItem
|
|
|
+ this.activeVoteIndex = 0
|
|
|
+ this.voteList = [fullItem]
|
|
|
+ /* 如果是区级的活动 则需要根据recordUrl去换取区级活动的作答数据 */
|
|
|
+ if (this.isAreaVote && item.id) {
|
|
|
+ this.areaVoteTeachers = []
|
|
|
+ this.areaSchIndex = 0
|
|
|
+ this.areaSchList = this.areaRecord.map(i => i.name)
|
|
|
+ this.areaRecord.length && this.getAreaRecord(0)
|
|
|
+ }else{
|
|
|
+ /* 其余类型活动则需要去根据发布对象获取对应的作答数据 */
|
|
|
+ if (item.id && item.progress !== 'pending'){
|
|
|
+ if(fullItem.targetType === 'research'){
|
|
|
+ this.getVoteTeachers(fullItem, fullItem.tchLists)
|
|
|
+ }else{
|
|
|
+ this.getVoteStudents(fullItem, fullItem.classes)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.voteForm && (this.$refs.voteForm.voteFormEdit = false)
|
|
|
+ this.$refs.voteFormScroll.scrollTo({
|
|
|
+ y: 0,
|
|
|
+ },
|
|
|
+ 200,
|
|
|
+ "easeInQuad"
|
|
|
+ );
|
|
|
+ this.hasNewAdd = false
|
|
|
+ this.isOptionView = true
|
|
|
+ this.isAddActivity = false
|
|
|
+ }else{
|
|
|
+ this.getVoteList(index === 0 ? 'school' : 'private')
|
|
|
+ }
|
|
|
}, 500)
|
|
|
},
|
|
|
|
|
@@ -411,7 +476,7 @@
|
|
|
if (res.votes.length) {
|
|
|
let list = res.votes.reverse()
|
|
|
this.voteList = list
|
|
|
- let queryId = this.$route.query.acId
|
|
|
+ let queryId = this.routerAc ? this.routerAc.id : null
|
|
|
if(queryId && list.filter(i => i.id === queryId).length === 0){
|
|
|
this.$Modal.confirm({
|
|
|
title: this.$t('survey.questionaire.confirmTitle'),
|
|
@@ -471,7 +536,7 @@
|
|
|
* @param index
|
|
|
*/
|
|
|
async onVoteClick(item, index, needJudge = true) {
|
|
|
- if(!this.$route.query.acId){
|
|
|
+ if(!this.routerAc){
|
|
|
this.isFromRecord = false
|
|
|
this.split1 = 0.2
|
|
|
this.split2 = 0
|
|
@@ -979,13 +1044,13 @@
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.$route.query.acId) {
|
|
|
+ if (this.$route.params.ac) {
|
|
|
this.isFromRecord = true
|
|
|
this.split1 = 0
|
|
|
this.split2 = 0.3
|
|
|
this.$refs.leftSplit.$el.getElementsByClassName('ivu-split-trigger-con')[0].style.display = 'none'
|
|
|
+ this.routerAc = this.$route.params.ac
|
|
|
}
|
|
|
- // this.isPrivate && this.getMyCourse()
|
|
|
},
|
|
|
computed: {
|
|
|
getCurCode() {
|