diff --git a/.gitignore b/.gitignore index 3c3629e6..4e637713 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +node_modules diff --git a/src/api/boe/teacher.js b/src/api/boe/teacher.js index 86fe2cc2..45b2fb0d 100644 --- a/src/api/boe/teacher.js +++ b/src/api/boe/teacher.js @@ -41,8 +41,8 @@ const teacherSystem = function(id) { teacher_id 教师id * } data 查询条件 */ - const teacherInfo = function(data) { - return ajax.get('/b1/system/teacher/teacher-info',data); + const teacherInfo = function(sysId) { + return ajax.get('/b1/system/teacher/teacher-info?teacher_id='+sysId); } /** * 教师删除接口 @@ -56,18 +56,90 @@ const teacherSystem = function(id) { /** * 教师启用禁用接口 * @param { - teacher_id + teacher_id status 状态;0:临时;1:正式;2:停用 * } 查询条件 */ const updateStatus = function(data) { return ajax.postJson('/b1/system/teacher/update-status',data); } +/** + * 教师授课记录查询接口 + * @param { + ```json + id // 教师id + courseType // 课程类型:‘1,2’:面授,训练班;‘0’:在线班 + pageSize // 每页数据条数 + page // 返回第几页数据 + isPage // 是否分页:0分页返回,1:不分页直接返回全部 + ``` + */ + const getCourseScore = function(data) { + return ajax.get(`/b1/system/teacher/course-score?id=${data.id}&courseType=${data.courseType}&pageSize=${data.pageSize}&page=${data.page}&isPage=${data.isPage}`); + } +/** + * 内部讲师-授课资格 查询接口 + * @param { + id // 教师id + pageSize // 每页数据条数 + page // 返回第几页数据 + ```} + */ + const getTeachingQualify = function(data) { + return ajax.get(`/b1/system/teacher/teaching-qualify?id=${data.id}&pageSize=${data.pageSize}&page=${data.page}`); + } +/** + * 内部讲师-未开班资源查询接口 + * @param { + id // 教师id + ``` + */ + const getCourseInfo = function(id) { + return ajax.get('/b1/system/teacher/course-info?id='+id); + } +/** + * 内部讲师-晋级过程查询接口 + * @param { + id // 教师id + ``` + */ + const teacherUpgradePrecess = function(id) { + return ajax.get('/b1/system/teacher/teacher-upgrade-precess?id='+id); + } +/** + * 内部讲师-修改模块讲师信息 + * @param { + courseId // 课程id + modId // 模块id + teacherId // 教师id + teachingTime // 授课时间 + */ + const editModelTeacher = function(data) { + return ajax.postJson('/b1/system/teacher/edit-model-teacher',data); + } +/** + * 内部讲师-删除模块讲师接口 + * @param { + courseId // 课程id + modId // 模块id + teacherId // 教师id + remark // 备注 + */ + const deleteModelTeacher = function(data) { + return ajax.postJson('/b1/system/teacher/delete-model-teacher',data); + } + export default { editTeacher, teacherSystem, teacherInfo, deleteTeacher, - updateStatus -} \ No newline at end of file + updateStatus, + getCourseScore, + getTeachingQualify, + getCourseInfo, + teacherUpgradePrecess, + deleteModelTeacher, + editModelTeacher +} diff --git a/src/api/modules/teacher.js b/src/api/modules/teacher.js index a74398ae..8c57901e 100644 --- a/src/api/modules/teacher.js +++ b/src/api/modules/teacher.js @@ -173,6 +173,17 @@ const end=function(id){ const exports=function(query){ return ajax.post('/xboe/teacher/export',query); } + +/** + * courseType // 课程类型:‘1,2’:面授,训练班;‘0’:在线班 + * sysId:教师的sysId + * tid: 教师的id + * @param {tid,sysId,countType,pageSize:100,pageIndex} query + */ +const findAllCourses=function(query){ + return ajax.post('/xboe/teacher/compose/find/courses',query); +} + export default { findByName, getInfoById, diff --git a/src/components/Course/auditCourse1.vue b/src/components/Course/auditCourse1.vue index 7ced0d0d..b3219c28 100644 --- a/src/components/Course/auditCourse1.vue +++ b/src/components/Course/auditCourse1.vue @@ -594,19 +594,23 @@ export default { } if($this.coursewareInfo.content.contentType == 40) { //console.log(con.content,'con.content'); - if(con.content != '' && con.content.indexOf('.pdf') > -1) { - $this.coursewareInfo.content.content = con.content; - }else { + // if(con.content != '' && con.content.indexOf('.pdf') > -1) { + // $this.coursewareInfo.content.content = con.content; + // }else { apiCourseFile.detail(con.contentRefId).then(cfrs => { if (cfrs.status == 200) { - $this.curCFile=cfrs.result; - $this.converStatus = cfrs.result.converStatus; $this.coursewareInfo.content.content = cfrs.result.previewFilePath; + if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { + $this.coursewareInfo.content.content = cfrs.result.filePath; + } else { + $this.curCFile=cfrs.result; + $this.converStatus = cfrs.result.converStatus; + } } else { $this.$message.error('加载pdf课件文件失败'); } }); - } + // } } } else if (con.sortIndex == 2) { $this.homeworkInfo = con; diff --git a/src/components/Course/auditCourse2.vue b/src/components/Course/auditCourse2.vue index 8d9c6f43..a568b230 100644 --- a/src/components/Course/auditCourse2.vue +++ b/src/components/Course/auditCourse2.vue @@ -649,20 +649,19 @@ export default { this.curriculumData.url = r.content } } else if(r.contentType == 40) { - this.contentData.content=""; - + this.contentData.content=""; apiCourseFile.detail(r.contentRefId).then(cfrs => { if (cfrs.status == 200) { this.curCFile=cfrs.result; - this.converStatus = cfrs.result.converStatus; this.contentData.content = cfrs.result.previewFilePath; //下面是为了兼容老数据 - if(!cfrs.result.previewFilePath && cfrs.result.filePath.index('.pdf')>-1){ - this.contentData.content=cfrs.result.filePath; + if(cfrs.result.previewFilePath == '' && cfrs.result.filePath.indexOf('pdf') > -1) { + this.contentData.content = cfrs.result.filePath; + } else { + this.converStatus = cfrs.result.converStatus; } //console.log(r.content); }else { - this.contentData.content=""; this.$message.error('加载pdf课件文件失败'); } }); diff --git a/src/components/Course/collectItem.vue b/src/components/Course/collectItem.vue index 80bbe847..ed691377 100644 --- a/src/components/Course/collectItem.vue +++ b/src/components/Course/collectItem.vue @@ -134,8 +134,9 @@ export default { diff --git a/src/views/portal/qa/Index.vue b/src/views/portal/qa/Index.vue index 71fc9ee8..7a15dc0a 100644 --- a/src/views/portal/qa/Index.vue +++ b/src/views/portal/qa/Index.vue @@ -48,7 +48,7 @@ --> -
+
@@ -85,7 +85,11 @@
加载更多 数据加载中 - 没有更多数据了 + 没有更多数据了 + 没有查询到相关内容 +
+
+
@@ -215,12 +219,16 @@ export default { //以上是整理后的数据 anking: 2, //排行榜 ankingList: [], - styleControl:2 + styleControl:2, + isSeach:false, }; }, mounted() { this.queryKeyWord = this.$route.query.keyword; this.queryConditions.keyword = this.queryKeyWord; + if(this.queryConditions.keyword != '') { + this.isSeach = true; + } this.getQaData(true); this.getAnkingData(); window.addEventListener("scroll", this.handleScroll); @@ -232,6 +240,7 @@ export default { methods: { emitInput(val){ this.queryKeyWord = val; + this.isSeach =true; this.search(); }, //发布回答 @@ -373,6 +382,7 @@ export default { .potallist(this.queryConditions) .then(res => { if (res.status == 200 && res.result.list.length > 0) { + this.isSeach = false; res.result.list.forEach(item => { item.authorInfo = { aid: '', name: '', orgInfo: '', avatar: '',sex:null, }; }); diff --git a/src/views/qa/ManageList.vue b/src/views/qa/ManageList.vue index 71982cb4..330825f1 100644 --- a/src/views/qa/ManageList.vue +++ b/src/views/qa/ManageList.vue @@ -32,7 +32,7 @@
- 搜索 + 搜索 重置
@@ -163,13 +163,17 @@ export default { } }, methods: { - + search(){ + this.queryObj.pageIndex = 1; + this.getQaList(); + }, reset(){ this.queryObj.orderField = '' this.queryObj.status = '' this.queryObj.isResolve = '' this.queryObj.keyword = '' this.queryObj.isEssence = '' + this.queryObj.pageIndex = 1; this.getQaList(); }, //查询问答列表数据 diff --git a/src/views/qa/MyList.vue b/src/views/qa/MyList.vue index 2e0f4fa5..6671abca 100644 --- a/src/views/qa/MyList.vue +++ b/src/views/qa/MyList.vue @@ -94,12 +94,14 @@ export default { reset(){ this.queryObj.keyWord = '', - this.queryObj.isResolve = '' + this.queryObj.isResolve = ''; + this.queryObj.pageIndex =1; this.getData(); this.isSearh = false; }, getList() { this.isSearh = true; + this.queryObj.pageIndex =1; this.getData(); }, //获取列表数据 diff --git a/src/views/qa/MyReplys.vue b/src/views/qa/MyReplys.vue index de8ee878..ae3992b1 100644 --- a/src/views/qa/MyReplys.vue +++ b/src/views/qa/MyReplys.vue @@ -85,6 +85,7 @@ export default { }, methods: { getList() { + this.queryObj.pageIndex = 1; this.isSearh = true; this.getData(); }, @@ -104,6 +105,7 @@ export default { }); }, reset(){ + this.queryObj.pageIndex = 1; this.queryObj.keyWord = ''; this.queryObj.isResolve = ''; this.getData(); diff --git a/src/views/qa/NeedReplys.vue b/src/views/qa/NeedReplys.vue index 0301f15a..2eaad5c0 100644 --- a/src/views/qa/NeedReplys.vue +++ b/src/views/qa/NeedReplys.vue @@ -116,10 +116,12 @@ export default { methods: { getlist(){ + this.dataList.pageIndex = 1; this.isSearh = true; this.getData(); }, reset(){ + this.dataList.pageIndex = 1; this.dataList.send = '' this.getData() this.isSearh = false; diff --git a/src/views/qa/TeacherList.vue b/src/views/qa/TeacherList.vue index 0f049a53..0a49562f 100644 --- a/src/views/qa/TeacherList.vue +++ b/src/views/qa/TeacherList.vue @@ -108,10 +108,12 @@ export default { components: {}, methods: { getList(){ + this.dataList.pageIndex = 1; this.isSearh = true; this.getData(); }, reset(){ + this.dataList.pageIndex = 1; this.dataList.send = '' this.getData(); this.isSearh = false; diff --git a/src/views/share/MyList.vue b/src/views/share/MyList.vue index 7834cc98..cbd9be3a 100644 --- a/src/views/share/MyList.vue +++ b/src/views/share/MyList.vue @@ -149,6 +149,9 @@ }, methods:{ queryData(){ + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; this.isSearh = true; if (this.tabName == 'qa') { this.findQa(); @@ -161,6 +164,9 @@ } }, resData() { + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; this.keyword = ''; this.isRead = ''; this.queryData(); diff --git a/src/views/share/ToList.vue b/src/views/share/ToList.vue index 6878033f..c7689e2d 100644 --- a/src/views/share/ToList.vue +++ b/src/views/share/ToList.vue @@ -170,6 +170,9 @@ export default { }, methods: { queryData() { + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; this.isSearh= true; if (this.tabName == 'qa') { this.findQa(); @@ -185,6 +188,9 @@ export default { resData() { this.keyword = ''; this.isRead = ''; + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; this.queryData(); this.isSearh= false; }, diff --git a/src/views/study/PortalIndex.vue b/src/views/study/PortalIndex.vue index b5459e7b..e5941d4d 100644 --- a/src/views/study/PortalIndex.vue +++ b/src/views/study/PortalIndex.vue @@ -1,1440 +1,1454 @@ - - - - - + + + + + diff --git a/src/views/user/MyAssess.vue b/src/views/user/MyAssess.vue index 610254f8..8a2a1e7b 100644 --- a/src/views/user/MyAssess.vue +++ b/src/views/user/MyAssess.vue @@ -7,7 +7,7 @@ - 搜索 + 搜索 重置 @@ -82,6 +82,10 @@ jumpRouter(item) { window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=quizsummary`) }, + getData() { + this.page=1; + this.findList(); + }, findList(){ let params={ keyword:this.keyword, @@ -110,8 +114,9 @@ this.findList() }, reset(){ - this.keyword = '' - this.findList(); + this.keyword = ''; + this.page=1; + this.findList(); }, getItem(item){ if(item.cover[0].url){ diff --git a/src/views/user/MyFavorites.vue b/src/views/user/MyFavorites.vue index 9df95d9d..0a0c008b 100644 --- a/src/views/user/MyFavorites.vue +++ b/src/views/user/MyFavorites.vue @@ -79,7 +79,7 @@
-
+
-
+
没有查询到相关内容
暂无数据
@@ -278,6 +278,10 @@ export default { }, methods: { queryData() { + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; + this.dataList.pageIndex = 1; this.isSearh = true; if (this.tabName == 'qa') { this.findQa(); @@ -296,6 +300,10 @@ export default { } }, resData() { + this.qaList.pageIndex = 1; + this.articleList.pageIndex = 1; + this.courseList.pageIndex = 1; + this.dataList.pageIndex = 1; this.keyword = ''; this.isRead = ''; this.courseList.type = '';