diff --git a/src/assets/css/station.scss b/src/assets/css/station.scss new file mode 100644 index 0000000..7f00785 --- /dev/null +++ b/src/assets/css/station.scss @@ -0,0 +1,189 @@ +.msg { + li { + margin-bottom: 10px; + border-top: 1px solid #f1f1f1; + &:first-child { + border-top: 0; + } + .li-wrap { + position: relative; + display: flex; + justify-content: space-between; + padding: 16px 0; + .avatar { + width: 48px; + height: 48px; + border-radius: 50%; + } + .texts { + flex: 1; + margin-left: 24px; + .name { + color: rgba(0, 0, 0, 0.85); + font-size: 16px; + } + .date { + color: rgba(0, 0, 0, 0.45); + font-size: 14px; + } + /deep/img { + max-width: 95%; + } + } + .reply-name { + color: #062c87; + } + .action { + display: inline-flex; + align-items: center; + margin: 15px 10px 0 0; + .icon { + margin: 0 5px; + color: #062c87; + font-size: 18px; + cursor: pointer; + &:hover { + opacity: 0.8; + } + &:first-child { + margin-right: 5px; + } + &.del { + color: rgba(0, 0, 0, 0.65); + border: 1px solid rgba(0, 0, 0, 0.15); + } + } + } + .like-wrap { + display: inline-flex; + align-items: center; + cursor: pointer; + } + } + .reply { + margin-top: 20px; + } + } + &.children { + margin-left: 72px; + padding-left: 24px; + background-color: rgba(0, 0, 0, 0.02); + border-radius: 8px; + li { + border-top-color: rgba(0, 0, 0, 0.06); + } + } +} +.toggle { + margin: 16px 0; + text-align: center; + color: #062c87; + font-size: 14px; + span { + cursor: pointer; + } +} +/deep/.quill { + background-color: #fff; +} + +/deep/.timeline { + padding-left: 9%; + overflow: hidden; + .el-timeline-item { + padding-bottom: 40px; + } + .el-timeline-item__node--normal { + top: 30px; + } + .el-timeline-item__wrapper { + top: 15px; + padding-left: 40px; + } + .el-timeline-item__tail { + height: 250%; + border-left-width: 1px; + } + .sign { + position: relative; + display: inline-block; + margin-left: -12.5%; + font-size: 14px; + color: #062c87; + } + .draft { + .ver, + .sign { + color: #b1b1b1; + } + } + .ver { + display: flex; + justify-content: space-between; + align-items: center; + padding-bottom: 10px; + margin: -22px 0 20px; + font-size: 15px; + color: #062c87; + border-bottom: 1px dashed #bfbfbf; + } + .des { + p, + span, + em { + font-size: 14px !important; + } + } + .withdraw { + margin-right: 10px; + font-size: 13px; + color: #979797; + } + .action { + margin-left: 15px; + i { + margin-left: 8px; + font-size: 14px; + color: #062c87; + cursor: pointer; + &:hover { + opacity: 0.9; + } + } + } + .detail { + li { + margin-bottom: 20px; + } + .name { + display: flex; + align-items: center; + margin-bottom: 5px; + font-size: 15px; + font-weight: 600; + img { + width: 20px; + margin-right: 5px; + } + } + .val { + font-size: 14px; + line-height: 1.8; + white-space: pre-wrap; + p { + position: relative; + color: #6a6a6a; + &:before { + content: ''; + display: inline-block; + width: 5px; + height: 5px; + margin: 0 10px 0 5px; + vertical-align: middle; + border-radius: 20px; + background-color: #c5b8ff; + } + } + } + } +} diff --git a/src/assets/img/full.png b/src/assets/img/full.png new file mode 100644 index 0000000..8338e09 Binary files /dev/null and b/src/assets/img/full.png differ diff --git a/src/assets/img/project.png b/src/assets/img/project.png new file mode 100644 index 0000000..d3df1d1 Binary files /dev/null and b/src/assets/img/project.png differ diff --git a/src/assets/img/wechat-code.jpeg b/src/assets/img/wechat-code.jpeg new file mode 100644 index 0000000..07a86ee Binary files /dev/null and b/src/assets/img/wechat-code.jpeg differ diff --git a/src/router/index.js b/src/router/index.js index 0f6c045..22406ea 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -231,6 +231,10 @@ let router = new Router({ path: '/resourse', component: () => import('../views/resourse'), }, + { + path: '/station', + component: () => import('../views/station'), + }, { path: '/404', component: () => import('../views/404.vue'), diff --git a/src/utils/api.js b/src/utils/api.js index fa9934d..e9e8e9a 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -168,6 +168,24 @@ export default { deleteCoursePrompt: `nakadai/nakadai/curriculum/deleteCoursePrompt`, combinationResource: `nakadai/nakadai/curriculum/combinationResource`, replaceResource: `nakadai/nakadai/curriculum/subsection/replaceResource`, + curriculumChapter: `nakadai/nakadai/curriculum/chapter/queryChaptersAndSubsections`, + courseLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/courseLearningProgress', + deleteLearningProgress: 'nakadai/nakadai/curriculum/learning/progressprogress/delete', + curriculumGetSubsection: `nakadai/nakadai/curriculum/subsection/getSubsection`, + // 课程笔记 + addNote: `nakadai/curriculumNotes/addNote`, + curriculumNoteList: `nakadai/curriculumNotes/curriculumNoteList`, + deleteNotes: `nakadai/curriculumNotes/deleteNotes`, + updateNote: `nakadai/curriculumNotes/updateNote`, + + // 教学互动 + addCommentStation: `nakadai/comment/addComment`, + commentTreeList: `nakadai/comment/commentTreeList`, + deleteAComment: `nakadai/comment/deleteAComment`, + commentAndLike: `nakadai/commentLike/commentAndLike`, + unlike: `nakadai/commentLike/unlike`, + messageNotificationList: `nakadai/notify/messageNotificationList`, + noticeRead: `nakadai/notify/noticeRead`, // 课程章节管理 addChapter: `nakadai/nakadai/curriculum/chapter/addChapter`, //添加章节 editChapter: `nakadai/nakadai/curriculum/chapter/editChapter`, //修改章节 diff --git a/src/views/course/content/source.vue b/src/views/course/content/source.vue index 68bbae4..38d3cd7 100644 --- a/src/views/course/content/source.vue +++ b/src/views/course/content/source.vue @@ -185,6 +185,7 @@ export default { try { this.loading = true this.checkAll = false + const { checked } = this if (this.active === 'tab3') { const { page } = await this.$post(this.api.resourceLibrary, { pageNum: 1, @@ -196,8 +197,9 @@ export default { }) const list = page.records list.forEach(e => { + const cur = checked.find(m => m.resourceName && m.id === e.id) e.name = e.resourceName - e.check = false + e.check = !!cur }) this.sources = list } else { @@ -212,10 +214,26 @@ export default { n.check = false all.push(...n.subsections) n.subsections.forEach(m => { - m.check = false + const cur = checked.find(j => m.cid === j.cid && m.id === j.id) + m.check = !!cur }) }) }) + + list.forEach(e => { + e.shrink = false + e.check = false + e.chapters.forEach(n => { + n.shrink = false + n.check = n.subsections.every(m => m.check) + }) + }) + + list.forEach(e => { + e.shrink = false + e.check = e.chapters.every(m => m.check) + }) + list[0].shrink = true list[0].chapters[0].shrink = true this.allSections = all @@ -231,6 +249,7 @@ export default { this.getData(); }, tabChange (index) { + this.keyword = '' this.active = index this.getCourse() }, diff --git a/src/views/course/detail.vue b/src/views/course/detail.vue index 8af03dd..fa430bb 100644 --- a/src/views/course/detail.vue +++ b/src/views/course/detail.vue @@ -2,7 +2,7 @@