mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-20 00:06:45 +08:00
Merge remote-tracking branch 'aly/master'
This commit is contained in:
@@ -240,6 +240,7 @@ import weikeContent from "@/components/Course/weikeContent.vue";
|
||||
import catalogCourseware from "@/components/Course/catalogCourseware.vue";
|
||||
import apiCourse from "@/api/modules/course.js";
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import apiUser from '../../api/system/user.js';
|
||||
import scene from "../../api/modules/scene.js";
|
||||
import exam from "@/components/Course/exam";
|
||||
import homework from "@/components/Course/homework";
|
||||
@@ -599,6 +600,21 @@ export default {
|
||||
this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//根据课程创建者获取机构id
|
||||
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
||||
if(ors.status==200){
|
||||
$this.courseInfo.orgId=ors.result.id;
|
||||
apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//
|
||||
}
|
||||
})
|
||||
}
|
||||
this.teacherList = rs.result.teachers;
|
||||
this.teacherName = rs.result.teachers;
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
<script>
|
||||
import apiCoursePortal from "@/api/modules/coursePortal.js";
|
||||
import apiOrg from '../../api/system/organiza.js';
|
||||
import apiUser from '@/api/system/user.js';
|
||||
import exam from "@/components/Course/exam";
|
||||
import homework from "@/components/Course/homework";
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
@@ -639,6 +640,21 @@ export default {
|
||||
this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//根据课程创建者获取机构id
|
||||
apiUser.getOrgSimpleByUserId(this.courseInfo.sysCreateAid).then(ors=>{
|
||||
if(ors.status==200){
|
||||
$this.courseInfo.orgId=ors.result.id;
|
||||
apiOrg.getSimple(ors.result.id).then(rrs=>{
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
//
|
||||
}
|
||||
})
|
||||
}
|
||||
if(rs.result.course.coverImg !== '') {
|
||||
this.courseCoverurl = this.fileBaseUrl + rs.result.course.coverImg;
|
||||
|
||||
@@ -333,6 +333,7 @@
|
||||
import pdfPreview from "@/components/PdfPreview/index.vue";
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
import videoPlayer from '@/components/VideoPlayer/index.vue';
|
||||
import { deepClone, param } from "../../utils";
|
||||
export default{
|
||||
props: {
|
||||
reset:{
|
||||
@@ -389,6 +390,7 @@
|
||||
setupTage:0,
|
||||
},
|
||||
homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3},
|
||||
homeworkChange:{},
|
||||
exam:{
|
||||
courseId:'',
|
||||
contentId:'',
|
||||
@@ -408,7 +410,9 @@
|
||||
info:'',//考试说明
|
||||
paperContent:'',//试题的json字符串
|
||||
},
|
||||
examChange:{},
|
||||
onlyQuestion:true,
|
||||
examPaperChange:{},
|
||||
examPaper:{items:[]},
|
||||
assess:{
|
||||
countType:'权重配置',
|
||||
@@ -515,6 +519,7 @@
|
||||
apiCourse.getHomework(this.content.id).then(res=>{
|
||||
if(res.status==200){
|
||||
this.homework=res.result;
|
||||
this.homeworkChange = deepClone(res.result);
|
||||
}else if(res.status==404){
|
||||
//没有找到作业信息
|
||||
}else{
|
||||
@@ -527,6 +532,8 @@
|
||||
if(res.status==200){
|
||||
this.exam=res.result;
|
||||
this.examPaper=JSON.parse(res.result.paperContent);
|
||||
this.examChange = deepClone(res.result);
|
||||
this.examPaperChange = deepClone(JSON.parse(res.result.paperContent));
|
||||
}else if(res.status==404){
|
||||
//没有找到作业信息
|
||||
}else{
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<div @click="checkCourse"><weikeContent :reset="weikeReset" :contents="contentInfo.list" :course="courseInfo" min-height="644px"></weikeContent></div>
|
||||
<div @click="checkCourse"><weikeContent ref="weikeContent" :reset="weikeReset" :contents="contentInfo.list" :course="courseInfo" min-height="644px"></weikeContent></div>
|
||||
</el-col>
|
||||
<!-- <el-form-item label="完成规则" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.passFormula" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
||||
<!-- <el-form-item label="开放权限" v-if="!weike.onlyRequired"><el-input maxlength="50" v-model="courseInfo.openObject" placeholder="可基于组织树或受众选择"></el-input></el-form-item> -->
|
||||
@@ -177,6 +177,7 @@
|
||||
|
||||
<div style="padding-right: 30px;"><div></div></div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="red-tip">注:有分项内容保存的,请先保存分项内容再提交</span>
|
||||
<el-checkbox style="margin-right:10px" v-if="curCourseId != ''" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878;">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
||||
<!-- <el-button v-if="curCourseId!='' && contentInfo.list.length>0">预览</el-button> -->
|
||||
<el-button :loading="btnLoading" v-if="curCourseId != ''" :disabled="!checked" @click="submitCourse()" type="primary">提交审核</el-button>
|
||||
@@ -342,12 +343,13 @@
|
||||
</div>
|
||||
</el-aside>
|
||||
<el-main style="padding: 0px;">
|
||||
<catalog-courseware :reset="onlineReset" :content="curContent" :course="courseInfo" @save="saveCurContent" @remove="delCurContent"></catalog-courseware>
|
||||
<catalog-courseware ref="courseware" :reset="onlineReset" :content="curContent" :course="courseInfo" @save="saveCurContent" @remove="delCurContent"></catalog-courseware>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<span class="red-tip">注:有分项内容保存的,请先保存分项内容再提交</span>
|
||||
<el-checkbox v-if="curCourseId != ''" style="margin-right:10px" v-model="checked"></el-checkbox><span v-if="curCourseId != ''" style="font-size:14px;color:#787878">我已阅读并遵守<span style="color:#588afc;margin-right:10px;cursor: pointer;" @click="courseInfoFormCheckedShow = true">平台内容发布要求</span></span>
|
||||
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'base'" type="primary" @click="saveAndNext(2)">保存并下一步</el-button>
|
||||
<el-button :loading="btnLoading" v-if="biaoke.tabIndex == 'content'" type="primary" @click="previousStep()">上一步</el-button>
|
||||
@@ -431,6 +433,7 @@ export default {
|
||||
btnLoading: false,
|
||||
requireSaveCourse: false,
|
||||
orgName:'',
|
||||
orgNamePath:'',
|
||||
orgKid:'',
|
||||
courseInfo: {
|
||||
id: '',
|
||||
@@ -676,6 +679,7 @@ export default {
|
||||
if(rrs.status==200){
|
||||
this.orgName=rrs.result.name;
|
||||
this.orgKid=rrs.result.kid;
|
||||
this.orgNamePath=rrs.result.namePath;
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -685,7 +689,6 @@ export default {
|
||||
this.weikeReset = editData.id;
|
||||
this.onlineReset = editData.id;
|
||||
//console.log("编辑课程?");
|
||||
this.orgName=editData.orgName;
|
||||
this.courseInfo.orgId=editData.orgId;
|
||||
this.curCourseId = editData.id; //设置
|
||||
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
||||
@@ -788,6 +791,7 @@ export default {
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
$this.orgNamePath=rrs.result.namePath;
|
||||
}
|
||||
})
|
||||
}else{
|
||||
@@ -800,6 +804,7 @@ export default {
|
||||
if(rrs.status==200){
|
||||
$this.orgName=rrs.result.name;
|
||||
$this.orgKid=rrs.result.kid;
|
||||
$this.orgNamePath=rrs.result.namePath;
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -824,7 +829,7 @@ export default {
|
||||
if(result.course.sysType3!='' && result.course.sysType3!='0'){
|
||||
this.sysTypeList.push(result.course.sysType3);
|
||||
}
|
||||
console.log(this.sysTypeList,'this.sysTypeList');
|
||||
//console.log(this.sysTypeList,'this.sysTypeList');
|
||||
//受众处理,crowds
|
||||
let crowdList=[];
|
||||
if(result.crowds && result.crowds.length>0){
|
||||
@@ -1098,13 +1103,109 @@ export default {
|
||||
this.btnLoading = false;
|
||||
});
|
||||
},
|
||||
// 判断是否有未保存的内容
|
||||
unsavedContent() {
|
||||
const courseware = this.$refs.courseware;
|
||||
console.log(courseware,'courseware');
|
||||
let pass = true;
|
||||
if(this.curContent.id == '') {// 新增
|
||||
if(this.curContent.contentType == 60) { // 判断作业是否保存
|
||||
if(courseware.homework.content || courseware.homework.name || courseware.homework.deadTime){
|
||||
pass = false;
|
||||
}
|
||||
} else if(this.curContent.contentType == 61) { //考试
|
||||
if(courseware.exam.paperContent != '') {
|
||||
pass = false;
|
||||
}
|
||||
if(courseware.examPaper.items.length >0) {
|
||||
pass = false;
|
||||
}
|
||||
}else if(this.curContent.contentType == 41) { //图文
|
||||
if(courseware.htmlContent.length > 7){
|
||||
pass = false;
|
||||
}
|
||||
}else if(this.curContent.contentType == 52) { //外部链接
|
||||
if(courseware.linkInfo.url != '') {
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
} else {// 编辑
|
||||
if(this.curContent.contentType == 60) { // 判断作业是否保存
|
||||
if(JSON.stringify(courseware.homeworkChange) !== JSON.stringify(courseware.homework)) {
|
||||
pass = false;
|
||||
}
|
||||
} else if(this.curContent.contentType == 61) { //考试
|
||||
if(courseware.exam.paperContent !== courseware.examChange.paperContent || JSON.stringify(courseware.examPaper) != JSON.stringify(courseware.examPaperChange)) {
|
||||
pass = false;
|
||||
}
|
||||
} else if(this.curContent.contentType == 41) { //图文
|
||||
if(this.curContent.content !== courseware.htmlContent) {
|
||||
pass = false;
|
||||
}
|
||||
} else if(this.curContent.contentType == 52) { //外部链接
|
||||
if(this.curContent.content !== JSON.stringify(courseware.linkInfo)) {
|
||||
pass = false;
|
||||
}
|
||||
} else if(this.curContent.contentType == 10 || this.curContent.contentType == 20) {// 视频
|
||||
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
|
||||
pass = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return pass;
|
||||
},
|
||||
unsavedWeiContent() {
|
||||
// console.log(this.contentInfo.list,'contentInfo.list');
|
||||
// console.log(this.courseInfo,'courseInfo');
|
||||
//console.log(this.$refs.weikeContent,'weikeContent');
|
||||
const courseware = this.$refs.weikeContent;
|
||||
//console.log(this.catalogTree,'this.catalogTree');
|
||||
if(courseware.cware.content.id==''){
|
||||
this.$message.error('无课件内容,请先添加课件内容保存后再提交');
|
||||
return false;
|
||||
}
|
||||
if(courseware.homework.show == 2) { // 作业
|
||||
this.$message.error('请先保存作业再提交');
|
||||
return false;
|
||||
}
|
||||
|
||||
let pass = true;
|
||||
if(courseware.homework.show == 2) { // 作业
|
||||
this.$message.error('请先保存作业再提交');
|
||||
return false;
|
||||
}
|
||||
if(courseware.assess.show == 2) { // 评估
|
||||
//this.$message.error('请先保存评估再提交');
|
||||
//return false;
|
||||
}
|
||||
if(courseware.exam.show == 3) { // 评估
|
||||
this.$message.error('请先保存考试再提交');
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
submitCourse() {
|
||||
console.log(this.courseInfo.orgId,'this.courseInfo.orgId');
|
||||
console.log(this.orgKid,'this.orgKid');
|
||||
if(!this.courseInfo.orgId || !this.orgKid){
|
||||
|
||||
if(this.biaoke.dlgShow && !this.unsavedContent()){
|
||||
this.$message.error('您有未保存的内容,请先保存');
|
||||
return;
|
||||
}
|
||||
if(this.weike.dlgShow && !this.unsavedWeiContent()){
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log(this.courseInfo.orgId,'this.courseInfo.orgId');
|
||||
//console.log(this.orgKid,'this.orgKid');
|
||||
if(!this.courseInfo.orgId){
|
||||
this.$message.error('请选择资源归属');
|
||||
return;
|
||||
}
|
||||
if(!this.orgKid){
|
||||
this.$message.error('资源归属无关联HRBP信息');
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log(this.resOwnerListMap[0],'this.resOwnerListMap[0]');
|
||||
//return;
|
||||
let ownerCode=this.resOwnerListMap[0].code;
|
||||
@@ -1206,6 +1307,7 @@ export default {
|
||||
kid:hrbpUser.user_id,
|
||||
orgId:hrbpUser.orgnization_id
|
||||
}
|
||||
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
|
||||
apiCourse.submitCourse(postData).then(res => {
|
||||
//this.btnLoading=false;
|
||||
setTimeout(function() {
|
||||
@@ -1335,6 +1437,13 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.red-tip{
|
||||
margin-top: 8px;
|
||||
color: red;
|
||||
font-size: 14px;
|
||||
float: left;
|
||||
font-weight: 600;
|
||||
}
|
||||
::v-deep .wei-from{
|
||||
.el-form-item{
|
||||
margin-bottom: 10px;
|
||||
|
||||
@@ -529,6 +529,7 @@
|
||||
import apiCourseFile from '../../api/modules/courseFile.js';
|
||||
import audioPlayer from '@/components/AudioPlayer/index.vue';
|
||||
import {getType} from '../../utils/tools.js';
|
||||
import { deepClone } from "../../utils";
|
||||
export default{
|
||||
components:{WxEditor,simplePaper,FileUpload,pdfPreview,audioPlayer},
|
||||
props: {
|
||||
@@ -576,6 +577,23 @@
|
||||
// {id:'5',type:'scorm',name:'SCORM(Q2)',img:'el-icon-suitcase',resType: 50},
|
||||
{id:'6',type:'link',name:'外部连接',img:'el-icon-link', resType: 52}
|
||||
],
|
||||
cwareChange:{
|
||||
show:1,//1表新添加,2表选择
|
||||
content:{id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''},
|
||||
findShow:false,//是否显示查询
|
||||
curType:{type:'jpg',name:''},//这一项要去掉的
|
||||
linkInfo:{
|
||||
openType:1,
|
||||
url:''
|
||||
},
|
||||
curriculumData:{
|
||||
url:'',
|
||||
isDrag:true,
|
||||
completeSetup:0,
|
||||
second:5,
|
||||
setupTage:0,
|
||||
},
|
||||
},
|
||||
cware:{
|
||||
show:1,//1表新添加,2表选择
|
||||
content:{id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''},
|
||||
@@ -609,6 +627,48 @@
|
||||
submitMode: 3,
|
||||
}
|
||||
},
|
||||
homeworkChange:{
|
||||
show:1,
|
||||
content:{id:'',contentType:60,sortIndex:2},
|
||||
dtime:'',
|
||||
info:{
|
||||
id:'',
|
||||
courseId: '',
|
||||
name:'',
|
||||
content:'',
|
||||
file:'',
|
||||
deadTime: '',
|
||||
submitMode: 3,
|
||||
}
|
||||
},
|
||||
examChange:{
|
||||
show:1,
|
||||
content:{id:'',contentType:61,sortIndex:3},
|
||||
paperJson:{items:[]},
|
||||
paperShow:false,
|
||||
customerShow:false,
|
||||
onlyQuestion:true,
|
||||
info:{
|
||||
courseId:'',
|
||||
contentId:'',
|
||||
testName:this.course.name,
|
||||
testDuration:30,
|
||||
showAnalysis:false,
|
||||
showAnswer:false,
|
||||
times:1,
|
||||
qnum:0,//试题数量,只是模式是随机生成试题时才会有
|
||||
arrange:0,
|
||||
scoringType:1,
|
||||
passLine:60,
|
||||
randomMode:false,
|
||||
percentScore:true,
|
||||
paperType:1,//自定义试卷
|
||||
paperId:'',//试卷的id,只有paperType为2的时间才会有值
|
||||
info:'',//考试说明
|
||||
paperContent:'',//试题的json字符串
|
||||
|
||||
}
|
||||
},
|
||||
exam:{
|
||||
show:1,
|
||||
content:{id:'',contentType:61,sortIndex:3},
|
||||
@@ -713,6 +773,7 @@
|
||||
$this.cware.curriculumData.url=con.content;
|
||||
}
|
||||
}
|
||||
$this.cwareChange = deepClone($this.cware);
|
||||
}else if(con.sortIndex==2){
|
||||
$this.homework.content=con;
|
||||
//查询作业信息,并显示
|
||||
@@ -758,6 +819,7 @@
|
||||
if(res.status==200){
|
||||
this.homework.info=res.result;
|
||||
this.homework.show=3;//显示作业内容
|
||||
this.homeworkChange = deepClone(this.homework);
|
||||
}else if(res.status==404){
|
||||
//没有找到作业信息
|
||||
this.homework.info.id='';
|
||||
@@ -773,6 +835,7 @@
|
||||
this.exam.info=res.result;
|
||||
this.exam.paperJson=JSON.parse(res.result.paperContent);
|
||||
this.exam.show=9;
|
||||
this.examChange = deepClone(this.exam);
|
||||
}else if(res.status==404){
|
||||
//没有找到作业信息
|
||||
//this.exam.paperJson={items:[]};
|
||||
@@ -890,22 +953,26 @@
|
||||
}
|
||||
if(index==1){
|
||||
postData.content=this.cware.content;
|
||||
this.cwareChange.content = deepClone(this.cware.content)
|
||||
if(this.cware.content.contentType==52){
|
||||
if(this.cware.linkInfo.url==''){
|
||||
this.$message.error("请填写外连URL地址");
|
||||
return;
|
||||
}
|
||||
postData.content.content=JSON.stringify(this.cware.linkInfo);
|
||||
this.cwareChange.linkInfo = deepClone(this.cware.linkInfo)
|
||||
}else if(this.cware.content.contentType==10 || this.cware.content.contentType==20){
|
||||
if(this.cware.curriculumData.url==''){
|
||||
this.$message.error("请选择课件");
|
||||
return;
|
||||
}
|
||||
postData.content.content=JSON.stringify(this.cware.curriculumData);
|
||||
this.cwareChange.curriculumData = deepClone(this.cware.curriculumData)
|
||||
}
|
||||
}else if(index==2){
|
||||
postData.content=this.homework.content;
|
||||
postData.homework=this.homework.info;
|
||||
this.homeworkChange = deepClone(this.homework)
|
||||
}else if(index==3){
|
||||
postData.content=this.exam.content;
|
||||
//检查是不是所有的试题都有了答案
|
||||
@@ -932,6 +999,7 @@
|
||||
}
|
||||
this.exam.info.paperContent=JSON.stringify(this.exam.paperJson);
|
||||
postData.exam=this.exam.info;
|
||||
this.examChange = deepClone(this.exam);
|
||||
}else if(index==4){
|
||||
this.assess.content.content=JSON.stringify(this.assess.json);
|
||||
postData.content=this.assess.content;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
</el-tooltip>
|
||||
</el-badge>
|
||||
<div>
|
||||
<a :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`">
|
||||
<a :href="`${webBaseUrl}${'/uc/study/task?identity=1'}`">
|
||||
<el-avatar :src="userInfo.avatar" v-if="userInfo.avatar !== '' "></el-avatar>
|
||||
<div v-else class="uavatar">
|
||||
<div v-if="sex === 1 "><img src="../../public/images/Avatarman.png" alt=""></div>
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${isTiao ? '/uc/study/task' : '/uc/study/courses'}`" :underline="false">个人中心</el-link>
|
||||
<el-link type="primary" style="margin-right:10px;" :href="`${webBaseUrl}${'/uc/study/task?identity=1'}`" :underline="false">个人中心</el-link>
|
||||
<el-link type="primary" @click="logout()" icon="el-icon-switch-button" :underline="false">退出</el-link>
|
||||
</div>
|
||||
</div>
|
||||
@@ -117,13 +117,13 @@ export default {
|
||||
// cmtask_status:this.cmtask_status,
|
||||
// cmtask_name:this.cmtask_name,
|
||||
};
|
||||
apiBoeCourse.cmtaskList(params).then(res => {
|
||||
if (res.status == 200 && res.result.count > 0) {
|
||||
this.isTiao = true;
|
||||
} else {
|
||||
this.isTiao = false;
|
||||
}
|
||||
});
|
||||
// apiBoeCourse.cmtaskList(params).then(res => {
|
||||
// if (res.status == 200 && res.result.count > 0) {
|
||||
// this.isTiao = true;
|
||||
// } else {
|
||||
// this.isTiao = false;
|
||||
// }
|
||||
// });
|
||||
},
|
||||
handleCommand(val) {
|
||||
let urlPre=window.location.protocol+'//'+window.location.host;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<span>学习时长:{{userInfo.studyTotalH}}小时</span>
|
||||
</div>
|
||||
<div>
|
||||
<router-link to="/study/index"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||
<router-link to="/uc/study/task"><span :class="{identity:true,active:curIdentity==1}" @click="setCurIdentity(1)">学员</span></router-link>
|
||||
<router-link to="/teacher/index"><span v-if="identity == 2 || identity == 5" :class="{identity:true,active:curIdentity==2}" @click="setCurIdentity(2)">教师</span></router-link>
|
||||
<router-link to="/manager/index"><span v-if="identity == 3 || identity == 5" :class="{identity:true,active:curIdentity==3}" @click="setCurIdentity(3)">管理员</span></router-link>
|
||||
</div>
|
||||
@@ -79,11 +79,17 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js";
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.sex = this.userInfo.sex;
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
this.sex = this.userInfo.sex;
|
||||
let iden=this.$route.query.identity;
|
||||
if(iden){
|
||||
this.setCurIdentity(parseInt(iden));
|
||||
}else{
|
||||
// 判断路由是进入的学员默认页面就重置setCurIdentity
|
||||
if(this.$route.path == '/uc/study/task' || this.$route.path == '/study/index'){
|
||||
this.setCurIdentity(1);
|
||||
}
|
||||
}
|
||||
|
||||
//let testName='京东方科技集团股份有限公司/北京中祥英科技有限公司/技术中心';
|
||||
//this.orgInfo=cutFullName(testName,1);
|
||||
this.orgInfo=cutFullName(this.userInfo.departFullName,1);
|
||||
|
||||
@@ -73,6 +73,10 @@ const user = {
|
||||
}
|
||||
})
|
||||
},
|
||||
//
|
||||
SetTaskCount({ commit }, count) {
|
||||
commit('SET_StudyTaskCount', count);
|
||||
},
|
||||
//设置用户身份
|
||||
SetIdentity({ commit }, iden) {
|
||||
return new Promise((resolve) => {
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
if(this.toUrl){
|
||||
location.href=this.toUrl;
|
||||
}else{
|
||||
this.$router.push({ path: "/study/index" })
|
||||
this.$router.push({ path: "/uc/study/task" })
|
||||
}
|
||||
//this.$router.push({ path: "/index" })
|
||||
}else{
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
this.$store.dispatch("portal/SetLoginRememberMe", rememberMeOjb)
|
||||
}
|
||||
//console.log(this.redirect,'this.redirect');
|
||||
this.$router.push({ path: this.redirect || "/study/index" }).catch(()=>{
|
||||
this.$router.push({ path: this.redirect || "/uc/study/task" }).catch(()=>{
|
||||
$this.loading = false;
|
||||
});
|
||||
}else{
|
||||
|
||||
@@ -79,148 +79,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import studyItem from '@/components/Course/studyItem.vue'
|
||||
import apicourseStudy from '@/api/modules/courseStudy.js';
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import {resListMap, resOwnerListMap,courseType,getType} from '@/utils/tools.js';
|
||||
import apiBoe from '@/api/boe/boeApiAjax.js';
|
||||
import axios from 'axios'
|
||||
import { mapGetters,mapActions} from 'vuex';
|
||||
export default {
|
||||
name: 'ucStudyIndex',
|
||||
components:{studyItem},
|
||||
components:{},
|
||||
data(){
|
||||
return {
|
||||
loading:false,
|
||||
lastTabName:'course',
|
||||
getCourseType:courseType,
|
||||
lastStudy:{
|
||||
aname: "",
|
||||
contentId: "",
|
||||
contentName: "",
|
||||
contentType: 0,
|
||||
courseId: "",
|
||||
courseName: "",
|
||||
courseType: "",
|
||||
coverImg: "",
|
||||
itemId: "",
|
||||
lastStudyTime: 0,
|
||||
lastTime: "",
|
||||
progress: 100,
|
||||
score: "",
|
||||
studyDuration: "",
|
||||
studyId: "",
|
||||
},
|
||||
params:{
|
||||
pageIndex: 1,//第几页
|
||||
pageSize: 5,
|
||||
isFinish:false,
|
||||
},
|
||||
couresList:[],
|
||||
couresCount:0,
|
||||
taskList:[]
|
||||
loading:false
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
this.loading = true;
|
||||
let params={
|
||||
// keyword:this.keyword,
|
||||
page:1,
|
||||
size:10,
|
||||
// cmtask_status:this.cmtask_status,
|
||||
// cmtask_name:this.cmtask_name,
|
||||
}
|
||||
|
||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
if(res.status==200){
|
||||
this.total = res.result.count
|
||||
this.couresList = res.result.list;
|
||||
this.loading = false;
|
||||
if(this.$route.fullPath != '/uc/study/task' && this.$route.fullPath != '/uc/study/courses' && this.$route.fullPath != '/study/index') {
|
||||
return;
|
||||
}
|
||||
if(res.result.count > 0) {
|
||||
this.$router.push('/uc/study/task')
|
||||
} else {
|
||||
if(this.$route.query.study == '1') {
|
||||
this.$router.push('/uc/study/task')
|
||||
} else {
|
||||
this.$router.push('/uc/study/courses')
|
||||
}
|
||||
}
|
||||
}else{
|
||||
this.$router.push('/uc/study/courses')
|
||||
}
|
||||
}).catch(err=>{
|
||||
if(this.$route.fullPath != '/uc/study/task' || this.$route.fullPath != '/uc/study/courses' || this.$route.fullPath != '/study/index') {
|
||||
return;
|
||||
}
|
||||
this.$router.push('/uc/study/courses');
|
||||
})
|
||||
this.$router.push('/uc/study/task')
|
||||
},
|
||||
created() {
|
||||
//this.$router.push('/uc/study/courses');
|
||||
// this.searchData();
|
||||
// this.getLastStudy();
|
||||
// this.loadRemoteTask();
|
||||
// this.loadResOwners();
|
||||
// this.loadSysTypes();
|
||||
|
||||
},
|
||||
methods:{
|
||||
continueStudy(item){
|
||||
if(item.courseType==10){
|
||||
return '../course/micro?id='+item.courseId
|
||||
}else{
|
||||
return '../course/studyindex?id='+item.courseId
|
||||
}
|
||||
},
|
||||
...mapActions({
|
||||
getResOwnerTree:'resOwner/getResOwnerTree',
|
||||
loadResOwners:'resOwner/loadResOwners',
|
||||
getSysTypeTree:'sysType/getSysTypeTree',
|
||||
loadSysTypes:'sysType/loadSysTypes'
|
||||
}),
|
||||
getLastStudy() {
|
||||
apicourseStudy.lastStudy().then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.lastStudy=res.result;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
loadRemoteTask(){
|
||||
//调用远程接口
|
||||
// let url="http://u.boe.com/api/b1/system/cmtask/cmtask-list";
|
||||
// let jsonData={
|
||||
// cmtask_status:'',
|
||||
// cmtask_name:'',
|
||||
// page:1,
|
||||
// size:10
|
||||
// }
|
||||
// axios.post(url,jsonData).then(rs=>{
|
||||
// console.log(rs)
|
||||
// })
|
||||
// apiBoe.postJson(url,jsonData).then(rs=>{
|
||||
// if(rs.status==200){
|
||||
|
||||
// }
|
||||
// })
|
||||
},
|
||||
searchData() {
|
||||
apicourseStudy.myStudyList(this.params).then(res=>{
|
||||
if(res.status === 200) {
|
||||
this.couresList =res.result.list;
|
||||
this.couresCount = res.result.count;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
lastTabChange(tab,event){
|
||||
console.log(tab.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -218,7 +218,7 @@ export default {
|
||||
auditUser:hrbpUser.real_name,
|
||||
ukid:hrbpUser.user_id,
|
||||
orgId:row.orgId,
|
||||
orgName:rrs.result.name
|
||||
orgName:rs.result.orgnization_name_path+'/'+rrs.result.name
|
||||
}
|
||||
apiCourse.sumbits(req).then(res=>{
|
||||
if(res.status==200){
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="caseDetail.orgDomain" class="item">{{ orgDomainTranslate(caseDetail.orgDomain) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" class="item" v-if="caseDetail.orgDomain == '' && caseDetail.orgDomainParent">{{ orgDomainTranslate(caseDetail.orgDomainParent) }}</div>
|
||||
<!-- <div style="color:#2974D6;font-weight: 450;" v-if="caseDetail.majorType" class="item">{{ majorTypeTranslate(caseDetail.majorType) }}</div> -->
|
||||
<div class="item" style="color:#2974D6;font-weight: 450;" v-for="item,idx in caseDetail.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</div>
|
||||
<div class="item" style="color:#2974D6;font-weight: 450;" v-for="item,idx in caseDetail.majorType" :key="idx" v-if="item">{{ majorTypeTranslate(item) }}</div>
|
||||
<div v-if="caseDetail.keyword1" class="item">{{ caseDetail.keyword1 }}</div>
|
||||
<div v-if="caseDetail.keyword2" class="item">{{ caseDetail.keyword2 }}</div>
|
||||
<div v-if="caseDetail.keyword3" class="item">{{ caseDetail.keyword3 }}</div>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<div class="keyword-text clearfix">
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain">{{ orgDomainTranslate(item.orgDomain) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-if="item.orgDomain == '' && item.orgDomainParent">{{ orgDomainTranslate(item.orgDomainParent) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-for="item,idx in item.majorType" :key="idx" >{{ majorTypeTranslate(item) }}</div>
|
||||
<div style="color:#2974D6;font-weight: 450;" v-for="item,idx in item.majorType" :key="idx" v-if="item">{{ majorTypeTranslate(item) }}</div>
|
||||
|
||||
<div v-if="item.keyword1">{{ item.keyword1 }}</div>
|
||||
<div v-if="item.keyword2">{{ item.keyword2 }}</div>
|
||||
|
||||
@@ -479,11 +479,11 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 分类
|
||||
changeType(num) {
|
||||
this.types.oneSubList = [];
|
||||
this.types.subOne = "0";
|
||||
this.types.subTow = "0";
|
||||
this.types.towSubList = [];
|
||||
let list = {};
|
||||
if (num !== 0) {
|
||||
|
||||
@@ -136,10 +136,18 @@ export default {
|
||||
cmtask_name:this.params.cmtask_name,
|
||||
}
|
||||
this.loading=true;
|
||||
let $this=this;
|
||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
if(res.status==200){
|
||||
this.total = res.result.count
|
||||
this.couresList = res.result.list;
|
||||
//this.$store.commit('user/SET_StudyTaskCount',res.result.count);
|
||||
//this.$store.dispatch('user/SetTaskCount',res.result.count);
|
||||
|
||||
if(this.total==0){
|
||||
//如果没有就跳转到其它页面
|
||||
this.$router.push("/uc/study/courses")
|
||||
}
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user