<template>
|
<div>
|
<el-container class="app-item-contain">
|
00 <el-main style="padding-top: 3%;">
|
<el-form :model="form" ref="form" label-width="100%">
|
<el-row :key="index" v-for="(titleItem,index) in titleItems">
|
<div class="q-content">{{titleItem.description}}</div>
|
<el-card class="exampaper-item-box" v-if="titleItem.questionItems.length!==0" style="border:2px solid #2b90ff;">
|
<div class="align-center"><span style="font-size: small; float: left">{{$t('examinee')}}{{memberName}}</span><span style="margin-top: 0px;padding-right: 11%">●{{form.name}}●</span></div>
|
<hr style="border : 1px dashed #b3d8ff;" />
|
<el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.note }}</el-row>
|
<el-row style="margin-left:7px;margin-bottom:10px;">{{ questionItem.guide }}</el-row>
|
<el-form-item :key="itemOrder" label-width="1px">
|
<QuestionEdit @callNextSubject="nextSubject" :qType="questionItem.questionType" :question="questionItem"
|
:answer="answer.answerItems[questionItem.itemOrder-1]" :qLabel="itemOrder+'/'+itemSize"/>
|
</el-form-item>
|
<hr style="border : 0.5px dashed #b3d8ff;" />
|
<div style="color: red;font-size: smaller">{{$t('pleaseAnswerCarefully_exercise')}}</div>
|
|
<el-row class="do-align-center" v-if="itemOrder > 1">
|
<el-button @click="doExam" type="success" round>{{$t('startDo_apifan')}}</el-button>
|
<el-button @click="preSubject" type="warning" round>{{$t('lastQuestion')}}</el-button>
|
</el-row>
|
<el-row class="do-align-center" v-if="itemOrder <= 1">
|
<el-button @click="doExam" type="success" round>{{$t('startDo_apifan')}}</el-button>
|
<el-button @click="nextSubject" type="primary" round>{{$t('nextQuestion')}}</el-button>
|
</el-row>
|
</el-card>
|
</el-row>
|
</el-form>
|
|
</el-main>
|
</el-container>
|
<el-row class="do-exam-title footer">
|
<el-col :span="24">
|
<!--<el-popover placement="top" title="题目列表" width="200" trigger="click" ref="popovertag">-->
|
<!--<el-tag type="success" slot="reference">题目</el-tag>-->
|
<!--<span :key="item.itemOrder" v-for="(item) in answer.answerItems">-->
|
<!--<el-tag :type="questionCompleted(item.completed)" class="do-exam-title-tag"-->
|
<!-->{{item.itemOrder}}</el-tag>-->
|
<!--</span>-->
|
<!--</el-popover>-->
|
<span class="do-exam-time">
|
<!--<label>{{$t('remainingTime')}}</label>-->
|
<!--<label>{{formatSecondsG(remainTime,$t('hour'),$t('min'),$t('second'))}}</label>-->
|
</span>
|
</el-col>
|
</el-row>
|
</div>
|
</template>
|
|
<script>
|
import { mapState, mapGetters, mapMutations } from 'vuex'
|
import { formatSeconds, formatSecondsG, formatDate } from '@/utils'
|
import QuestionEdit from '../components/QuestionEdit'
|
import examPaperApi from '@/api/examPaper'
|
import examPaperAnswerApi from '@/api/examPaperAnswer'
|
import demographyApi from '@/api/demography'
|
|
export default {
|
name: 'exercise',
|
components: { QuestionEdit },
|
data () {
|
return {
|
memberName: this.$route.query.formDo.memberName,
|
form: {
|
name: this.$route.query.formDo.name
|
},
|
itemOrder: 1,
|
itemSize: 2,
|
description: '',
|
guide: '',
|
questionItem: {
|
title: '我善于主动和陌生人交谈。',
|
items: [
|
{ content: '非常不同意', prefix: '1', score: 0 },
|
{ content: '不同意', prefix: '2', score: 0 },
|
{ content: '不确定', prefix: '3', score: 0 },
|
{ content: '同意', prefix: '4', score: 0 },
|
{ content: '非常同意', prefix: '5', score: 0 }
|
],
|
questionType: 1,
|
note: '以下为工作行为/题目风格的例子',
|
guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。'
|
},
|
answer: {
|
questionId: null,
|
doTime: 0,
|
answerItems: [],
|
verifyStatus: 2
|
},
|
titleItems: [
|
{
|
questionItems: [
|
{
|
title: '我善于主动和陌生人交谈。',
|
items: [
|
{ content: '非常不同意', prefix: '1', score: 0 },
|
{ content: '不同意', prefix: '2', score: 0 },
|
{ content: '不确定', prefix: '3', score: 0 },
|
{ content: '同意', prefix: '4', score: 0 },
|
{ content: '非常同意', prefix: '5', score: 0 }
|
],
|
questionType: 1
|
},
|
{
|
title: '使用复印机。',
|
items: [
|
{ content: '从来没有', prefix: '1', score: 0 },
|
{ content: '1-2次', prefix: '2', score: 0 },
|
{ content: '好几次', prefix: '3', score: 0 },
|
{ content: '经常', prefix: '4', score: 0 }
|
],
|
questionType: 1
|
}
|
]
|
}
|
],
|
isSubmit: false
|
}
|
},
|
created: function () {
|
},
|
mounted () {
|
},
|
beforeDestroy () {
|
},
|
watch: {
|
},
|
methods: {
|
nextSubject () {
|
if (this.itemOrder === 2) {
|
this.isSubmit = true
|
return
|
}
|
this.questionItem = {
|
title: '使用复印机。',
|
items: [
|
{ content: '从来没有', prefix: '1', score: 0 },
|
{ content: '1-2次', prefix: '2', score: 0 },
|
{ content: '好几次', prefix: '3', score: 0 },
|
{ content: '经常', prefix: '4', score: 0 }
|
],
|
questionType: 1,
|
note: '以下为基本技能过往经验题目的例子',
|
guide: '您在过去一年中使用过这些基本技能的频度,并点击相应的选项。'
|
|
}
|
this.itemOrder = 2
|
},
|
preSubject () {
|
this.isSubmit = false
|
this.questionItem = {
|
title: '我善于主动和陌生人交谈。',
|
items: [
|
{ content: '非常不同意', prefix: '1', score: 0 },
|
{ content: '不同意', prefix: '2', score: 0 },
|
{ content: '不确定', prefix: '3', score: 0 },
|
{ content: '同意', prefix: '4', score: 0 },
|
{ content: '非常同意', prefix: '5', score: 0 }
|
],
|
questionType: 1,
|
note: '以下为工作行为/题目风格的例子',
|
guide: '请仔细阅读下面的陈述,判断您在多大程度上同意每一陈述对您的描述,然后点击相应的选项。'
|
}
|
this.itemOrder = 1
|
},
|
doExam () {
|
let _this = this
|
examPaperApi.updateTestMemberStatus(_this.memberToken).then(re => {
|
_this.$router.push({ path: '/exam/' + _this.doUrl, query: { formDo: _this.$route.query.formDo } })
|
}).catch(re => {
|
_this.$message.error(re.message + ' 更新状态失败')
|
})
|
}
|
},
|
computed: {
|
...mapState('exam', { doUrl: state => state.doUrl }),
|
...mapState('user', { memberToken: state => state.memberToken })
|
}
|
}
|
</script>
|
|
<style lang="scss" scoped>
|
.align-center {
|
text-align: center;
|
}
|
|
.exam-question-item {
|
padding: 10px;
|
font-size: large;
|
|
.el-form-item__label {
|
font-size: large !important;
|
}
|
}
|
|
.question-title-padding {
|
padding-left: 25px;
|
padding-right: 25px;
|
}
|
.footer {
|
position: absolute;
|
position: fixed;
|
z-index: 1000;
|
bottom: 0px;
|
}
|
</style>
|