diff --git a/.env.development b/.env.development index 889821b0..78a7b3f5 100644 --- a/.env.development +++ b/.env.development @@ -16,13 +16,13 @@ VUE_APP_CESOURCE_BASE_API = '/socialApi' VUE_APP_STAT_BASE_API = '/statApi' # BOE系统网址 -VUE_APP_BOE_WEB_URL = 'http://192.168.0.11' +VUE_APP_BOE_WEB_URL = 'http://127.0.0.1' # BOE 移动端url -VUE_APP_BOE_MOBILE_URL = 'http://192.168.0.11:8082/mobile' +VUE_APP_BOE_MOBILE_URL = 'http://127.0.0.1:8082/mobile' # File路径的基础url -VUE_APP_FILE_BASE_URL = 'http://192.168.0.11:9090/cdn/upload' +VUE_APP_FILE_BASE_URL = 'http://127.0.0.1:9090/cdn/upload' # File路径的基础url的相对路径,加此项是为了不影响之前的路径配置 VUE_APP_FILE_RELATIVE_PATH = '/upload' @@ -32,6 +32,12 @@ VUE_APP_LOGIN_URL='/pc/login' # 虚拟目录的变量 VUE_APP_PUBLIC_PATH='/pc' +VUE_APP_MANAGER_PATH='/manage' +VUE_APP_STUDENT_PATH='/fe-student' +VUE_APP_MANAGER_API_PATH='/manageApi' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true + +# scorm课件的播放url地址 +VUE_APP_SCORM_URL = 'http://localhost:9083/scorm-player' diff --git a/.env.preview b/.env.preview index a1b96aec..cf0cddd5 100644 --- a/.env.preview +++ b/.env.preview @@ -29,6 +29,12 @@ VUE_APP_FILE_RELATIVE_PATH = '/upload' # 虚拟目录的变量,结尾的/在vue.config.js中添加 VUE_APP_PUBLIC_PATH='/pc-release' +VUE_APP_MANAGER_PATH='/manage-release' +VUE_APP_STUDENT_PATH='/fe-student-release' +VUE_APP_MANAGER_API_PATH='/manageApi-release' # 登录地址 VUE_APP_LOGIN_URL='https://u.boe.com/web-release/' + +# scorm课件的播放url地址 +VUE_APP_SCORM_URL = 'https://u.boe.com/newscorm/scorm-player' diff --git a/.env.production b/.env.production index b18fe5a4..ee26fd41 100644 --- a/.env.production +++ b/.env.production @@ -29,6 +29,12 @@ VUE_APP_FILE_RELATIVE_PATH = '/upload' # 虚拟目录的变量,结尾的/在vue.config.js中添加 VUE_APP_PUBLIC_PATH='/pc' +VUE_APP_MANAGER_PATH='/manage' +VUE_APP_STUDENT_PATH='/fe-student' +VUE_APP_MANAGER_API_PATH='/manageApi' # 登录地址 VUE_APP_LOGIN_URL='https://u.boe.com/web/' + +# scorm课件的播放url地址 +VUE_APP_SCORM_URL = 'https://u.boe.com/newscorm/scorm-player' diff --git a/.env.testing b/.env.testing index a0aa5726..2fd85c14 100644 --- a/.env.testing +++ b/.env.testing @@ -29,6 +29,12 @@ VUE_APP_FILE_RELATIVE_PATH = '/upload' # 虚拟目录的变量,结尾的/在vue.config.js中添加 VUE_APP_PUBLIC_PATH='/pc' +VUE_APP_MANAGER_PATH='/manage' +VUE_APP_STUDENT_PATH='/fe-student' +VUE_APP_MANAGER_API_PATH='/manageApi' # 登录地址 VUE_APP_LOGIN_URL='https://u-pre.boe.com/web/' + +# scorm课件的播放url地址 +VUE_APP_SCORM_URL = 'https://u-pre.boe.com/newscorm/scorm-player' diff --git a/public/images/scorm.png b/public/images/scorm.png new file mode 100644 index 00000000..f907f19d Binary files /dev/null and b/public/images/scorm.png differ diff --git a/src/api/boe/boeAjax.js b/src/api/boe/boeAjax.js index 728435d2..c575e8e7 100644 --- a/src/api/boe/boeAjax.js +++ b/src/api/boe/boeAjax.js @@ -47,7 +47,7 @@ const formRequest=axios.create({ Promise.reject(error) }); formRequest.interceptors.response.use(res => { - console.log(res); + //console.log(res); const code = res.data.status || 200; if(code===200){ return res.data diff --git a/src/api/boe/courseRecord.js b/src/api/boe/courseRecord.js new file mode 100644 index 00000000..33dda498 --- /dev/null +++ b/src/api/boe/courseRecord.js @@ -0,0 +1,42 @@ +/**我的授课记录*/ +import ajax from '@/api/boe/boeApiAjax.js' +import axios from 'axios' +import { getToken } from '@/utils/token' +const baseURL = process.env.VUE_APP_BOE_BASE_API; + + + +/** + * 导出授课记录 + * + * @param {Object} kid + */ +const courseRecordExport = function(data) { + return axios.request({ + baseURL, + url: '/b1/system/teacher/teacher-course-export', + method: 'post', + data:data, + headers:{'Content-Type':'application/json;charset=utf-8'}, + responseType: 'blob' + }) + + // return ajax.postJson('/b1/system/teacher/teacher-course-export',data); +} + +/** + * 授课记录列表 + * + * @param {Object} kid + */ +const courseRecordList = function(data) { + return ajax.postJson('/b1/system/teacher/teacher-course-list',data); +} + + + +export default { + courseRecordExport, + courseRecordList + +} diff --git a/src/api/boe/teacher.js b/src/api/boe/teacher.js index 1568a2ca..6d2418d6 100644 --- a/src/api/boe/teacher.js +++ b/src/api/boe/teacher.js @@ -136,8 +136,28 @@ const teacherSystem = function(id) { return ajax.postJson('/b1/system/teacher/delete-model-teacher',data); } +//以下是新增加的两个接口,只是修改4个字段内容 +/** + * @param {Object} data + * { + teacher_user_id:用户的kid, + courses:'擅长的课程', + photo:"", + expertise:'', + work:'' + } + */ +const simpleUpdate = function(data) { + return ajax.postJson('/b1/system/teacher/update-teacher',data); +} + +const simpleInfo = function(kid) { + return ajax.postJson('/b1/system/teacher/teacher-info',{teacher_user_id:kid}); +} export default { + simpleUpdate, + simpleInfo, editTeacher, teacherSystem, teacherInfo, diff --git a/src/api/login.js b/src/api/login.js index 0b47d438..ec6c72ee 100644 --- a/src/api/login.js +++ b/src/api/login.js @@ -32,7 +32,8 @@ const refreshToken = function(token){ // boe登录 const boeLogin = function(token){ - return ajax.post('/xboe/account/boelogin',{token:token}); + //return ajax.post('/xboe/account/boelogin',{token:token}); + return ajax.post('/xboe/account/boenewlogin',{token:token}); } export default{ diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index 1a8cbced..ef3e1b26 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -119,6 +119,40 @@ const ids=function (data){ return ajax.postJson('/xboe/m/boe/cases/ids',data); } +/** + * 设置和取消优秀案例 + * @param{ + * id 案例id + * excellent true、设置 false 取消 + * } + * */ +const excellent=function(data){ + return ajax.post('/xboe/m/boe/cases/excellent',data) +} + + +/** + *我的案例 + * @param{ + * pageIndex + * pageSize + * } + * */ +const mylist=function (query){ + return ajax.post('/xboe/m/boe/cases/mylist',query); +} + +/** + * 导出 + * @param{ + * pageIndex + * pageSize + * } + * */ +const exportCases=function (query){ + return ajax.post('/xboe/m/boe/cases/export',query); +} + export default { indexList, queryList, @@ -133,5 +167,8 @@ export default { queryComments, majorTypes, details, - ids + ids, + excellent, + mylist, + exportCases } diff --git a/src/api/modules/course.js b/src/api/modules/course.js index 22dcd55b..d3bfee07 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -281,6 +281,7 @@ const auditList = function(query) { return ajax.post('/xboe/m/course/manage/audit-pagelist', query); } + /**教师需要审核的课程列表*/ const teacherAuditList = function(query) { return ajax.post('/xboe/m/course/audit/teacher-course', query); diff --git a/src/api/modules/paper.js b/src/api/modules/paper.js index 8dc08937..5ed38974 100644 --- a/src/api/modules/paper.js +++ b/src/api/modules/paper.js @@ -32,8 +32,8 @@ const update = function(data) { } /* 编辑详情 */ const detail = function(id) { - return ajax.get('/xboe/m/exam/paper/query?id=' + id); - } + return ajax.get('/xboe/m/exam/paper/query?id=' + id); +} /* 试卷批量导入计算 * num 数目 diff --git a/src/api/modules/popup.js b/src/api/modules/popup.js new file mode 100644 index 00000000..bfcc0571 --- /dev/null +++ b/src/api/modules/popup.js @@ -0,0 +1,13 @@ + +import ajax from '@/utils/xajax.js' + +/** + * @param {Object} device 不包含的平台, 1表pc, 2表移动端 + */ +const findByNoDevice=function (device){ + return ajax.get('/xboe/m/popup/user?device='+device); +} + +export default { + findByNoDevice +} diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index f0a1a76d..7939917d 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -9,6 +9,11 @@ const findByName = function(name) { return ajax.get('/xboe/teacher/name?name=' + name); } + +const updateTeacher=function(data){ + return ajax.postJson('/xboe/teacher/update-teacher',data); +} + /** * 根据id得到教师的显示信息,只是几个基本的显示字段 * @param {Object} id @@ -17,6 +22,11 @@ const getInfoById = function(id) { return ajax.get('/xboe/teacher/simple?id=' + id); } +const detailTeacher=function (id){ + return ajax.get('/xboe/teacher/detail-teacher?id='+id); + } + + /** * 分页查询 * @param { @@ -213,5 +223,7 @@ export default { start, end, exports, - syncUpdate + syncUpdate, + detailTeacher, + updateTeacher } diff --git a/src/api/modules/test.js b/src/api/modules/test.js index 068039fc..332efa52 100644 --- a/src/api/modules/test.js +++ b/src/api/modules/test.js @@ -54,6 +54,16 @@ const exports=function (query){ return ajax.post('/xboe/m/exam/alone/answer/export',query,{responseType: 'blob'}); } +/** + * @param{ + * id 考试id + * enabled true 上架 false 下架 + * } + * */ +const enabled=function(query){ + return ajax.post('/xboe/m/exam/test/enabled',query); +} + export default { detail, update, @@ -61,5 +71,6 @@ export default { save, querylist, pulish, - exports + exports, + enabled } diff --git a/src/api/system/whiteuser.js b/src/api/system/whiteuser.js new file mode 100644 index 00000000..79e7eff3 --- /dev/null +++ b/src/api/system/whiteuser.js @@ -0,0 +1,18 @@ +import ajax from '@/utils/xajax.js' + + +/** + * 查询白名单 + * @param { + * env:'开发环境' + * } data + * @returns + */ +const getList =function(env) { + return ajax.post('/xboe/sys/whiteuser/codes',env); +} + + +export default{ + getList +} diff --git a/src/assets/styles/portal.scss b/src/assets/styles/portal.scss index e21fe7a6..6b6aa53e 100644 --- a/src/assets/styles/portal.scss +++ b/src/assets/styles/portal.scss @@ -189,7 +189,7 @@ body {margin: 0px;padding: 0px;} .course-card-favorite{ position: absolute; right:25px; - bottom: 72px; + bottom: 84px; } // margin-right: 35px; @@ -254,7 +254,7 @@ body {margin: 0px;padding: 0px;} .course-title { height: 44px; // margin: 10px 0; - margin: 10px 0 10px 0px; + margin: 10px 0 0px 0px; line-height: 24px; font-size: 16px; font-weight: 600; @@ -383,7 +383,7 @@ body {margin: 0px;padding: 0px;} .course-card-favorite{ position: absolute; right:20px; - bottom: 72px; + bottom: 78px; } .course-image-box { width:218; diff --git a/src/components/AlertPopup.vue b/src/components/AlertPopup.vue index 38dc48c5..9fde5fd4 100644 --- a/src/components/AlertPopup.vue +++ b/src/components/AlertPopup.vue @@ -1,38 +1,110 @@ - @@ -67,9 +139,11 @@ } .dlg-close{ - padding: 20px 10px 10px 10px; + //float: right; + //margin-top: -90px; border: 1px solid #cccccc; border-radius: 50%; + padding: 20px 10px 10px 10px; cursor: pointer; } .medalbox { diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index a9cc71c9..541157d0 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -253,6 +253,7 @@ import apiCourseFile from '@/api/modules/courseFile.js'; import filecloud from '@/components/FileCloud/index.vue'; import { mapGetters, mapActions } from "vuex"; import chooseOrg from '@/components/System/chooseOrg.vue'; +import apiUserBasic from '../../api/boe/userbasic.js'; // import hyperLink from '@/components/Course/hyperLink.vue'; export default { name: "auditCourse1", @@ -586,7 +587,7 @@ export default { this.courseCoverurl = ""; this.courseInfo.coverImg = ""; }, - getDetail() { + getDetail(){ let $this = this; apiCoursePortal.detail(this.id,true).then(rs => { if (rs.status == 200) { @@ -594,23 +595,37 @@ export default { //加载所属机构名称 this.orgKid=''; if(this.courseInfo.orgId){ - apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ - if(rrs.status==200){ - this.orgName=rrs.result.name; - this.orgKid=rrs.result.kid; + apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{ + if(rs.status==200){ + this.orgName=rrs.result.name; + //this.orgKid=rrs.result.kid; + //this.orgNamePath=rrs.result.namePath; } - }) + }); + // apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ + // if(rrs.status==200){ + // this.orgName=rrs.result.name; + // 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; + apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{ + if(rs.status==200){ + $this.orgName=rrs.result.name; + //this.orgKid=rrs.result.kid; + //$this.orgNamePath=rrs.result.namePath; } - }) + }); + // apiOrg.getSimple(ors.result.id).then(rrs=>{ + // if(rrs.status==200){ + // $this.orgName=rrs.result.name; + // $this.orgKid=rrs.result.kid; + // } + // }) }else{ // } diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue index caff77d9..6b65ee7e 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -292,6 +292,7 @@ import { mapGetters,mapActions} from 'vuex'; import hyperLink from '@/components/Course/hyperLink.vue'; import apiCourseFile from '../../api/modules/courseFile.js'; import filecloud from '@/components/FileCloud/index.vue'; +import apiUserBasic from '../../api/boe/userbasic.js'; export default { name:"auditCourse2", components: { @@ -634,23 +635,38 @@ export default { //加载所属机构名称 this.orgKid=''; if(this.courseInfo.orgId){ - apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ - if(rrs.status==200){ - this.orgName=rrs.result.name; - this.orgKid=rrs.result.kid; + apiUserBasic.getOrgInfo(this.courseInfo.orgId).then(rrs=>{ + if(rs.status==200){ + this.orgName=rrs.result.name; + //this.orgKid=rrs.result.kid; + //this.orgNamePath=rrs.result.namePath; } - }) + }); + // apiOrg.getSimple(this.courseInfo.orgId).then(rrs=>{ + // if(rrs.status==200){ + // this.orgName=rrs.result.name; + // 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; + + apiUserBasic.getOrgInfo(ors.result.id).then(rrs=>{ + if(rs.status==200){ + $this.orgName=rrs.result.name; + //this.orgKid=rrs.result.kid; + //$this.orgNamePath=rrs.result.namePath; } - }) + }); + // apiOrg.getSimple(ors.result.id).then(rrs=>{ + // if(rrs.status==200){ + // $this.orgName=rrs.result.name; + // $this.orgKid=rrs.result.kid; + // } + // }) }else{ // } diff --git a/src/components/Course/catalogCourseware.vue b/src/components/Course/catalogCourseware.vue index 620a127b..29812ada 100644 --- a/src/components/Course/catalogCourseware.vue +++ b/src/components/Course/catalogCourseware.vue @@ -19,7 +19,7 @@
-
+
@@ -95,11 +95,17 @@
+
+ +
- + +
+
+
@@ -145,90 +151,16 @@
-
-
- -
-
- 只显示试题 - 保存 - 重新选择 -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - 最高一次 - 最后一次 - - - - - 按百分制显示成绩(实际成绩*100/实际总分) - - - - - - - +
+
+
- -
+ 重新选择 +
+ +
@@ -325,7 +257,6 @@ import chooseCourseFile from '@/components/Course/chooseCourseFile.vue' import courseHomework from '@/components/Course/courseHomework.vue' import courseExam from '@/components/Course/courseExam.vue' - import simplePaper from "@/components/Course/simpleTestPaper.vue"; import WxEditor from "@/components/Editor/indexCourse.vue"; import fileUpload from '@/components/FileUpload/index.vue'; import apiCourse from '../../api/modules/course.js'; @@ -361,14 +292,15 @@ default:1 } }, - components:{chooseCourseFile,WxEditor,courseHomework,courseExam,simplePaper,fileUpload,pdfPreview,audioPlayer,videoPlayer}, + components:{chooseCourseFile,WxEditor,courseHomework,courseExam,fileUpload,pdfPreview,audioPlayer,videoPlayer}, // inject: [ "informationDetails" ], data(){ return { converStatus:4, - fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL, + fileBaseUrl:this.$xpage.constants.fileBaseUrl, curPdfPath:'', curCFile:{},//当前课件的内容 + scormUrl:'',//scormUrl地址 comTypes:[ //文件类型,10视频,20音频,30图片, 40 文档,41表图文,50表scrom包,90表其它 //图文41,连接52,作业60,考试61,评估62 @@ -379,7 +311,8 @@ {id:'5',type:'link',name:'外部连接',img:'el-icon-link',resType:52}, {id:'6',type:'exam',name:'考试',img:'el-icon-document-checked',resType:61}, {id:'7',type:'homework',name:'作业',img:'el-icon-reading',resType:60}, - {id:'8',type:'assess',name:'评估',img:'el-icon-user',resType:62} + {id:'8',type:'assess',name:'评估',img:'el-icon-user',resType:62}, + {id:'10',type:'scorm',name:'SCORM',img:'el-icon-suitcase',resType: 50}, ], htmlContent:'', linkInfo:{ @@ -395,29 +328,6 @@ }, homework:{courseId: '', name:'', content:'', file:'', deadTime: '', submitMode: 3}, homeworkChange:{}, - exam:{ - 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字符串 - }, - examChange:{}, - onlyQuestion:true, - examPaperChange:{}, - examPaper:{items:[]}, assess:{ countType:'权重配置', countText:'(问题1)*80%+(问题2)*10%+(问题3)*10%', @@ -433,7 +343,13 @@ }, created() { - //console.log(this.ctype, this.course,'ctype'); + //console.log(process.env, 'process.env'); + }, + mounted(){ + //this.init(); + if(process.env.NODE_ENV=='development'){ + this.fileBaseUrl=process.env.VUE_APP_FILE_BASE_URL; + } }, watch:{ reset(newVal){ @@ -447,6 +363,8 @@ this.loadPdfFile(); }else if(newVal.contentType==41){ this.htmlContent=newVal.content; + }else if(newVal.contentType==50){ + this.loadScormFile(); }else if(newVal.contentType==52){ //外部连接 if(newVal.content!=''){ @@ -461,8 +379,8 @@ //作业 this.loadHomeworkInfo(); }else if(newVal.contentType==61){ - //考试 - this.loadExamInfo(); + //考试,已经移到组件中 + //this.loadExamInfo(); }else if(newVal.contentType==62){ //评估 this.loadAssessInfo(); @@ -486,15 +404,8 @@ this.linkInfo.url=''; this.htmlContent=''; this.curPdfPath=''; + this.scormUrl=''; this.curCFile={}; - this.exam.contentId=''; - this.exam.paperContent=''; - this.exam.info=''; - this.exam.id='';//一定要重置id - this.exam.qnum=''; - this.exam.paperId=''; - this.exam.passLine=60; - this.examPaper={items:[]}; this.curriculumData={ url:'', isDrag:true, @@ -519,6 +430,25 @@ }); } }, + loadScormFile(){ + //对于scorm课件内容,需要再查一下 + this.scormUrl=''; + apiCourseFile.detail(this.content.contentRefId).then(rs=>{ + if(rs.status==200){ + this.curCFile=rs.result; + //this.curPdfPath=rs.result.previewFilePath; + this.content.content='scorm'; + this.scormUrl=process.env.VUE_APP_SCORM_URL+'?r=1&mode=preview&scormId='+this.curCFile.id;//播放的首页 + console.log(this.scormUrl,'this.scormUrl') + } + }); + // let fname=this.content.content; + // if(fname && fname.indexOf('.pdf')>-1){ + // this.curPdfPath=this.content.content; + // }else{ + + // } + }, loadHomeworkInfo(){ apiCourse.getHomework(this.content.id).then(res=>{ if(res.status==200){ @@ -531,20 +461,6 @@ } }) }, - loadExamInfo(){ - apiCourse.getExam(this.content.id).then(res=>{ - 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{ - this.$message.error(res.message); - } - }) - }, loadAssessInfo(){ if(this.content.content!='' && this.content.content.length>10){ this.assess=JSON.parse(this.content.content); @@ -594,31 +510,7 @@ if(this.content.contentType==60){ jsonData.homework=this.homework; }else if(this.content.contentType==61){ - //检查内容的完整性 - if(this.examPaper.items.length==0){ - this.$message.error("您还没有添加考试的试题"); - return; - } - let pass=true; - this.examPaper.items.forEach(qitem=>{ - if(qitem.options.length==0){ - pass=false; - }else{ - let hasAnswer=qitem.options.some(opt=>{ - return opt.answer; - }); - if(!hasAnswer){ - pass=false; - } - } - }); - if(!pass){ - this.$message.error("试卷试题请填写完整,每个试题必须要有答案"); - return; - } - - this.exam.paperContent=JSON.stringify(this.examPaper); - jsonData.exam=this.exam; + //考试保存已经独立出去,不在这里处理了 }else if(this.content.contentType==62){ this.content.content=JSON.stringify(this.assess); @@ -633,6 +525,47 @@ } }) }, + saveExam(examInfo){ + console.log('保存考试配置'); + //这里只是61考试 + this.content.courseId=this.course.id; + this.content.sortIndex=this.addOrder; + let jsonData={ + content:this.content, + exam:examInfo + } + apiCourse.saveContent(jsonData).then(rs=>{ + if(rs.status === 200) { + this.$message.success('保存成功!'); + this.$refs.comExam.reloadExam(); + // this.content=rs.result.content; + this.$emit('save',rs.result.content); + }else{ + this.$message.error(rs.message) + } + }) + }, + deleteExam(examInfo){ + if(this.content.id==''){ + this.content.contentType=0; + this.content.content=''; + return; + } + let params={ + id:this.content.id, + ctype:this.content.contentType, + erasable:this.course.erasable + } + apiCourse.delContent(params).then(rs=>{ + if(rs.status === 200) { + this.$message.success('删除成功!'); + this.$emit('remove'); + this.$refs.comExam.reloadExam(); + }else{ + this.$message.error(rs.message) + } + }) + }, delData(id){ //需要调用外部方法完成 if(this.content.id==''){ @@ -652,6 +585,7 @@ } }) }, + toReChoose(){ let $this=this; if(this.content.id.length>1){ @@ -681,6 +615,7 @@ //未初始化会调用失败,所以这里要等vue变化后再调用 this.$nextTick(function(){ this.$refs.coursewarePanel.findCourseFile(); + this.$refs.coursewareScormPanel.findCourseFile(); }) } @@ -692,7 +627,9 @@ // this.content.content.url=cfile.filePath; if(this.content.contentType==10 || this.content.contentType==20){ this.curriculumData.url = cfile.filePath; - }else{ + }else if(this.content.contentType==50){ //scorm课件内容 + //this.chooseCourseScorm + } else{ if(cfile.previewFilePath){ this.content.content=cfile.previewFilePath; }else{ @@ -708,7 +645,10 @@ setTimeout(function(){ $this.loadPdfFile(); },2000); - + }else if(this.content.contentType==50){ + setTimeout(function(){ + $this.loadScormFile(); + },2000); } } } diff --git a/src/components/Course/chooseCourseFile.vue b/src/components/Course/chooseCourseFile.vue index fc9fe2ba..d5252794 100644 --- a/src/components/Course/chooseCourseFile.vue +++ b/src/components/Course/chooseCourseFile.vue @@ -44,11 +44,18 @@
+
+ 内容时长(分): + + + +
将文件拖到此处,或点击上传
文件大小限制:{{curComType.maxSizeName}},支持的文件类型:{{curComType.fileTypes.join(',')}}
+
{{courseFile.fileName}} 上传成功
@@ -68,6 +75,14 @@ type: String, default:'500' }, + orgId:{ + type: String, + default:'' + }, + orgName:{ + type: String, + default:'' + }, resType:{ type: Number, default:0 @@ -86,11 +101,13 @@ pageIndex:1, count:0, keyword: '', + duration:1, comTypes:[ {id:'1',type:'video',name:'视频',img:'el-icon-video-camera',resType:10,maxSize:1024,maxSizeName:"1G",fileTypes:['mp4']}, {id:'2',type:'sound',name:'音频',img:'el-icon-service',resType:20,maxSize:1024,maxSizeName:"1G",fileTypes:['mp3']}, {id:'3',type:'image',name:'图片',img:'el-icon-picture-outline',resType:30,maxSize:10,maxSizeName:"10M",fileTypes:["png","jpg","gif","bmp"]}, - {id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:1024,maxSizeName:"1G",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]} + {id:'4',type:'doc',name:'文档',img:'el-icon-document',resType:40,maxSize:1024,maxSizeName:"1G",fileTypes:["doc", "xls", "ppt","docx", "xlsx", "pptx","txt","pdf"]}, + {id:'5',type:'scorm',name:'SCORM课件',img:'el-icon-suitcase',resType:50,maxSize:1024,maxSizeName:"1G",fileTypes:["zip"]} ], curComType:{id:'',type:'',name:'',maxSizeName:'',fileTypes:[]}, findState:1, @@ -133,6 +150,11 @@ return false; } } + if(this.resType==50){ + this.data.dir='scorm'; + }else{ + this.data.dir='course'; + } return true; }, // 上传失败 @@ -150,6 +172,9 @@ fileType:res.result.fileType, filePath:res.result.filePath, resType:this.resType, + orgId:this.orgId, + orgName:this.orgName, + duration:this.duration, remark:'课程中直接上传' } apiCourseFile.saveUpload(courseWare).then(rs=>{ diff --git a/src/components/Course/chooseCourseScorm.vue b/src/components/Course/chooseCourseScorm.vue new file mode 100644 index 00000000..6eb648db --- /dev/null +++ b/src/components/Course/chooseCourseScorm.vue @@ -0,0 +1,224 @@ + + + + + diff --git a/src/components/Course/courseExam.vue b/src/components/Course/courseExam.vue index baa00ae2..c4f5423d 100644 --- a/src/components/Course/courseExam.vue +++ b/src/components/Course/courseExam.vue @@ -1,200 +1,366 @@ - + + diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 59822244..a84bbd49 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -46,6 +46,10 @@ export default { props: { // 值 value: [String, Object, Array], + beforeMsg:{ + type: String, + default:'' + }, showList: { type: Boolean, default: false @@ -75,10 +79,14 @@ export default { type: Number, default: 1024, }, + scorm:{ + type:String, + default:'' + }, // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, - default: () => ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3"], + default: () => ["doc", "xls", "ppt","docx", "xlsx", "pptx","png","txt", "pdf","jpg","gif","bmp","mp4","mp3","zip"], }, // 是否显示提示 isShowTip: { @@ -131,6 +139,10 @@ export default { methods: { // 上传前校检格式和大小 handleBeforeUpload(file) { + if(this.beforeMsg){ + this.$message({message:this.beforeMsg,type:'error',offset:100}) + return false; + } // 校检文件类型 if (this.fileType) { let fileExtension = ""; @@ -148,6 +160,13 @@ export default { //this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`); return false; } + + //console.log(this.scorm,fileExtension,'upload'); + if(this.scorm && this.scorm==fileExtension){ + this.data.dir="scorm"; + } + //console.log(this.data,'this.data'); + } // 校检文件大小 if (this.fileSize) { @@ -158,6 +177,7 @@ export default { return false; } } + if(this.loading) { this.isLoading = true; } @@ -200,7 +220,7 @@ export default { } }, created() { - + this.fileList = this.list; }, }; @@ -215,14 +235,14 @@ export default { line-height: 2; margin-bottom: 10px; position: relative; - + } .upload-file-list .ele-upload-list__item-content { display: flex; justify-content: space-between; align-items: center; color: inherit; - + } .ele-upload-list__item-content-action .el-link { margin-right: 10px; diff --git a/src/components/HomePage/homePage.vue b/src/components/HomePage/homePage.vue index 672aa133..67988eaf 100644 --- a/src/components/HomePage/homePage.vue +++ b/src/components/HomePage/homePage.vue @@ -22,6 +22,7 @@ 个人设置 个人中心 + 教师简介 关注TA 已关注 {{pageId == userInfo.aid ? '留言板':'去留言'}} @@ -65,7 +66,7 @@
{{pageId == userInfo.aid? '我的U币(累计)':'TA的U币(累计)'}}
-
{{statData.uvalue}}
+
{{statData.uvalue < 0 ? 0 : statData.uvalue}}
+ +
+
教师职业照
+ +
+
+
教师经历
+ {{ teachtext.workExperience }} +
+
+
擅长课程
+
+ {{ teachtext.courses }} +
+ +
+
+
专长
+
+ {{ item }} +
+ + +
+
diff --git a/src/components/Portal/course/couresinteract.vue b/src/components/Portal/course/couresinteract.vue new file mode 100644 index 00000000..f56ce58f --- /dev/null +++ b/src/components/Portal/course/couresinteract.vue @@ -0,0 +1,709 @@ + + + + + diff --git a/src/components/Portal/interactBar.vue b/src/components/Portal/interactBar.vue index a97719d8..599a56ec 100644 --- a/src/components/Portal/interactBar.vue +++ b/src/components/Portal/interactBar.vue @@ -38,7 +38,7 @@
- + {{ data.favorites? data.favorites:0}}
diff --git a/src/components/PortalFloatTools.vue b/src/components/PortalFloatTools.vue index 2cdbf9bf..b119eb9b 100644 --- a/src/components/PortalFloatTools.vue +++ b/src/components/PortalFloatTools.vue @@ -118,6 +118,7 @@ + diff --git a/src/components/PortalHeader.vue b/src/components/PortalHeader.vue index f9262ee4..1db706ad 100644 --- a/src/components/PortalHeader.vue +++ b/src/components/PortalHeader.vue @@ -181,8 +181,10 @@ export default { this.sex = this.userInfo.sex; this.$store.dispatch('refrashMsg'); this.loadBoeData(); + //this.loadPopupConfig(); }, methods: { + setCurIdentity(iden){ this.$store.dispatch('SetCurIdentity',iden); }, diff --git a/src/components/Scorm/preview.vue b/src/components/Scorm/preview.vue new file mode 100644 index 00000000..2c5b25db --- /dev/null +++ b/src/components/Scorm/preview.vue @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/src/components/UcHeader/Index.vue b/src/components/UcHeader/Index.vue index dce50813..1fd0ebef 100644 --- a/src/components/UcHeader/Index.vue +++ b/src/components/UcHeader/Index.vue @@ -48,7 +48,7 @@
学员 教师 - 管理员 + 管理员
@@ -74,13 +74,13 @@
我的U币(累计)
-
{{statData.uvalue}}
+
{{statData.uvalue < 0 ? 0 : statData.uvalue}}
- + - +
@@ -92,6 +92,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; import { mapGetters } from 'vuex' import apiStart from '@/api/phase2/stat.js' + import testUser from '@/utils/testUsers.js' export default { name: 'UcHeader', computed:{ @@ -103,6 +104,7 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; data(){ return { fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL, + isTest:false, statData:{ evalue: 0,//经验值 level: "LV1",//级别 @@ -130,8 +132,11 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; this.loadUserStat(); this.$bus.$on('u-Currency',(num)=>{ this.statData.uvalue = num; - }) - + }) + //console.log(this.userInfo.loginName,'this.userInfo.loginName') + if(testUser.isTest(this.userInfo.loginName)){ + this.isTest=true; + } }, methods:{ loadUserStat(){//获取经验值和等级 @@ -157,6 +162,13 @@ import {userAvatarText,cutFullName} from "@/utils/tools.js"; setCurIdentity(iden){ this.$store.dispatch('SetCurIdentity',iden); + this.$router.push('/manager/index'); + // if(this.isTest){ + // //this.$router.push('/manage/learningpath'); + // location.href='/manage/learningpath'; + // }else{ + // this.$router.push('/manager/index'); + // } }, jumrank(){ this.$router.push('/user/ranking'); diff --git a/src/components/UserCenter/menu.vue b/src/components/UserCenter/menu.vue index 984161cb..aed1edff 100644 --- a/src/components/UserCenter/menu.vue +++ b/src/components/UserCenter/menu.vue @@ -14,7 +14,7 @@ :default-active="activeMenu" router active-text-color="#3379FB" - :default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','myqa','notice','mystudy', 'course', 'exam', 'u001', 'u002', 'u003', 'u004']" + :default-openeds="['manageTodo','manageFinish','teacherTodo','teacherFinish','myqa','notice','mystudy', 'course', 'exam', 'u001', 'u002', 'u003', 'u004','mylecnotes','mycaseRecord']" class="el-menu-vertical" @open="handleOpen" @close="handleClose" @@ -99,12 +99,12 @@ 旧版管理员界面 - + - + + \ No newline at end of file diff --git a/src/views/course/Mylecnotes.vue b/src/views/course/Mylecnotes.vue new file mode 100644 index 00000000..c39bd6ad --- /dev/null +++ b/src/views/course/Mylecnotes.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/views/exam/ExamList.vue b/src/views/exam/ExamList.vue index f3886a8d..f6e67f13 100644 --- a/src/views/exam/ExamList.vue +++ b/src/views/exam/ExamList.vue @@ -58,22 +58,36 @@ {{ scope.row.published ? '已发布' : '未发布' }} + + + @@ -108,33 +122,32 @@ --> - + - + - + + - + - + - + + - + --> - + - + 允许查看 不允许查看 @@ -182,7 +191,7 @@ - + 允许查看 不允许查看 @@ -191,8 +200,8 @@ - - + + @@ -200,8 +209,7 @@ - - + 先选择试卷 试卷有 {{qnum}} 道试题 @@ -217,10 +225,11 @@ - - 试题乱序 - 选项乱序 - 全部乱序 + + 试题乱序 + 选项乱序 + 全部乱序 + 不乱序 @@ -228,7 +237,7 @@ - + 最高一次 最后一次 @@ -236,7 +245,7 @@ - + 独立使用 课程内部 @@ -244,10 +253,10 @@ - + - + @@ -287,7 +296,7 @@ {{ resOwnerName(detailInfo.resOwner1) }}/{{resOwnerName(detailInfo.resOwner2)}}{{ detailInfo.resOwner3 ? '/' : ''}}{{ resOwnerName(detailInfo.resOwner3) }} --> - + 测试模式 练习模式 @@ -652,6 +661,7 @@ + @@ -668,13 +678,16 @@ import usergroupApi from "@/api/modules/usergroup"; import pushRecordApi from "@/api/modules/pushRecord"; import {toScoreTow} from '@/utils/tools.js' import apiUserBasic from '@/api/boe/userbasic.js'; +import editPaper from "@/components/Exam/EditPaper"; export default { name: 'articleItems', + components:{editPaper}, computed: { ...mapGetters(['resOwnerMap','sysTypeMap']), }, data() { return { + swichpublished:false, toScoreTow, qnum:0,//这里默认是30吧 examDateTime:[], @@ -757,6 +770,25 @@ export default { this.loadData() }, methods: { + editPaper(row){ + if(!row.paperId){ + this.$message.error("此考试还未选择试卷"); + return; + } + this.$refs.comEditPaper.show(row.paperId); + }, + open(row,flag) { + this.$confirm('确定要下架改考试么?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.enableddata(row,flag); + this.$message({ type: 'success', message: '下架成功!' }); + }).catch(() => { + this.$message({ type: 'info', message: '已取消下架' }); + }); + }, exportsList(){ if(this.answerData.data.length == 0){ return this.$message.warning('暂无导出数据!') @@ -988,6 +1020,7 @@ export default { } }, editData(row) { + this.swichpublished = row.published; if(this.questDirOptions.length==0){ this.findPapers();//获取试卷列表 } @@ -1040,6 +1073,22 @@ export default { }) }) }, + enableddata(row,flag){ + //console.log(row,flag) + let query = { + id:row.id, + enabled:flag + } + //console.log(query) + apiTest.enabled(query).then(res =>{ + if(res.status == 200){ + row.enabled=flag; + }else{ + this.$message({ type: 'error', message: res.message}) + } + }) + + }, releaseData(row,num) { let publish = num; this.$confirm(`正在${publish? '':'取消'}发布考试, 是否继续?`, '提示', { diff --git a/src/views/exam/Question.vue b/src/views/exam/Question.vue index f3ea1bb9..521bfe8d 100644 --- a/src/views/exam/Question.vue +++ b/src/views/exam/Question.vue @@ -14,19 +14,11 @@ --> - - - + + - +
@@ -34,15 +26,8 @@ 重置 添加
- +
@@ -81,8 +66,7 @@
-
- - 类型 - + +
+ 类型 + 单选 多选 判断题 @@ -105,41 +88,58 @@
- + - + + + + +
+ + 删除 +
+
+ + 点击上传图片 +
jpg/png文件不超过500kb
+
+
+
-
+
- + - 正确 - 正确 + + + + 点击上传图片 + + + 正确 + 正确 删除
@@ -147,30 +147,24 @@ 添加选项 - - - - - - + + + + + + + + + + + - +
@@ -182,61 +176,58 @@
- + - + + + + + +
+ + 删除 +
+
+ + 点击上传图片 +
jpg/png文件不超过500kb
+
+
+
+
- 正确 - 错误 + 正确 + 错误 - + + :value="item.value" > - - + + + + + show-word-limit> +
@@ -244,28 +235,47 @@
+
-
【单选题】{{question.title}}({{question.defaultScore}}分)
+
+
【单选题】{{question.title}}({{question.defaultScore}}分)
+
+
-   - {{numberToLetter(i + 1)}}: - {{question.optionList[i].content}} +
+ {{item.isAnswer? '√':''}} + {{numberToLetter(i + 1)}}: + {{item.content}} +
+
+ +
-
【多选题】{{question.title}}({{question.defaultScore}}分)
+
+
【多选题】{{question.title}}({{question.defaultScore}}分)
+
+
-   -   - {{numberToLetter(i + 1)}}: - {{item.content}} +
+ {{item.isAnswer? '√':''}} + {{numberToLetter(i + 1)}}: + {{item.content}} +
+
+ +
-
【判断题】{{question.title}}({{question.defaultScore}}分)
+
+
【判断题】{{question.title}}({{question.defaultScore}}分)
+
+
 正确  错误
@@ -289,6 +299,7 @@ import { numberToLetter} from "../../utils/tools.js"; import { mapGetters,mapActions} from 'vuex'; import fileUpload from '@/components/FileUpload/index.vue'; import { setTimeout } from 'timers'; +import { getToken } from "@/utils/token"; // import {resOwnerIndexName} from '@/utils/type.js'; const questionData = { type: 1, @@ -298,12 +309,13 @@ const questionData = { project: "", createPerson: "", moduel: "", + images:"", statue: 0, optionList: [ - { content: "", score: "", isAnswer: false }, - { content: "", score: "", isAnswer: false }, - { content: "", score: "", isAnswer: false }, - { content: "", score: "", isAnswer: false }, + { content: "", score: "", isAnswer: false ,images:"",imgList:[]}, + { content: "", score: "", isAnswer: false ,images:"",imgList:[]}, + { content: "", score: "", isAnswer: false ,images:"",imgList:[]}, + { content: "", score: "", isAnswer: false ,images:"",imgList:[]}, ], // resSysId: [], // 试题目录 difficulty: "", // 难度 @@ -317,6 +329,13 @@ export default { }, data() { return { + curOption:[], + uploadImgUrl: process.env.VUE_APP_BASE_API + "/xboe/sys/xuploader/file/upload", // 上传的图片服务器地址 + imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL, + headers: { + 'XBOE-Access-Token': getToken(), + }, + fileList:[], resOwnerListMap: [], // resOwnerName: resOwnerIndexName, ownership: [], @@ -325,18 +344,9 @@ export default { viewVolumeShow: false, isAdd: false, optionsList: [ - { - value: "1", - label: "单选", - }, - { - value: "2", - label: "多选", - }, - { - value: "3", - label: "判断", - }, + {value: "1",label: "单选"}, + {value: "2",label: "多选"}, + {value: "3",label: "判断"}, ], inputValue: "", params: { type: "", resSysId: "", title: "", ownership: [] }, @@ -345,24 +355,12 @@ export default { count: 0, pageIndex: 1, url: `${this.webBaseUrl}/temp/exam.png`, - resourceProps: { - value: "code", - label: "name", - }, + resourceProps: {value: "code",label: "name"}, question: questionData, difficultyOptions: [ - { - value: 1, - label: "容易", - }, - { - value: 2, - label: "中等", - }, - { - value: 3, - label: "困难", - }, + {value: 1,label: "容易"}, + {value: 2,label: "中等"}, + {value: 3,label: "困难"}, ], addQuestionDialog: false, questionRules: { @@ -377,11 +375,32 @@ export default { this.loadData(1); }, mounted() { + this.getResOwnerTree().then(rs=>{ this.resOwnerListMap=rs; }); }, methods: { + + handleUploadOptionsSuccess(optIdx,res){ + //console.log(optIdx,'optIdx'); + //console.log(res,'res'); + this.question.optionList[optIdx].images=res.result.filePath; + this.question.optionList[optIdx].imgList=[ + {url:res.result.httpPath}, + ] + }, + handleUploadSuccess(res) { + //console.log(res.result.filePath); + this.question.images=res.result.filePath; + }, + handleRemove(file, fileList) { + console.log(file, fileList); + //需要同时删除已上传的图片,后续完善要加上 + }, + beforeRemove(file, fileList) { + return this.$confirm(`您确定移除图片吗?`); + }, downloadTemplate(){ let fileName = "试题导入模板.xls"; let link = document.createElement('a'); //创建a标签 @@ -514,6 +533,7 @@ export default { // 判断题没有optionList this.question.optionList = []; } + console.log(questionData,'llkk') examQuestionApi .save(this.question) .then((res) => { @@ -579,9 +599,8 @@ export default { }, editQuestion(row) { this.isAdd = false; - examQuestionApi - .detail(row.id) - .then((res) => { + let $this=this; + examQuestionApi.detail(row.id).then((res) => { if (res.status == 200) { this.addQuestionDialog = true; this.question = res.result; @@ -599,9 +618,16 @@ export default { if (this.question.optionList == null) { this.question.optionList = []; } + this.question.optionList.forEach(opt=>{ + if(opt.images){ + opt.imgList=[{url:this.imageBaseUrl+opt.images}]; + }else{ + opt.imgList=[]; + } + + }) } - }) - .catch((err) => { + }).catch((err) => { this.$message({ type: "error", message: err }); }); }, @@ -612,9 +638,13 @@ export default { this.addQuestionDialog = true; this.question.type = type; }, + deleteQImage(){ + this.question.images=''; + //同时后吧删除图片,后续要补上 + }, addOption() { if (this.question.optionList.length < 10) { - this.question.optionList.push({ content: "", score: "", isAnswer: 0 }); + this.question.optionList.push({ content: "", score: "", isAnswer: 0 ,images:""}); } }, removeOption(i) { @@ -627,6 +657,47 @@ export default { diff --git a/src/views/exam/Test.vue b/src/views/exam/Test.vue index 389309ad..05aba755 100644 --- a/src/views/exam/Test.vue +++ b/src/views/exam/Test.vue @@ -11,8 +11,7 @@
  • 考试时长: {{ testPaper.testDuration }}分钟
  • 及格线: {{ testPaper.passLine }}
  • -
  • 开始时间: - {{ testPaper.entranceTime }}
  • +
  • 开始时间:{{ testPaper.entranceTime }}
  • 尝试次数: {{ testPaper.times }}
  • 结束时间: {{ testPaper.deadlineTime }}
@@ -27,7 +26,10 @@ {{tipText}}
- {{btnText}} + + {{btnText}} + + 此考试已下架
考试已结束
@@ -72,7 +74,10 @@
判断题
-
{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)
+
+
{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)
+
+
正确 @@ -86,12 +91,14 @@
单选题
-
{{ i + 1 + judge.length }}、{{ question.title }}({{question.defaultScore}}分)
+
+
{{ i + 1 + judge.length }}、{{ question.title }}({{question.defaultScore}}分)
+
+
- - {{ numberToLetter(j+1) }}、{{ option.content }} - + {{ numberToLetter(j+1) }}、{{ option.content }} +
@@ -100,12 +107,14 @@
多选题
- {{ i + 1 + judge.length + single.length }}、{{ question.title }}({{question.defaultScore}}分) +
{{ i + 1 + judge.length + single.length }}、{{ question.title }}({{question.defaultScore}}分)
+
- {{ numberToLetter(j + 1) }}、{{ option.content }} + {{ numberToLetter(j + 1) }}、{{ option.content }} +
@@ -122,11 +131,14 @@ 关闭
-
+
判断题
-
{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)
+
+
{{ i + 1 }}、{{ question.title }} ({{question.defaultScore}}分)
+
+
正确 @@ -143,10 +155,15 @@
单选题
-
{{ i + 1 + judge.length }}、{{ question.title }}({{question.defaultScore}}分)
+
+
{{ i + 1 + judge.length }}、{{ question.title }}({{question.defaultScore}}分)
+
+
- {{ numberToLetter(j+1) }}、{{ option.content }} + + {{ numberToLetter(j+1) }}、{{ option.content }} +

正确答案:{{item.isAnswer?numberToLetter(a+1):''}}

@@ -157,13 +174,14 @@
多选题
- {{ i + 1 + judge.length + single.length }}、{{ question.title }}({{question.defaultScore}}分) +
{{ i + 1 + judge.length + single.length }}、{{ question.title }}({{question.defaultScore}}分)
+
- {{ numberToLetter(j + 1) }}、{{ option.content }} + {{ numberToLetter(j + 1) }}、{{ option.content }} +
@@ -178,11 +196,15 @@
-
{{didx +1}}.【{{getTypeName(ditem.type)}}】{{ditem.title}}
+
+
{{didx +1}}.【{{getTypeName(ditem.type)}}】{{ditem.title}}
+
+
{{numberToLetter(optIdx+1)}}, {{opt.content}}
+
@@ -239,6 +261,7 @@ export default { data() { return { loading:0, + imageBaseUrl:process.env.VUE_APP_FILE_BASE_URL, toScoreTow, examId:'',//考试的id taskId:'',//考试任务的id @@ -305,7 +328,7 @@ export default { if(this.$route.query.refType){ this.refType = this.$route.query.refType; } - + if(this.examId) { this.loadData() }else{ @@ -966,7 +989,7 @@ export default { } .test-info { // text-align: center; - width: 500px; + width: 600px; margin: 0 auto; background: #eee; border-radius: 16px; @@ -986,6 +1009,15 @@ export default { margin: 0 20px; } } + +.qimg{ + padding-left: 30px; + width:100%; + .qimg-fit{ + width:100%; + object-fit:scale-down + } +} .question-type { font-weight: 500; font-size: 20px; diff --git a/src/views/exam/TestPaper.vue b/src/views/exam/TestPaper.vue index 227ebfb0..9c07c24a 100644 --- a/src/views/exam/TestPaper.vue +++ b/src/views/exam/TestPaper.vue @@ -48,6 +48,7 @@ @@ -189,10 +190,16 @@
-
{{ item.title }}
+
+
{{ item.title }}
+
+
{{item.answer=='true'?'正确':'错误'}}
-
{{ optIdx + 1 }}, {{ opt.content }}
+
+
{{ optIdx + 1 }}, {{ opt.content }}
+
+
@@ -218,18 +225,24 @@ - +
关闭
-
{{index+1}}.【{{typeFilter(item.type)}}】{{item.title}}
-
+
{{index+1}}.【{{typeFilter(item.type)}}】{{item.title}} +
+
+
正确答案:{{item.answer=='true'? '正确': '错误'}}
-
{{numberToLetter(inx+1)}}:{{cc.content}}
+
+ {{numberToLetter(inx+1)}}:{{cc.content}} + +
+
组织领域
- - 全部 - {{ item.name}} - +
+
全部
+
+
{{item.name}}
+
+
+
@@ -32,18 +38,25 @@
-
+
专业分类
- @@ -61,6 +74,8 @@ 最热 最新 + 优秀案例 +
@@ -84,9 +99,9 @@
-
{{ orgDomainTranslate(item.orgDomain) }}
-
{{ orgDomainTranslate(item.orgDomainParent) }}
-
{{ majorTypeTranslate(item) }}
+
{{orgDomainTranslate(item.orgDomainParent) }}
+ +
{{ majorTypeTranslate(item) }}
{{ item.keyword1 }}
{{ item.keyword2 }}
{{ item.keyword3 }}
@@ -105,7 +120,7 @@
-
+
@@ -244,29 +259,47 @@ export default { isOk = false; } return isOk; + }, + tagList(){ //列表属性,用于计算 + let list=[]; + if(this.keyWord){ + list.push({ type:'0', code:'keyword', name:this.keyWord, checked:true}) + } + this.domain.forEach(item=>{ + if(item.fielclass){ + list.push(item); + } + }); + this.speciData.forEach(item=>{ + if(item.fielclass){ + list.push(item); + } + }); + return list; } }, data() { return { fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, resonimg:{}, - speciData:[], + domain: [],//组织领域 + domainAll:[],//全部的组织领域 + speciData:[],//专业分类 moreState: 1, // 1 加载更多 2 加载中 3无数据 isSeach: false, searchwd: false, showAll: true, //是否展开全部 initHeight:40,//原始 高度 - searchRecords: [], + searchRecords: [],//热门搜索词 caseList: { count: 0, list: [] }, - ankingList: [], - Popularity: [], - Positive: [], - domain: [], - Profess: [], - optionsList: [], //分类数据 + ankingList: [],//排行数据1 + Popularity: [],//排行数据2 + Positive: [],//排行数据3 + //Profess: [], + //optionsList: [], protocolDialogVisible: false, protocolConfirmButton: true, queryCondition: { @@ -276,9 +309,10 @@ export default { orderField: "views", // breCommend:null, keyWord: "", - majorType:null, //专业分类 - orgDomain: null, // 组织领域 - orderAsc: false + majorType:'', //专业分类 + orgDomain: '', // 组织领域 + orderAsc: false, + excellent:false }, keyWord: "", anking: 2, @@ -287,20 +321,27 @@ export default { type2: 0, type3: 0, isFind: false, - searchTags: [], - orgData: [], + //searchTags: [], + //orgData: [], + fielclass:true, + fielclassjor:true, + // orgDomainData:'', + // orgsto:[], + // majorTypeData:'', + // majsto:[], + // Domarr:[], + // majarr:[], + // domData:[], + // majData:[], }; }, mounted() { - if(this.searchTags.length == 0){ - this.queryCondition.majorType = null; - this.queryCondition.orgDomain = null; - }; + // if(this.searchTags.length == 0){ + // this.queryCondition.majorType = null; + // this.queryCondition.orgDomain = null; + // }; this.specialized(); - // this.$nextTick(function() { - // this.closeSearch(); - // }); if (!this.portalCase.readProtocol) { this.protocolDialogVisible = true; } @@ -312,11 +353,11 @@ export default { this.getPopularity(); this.searchterm(); this.getPositive(); - this.getProfess(); + //this.getProfess(); this.getdomain(); // this.getCaseData(); this.search(); - this.couresreso(); + this.couresreso(); window.addEventListener("scroll", this.handleScroll); }, @@ -334,6 +375,146 @@ export default { window.removeEventListener("scroll", this.handleScroll); }, methods: { + majorall(){ + this.queryCondition.majorType = ''; + this.fielclassjor=true; + this.speciData.forEach(item=>{ + item.fielclass = false; + }) + // if(this.fielclassjor){ + // let narr = this.fieldData; + // this.fieldData = narr.filter(item => { + // if(item.type == 'major_type') { + // console.log(item); + // item.fielclass = false; + // return false; + // }else{ + // return true; + // } + // }) + // } + //this.getCaseData(); + this.search(); + }, + domainall(){ + + this.queryCondition.orgDomain = ''; + this.domain.forEach(item=>{ + item.fielclass = false; + }) + this.fielclass=true; + + // if(this.fielclass){ + // var newArr = this.fieldData; + // this.fieldData = newArr.filter(item => { + // if(item.type == 'org_domain') { + // console.log(item); + // item.fielclass = false; + // return false; + // console.log(this.fieldData) + // }else{ + // return true; + // } + // }) + // } + //this.getCaseData(); + this.search(); + }, + fieldmajor(item){//专业分类 + this.fielclassjor = false; + item.fielclass = !item.fielclass; + this.search(); + // if(item.fielclass){ + // let has=this.fieldData.some(fd=>{ + // return fd.code==item.code; + // }); + // if(!has){ + // this.fieldData.push(item); + // } + // }else{ + // let delIdx=-1; + // this.fieldData.some((fd,fdidx)=>{ + // if(fd.code==item.code){ + // delIdx=fdidx; + // return true; + // } + // return false; + // }); + // if(delIdx>-1){ + // this.fieldData.splice(delIdx,1); + // } + // } + // this.majsto.push(item.code); + // this.majorTypeData = this.majsto.toString()//传给后端 + // this.queryCondition.majorType = this.majorTypeData; + //this.getCaseData(); + + //this.ceshiorg(); + }, + // ceshiorg(){//判断专业 + // this.majData = []; + // this.fieldData.forEach(itx =>{ + // if(itx.type == 'major_type'){ + // console.log(typeof itx); + // if(itx.fielclass == true){ + // this.majData.push(itx) + // } + // } + // }) + // console.log(this.majData); + // let b = JSON.stringify(this.majData); + // if(b == '[]'){ + // this.fielclassjor=true; + // } + // }, + // ceshidom(){//判断组织 + // this.domData = []; + // this.fieldData.forEach(itx =>{ + // if(itx.type == 'org_domain'){ + // console.log(typeof itx); + // if(itx.fielclass == true){ + // this.domData.push(itx) + // } + // } + // }) + // let b = JSON.stringify(this.domData); + // if(b == '[]'){ + // this.fielclass=true; + // } + // }, + fieldswich(item){//组织领域 + this.fielclass=false; + item.fielclass = !item.fielclass; + + // if(item.fielclass){ + // let has=this.fieldData.some(fd=>{ + // return fd.code==item.code; + // }); + // //console.log(has,'has') + // if(!has){ + // this.fieldData.push(item); + // } + // }else{ + // let delIdx=-1; + // this.fieldData.some((fd,fdidx)=>{ + // if(fd.code==item.code){ + // delIdx=fdidx; + // return true; + // } + // return false; + // }); + // if(delIdx>-1){ + // this.fieldData.splice(delIdx,1); + // } + // } + // this.orgsto.push(item.code); + // this.orgDomainData = this.orgsto.toString()//传给后端 + // this.queryCondition.orgDomain = this.orgDomainData; + //this.getCaseData(); + this.search(); + //this.ceshidom(); + }, + banJump() { if(this.resonimg.JumpUrl) { window.open(this.resonimg.JumpUrl); @@ -350,7 +531,14 @@ export default { let $this=this; apiCase.majorTypes().then(res =>{ if(res.status == 200){ + if (res.status == 200) { + res.result.forEach(item =>{ + item.fielclass = false; + item.type='major_type'; + }) + } this.speciData = res.result; + //this.Profess=res.result; this.$nextTick(function() { $this.initHeight = document.getElementById("searchBox").offsetHeight; $this.closeSearch(); @@ -390,7 +578,7 @@ export default { this.showAll = !this.showAll; var searchBoxHeght = document.getElementById("searchBox"); //console.log(this.initHeight,'this.initHeight'); - if(this.initHeight>80){ + if(this.initHeight>100){ this.searchwd = true; } //console.log(het,'het'); @@ -424,56 +612,60 @@ export default { } }); }, - - getdomain() { + async getdomain() { let key = "org_domain"; - apiDict.items(key).then(res => { + await apiDict.items(key).then(res => { if (res.status == 200) { + res.result.forEach(item =>{ + item.fielclass = false; + item.type=key; + }) this.domain = res.result; - if(res.result.length > 0) { - this.orgDomainLevel(res.result) - } + // if(res.result.length > 0) { + // this.orgDomainLevel(res.result) + // } } }); }, - getProfess() { - let key = "major_type"; - apiDict.items(key).then(res => { - if (res.status == 200) { - this.Profess = res.result; - } - }); - }, - orgDomainLevel(organization) { - this.orgData = []; - organization.forEach(item=>{ - this.orgData.push(item); - if(item.list && item.list != "" && item.list.length > 0){ - item.list.forEach(it =>{ - this.orgData.push(it); - }) - } - }) - }, + //删除,不再使用 + // getProfess() { + // let key = "major_type"; + // apiDict.items(key).then(res => { + // if (res.status == 200) { + // this.Profess = res.result; + // } + // }); + // }, + // orgDomainLevel(organization) { + // this.orgData = []; + // organization.forEach(item=>{ + // this.orgData.push(item); + // if(item.list && item.list != "" && item.list.length > 0){ + // item.list.forEach(it =>{ + // this.orgData.push(it); + // }) + // } + // }) + // }, orgDomainTranslate(code){ // 组织领域翻译 if(code == '') { return } + //console.log(code,'code') + //console.log(this.domain,'this.domain') let name = ''; - let data = this.orgData.find(item => item.code == code); - if(data == undefined){ - name = ''; - } else { + let data = this.domain.find(item => { + return item.code == code; + }); + if(data){ name = data.name; } return name; }, majorTypeTranslate(code){ // 专业分类翻译 let name = ''; - let data = this.Profess.find(item => item.code == code); - if(data == undefined){ - name = ''; - } else { + let data = this.speciData.find(item => item.code == code); + if(data){ name = data.name; } return name; @@ -484,7 +676,17 @@ export default { this.queryCondition.pageIndex = 1; this.search(); }, + searchexcellent(){ + //this.queryCondition.excellent =true; + this.queryCondition.orderField='excellentTime'; + this.search(); + //this.getCaseData(); + }, searchData(num) { + // if(num == 1){ + // this.queryCondition.excellent = !this.queryCondition.excellent; + // this.getCaseData(); + // } this.queryCondition.pageIndex = 1; this.queryCondition.orderField = num; this.getCaseData(); @@ -537,7 +739,9 @@ export default { this.queryCondition.pageIndex = item; }, search() { - apiSearchterm.save({ keyword: this.keyWord, type: 3 }); + if(this.keyWord){ + apiSearchterm.save({ keyword: this.keyWord, type: 3 }); + } if (!this.isFind) { this.isFind = true; } @@ -546,24 +750,42 @@ export default { this.queryCondition.keyWord = this.keyWord; } if(this.queryCondition.orgDomain == 0){ - this.queryCondition.orgDomain = null + this.queryCondition.orgDomain = '' } if(this.queryCondition.majorType == 0){ - this.queryCondition.majorType = null + this.queryCondition.majorType = '' } - - this.getCaseData(); }, async getCaseData() { - this.getTags(); + // this.fieldData + //this.queryCondition.pageIndex = 1; + let orgDomainList=[]; + let majorTypeList=[]; + this.tagList.forEach(tag=>{ + if(tag.type=='0'){ + this.queryCondition.keyWord=tag.name; + }else if(tag.type=='major_type'){ + majorTypeList.push(tag.code); + }else if(tag.type=='org_domain'){ + orgDomainList.push(tag.code); + } + }); + this.queryCondition.orgDomain =orgDomainList.join(','); + this.queryCondition.majorType =majorTypeList.join(','); + + if(this.queryCondition.orderField=='excellentTime'){ + this.queryCondition.excellent=true; + }else{ + this.queryCondition.excellent=''; + } + + //this.getTags(); if (this.queryCondition.pageIndex == 1) { this.caseList.list = []; } this.moreState = 2; - await apiCase - .queryList(this.queryCondition) - .then(res => { + await apiCase.queryList(this.queryCondition).then(res => { if (res.status == 200) { if (res.result.list.length > 0) { this.isSeach = false; @@ -596,62 +818,64 @@ export default { console.log(err); }); }, - getTags() { - this.searchTags = []; - let caseData = deepClone(this.queryCondition); - for (let i in caseData) { - if ( - caseData[i] !== "" && - i !== "pageIndex" && - i !== "pageSize" && - i !== "orderField" && - i !== "orderAsc" && - i !== "isTop" && - caseData[i] !== null && - caseData[i] !== undefined - ) { - if (caseData[i] == "0") { - return; - } - if(i == 'majorType'){ - this.searchTags.push({ type:'majorType',value:this.majorTypeTranslate(caseData[i])}) - } - if(i == 'orgDomain'){ - this.searchTags.push({type:'orgDomain',value:this.orgDomainTranslate(caseData[i])}) - } - if(i == 'keyWord'){ - this.searchTags.push({type:'keyWord',value:caseData[i]}) - } - } - } - }, + // getTags() { + // this.searchTags = []; + // let caseData = deepClone(this.queryCondition); + // for (let i in caseData) { + // if ( + // caseData[i] !== "" && + // i !== "pageIndex" && + // i !== "pageSize" && + // i !== "orderField" && + // i !== "orderAsc" && + // i !== "isTop" && + // caseData[i] !== null && + // caseData[i] !== undefined + // ) { + // if (caseData[i] == "0") { + // return; + // } + // if(i == 'majorType'){ + // this.searchTags.push({ type:'majorType',value:this.majorTypeTranslate(caseData[i])}) + // } + // if(i == 'orgDomain'){ + // this.searchTags.push({type:'orgDomain',value:this.orgDomainTranslate(caseData[i])}) + // } + // if(i == 'keyWord'){ + // this.searchTags.push({type:'keyWord',value:caseData[i]}) + // } + // } + // } + // }, tagsClose(tag, index) { - - for (let i in this.queryCondition) { - - if (tag.type === i) { - if (i == "majorType") { - this.queryCondition.majorType = ''; - } - if (i == "orgDomain") { - this.queryCondition.orgDomain = ''; - } - if (i == "keyWord") { - this.queryCondition.keyWord = ""; - this.keyWord = ""; - } - this.queryCondition[i] = ""; - this.searchTags.splice(index, 1); - if (i == "majorType") { - this.queryCondition.majorType = null; - } - if (i == "orgDomain") { - this.queryCondition.orgDomain = null; - } - - this.getCaseData(); - } + tag.fielclass=false; + if(tag.type==0){ + this.keyWord=''; } + // if(tag.type=='org_domain'){ + // console.log(tag) + // this.domain.some((m,idx)=>{ + // if(m.code=tag.code){ + // m.fielclass=false; + // return true; + // } + // return false; + // }) + // }else if(tag.type=='major_type'){ + // this.speciData.some((m,idx)=>{ + // if(m.code=tag.code){ + // m.fielclass=false; + // return true; + // } + // return false; + // }) + // }else if(tag.type=='keyWord'){ + // this.queryCondition.keyWord = ""; + // this.keyWord = ""; + // } + //this.fieldData.splice(index,1); + //this.getCaseData(); + this.search(); }, getCaseUserData(caseList) { @@ -723,6 +947,52 @@ export default { diff --git a/src/views/study/StudyPath.vue b/src/views/study/StudyPath.vue new file mode 100644 index 00000000..a7d12d82 --- /dev/null +++ b/src/views/study/StudyPath.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/study/StudyProject.vue b/src/views/study/StudyProject.vue new file mode 100644 index 00000000..6f893523 --- /dev/null +++ b/src/views/study/StudyProject.vue @@ -0,0 +1,30 @@ + + + + + diff --git a/src/views/study/coursenew.vue b/src/views/study/coursenew.vue index 889b987f..c59ad269 100644 --- a/src/views/study/coursenew.vue +++ b/src/views/study/coursenew.vue @@ -85,6 +85,9 @@
+
+ +