|
|
|
@ -7,12 +7,12 @@
|
|
|
|
|
<b-img src="/static/image/exam_title.png" />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<cut-down start="2022-3-14 00:00:00" end="2022-3-28 03:00:00" />
|
|
|
|
|
<cut-down :start="examInfo.startTime" :end="examInfo.endTime" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="exam-header-title">
|
|
|
|
|
<div>
|
|
|
|
|
2020年全国高职财经大数据分析大赛--金融实操赛项
|
|
|
|
|
{{ competition.name}}--金融实操赛项
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<b-button class="exam-button" @click="handle">交卷</b-button>
|
|
|
|
@ -22,9 +22,9 @@
|
|
|
|
|
<div class="tz-exam-content">
|
|
|
|
|
<div class="tz-exam-left-panel">
|
|
|
|
|
<div class="tz-exam-box">
|
|
|
|
|
<div class="tz-exam-box-title2">产品研究部试用吴京和</div>
|
|
|
|
|
<div class="tz-exam-box-title2">{{userInfo.school +' '+ userInfo.name}}</div>
|
|
|
|
|
<div class="tz-exam-box-content">
|
|
|
|
|
<b-img src="/static/image/tx80x80.png" /> 考试日期: {{new Date().Format("yyyy-MM-dd")}}
|
|
|
|
|
<b-img src="/static/image/tx80x80.png" /> 考试日期: {{examInfo.startTime}}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="tz-exam-box">
|
|
|
|
@ -68,7 +68,7 @@
|
|
|
|
|
<div class="exam-tab-content">
|
|
|
|
|
<div>
|
|
|
|
|
<a name="single" />
|
|
|
|
|
单选题(共<span>60</span>题,每题<span>0.5</span>分,共<span>20.0</span>分)
|
|
|
|
|
单选题(共<span>{{singleInfo.size}}</span>题,每题<span>{{singleInfo.score}}</span>分,共<span>{{singleInfo.sumScore}}</span>分)
|
|
|
|
|
</div>
|
|
|
|
|
<div v-for="cq in singleQuestion" :key="cq.id">
|
|
|
|
|
<a :name="cq.id" />
|
|
|
|
@ -83,7 +83,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a name="multi" />
|
|
|
|
|
多选题(共<span>60</span>题,每题<span>0.5</span>分,共<span>20.0</span>分)
|
|
|
|
|
多选题(共<span>{{multiInfo.size}}</span>题,每题<span>{{multiInfo.score}}</span>分,共<span>{{ multiInfo.sumScore}}</span>分)
|
|
|
|
|
</div>
|
|
|
|
|
<div v-for="cq in multiQuestion" :key="cq.id">
|
|
|
|
|
<a :name="cq.id" />
|
|
|
|
@ -98,7 +98,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<a name="judge" />
|
|
|
|
|
判断题(共<span>60</span>题,每题<span>0.5</span>分,共<span>20.0</span>分)
|
|
|
|
|
判断题(共<span>{{judgeInfo.size}}</span>题,每题<span>{{judgeInfo.score}}</span>分,共<span>{{judgeInfo.sumScore}}</span>分)
|
|
|
|
|
</div>
|
|
|
|
|
<div v-for="cq in judgeQuestion" :key="cq.id">
|
|
|
|
|
<a :name="cq.id" />
|
|
|
|
@ -114,17 +114,17 @@
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<a name="anli" />
|
|
|
|
|
案例题(共<span>60</span>题,每题<span>0.5</span>分,共<span>20.0</span>分)
|
|
|
|
|
案例题(共<span>{{anliInfo.size}}</span>题,每题<span>{{anliInfo.score}}</span>分,共<span>{{anliInfo.sumScore}}</span>分)
|
|
|
|
|
</div>
|
|
|
|
|
<div v-for="cq in anliQuestion" :key="cq.id">
|
|
|
|
|
<a :name="cq.id" />
|
|
|
|
|
<div>案例名称:</div>
|
|
|
|
|
<div v-if="!!cq.item">
|
|
|
|
|
{{cq.id}}.{{cq.item.stem}}
|
|
|
|
|
<div class="anli_title">案例名称:</div>
|
|
|
|
|
<div class="anli_sub_title" v-if="!!cq.item">
|
|
|
|
|
{{cq.item.stem}}
|
|
|
|
|
</div>
|
|
|
|
|
<div>案例介绍:</div>
|
|
|
|
|
<div v-html="cq.item.content"></div>
|
|
|
|
|
|
|
|
|
|
<div class="anli_title">案例介绍:</div>
|
|
|
|
|
<div class="anli_sub_title" v-html="cq.item.content"></div>
|
|
|
|
|
<hr class="tz-line-dash" />
|
|
|
|
|
<div v-for="subcq in cq.item.children" :key="subcq.id">
|
|
|
|
|
<div class="question-stem">
|
|
|
|
|
{{subcq.id}}.{{subcq.stem}}
|
|
|
|
@ -148,17 +148,39 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<tz-footer />
|
|
|
|
|
<tz-dialog msg="确认后开始考试,答题时间为1个小时,是否现在开始答题?" :ok.sync="confirm" :visiable="dlgVisiable" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|
import CutDown from './cutdown.vue'
|
|
|
|
|
import Footer from '@/components/footer.vue'
|
|
|
|
|
import ConfirmDialog from '@/views/dialog/confirmdialog.vue'
|
|
|
|
|
import * as examApi from '@/api/competition'
|
|
|
|
|
import { getInfo } from '@/utils/auth'
|
|
|
|
|
export default {
|
|
|
|
|
data(){
|
|
|
|
|
return {
|
|
|
|
|
singleQuestion: [],
|
|
|
|
|
singleInfo: {
|
|
|
|
|
size: 0,
|
|
|
|
|
score: 0,
|
|
|
|
|
sumScore: 0
|
|
|
|
|
},
|
|
|
|
|
multiInfo: {
|
|
|
|
|
size: 0,
|
|
|
|
|
score: 0,
|
|
|
|
|
sumScore: 0
|
|
|
|
|
},
|
|
|
|
|
judgeInfo: {
|
|
|
|
|
size: 0,
|
|
|
|
|
score: 0,
|
|
|
|
|
sumScore: 0
|
|
|
|
|
},
|
|
|
|
|
anliInfo: {
|
|
|
|
|
size: 0,
|
|
|
|
|
score: 0,
|
|
|
|
|
sumScore: 0
|
|
|
|
|
},
|
|
|
|
|
singleQuestion: [],
|
|
|
|
|
multiQuestion: [],
|
|
|
|
|
judgeQuestion: [],
|
|
|
|
|
anliQuestion:[],
|
|
|
|
@ -168,8 +190,18 @@ export default {
|
|
|
|
|
currentQ: null,
|
|
|
|
|
userInfo: null,
|
|
|
|
|
tabId: 0,
|
|
|
|
|
compId: 0,
|
|
|
|
|
stageId: 0
|
|
|
|
|
compId: 1,
|
|
|
|
|
stageId: 1,
|
|
|
|
|
confirm: false,
|
|
|
|
|
dlgVisiable: true,
|
|
|
|
|
competition: null,
|
|
|
|
|
examInfo: {
|
|
|
|
|
startTime: null,
|
|
|
|
|
endTime: null,
|
|
|
|
|
doneList:[],
|
|
|
|
|
markList:[],
|
|
|
|
|
current: 1,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
@ -209,7 +241,6 @@ export default {
|
|
|
|
|
qList= qList.concat(this.getQList(this.multiQuestion))
|
|
|
|
|
qList=qList.concat(this.getQList(this.judgeQuestion))
|
|
|
|
|
qList=qList.concat(this.getQList(this.anliQuestion))
|
|
|
|
|
console.log(qList)
|
|
|
|
|
examApi.submit(this.compId,this.stageId,qList).then(res=>{
|
|
|
|
|
console.log(res)
|
|
|
|
|
})
|
|
|
|
@ -218,80 +249,185 @@ export default {
|
|
|
|
|
let list = []
|
|
|
|
|
obj.forEach(i=>{
|
|
|
|
|
if(i.item.type == 0 ){
|
|
|
|
|
let ids = []
|
|
|
|
|
if( i.item.answerId instanceof Array){
|
|
|
|
|
ids = i.item.answerId
|
|
|
|
|
}else{
|
|
|
|
|
ids.push(i.item.answerId)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
list.push({
|
|
|
|
|
id: i.item.id,
|
|
|
|
|
subId: 0,
|
|
|
|
|
answerId: i.item.answerId
|
|
|
|
|
ids: ids
|
|
|
|
|
})
|
|
|
|
|
}else if(i.item.type == 1){
|
|
|
|
|
i.item.children.forEach( q=>{
|
|
|
|
|
let ids = []
|
|
|
|
|
if( q.answerId instanceof Array){
|
|
|
|
|
ids = q.answerId
|
|
|
|
|
}else{
|
|
|
|
|
ids.push(q.answerId)
|
|
|
|
|
}
|
|
|
|
|
list.push({
|
|
|
|
|
id: i.item.id,
|
|
|
|
|
subId: q.id,
|
|
|
|
|
answerId: q.answerId
|
|
|
|
|
ids: ids
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
return list
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
this.userInfo = getInfo()
|
|
|
|
|
examApi.listQuestion(1,1).then(res=>{
|
|
|
|
|
if(res instanceof Array){
|
|
|
|
|
|
|
|
|
|
let singleList = res.filter( item => item.questionType == 1 &&item.type == 0)
|
|
|
|
|
let multiList = res.filter(item =>item.questionType == 2&&item.type == 0)
|
|
|
|
|
let judeList = res.filter(item =>item.questionType == 3&&item.type == 0)
|
|
|
|
|
let anliList = res.filter(item => item.type == 1)
|
|
|
|
|
|
|
|
|
|
for(var i= 0;i<singleList.length;i++){
|
|
|
|
|
let item = singleList[i]
|
|
|
|
|
if(item.answerId.length>0){
|
|
|
|
|
item.answerId = item.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.singleQuestion.push({id: (i+1), item: item})
|
|
|
|
|
}
|
|
|
|
|
this.currentQ = this.singleQuestion[0]
|
|
|
|
|
},
|
|
|
|
|
loadQuestion(){
|
|
|
|
|
examApi.listQuestion(this.compId,this.stageId).then(res=>{
|
|
|
|
|
if(res instanceof Array){
|
|
|
|
|
|
|
|
|
|
let singleList = res.filter( item => item.questionType == 1 &&item.type == 0)
|
|
|
|
|
let multiList = res.filter(item =>item.questionType == 2&&item.type == 0)
|
|
|
|
|
let judeList = res.filter(item =>item.questionType == 3&&item.type == 0)
|
|
|
|
|
let anliList = res.filter(item => item.type == 1)
|
|
|
|
|
singleList.sort(function(){
|
|
|
|
|
return (0.5 - Math.random())
|
|
|
|
|
})
|
|
|
|
|
multiList.sort(function(){
|
|
|
|
|
return (0.5 - Math.random())
|
|
|
|
|
})
|
|
|
|
|
judeList.sort(function(){
|
|
|
|
|
return (0.5 - Math.random())
|
|
|
|
|
})
|
|
|
|
|
anliList.sort(function(){
|
|
|
|
|
return (0.5 - Math.random())
|
|
|
|
|
})
|
|
|
|
|
for(var i= 0;i<singleList.length;i++){
|
|
|
|
|
let item = singleList[i]
|
|
|
|
|
if(item.answerId.length>0){
|
|
|
|
|
item.answerId = item.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.singleQuestion.push({id: (i+1), item: item})
|
|
|
|
|
}
|
|
|
|
|
this.currentQ = this.singleQuestion[0]
|
|
|
|
|
|
|
|
|
|
let startIndex =this.singleQuestion.length+1
|
|
|
|
|
for(var i = 0; i<multiList.length; i++){
|
|
|
|
|
let item = multiList[i]
|
|
|
|
|
this.multiQuestion.push({id: (startIndex+i), item: item})
|
|
|
|
|
let startIndex =this.singleQuestion.length+1
|
|
|
|
|
for(var i = 0; i<multiList.length; i++){
|
|
|
|
|
let item = multiList[i]
|
|
|
|
|
this.multiQuestion.push({id: (startIndex+i), item: item})
|
|
|
|
|
}
|
|
|
|
|
startIndex =this.singleQuestion.length+ this.multiQuestion.length +1
|
|
|
|
|
for(var i = 0; i< judeList.length ;i++){
|
|
|
|
|
let item = judeList[i]
|
|
|
|
|
if(item.answerId.length>0){
|
|
|
|
|
item.answerId = item.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
this.judgeQuestion.push({id:(startIndex + i ), item: item})
|
|
|
|
|
}
|
|
|
|
|
startIndex = this.singleQuestion.length+ this.multiQuestion.length + this.judgeQuestion.length + 1
|
|
|
|
|
for(var i = 0;i<anliList.length;i++){
|
|
|
|
|
let item = anliList[i]
|
|
|
|
|
item.children.forEach( child =>{
|
|
|
|
|
if((child.questionType == 1 || child.questionType == 3)&&child.answerId.length>0){
|
|
|
|
|
child.answerId = child.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.anliQuestion.push({id: (startIndex + i ) ,item: item})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
startIndex =this.singleQuestion.length+ this.multiQuestion.length +1
|
|
|
|
|
for(var i = 0; i< judeList.length ;i++){
|
|
|
|
|
let item = judeList[i]
|
|
|
|
|
if(item.answerId.length>0){
|
|
|
|
|
item.answerId = item.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
this.judgeQuestion.push({id:(startIndex + i ), item: item})
|
|
|
|
|
this.dlgVisiable = false
|
|
|
|
|
this.initQuestionInfo()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
startExam(){
|
|
|
|
|
examApi.startExam({ compId:this.compId,stageId: this.stageId}).then(res=>{
|
|
|
|
|
if(res.code == 200){
|
|
|
|
|
this.examInfo.startTime = res.data.startTime
|
|
|
|
|
this.examInfo.endTime = res.data.endTime
|
|
|
|
|
this.loadQuestion()
|
|
|
|
|
}
|
|
|
|
|
startIndex = this.singleQuestion.length+ this.multiQuestion.length + this.judgeQuestion.length + 1
|
|
|
|
|
for(var i = 0;i<anliList.length;i++){
|
|
|
|
|
let item = anliList[i]
|
|
|
|
|
item.children.forEach( child =>{
|
|
|
|
|
if((child.questionType == 1 || child.questionType == 3)&&child.answerId.length>0){
|
|
|
|
|
child.answerId = child.answerId[0]
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
initQuestionInfo(){
|
|
|
|
|
this.singleInfo.size = this.singleQuestion.length
|
|
|
|
|
this.judgeInfo.size = this.judgeQuestion.length
|
|
|
|
|
this.multiInfo.size = this.multiQuestion.length
|
|
|
|
|
this.anliInfo.size = this.anliQuestion.length
|
|
|
|
|
this.singleInfo.sumScore = this.sumScore(this.singleQuestion)
|
|
|
|
|
this.singleInfo.score = this.singleInfo.sumScore/this.singleInfo.size
|
|
|
|
|
this.judgeInfo.sumScore = this.sumScore(this.judgeQuestion)
|
|
|
|
|
this.judgeInfo.score = this.judgeInfo.sumScore/this.judgeInfo.size
|
|
|
|
|
this.multiInfo.sumScore = this.sumScore(this.multiQuestion)
|
|
|
|
|
this.multiInfo.score = this.multiInfo.sumScore/this.multiInfo.size
|
|
|
|
|
this.anliInfo.sumScore = this.sumAnliScore(this.anliQuestion)
|
|
|
|
|
this.anliInfo.score = this.anliInfo.sumScore/this.anliInfo.size
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
sumScore(qList){
|
|
|
|
|
let score = 0
|
|
|
|
|
if(qList instanceof Array){
|
|
|
|
|
qList.forEach(q=>{
|
|
|
|
|
score +=q.item.score
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return score
|
|
|
|
|
},
|
|
|
|
|
sumAnliScore(qList){
|
|
|
|
|
let score = 0
|
|
|
|
|
if(qList instanceof Array){
|
|
|
|
|
qList.forEach(q=>{
|
|
|
|
|
|
|
|
|
|
q.item.children.forEach(cq=>{
|
|
|
|
|
console.log("anliItem:",cq)
|
|
|
|
|
score += cq.score
|
|
|
|
|
})
|
|
|
|
|
this.anliQuestion.push({id: (startIndex + i ) ,item: item})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return score
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created(){
|
|
|
|
|
if(this.$route.query){
|
|
|
|
|
this.compId = this.$route.query.id
|
|
|
|
|
examApi.get({compId: this.compId}).then(res=>{
|
|
|
|
|
if(res.code == 200){
|
|
|
|
|
this.competition = res.data
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
this.userInfo = getInfo()
|
|
|
|
|
// this.loadQuestion()
|
|
|
|
|
},
|
|
|
|
|
watch:{
|
|
|
|
|
confirm(val){
|
|
|
|
|
if(val){
|
|
|
|
|
this.startExam()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components:{
|
|
|
|
|
"cutDown": CutDown,
|
|
|
|
|
"tz-footer": Footer
|
|
|
|
|
"tz-footer": Footer,
|
|
|
|
|
'tz-dialog': ConfirmDialog
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.tz-line-dash{
|
|
|
|
|
border: none;
|
|
|
|
|
border-top: 1px dotted #ccc;
|
|
|
|
|
}
|
|
|
|
|
.anli_title{
|
|
|
|
|
text-align: left;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color: black;
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
.anli_sub_title{
|
|
|
|
|
color: #536073;
|
|
|
|
|
text-align: left;
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
.tz-exam-header{
|
|
|
|
|
background-image: url('/static/image/answer_topbg_1990x140.jpg');
|
|
|
|
|
background-size: cover;
|
|
|
|
|