Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop

This commit is contained in:
18571350067 2022-03-29 16:46:25 +08:00
commit c1aa1f7abc
12 changed files with 102 additions and 61 deletions

View File

@ -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,

View File

@ -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]
}
//

View File

@ -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()
}
},

View File

@ -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>

View File

@ -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
})
},

View File

@ -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

View File

@ -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()

View File

@ -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()

View File

@ -13,11 +13,11 @@
</a-form-model-item>
<a-form-model-item label="培训时间" style="margin-bottom: 0">
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="trainSdate">
<a-date-picker v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
<a-date-picker show-time v-model="form.trainSdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-model-item>
<span :style="{ display: 'inline-block', width: '24px', textAlign: 'center' }"> - </span>
<a-form-model-item :style="{ display: 'inline-block', width: 'calc(50% - 12px)' }" prop="trainEdate">
<a-date-picker v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
<a-date-picker show-time v-model="form.trainEdate" style="width: 100%" valueFormat="YYYY-MM-DD HH:mm:ss" />
</a-form-model-item>
</a-form-model-item>
<a-form-model-item label="培训地点" prop="trainAddress">

View File

@ -53,7 +53,7 @@ export default {
},
data () {
return {
queryParam: { dictionaryName: null, dictionaryCode: null, status: null, createTime: null },
queryParam: { dictionaryName: null, dictionaryCode: null },
selectedRowKeys: [], // key
selectedRows: [], //
columns: [
@ -70,7 +70,6 @@ export default {
},
computed: {
queryOptions: function () {
const list = [{ 'value': 1, 'name': '类型1' }, { 'value': 2, 'name': '类型2' }]
return [
{ type: 'input', placeholder: '词典名称', key: 'dictionaryName' }
]

View File

@ -17,7 +17,7 @@
</a-row>
<a-row>
<a-col :span="12">
<a-form-model-item ref="parentid" label="所属上级" prop="parentid">
<a-form-model-item ref="parentid" label="上级编号" prop="parentid">
<a-input-number v-if="operable" v-model="form.parentid" :min="0"/>
<span v-else>{{ form.parentid }}</span>
</a-form-model-item>

View File

@ -66,10 +66,11 @@ export default {
selectedRowKeys: [], // key
selectedRows: [], //
columns: [
{ title: '编号', width: 30, dataIndex: 'id', key: 'id' },
{ title: '词典项名称', width: 30, dataIndex: 'name', key: 'name' },
{ title: '词典项值', width: 30, dataIndex: 'value', key: 'value' },
{ title: '词典标识', width: 30, dataIndex: 'dictionaryCode', key: 'dictionaryCode' },
{ title: '上级', width: 30, dataIndex: 'parentid', key: 'parentid' },
{ title: '上级编号', width: 30, dataIndex: 'parentid', key: 'parentid' },
{ title: '排序', width: 30, dataIndex: 'sortid', key: 'sortid' }
],
loadData: parameter => {