diff --git a/public/images/courseBg.png b/public/images/courseBg.png new file mode 100644 index 00000000..d793e2d3 Binary files /dev/null and b/public/images/courseBg.png differ diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js index ef3e1b26..a8c6adf6 100644 --- a/src/api/modules/cases.js +++ b/src/api/modules/cases.js @@ -6,8 +6,8 @@ import ajax from '@/utils/xajax.js' * orderField * orderAsc */ -const indexList = function(query) { - return ajax.post('/xboe/m/boe/cases/case-random', query); +const indexList = function (query) { + return ajax.post('/xboe/m/boe/cases/case-random', query); } /* *案例分页搜索查询 是否推荐 @@ -19,9 +19,12 @@ const indexList = function(query) { *@param(String) majorType 专业分类 * @param(String) majorDomain 专业领域 */ -const queryList = function(query) { - return ajax.post('/xboe/m/boe/cases/queryList', query); - } +const queryList = function (query) { + return ajax.post('/xboe/m/boe/cases/queryList', query); +} +const queryListV2 = function (query) { + return ajax.postJson('/xboe/m/boe/cases/queryListV2', query); +} /* 案例分页搜索查询 是否置顶 *@param(String) keyWord 关键词 @param(Boolean) isTop 是否置顶 true或false @@ -29,76 +32,77 @@ const queryList = function(query) { *@param(String) majorType 专业分类 * @param(String) majorDomain 专业领域 */ -const isTopList = function(query) { - return ajax.post('/xboe/m/boe/cases/isTopList', query); - } - /* 设置置顶 取消置顶 - @param(String) id - @param(Integer) isTop 是否置顶 0:未置顶,1:已置顶 - */ -const updateTop = function(id, isTop) { - return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`); - } - /* 删除案例 - *param(String) id 案例的id - */ -const del = function(id) { - return ajax.get('/xboe/m/boe/cases/delete?id=' + id); - } - /*案例详情 - @param(String) id 案例的id - @param(Boolean) addView 是否增加浏览量 - */ -const detail = function(id,addView) { - let pars='id=' + id; - if(addView){ - pars+='&addView='+addView - } - return ajax.get('/xboe/m/boe/cases/detail?'+pars); - } - /*推荐 - *@param (String) id 案例的id - *@param (String) title 案例的标题 - *@param (String) acceptAid 受众id - *@param (String) recommentThat 推荐说明 - */ -const savaRecommend = function(data) { - return ajax.post('/xboe/m/boe/recommend/save', data); - } - /* 推荐列表 - *没有参数 - */ -const query = function() { - return ajax.get('/xboe/m/boe/recommend/query'); +const isTopList = function (query) { + return ajax.post('/xboe/m/boe/cases/isTopList', query); +} +/* 设置置顶 取消置顶 + @param(String) id + @param(Integer) isTop 是否置顶 0:未置顶,1:已置顶 + */ +const updateTop = function (id, isTop) { + return ajax.get(`/xboe/m/boe/cases/updateTop?id=${id}&isTop=${isTop}`); +} +/* 删除案例 + *param(String) id 案例的id + */ +const del = function (id) { + return ajax.get('/xboe/m/boe/cases/delete?id=' + id); +} +/*案例详情 + @param(String) id 案例的id + @param(Boolean) addView 是否增加浏览量 + */ +const detail = function (id, addView) { + let pars = 'id=' + id; + if (addView) { + pars += '&addView=' + addView + } + return ajax.get('/xboe/m/boe/cases/detail?' + pars); +} +/*推荐 + *@param (String) id 案例的id + *@param (String) title 案例的标题 + *@param (String) acceptAid 受众id + *@param (String) recommentThat 推荐说明 + */ +const savaRecommend = function (data) { + return ajax.post('/xboe/m/boe/recommend/save', data); +} +/* 推荐列表 + *没有参数 + */ +const query = function () { + return ajax.get('/xboe/m/boe/recommend/query'); } /* *作者排行榜 @param pageSize 长度 */ -const usernameList= function(pageSize){ - return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`); +const usernameList = function (pageSize) { + return ajax.get(`/xboe/m/boe/cases/usernamelist?pageSize=${pageSize}`); } /* 人气榜 @param pageSize 长度 */ -const queryPraises=function(pageSize){ - return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`); +const queryPraises = function (pageSize) { + return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`); } /* 好评榜 @param pageSize 长度 */ -const queryComments=function(pageSize){ - return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`); +const queryComments = function (pageSize) { + return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`); } /** * 专业分类 * */ -const majorTypes=function (){ +const majorTypes = function () { return ajax.get('/xboe/m/boe/cases/majorTypes'); } + /** * 详情新*/ const details = function (id, addView) { @@ -115,8 +119,8 @@ const details = function (id, addView) { * ids * } * */ -const ids=function (data){ - return ajax.postJson('/xboe/m/boe/cases/ids',data); +const ids = function (data) { + return ajax.postJson('/xboe/m/boe/cases/ids', data); } /** @@ -126,8 +130,8 @@ const ids=function (data){ * excellent true、设置 false 取消 * } * */ -const excellent=function(data){ - return ajax.post('/xboe/m/boe/cases/excellent',data) +const excellent = function (data) { + return ajax.post('/xboe/m/boe/cases/excellent', data) } @@ -138,8 +142,8 @@ const excellent=function(data){ * pageSize * } * */ -const mylist=function (query){ - return ajax.post('/xboe/m/boe/cases/mylist',query); +const mylist = function (query) { + return ajax.post('/xboe/m/boe/cases/mylist', query); } /** @@ -149,26 +153,56 @@ const mylist=function (query){ * pageSize * } * */ -const exportCases=function (query){ - return ajax.post('/xboe/m/boe/cases/export',query); +const exportCases = function (query) { + return ajax.post('/xboe/m/boe/cases/export', query); } +/** + * 导出案例后加的 + * */ +const exports = function (query) { + return ajax.post('/xboe/m/boe/cases/exportCase', query, { responseType: 'blob' }); +} +/** + * @param + * 记录查看开始时间 + * caseRecommendId读取的案例的id + */ +const startReadTimer = (caseRecommendId) => ajax.get(`/xboe/m/boe/cases/recommend/startRead?caseRecommendId=${caseRecommendId}`); + +/** + * @param + * 记录查看结束时间 + * data{ + * caseId [案例id] + * browseDuration [浏览时间秒] + * } + */ +const endReadTimer = (data)=> ajax.postJson('/xboe/m/boe/cases/recommend/recordBrowseDuration',data) + + + + export default { - indexList, - queryList, - isTopList, - updateTop, - del, - detail, - savaRecommend, - query, - usernameList, - queryPraises, - queryComments, + indexList, + queryList, + queryListV2, + isTopList, + updateTop, + del, + detail, + savaRecommend, + query, + usernameList, + queryPraises, + queryComments, majorTypes, details, ids, excellent, mylist, - exportCases + exportCases, + exports, + startReadTimer, + endReadTimer } diff --git a/src/api/modules/coursePortal.js b/src/api/modules/coursePortal.js index 3af8fd4f..32d50bd2 100644 --- a/src/api/modules/coursePortal.js +++ b/src/api/modules/coursePortal.js @@ -40,8 +40,8 @@ const pageList = function(query) { * 课程的详细信息 * @param {String} id */ -const detail = function(id,preview) { - return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}`); +const detail = function(id,preview,course=false) { + return ajax.get(`/xboe/m/course/portal/detail?id=${id}&preview=${preview}&course=${course}`); } /** diff --git a/src/api/modules/type.js b/src/api/modules/type.js index 05b381aa..37abdd9a 100644 --- a/src/api/modules/type.js +++ b/src/api/modules/type.js @@ -2,6 +2,7 @@ * 分类 */ import ajax from '@/utils/xajax.js' +import request from '../unionAjax.js'; /** * 提取全量树形结构数据 @@ -11,6 +12,16 @@ import ajax from '@/utils/xajax.js' const tree = function(sysResType) { return ajax.get(`/xboe/type/tree-list?sysResType=${sysResType}&status=1`); } +/** + * + * @param {*} sysResType [1] + * @param {*} pid [字典类别码] + * @param {*} current [1当前页码] + * @returns + */ +const treeList = function(sysResType,pid,current) { + return request.get('/infrasApi',`/dict/page?type=${sysResType}&pid=${pid}¤t=${current}`); +} /** * 按父ID查询列表 @@ -24,5 +35,6 @@ const list = function(sysResType, parentId) { export default { tree, - list -} \ No newline at end of file + list, + treeList +} diff --git a/src/api/phase2/index.js b/src/api/phase2/index.js index c22ebb31..d0103c62 100644 --- a/src/api/phase2/index.js +++ b/src/api/phase2/index.js @@ -8,6 +8,12 @@ import ajax from '@/utils/xajax.js' const cases=function (type){ return ajax.get('/xboe/portal/index/cases?type='+type); } +/** + * 首页新改的推荐案例 + * */ +const newCases=function (){ + return ajax.get('/xboe/portal/index/casesV2'); +} /** * 首页文章排行榜 @@ -45,5 +51,6 @@ export default { articleViews, qaAnswers, articlelist, - courselist + courselist, + newCases } diff --git a/src/assets/images/icon/Bitmap.png b/src/assets/images/icon/Bitmap.png new file mode 100644 index 00000000..689ca3b6 Binary files /dev/null and b/src/assets/images/icon/Bitmap.png differ diff --git a/src/assets/images/icon/jhot.png b/src/assets/images/icon/jhot.png new file mode 100644 index 00000000..2e4a1d30 Binary files /dev/null and b/src/assets/images/icon/jhot.png differ diff --git a/src/assets/styles/portal.scss b/src/assets/styles/portal.scss index 6b6aa53e..8f2b399e 100644 --- a/src/assets/styles/portal.scss +++ b/src/assets/styles/portal.scss @@ -341,6 +341,54 @@ body {margin: 0px;padding: 0px;} width: 400px; } +//课程三级弹窗popperClass的样式 +.coursePopperClass{ + padding: 0; + margin-left: 0 !important; + box-shadow: 1px 1px 35px 1px rgba(118,136,166,0.21); + border-radius: 4px; + .course-three-box{ + min-height: 268px; + .course-three-box-title{ + font-size: 16px; + font-weight: 600; + height: 68px; + line-height: 80px; + background: linear-gradient(180deg, rgba(78,166,255,0.2) 0%, + rgba(78,166,255,0) 100%);padding-left: 40px; + } + .course-three{ + border-radius: 6px; + border: 1px solid #C7CBD2;display: inline-block; + height: 40px; + line-height: 40px; + padding: 0 20px; + margin-right: 20px; + cursor: pointer; + + &:hover{ + color: #387DF7; + border: 1px solid #387DF7 !important; + } + } + + .threeActive{ + color: #387DF7; + border: 1px solid #387DF7 !important; + } + } +} +// 标题提示 +.keywordInfo-class{ + background-color: #F2F5F7 !important; + min-width: 54px; + padding: 0 10px; + line-height: 26px; + text-align: center; + border: 1px solid #387DF7; + color: #387DF7 !important; +} + //以下是多分辨率的控制,注意,只是一些样式的高度,宽度,大小控制,非大小控制不要在这里写 @media screen and (max-width: 1366px){ @@ -384,11 +432,18 @@ body {margin: 0px;padding: 0px;} position: absolute; right:20px; bottom: 78px; - } + } .course-image-box { width:218; height: 122px; } + .course-img-box{ + height: 122px; + } + .keywordInfo{ + width: 40px !important; + margin-right: 2px; + } } .course-tit{ float: none !important; @@ -401,6 +456,13 @@ body {margin: 0px;padding: 0px;} height: 45px !important; } + // 课程导航 + .nav{ + width: 478px; + } + .upload{ + width: 300px; + } } @media screen and (max-width: 1680px) and (min-width:1367px){ @@ -429,7 +491,21 @@ body {margin: 0px;padding: 0px;} width: 278px; height: 156px; } + .course-img-box{ + height: 156px; + } + .keywordInfo{ + width: 45px !important; + margin-right: 13px; + } } + // 课程导航 + .nav{ + width: 654px; + } + .upload{ + width: 350px; + } } @media screen and (max-width: 1920px) and (min-width: 1681px){ @@ -458,6 +534,19 @@ body {margin: 0px;padding: 0px;} width: 346px; height: 192px; } + .course-img-box{ + height: 191px; + } + .keywordInfo{ + margin-right: 20px; + } + } + // 课程导航 + .nav{ + width: 828px; + } + .upload{ + width: 400px; } } @@ -488,6 +577,19 @@ body {margin: 0px;padding: 0px;} width: 340px; height: 191px; } + .course-img-box{ + height: 191px; + } + .keywordInfo{ + margin-right: 33px; + } + } + // 课程导航 + .nav{ + width: 974px; + } + .upload{ + width: 410px; } } diff --git a/src/components/Course/courseForm.vue b/src/components/Course/courseForm.vue index 81aac052..50f4b7d1 100644 --- a/src/components/Course/courseForm.vue +++ b/src/components/Course/courseForm.vue @@ -132,8 +132,10 @@ --> - - + + + + {{ tag }} PC端可见 @@ -251,6 +253,12 @@ --> + + + + {{ tag }} + + @@ -421,6 +429,8 @@ export default { components: { weikeContent, catalogCourseware, imageUpload, WxEditor, catalogSort,agreement,filecloud,choice,chooseOrg}, data() { return { + keywords:'',//关键字的定义 + tips:[], addOrder:1, checked:false, courseInfoFormCheckedShow:false, @@ -571,6 +581,17 @@ export default { this.loadUserGroup(); }, methods: { + // 关键字的更改 + changeKeywords(option){ + if(option.target.value){ + this.tips.push(option.target.value) + } + this.keywords = '' + }, + //关闭关键字 + closeKeywordsTag(item,index){ + this.tips.splice(index, 1); + }, showChooseOrg(){ this.$refs.refChooseOrg.dlgShow = true; }, @@ -744,6 +765,8 @@ export default { this.teacherValues = []; this.courseCrowds=[]; this.courseCoverurl = ''; + // 关键字的清空 + this.tips=[]; if (!editData) { //console.log("新建课程?"); @@ -862,6 +885,7 @@ export default { this.courseCoverurl = ''; this.courseInfo.coverImg = ''; }, + //获取课程信息 async getDetail(id) { this.curCourseId = id; this.orgName=''; @@ -873,6 +897,10 @@ export default { if(result.course.visible==''){ result.course.visible=true; } + // 给关键字赋值 + if(result.course.keywords){ + this.tips = result.course.keywords.split(',') || [] + } this.courseInfo = result.course; this.checked = false; this.contentInfo.list = result.contents; @@ -1156,6 +1184,7 @@ export default { if (this.showTags.length > 0) { this.courseInfo.tags = this.showTags.join(); } + this.courseInfo.keywords = this.tips.join(',') || '' //检查输入是否合法 //if(!this.requireSaveCourse){ // this.curStepIndex=2;//转到第二步处理 diff --git a/src/components/HomePage/putTo.vue b/src/components/HomePage/putTo.vue index f9c634bd..ee448f45 100644 --- a/src/components/HomePage/putTo.vue +++ b/src/components/HomePage/putTo.vue @@ -76,10 +76,11 @@ if(!data.id){ return; } - if(item.info.deleted){ + if(data.deleted){ this.$message.warning("此问题已删除"); return; } + this.$router.push({ path: '/qa/answer', query: { id: data.id } }); }, diff --git a/src/components/Portal/authorInfo.vue b/src/components/Portal/authorInfo.vue index 49a67cdd..d7418ea8 100644 --- a/src/components/Portal/authorInfo.vue +++ b/src/components/Portal/authorInfo.vue @@ -16,6 +16,7 @@ {{userName}} {{userInfo}} + diff --git a/src/views/portal/course/Detail.vue b/src/views/portal/course/Detail.vue index be40c0ee..0a284846 100644 --- a/src/views/portal/course/Detail.vue +++ b/src/views/portal/course/Detail.vue @@ -50,7 +50,7 @@
未评分
-
+
开始学习 {{btnName}}
@@ -69,14 +69,14 @@ - +
目标人群:
{{courseInfo.forUsers}}
课程价值:
{{courseInfo.value}}
详细介绍:
- +
{{item.section.name}}
@@ -92,7 +92,7 @@
- +
{{item.contentName}}
@@ -120,7 +120,8 @@
{{ item.teacherName }}
-
+ +
{{ cutOrgNamePath(item.orgInfo) }}
@@ -144,7 +145,7 @@ import apiCourse from '@/api/modules/course.js'; import apiUser from '@/api/system/user.js'; import courseStudy from '@/api/modules/courseStudy.js'; import apiCoursePortal from '@/api/modules/coursePortal.js'; -import { courseType,getType,toScore,userAvatarText} from '@/utils/tools.js'; +import { courseType,getType,toScore,userAvatarText,cutOrgNamePath } from '@/utils/tools.js'; import courseImage from "@/components/Course/courseImage.vue" export default { name: "atticle", @@ -154,6 +155,7 @@ export default { }, data() { return { + cutOrgNamePath, userAvatarText, getType, showQrcode: false, @@ -174,6 +176,7 @@ export default { commentsTtoal:0, toUsers:[],//可以@的用户列表 btnName:'开始学习', + isCrowd:false, //根据受众展示不展示 }; }, mounted() { @@ -185,13 +188,17 @@ export default { let $this=this; //页面只支取一次,所以先直接写在这里面 - apiCoursePortal.detail(id,false).then(rs=>{ + apiCoursePortal.detail(id,false,true).then(rs=>{ if(rs.status==200){ if(!rs.result.course.enabled || rs.result.course.deleted){ $this.$message.error('十分抱歉,此课程已停用,如需使用,请联系管理员。'); return; } + if(!rs.result.isCrowd){ + $this.$message.error('您没有查看该课程的权限'); + } + this.isCrowd = rs.result.isCrowd if(rs.result.teachers && rs.result.teachers.length > 0){ let userIds=[]; @@ -347,6 +354,7 @@ export default { item.avatar=this.fileBaseUrl + author.avatar; } item.sex = author.sex; + item.orgInfo = author.orgInfo return true; }else{ return false; @@ -363,7 +371,7 @@ export default { }; - diff --git a/src/views/portal/user/Message.vue b/src/views/portal/user/Message.vue index 03021036..cde75512 100644 --- a/src/views/portal/user/Message.vue +++ b/src/views/portal/user/Message.vue @@ -17,15 +17,16 @@ -->
- 设置已读 + 设置已读 删除所选
-

{{showMessage}}

+

{{ showMessage }}

- - {{ item.title }} + {{ item.title }}
- -
{{item.tip}}-{{ item.content }}
-
{{item.tip}}
- -
- 删除 + +
+
+ {{ item.tip }}-{{ item.content }}
+
{{ item.tip }} +
+
+
管理员{{ item.acceptName }}向您推荐了案例{{ item.content }},点击查看>>> +
+ +
+ 删除
{{ item.msgTime }}
-
- +
@@ -122,21 +126,21 @@
- 教师端:
- 1、支持个人授课记录/案例记录查询
- 2、支持个人修改/完善教师介绍并在个人主页中展示
-
-
- 管理员端:
- 1、新增学习路径图功能
- 2、新增学习项目功能
- 3、新增课程库功能
- 4、升级案例管理(设置优秀案例等)
- 5、升级考试功能(试题及提干支持图片,修改已发布考试的部分信息等)
- 6、课件支持 Scorm 格式
- 及上述功能配套的学员端功能
-
-
+ 教师端:
+ 1、支持个人授课记录/案例记录查询
+ 2、支持个人修改/完善教师介绍并在个人主页中展示
+
+
+ 管理员端:
+ 1、新增学习路径图功能
+ 2、新增学习项目功能
+ 3、新增课程库功能
+ 4、升级案例管理(设置优秀案例等)
+ 5、升级考试功能(试题及提干支持图片,修改已发布考试的部分信息等)
+ 6、课件支持 Scorm 格式
+ 及上述功能配套的学员端功能
+
+
我们会在1月份提供线上操作培训及详细的使用手册,便于大家熟悉和使用新增功能。