diff --git a/src/api/modules/course.js b/src/api/modules/course.js index 210c0224..39a88137 100644 --- a/src/api/modules/course.js +++ b/src/api/modules/course.js @@ -484,7 +484,7 @@ const saveTip = function() { * 获取我开发的课程列表 */ const courseList = function(data) { - return ajax.postJson('/xboe/m/course/manage/page', data); + return ajax.postJson('/xboe/m/course/manage/develop_page', data); } diff --git a/src/assets/styles/portal-index.scss b/src/assets/styles/portal-index.scss index 395f282e..6d75a378 100644 --- a/src/assets/styles/portal-index.scss +++ b/src/assets/styles/portal-index.scss @@ -432,6 +432,37 @@ color: #333333; } } +.el-message.new-message { + background-color: #edf2fc !important; + box-shadow: none !important; + border-color: #EBEEF5 !important; + min-width: 170px !important; + border-radius: 10px !important; + } +.el-message--success.new-message { + background-color: #f0f9eb !important; + box-shadow: none !important; + border-color: #e1f3d8 !important; + min-width: 170px !important; + border-radius: 10px !important + } +.el-message--error.new-message { + background-color: #fef0f0 !important; + box-shadow: none !important; + border-color: #fde2e2 !important; + min-width: 170px !important; + border-radius: 10px !important + } + .el-message--warning.new-message { + background-color: #fdf6ec !important; + box-shadow: none !important; + border-color: #faecd8 !important; + min-width: 170px !important; + border-radius: 10px !important + } + + + .el-badge__content{// badge去掉白色边框 border:1px solid #f56c6c; } diff --git a/src/components/NameFilterSelect/index.vue b/src/components/NameFilterSelect/index.vue new file mode 100644 index 00000000..bbc5f735 --- /dev/null +++ b/src/components/NameFilterSelect/index.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/SimpleMessageBox/index.vue b/src/components/SimpleMessageBox/index.vue new file mode 100644 index 00000000..343113f0 --- /dev/null +++ b/src/components/SimpleMessageBox/index.vue @@ -0,0 +1,87 @@ + + + diff --git a/src/icons/svg/jingti.svg b/src/icons/svg/jingti.svg new file mode 100644 index 00000000..2872c289 --- /dev/null +++ b/src/icons/svg/jingti.svg @@ -0,0 +1,11 @@ + + + jingti-copy + + + + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 15f2fc68..ba3ba532 100644 --- a/src/main.js +++ b/src/main.js @@ -19,6 +19,24 @@ Vue.use(vueKatexEs,{ } }) +Vue.directive('limit-input', { + bind: function (el, binding) { + const max = binding.value || 50; + // 找到input元素 + const input = el.querySelector('input'); + if (input) { + // 监听input事件,在输入时限制长度 + input.addEventListener('input', function () { + if (input.value.length > max) { + input.value = input.value.substring(0, max); + // 触发input事件,让element-ui的内部处理更新 + input.dispatchEvent(new Event('input', { bubbles: true })); + } + }); + } + } +}); + //import './mock/index' import xpage from '@/utils/xpage' @@ -41,6 +59,14 @@ import 'swiper/dist/css/swiper.css'; Vue.use(VueAwesomeSwiper) import watermark from './utils/warterMark.js' import Bus from './utils/bus.js' +import {showMessage} from './utils/index.js' + +import MessageBoxService from './utils/simpleMessageBox.js' + + +Vue.use(MessageBoxService) + +Vue.prototype.$showMessage = showMessage Vue.prototype.$bus = Bus diff --git a/src/utils/index.js b/src/utils/index.js index 0507bcac..ceba34d4 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -455,4 +455,13 @@ export function resOwnerListMap(source) { }) let name = resOwnerList.get('GC005001') return name; +} + +export function showMessage(message, status) { + this.$message({ + message: message, + type: status, + duration: 5000, + customClass: 'new-message' + }); } \ No newline at end of file diff --git a/src/utils/simpleMessageBox.js b/src/utils/simpleMessageBox.js new file mode 100644 index 00000000..0687984b --- /dev/null +++ b/src/utils/simpleMessageBox.js @@ -0,0 +1,50 @@ +import Vue from 'vue' +import MessageBox from '@/components/SimpleMessageBox/index.vue' + +// 创建 MessageBox 构造器 +const MessageBoxConstructor = Vue.extend(MessageBox) + +let messageBoxInstance = null + +const MessageBoxService = { + open(options = {}) { + // 如果已有实例,先销毁 + if (messageBoxInstance) { + messageBoxInstance.$destroy() + const el = messageBoxInstance.$el + if (el && el.parentNode) { + el.parentNode.removeChild(el) + } + } + + // 创建新实例 + messageBoxInstance = new MessageBoxConstructor({ + el: document.createElement('div'), + data: options + }) + + // 挂载到 body + document.body.appendChild(messageBoxInstance.$el) + + // 显示并返回 Promise + return messageBoxInstance.open(options) + }, + + cancel() { + messageBoxInstance.cancel() + }, + + confirm(options) { + return this.open({ + ...options + }) + }, +} + +// 添加到 Vue 原型 +MessageBoxService.install = function (Vue) { + Vue.prototype.$messageBox = MessageBoxService +} + +// 导出 +export default MessageBoxService \ No newline at end of file diff --git a/src/views/course/CourseManage.vue b/src/views/course/CourseManage.vue index 5db7edfa..9ea1b149 100644 --- a/src/views/course/CourseManage.vue +++ b/src/views/course/CourseManage.vue @@ -16,27 +16,35 @@ -
+
+ + + +
- +
- +
查 询 -
-
- -
重 置
- + +
导出报名记录
@@ -52,11 +60,15 @@ - + + @@ -70,41 +82,51 @@
- + -
+
+ + + + +
- - - - - + + + + +
-
+
- +
查 询 -
-
- -
重 置
- +
导出学习课程记录
@@ -118,19 +140,20 @@ - - + + @@ -156,22 +179,18 @@
- +
- +
- 搜索 + 搜索 + 重置
- -
- 重置 -
-
- +
导出资源学习记录
@@ -215,18 +234,23 @@ - + - + + + + @@ -248,27 +272,38 @@ - + -
+
+ + + + +
- +
- +
查 询 -
-
- -
重 置
@@ -280,7 +315,8 @@ @@ -297,8 +333,8 @@
- + label="满意度分数">
+
-
+
+ + + +
- +
- +
查 询 -
-
- -
重 置
@@ -343,16 +388,16 @@ :header-cell-style="{textAlign: 'center'}" :cell-style="{ textAlign: 'center' }"> @@ -360,7 +405,8 @@ @@ -370,7 +416,7 @@ - +
- 关 闭 + 关 闭 @@ -393,6 +439,7 @@ import { // sysTypeList, getType, } from "../../utils/tools.js"; +import apiUserbasic from "@/api/boe/userbasic.js"; import apicourseStudy from "@/api/modules/courseStudy.js"; import apiCoursePortal from "@/api/modules/coursePortal.js"; import { mapGetters, mapActions } from "vuex"; @@ -400,7 +447,11 @@ import apiUser from "@/api/system/user.js"; import apiStudy from "@/api/modules/courseStudy.js"; import { getToken } from "@/utils/token"; import axios from "axios"; +import NameFilterSelect from "@/components/NameFilterSelect/index.vue"; + +NameFilterSelect; export default { + components: { NameFilterSelect }, computed: { ...mapGetters(["resOwnerMap", "sysTypeMap"]), }, @@ -409,20 +460,19 @@ export default { pickerOptions: { shortcuts: [ { - text: "最近一周", + text: "今年以来", onClick(picker) { const end = new Date(); - const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + const start = new Date(end.getFullYear(), 0, 1); picker.$emit("pick", [start, end]); }, }, { - text: "最近一个月", + text: "最近一年", onClick(picker) { const end = new Date(); const start = new Date(); - start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + start.setFullYear(start.getFullYear() - 1); picker.$emit("pick", [start, end]); }, }, @@ -436,11 +486,20 @@ export default { }, }, { - text: "最近一年", + text: "最近一个月", onClick(picker) { const end = new Date(); const start = new Date(); - start.setFullYear(start.getFullYear() - 1); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "最近一周", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); picker.$emit("pick", [start, end]); }, }, @@ -466,6 +525,7 @@ export default { signup: { name: "", signType: "", + aid: [], }, courseType: courseType, value: "", @@ -490,6 +550,7 @@ export default { status: "", queryStartTime: "", queryFinishTime: "", + aid: [], }, study: { detailType: "", @@ -540,6 +601,7 @@ export default { count: 0, name: "", status: "", + aid: [], }, examResourceStudyPeopleShow: false, examResourceStudyPeopleList: [], @@ -549,6 +611,7 @@ export default { count: 0, name: "", status: "", + aid: [], }, }; }, @@ -569,6 +632,7 @@ export default { loadSysTypes: "sysType/loadSysTypes", }), + resetCommonResourceQuery() { this.commonResourceStudyPeopleQuery = { pageIndex: 1, //第几页 @@ -576,7 +640,9 @@ export default { count: 0, name: "", status: "", + aid: [], }; + this.queryResourceStudyPeopleList(); }, resetExamCommonResourceQuery() { @@ -586,11 +652,22 @@ export default { count: 0, name: "", status: "", + aid: [], }; + this.queryExamStudyPeopleList(); }, handleShowResourdeDetailList(row) { - this.resetCommonResourceQuery(); + console.log(row); + console.log(7777); + this.commonResourceStudyPeopleQuery = { + pageIndex: 1, //第几页 + pageSize: 10, // 每页多少条 + count: 0, + name: "", + status: "", + aid: [], + }; this.rousourceRow = row; if (row.contentType == "61") { // 考试 @@ -614,8 +691,9 @@ export default { contentId: this.rousourceRow.contentId, pageIndex: this.examResourceStudyPeopleQuery.pageIndex, pageSize: this.examResourceStudyPeopleQuery.pageSize, - name: this.examResourceStudyPeopleQuery.name, + name: "", status: this.examResourceStudyPeopleQuery.status, + aid: this.examResourceStudyPeopleQuery.aid.join(","), }) .then((res) => { if (res.status === 200) { @@ -640,6 +718,9 @@ export default { contentId: this.rousourceRow.contentId, pageIndex: this.commonResourceStudyPeopleQuery.pageIndex, pageSize: this.commonResourceStudyPeopleQuery.pageSize, + name: "", + status: this.commonResourceStudyPeopleQuery.status, + aid: this.commonResourceStudyPeopleQuery.aid.join(","), }) .then((res) => { if (res.status === 200) { @@ -658,14 +739,17 @@ export default { }, queryResourceStudyPeopleList() { + console.log(this.rousourceRow); + console.log(888); apicourseStudy .studyContentRecords({ courseId: this.courseDetail.id, contentId: this.rousourceRow.contentId, pageIndex: this.commonResourceStudyPeopleQuery.pageIndex, pageSize: this.commonResourceStudyPeopleQuery.pageSize, - name: this.commonResourceStudyPeopleQuery.name, + name: "", status: this.commonResourceStudyPeopleQuery.status, + aid: this.commonResourceStudyPeopleQuery.aid.join(","), }) .then((res) => { if (res.status === 200) { @@ -758,20 +842,25 @@ export default { }, resetResourseList() { this.recourseListQuery.contentName = ""; + this.getResourseList(); }, resetStudyRecords() { + this.learningRecords.aid = []; this.learningRecords.name = ""; this.learningRecords.status = ""; this.studyDateTime = []; this.learningRecords.queryStartTime = ""; this.learningRecords.queryFinishTime = ""; + this.getStudyRecords(); }, resetSignupList() { this.signup = { name: "", signType: "", + aid: [], }; + this.getSignupList(); }, resOwnerName(code) { if (code == "") { @@ -861,7 +950,7 @@ export default { this.recourseListQuery.pageIndex = 1; this.getResourseList(); }, - handleCurrentChangeRecourseList() { + handleCurrentChangeRecourseList(val) { this.recourseListQuery.pageIndex = val; this.getResourseList(); }, @@ -914,13 +1003,14 @@ export default { courseId: this.courseDetail.id, //课程的id status: this.learningRecords.status, //状态 // courseType:this.learningRecords.type,//类型 - aname: this.learningRecords.name, //学习人的姓名 learningRecords + aname: "", //学习人的姓名 learningRecords pageIndex: this.learningRecords.pageIndex, pageSize: this.learningRecords.pageSize, queryStartTime: this.studyDateTime.length > 0 ? this.studyDateTime[0] : "", queryFinishTime: this.studyDateTime.length > 1 ? this.studyDateTime[1] : "", + aid: this.learningRecords.aid.join(","), }; apicourseStudy.studyRecords(params).then((res) => { if (res.status === 200) { @@ -951,6 +1041,7 @@ export default { contentName: this.courseDetail.name, status: this.studyDetailRow.status, studyDuration: this.studyDetailRow.progress, + learningDuration: this.studyDetailRow.totalDuration, }, ]; } @@ -973,10 +1064,10 @@ export default { let params = { courseId: this.courseDetail.id, //课程的id signType: this.signup.signType, //报名方式 - name: this.signup.name, //姓名 + name: "", //姓名 pageIndex: this.study.pageIndex, pageSize: this.study.pageSize, - aid: this.study.aid, + aid: this.signup.aid.join(","), }; apicourseStudy.findSignup(params).then((res) => { @@ -1047,7 +1138,19 @@ export default { \ No newline at end of file + diff --git a/src/views/course/TeacherList.vue b/src/views/course/TeacherList.vue index dc3208f6..028e3c93 100644 --- a/src/views/course/TeacherList.vue +++ b/src/views/course/TeacherList.vue @@ -7,57 +7,55 @@ 4.有哪种几状态和哪几种操作,需要讨论定一下 。在哪种状态下可以有哪些操作
--> - - -
-
- -
- - + + +
+
+ +
+ + - -
-
+
+
+
- -
- - - - -
-
+ +
+ + + + +
+
- -
- + +
+ + - -
-
- -
- 查 询 -
-
- -
- 重 置 -
-
- -
- 新建课程 -
-
- - +
+
+
+ +
+ 查 询 + 重 置 +
+
+ +
+ 新建课程 +
+
+
-
+
@@ -65,8 +63,8 @@
- - {{ item.name }} + + {{ item.name }}
@@ -75,19 +73,26 @@
发布状态:{{ item.published ? '发布' : '未发布' }}
启停用状态:{{ item.enabled ? '启用' : '停用' }}
-
审核状态:{{getStatusLabel(item.status).label}}
+
审核状态:{{getStatusLabel(item.status).label}}
- {{it.label}} + {{it.label}}
-

加载中...

-
-
没有查询到相关内容
-
暂无数据
-
-

没有更多了

+

加载中...

+
+
没有查询到相关内容
+
暂无数据
+
+

没有更多了

- +
- - -
- -
- - 下载 -
+ + +
+ +
+ + 下载
- - - - - 复制 - - - 上述内容兼容PC端与移动端,您可按需分享。 - +
+
+ + + + 复制 + + + 上述内容兼容PC端与移动端,您可按需分享。 +
关 闭 -
@@ -146,7 +151,7 @@ - + @@ -158,62 +163,88 @@ @@ -618,7 +622,7 @@ export default { text-align: center; font-size: 13px; } -.list-wu{ +.list-wu { text-align: center; margin: 40px; color: #333; @@ -683,7 +687,7 @@ export default { box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); cursor: pointer; span { - color: #409EFF; + color: #409eff; display: block; font-size: 12px; line-height: 12px; @@ -697,10 +701,11 @@ export default { border-bottom: 1px solid #e8e8e8; padding: 20px 0px 15px 0px; margin: 0 32px 0 22px; - ::v-deep .uc-course-img { + ::v-deep .uc-course-img { width: 212px; img { - width: 212px;height:119px; + width: 212px; + height: 119px; border: 1px solid #f4f4f5; } } @@ -716,7 +721,7 @@ export default { font-size: 14px; overflow: hidden; width: 90%; - word-break:break-all; + word-break: break-all; display: -webkit-box; // overflow: hidden; -webkit-box-orient: vertical; @@ -725,13 +730,13 @@ export default { .uc-course-name { font-size: 16px; display: -webkit-box; - white-space:pre-wrap; - // word-wrap: break-word; - overflow: hidden; - text-overflow:ellipsis; - -webkit-box-orient: vertical; - -webkit-line-clamp: 1; - word-break:break-all; + white-space: pre-wrap; + // word-wrap: break-word; + overflow: hidden; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + word-break: break-all; // font-weight: 700; } .uc-course-item { @@ -752,11 +757,9 @@ export default { .btn-item { margin-right: 20px; } - } } .uc-course-btns { - text-align: right; .btn1 { height: 44px;