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 @@
- +
@@ -318,6 +318,8 @@ export default { data () { return { cid: this.$route.query.cid, + isCopy: this.$route.query.copy, + isAdd: true, editorConfig, step: 1, form: { @@ -435,6 +437,7 @@ export default { }, mounted () { + if (this.cid) this.isAdd = false this.getSubject() this.getConfig() this.getSystem() @@ -827,7 +830,7 @@ export default { background: 'rgba(0, 0, 0, 0.7)' }) try { - const res = await this.$post(this.api[cid ? 'modifyCourse' : 'createCurriculum'], form) + const res = await this.$post(this.api[cid && !this.isCopy ? 'modifyCourse' : 'createCurriculum'], form) if (next) { this.step = 2 if (!cid) { @@ -917,6 +920,10 @@ export default { } } }, + // 跳转步骤 + toStep (i) { + this.step = i + }, // 返回上一页 back () { this.loadIns && this.loadIns.close() diff --git a/src/views/course/list.vue b/src/views/course/list.vue index be2566c..1bfe369 100644 --- a/src/views/course/list.vue +++ b/src/views/course/list.vue @@ -88,10 +88,12 @@ - + @@ -226,11 +228,19 @@ export default { this.setReferrer() this.$router.push(`/curriculum/detail?cid=${row.cid}`); }, + // 预览 + preview (row) { + this.$router.push(`/station?courseId=${row.cid || ''}&curriculumName=${encodeURIComponent(row.curriculumName)}&mallId=${row.mallId || ''}`) + }, // 内容设置 config (row) { this.setReferrer() this.$router.push(`/curriculum/content?cid=${row.cid}&name=${row.curriculumName}`); }, + // 复制 + async copy (row) { + this.$router.push(`/curriculum/detail?cid=${row.cid}©=1`) + }, // 删除 handleDelete (row) { this.$post(`${this.api.deleteCoursePrompt}?cids=${row.cid}`).then(({ status }) => { diff --git a/src/views/order/Order.vue b/src/views/order/Order.vue index a1f36c9..e4dd342 100644 --- a/src/views/order/Order.vue +++ b/src/views/order/Order.vue @@ -64,7 +64,7 @@ 批量删除
- @@ -145,6 +145,7 @@ export default { name: "已取消", value: 2 }], + loading: false, page: +this.$route.query.page || 1, pageSize: 10, totals: 0, @@ -176,15 +177,16 @@ export default { val = 5; } }, - getData () { - const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理') - let data = { - ...this.form, - pageNo: this.page, - pageSize: this.pageSize, - supplierId: sid ? sid.supplierId : '' - }; - this.$post(this.api.orderList, data).then(res => { + async getData () { + try { + this.loading = true + const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理') + const res = await this.$post(this.api.orderList, { + ...this.form, + pageNo: this.page, + pageSize: this.pageSize, + supplierId: sid ? sid.supplierId : '' + }) res.orderPage.orders.forEach(e => { e.orderType = this.orderTypeFn(e.orderType); e.orderStatus = this.orderStatusFn(e.orderStatus); @@ -192,7 +194,9 @@ export default { }); this.orderData = res.orderPage.orders; this.totals = res.orderPage.total; - }).catch(res => { }); + } finally { + this.loading = false + } }, // 清除省份 clearprovince () { diff --git a/src/views/resourse/index.vue b/src/views/resourse/index.vue index 388ba2b..934bff4 100644 --- a/src/views/resourse/index.vue +++ b/src/views/resourse/index.vue @@ -73,9 +73,9 @@