考试记录
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<ai-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,16 +9,50 @@
|
||||
<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.title"></ai-info-item>
|
||||
<ai-info-item label="正确答案" isLine :value="info.areaName"></ai-info-item>
|
||||
<ai-info-item label="题目选项" isLine :value="info.contentType"></ai-info-item>
|
||||
<ai-info-item label="正文" isLine>
|
||||
<AiArticle :value="info.content"></AiArticle>
|
||||
</ai-info-item>
|
||||
<ai-info-item label="微信昵称" :value="info.nickName"></ai-info-item>
|
||||
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
|
||||
<ai-info-item label="姓名" :value="info.realName"></ai-info-item>
|
||||
<ai-info-item label="身份证号" :value="info.idNumber"></ai-info-item>
|
||||
<ai-info-item label="地区" :value="info.areaName"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="学习记录">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
label-width="98px">
|
||||
<ai-info-item label="学习时(分钟)" :value="info.studyDuration"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
<ai-table
|
||||
:tableData="tableData1"
|
||||
:col-configs="colConfigs1"
|
||||
:total="total1"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search1.current"
|
||||
:size.sync="search1.size"
|
||||
@getList="getList1">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
<ai-card title="考试记录">
|
||||
<template #content>
|
||||
<ai-wrapper
|
||||
style="width: 30%"
|
||||
label-width="56px">
|
||||
<ai-info-item label="考试场数" :value="info.examNumber"></ai-info-item>
|
||||
<ai-info-item label="通过考试" :value="info.passExam"></ai-info-item>
|
||||
</ai-wrapper>
|
||||
<ai-table
|
||||
:tableData="tableData2"
|
||||
:col-configs="colConfigs2"
|
||||
:total="total2"
|
||||
style="margin-top: 6px;"
|
||||
:current.sync="search2.current"
|
||||
:size.sync="search2.size"
|
||||
@getList="getList2">
|
||||
</ai-table>
|
||||
</template>
|
||||
</ai-card>
|
||||
</template>
|
||||
</ai-detail>
|
||||
</template>
|
||||
@@ -30,32 +64,88 @@
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
params: Object,
|
||||
moduleId: String
|
||||
params: Object
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
info: {},
|
||||
id: ''
|
||||
search1: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: ''
|
||||
},
|
||||
search2: {
|
||||
current: 1,
|
||||
size: 10,
|
||||
title: ''
|
||||
},
|
||||
total1: 0,
|
||||
total2: 0,
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
colConfigs1: [
|
||||
{ prop: 'bizName', label: '学习课程名称', align: 'left' },
|
||||
{ prop: 'bizType', label: '课程类型', align: 'center', format: v => v === '0' ? '学习' : '考试' },
|
||||
{ prop: 'videoDuration', label: '视频时长', align: 'center' },
|
||||
{ prop: 'startTime', label: '开始学习时间', align: 'center' },
|
||||
{ prop: 'studyDuration', label: '学习时长(分钟)', align: 'center' },
|
||||
{ prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('qjLearnStatus', v) }
|
||||
],
|
||||
colConfigs2: [
|
||||
{ prop: 'bizName', label: '考试名称', align: 'left' },
|
||||
{ prop: 'phone', label: '题目数', align: 'center' },
|
||||
{ prop: 'realName', label: '通过得分', align: 'center' },
|
||||
{ prop: 'startTime', label: '开始考试时间', align: 'center' },
|
||||
{ prop: 'score', label: '得分', align: 'center' },
|
||||
{ prop: 'status', label: '是否通过', align: 'center', format: v => v === '0' ? '否' : '是' }
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
created () {
|
||||
if (this.params && this.params.id) {
|
||||
this.id = this.params.id
|
||||
this.getInfo(this.params.id)
|
||||
}
|
||||
this.getInfo(this.params.id)
|
||||
this.dict.load('qjLearnStatus').then(() => {
|
||||
this.getList1()
|
||||
this.getList2()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
getInfo (id) {
|
||||
this.instance.post(`/app/appcontentinfo/queryDetailById?id=${id}`).then(res => {
|
||||
this.instance.post(`/app/appwechatuserqujing/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data
|
||||
this.info.pictureUrl = res.data.pictureUrl ? [{
|
||||
url: res.data.pictureUrl
|
||||
}] : []
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList1() {
|
||||
this.instance.post(`/app/appwechatuserqujinglearnrecord/list`, null, {
|
||||
params: {
|
||||
...this.search1,
|
||||
bizType: 0,
|
||||
openId: this.params.openId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData1 = res.data.records
|
||||
this.total1 = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getList2 () {
|
||||
this.instance.post(`/app/appwechatuserqujinglearnrecord/list`, null, {
|
||||
params: {
|
||||
...this.search2,
|
||||
bizType: 1,
|
||||
openId: this.params.openId
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.tableData2 = res.data.records
|
||||
this.total2 = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<el-table-column slot="options" width="90px" fixed="right" label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div class="table-options">
|
||||
<el-button type="text" @click="toDetail(row.id)">详情</el-button>
|
||||
<el-button type="text" @click="toDetail(row.id, row.openId)">详情</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -41,6 +41,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
export default {
|
||||
name: 'List',
|
||||
|
||||
@@ -59,27 +60,31 @@
|
||||
},
|
||||
total: 10,
|
||||
colConfigs: [
|
||||
{ prop: 'title', label: '题目', align: 'left' },
|
||||
{ prop: 'createUserName', label: '微信昵称', align: 'center' },
|
||||
{ prop: 'createUserName', label: '手机号', align: 'center' },
|
||||
{ prop: 'createUserName', label: '姓名', align: 'center' },
|
||||
{ prop: 'createUserName', label: '身份证号', align: 'center' },
|
||||
{ prop: 'createUserName', label: '地址', align: 'center' },
|
||||
{ prop: 'createUserName', label: '学习时长(分钟)', align: 'center' },
|
||||
{ prop: 'createUserName', label: '考试场数', align: 'center' },
|
||||
{ prop: 'createUserName', label: '通过考试', align: 'center' }
|
||||
{ prop: 'nickName', label: '微信昵称', align: 'left' },
|
||||
{ prop: 'phone', label: '手机号', align: 'center' },
|
||||
{ prop: 'realName', label: '姓名', align: 'center' },
|
||||
{ prop: 'idNumber', label: '身份证号', align: 'center' },
|
||||
{ prop: 'areaName', label: '地址', align: 'center' },
|
||||
{ prop: 'studyDuration', label: '学习时长(分钟)', align: 'center' },
|
||||
{ prop: 'examNumber', label: '考试场数', align: 'center' },
|
||||
{ prop: 'passExam', label: '通过考试', align: 'center' }
|
||||
],
|
||||
tableData: []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(['user'])
|
||||
},
|
||||
|
||||
created() {
|
||||
// this.search.areaId = this.user.info.areaId
|
||||
this.getList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
this.instance.post(`/app/appmarketingactivityinfo/list`, null, {
|
||||
this.instance.post(`/app/appwechatuserqujing/list`, null, {
|
||||
params: {
|
||||
...this.search
|
||||
}
|
||||
@@ -91,22 +96,12 @@
|
||||
})
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该活动?').then(() => {
|
||||
this.instance.post(`/app/appmarketingactivityinfo/delete?id=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('删除成功!')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
toDetail (id) {
|
||||
toDetail (id, openId) {
|
||||
this.$emit('change', {
|
||||
type: 'Detail',
|
||||
params: {
|
||||
id: id || ''
|
||||
id: id || '',
|
||||
openId
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user