From 96690ca9d4ae6aa7d01e24ffe57b2eeaf742bf6e Mon Sep 17 00:00:00 2001 From: zeyan <258785420@qq.com> Date: Sat, 9 Aug 2025 13:46:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/course_schedule/course_schedule.vue | 20 +- .../apiController/CustomerResources.php | 1 + .../coach/schedule/adjust_course.vue | 3 +- .../coach/schedule/schedule_table.vue | 40 +- uniapp/pages-market/clue/add_clues.vue | 1715 +++++++++-------- .../pages-market/clue/class_arrangement.vue | 3 +- .../clue/class_arrangement_detail.vue | 3 +- 7 files changed, 941 insertions(+), 844 deletions(-) diff --git a/admin/src/app/views/course_schedule/course_schedule.vue b/admin/src/app/views/course_schedule/course_schedule.vue index f4657425..4605b628 100644 --- a/admin/src/app/views/course_schedule/course_schedule.vue +++ b/admin/src/app/views/course_schedule/course_schedule.vue @@ -263,15 +263,29 @@ const venueFilterList = ref([]) // 根据ID获取校区名称 const getCampusName = (id: string | number) => { - const campus = campusList.value.find(item => item.id === id) - return campus ? campus.campus_name : id + // 处理campusList可能是对象或数组的情况 + if (Array.isArray(campusList.value)) { + const campus = campusList.value.find(item => item.id === id) + return campus ? campus.campus_name : id + } else if (campusList.value && typeof campusList.value === 'object') { + // 如果是对象格式,遍历对象的值 + const campusArray = Object.values(campusList.value) + const campus = campusArray.find((item: any) => item.id === id) + return campus ? campus.campus_name : id + } + return id } // 获取校区列表 const loadCampusList = () => { getWithCampusList({}) .then((res) => { - campusList.value = res.data || [] + // 处理API返回的对象格式数据,转换为数组 + if (res.data && typeof res.data === 'object' && !Array.isArray(res.data)) { + campusList.value = Object.values(res.data) + } else { + campusList.value = res.data || [] + } }) .catch(() => {}) } diff --git a/niucloud/app/api/controller/apiController/CustomerResources.php b/niucloud/app/api/controller/apiController/CustomerResources.php index adae3889..70ef80fb 100644 --- a/niucloud/app/api/controller/apiController/CustomerResources.php +++ b/niucloud/app/api/controller/apiController/CustomerResources.php @@ -115,6 +115,7 @@ class CustomerResources extends BaseApiService "communication" => $request->param('communication', ''),//沟通备注 "staff_id" => $request->param('staff_id', ''),//人员ID "efficacious" => $request->param('efficacious', 1), + "emotional_stickiness_score" => $request->param('emotional_stickiness_score', 1), ]; if (strlen($customer_resources_data['phone_number']) > 12) { diff --git a/uniapp/pages-coach/coach/schedule/adjust_course.vue b/uniapp/pages-coach/coach/schedule/adjust_course.vue index 8516d61f..7b2caf27 100644 --- a/uniapp/pages-coach/coach/schedule/adjust_course.vue +++ b/uniapp/pages-coach/coach/schedule/adjust_course.vue @@ -24,7 +24,8 @@ 授课教练: - {{ scheduleInfo.coach_name }} + 主教练:{{ scheduleInfo.coach_name }} + 助教:{{ scheduleInfo.coach_name }} 上课场地: diff --git a/uniapp/pages-coach/coach/schedule/schedule_table.vue b/uniapp/pages-coach/coach/schedule/schedule_table.vue index b493526f..25d0e9a9 100644 --- a/uniapp/pages-coach/coach/schedule/schedule_table.vue +++ b/uniapp/pages-coach/coach/schedule/schedule_table.vue @@ -71,6 +71,11 @@ class="frozen-content-scroll" scroll-y :scroll-top="scrollTop" + :enable-flex="true" + :scroll-anchoring="false" + :enhanced="true" + :bounces="false" + :scroll-with-animation="false" > @@ -132,6 +137,11 @@ scroll-x scroll-y :scroll-top="scrollTop" + :enable-flex="true" + :scroll-anchoring="false" + :enhanced="true" + :bounces="false" + :scroll-with-animation="false" @scroll="onScroll" > @@ -429,6 +439,7 @@ export default { // 滚动相关 scrollTop: 0, + scrollTimer: null, // 滚动防抖定时器 // 表格配置 tableWidth: 1500, // 表格总宽度,确保7天都能显示 (7*180+120=1380rpx) @@ -537,6 +548,12 @@ export default { }, beforeDestroy() { + // 清理滚动定时器 + if (this.scrollTimer) { + clearTimeout(this.scrollTimer) + this.scrollTimer = null + } + // 移除事件监听(仅在H5环境下) // #ifndef MP-WEIXIN if (typeof window !== 'undefined') { @@ -1155,12 +1172,19 @@ export default { }); }, - // 滚动事件处理函数 - 只处理垂直滚动同步 + // 滚动事件处理函数 - 优化垂直滚动同步 onScroll(e) { - // 只需要同步垂直滚动位置给左侧时间列 - if (e.detail.scrollTop !== undefined) { - this.scrollTop = e.detail.scrollTop + // 使用防抖优化滚动同步性能 + if (this.scrollTimer) { + clearTimeout(this.scrollTimer) } + + this.scrollTimer = setTimeout(() => { + // 只需要同步垂直滚动位置给左侧时间列 + if (e.detail.scrollTop !== undefined && e.detail.scrollTop !== this.scrollTop) { + this.scrollTop = e.detail.scrollTop + } + }, 16) // 约60fps的更新频率 }, // 单元格点击 @@ -1492,6 +1516,10 @@ export default { .frozen-content-scroll { flex: 1; overflow: hidden; + /* 优化滚动性能 */ + -webkit-overflow-scrolling: touch; + scroll-behavior: auto; + overscroll-behavior: none; } .frozen-content { @@ -1578,6 +1606,10 @@ export default { .schedule-scroll { flex: 1; overflow: scroll; + /* 优化滚动性能 */ + -webkit-overflow-scrolling: touch; + scroll-behavior: auto; + overscroll-behavior: none; } .schedule-grid { diff --git a/uniapp/pages-market/clue/add_clues.vue b/uniapp/pages-market/clue/add_clues.vue index afb395a0..086d82b0 100644 --- a/uniapp/pages-market/clue/add_clues.vue +++ b/uniapp/pages-market/clue/add_clues.vue @@ -2,441 +2,459 @@