2023-02-08 14:08:51 +08:00
|
|
|
|
<template>
|
2023-02-14 10:13:38 +08:00
|
|
|
|
<ai-detail class="AppExaminationManage-detail">
|
2023-02-08 14:08:51 +08:00
|
|
|
|
<template slot="title">
|
2023-02-14 10:13:38 +08:00
|
|
|
|
<ai-title title="考试详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
2023-02-08 14:08:51 +08:00
|
|
|
|
</ai-title>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<template slot="content">
|
|
|
|
|
|
<ai-card title="基本信息">
|
|
|
|
|
|
<template #content>
|
|
|
|
|
|
<ai-wrapper
|
|
|
|
|
|
label-width="120px">
|
2023-02-14 10:13:38 +08:00
|
|
|
|
<ai-info-item label="考试名称" :value="info.examinationName"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="排序" :value="info.showIndex"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="成绩评核" isLine :value="assessmentsName"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="选题方式" isLine :value="dict.getLabel('qjEIChooseType', info.chooseType)">
|
2023-02-08 14:08:51 +08:00
|
|
|
|
</ai-info-item>
|
2023-03-22 14:27:17 +08:00
|
|
|
|
<ai-info-item label="考试类型" isLine :value="dict.getLabel('qjExaminationType', info.examinationType)"></ai-info-item>
|
2023-02-14 10:13:38 +08:00
|
|
|
|
<ai-info-item label="试题总数" :value="info.questions && info.questions.length"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="总分数" :value="info.subjectScore"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="考试人数" :value="info.examinationNumber"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="通过人数" :value="info.passNumber"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="状态" :value="dict.getLabel('qjEIStatus', info.status)"></ai-info-item>
|
|
|
|
|
|
</ai-wrapper>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</ai-card>
|
|
|
|
|
|
<ai-card title="试题" v-if="info.questions && info.questions.length">
|
|
|
|
|
|
<template #content>
|
|
|
|
|
|
<ai-wrapper
|
|
|
|
|
|
class="topic-item"
|
|
|
|
|
|
v-for="(item, index) in info.questions"
|
|
|
|
|
|
:key="index"
|
|
|
|
|
|
label-width="120px">
|
|
|
|
|
|
<ai-info-item label="题目描述" isLine :value="item.title"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="题目类型" :value="dict.getLabel('qjQBType', item.type)"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="正确答案" :value="item.answer"></ai-info-item>
|
|
|
|
|
|
<ai-info-item label="题目选项" isLine>
|
|
|
|
|
|
<div class="">
|
|
|
|
|
|
<div class="options" v-for="(e, index) in item.items" :key="index">
|
|
|
|
|
|
<span>{{ e.sort }}:</span>
|
|
|
|
|
|
<span>{{ e.content }}</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
2023-02-08 14:08:51 +08:00
|
|
|
|
</ai-info-item>
|
2023-02-14 10:13:38 +08:00
|
|
|
|
<ai-info-item label="答案解析" isLine>
|
|
|
|
|
|
<AiArticle :value="item.analysis"></AiArticle>
|
2023-02-08 14:08:51 +08:00
|
|
|
|
</ai-info-item>
|
|
|
|
|
|
</ai-wrapper>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</ai-card>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</ai-detail>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
export default {
|
|
|
|
|
|
name: 'Detail',
|
|
|
|
|
|
|
|
|
|
|
|
props: {
|
|
|
|
|
|
instance: Function,
|
|
|
|
|
|
dict: Object,
|
2023-02-14 10:13:38 +08:00
|
|
|
|
params: Object
|
2023-02-08 14:08:51 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
data () {
|
|
|
|
|
|
return {
|
|
|
|
|
|
info: {},
|
2023-02-14 10:13:38 +08:00
|
|
|
|
id: '',
|
2023-02-20 10:27:19 +08:00
|
|
|
|
assessmentsName: '',
|
|
|
|
|
|
sort: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I']
|
2023-02-08 14:08:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
created () {
|
2023-02-14 10:13:38 +08:00
|
|
|
|
this.dict.load(['qjQBType', 'qjEIChooseType', 'qjEACondition', 'qjEAType', 'qjEIStatus']).then(() => {
|
|
|
|
|
|
if (this.params && this.params.id) {
|
|
|
|
|
|
this.id = this.params.id
|
|
|
|
|
|
this.getInfo(this.params.id)
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2023-02-08 14:08:51 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
getInfo (id) {
|
2023-02-14 10:13:38 +08:00
|
|
|
|
this.instance.post(`/app/appexaminationinfo/queryDetailById?id=${id}`).then(res => {
|
2023-02-08 14:08:51 +08:00
|
|
|
|
if (res.code === 0) {
|
2023-02-20 09:30:10 +08:00
|
|
|
|
this.info = {
|
|
|
|
|
|
...res.data,
|
|
|
|
|
|
questions: res.data.questions.map(v => {
|
2023-02-20 10:27:19 +08:00
|
|
|
|
let answer = []
|
|
|
|
|
|
v.items.forEach((e, index) => {
|
|
|
|
|
|
if (e.checked === '1') {
|
|
|
|
|
|
answer.push(this.sort[index])
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2023-02-20 09:30:10 +08:00
|
|
|
|
return {
|
|
|
|
|
|
...v,
|
2023-02-20 10:27:19 +08:00
|
|
|
|
answer: answer.join(',')
|
2023-02-20 09:30:10 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
2023-02-14 10:13:38 +08:00
|
|
|
|
|
|
|
|
|
|
this.assessmentsName = res.data.assessments.map(v => {
|
|
|
|
|
|
return `${this.dict.getLabel('qjEAType', v.assessmentType)} ${this.dict.getLabel('qjEACondition', v.upCondition)} ${v.upScore} `
|
|
|
|
|
|
}).join('、')
|
2023-02-08 14:08:51 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
cancel (isRefresh) {
|
|
|
|
|
|
this.$emit('change', {
|
|
|
|
|
|
type: 'List',
|
|
|
|
|
|
isRefresh: !!isRefresh
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2023-02-14 10:13:38 +08:00
|
|
|
|
.AppExaminationManage-detail .topic-item {
|
|
|
|
|
|
padding: 40px 0 0;
|
|
|
|
|
|
border-bottom: 1px solid #eee;
|
|
|
|
|
|
|
|
|
|
|
|
&:first-child {
|
|
|
|
|
|
padding-top: 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-02-08 14:08:51 +08:00
|
|
|
|
</style>
|