feat: 0318反馈问题修改
This commit is contained in:
parent
c8fa19d304
commit
c635366a0b
|
@ -11,6 +11,7 @@ const mycourseApi = {
|
|||
recommendList: 'sys/recommend/listPage', // 系统推荐课程列表
|
||||
recommendDetail: 'sys/recommend/detail', // 系统课程推荐详情
|
||||
trainPlanList: '/myCourse/getMyTrainPlanList', // 培训计划列表
|
||||
getMyTrainPlanCourse: '/myCourse/getMyTrainPlanCourse', // 获取培训计划中的课程列表
|
||||
getCourseDetail: 'myCourse/getCourseDetail', // 我的课程详情
|
||||
getCourseCatalogue: 'myCourse/getCourseCatalogue', // 获取课程目录
|
||||
reqCourseExam: 'testInClass/add', // 课中检测
|
||||
|
@ -19,10 +20,18 @@ const mycourseApi = {
|
|||
operationList: 'classwork/list', // 作业列表
|
||||
reqOperationDetail: 'classwork/get', // 作业详情
|
||||
reqOperationSubmit: 'classwork/submit', // 作业提交
|
||||
getMyCourseList: 'studyStatistics/getMyTrainPlanList', // 课程学习统计
|
||||
getMyCourseList: 'studyStatistics/getMyCourseList', // 课程学习统计
|
||||
addRecord: '/testInClass/addRecord' // pdf学习完成
|
||||
}
|
||||
|
||||
export function reqMyTrainPlanCourse (data) {
|
||||
return request({
|
||||
url: mycourseApi.getMyTrainPlanCourse,
|
||||
method: 'get',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
|
||||
export function reqAddRecord (data) {
|
||||
return request({
|
||||
url: mycourseApi.addRecord,
|
||||
|
|
|
@ -165,7 +165,7 @@ export default {
|
|||
if (this.courseware.videoList.length > 0) {
|
||||
// 视频截取的封面图
|
||||
if (this.courseware.image != '' || this.courseware.image) {
|
||||
this.images = this.courseware.image.split(',')
|
||||
this.images = this.courseware.image && this.courseware.image.split(',') || []
|
||||
this.playerOptions.poster = this.images[0]
|
||||
}
|
||||
// 课件视频展现
|
||||
|
|
|
@ -184,7 +184,6 @@ export default {
|
|||
},
|
||||
// pdf到达底部了
|
||||
reachBottom: _.debounce(function () {
|
||||
console.log('>>>>>>>>>>>>>>>>>>>onPlayerEnded')
|
||||
console.log('到达了底部')
|
||||
if (!this.readComplete && this.curVideo.status === 0) {
|
||||
this.readComplete = true
|
||||
|
@ -243,10 +242,11 @@ export default {
|
|||
},
|
||||
// 当视频播放完毕的回调处理
|
||||
onPlayerEnded () {
|
||||
console.log('>>>>>>>>>>>播放完了')
|
||||
const { curVideo, courseInfo } = this
|
||||
// 课件状态必须为未学状态
|
||||
// 只有必修课切是视频文件才弹出课中检测
|
||||
if (curVideo.status === 0 && courseInfo.trainType === 2 && curVideo.courseWay === 1) {
|
||||
if (curVideo.status === 0 && courseInfo.trainType === 1 && curVideo.courseWay === 1) {
|
||||
this.openCourseExam()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!-- 作者:cgd 邮箱:349008059@qq.com 时间:2022年03月24日 16:33:32 -->
|
||||
<template>
|
||||
<a-modal title="培训计划课程" v-model="visible" :footer="null" :closable="true" width="1000px">
|
||||
<MyCourseListVue :type="2" :planId="planId"></MyCourseListVue>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MyCourseListVue from './MyCourseList.vue'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
planId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: { MyCourseListVue },
|
||||
data () {
|
||||
return {
|
||||
visible: false
|
||||
}
|
||||
},
|
||||
mounted () {},
|
||||
methods: {
|
||||
open () {
|
||||
this.visible = true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
|
@ -60,13 +60,22 @@
|
|||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { reqMyCourseList } from '@/api/mycourse/index'
|
||||
import { reqMyCourseList, reqMyTrainPlanCourse } from '@/api/mycourse/index'
|
||||
import { dictGet } from '@/api/project/project'
|
||||
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
|
||||
import { dictToTree } from '@/utils/util'
|
||||
import { STable, SearchCom } from '@/components'
|
||||
import MycourseDetail from './MycourseDetail.vue'
|
||||
export default {
|
||||
props: {
|
||||
type: {
|
||||
type: Number,
|
||||
default: 1 // 展示数据的内容 1: 我的课程 2: 计划中的我的课程
|
||||
},
|
||||
planId: {
|
||||
type: [String, Number],
|
||||
required: false,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
STable,
|
||||
SearchCom,
|
||||
|
@ -142,9 +151,14 @@ export default {
|
|||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
loadData: parameter => {
|
||||
let req = reqMyCourseList
|
||||
const { person } = this.$store.state.user
|
||||
const params = { ...parameter, ...this.queryParam, personId: person.id }
|
||||
return reqMyCourseList(params).then(res => {
|
||||
if (this.type === 2 && this.planId) {
|
||||
params.id = this.planId
|
||||
req = reqMyTrainPlanCourse
|
||||
}
|
||||
return req(params).then(res => {
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
|
|
@ -9,24 +9,15 @@
|
|||
:data="loadDataYear"
|
||||
:rowKey="record => record.id"
|
||||
>
|
||||
<template slot="name" slot-scope="text, record">
|
||||
<a-button @click="handlerDetail(record)" type="link" style="padding: 0;">
|
||||
{{ record.name }}
|
||||
</a-button>
|
||||
</template>
|
||||
<span slot="state" slot-scope="text, record">
|
||||
<a-tag v-if="record.state === 1" color="blue">进行中</a-tag>
|
||||
<a-tag v-if="record.state === 2" color="red">已过期</a-tag>
|
||||
</span>
|
||||
<!-- <span slot="action" slot-scope="text, record">
|
||||
<a-popconfirm
|
||||
v-if="record.state === 1"
|
||||
:title="`确定要添加${record.name}课程吗?`"
|
||||
ok-text="添加"
|
||||
cancel-text="取消"
|
||||
@confirm="handlerAddCourse(record)"
|
||||
>
|
||||
<a>添加课程</a>
|
||||
</a-popconfirm>
|
||||
<a v-if="record.state === 2" @click="handlerContinue(record)">继续学习</a>
|
||||
<a v-if="record.state === 3">已完成学习</a>
|
||||
<a v-if="record.state === 4">课程已经结束</a>
|
||||
</span> -->
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="单位培训计划">
|
||||
|
@ -41,34 +32,25 @@
|
|||
<a-tag v-if="record.state === 1" color="blue">进行中</a-tag>
|
||||
<a-tag v-if="record.state === 2" color="red">已过期</a-tag>
|
||||
</span>
|
||||
<!-- <span slot="action" slot-scope="text, record">
|
||||
<a-popconfirm
|
||||
v-if="record.state === 1"
|
||||
:title="`确定要添加${record.name}课程吗?`"
|
||||
ok-text="添加"
|
||||
cancel-text="取消"
|
||||
@confirm="handlerAddCourse(record)"
|
||||
>
|
||||
<a>添加课程</a>
|
||||
</a-popconfirm>
|
||||
<a v-if="record.state === 2" @click="handlerContinue(record)">继续学习</a>
|
||||
<a v-if="record.state === 3">已完成学习</a>
|
||||
</span> -->
|
||||
</s-table>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
<CourseListByPlanDialogVue ref="dialog" :planId="planId"></CourseListByPlanDialogVue>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CourseListByPlanDialogVue from './CourseListByPlanDialog.vue'
|
||||
import { reqMyTrainPlanList } from '@/api/mycourse/index'
|
||||
import { STable } from '@/components'
|
||||
export default {
|
||||
components: {
|
||||
STable
|
||||
STable,
|
||||
CourseListByPlanDialogVue
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
planId: '', // 当前详情选中的planId
|
||||
dataListYear: [],
|
||||
dataListUnit: [],
|
||||
activeTab: '1',
|
||||
|
@ -135,8 +117,9 @@ export default {
|
|||
}
|
||||
},
|
||||
// 点击详情
|
||||
handlerDetail () {
|
||||
this.$refs.aycourseDetail.visible = true
|
||||
handlerDetail (data) {
|
||||
this.planId = data.id
|
||||
this.$refs.dialog.open()
|
||||
},
|
||||
handlerAddCourse (row) {
|
||||
const _this = this
|
||||
|
|
|
@ -30,12 +30,12 @@
|
|||
cancel-text="取消"
|
||||
@confirm="handlerAddCourse(item)"
|
||||
>
|
||||
<a>添加课程</a>
|
||||
<a style="width: 100px;display: inline-block;">添加课程</a>
|
||||
</a-popconfirm>
|
||||
<a v-if="item.status === 2" slot="actions" @click="handlerContinue(item)">
|
||||
<a v-if="item.status === 2" slot="actions" @click="handlerContinue(item)" style="width: 100px;display: inline-block;">
|
||||
继续学习
|
||||
</a>
|
||||
<a v-if="item.status === 3" slot="actions">已完成学习</a>
|
||||
<a v-if="item.status === 3" slot="actions" style="width: 100px;display: inline-block;">已完成学习</a>
|
||||
<a-list-item-meta :title="item.name"></a-list-item-meta>
|
||||
<div style="width: 200px;">
|
||||
<a-progress :percent="item.schedule" />
|
||||
|
@ -50,16 +50,6 @@
|
|||
<a-card :bordered="false" title="培训计划" :style="{ height: '100%' }">
|
||||
<a-list class="demo-loadmore-list" item-layout="horizontal" :data-source="pxjhList">
|
||||
<a-list-item slot="renderItem" slot-scope="item">
|
||||
<!-- <a-popconfirm
|
||||
v-if="item.status === 1"
|
||||
slot="actions"
|
||||
:title="`确定要添加${item.name}课程吗?`"
|
||||
ok-text="添加"
|
||||
cancel-text="取消"
|
||||
@confirm="handlerAddCourse(item)"
|
||||
>
|
||||
<a>添加课程</a>
|
||||
</a-popconfirm> -->
|
||||
<div slot="actions">
|
||||
<a-tag v-if="item.state === 1" color="blue">进行中</a-tag>
|
||||
<a-tag v-if="item.state === 2" color="red">已过期</a-tag>
|
||||
|
@ -68,7 +58,11 @@
|
|||
继续学习
|
||||
</a>
|
||||
<a v-if="item.status === 3" slot="actions">已完成学习</a> -->
|
||||
<a-list-item-meta :title="item.name"></a-list-item-meta>
|
||||
<a-list-item-meta>
|
||||
<template slot="title">
|
||||
<a-button @click="handlerCourseDetail(item)" type="link" style="padding: 0;">{{ item.name }}</a-button>
|
||||
</template>
|
||||
</a-list-item-meta>
|
||||
<div style="width: 200px;">
|
||||
{{ item.startDate | dateFormat }}
|
||||
</div>
|
||||
|
@ -165,6 +159,7 @@
|
|||
</a-col>
|
||||
<!-- 公告 end -->
|
||||
<CentralizedTrainingDetail ref="centralizedTrainingDetail"></CentralizedTrainingDetail>
|
||||
<CourseListByPlanDialogVue ref="planDialog" :planId="planId"></CourseListByPlanDialogVue>
|
||||
</a-row>
|
||||
</template>
|
||||
|
||||
|
@ -181,12 +176,14 @@ import {
|
|||
import { noticePage } from '@/api/notice/notice'
|
||||
import { getMyexamCount } from '@/api/myexamCount/index.js'
|
||||
import CentralizedTrainingDetail from '@/views/mycourse/mycourseList/CentralizedTrainingDetail.vue'
|
||||
import CourseListByPlanDialogVue from '../mycourse/mycourseList/CourseListByPlanDialog.vue'
|
||||
|
||||
export default {
|
||||
props: {},
|
||||
components: { CentralizedTrainingDetail },
|
||||
components: { CentralizedTrainingDetail, CourseListByPlanDialogVue },
|
||||
data () {
|
||||
return {
|
||||
planId: '', // 培训计划选中的id
|
||||
courseList: [],
|
||||
pxjhList: [],
|
||||
sysList: [],
|
||||
|
@ -205,6 +202,11 @@ export default {
|
|||
this.initData()
|
||||
},
|
||||
methods: {
|
||||
// 打开培训计划明细弹出框
|
||||
handlerCourseDetail (data) {
|
||||
this.planId = data.id
|
||||
this.$refs.planDialog.open()
|
||||
},
|
||||
initData () {
|
||||
this.getCourseList()
|
||||
this.getPxjhList()
|
||||
|
|
|
@ -72,7 +72,7 @@ export default {
|
|||
data () {
|
||||
return {
|
||||
query: {},
|
||||
activeTab: '',
|
||||
activeTab: '1',
|
||||
viewReport: {}, // 答题报告
|
||||
questionList: [],
|
||||
viewResolution: [] // 答题解析
|
||||
|
@ -81,7 +81,7 @@ export default {
|
|||
mounted () {
|
||||
const query = this.$route.query
|
||||
this.query = query
|
||||
this.activeTab = String(query.index) || '1'
|
||||
this.activeTab = query.index && String(query.index) || '1'
|
||||
// if (query.type === 'practice') {
|
||||
this.getAnswerViewReport()
|
||||
this.getAnswerViewResolution()
|
||||
|
|
Loading…
Reference in New Issue