bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-detail>
|
||||
<ai-detail class="AppExaminationManage-detail">
|
||||
<template slot="title">
|
||||
<ai-title title="课程详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
<ai-title title="考试详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
||||
</ai-title>
|
||||
</template>
|
||||
<template slot="content">
|
||||
@@ -9,30 +9,39 @@
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="120px">
|
||||
<ai-info-item label="标题" isLine :value="info.title"></ai-info-item>
|
||||
<ai-info-item label="发布地区" isLine :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="文章类型" isLine :value="info.contentType === '0' ? '图文' : '视频'"></ai-info-item>
|
||||
<ai-info-item label="正文" v-if="info.contentType === '0'" isLine>
|
||||
<AiArticle :value="info.content"></AiArticle>
|
||||
<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)">
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '0'" isLine label="封面图片">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
disabled
|
||||
v-model="info.files"
|
||||
:limit="9">
|
||||
</ai-uploader>
|
||||
<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>
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '1'" isLine label="封面图片">
|
||||
<video style="width:100%; height:100%; object-fit: fill;" :src="info.files[0].url" controls></video>
|
||||
</ai-info-item>
|
||||
<ai-info-item v-if="info.contentType === '1'" isLine label="视频封面">
|
||||
<ai-uploader
|
||||
:instance="instance"
|
||||
disabled
|
||||
v-model="info.pictureUrl"
|
||||
:limit="1">
|
||||
</ai-uploader>
|
||||
<ai-info-item label="答案解析" isLine>
|
||||
<AiArticle :value="item.analysis"></AiArticle>
|
||||
</ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
@@ -48,32 +57,35 @@
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
moduleId: String
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
id: ''
|
||||
id: '',
|
||||
assessmentsName: ''
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
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)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => {
|
||||
this.instance.post(`/app/appexaminationinfo/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.info.pictureUrl = res.data.pictureUrl ? [{
|
||||
url: res.data.pictureUrl
|
||||
}] : []
|
||||
|
||||
this.assessmentsName = res.data.assessments.map(v => {
|
||||
return `${this.dict.getLabel('qjEAType', v.assessmentType)} ${this.dict.getLabel('qjEACondition', v.upCondition)} ${v.upScore} `
|
||||
}).join('、')
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -89,4 +101,16 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.AppExaminationManage-detail .topic-item {
|
||||
padding: 40px 0 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:first-child {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user