|
@@ -9,9 +9,9 @@
|
|
{{ scope == 'school' ? $t('learnActivity.mgtScEv.listLabel1') : $t('learnActivity.mgtScEv.listLabel2') }}
|
|
{{ scope == 'school' ? $t('learnActivity.mgtScEv.listLabel1') : $t('learnActivity.mgtScEv.listLabel2') }}
|
|
</b>
|
|
</b>
|
|
<div style="float:right" v-if="!isSearch">
|
|
<div style="float:right" v-if="!isSearch">
|
|
- <Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" v-if="$access.can('admin.*|schoolAc-upd')" />
|
|
|
|
|
|
+ <Icon type="md-add" class=" to-create-icon" @click="goToCreate" :title="$t('learnActivity.mgtScEv.create')" v-if="evAuthStatus" />
|
|
<Icon type="md-copy" class=" to-create-icon" @click="copyEv" :title="$t('learnActivity.mgtScEv.copy')" />
|
|
<Icon type="md-copy" class=" to-create-icon" @click="copyEv" :title="$t('learnActivity.mgtScEv.copy')" />
|
|
- <Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="$access.can('admin.*|schoolAc-upd')" />
|
|
|
|
|
|
+ <Icon type="md-trash" v-show="evaListShow.length" class="to-create-icon" :title="$t('learnActivity.mgtScEv.delete')" @click="deleteEvaluation" v-if="evAuthStatus" />
|
|
<!-- <Icon type="md-create" v-show="evaListShow.length && evaListShow[curEvaIndex] && evaListShow[curEvaIndex].progress == 'pending'" class="to-create-icon" @click="editEvaluation" :title="$t('learnActivity.mgtScEv.edit')" v-if="$access.can('admin.*|schoolAc-upd')" /> -->
|
|
<!-- <Icon type="md-create" v-show="evaListShow.length && evaListShow[curEvaIndex] && evaListShow[curEvaIndex].progress == 'pending'" class="to-create-icon" @click="editEvaluation" :title="$t('learnActivity.mgtScEv.edit')" v-if="$access.can('admin.*|schoolAc-upd')" /> -->
|
|
<!-- 筛选 -->
|
|
<!-- 筛选 -->
|
|
<Poptip style="float:right" trigger="click" :offset="-10" theme="light">
|
|
<Poptip style="float:right" trigger="click" :offset="-10" theme="light">
|
|
@@ -19,7 +19,7 @@
|
|
<div slot="content">
|
|
<div slot="content">
|
|
<div class="filter-item">
|
|
<div class="filter-item">
|
|
<span>{{$t('learnActivity.mgtScEv.ftStatus')}}</span>
|
|
<span>{{$t('learnActivity.mgtScEv.ftStatus')}}</span>
|
|
- <Select v-model="filter.status" style="width:100px" size="small" clearable @on-change="filterEv">
|
|
|
|
|
|
+ <Select v-model="filter.progress" style="width:100px" size="small" clearable @on-change="filterEv">
|
|
<Option value="pending">{{$t('learnActivity.mgtScEv.pending')}}</Option>
|
|
<Option value="pending">{{$t('learnActivity.mgtScEv.pending')}}</Option>
|
|
<Option value="going">{{$t('learnActivity.mgtScEv.going')}}</Option>
|
|
<Option value="going">{{$t('learnActivity.mgtScEv.going')}}</Option>
|
|
<Option value="finish">{{$t('learnActivity.mgtScEv.finish')}}</Option>
|
|
<Option value="finish">{{$t('learnActivity.mgtScEv.finish')}}</Option>
|
|
@@ -27,50 +27,43 @@
|
|
</div>
|
|
</div>
|
|
<div class="filter-item">
|
|
<div class="filter-item">
|
|
<span>{{$t('learnActivity.mgtScEv.ftMode')}}</span>
|
|
<span>{{$t('learnActivity.mgtScEv.ftMode')}}</span>
|
|
- <Select v-model="filter.mode" style="width:100px" size="small" clearable @on-change="filterEv">
|
|
|
|
|
|
+ <Select v-model="filter.source" style="width:100px" size="small" clearable @on-change="filterEv">
|
|
<Option v-for="(item,index) in $GLOBAL.EV_MODE()" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
<Option v-for="(item,index) in $GLOBAL.EV_MODE()" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
</Select>
|
|
</Select>
|
|
</div>
|
|
</div>
|
|
- <!-- <div class="filter-item">
|
|
|
|
- <span>{{$t('learnActivity.mgtScEv.ftType')}}</span>
|
|
|
|
- <Select v-model="filter.type" style="width:100px" size="small" clearable @on-change="filterEv">
|
|
|
|
- <Option v-for="(item,index) in $GLOBAL.EV_TYPE()" :value="item.value" :key="index">{{ item.label }}</Option>
|
|
|
|
- </Select>
|
|
|
|
- </div> -->
|
|
|
|
</div>
|
|
</div>
|
|
</Poptip>
|
|
</Poptip>
|
|
<Icon type="md-search" class="to-create-icon" @click="isSearch = !isSearch" :title="$t('learnActivity.mgtScEv.search')" />
|
|
<Icon type="md-search" class="to-create-icon" @click="isSearch = !isSearch" :title="$t('learnActivity.mgtScEv.search')" />
|
|
</div>
|
|
</div>
|
|
<div v-else style="float:right;width:calc(100% - 150px);padding-right:10px;" class="light-iview-input">
|
|
<div v-else style="float:right;width:calc(100% - 150px);padding-right:10px;" class="light-iview-input">
|
|
- <Input v-special-char icon="ios-close" v-model="keyword" :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width:100%" @on-click="closeKeySearch" @on-change="filterByName" />
|
|
|
|
|
|
+ <Input v-special-char icon="ios-close" v-model="filter.name" :placeholder="$t('schoolBaseInfo.codeSearchHolder')" autofocus style="width:100%" @on-click="closeKeySearch" @on-change="$jsFn.debounce(filterEv,1000)()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="evaluation-list-main">
|
|
|
|
- <vuescroll>
|
|
|
|
- <div v-for="(item,index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['evaluation-item','block-bg',index == curEvaIndex ? 'block-bg-active':'']" :key="index">
|
|
|
|
- <p class="evaluation-name">
|
|
|
|
- {{item.name}}
|
|
|
|
- <!-- 修改评测名称 -->
|
|
|
|
- <Icon type="md-create" class="edit-end-time" @click="editEvName(index)" :title="$t('learnActivity.mgtScEv.edName')" />
|
|
|
|
- </p>
|
|
|
|
- <div class="all-tag-box">
|
|
|
|
- <div class="tags-wrap">
|
|
|
|
- <!-- 活动进度状态 -->
|
|
|
|
- <!-- <span class="evaluation-status-tag ev-tag-common" :style="{ background:item.progColor, color: item.progColor}">
|
|
|
|
|
|
+ <Scroll class="evaluation-list-main" :on-reach-bottom="handleReachBottom">
|
|
|
|
+ <div v-for="(item,index) in evaListShow" @click.capture="selectEvaluation(index)" :class="['evaluation-item','block-bg',index == curEvaIndex ? 'block-bg-active':'']" :key="index">
|
|
|
|
+ <p class="evaluation-name">
|
|
|
|
+ {{item.name}}
|
|
|
|
+ <!-- 修改评测名称 -->
|
|
|
|
+ <Icon type="md-create" class="edit-end-time" @click="editEvName(index)" :title="$t('learnActivity.mgtScEv.edName')" />
|
|
|
|
+ </p>
|
|
|
|
+ <div class="all-tag-box">
|
|
|
|
+ <div class="tags-wrap">
|
|
|
|
+ <!-- 活动进度状态 -->
|
|
|
|
+ <!-- <span class="evaluation-status-tag ev-tag-common" :style="{ background:item.progColor, color: item.progColor}">
|
|
{{ item.progText }}
|
|
{{ item.progText }}
|
|
</span> -->
|
|
</span> -->
|
|
- <!-- 评测模式 -->
|
|
|
|
- <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source)}}</span>
|
|
|
|
- <span class="ev-info-tag ev-tag-common" v-if="item.examType && item.examType.name">
|
|
|
|
- {{item.examType.name}}
|
|
|
|
- </span>
|
|
|
|
- <!-- <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span> -->
|
|
|
|
- <!-- 活动评分状态 -->
|
|
|
|
- <span class="evaluation-status-tag ev-tag-common" :style="{ color: item.scoreColor}">
|
|
|
|
- {{ item.scoreText }}
|
|
|
|
- </span>
|
|
|
|
- <Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
|
|
|
|
- <!-- <Tooltip @on-popper-show="getExamTarget(item)">
|
|
|
|
|
|
+ <!-- 评测模式 -->
|
|
|
|
+ <span class="ev-info-tag ev-tag-common">{{getModeLabel(item.source,item.qamode)}}</span>
|
|
|
|
+ <span class="ev-info-tag ev-tag-common" v-if="item.examType && item.examType.name">
|
|
|
|
+ {{item.examType.name}}
|
|
|
|
+ </span>
|
|
|
|
+ <!-- <span class="ev-info-tag ev-tag-common">{{getTypeLabel(item.type)}}</span> -->
|
|
|
|
+ <!-- 活动评分状态 -->
|
|
|
|
+ <span class="evaluation-status-tag ev-tag-common" :style="{ color: item.scoreColor}">
|
|
|
|
+ {{ item.scoreText }}
|
|
|
|
+ </span>
|
|
|
|
+ <Icon class="exam-target" size="20" type="ios-people" @click="getExamTarget(item)" />
|
|
|
|
+ <!-- <Tooltip @on-popper-show="getExamTarget(item)">
|
|
<Icon class="exam-target" size="20" type="ios-people" />
|
|
<Icon class="exam-target" size="20" type="ios-people" />
|
|
<div slot="content" style="padding-left:15px;min-width:180px">
|
|
<div slot="content" style="padding-left:15px;min-width:180px">
|
|
<p style="margin-left:-15px">
|
|
<p style="margin-left:-15px">
|
|
@@ -83,36 +76,35 @@
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</Tooltip> -->
|
|
</Tooltip> -->
|
|
- </div>
|
|
|
|
- <!-- 立即结束 和评测状态 按钮-->
|
|
|
|
- <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
|
|
|
|
- {{$t('learnActivity.mgtScEv.stop')}}
|
|
|
|
- </span>
|
|
|
|
- <span v-else class="handle-end-tag ev-tag-common" :style="{ background:'#c0c0c0', color: item.progColor}">
|
|
|
|
- {{ item.progText }}
|
|
|
|
- </span>
|
|
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
- <p class="evaluation-type" style="margin-top:10px">
|
|
|
|
- <Icon type="md-time" style="margin-right:5px;" size="16" />
|
|
|
|
- <span>{{$jsFn.timeFormat(item.startTime)}}</span>
|
|
|
|
- -
|
|
|
|
- <span>{{$jsFn.timeFormat(item.endTime)}}</span>
|
|
|
|
- <!-- 修改评测结束时间 -->
|
|
|
|
- <Icon type="md-create" class="edit-end-time" v-if="item.progress == 'going'" @click="editEvEndtime(index)" :title="$t('learnActivity.mgtScEv.editEndTime')" />
|
|
|
|
- </p>
|
|
|
|
- <!-- 二维码分享 -->
|
|
|
|
- <span class="ev-qr-tag" style="top:50%" @click="openQrcode(index)" v-show="item.source == '0' && item.progress == 'going'">
|
|
|
|
- <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" />
|
|
|
|
|
|
+ <!-- 立即结束 和评测状态 按钮-->
|
|
|
|
+ <span v-if="item.progress == 'going'" class="handle-end-tag ev-tag-common" @click="handleEnd(index)">
|
|
|
|
+ {{$t('learnActivity.mgtScEv.stop')}}
|
|
</span>
|
|
</span>
|
|
- <!-- 立即结束 图标-->
|
|
|
|
- <!-- <span class="ev-qr-tag" style="top:65%" @click="handleEnd(index)" :title="$t('learnActivity.mgtScEv.stop')">
|
|
|
|
|
|
+ <span v-else class="handle-end-tag ev-tag-common" :style="{ background:'#c0c0c0', color: item.progColor}">
|
|
|
|
+ {{ item.progText }}
|
|
|
|
+ </span>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <p class="evaluation-type" style="margin-top:10px">
|
|
|
|
+ <Icon type="md-time" style="margin-right:5px;" size="16" />
|
|
|
|
+ <span>{{$jsFn.timeFormat(item.startTime)}}</span>
|
|
|
|
+ -
|
|
|
|
+ <span>{{$jsFn.timeFormat(item.endTime)}}</span>
|
|
|
|
+ <!-- 修改评测结束时间 -->
|
|
|
|
+ <Icon type="md-create" class="edit-end-time" v-if="item.progress == 'going'" @click="editEvEndtime(index)" :title="$t('learnActivity.mgtScEv.editEndTime')" />
|
|
|
|
+ </p>
|
|
|
|
+ <!-- 二维码分享 -->
|
|
|
|
+ <span class="ev-qr-tag" style="top:50%" @click="openQrcode(index)" v-show="item.source == '0' && item.progress == 'going'">
|
|
|
|
+ <Icon size="20" custom="iconfont icon-qr-code" class="qr-code-icon" />
|
|
|
|
+ </span>
|
|
|
|
+ <!-- 立即结束 图标-->
|
|
|
|
+ <!-- <span class="ev-qr-tag" style="top:65%" @click="handleEnd(index)" :title="$t('learnActivity.mgtScEv.stop')">
|
|
<Icon size="20" type="md-power" class="qr-code-icon" />
|
|
<Icon size="20" type="md-power" class="qr-code-icon" />
|
|
</span> -->
|
|
</span> -->
|
|
- </div>
|
|
|
|
- <EmptyData v-if="evaListShow.length == 0" style="margin-top:100px;" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
|
|
|
|
- </vuescroll>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <EmptyData v-if="evaListShow.length == 0" style="margin-top:100px;" :textContent="`${$t('learnActivity.mgtScEv.nodata')}`"></EmptyData>
|
|
|
|
+ </Scroll>
|
|
</div>
|
|
</div>
|
|
<div slot="right" class="evaluation-detail-wrap">
|
|
<div slot="right" class="evaluation-detail-wrap">
|
|
<!--顶部菜单-->
|
|
<!--顶部菜单-->
|
|
@@ -135,14 +127,14 @@
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<!-- 评测数据 -->
|
|
<!-- 评测数据 -->
|
|
- <DataView v-show="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
|
|
|
|
|
|
+ <DataView v-if="curBarIndex == 0" :examInfo="examDetaiInfo" :correctData="correctData" :simpleData="simpleData" :dataErr="dataErr" class="evaluation-base-info"></DataView>
|
|
<!-- 作答详情 -->
|
|
<!-- 作答详情 -->
|
|
- <AnswerTable v-show="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
|
|
|
|
|
|
+ <AnswerTable v-else-if="curBarIndex == 3" :examInfo="examDetaiInfo" :correctData="correctData" class="evaluation-base-info"></AnswerTable>
|
|
<!-- 评测试卷 -->
|
|
<!-- 评测试卷 -->
|
|
- <ExamPaper v-show="curBarIndex == 1" :examInfo="examDetaiInfo" class="evaluation-base-info"></ExamPaper>
|
|
|
|
|
|
+ <ExamPaper v-else-if="curBarIndex == 1" :examInfo="examDetaiInfo" class="evaluation-base-info"></ExamPaper>
|
|
<!-- 阅卷任务 -->
|
|
<!-- 阅卷任务 -->
|
|
<!-- <ExamTask v-show="curBarIndex == 2" class="evaluation-base-info"></ExamTask> -->
|
|
<!-- <ExamTask v-show="curBarIndex == 2" class="evaluation-base-info"></ExamTask> -->
|
|
- <MarkSetting v-show="curBarIndex == 2" ref="markSetting" v-if="examDetaiInfo" :evInfo="examDetaiInfo" v-model="isSetting"></MarkSetting>
|
|
|
|
|
|
+ <MarkSetting v-else-if="curBarIndex == 2 && examDetaiInfo" ref="markSetting" :evInfo="examDetaiInfo" v-model="isSetting"></MarkSetting>
|
|
</div>
|
|
</div>
|
|
</Split>
|
|
</Split>
|
|
<!-- 修改评测名称 -->
|
|
<!-- 修改评测名称 -->
|
|
@@ -187,6 +179,8 @@ export default {
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ ctnToken: '',
|
|
|
|
+ pageCount: 20,
|
|
dataErr: false,
|
|
dataErr: false,
|
|
isSetting: false,
|
|
isSetting: false,
|
|
examTargets: [],
|
|
examTargets: [],
|
|
@@ -212,7 +206,6 @@ export default {
|
|
curSubIndex: 0,
|
|
curSubIndex: 0,
|
|
curBarIndex: 0,
|
|
curBarIndex: 0,
|
|
curEvaIndex: 0,
|
|
curEvaIndex: 0,
|
|
- evaluationList: [],
|
|
|
|
evaListShow: [],
|
|
evaListShow: [],
|
|
examDetaiInfo: {},
|
|
examDetaiInfo: {},
|
|
targetList: [],
|
|
targetList: [],
|
|
@@ -220,9 +213,9 @@ export default {
|
|
filterPeriod: undefined,
|
|
filterPeriod: undefined,
|
|
curPdInfo: {},
|
|
curPdInfo: {},
|
|
filter: {
|
|
filter: {
|
|
- status: '',
|
|
|
|
- mode: '',
|
|
|
|
- type: ''
|
|
|
|
|
|
+ progress: '',
|
|
|
|
+ source: '',
|
|
|
|
+ name: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -235,8 +228,25 @@ export default {
|
|
return d && d > date.valueOf() + 86400000
|
|
return d && d > date.valueOf() + 86400000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ evAuthStatus(){
|
|
|
|
+ if(this.scope == 'school'){
|
|
|
|
+ return this.$access.can('admin.*|schoolAc-upd')
|
|
|
|
+ }else{
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted() {
|
|
|
|
+ this.$EventBus.$off('onStatusChange')
|
|
|
|
+ this.$EventBus.$on('onStatusChange', () => {
|
|
|
|
+ if (this.evaListShow[this.curEvaIndex] && this.evaListShow[this.curEvaIndex].sStatus != 1) {
|
|
|
|
+ this.evaListShow[this.curEvaIndex].sStatus = 1
|
|
|
|
+ this.evaListShow[this.curEvaIndex].scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
|
|
|
|
+ this.evaListShow[this.curEvaIndex].scoreColor = '#515a6e'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
created() {
|
|
created() {
|
|
if (this.$route.name === 'schoolExam') {
|
|
if (this.$route.name === 'schoolExam') {
|
|
this.scope = 'school'
|
|
this.scope = 'school'
|
|
@@ -246,6 +256,14 @@ export default {
|
|
this.findEvaluation()
|
|
this.findEvaluation()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleReachBottom() {
|
|
|
|
+ return this.findEvaluation()
|
|
|
|
+ },
|
|
|
|
+ closeKeySearch() {
|
|
|
|
+ this.isSearch = false
|
|
|
|
+ this.filter.name = ''
|
|
|
|
+ this.filterEv()
|
|
|
|
+ },
|
|
getExamTarget(data) {
|
|
getExamTarget(data) {
|
|
let ids = data.classes && data.classes.length ? data.classes : data.stuLists
|
|
let ids = data.classes && data.classes.length ? data.classes : data.stuLists
|
|
this.$api.common.getGroupListByIds({
|
|
this.$api.common.getGroupListByIds({
|
|
@@ -331,7 +349,6 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.correctData = []
|
|
this.correctData = []
|
|
}
|
|
}
|
|
- console.log('错题率分析:', this.correctData)
|
|
|
|
},
|
|
},
|
|
//获取已结束评测简要数据分析
|
|
//获取已结束评测简要数据分析
|
|
findSimpleAna() {
|
|
findSimpleAna() {
|
|
@@ -412,46 +429,68 @@ export default {
|
|
this.qrConfig.shareContent = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${soc}${socName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${this.$t('cusMgt.inviteInfo8')}${this.$store.state.userInfo.name}\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
|
|
this.qrConfig.shareContent = `${this.$t('learnActivity.mgtScEv.shareText1')}\n\n${soc}${socName}\n${this.$t('learnActivity.mgtScEv.shareText3')}${evType}\n${this.$t('cusMgt.inviteInfo8')}${this.$store.state.userInfo.name}\n${this.$t('learnActivity.mgtScEv.shareText2')}${evName}\n\n${this.$t('learnActivity.mgtScEv.shareText6')}\n${shortUrl.result || encodeURI(this.shareUrl)}\n\n${this.$t('learnActivity.mgtScEv.shareText7')}\nURL:https://${window.location.host}/login/student`
|
|
this.showQrStatus = true
|
|
this.showQrStatus = true
|
|
},
|
|
},
|
|
- //查询评测列表
|
|
|
|
- findEvaluation() {
|
|
|
|
- this.isLoading = true
|
|
|
|
- let requestData = {
|
|
|
|
- code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId
|
|
|
|
- }
|
|
|
|
- this.$api.learnActivity.FindExamList(requestData).then(
|
|
|
|
- res => {
|
|
|
|
- if (!res.error) {
|
|
|
|
- res.examInfo = res.examInfo.sort((a, b) => {
|
|
|
|
- return a.createTime - b.createTime > 0 ? -1 : 1
|
|
|
|
- })
|
|
|
|
- res.examInfo.forEach(item => {
|
|
|
|
- let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
|
|
|
|
- item.progText = statusInfo.progText
|
|
|
|
- item.progColor = statusInfo.progColor
|
|
|
|
- item.scoreText = statusInfo.scoreText
|
|
|
|
- item.scoreColor = statusInfo.scoreColor
|
|
|
|
- })
|
|
|
|
- this.evaluationList = res.examInfo
|
|
|
|
- this.evaListShow = res.examInfo
|
|
|
|
- if (this.scope == 'school') {
|
|
|
|
- this.filterByPeriod()
|
|
|
|
- } else {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * @param isFresh 是否清空当前列表 如果是筛选条件变化需要清空,如果是只是下拉刷新则不需要
|
|
|
|
+ */
|
|
|
|
+ findEvaluation(isFresh) {
|
|
|
|
+ // 下拉加载需要返回一个Promise
|
|
|
|
+ return new Promise((r, j) => {
|
|
|
|
+ if (isFresh) {
|
|
|
|
+ this.evaListShow = []
|
|
|
|
+ this.ctnToken = ''
|
|
|
|
+ }
|
|
|
|
+ let requestData = {
|
|
|
|
+ code: this.scope == 'school' ? this.$store.state.userInfo.schoolCode : this.$store.state.userInfo.TEAMModelId,
|
|
|
|
+ count: this.pageCount
|
|
|
|
+ }
|
|
|
|
+ //判断是否加载完所有数据
|
|
|
|
+ if(this.ctnToken == 'end'){
|
|
|
|
+ this.$Message.success(this.$t('learnActivity.mgtScEv.loadAll'))
|
|
|
|
+ r()
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if(this.ctnToken) requestData.token = this.ctnToken
|
|
|
|
+ //校本评测根据学段查询
|
|
|
|
+ if (this.scope == 'school') requestData.period = this.filterPeriod
|
|
|
|
+ //添加其他查询条件
|
|
|
|
+ if (this.filter.progress) requestData.progress = this.filter.progress
|
|
|
|
+ if (this.filter.source) requestData.source = this.filter.source
|
|
|
|
+ if (this.filter.name) requestData.name = this.filter.name
|
|
|
|
+ this.isLoading = true
|
|
|
|
+ this.$api.learnActivity.FindExamList(requestData).then(
|
|
|
|
+ res => {
|
|
|
|
+ if (!res.error) {
|
|
|
|
+ res.examInfo = res.examInfo.sort((a, b) => {
|
|
|
|
+ return a.createTime - b.createTime > 0 ? -1 : 1
|
|
|
|
+ })
|
|
|
|
+ res.examInfo.forEach(item => {
|
|
|
|
+ let statusInfo = this.getEvStatusInfo(item.progress, item.sStatus)
|
|
|
|
+ item.progText = statusInfo.progText
|
|
|
|
+ item.progColor = statusInfo.progColor
|
|
|
|
+ item.scoreText = statusInfo.scoreText
|
|
|
|
+ item.scoreColor = statusInfo.scoreColor
|
|
|
|
+ })
|
|
|
|
+ this.evaListShow.push(...res.examInfo)
|
|
if (res.examInfo.length) {
|
|
if (res.examInfo.length) {
|
|
this.selectEvaluation(0)
|
|
this.selectEvaluation(0)
|
|
} else {
|
|
} else {
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
}
|
|
}
|
|
|
|
+ this.ctnToken = res.token || 'end' //返回token为null代表已经查完所有数据了
|
|
|
|
+ r()
|
|
|
|
+ } else {
|
|
|
|
+ // this.$Message.error('API ERROR!')
|
|
|
|
+ this.$Message.error(this.$t('learnActivity.mgtScEv.evListErr'))
|
|
|
|
+ this.isLoading = false
|
|
|
|
+ j()
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- // this.$Message.error('API ERROR!')
|
|
|
|
- this.$Message.error(this.$t('learnActivity.mgtScEv.evListErr'))
|
|
|
|
|
|
+ },
|
|
|
|
+ err => {
|
|
this.isLoading = false
|
|
this.isLoading = false
|
|
|
|
+ j()
|
|
}
|
|
}
|
|
- },
|
|
|
|
- err => {
|
|
|
|
- this.isLoading = false
|
|
|
|
- }
|
|
|
|
- )
|
|
|
|
|
|
+ )
|
|
|
|
+ })
|
|
},
|
|
},
|
|
getEvStatusInfo(progress, isScore) {
|
|
getEvStatusInfo(progress, isScore) {
|
|
let info = {}
|
|
let info = {}
|
|
@@ -465,30 +504,18 @@ export default {
|
|
info.progText = this.$t('learnActivity.mgtScEv.finish')
|
|
info.progText = this.$t('learnActivity.mgtScEv.finish')
|
|
info.progColor = '#75787d'
|
|
info.progColor = '#75787d'
|
|
}
|
|
}
|
|
|
|
+ // 待评分
|
|
if (isScore === 0) {
|
|
if (isScore === 0) {
|
|
info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
|
|
info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus')
|
|
info.scoreColor = '#ff9900'
|
|
info.scoreColor = '#ff9900'
|
|
- } else if (isScore === 1) {
|
|
|
|
|
|
+ }
|
|
|
|
+ //已评分
|
|
|
|
+ else if (isScore === 1) {
|
|
info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
|
|
info.scoreText = this.$t('learnActivity.mgtScEv.scoreStatus1')
|
|
info.scoreColor = '#515a6e'
|
|
info.scoreColor = '#515a6e'
|
|
}
|
|
}
|
|
return info
|
|
return info
|
|
},
|
|
},
|
|
- //根据学段筛选评测
|
|
|
|
- filterByPeriod() {
|
|
|
|
- this.curEvaIndex = 0
|
|
|
|
- sessionStorage.setItem('evPeriod', this.filterPeriod)
|
|
|
|
- if (this.filterPeriod) {
|
|
|
|
- this.evaListShow = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
|
|
|
|
- } else {
|
|
|
|
- this.evaListShow = [...this.evaluationList]
|
|
|
|
- }
|
|
|
|
- if (this.evaListShow.length) {
|
|
|
|
- this.selectEvaluation(0)
|
|
|
|
- } else {
|
|
|
|
- this.isLoading = false
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
selectEvaluation(index) {
|
|
selectEvaluation(index) {
|
|
this.checkScoreSave(this.toEvaluation, index)
|
|
this.checkScoreSave(this.toEvaluation, index)
|
|
},
|
|
},
|
|
@@ -518,7 +545,7 @@ export default {
|
|
this.$api.learnActivity.FindExamInfo(requestData).then(
|
|
this.$api.learnActivity.FindExamInfo(requestData).then(
|
|
async res => {
|
|
async res => {
|
|
this.dataErr = false
|
|
this.dataErr = false
|
|
-
|
|
|
|
|
|
+
|
|
if (!res.error) {
|
|
if (!res.error) {
|
|
let resData = res.examInfo[0]
|
|
let resData = res.examInfo[0]
|
|
resData.score = 0
|
|
resData.score = 0
|
|
@@ -619,7 +646,6 @@ export default {
|
|
quNo: data
|
|
quNo: data
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- console.log('评测所有题号信息:', this.paperQuInfo)
|
|
|
|
},
|
|
},
|
|
checkScoreSave(fn, index) {
|
|
checkScoreSave(fn, index) {
|
|
let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
|
|
let compStu = this.$refs['score-box'] ? this.$refs['score-box'].$refs['byStuMark'] : null
|
|
@@ -726,22 +752,14 @@ export default {
|
|
},
|
|
},
|
|
//筛选评测
|
|
//筛选评测
|
|
filterEv() {
|
|
filterEv() {
|
|
- let curPdEv = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
|
|
|
|
- this.evaListShow = curPdEv.filter(item => {
|
|
|
|
- let status = !this.filter.status || (this.filter.status == item.progress)
|
|
|
|
- let type = !this.filter.type || (this.filter.type == item.type)
|
|
|
|
- let mode = !this.filter.mode || (this.filter.mode == item.source)
|
|
|
|
- return status && type && mode
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- filterByName() {
|
|
|
|
- let curPdEv = this.evaluationList.filter(item => item.period.id === this.filterPeriod)
|
|
|
|
- this.evaListShow = curPdEv.filter(item => {
|
|
|
|
- return item.name.indexOf(this.keyword) > -1
|
|
|
|
- })
|
|
|
|
|
|
+ this.ctnToken = ''
|
|
|
|
+ this.findEvaluation(true)
|
|
},
|
|
},
|
|
/**获取mode对应的label */
|
|
/**获取mode对应的label */
|
|
- getModeLabel(code) {
|
|
|
|
|
|
+ getModeLabel(code, qamode) {
|
|
|
|
+ if (qamode == 1) {
|
|
|
|
+ return this.$t('learnActivity.mgtScEv.paperExam')
|
|
|
|
+ }
|
|
for (let item of this.$GLOBAL.EV_MODE()) {
|
|
for (let item of this.$GLOBAL.EV_MODE()) {
|
|
if (item.value == code) {
|
|
if (item.value == code) {
|
|
return item.label
|
|
return item.label
|
|
@@ -843,8 +861,6 @@ export default {
|
|
handler(n, o) {
|
|
handler(n, o) {
|
|
if (n) {
|
|
if (n) {
|
|
this.filterPeriod = n.id
|
|
this.filterPeriod = n.id
|
|
- this.curPdInfo = n
|
|
|
|
- if (this.scope == 'school') this.filterByPeriod()
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -856,4 +872,10 @@ export default {
|
|
@import "./ExamMgt.less";
|
|
@import "./ExamMgt.less";
|
|
</style>
|
|
</style>
|
|
<style lang="less">
|
|
<style lang="less">
|
|
|
|
+.evaluation-list-main {
|
|
|
|
+ .ivu-scroll-container {
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 100% !important;
|
|
|
|
+ }
|
|
|
|
+}
|
|
</style>
|
|
</style>
|