From cec7b03d719baa0edc2d487da80e3ec327844938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=8B=E4=BA=8E=E5=88=9D=E8=A7=81?= <752204717@qq.com> Date: Mon, 20 Oct 2025 17:12:55 +0800 Subject: [PATCH] tijiao --- src/common/js/debounce.js | 59 ++ src/router/index.js | 4 +- src/views/common/common.vue | 4 +- .../reportList/FullYearCalendarCoin copy.vue | 443 ------------ .../FullYearCalendarTrainingCourse.vue | 347 +++++++++ .../reportList/trainingCourseClassList.vue | 676 ++++++++++++++++++ .../modules/reportList/trainingCourseList.vue | 100 +++ .../trainingCourse/MyElAutocomplete.vue | 90 +++ .../trainingCourse/training-course-user.vue | 587 ++++++++++++--- src/views/modules/user/user-add-course.vue | 3 +- src/views/modules/user/user.vue | 2 +- src/views/modules/user/userCourse.vue | 1 + src/views/modules/vipList/user-open-vip.vue | 2 +- src/views/modules/vipList/vipDetail.vue | 8 +- static/config/index.js | 4 +- 15 files changed, 1759 insertions(+), 571 deletions(-) create mode 100644 src/common/js/debounce.js delete mode 100644 src/views/modules/reportList/FullYearCalendarCoin copy.vue create mode 100644 src/views/modules/reportList/FullYearCalendarTrainingCourse.vue create mode 100644 src/views/modules/reportList/trainingCourseClassList.vue create mode 100644 src/views/modules/reportList/trainingCourseList.vue create mode 100644 src/views/modules/trainingCourse/MyElAutocomplete.vue diff --git a/src/common/js/debounce.js b/src/common/js/debounce.js new file mode 100644 index 0000000..b1a6087 --- /dev/null +++ b/src/common/js/debounce.js @@ -0,0 +1,59 @@ +let timeout = null + +/** + * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数 + * + * @param {Function} func 要执行的回调函数 + * @param {Number} wait 延时的时间 + * @param {Boolean} immediate 是否立即执行 + * @return null + */ +function debounce(func, wait = 500, immediate = false) { + // 清除定时器 + if (timeout !== null) clearTimeout(timeout) + // 立即执行,此类情况一般用不到 + if (immediate) { + const callNow = !timeout + timeout = setTimeout(() => { + timeout = null + }, wait) + if (callNow) typeof func === 'function' && func() + } else { + // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法 + timeout = setTimeout(() => { + typeof func === 'function' && func() + }, wait) + } +} +function throttle(fn, delay = 1000, immediate = false) { + console.log("进入节流对象") + let timer + let status = false // 是否为重复点击状态 + return function () { + let _this = this + let args = arguments + + if (immediate) { + console.log("立即执行参数 执行一次方法") + fn.apply(_this, args) + immediate = false + return + } + if (status) { + console.log("当前点击状态为正在重复点击,请稍等片刻后在点击执行") + return + } + console.log("执行节流:当前执行了一次点击方法") + fn.apply(_this, args) + status = true // 修改状态 + timer = setTimeout(() => { + console.log("规定时间到,重置状态,可以重新调用") + status = false + }, delay) + } + } + + export { + debounce, + throttle + } \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 61b5c97..584c27b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -90,7 +90,9 @@ const mainRoutes = { { path: '/vipList-userList', component: _import('modules/vipList/userList'), name: 'vipList-userList', meta: { title: 'VIP用户列表', isTab: true } }, { path: '/vipList-vipDetail', component: _import('modules/vipList/vipDetail'), name: 'vipList-vipDetail', meta: { title: 'VIP详情', isTab: true } }, { path: '/reportList-vipList', component: _import('modules/reportList/vipList'), name: 'reportList-vipList', meta: { title: 'VIP报表', isTab: true } }, - { path: '/reportList-courseList', component: _import('modules/reportList/courseList'), name: 'reportList-courseList', meta: { title: 'VIP报表', isTab: true } }, + { path: '/reportList-trainingCourseList', component: _import('modules/reportList/trainingCourseList'), name: 'reportList-trainingCourseList', meta: { title: '培训班月度报表', isTab: true } }, + { path: '/reportList-trainingCourseClassList', component: _import('modules/reportList/trainingCourseClassList'), name: 'reportList-trainingCourseClassList', meta: { title: '培训班报表', isTab: true } }, + { path: '/reportList-courseList', component: _import('modules/reportList/courseList'), name: 'reportList-courseList', meta: { title: '课程报表', isTab: true } }, ], beforeEnter (to, from, next) { diff --git a/src/views/common/common.vue b/src/views/common/common.vue index 9cbd3af..9081a1e 100644 --- a/src/views/common/common.vue +++ b/src/views/common/common.vue @@ -1,8 +1,8 @@ - - diff --git a/src/views/modules/reportList/FullYearCalendarTrainingCourse.vue b/src/views/modules/reportList/FullYearCalendarTrainingCourse.vue new file mode 100644 index 0000000..9e15c79 --- /dev/null +++ b/src/views/modules/reportList/FullYearCalendarTrainingCourse.vue @@ -0,0 +1,347 @@ + + + 下载 {{selectYear}} 年全部培训班报表 + + + + {{ month.month}} 月 下载报表 + + + + + + {{ d.title }} + + + {{ + month.total[d.val] + }} + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/modules/reportList/trainingCourseClassList.vue b/src/views/modules/reportList/trainingCourseClassList.vue new file mode 100644 index 0000000..224bc3a --- /dev/null +++ b/src/views/modules/reportList/trainingCourseClassList.vue @@ -0,0 +1,676 @@ + + + 刷新 + + + + + + + + + {{ scope.row.title }} + + + + + + + + + + + + + + + + + + + + + + + 导出报表 + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/modules/reportList/trainingCourseList.vue b/src/views/modules/reportList/trainingCourseList.vue new file mode 100644 index 0000000..9810d5a --- /dev/null +++ b/src/views/modules/reportList/trainingCourseList.vue @@ -0,0 +1,100 @@ + + + + + + + + + + + + + 刷新 + + + + + + + + + + + + \ No newline at end of file diff --git a/src/views/modules/trainingCourse/MyElAutocomplete.vue b/src/views/modules/trainingCourse/MyElAutocomplete.vue new file mode 100644 index 0000000..0d0a537 --- /dev/null +++ b/src/views/modules/trainingCourse/MyElAutocomplete.vue @@ -0,0 +1,90 @@ + + + + + + + \ No newline at end of file diff --git a/src/views/modules/trainingCourse/training-course-user.vue b/src/views/modules/trainingCourse/training-course-user.vue index e06bf86..3a5b488 100644 --- a/src/views/modules/trainingCourse/training-course-user.vue +++ b/src/views/modules/trainingCourse/training-course-user.vue @@ -7,11 +7,7 @@ style="position: relative;" > - + @@ -22,17 +18,12 @@ " >查询 - 报名 + 报名 - - - 导出 + + 导出 + + + prop="createTime" + width="170" + sortable="custom" + :sort-orders="['ascending', 'descending']" + > - - - - + - {{ scope.row.user.name ? scope.row.user.name : "暂无姓名" }} + + 姓名: + {{ + scope.row.user.name ? scope.row.user.name : "暂无姓名" + }} + + + + 身份: + {{ scope.row.identity || "-" }} + - - {{ scope.row.user.tel||'-' }} + + {{ scope.row.user.tel || "-" }} - + + - {{ splitIdentity(scope.row.identity).type }} + {{ scope.row.payType }} - + + - {{ splitIdentity(scope.row.identity).price ? `¥${splitIdentity(scope.row.identity).price}` : '' }} + + {{ scope.row.fee ? `${scope.row.fee}` : "0" }} + + {{ scope.row.abroadFee ? `${scope.row.abroadFee}` : "0" }} - - - {{ scope.row.payMethod }}:{{ scope.row.realMoney }} - - - 积分:{{ scope.row.jfDeduction }} + + + {{ scope.row.jf }} + 删除 @@ -109,25 +128,196 @@ title="添加用户" class="dialog_box" @close="cancleClose" - width="600px" + append-to-body + width="880px" > - - - - {{ v.tel }} + label-width="140px" + > + + + + + + + + + {{ v.tel }} - - {{ info.identity }} + + + + + {{ addForm.name }} + 暂无姓名 + + + + + + + + 编辑 + + + + 保存 + + + 取消 + + + + + + + + - - {{ info.fee }} + + + + {{ v }} + + + + + + + + + 微信 + 支付宝 + 天医币 + 银行支付 + 海外支付 + 赠送 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -138,25 +328,53 @@ -
+ 姓名: + {{ + scope.row.user.name ? scope.row.user.name : "暂无姓名" + }} +
+ 身份: + {{ scope.row.identity || "-" }} +