Browse Source

修改 bug

master
王泽彦 9 months ago
parent
commit
ff2f68505f
  1. 14
      niucloud/app/adminapi/route/service_logs.php
  2. 8
      niucloud/app/api/controller/member/Member.php
  3. 95
      niucloud/app/service/api/member/MemberService.php
  4. 12
      uniapp/pages.json
  5. 2
      uniapp/pages/coach/my/index.vue
  6. 291
      uniapp/pages/coach/my/service_list.vue
  7. 91
      uniapp/pages/coach/my/teaching_management.vue
  8. 398
      uniapp/pages/coach/student/info.vue
  9. 30
      uniapp/pages/coach/student/student_list.vue
  10. 7
      uniapp/pages/market/clue/clue_info.vue

14
niucloud/app/adminapi/route/service_logs.php

@ -23,6 +23,20 @@ Route::group('service_logs', function () {
Route::get('service_logs', 'service_logs.ServiceLogs/lists'); Route::get('service_logs', 'service_logs.ServiceLogs/lists');
// 服务记录分发管理
Route::group('distribution', function () {
// 手动执行分发任务
Route::post('execute', 'service_logs.ServiceLogsDistribution/executeDistribution');
// 获取分发统计信息
Route::get('stats', 'service_logs.ServiceLogsDistribution/getDistributionStats');
// 获取待分发的服务记录列表
Route::get('pending', 'service_logs.ServiceLogsDistribution/getPendingDistributionList');
// 重置分发状态
Route::post('reset', 'service_logs.ServiceLogsDistribution/resetDistributionStatus');
// 获取教务和教练人员列表
Route::get('staff', 'service_logs.ServiceLogsDistribution/getStaffList');
});
})->middleware([ })->middleware([
AdminCheckToken::class, AdminCheckToken::class,
AdminCheckRole::class, AdminCheckRole::class,

8
niucloud/app/api/controller/member/Member.php

@ -184,7 +184,13 @@ class Member extends BaseApiController
//教练下全部学员 //教练下全部学员
public function student_list(){ public function student_list(){
$data = $this->request->params([ $data = $this->request->params([
[ 'type', 'all' ] [ 'type', 'all' ],
[ 'name', '' ],
[ 'phone', '' ],
[ 'lessonCount', '' ],
[ 'leaveCount', '' ],
[ 'courseId', '' ],
[ 'classId', '' ],
]); ]);
return success(( new MemberService() )->student_list($data)); return success(( new MemberService() )->student_list($data));
} }

95
niucloud/app/service/api/member/MemberService.php

@ -376,27 +376,100 @@ class MemberService extends BaseApiService
//教练下全部学员 //教练下全部学员
public function student_list($data) public function student_list($data)
{ {
$where = []; // 添加调试日志
if($data['type'] == "daoqi"){ Log::debug('MemberService/student_list - 接收参数: ' . json_encode($data));
$where[] = ['a.end_date', 'between', [date('Y-m-d', strtotime('-6 days')), date('Y-m-d')]];
} // 创建查询构建器
$student_courses = new StudentCourses(); $student_courses = new StudentCourses();
$list = $student_courses $query = $student_courses
->alias("a") ->alias("a")
->join(['school_student' => 'b'],"a.student_id = b.id","left") ->join(['school_student' => 'b'],"a.student_id = b.id","left")
->join(['school_campus' => 'c'],'b.campus_id = c.id',"left") ->join(['school_campus' => 'c'],'b.campus_id = c.id',"left")
->join(['school_customer_resources' => 'e'],'e.id = b.user_id',"left") ->join(['school_customer_resources' => 'e'],'e.id = b.user_id',"left")
->join(['school_member' => 'f'],'f.member_id = e.member_id',"left") ->join(['school_member' => 'f'],'f.member_id = e.member_id',"left")
->join(['school_resource_sharing' => 'g'],'g.resource_id = e.id',"left") ->join(['school_resource_sharing' => 'g'],'g.resource_id = e.id',"left")
->where($where) ->where("a.main_coach_id = {$this->member_id} OR a.education_id = {$this->member_id} OR find_in_set('{$this->member_id}', a.assistant_ids) ");
->where("a.main_coach_id = {$this->member_id} OR a.education_id = {$this->member_id} OR find_in_set('{$this->member_id}', a.assistant_ids) ")
->field(" // 基础条件:到期时间筛选
b.id,b.name,c.campus_name as campus, if(isset($data['type']) && $data['type'] == "daoqi"){
a.total_hours,a.gift_hours,a.use_total_hours,a.use_gift_hours,a.end_date,f.headimg as avatar,g.id as resource_sharing_id $query->where('a.end_date', 'between', [date('Y-m-d', strtotime('-6 days')), date('Y-m-d')]);
}
// 处理课时数量查询 (gift_hours + total_hours - use_total_hours - use_gift_hours = lessonCount)
if (!empty($data['lessonCount'])) {
$query->whereRaw("(a.gift_hours + a.total_hours - a.use_total_hours - a.use_gift_hours) = {$data['lessonCount']}");
}
// 处理课程ID查询
if (!empty($data['courseId'])) {
$query->where('a.course_id', '=', $data['courseId']);
}
// 处理姓名查询(模糊匹配)
if (!empty($data['name'])) {
Log::debug('MemberService/student_list - 添加姓名查询条件: ' . $data['name']);
$namePattern = '%' . $data['name'] . '%';
Log::debug('MemberService/student_list - 姓名匹配模式: ' . $namePattern);
$query->where('e.name', 'like', $namePattern);
}
// 处理手机号查询(模糊匹配)
if (!empty($data['phone'])) {
Log::debug('MemberService/student_list - 添加手机号查询条件: ' . $data['phone']);
$phonePattern = '%' . $data['phone'] . '%';
Log::debug('MemberService/student_list - 手机号匹配模式: ' . $phonePattern);
$query->where('e.phone_number', 'like', $phonePattern);
}
// 处理请假次数查询
if (!empty($data['leaveCount'])) {
$person_course_schedule = new PersonCourseSchedule();
$leave_resource_ids = $person_course_schedule
->field('resources_id')
->where(['status' => 2]) // 请假状态
->group('resources_id')
->having("COUNT(*) = {$data['leaveCount']}")
->column('resources_id');
if (empty($leave_resource_ids)) {
// 如果没有满足请假次数的资源,返回空结果
Log::debug('MemberService/student_list - 没有满足请假次数的资源,返回空结果');
return [];
}
$query->where('e.id', 'in', $leave_resource_ids);
}
// 处理班级ID查询
if (!empty($data['classId'])) {
$class_resources_rel = new ClassResourcesRel();
$class_resource_ids = $class_resources_rel
->where(['class_id' => $data['classId']])
->column('resource_id');
if (empty($class_resource_ids)) {
// 如果班级下没有资源,返回空结果
Log::debug('MemberService/student_list - 班级下没有资源,返回空结果');
return [];
}
$query->where('e.id', 'in', $class_resource_ids);
}
// 记录生成的SQL(仅用于调试)
Log::debug('MemberService/student_list - SQL: ' . $query->buildSql());
$list = $query->field("
b.id,e.name,c.campus_name as campus,
a.total_hours,a.gift_hours,a.use_total_hours,a.use_gift_hours,a.end_date,f.headimg as avatar,g.id as resource_sharing_id,
e.phone_number
") ")
->select(); ->select();
return $list ? $list->toArray() : []; $result = $list ? $list->toArray() : [];
Log::debug('MemberService/student_list - 查询结果数量: ' . count($result));
return $result;
} }
public function sktj(){ public function sktj(){

12
uniapp/pages.json

@ -438,7 +438,7 @@
"navigationBarTitleText": "修改密码", "navigationBarTitleText": "修改密码",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {
@ -446,8 +446,8 @@
"style": { "style": {
"navigationBarTitleText": "教研管理列表", "navigationBarTitleText": "教研管理列表",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#171717",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {
@ -456,7 +456,7 @@
"navigationBarTitleText": "文章详情", "navigationBarTitleText": "文章详情",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {
@ -465,7 +465,7 @@
"navigationBarTitleText": "考试", "navigationBarTitleText": "考试",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#171717", "navigationBarBackgroundColor": "#171717",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {
@ -664,7 +664,7 @@
"style": { "style": {
"navigationBarTitleText": "服务列表", "navigationBarTitleText": "服务列表",
"navigationBarBackgroundColor": "#29d3b4", "navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {

2
uniapp/pages/coach/my/index.vue

@ -228,7 +228,7 @@
// //
openServiceDetail() { openServiceDetail() {
this.$navigateTo({ this.$navigateTo({
url: '/pages/coach/my/service_detail' url: '/pages/coach/my/service_list'
}) })
}, },

291
uniapp/pages/coach/my/service_list.vue

@ -1,6 +1,6 @@
<!--服务列表页面--> <!--服务列表页面-->
<template> <template>
<view class="container"> <view class="container dark-theme">
<view class="header"> <view class="header">
<view class="search-bar"> <view class="search-bar">
<view class="search-input"> <view class="search-input">
@ -258,17 +258,183 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
//
.container { .container {
background: #f5f5f5;
min-height: 100vh; min-height: 100vh;
} }
.header { //
background: white; .dark-theme {
padding: 20rpx; background-color: #121212;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); color: #ffffff;
.header {
background-color: #181818;
padding: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.3);
}
.search-input {
background-color: #1e1e1e;
border-radius: 25rpx;
padding: 15rpx 30rpx;
input {
width: 100%;
font-size: 28rpx;
color: #ffffff;
}
}
.filter-btn {
background-color: #00d18c;
color: #121212;
padding: 15rpx 30rpx;
border-radius: 25rpx;
font-size: 28rpx;
font-weight: bold;
}
.service-item {
background-color: #1e1e1e;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.3);
margin-bottom: 20rpx;
}
.service-title {
font-size: 32rpx;
font-weight: bold;
color: #ffffff;
flex: 1;
margin-right: 20rpx;
}
.service-badge {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 24rpx;
&.badge-success {
background-color: rgba(82, 196, 26, 0.2);
color: #52c41a;
border: 1px solid #52c41a;
}
&.badge-warning {
background-color: rgba(250, 140, 22, 0.2);
color: #fa8c16;
border: 1px solid #fa8c16;
}
&.badge-danger {
background-color: rgba(255, 77, 79, 0.2);
color: #ff4d4f;
border: 1px solid #ff4d4f;
}
&.badge-default {
background-color: rgba(102, 102, 102, 0.2);
color: #999;
border: 1px solid #666;
}
}
.meta-item {
.meta-label {
color: #b0b0b0;
font-size: 26rpx;
}
.meta-value {
color: #ffffff;
font-size: 26rpx;
}
}
.service-desc {
color: #b0b0b0;
font-size: 26rpx;
line-height: 1.5;
}
.service-footer {
padding-top: 15rpx;
border-top: 1px solid #333333;
}
.service-time {
color: #999999;
font-size: 24rpx;
}
.service-action {
color: #00d18c;
font-size: 26rpx;
}
.empty-state {
.empty-icon {
opacity: 0.2;
}
.empty-text {
color: #b0b0b0;
}
}
//
.filter-popup {
background-color: #1e1e1e;
border-radius: 20rpx 20rpx 0 0;
}
.popup-header {
border-bottom: 1px solid #333333;
}
.popup-title {
color: #ffffff;
}
.popup-close {
color: #b0b0b0;
}
.filter-title {
color: #ffffff;
}
.filter-option {
background-color: #282828;
color: #b0b0b0;
&.active {
background-color: #00d18c;
color: #121212;
}
}
.popup-actions {
border-top: 1px solid #333333;
}
.btn {
&.btn-reset {
background-color: #333333;
color: #ffffff;
}
&.btn-confirm {
background-color: #00d18c;
color: #121212;
font-weight: bold;
}
}
} }
//
.search-bar { .search-bar {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
@ -277,36 +443,12 @@ export default {
.search-input { .search-input {
flex: 1; flex: 1;
background: #f5f5f5;
border-radius: 25rpx;
padding: 15rpx 30rpx;
input {
width: 100%;
font-size: 28rpx;
}
}
.filter-btn {
background: #29d3b4;
color: white;
padding: 15rpx 30rpx;
border-radius: 25rpx;
font-size: 28rpx;
} }
.service-list { .service-list {
padding: 20rpx; padding: 20rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20rpx;
}
.service-item {
background: white;
border-radius: 16rpx;
padding: 30rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.1);
} }
.service-header { .service-header {
@ -316,40 +458,6 @@ export default {
margin-bottom: 20rpx; margin-bottom: 20rpx;
} }
.service-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
flex: 1;
margin-right: 20rpx;
}
.service-badge {
padding: 8rpx 16rpx;
border-radius: 20rpx;
font-size: 24rpx;
&.badge-success {
background: #e8f5e8;
color: #52c41a;
}
&.badge-warning {
background: #fff2e8;
color: #fa8c16;
}
&.badge-danger {
background: #fff1f0;
color: #ff4d4f;
}
&.badge-default {
background: #f0f0f0;
color: #666;
}
}
.service-content { .service-content {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -364,42 +472,17 @@ export default {
.meta-item { .meta-item {
display: flex; display: flex;
align-items: center; align-items: center;
.meta-label {
color: #666;
font-size: 26rpx;
}
.meta-value {
color: #333;
font-size: 26rpx;
}
}
.service-desc {
color: #666;
font-size: 26rpx;
line-height: 1.5;
} }
.service-footer { .service-footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding-top: 15rpx;
border-top: 1px solid #f0f0f0;
}
.service-time {
color: #999;
font-size: 24rpx;
} }
.service-action { .service-action {
display: flex; display: flex;
align-items: center; align-items: center;
color: #29d3b4;
font-size: 26rpx;
.action-arrow { .action-arrow {
margin-left: 10rpx; margin-left: 10rpx;
@ -417,28 +500,18 @@ export default {
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
opacity: 0.3;
} }
.empty-text { .empty-text {
color: #999;
font-size: 28rpx; font-size: 28rpx;
} }
} }
//
.filter-popup {
background: white;
border-radius: 20rpx 20rpx 0 0;
max-height: 80vh;
}
.popup-header { .popup-header {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
padding: 30rpx; padding: 30rpx;
border-bottom: 1px solid #f0f0f0;
} }
.popup-title { .popup-title {
@ -448,7 +521,6 @@ export default {
.popup-close { .popup-close {
font-size: 36rpx; font-size: 36rpx;
color: #999;
} }
.filter-content { .filter-content {
@ -463,7 +535,6 @@ export default {
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
margin-bottom: 20rpx; margin-bottom: 20rpx;
color: #333;
} }
.filter-options { .filter-options {
@ -474,22 +545,14 @@ export default {
.filter-option { .filter-option {
padding: 15rpx 30rpx; padding: 15rpx 30rpx;
background: #f5f5f5;
border-radius: 25rpx; border-radius: 25rpx;
font-size: 26rpx; font-size: 26rpx;
color: #666;
&.active {
background: #29d3b4;
color: white;
}
} }
.popup-actions { .popup-actions {
display: flex; display: flex;
gap: 20rpx; gap: 20rpx;
padding: 30rpx; padding: 30rpx;
border-top: 1px solid #f0f0f0;
} }
.btn { .btn {
@ -498,15 +561,5 @@ export default {
border-radius: 12rpx; border-radius: 12rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
&.btn-reset {
background: #f0f0f0;
color: #333;
}
&.btn-confirm {
background: #29d3b4;
color: white;
}
} }
</style> </style>

91
uniapp/pages/coach/my/teaching_management.vue

@ -1,6 +1,6 @@
<template> <template>
<view> <view class="dark-theme">
<fui-tabs :tabs="tabsList" @change="change" isDot scroll alignLeft></fui-tabs> <fui-tabs :tabs="tabsList" @change="change" isDot scroll alignLeft class="custom-tabs" :color="'#00d18c'" :selectedColor="'#00d18c'" :background="'#121212'" :itemBackground="'#121212'"></fui-tabs>
<scroll-view scroll-y :scroll-with-animation="true" @scrolltolower="onReachBottom"> <scroll-view scroll-y :scroll-with-animation="true" @scrolltolower="onReachBottom">
<view class="dis_style div_style" v-for="(item,index) in arrayList" :key="index"> <view class="dis_style div_style" v-for="(item,index) in arrayList" :key="index">
<view @click="info(item.id)"> <view @click="info(item.id)">
@ -10,7 +10,7 @@
<view> <view>
<view class='color_date_style'>{{item.create_time}}</view> <view class='color_date_style'>{{item.create_time}}</view>
<view class='color_date_style' style="color: blue;" v-if="item.exam_papers_id != 0" @click="goTake(item.exam_papers_id,item.id)">去考试</view> <view class='color_date_style exam-btn' v-if="item.exam_papers_id != 0" @click="goTake(item.exam_papers_id,item.id)">去考试</view>
</view> </view>
</view> </view>
<view v-if="loading" class="loading">加载中...</view> <view v-if="loading" class="loading">加载中...</view>
@ -135,7 +135,49 @@
} }
</script> </script>
<style> <style lang="scss">
.dark-theme {
background-color: #121212;
color: #ffffff;
min-height: 100vh;
}
.dark-theme .div_style {
padding: 18rpx 50rpx;
background-color: #1e1e1e;
margin-top: 10rpx;
line-height: 30px;
border-radius: 8rpx;
}
.dark-theme .color_style {
font-size: 30rpx;
font-weight: bold;
color: #ffffff;
}
.dark-theme .color_type_style {
font-size: 22rpx;
color: #b0b0b0;
}
.dark-theme .color_date_style {
font-size: 22rpx;
color: #b0b0b0;
}
.dark-theme .exam-btn {
color: #7cb9ff;
}
.dark-theme .loading,
.dark-theme .no-more {
color: #b0b0b0;
text-align: center;
padding: 20rpx 0;
}
/* 非暗黑模式样式 */
.div_style { .div_style {
padding: 18rpx 50rpx; padding: 18rpx 50rpx;
background-color: #fff; background-color: #fff;
@ -161,4 +203,45 @@
.color_date_style { .color_date_style {
font-size: 22rpx; font-size: 22rpx;
} }
.exam-btn {
color: blue;
}
/* 自定义 tab 栏样式 */
.custom-tabs {
/* 确保背景是黑色 */
background-color: #121212 !important;
.fui-tabs__item {
background-color: #121212 !important;
color: #00d18c !important;
}
.fui-tabs__item-active {
color: #00d18c !important;
}
.fui-tabs__line {
background-color: #00d18c !important;
}
}
/* 全局样式覆盖 - 使用dart-sass语法 */
:deep(.fui-tabs__wrap) {
background-color: #121212 !important;
}
:deep(.fui-tabs__item) {
background-color: #121212 !important;
color: #00d18c !important;
}
:deep(.fui-tabs__item-active) {
color: #00d18c !important;
}
:deep(.fui-tabs__line) {
background-color: #00d18c !important;
}
</style> </style>

398
uniapp/pages/coach/student/info.vue

@ -1,74 +1,26 @@
<!--学员-详情--> <!--学员-详情-->
<template> <template>
<view class="main_box"> <view class="main_box">
<!--自定义导航栏-->
<!-- <view class="navbar_section">-->
<!-- <view class="title">学员详情</view>-->
<!-- </view>-->
<!--学员信息--> <!--学员信息-->
<view class="user_section"> <view class="user_section">
<view class="box"> <view class="box">
<view class="left"> <view class="left">
<image class="pic" :src="studentsInfo.customerResources.member.headimg"></image> <image class="pic" :src="studentsInfo.customerResources.member.headimg"></image>
<!-- <view class="btn_box" v-if="checkExpireTime(studentsInfo.expire_time)"> </view>
<view class="btn">即将到期</view> <view class="right">
</view> --> <view class="item">
</view> <view class="name">{{ studentsInfo.name }}</view>
<view class="right"> <view class="age">
<view class="item"> {{ studentsInfo.customerResources.age }}
<view class="name">{{studentsInfo.name}}</view> </view>
<view class="age"> </view>
<!-- {{formatAgeMonth(studentsInfo.age)}} --> <view class="item">
{{studentsInfo.customerResources.age}} <view class="title">电话{{ studentsInfo.customerResources.phone_number }}</view>
</view> </view>
</view> </view>
<!-- <view class="item">--> </view>
<!-- <view class="title">家长姓名黄大呢</view>-->
<!-- </view>-->
<view class="item">
<view class="title">电话{{studentsInfo.customerResources.phone_number}}</view>
</view>
</view>
</view>
</view> </view>
<!--课程信息-->
<!-- <view class="course_section">-->
<!-- <view class="main">-->
<!-- <view class="course_box">-->
<!-- <view class="item">-->
<!-- <view class="title">篮球少儿课程</view>-->
<!-- </view>-->
<!-- <view class="item">-->
<!-- <image class="pic" src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png"></image>-->
<!-- <view class="name">{{studentsInfo.name}}</view>-->
<!-- </view>-->
<!-- <view class="item">-->
<!-- <view class="content">截止时间{{studentsInfo.expire_time}}</view>-->
<!-- </view>-->
<!-- <view class="item">-->
<!-- <view class="content">已上课时{{studentsInfo.have_study_time}}</view>-->
<!-- <view class="content">剩余课时{{studentsInfo.end_study_time}}</view>-->
<!-- </view>-->
<!-- <view class="tag">-->
<!-- 出勤高-->
<!-- </view>-->
<!-- <view class="btn">-->
<!-- 延课一周-->
<!-- </view>-->
<!-- </view>-->
<!-- </view>-->
<!-- <view class="bg_box bg_top"></view>-->
<!-- <view class="bg_box bg_bottom"></view>-->
<!-- </view>-->
<view class="main_section"> <view class="main_section">
<view class="section_box"> <view class="section_box">
<view class="tag_box"> <view class="tag_box">
@ -78,63 +30,62 @@
<!--作业列表--> <!--作业列表-->
<view v-if="tabType=='1'" class="section_1"> <view v-if="tabType=='1'" class="section_1">
<view class="ul"> <view class="ul">
<view class="li" <view class="li"
v-for="(v,k) in assignmentsList" v-for="(v,k) in assignmentsList"
:key="k" :key="k"
@click="opebViewWorkDetails(v)"> @click="opebViewWorkDetails(v)">
<view class="left"> <view class="left">
<view class="title">{{v.courses_name}}</view> <view class="title">{{ v.courses_name }}</view>
<view class="date">上课时间{{v.submit_time}}</view> <view class="date">上课时间{{ v.submit_time }}</view>
</view> </view>
<view class="right"> <view class="right">
<view v-if="v.status==1" class="btn" style="background-color: #e2e2e2;">作业未提交</view> <view v-if="v.status==1" class="btn" style="background-color: #e2e2e2;">作业未提交</view>
<view v-else-if="v.status==2" class="btn" style="background-color: #a4adb3;">待批改</view> <view v-else-if="v.status==2" class="btn" style="background-color: #a4adb3;">待批改</view>
<view v-else-if="v.status==3" class="btn" style="background-color: #29d3b4;">作业已完成</view> <view v-else-if="v.status==3" class="btn" style="background-color: #29d3b4;">作业已完成</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!--评测报告--> <!--评测报告-->
<view v-if="tabType=='2'" class="section_2"> <view v-if="tabType=='2'" class="section_2">
<scroll-view <scroll-view
class="ul" class="ul"
scroll-y="true" scroll-y="true"
:lower-threshold="lowerThreshold" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" @scrolltolower="loadMoreData"
style="height: 65vh;" style="height: 65vh;"
> >
<view <view
class="li" class="li"
v-for="(v,k) in surveyList" v-for="(v,k) in surveyList"
:key="k" @click="openViewPhysicalExamination(v)" :key="k" @click="openViewPhysicalExamination(v)"
> >
<view class="top"> <view class="top">
<view class="title">综合评分:{{v.calculateChildHealthScore}}</view> <view class="title">综合评分:{{ v.calculateChildHealthScore }}</view>
<!-- <view class="hint">打败了99%学员</view>--> <!-- <view class="hint">打败了99%学员</view>-->
</view> </view>
<view class="bottom">测试时间{{$util.formatToDateTime(v.created_at, 'Y-m-d')}}</view> <view class="bottom">测试时间{{ $util.formatToDateTime(v.created_at, 'Y-m-d') }}</view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</view> </view>
<!-- 底部导航--> <!-- 底部导航-->
<!-- <AQTabber/>--> <!-- <AQTabber/>-->
</view> </view>
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js'
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from '@/components/AQ/AQTabber.vue'
import apiRoute from '@/api/apiRoute.js'; import apiRoute from '@/api/apiRoute.js'
export default { export default {
components: { components: {
@ -142,62 +93,62 @@ export default {
}, },
data() { data() {
return { return {
tabType:'1',//1=,2= tabType: '1',//1=,2=
Atype:1,//1=,2= Atype: 1,//1=,2=
students_id:'',//id students_id: '',//id
studentsInfo:{},// studentsInfo: {},//
assignmentsList:[],// assignmentsList: [],//
loading:false,// loading: false,//
lowerThreshold: 100,// lowerThreshold: 100,//
isReachedBottom: false,//|true=|false= isReachedBottom: false,//|true=|false=
// //
filteredData:{ filteredData: {
page:1,// page: 1,//
limit:10,// limit: 10,//
total:10,// total: 10,//
user_id: '',//id user_id: '',//id
}, },
surveyList:[],// surveyList: [],//
} }
}, },
onLoad(options) { onLoad(options) {
this.students_id = options.students_id//id this.students_id = options.students_id//id
}, },
onShow(){ onShow() {
this.init()// this.init()//
}, },
methods: { methods: {
// //
async init(){ async init() {
// //
await this.getStudentsInfo() await this.getStudentsInfo()
await this.getSurveyList() await this.getSurveyList()
}, },
formatAgeMonth(input) { formatAgeMonth(input) {
let str = String(input); let str = String(input)
// //
let [yearPart, monthPart] = str.split('.'); let [yearPart, monthPart] = str.split('.')
// 0 // 0
if (!monthPart) { if (!monthPart) {
monthPart = '00'; monthPart = '00'
} }
// 00 0 // 00 0
monthPart = monthPart === '00' ? '0' : monthPart; monthPart = monthPart === '00' ? '0' : monthPart
return `${yearPart}${monthPart}`; return `${yearPart}${monthPart}`
}, },
// //
async getStudentsInfo(){ async getStudentsInfo() {
let data = { let data = {
students_id:this.students_id students_id: this.students_id,
} }
let res = await apiRoute.jlStudentsInfo(data) let res = await apiRoute.jlStudentsInfo(data)
if (res.code != 1){ if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none',
}) })
return return
} }
@ -205,7 +156,7 @@ export default {
this.studentsInfo = res.data// this.studentsInfo = res.data//
this.assignmentsList = res.data.physical_test// this.assignmentsList = res.data.physical_test//
this.filteredData.user_id = res.data.user_id this.filteredData.user_id = res.data.user_id
}, },
// expire_time 5 // expire_time 5
@ -214,12 +165,12 @@ export default {
return false return false
} }
const expireDate = new Date(expireTime); const expireDate = new Date(expireTime)
const currentDate = new Date(); const currentDate = new Date()
// //
const timeDifference = expireDate - currentDate; const timeDifference = expireDate - currentDate
const daysDifference = timeDifference / (1000 * 60 * 60 * 24); const daysDifference = timeDifference / (1000 * 60 * 60 * 24)
if (daysDifference >= 5) { if (daysDifference >= 5) {
return true return true
@ -233,55 +184,55 @@ export default {
loadMoreData() { loadMoreData() {
// //
if (!this.isReachedBottom) { if (!this.isReachedBottom) {
this.isReachedBottom = true;// this.isReachedBottom = true//
this.getSurveyList(); this.getSurveyList()
} }
}, },
// //
async resetFilteredData() { async resetFilteredData() {
this.isReachedBottom = false; // 便 this.isReachedBottom = false // 便
this.filteredData.page = 1// this.filteredData.page = 1//
this.filteredData.limit = 10// this.filteredData.limit = 10//
this.filteredData.total = 10// this.filteredData.total = 10//
}, },
// //
async getSurveyList(){ async getSurveyList() {
this.loading = true this.loading = true
let data = {...this.filteredData} let data = { ...this.filteredData }
// //
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
this.loading = false this.loading = false
uni.showToast({ uni.showToast({
title: '暂无更多', title: '暂无更多',
icon: 'none' icon: 'none',
}) })
return return
} }
if(data.page == 1){ if (data.page == 1) {
this.surveyList = [] this.surveyList = []
} }
//- //-
let res = await apiRoute.physicalTest(data) let res = await apiRoute.physicalTest(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false
if (res.code != 1){ if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none',
}) })
return return
} }
console.log(res,111)
this.surveyList = this.surveyList.concat(res.data.physical_test.data); // 使 concat console.log(res, 111)
this.surveyList = this.surveyList.concat(res.data.physical_test.data) // 使 concat
console.log('列表',this.surveyList) console.log('列表', this.surveyList)
this.filteredData.total = res.data.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },
@ -293,50 +244,51 @@ export default {
}, },
// //
openViewCourseInfo(item){ openViewCourseInfo(item) {
this.$navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info',
}) })
}, },
// //
openViewStudentInfo(item){ openViewStudentInfo(item) {
this.$navigateTo({ this.$navigateTo({
url: '/pages/coach/student/info' url: '/pages/coach/student/info',
}) })
}, },
// //
openViewPhysicalExamination(item){ openViewPhysicalExamination(item) {
let survey_id = item.id let survey_id = item.id
this.$navigateTo({ this.$navigateTo({
url: `/pages/coach/student/physical_examination?survey_id=${survey_id}` url: `/pages/coach/student/physical_examination?survey_id=${survey_id}`,
}) })
}, },
// //
opebViewWorkDetails(item){ opebViewWorkDetails(item) {
this.$navigateTo({ this.$navigateTo({
url: '/pages/coach/student/work_details' url: '/pages/coach/student/work_details',
}) })
}, },
} },
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main_box{ .main_box {
background: #292929 ; background: #292929;
min-height: 100vh; min-height: 100vh;
} }
// //
.navbar_section{ .navbar_section {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #292929; background: #292929;
.title{
.title {
padding: 40rpx 0rpx; padding: 40rpx 0rpx;
/* 小程序端样式 */ /* 小程序端样式 */
@ -354,58 +306,67 @@ export default {
background-color: #29D3B4; background-color: #29D3B4;
padding-top: 58rpx; padding-top: 58rpx;
padding-bottom: 42rpx; padding-bottom: 42rpx;
.box{
.box {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 15rpx; gap: 15rpx;
.left{
.left {
position: relative; position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
width: 120rpx; width: 120rpx;
.pic{
.pic {
width: 92rpx; width: 92rpx;
height: 92rpx; height: 92rpx;
border-radius: 50%; border-radius: 50%;
} }
.btn_box{
.btn_box {
position: absolute; position: absolute;
bottom: -18rpx; bottom: -18rpx;
.btn{
.btn {
width: 120rpx; width: 120rpx;
height: 38rpx; height: 38rpx;
line-height: 40rpx; line-height: 40rpx;
border-radius: 4rpx; border-radius: 4rpx;
background-color: rgba(245,154,35,1); background-color: rgba(245, 154, 35, 1);
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
border: 0rpx solid rgba(121,121,121,1); border: 0rpx solid rgba(121, 121, 121, 1);
} }
} }
} }
.right{
.right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 18rpx; gap: 18rpx;
.item{
.item {
color: #fff; color: #fff;
display: flex; display: flex;
align-items: center; align-items: center;
.name{
.name {
font-size: 28rpx; font-size: 28rpx;
} }
.age{
.age {
margin-left: 20rpx; margin-left: 20rpx;
width: 128rpx; width: 128rpx;
height: 42rpx; height: 42rpx;
line-height: 42rpx; line-height: 42rpx;
border-radius: 34rpx; border-radius: 34rpx;
background-color: rgba(255,255,255,1); background-color: rgba(255, 255, 255, 1);
color: rgba(51,51,51,1); color: rgba(51, 51, 51, 1);
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
} }
@ -415,15 +376,17 @@ export default {
} }
// //
.course_section{ .course_section {
position: relative; position: relative;
.main{
.main {
position: relative; position: relative;
z-index: 2; z-index: 2;
padding: 0 24rpx; padding: 0 24rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
.course_box{
.course_box {
padding: 42rpx 28rpx; padding: 42rpx 28rpx;
width: 692rpx; width: 692rpx;
border-radius: 20rpx; border-radius: 20rpx;
@ -432,10 +395,12 @@ export default {
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 20rpx;
position: relative; position: relative;
.item { .item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 22rpx; gap: 22rpx;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
@ -457,7 +422,8 @@ export default {
font-size: 24rpx; font-size: 24rpx;
} }
} }
.tag{
.tag {
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
@ -465,12 +431,13 @@ export default {
height: 60rpx; height: 60rpx;
line-height: 60rpx; line-height: 60rpx;
border-radius: 0rpx 24rpx 0rpx 24rpx; border-radius: 0rpx 24rpx 0rpx 24rpx;
background-color: rgba(236,128,141,1); background-color: rgba(236, 128, 141, 1);
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
} }
.btn{
.btn {
position: absolute; position: absolute;
right: 30rpx; right: 30rpx;
bottom: 50rpx; bottom: 50rpx;
@ -478,34 +445,36 @@ export default {
height: 48rpx; height: 48rpx;
line-height: 48rpx; line-height: 48rpx;
border-radius: 10rpx; border-radius: 10rpx;
background-color: rgba(41,211,180,0); background-color: rgba(41, 211, 180, 0);
color: rgba(50,219,224,1); color: rgba(50, 219, 224, 1);
font-size: 24rpx; font-size: 24rpx;
text-align: center; text-align: center;
font-family: -regular; font-family: -regular;
border: 2rpx solid rgba(50,219,224,1); border: 2rpx solid rgba(50, 219, 224, 1);
} }
}
} }
}
.bg_box{ .bg_box {
z-index: 1; z-index: 1;
width: 100%; width: 100%;
height: 150rpx; height: 150rpx;
} }
.bg_top{ .bg_top {
position: absolute; position: absolute;
top: 0; top: 0;
background-color: #29D3B4; background-color: #29D3B4;
} }
.bg_bottom{
.bg_bottom {
top: 50%; top: 50%;
position: absolute; position: absolute;
background-color: #292929; background-color: #292929;
} }
} }
.main_section{ .main_section {
background: #292929 100%; background: #292929 100%;
padding: 0 24rpx; padding: 0 24rpx;
padding-top: 40rpx; padding-top: 40rpx;
@ -521,50 +490,57 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 38rpx; gap: 38rpx;
.tag_box{
.tag_box {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
gap: 112rpx; gap: 112rpx;
.item{
.item {
width: 112rpx; width: 112rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.select{
.select {
color: #29D3B4; color: #29D3B4;
} }
} }
// //
.section_1{ .section_1 {
width: 100%; width: 100%;
.ul{
.ul {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12rpx; gap: 12rpx;
.li{
.li {
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
border: 1px solid #29D3B4; border: 1px solid #29D3B4;
border-radius: 18rpx; border-radius: 18rpx;
background-color: rgba(41,211,180,0.16); background-color: rgba(41, 211, 180, 0.16);
font-size: 26rpx; font-size: 26rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.left{
.left {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 15rpx; gap: 15rpx;
} }
.right{
.btn{ .right {
.btn {
width: 110rpx; width: 110rpx;
height: 44rpx; height: 44rpx;
line-height: 44rpx; line-height: 44rpx;
border-radius: 8rpx; border-radius: 8rpx;
background-color: rgba(41,211,180,1); background-color: rgba(41, 211, 180, 1);
color: rgba(255,255,255,1); color: rgba(255, 255, 255, 1);
font-size: 20rpx; font-size: 20rpx;
text-align: center; text-align: center;
} }
@ -572,35 +548,43 @@ export default {
} }
} }
} }
// //
.section_2{ .section_2 {
width: 100%; width: 100%;
.ul{
.ul {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.li{
.li {
margin-bottom: 12rpx; margin-bottom: 12rpx;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
border: 1px solid #29D3B4; border: 1px solid #29D3B4;
border-radius: 18rpx; border-radius: 18rpx;
background-color: rgba(41,211,180,0.16); background-color: rgba(41, 211, 180, 0.16);
font-size: 26rpx; font-size: 26rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 20rpx; gap: 20rpx;
.top{
.top {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 40rpx; gap: 40rpx;
.title{
.title {
font-size: 34rpx; font-size: 34rpx;
} }
.hint{
.hint {
color: #F59A23; color: #F59A23;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.bottom{}
.bottom {
}
} }
} }

30
uniapp/pages/coach/student/student_list.vue

@ -64,7 +64,10 @@
<fui-form-item label="课程名称"> <fui-form-item label="课程名称">
<view class="custom-picker-input" @click="showCoursePicker = true"> <view class="custom-picker-input" @click="showCoursePicker = true">
<text>{{ selectedCourseName || '请选择' }}</text> <text>{{ selectedCourseName || '请选择' }}</text>
<fui-icon name="arrowdown" :size="32" color="#00d18c"></fui-icon> <view class="picker-actions">
<fui-icon v-if="selectedCourseName" name="close" :size="28" color="#999999" @click.stop="clearCourseSelection"></fui-icon>
<fui-icon name="arrowdown" :size="32" color="#00d18c"></fui-icon>
</view>
</view> </view>
<!-- 使用通用单选选择器组件 --> <!-- 使用通用单选选择器组件 -->
<single-picker <single-picker
@ -81,7 +84,10 @@
<fui-form-item label="班级"> <fui-form-item label="班级">
<view class="custom-picker-input" @click="showClassPicker = true"> <view class="custom-picker-input" @click="showClassPicker = true">
<text>{{ selectedClassName || '请选择' }}</text> <text>{{ selectedClassName || '请选择' }}</text>
<fui-icon name="arrowdown" :size="32" color="#00d18c"></fui-icon> <view class="picker-actions">
<fui-icon v-if="selectedClassName" name="close" :size="28" color="#999999" @click.stop="clearClassSelection"></fui-icon>
<fui-icon name="arrowdown" :size="32" color="#00d18c"></fui-icon>
</view>
</view> </view>
<!-- 使用通用单选选择器组件 --> <!-- 使用通用单选选择器组件 -->
<single-picker <single-picker
@ -145,7 +151,7 @@
}, },
async getStudentList() { async getStudentList() {
try { try {
// student_listtype //
const params = { type: 'all' }; const params = { type: 'all' };
const res = await memberApi.jlGetStudentList(Object.assign(params, this.searchForm)); const res = await memberApi.jlGetStudentList(Object.assign(params, this.searchForm));
console.log('获取学员列表响应:', res); console.log('获取学员列表响应:', res);
@ -205,6 +211,18 @@
this.selectedClassName = e.text; this.selectedClassName = e.text;
}, },
//
clearCourseSelection(e) {
e.stopPropagation(); //
this.searchForm.courseId = null;
this.selectedCourseName = '';
},
clearClassSelection(e) {
e.stopPropagation(); //
this.searchForm.classId = null;
this.selectedClassName = '';
},
// //
closeSearch() { closeSearch() {
this.showSearch = false; this.showSearch = false;
@ -458,4 +476,10 @@
border-radius: 8rpx; border-radius: 8rpx;
border-bottom: 2rpx solid #00d18c; border-bottom: 2rpx solid #00d18c;
} }
.picker-actions {
display: flex;
align-items: center;
gap: 10rpx;
}
</style> </style>

7
uniapp/pages/market/clue/clue_info.vue

@ -64,6 +64,13 @@
<view :class="{'selected-text': switch_tags_type === 3, 'text': switch_tags_type !== 3}" <view :class="{'selected-text': switch_tags_type === 3, 'text': switch_tags_type !== 3}"
@click="switch_tags(3)">通话记录 @click="switch_tags(3)">通话记录
</view> </view>
</view>
<view :class="{'selected-text': switch_tags_type === 3, 'text': switch_tags_type !== 3}"
@click="switch_tags(3)">体测记录
</view>
<view :class="{'selected-text': switch_tags_type === 3, 'text': switch_tags_type !== 3}"
@click="switch_tags(3)">学习计划
</view>
</view> </view>
</view> </view>
</view> </view>

Loading…
Cancel
Save