diff --git a/src/api/modules/course.js b/src/api/modules/course.js index 58b15b2d..210c0224 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -363,6 +363,13 @@ const setTop = function(data) { return ajax.post('/xboe/m/course/manage/top', data); } +/** + * 是否展示置顶相关功能 + */ +const showSetTop = function() { + return ajax.get('/xboe/m/course/manage/show-settop'); +} + /** * 获取置顶课程列表 */ @@ -509,6 +516,7 @@ export default { auditAndPublish, getAssess, setTop, + showSetTop, fetchTopCourseList, updateTopCourseSort, delSection, diff --git a/src/assets/images/svg/createCourse.svg b/src/assets/images/svg/createCourse.svg new file mode 100644 index 00000000..0b36cc79 --- /dev/null +++ b/src/assets/images/svg/createCourse.svg @@ -0,0 +1,9 @@ + + + 新建课程 + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/createCourse_active.svg b/src/assets/images/svg/createCourse_active.svg new file mode 100644 index 00000000..45290da5 --- /dev/null +++ b/src/assets/images/svg/createCourse_active.svg @@ -0,0 +1,9 @@ + + + 新建课程2 + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/export.svg b/src/assets/images/svg/export.svg new file mode 100644 index 00000000..9660890b --- /dev/null +++ b/src/assets/images/svg/export.svg @@ -0,0 +1,9 @@ + + + 导出 + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/export_active.svg b/src/assets/images/svg/export_active.svg new file mode 100644 index 00000000..a13586b4 --- /dev/null +++ b/src/assets/images/svg/export_active.svg @@ -0,0 +1,12 @@ + + + 导出 + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/pintotop.svg b/src/assets/images/svg/pintotop.svg new file mode 100644 index 00000000..18c8f8a4 --- /dev/null +++ b/src/assets/images/svg/pintotop.svg @@ -0,0 +1,9 @@ + + + 置顶 + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/pintotop_active.svg b/src/assets/images/svg/pintotop_active.svg new file mode 100644 index 00000000..9a319918 --- /dev/null +++ b/src/assets/images/svg/pintotop_active.svg @@ -0,0 +1,12 @@ + + + 置顶 + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/reset.svg b/src/assets/images/svg/reset.svg new file mode 100644 index 00000000..e23e0d3b --- /dev/null +++ b/src/assets/images/svg/reset.svg @@ -0,0 +1,9 @@ + + + 重置 + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/reset_active.svg b/src/assets/images/svg/reset_active.svg new file mode 100644 index 00000000..e23cdd86 --- /dev/null +++ b/src/assets/images/svg/reset_active.svg @@ -0,0 +1,12 @@ + + + zhongzhi- + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/search.svg b/src/assets/images/svg/search.svg new file mode 100644 index 00000000..69870f6b --- /dev/null +++ b/src/assets/images/svg/search.svg @@ -0,0 +1,13 @@ + + + sousuo + + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/search_active.svg b/src/assets/images/svg/search_active.svg new file mode 100644 index 00000000..cd151330 --- /dev/null +++ b/src/assets/images/svg/search_active.svg @@ -0,0 +1,12 @@ + + + chaxun + + + + + + + + + \ No newline at end of file diff --git a/src/assets/images/svg/收起.svg b/src/assets/images/svg/收起.svg new file mode 100644 index 00000000..88884817 --- /dev/null +++ b/src/assets/images/svg/收起.svg @@ -0,0 +1,11 @@ + + + 收起 + + + + + + + + \ No newline at end of file diff --git a/src/views/course/ManageListRemote.vue b/src/views/course/ManageListRemote.vue index 89423519..db1a4008 100644 --- a/src/views/course/ManageListRemote.vue +++ b/src/views/course/ManageListRemote.vue @@ -1,223 +1,189 @@ - - + + + + + + + - @@ -463,6 +425,7 @@ export default { sysTypeListMap: [], sysTypeList: [], resOwnerListMap: [], + showSetTopFeature: false, page: { pageIndex: 1,//第几页 pageSize: 10, // 每页多少条 @@ -575,6 +538,7 @@ export default { if (this.$route.query && this.$route.query.open && this.$route.query.open == 'new') { this.addNewCourse(); } + this.loadShowSetTopFlag(); // this.getTree(); // this.getTypeData(); // this.searchData(); @@ -610,13 +574,21 @@ export default { height: 8px; } #app::-webkit-scrollbar-thumb { - border-radius: 6px; - background-color: rgb(78, 166, 255); + border-radius: 4px; + background-color: #4284F7; } `; document.head.appendChild(style); this.scrollbarStyleApplied = true; }, + async loadShowSetTopFlag() { + try { + const res = await apiCourse.showSetTop(); + this.showSetTopFeature = res && res.status === 200 && res.result === true; + } catch (error) { + this.showSetTopFeature = false; + } + }, async remoteSearchTeacher(keyword) { const limited = (keyword || '').slice(0, 50); if (this.$refs.teacherSelect && this.$refs.teacherSelect.query !== limited) { @@ -841,6 +813,20 @@ export default { sortByDuration(a, b) { return this.getDurationNumber(a) - this.getDurationNumber(b); }, + formatSysTypeChain(row = {}) { + const codes = [row.sysType1, row.sysType2, row.sysType3]; + const names = codes + .filter(code => code !== undefined && code !== null && code !== '') + .map(code => this.sysTypeName(code)) + .filter(name => name && name !== ''); + return names.length ? names.join('/') : ''; + }, + sysTypeName(code) { + // console.log('code', code); + // console.log('this.sysTypeMap', this.sysTypeMap); + if (code == '') { return ''; } + return this.sysTypeMap.get(code); + }, getStudyCountNumber(row) { const count = row.studyCount !== undefined ? row.studyCount @@ -1047,7 +1033,7 @@ export default { }).catch(() => { this.$message({ type: 'error', message: '复制失败', duration: 5000 }); }); - }).catch(() => {}); + }).catch(() => { }); }, // 撤回接口 withdraw(row) { @@ -1066,7 +1052,7 @@ export default { }).catch(() => { this.$message({ type: 'error', message: '撤回失败', duration: 5000 }); }); - }).catch(() => {}); + }).catch(() => { }); }, reset() { this.resOwner = []; @@ -1111,10 +1097,6 @@ export default { const text = node.label || node.text || ''; return text.toLowerCase().includes(limited.toLowerCase()); }, - sysTypeName(code) { - if (code == '') { return ''; } - return this.sysTypeMap.get(code); - }, // 直接审核 examineData() { if (this.isExamine == 1) { @@ -1350,8 +1332,8 @@ export default { try { // {id:课程id,多个使用逗号分隔,Boolean erasable 是否物理删除,title:课程的名称, remark 备注} const { status } = await apiCourse.del(params); - if (status === 200) { - this.$message({ type: 'success', message: '删除成功', duration: 5000 }); //只是之前发布过的课程删除才可 + if (status === 200) { + this.$message({ type: 'success', message: '删除成功', duration: 5000 }); //只是之前发布过的课程删除才可 // if(!row.erasable){ // let event = { // key: "CourseDelete",//被管理员删除 @@ -1399,10 +1381,21 @@ export default { background-color: rgb(78, 166, 255); } -.manage-list-remote { - background-color: #fff; - // overflow: hidden; +.noSplitDatePicker { + + /* 初始隐藏范围选择器的分隔符与关闭图标 */ + ::v-deep .el-range-separator, + ::v-deep .el-range__close-icon { + display: none !important; + } } + +// .resetDatePicker { +// ::v-deep .el-date-editor { +// width: 250px; +// } +// } + .sou { padding: 0 0 0 0px !important; } @@ -1410,9 +1403,14 @@ export default { .el-col { padding: 0 0 0 10px !important; } + .table-wrapper { - padding: 0 20px; + padding: 16px; + background-color: #ffffff; + margin-top: 10px; + border-radius: 6px; } + .grid-content { padding-right: 0px; } @@ -1429,14 +1427,243 @@ export default { } .filter-wrapper { - padding: 12px 12px 10px 22px; + padding: 16px; + background-color: #ffffff; + border-radius: 6px; } -.filter-form { +.filter-row { + display: flex; + flex-wrap: nowrap; + align-items: center; + // margin-bottom: 10px; +} + +.filter-fields { display: flex; flex-wrap: wrap; - // align-items: center; - margin-bottom: 10px; +} + +.filter-field { + margin-right: 10px; + margin-bottom: 0; +} + +.filter-row--primary .filter-actions { +} + +.filter-row--advanced { + margin-top: 10px; +} + +.filter-field--name ::v-deep .el-input__inner { + width: 444px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; +} + +.filter-field--category ::v-deep.el-cascader { + line-height: 32px; + .el-input__inner { + width: 180px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input { + line-height: 32px; + } + .el-input__suffix { + line-height: 32px; + } + .el-input__icon { + line-height: 32px; + } +} + +.filter-field--teacher ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 180px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } +} +.filter-field--status ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 136px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input__icon { + line-height: 32px; + } +} +.filter-field--publish ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 136px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input__icon { + line-height: 32px; + } +} + +.filter-field--enabled ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 136px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input__icon { + line-height: 32px; + } +} + +.filter-field--open ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 124px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input__icon { + line-height: 32px; + } +} + + +.filter-field--resowner ::v-deep.el-cascader { + line-height: 32px; + .el-input__inner { + width: 180px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input { + line-height: 32px; + } + .el-input__suffix { + line-height: 32px; + } + .el-input__icon { + line-height: 32px; + } +} + +.filter-field--creator ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 136px; + height: 32px !important; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } +} + +.filter-field--create-from ::v-deep.el-select { + .el-select__input { + margin-left: 10px; + } + .el-input__inner { + width: 180px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + } + .el-input__icon { + line-height: 32px; + } +} + +.filter-field--time { + ::v-deep .el-input__inner { + width: 210px; + height: 32px; + background: #FFFFFF; + border-radius: 6px; + border: 1px solid rgba(0, 0, 0, .2); + line-height: 32px; + padding: 0 10px; + .el-input__icon { + line-height: 32px; + &.el-icon-date { + position: absolute; + right: 0; + } + &.el-icon-close { + margin-right: 8px; + } + } + .el-range-input { + text-align: left; + } + + .el-range-separator { + line-height: 30px; + } + .el-range-input { + line-height: 30px; + } + } +} +.toggle-link { + padding: 0; + font-size: 14px; + color: #4284F7; } .option-code { @@ -1444,40 +1671,12 @@ export default { color: #999; } -.filter-form .el-form-item { - margin-right: 10px; - margin-bottom: 0; - width: 200px; -} -::v-deep .learning-time-range.el-form-item { - width: 300px; -} - .teacher-filter { ::v-deep .choice { width: 100%; } } -.filter-form--primary { - flex-wrap: nowrap; -} - -.filter-form--advanced { - flex-wrap: nowrap; -} - -.filter-form--primary .filter-fields, -.filter-form--advanced .filter-fields { - display: flex; - flex-wrap: wrap; -} - - -.filter-form--primary .filter-actions { - margin-left: 20px; -} - .filter-actions--inline { padding-top: 0; } @@ -1486,28 +1685,147 @@ export default { margin-left: 10px; } +.filter-actions { + display: flex; + align-items: center; +} + +.filter-actions .icon-btn+.icon-btn { + margin-left: 8px; +} + +.filter-actions .toggle-link { + margin-left: 12px; + margin-right: 10px; +} + +.icon-btn { + width: 32px; + height: 32px; + cursor: pointer; + background-repeat: no-repeat; + background-position: center; + background-size: 32px 32px; + background-color: transparent; + transition: all 0.2s ease; +} + +.icon-btn:disabled { + cursor: not-allowed; + opacity: 0.6; +} + +.icon-btn--search { + background-image: url('~@/assets/images/svg/search_active.svg'); +} + +.icon-btn--search:hover, +.icon-btn--search:active { + // background-image: url('~@/assets/images/svg/search_active.svg'); +} + +.icon-btn--reset { + background-image: url('~@/assets/images/svg/reset.svg'); + background-size: 18px 18px; +} + +.icon-btn--reset:hover, +.icon-btn--reset:active { + background-image: url('~@/assets/images/svg/reset_active.svg'); + background-size: 32px 32px; +} + +.icon-btn--top { + background-image: url('~@/assets/images/svg/pintotop.svg'); + background-size: 16px 16px; +} + +.icon-btn--top:hover, +.icon-btn--top:active { + background-image: url('~@/assets/images/svg/pintotop_active.svg'); + background-size: 32px 32px; +} + +.icon-btn--export { + background-image: url('~@/assets/images/svg/export.svg'); + background-size: 16px 16px; +} + +.icon-btn--export:hover, +.icon-btn--export:active { + background-image: url('~@/assets/images/svg/export_active.svg'); + background-size: 32px 32px; + +} + +.icon-btn.is-disabled { + cursor: not-allowed; + opacity: 0.6; + pointer-events: none; +} + +.filter-extra-actions { + display: flex; + align-items: center; + justify-content: flex-start; + padding-bottom: 20px; +} + +.filter-extra-actions .icon-btn, +.filter-extra-actions .create-course-btn { + margin-right: 10px; +} + +.create-course-btn { + width: 120px; + height: 32px; + padding-left: 36px; + padding-right: 16px; + border-radius: 6px; + border: 1px solid #4284F7; + background-color: #ffffff; + background-image: url('~@/assets/images/svg/createCourse.svg'); + background-repeat: no-repeat; + background-position: 12px center; + background-size: 16px 16px; + color: #4284F7; + font-weight: 400; + font-size: 14px; + line-height: 32px; + cursor: pointer; + transition: all 0.2s ease; +} + +.create-course-btn:hover, +.create-course-btn:active { + background-color: #4284F7; + border-color: transparent; + color: #ffffff; + background-image: url('~@/assets/images/svg/createCourse_active.svg'); +} + .toggle-link { padding: 0; } -.filter-extra-actions { - text-align: right; - padding-right: 10px; -} -::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar{ +/* 移除右对齐,保持左侧布局 */ +::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar { display: block; } + .advanced-filter { margin-top: 10px; } -.learning-time-range .el-date-editor { - width: 300px; -} +// .learning-time-range .el-date-editor { +// width: 250px; +// } + .pagination { text-align: center; padding: 40px 0 80px 0; } + .course-types { display: flex; justify-content: center; @@ -1563,16 +1881,55 @@ export default { } ::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar-thumb { - border-radius: 6px; - background-color: rgb(78, 166, 255); + border-radius: 4px; + background-color: #4284F7; } ::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar { width: 6px; - height: 8px; + height: 6px; } + ::v-deep .el-table .el-table__body-wrapper::-webkit-scrollbar-thumb { - border-radius: 6px; - background-color: rgb(78, 166, 255); + border-radius: 4px; + background-color: #4284F7 } + + + +::v-deep.el-table { + th.el-table__cell{ + background: rgba(66, 132, 247, 0.1); + padding: 3px 0; + .cell { + font-weight: bold; + font-size: 14px; + color: #60769D; + } + &.el-table--medium .el-table__cell{ + padding: 5px 0; + } + } + .course-name { + font-weight: 400; + font-size: 14px; + color: #000000; + line-height: 20px; + } + .common-cell { + font-weight: 400; + font-size: 14px; + color: #000000; + } + .status--pass { + color: #2EAD4D; + } + .status--reject { + color: #F41228; + } + ::v-deep .el-table--medium .el-table__cell{ + padding: 5px 0; + } +} +