字典调整
This commit is contained in:
commit
a0c1e79469
|
@ -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,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="table-page-search-wrapper">
|
||||
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
|
||||
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
|
||||
<a-button type="primary">导出</a-button>
|
||||
<!-- <a-button type="primary">导出</a-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.pageNum) || 1">
|
||||
|
@ -16,9 +16,9 @@
|
|||
<a-menu-item v-if="hasPerm('archives:project:user:list')">
|
||||
<a href="javascript:;" @click="archivesProjectUser(record)">人员记录</a>
|
||||
</a-menu-item>
|
||||
<a-menu-item>
|
||||
<!-- <a-menu-item>
|
||||
<a href="javascript:;" @click="exportData(record)">导出</a>
|
||||
</a-menu-item>
|
||||
</a-menu-item> -->
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
@ -37,7 +37,7 @@ export default {
|
|||
return {
|
||||
queryParam: { trainClass: '', trainWay: '', projectName: '' },
|
||||
columns: [
|
||||
{ title: '项目ID', width: '60px', align: 'center', dataIndex: 'id', key: 'id' },
|
||||
// { title: '项目ID', width: '60px', align: 'center', dataIndex: 'id', key: 'id' },
|
||||
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'name', key: 'name' },
|
||||
{ title: '项目时间', width: 'auto', align: 'center', dataIndex: 'time', key: 'time' },
|
||||
{ title: '项目类别', width: 'auto', align: 'center', dataIndex: 'way', key: 'way' },
|
||||
|
|
|
@ -38,7 +38,7 @@ export default {
|
|||
data() {
|
||||
// 这里存放数据
|
||||
return {
|
||||
queryParam: { state: '', userName: '' },
|
||||
queryParam: {id:this.$route.query.projectId}, //state: '', userName: ''
|
||||
columns: [
|
||||
{ title: '姓名', width: '100px', align: 'center', dataIndex: 'name', key: 'name' },
|
||||
{ title: '单位信息', width: 'auto', align: 'center', dataIndex: 'dwOrgName', key: 'dwOrgName' },
|
||||
|
@ -101,7 +101,7 @@ export default {
|
|||
path: '/archives/project/ProjectUserCourse', query: {
|
||||
projectId: this.$route.query.id,
|
||||
userId: record.id,
|
||||
queryParamState: this.queryParam.state,
|
||||
queryParamState: this.queryParam.testState,
|
||||
queryParamUserName: this.queryParam.userName,
|
||||
pageNum1: this.$refs.table.localPagination.current,
|
||||
|
||||
|
|
|
@ -61,7 +61,9 @@ export default {
|
|||
|
||||
// 答题记录
|
||||
archivesProjectUserAnswerDateil(record) {
|
||||
console.log('详情',record);
|
||||
|
||||
this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: record.reportId } })
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@ export default {
|
|||
{ title: '总题量', width: '80px', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' },
|
||||
{ title: '已答题量', width: '100px', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
|
||||
{ title: '答对题量', width: '90px', align: 'center', dataIndex: 'yesExercises', key: 'yesExercises' },
|
||||
{ title: '答对正确率', width: '90px', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' },
|
||||
{ title: '答对正确率', width: '90px', align: 'center', dataIndex: 'yesRate', key: 'yesRate' },
|
||||
{
|
||||
title: '完成状态', width: '80px', align: 'center', dataIndex: 'finishState', key: 'finishState', customRender: (text, record, index) => {
|
||||
// 完成状态 0-未完成 1-已完成
|
||||
|
@ -61,6 +61,9 @@ export default {
|
|||
close() {
|
||||
this.$router.push({
|
||||
path: '/archives/project/ProjectUser', query: {
|
||||
projectId:this.$route.query.projectId,
|
||||
userId:this.$route.query.userId,
|
||||
|
||||
queryParamState: this.$route.query.queryParamState,
|
||||
queryParamUserName: this.$route.query.queryParamUserName,
|
||||
pageNum1: this.$route.query.pageNum1,
|
||||
|
|
|
@ -88,8 +88,17 @@ export default {
|
|||
queryParam: { projectName: this.$route.query.archivesUserProjectTable2projectName || '' },
|
||||
columns: [
|
||||
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'projectName', key: 'projectName' },
|
||||
{ title: '项目时间', width: 'auto', align: 'center', dataIndex: 'projectData', key: 'projectData' },
|
||||
{ title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' },
|
||||
{
|
||||
title: '项目时间',
|
||||
width: 'auto',
|
||||
align: 'center',
|
||||
dataIndex: 'startDate',
|
||||
key: 'startDate',
|
||||
customRender: (text, record, index) => {
|
||||
return record.startDate + ' - ' + record.endDate
|
||||
},
|
||||
},
|
||||
// { title: '受训角色', width: 'auto', align: 'center', dataIndex: 'roleName', key: 'roleName' },
|
||||
{ title: '培训地址', width: 'auto', align: 'center', dataIndex: 'trainAddr', key: 'trainAddr' },
|
||||
{ title: '签到时间', width: 'auto', align: 'center', dataIndex: 'signInTime', key: 'signInTime' },
|
||||
{
|
||||
|
@ -100,7 +109,7 @@ export default {
|
|||
},
|
||||
{ title: '操作', width: '90px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
|
||||
],
|
||||
loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.tabs2.queryParam)).then(res => { return res }) }
|
||||
loadData: parameter => { return getArchivesUserTerminalTrainList(Object.assign(parameter, this.tabs2.queryParam, {personId : this.personId})).then(res => { return res }) }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -177,6 +186,8 @@ export default {
|
|||
path: '/archives/user/TerminalTrainDetail', query: {
|
||||
personId: this.personId,
|
||||
projectId: record.id,
|
||||
signInTime: record.signInTime,
|
||||
state: record.finishState,
|
||||
archivesUserName: this.$route.query.archivesUserName,
|
||||
archivesUserOrgId: this.$route.query.archivesUserOrgId,
|
||||
archivesUserPageNum: this.$route.query.archivesUserPageNum,
|
||||
|
|
|
@ -19,9 +19,9 @@ export default {
|
|||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
userId: this.$route.query.userId,
|
||||
personId: this.$route.query.personId,
|
||||
projectId: this.$route.query.projectId,
|
||||
queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId },
|
||||
queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId },
|
||||
columns: [
|
||||
{ title: '交卷时间', width: 'auto', align: 'center', dataIndex: 'handDate', key: 'handDate' },
|
||||
{ title: '考试时长', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' },
|
||||
|
@ -47,6 +47,9 @@ export default {
|
|||
defaultActiveKey: this.$route.query.defaultActiveKey
|
||||
}
|
||||
});
|
||||
},
|
||||
trainDetail (record) {
|
||||
this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: record.reportId } })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
|||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId, courseName: '' },
|
||||
queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId, courseName: '' },
|
||||
columns: [
|
||||
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||
{ title: '应修学时', width: 'auto', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' },
|
||||
|
@ -26,7 +26,7 @@ export default {
|
|||
{ title: '总题量', width: 'auto', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' },
|
||||
{ title: '已答题量', width: 'auto', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
|
||||
{ title: '答对题量', width: 'auto', align: 'center', dataIndex: 'yesExercises', key: 'yesExercises' },
|
||||
{ title: '答对正确率', width: 'auto', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' },
|
||||
{ title: '答对正确率', width: 'auto', align: 'center', dataIndex: 'yesRate', key: 'yesRate' },
|
||||
{
|
||||
title: '完成状态', width: 'auto', align: 'center', dataIndex: 'finishState', key: 'finishState', customRender: (text, record, index) => {
|
||||
// 完成状态 0-未完成 1-已完成
|
||||
|
@ -46,7 +46,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleRefresh() {
|
||||
this.queryParam.userId = this.$route.query.userId;
|
||||
this.queryParam.personId = this.$route.query.personId;
|
||||
this.queryParam.projectId = this.$route.query.projectId;
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
|
@ -54,7 +54,7 @@ export default {
|
|||
close() {
|
||||
this.$router.push({
|
||||
path: '/archives/user/Project', query: {
|
||||
id: this.$route.query.userId,
|
||||
id: this.$route.query.personId,
|
||||
archivesUserName: this.$route.query.archivesUserName,
|
||||
archivesUserOrgId: this.$route.query.archivesUserOrgId,
|
||||
archivesUserPageNum: this.$route.query.archivesUserPageNum,
|
||||
|
|
|
@ -18,7 +18,7 @@ export default {
|
|||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
queryParam: { userId: this.$route.query.userId, courseName: '' },
|
||||
queryParam: { personId: this.$route.query.personId, courseName: '' },
|
||||
columns: [
|
||||
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||
{ title: '课时(分)', width: 'auto', align: 'center', dataIndex: 'classHour', key: 'classHour' },
|
||||
|
@ -36,7 +36,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleRefresh() {
|
||||
this.queryParam.userId = this.$route.query.userId;
|
||||
this.queryParam.personId = this.$route.query.personId;
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
// 返回 按钮
|
||||
|
|
|
@ -29,19 +29,24 @@ import { getArchivesUserTerminalTrainDetail } from '@/api/archives/user'
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
queryParam: { userId: this.$route.query.userId, projectId: this.$route.query.projectId },
|
||||
queryParam: { personId: this.$route.query.personId, projectId: this.$route.query.projectId },
|
||||
detailData: {}
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
let parameter = {};
|
||||
getArchivesUserTerminalTrainDetail(Object.assign(parameter, this.queryParam)).then(res => { this.detailData = res.data });
|
||||
getArchivesUserTerminalTrainDetail(Object.assign(parameter, this.queryParam)).then(res => {
|
||||
this.detailData = res.data
|
||||
this.detailData.signInTime = this.$route.query.signInTime
|
||||
this.detailData.state = this.$route.query.state == 1 ? '已完成' : '未完成'
|
||||
});
|
||||
|
||||
},
|
||||
methods: {
|
||||
close() {
|
||||
this.$router.push({
|
||||
path: '/archives/user/Project', query: {
|
||||
id: this.$route.query.userId,
|
||||
id: this.$route.query.personId,
|
||||
archivesUserName: this.$route.query.archivesUserName,
|
||||
archivesUserOrgId: this.$route.query.archivesUserOrgId,
|
||||
archivesUserPageNum: this.$route.query.archivesUserPageNum,
|
||||
|
|
|
@ -19,14 +19,15 @@ export default {
|
|||
components: { STable, SearchCom },
|
||||
data() {
|
||||
return {
|
||||
queryParam: { userId: this.$route.query.userId, courseName: '' },
|
||||
personId: this.$route.query.id,
|
||||
queryParam: { courseName: '' },
|
||||
columns: [
|
||||
{ title: '违章编号', width: 'auto', align: 'center', dataIndex: 'id', key: 'id' },
|
||||
{ title: '违章编号', width: 'auto', align: 'center', dataIndex: 'violationCode', key: 'violationCode' },
|
||||
{ title: '违章时间', width: 'auto', align: 'center', dataIndex: 'time', key: 'time' },
|
||||
{ title: '违章内容', width: 'auto', align: 'center', dataIndex: 'content', key: 'content' },
|
||||
{ title: '违章课时', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'courseName' },
|
||||
],
|
||||
loadData: parameter => { return getArchivesUserViolationList(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
|
||||
loadData: parameter => { return getArchivesUserViolationList(Object.assign(parameter, this.queryParam, {personId : this.personId})).then(res => { return res }) }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -38,7 +39,6 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
handleRefresh() {
|
||||
this.queryParam.userId = this.userId;
|
||||
this.$refs.table.refresh(true)
|
||||
},
|
||||
// 返回 按钮
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<!-- 课程类别 -->
|
||||
<a-col :span="9" :offset="3">
|
||||
<a-form-model-item label="课程类别" :label-col="{ span: 8 }" :wrapper-col="{ span: 12 }">
|
||||
<a-tree-select v-model="form.courseType" :tree-data="dictCourseType" placeholder="请选择课程类别"></a-tree-select>
|
||||
<a-tree-select v-model="form.courseType" :replaceFields="replaceFields" :tree-data="dictCourseType" placeholder="请选择课程类别"></a-tree-select>
|
||||
|
||||
<!-- <a-select v-model="form.courseType" placeholder="--请选择--">
|
||||
<a-select-option v-for="(item, index) in dictCourseType" :key="index" :value="item.value">
|
||||
|
@ -104,6 +104,7 @@
|
|||
|
||||
|
||||
<script>
|
||||
import { coursewareClassList } from '@/api/course/courseware'
|
||||
import { courseAdd, getCourseDetails } from '@/api/course/course'
|
||||
import storage from 'store'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
@ -115,6 +116,7 @@ export default {
|
|||
name: 'step1',
|
||||
data() {
|
||||
return {
|
||||
replaceFields:{children:'children', title:'name', key:'id', value: 'value' },
|
||||
pageName: this.$route.query.id ? '课程编辑' : '课程新增',
|
||||
dataValue: 1,
|
||||
form: {
|
||||
|
@ -132,6 +134,7 @@ export default {
|
|||
dictCourseType: [], // 课程类别
|
||||
industry: [],
|
||||
dictCourseTag: [],
|
||||
treeDataOne:[]
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -140,6 +143,7 @@ export default {
|
|||
getCourseDetails,
|
||||
},
|
||||
created() {
|
||||
this.getCourseTreeData(0) //进来首先获取系统课程
|
||||
this.dictionaryDropDown()
|
||||
if(this.$route.query.id) this.loadData();
|
||||
},
|
||||
|
@ -147,6 +151,7 @@ export default {
|
|||
methods: {
|
||||
//加载数据
|
||||
loadData() {
|
||||
this.getCourseTreeData(0)
|
||||
if (this.$route.query.id) {
|
||||
getCourseDetails({ id: this.$route.query.id }).then((res) => {
|
||||
this.form = res.data
|
||||
|
@ -179,10 +184,10 @@ export default {
|
|||
this.industry = res.data
|
||||
})
|
||||
// 课程类别
|
||||
dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
|
||||
// dictionaryDropDown({ dictionaryCode: '0006' }).then((res) => {
|
||||
// 词典转树结构
|
||||
this.dictCourseType = dictToTree(res.data, [], 0)
|
||||
})
|
||||
// this.dictCourseType = dictToTree(res.data, [], 0)
|
||||
// })
|
||||
// 人员类型
|
||||
dictionaryDropDown({ dictionaryCode: '0005' }).then((res) => {
|
||||
this.dictPerson = res.data
|
||||
|
@ -209,6 +214,29 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
|
||||
//获取课程分类数据,转换成树结构
|
||||
getCourseTreeData(type) {
|
||||
coursewareClassList({ type: type }).then((res) => {
|
||||
//list转🌲
|
||||
const list2tree1 = (list, parentId) => {
|
||||
return list.filter((item) => {
|
||||
// 默认选中第一个节点
|
||||
if (!this.treeDataOne) this.treeDataOne.push(item.value)
|
||||
if (item.parentId === parentId) {
|
||||
item.children = list2tree1(list, item.id)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
}
|
||||
this.dictCourseType = list2tree1(res.data, 0)
|
||||
console.log("dict",this.dictCourseType);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
//标签选择器
|
||||
handleTagChange(value) {
|
||||
this.form.tags = value
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
</a-button>
|
||||
</a-upload>
|
||||
</div>
|
||||
<a-progress :percent="schedule" v-if="schedule > 0" />
|
||||
</a-card>
|
||||
</div>
|
||||
</a-tab-pane>
|
||||
|
|
|
@ -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]
|
||||
}
|
||||
// 课件视频展现
|
||||
|
|
|
@ -54,7 +54,7 @@ export default {
|
|||
},
|
||||
columns: [
|
||||
{ title: '资料名称', width: '160px', align: 'center', dataIndex: 'name', key: 'name' },
|
||||
{ title: '资料分类', width: 'auto', align: 'center', dataIndex: 'classifyName', key: 'classifyName' },
|
||||
// { title: '资料分类', width: 'auto', align: 'center', dataIndex: 'classifyName', key: 'classifyName' },
|
||||
{ title: '资料大小', width: 'auto', align: 'center', dataIndex: 'sizeStr', key: 'sizeStr' },
|
||||
{ title: '资料类型', width: '160px', align: 'center', dataIndex: 'typeName', key: 'typeName' },
|
||||
{ title: '操作', key: 'operation', width: '300px', align: 'center', scopedSlots: { customRender: 'action' } },
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -262,7 +262,7 @@ export default {
|
|||
const list2tree1 = (list, parentId) => {
|
||||
return list.filter((item) => {
|
||||
// 默认选中第一个节点
|
||||
if (this.treeDataOne) this.treeDataOne.push(item.value)
|
||||
if (!this.treeDataOne) this.treeDataOne.push(item.value)
|
||||
if (item.parentId === parentId) {
|
||||
item.children = list2tree1(list, item.id)
|
||||
return true
|
||||
|
|
|
@ -53,7 +53,7 @@ export default {
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
queryParam: { dictionaryName: null, dictionaryCode: null, status: 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' }
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue