李双庆 1 year ago
parent
commit
db24244768
  1. 84
      api/apiRoute.js
  2. 8
      common/axios.js
  3. 15
      components/AQ/AQTabber.vue
  4. 54
      main.js
  5. 11
      pages.json
  6. 4
      pages/coach/class/info.vue
  7. 2
      pages/coach/class/list.vue
  8. 2
      pages/coach/course/info.vue
  9. 4
      pages/coach/course/info_list.vue
  10. 2
      pages/coach/course/list.vue
  11. 8
      pages/coach/home/index.vue
  12. 3
      pages/coach/job/add.vue
  13. 2
      pages/coach/job/list.vue
  14. 2
      pages/coach/my/arrival_statistics.vue
  15. 4
      pages/coach/my/due_soon.vue
  16. 2
      pages/coach/my/exam_results.vue
  17. 2
      pages/coach/my/gotake_exam.vue
  18. 16
      pages/coach/my/index.vue
  19. 2
      pages/coach/my/schooling_statistics.vue
  20. 4
      pages/coach/my/set_up.vue
  21. 4
      pages/coach/my/teaching_management.vue
  22. 2
      pages/coach/my/update_pass.vue
  23. 8
      pages/coach/student/info.vue
  24. 253
      pages/common/my_attendance.vue
  25. 4
      pages/common/my_message.vue
  26. 2
      pages/common/sys_msg_list.vue
  27. 128
      pages/market/clue/add_clues.vue
  28. 8
      pages/market/clue/clue_info.vue
  29. 126
      pages/market/clue/edit_clues.vue
  30. 44
      pages/market/clue/edit_clues_log.vue
  31. 4
      pages/market/clue/index.vue
  32. 3
      pages/market/clue/new_task.vue
  33. 3
      pages/market/clue/writing_followUp.vue
  34. 14
      pages/market/data/index.vue
  35. 27
      pages/market/my/index.vue
  36. 4
      pages/market/my/set_up.vue
  37. 2
      pages/market/my/signed_client_list.vue
  38. 5
      pages/market/my/update_pass.vue
  39. 293
      pages/student/index/index.vue
  40. 47
      pages/student/index/job_list.vue
  41. 56
      pages/student/index/work_details.vue
  42. 5
      pages/student/login/forgot.vue
  43. 12
      pages/student/login/login.vue
  44. 47
      pages/student/my/lesson_consumption.vue
  45. 25
      pages/student/my/my.vue
  46. 211
      pages/student/my/my_coach.vue
  47. 4
      pages/student/my/set_up.vue
  48. 2
      pages/student/my/update_pass.vue
  49. 183
      pages/student/timetable/index.vue
  50. 101
      pages/student/timetable/info.vue
  51. 75
      pages/student/timetable/list.vue

84
api/apiRoute.js

@ -532,6 +532,90 @@ export default {
}) })
}, },
//学生端-学生课程安排-列表
xy_personCourseSchedule(data = {}) {
let url = '/xy/personCourseSchedule'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-详情
xy_personCourseScheduleInfo(data = {}) {
let url = '/xy/personCourseSchedule/info'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-修改请假状态
xy_personCourseScheduleEditStatus(data = {}) {
let url = '/xy/personCourseSchedule/editStatus'
return http.post(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取排课日历
xy_personCourseScheduleGetCalendar(data = {}) {
let url = '/xy/personCourseSchedule/getCalendar'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetVenueListAll(data = {}) {
let url = '/xy/personCourseSchedule/getVenueListAll'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生排课的全部场地列表
xy_personCourseScheduleGetMyCoach(data = {}) {
let url = '/xy/personCourseSchedule/getMyCoach'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-学生课程安排-获取学生课程消耗记录列表
xy_personCourseScheduleGetStudentCourseUsageList(data = {}) {
let url = '/xy/personCourseSchedule/getStudentCourseUsageList'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-获取作业列表
xy_assignment(data = {}) {
let url = '/xy/assignment'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-获取作业详情
xy_assignmentsInfo(data = {}) {
let url = '/xy/assignment/info'
return http.get(url, data).then(res => {
return res;
})
},
//学生端-提交作业
xy_assignmentSubmitObj(data = {}) {
let url = '/xy/assignment/submitObj'
return http.get(url, data).then(res => {
return res;
})
},

8
common/axios.js

@ -37,7 +37,7 @@ export default {
title:'加载中...' title:'加载中...'
}) })
return new Promise((cback, reject) => { return new Promise((cback, reject) => {
console.log(Api_url + url) console.log('请求地址',Api_url + url)
uni.request({ uni.request({
url: Api_url + url, url: Api_url + url,
data: param, data: param,
@ -55,8 +55,8 @@ export default {
if (res_code == 200) { if (res_code == 200) {
if (res_codes == 401) { if (res_codes == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/student/login/login' url: `/pages/student/login/login?res_codes=${res_codes}`
}) })
}else{ }else{
cback(res.data); cback(res.data);
} }
@ -70,7 +70,7 @@ export default {
} else { } else {
if (res_codes == 401) { if (res_codes == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/student/login/login' url: `/pages/student/login/login?res_codes=${res_codes}`
}) })
} else { } else {
console.log('400/500', url, error, res) console.log('400/500', url, error, res)

15
components/AQ/AQTabber.vue

@ -157,9 +157,18 @@
//跳转tabBar页面 //跳转tabBar页面
uni.setStorageSync('tabBerIndex', e.index) uni.setStorageSync('tabBerIndex', e.index)
console.log('qqq', e.urlPath) console.log('qqq', e.urlPath)
uni.navigateTo({
url: e.urlPath //关闭当前页面跳转新页面
}) uni.redirectTo({
url: e.urlPath
})
//关闭全部页面
// uni.reLaunch({
// url: e.urlPath
// })
console.log('qqq2,执行完了')
}else{ }else{
this.show = true this.show = true
} }

54
main.js

@ -21,6 +21,60 @@ Vue.prototype.$getimg = Api_url
Vue.mixin(minxin) Vue.mixin(minxin)
/**
* 全局封装跳转方法:this.$navigateTo({ url: 'xxx' })
* 支持在页面栈 >= 8 层时,关闭全部页面打开页面
*/
Vue.prototype.$navigateTo = function (options) {
// 只接受 { url: 'xxx' } 的形式作为参数
if (typeof options !== 'object' || !options.url) {
console.error('跳转参数错误', options);
// uni.showToast({ title: '参数错误', icon: 'none' });
return;
}
const url = options.url; // 获取要跳转的页面路径
const maxStackSize = 4; // 页面栈最大保留数量
const pages = getCurrentPages(); // 获取当前页面栈
const currentPage = pages[pages.length - 1];
const currentRoute = currentPage.route;
console.log('view-页面栈长度:',pages.length)
// 判断当前页面栈是否已满
if (pages.length >= maxStackSize) {
// 页面栈已满,使用 reLaunch 关闭所有页面并跳转
uni.reLaunch({
url,
success: () => {
// 可选:用于调试
// console.log('已通过 reLaunch 跳转到:', url);
},
fail: (err) => {
console.error('reLaunch 跳转失败:', err);
// uni.showToast({ title: '页面跳转失败', icon: 'none' });
}
});
} else {
// 页面栈未满,正常使用 navigateTo 正常跳转
uni.navigateTo({
url,
success: () => {
// 可选:用于调试
// console.log('当前页面栈:', getCurrentPages().map(p => p.route));
},
fail: (err) => {
console.error('navigateTo 跳转失败:', err);
// uni.showToast({ title: '页面跳转失败', icon: 'none' });
}
});
}
};
const app = new Vue({ const app = new Vue({
store, store,
...App ...App

11
pages.json

@ -36,6 +36,15 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/student/my/my_coach",
"style": {
"navigationBarTitleText": "我的教练",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#29d3b4",
"navigationBarTextStyle": "white"
}
},
{ {
"path": "pages/student/login/forgot", "path": "pages/student/login/forgot",
@ -481,7 +490,7 @@
"navigationBarTitleText": "线索", "navigationBarTitleText": "线索",
"navigationStyle": "default", "navigationStyle": "default",
"navigationBarBackgroundColor": "#292929", "navigationBarBackgroundColor": "#292929",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "white"
} }
}, },
{ {

4
pages/coach/class/info.vue

@ -322,14 +322,14 @@
//打开课程详情 //打开课程详情
openViewCourseInfo(item) { openViewCourseInfo(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },
//打开学员详情页 //打开学员详情页
openViewStudentInfo(item) { openViewStudentInfo(item) {
let students_id = item.student.id let students_id = item.student.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}` url: `/pages/coach/student/info?students_id=${students_id}`
}) })
}, },

2
pages/coach/class/list.vue

@ -156,7 +156,7 @@ export default {
//打开班级详情页 //打开班级详情页
openViewClassInfo(item){ openViewClassInfo(item){
let class_id = item.id let class_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/class/info?class_id=${class_id}` url: `/pages/coach/class/info?class_id=${class_id}`
}) })
}, },

2
pages/coach/course/info.vue

@ -137,7 +137,7 @@ export default {
//打开课时详情页 //打开课时详情页
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },

4
pages/coach/course/info_list.vue

@ -227,7 +227,7 @@
//打开课时详情页 //打开课时详情页
openViewCourseInfo(item) { openViewCourseInfo(item) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
@ -238,7 +238,7 @@
//跳转页面-作业详情 //跳转页面-作业详情
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

2
pages/coach/course/list.vue

@ -233,7 +233,7 @@
//打开课时详情页 //打开课时详情页
openViewCourseInfoList(item) { openViewCourseInfoList(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },

8
pages/coach/home/index.vue

@ -199,14 +199,14 @@ export default {
//打开-发布作业页 //打开-发布作业页
openObjAddView(){ openObjAddView(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/job/add' url: '/pages/coach/job/add'
}) })
}, },
//打开作业列表页 //打开作业列表页
openObjListView(){ openObjListView(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/job/list' url: '/pages/coach/job/list'
}) })
}, },
@ -214,7 +214,7 @@ export default {
//跳转页面-课程详情 //跳转页面-课程详情
openViewCourseInfoList(item){ openViewCourseInfoList(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },
@ -222,7 +222,7 @@ export default {
//跳转页面-作业详情 //跳转页面-作业详情
openViewWorkDetails(item){ openViewWorkDetails(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

3
pages/coach/job/add.vue

@ -351,7 +351,8 @@ export default {
}) })
//延迟1s //延迟1s
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: '/pages/coach/home/index' url: '/pages/coach/home/index'
}) })
}, 1000) }, 1000)

2
pages/coach/job/list.vue

@ -130,7 +130,7 @@ export default {
//跳转页面-作业详情 //跳转页面-作业详情
openViewWorkDetails(item){ openViewWorkDetails(item){
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}` url: `/pages/coach/student/work_details?id=${id}`
}) })
}, },

2
pages/coach/my/arrival_statistics.vue

@ -156,7 +156,7 @@ export default {
//打开课程详情 //打开课程详情
openViewCourseInfo(item){ openViewCourseInfo(item){
let id= item.id let id= item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}` url: `/pages/coach/course/info_list?id=${id}`
}) })
}, },

4
pages/coach/my/due_soon.vue

@ -189,13 +189,13 @@ export default {
//打开课程详情 //打开课程详情
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
//打开学员详情页 //打开学员详情页
openViewStudentInfo(item){ openViewStudentInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/info' url: '/pages/coach/student/info'
}) })
}, },

2
pages/coach/my/exam_results.vue

@ -34,7 +34,7 @@
}, },
methods: { methods: {
back() { back() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management' url: '/pages/coach/my/teaching_management'
}) })
} }

2
pages/coach/my/gotake_exam.vue

@ -105,7 +105,7 @@
}) })
const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid}); const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid});
if(res.code === 1) { if(res.code === 1) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/exam_results?error=' + res.data.error + '&success=' + res.data.success + '&num=' + res.data.num url: '/pages/coach/my/exam_results?error=' + res.data.error + '&success=' + res.data.success + '&num=' + res.data.num
}) })
} else { } else {

16
pages/coach/my/index.vue

@ -152,56 +152,56 @@ export default {
//打开到课率统计 //打开到课率统计
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/arrival_statistics' url: '/pages/coach/my/arrival_statistics'
}) })
}, },
//打开即将到期 //打开即将到期
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/due_soon' url: '/pages/coach/my/due_soon'
}) })
}, },
//打开授课统计 //打开授课统计
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/schooling_statistics' url: '/pages/coach/my/schooling_statistics'
}) })
}, },
//打开教研管理 //打开教研管理
teachingResearchManagement(){ teachingResearchManagement(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management' url: '/pages/coach/my/teaching_management'
}) })
}, },
//打开意见反馈 //打开意见反馈
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
//打开个人资料 //打开个人资料
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/info' url: '/pages/coach/my/info'
}) })
}, },
//打开设置 //打开设置
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/set_up' url: '/pages/coach/my/set_up'
}) })
}, },
//跳转页面-我的考勤 //跳转页面-我的考勤
openViewMyAttendance(){ openViewMyAttendance(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_attendance' url: '/pages/common/my_attendance'
}) })
}, },

2
pages/coach/my/schooling_statistics.vue

@ -141,7 +141,7 @@ export default {
//打开课时详情页 //打开课时详情页
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },

4
pages/coach/my/set_up.vue

@ -27,12 +27,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/update_pass' url: '/pages/coach/my/update_pass'
}) })
} }

4
pages/coach/my/teaching_management.vue

@ -104,7 +104,7 @@
return this.tableTypeName[text] return this.tableTypeName[text]
}, },
info(id) { info(id) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/teaching_management_info?id=' + id url: '/pages/coach/my/teaching_management_info?id=' + id
}) })
}, },
@ -127,7 +127,7 @@
}) })
}, },
goTake(id,zid) { goTake(id,zid) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid
}) })
} }

2
pages/coach/my/update_pass.vue

@ -64,7 +64,7 @@
this.tset_style = 2 this.tset_style = 2
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },

8
pages/coach/student/info.vue

@ -292,13 +292,13 @@ export default {
//打开课程详情 //打开课程详情
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
//打开学员详情页 //打开学员详情页
openViewStudentInfo(item){ openViewStudentInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/info' url: '/pages/coach/student/info'
}) })
}, },
@ -306,14 +306,14 @@ export default {
//打开体测报告 //打开体测报告
openViewPhysicalExamination(item){ openViewPhysicalExamination(item){
let survey_id = item.id let survey_id = item.id
uni.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){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/student/work_details' url: '/pages/coach/student/work_details'
}) })
}, },

253
pages/common/my_attendance.vue

@ -25,28 +25,35 @@
<view class="li" <view class="li"
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
@click="openInfo(v)"
> >
<view class="left"> <view class="left" @click="openInfo(v)">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>-->
</view>
<view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
<view class="content"> <view class="content">
{{v.status_name}} {{v.status_name}}
</view> </view>
<view class="content"> <view class="content">
校区:{{v.campus_id_name}} 校区:{{v.campus_id_name || ''}}
</view> </view>
<view class="content"> <view class="content">
备注:{{v.remarks || ''}} 备注:{{v.remarks || ''}}
</view> </view>
<view class="content"> <view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text> <view class="item" v-if="v.status != 'leave'">
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text> <!--考勤-->
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text> <text>开始时间:{{ v.attendance_date }} {{ v.check_in_time || '' }}</text>
<text v-if="v.check_out_time">结束时间:{{ v.attendance_date }} {{ v.check_out_time || '' }}</text>
</view>
<!--请假-->
<view class="item" v-else>
<text>开始时间:{{ v.attendance_date }} {{v.leave_start_time || ''}}</text>
<text>结束时间:{{ v.attendance_date }} {{v.leave_end_time || ''}}</text>
</view>
</view> </view>
</view> </view>
<view class="right">
<view v-if="v.status == 'present' && !v.check_out_time" class="btn" style="background-color: #00b0f0;" @click="openSignInShow('sign_out',v)">签退</view>
</view>
</view> </view>
</view> </view>
@ -67,7 +74,21 @@
:key="k" :key="k"
> >
<view class="left"> <view class="left">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>--> <view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view>
<view class="content">
校区:{{v.campus_id_name}}
</view>
<view class="content">
备注:{{v.remarks || ''}}
</view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
@ -105,7 +126,21 @@
:key="k" :key="k"
> >
<view class="left"> <view class="left">
<!-- <image src="http://www.firstui.cn:4000/vipdoc/img/img_logo.png" model="aspectFill"></image>--> <view class="content">普通考勤</view>
<view class="content">
{{v.status_name}}
</view>
<view class="content">
校区:{{v.campus_id_name}}
</view>
<view class="content">
备注:{{v.remarks || ''}}
</view>
<view class="content">
<text>{{v.attendance_date}} {{v.check_in_time}}</text>
<text v-if="v.check_out_time" style="padding: 0 20rpx">-</text>
<text v-if="v.check_out_time">{{v.attendance_date}} {{v.check_out_time}}</text>
</view>
</view> </view>
<view class="right"> <view class="right">
<view class="content">普通考勤</view> <view class="content">普通考勤</view>
@ -150,8 +185,69 @@
<text class="fui-descr">{{signIn_content}}</text> <text class="fui-descr">{{signIn_content}}</text>
<fui-form class="form-section" ref="form" top="0" :model="formData" :show="false"> <fui-form class="form-section" ref="form" top="0" :model="formData" :show="false">
<view class="input-style"> <view class="input-style">
<!-- 请假日期选择-->
<fui-form-item
v-if="formData.status == 'leave'"
label="选择日期"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openLeaveData()">
{{ (formData.attendance_date) ? formData.attendance_date : '点击选择' }}
</view>
<fui-date-picker
:show="showLeaveData"
type="3"
:minDate="leaveMinDate"
:maxDate="leaveMaxDate"
@change="changeLeaveData"
@cancel="cancelLeaveData"
></fui-date-picker>
</view>
</fui-form-item>
<!-- 请假时间选择-->
<fui-form-item
v-if="formData.status == 'leave'"
label="选择时间范围"
asterisk
asteriskPosition="right"
labelSize='26'
prop=""
background='#fff'
labelColor='#000'
:bottomBorder='true'
>
<view class="input-title" style="margin-right:14rpx;">
<view
class="input-title"
style="margin-right:14rpx;"
@click="openLeaveStartTime()">
{{ (formData.leave_time) ? formData.leave_time : '点击选择' }}
</view>
<fui-date-picker
:show="showLeaveStartTime"
range
type="6"
@change="changeLeaveStartTime"
@cancel="cancelLeaveStartTime"
></fui-date-picker>
</view>
</fui-form-item>
<!--校区选择--> <!--校区选择-->
<fui-form-item <fui-form-item
v-if="picker_options.length"
label="选择校区" label="选择校区"
asterisk asterisk
asteriskPosition="right" asteriskPosition="right"
@ -172,7 +268,6 @@
</fui-form-item> </fui-form-item>
<!--备注--> <!--备注-->
<fui-form-item <fui-form-item
v-if="formData.status == 'leave'"
label="备注" label="备注"
labelSize='26' labelSize='26'
prop="" prop=""
@ -256,7 +351,7 @@
<!-- 选择器 --> <!-- 校区下拉选择器 -->
<fui-picker <fui-picker
:linkage='picker_linkage' :linkage='picker_linkage'
:options="picker_options" :options="picker_options"
@ -266,6 +361,10 @@
@cancel="cancelCicker"> @cancel="cancelCicker">
</fui-picker> </fui-picker>
<!-- 请假日期选择器-->
<!-- 请假时间范围选择器-->
</view> </view>
</template> </template>
@ -324,6 +423,9 @@ export default {
status:'',//考勤状态: present-出勤, absent-缺勤, late-迟到, leave_early-早退,leave-请假,sign_out-签退 status:'',//考勤状态: present-出勤, absent-缺勤, late-迟到, leave_early-早退,leave-请假,sign_out-签退
remarks:'',//备注 remarks:'',//备注
attendance_date:'',//请假/打卡日期 attendance_date:'',//请假/打卡日期
leave_time:'',//请假时间范围
leave_start_time:'',//请假开始时间
leave_end_time:'',//请假结束时间
longitude:'',//经度 longitude:'',//经度
latitude:'',//纬度 latitude:'',//纬度
}, },
@ -349,6 +451,16 @@ export default {
// }, // },
],//选择器可选值列表 ],//选择器可选值列表
//请假日期选择器相关
showLeaveData:false,
leaveMinDate:'',//请假日期选择器的最小可选日期
leaveMaxDate:'',//请假日期选择器的最大可选日期
//请假开始时间选择器相关
showLeaveStartTime:false,
//详情模态窗 //详情模态窗
info_show:false,//是否展示|true=是,false=否 info_show:false,//是否展示|true=是,false=否
info_data:{},//详情数据 info_data:{},//详情数据
@ -399,11 +511,20 @@ export default {
this.userInfo = res.data this.userInfo = res.data
this.picker_options = [] this.picker_options = []
res.data.cameus_dept_arr.forEach((v,k)=>{ res.data.cameus_dept_arr.forEach((v,k)=>{
this.picker_options.push({ if(v.campus_id){
text: v.campus_id_name, this.picker_options.push({
value: v.campus_id text: v.campus_id_name,
}) value: v.campus_id
})
}
}) })
//当前用户没校区时
if(!this.picker_options.length){
this.formData.campus_id = 0
this.formData.campus_id_name = ''
}
console.log(123123,this.picker_options) console.log(123123,this.picker_options)
}, },
@ -420,7 +541,17 @@ export default {
this.formData.attendance_date = res this.formData.attendance_date = res
},
//最小可选的请假日期
this.leaveMinDate = res
//最大可选的请假日期
const minDate = new Date(this.leaveMinDate);
minDate.setMonth(minDate.getMonth() + 6);
const max_year = minDate.getFullYear();
const max_month = String(minDate.getMonth() + 1).padStart(2, '0');
const max_day = String(minDate.getDate()).padStart(2, '0');
this.leaveMaxDate = `${max_year}-${max_month}-${max_day}`; },
//切换tag列表 //切换tag列表
async segmented(e) { async segmented(e) {
@ -531,10 +662,19 @@ export default {
//打卡签到相关 //打卡签到相关
//显示打卡弹窗 //显示打卡弹窗
openSignInShow(status){ openSignInShow(status,obj={}){
this.formData.status = status this.formData.status = status
console.log('123123',obj);
let attendance_date = this.formData.attendance_date
if(obj.id){
this.formData.id = obj.id
attendance_date = obj.attendance_date
}else{
this.formData.id = ''
}
switch (status){ switch (status){
case 'present': case 'present':
this.signIn_title = `是否确认打卡?` this.signIn_title = `是否确认打卡?`
@ -546,7 +686,7 @@ export default {
break; break;
case 'sign_out': case 'sign_out':
this.signIn_title = `是否确认签退?` this.signIn_title = `是否确认签退?`
this.signIn_content = `${this.formData.attendance_date} 是否确认签退?` this.signIn_content = `${attendance_date} 是否确认签退?`
break; break;
} }
@ -571,7 +711,8 @@ export default {
//取消按钮 //取消按钮
this.closeSignInShow() this.closeSignInShow()
}else{ }else{
if(!this.formData.campus_id){ console.log('提交',this.formData)
if(!this.formData.campus_id && this.picker_options.length){
uni.showToast({ uni.showToast({
title: '请选择校区', title: '请选择校区',
icon: 'none' icon: 'none'
@ -706,6 +847,10 @@ export default {
async submitFormData() { async submitFormData() {
this.closeSignInShow() this.closeSignInShow()
if(!this.formData.campus_id && !this.picker_options.length){
this.formData.campus_id = 0
}
let param = {...this.formData} let param = {...this.formData}
let res = await apiRoute.common_attendanceEdit(param) let res = await apiRoute.common_attendanceEdit(param)
if (res.code != 1) { if (res.code != 1) {
@ -773,6 +918,43 @@ export default {
return [data]; return [data];
}, },
//请假日期相关
//监听-请假日期选择
changeLeaveData(e){
console.log('请假日期选择',e)
this.formData.attendance_date = e.result
this.cancelLeaveData()
},
//打开请假日期选择器
openLeaveData(){
this.showLeaveData = true
},
//关闭请假日期选择器
cancelLeaveData(){
this.showLeaveData = false
},
//监听-请假开始时间选择
changeLeaveStartTime(e){
console.log('请假开始时间选择',e)
let leave_start_time = e.startDate.result
let leave_end_time = e.endDate.result
this.formData.leave_time = `${leave_start_time}-${leave_end_time}`
this.formData.leave_start_time = leave_start_time
this.formData.leave_end_time = leave_end_time
this.cancelLeaveStartTime()
},
//打开请假日期选择器
openLeaveStartTime(){
this.showLeaveStartTime = true
},
//关闭请假日期选择器
cancelLeaveStartTime(){
this.showLeaveStartTime = false
},
} }
} }
</script> </script>
@ -820,29 +1002,38 @@ export default {
.li{ .li{
border: 1px solid #5f5f5f; border: 1px solid #5f5f5f;
border-radius: 15rpx; border-radius: 15rpx;
padding: 20rpx 0; padding: 20rpx 20rpx;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 43rpx; gap: 43rpx;
.left{ .left{
image{ width: 70%;
width: 174rpx;
height: 174rpx;
border-radius: 24rpx;
background-color: #333333;
}
}
.right{
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 18rpx; gap: 18rpx;
.content{ .content{
font-size: 24rpx; font-size: 24rpx;
.item{
display: flex;
flex-direction: column;
}
} }
.content:nth-child(1){ .content:nth-child(1){
font-size: 28rpx; font-size: 28rpx;
} }
} }
.right{
.btn{
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 8rpx;
color: rgba(255,255,255,1);
font-size: 28rpx;
text-align: center;
}
}
} }
} }
.title_box{ .title_box{
@ -856,6 +1047,7 @@ export default {
} }
.section_btn{ .section_btn{
margin-top: 20rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
display: flex; display: flex;
@ -901,6 +1093,7 @@ export default {
.input-style { .input-style {
text-align: right !important; text-align: right !important;
.input-title{}
} }
.button_box{ .button_box{
margin-top: 30rpx; margin-top: 30rpx;

4
pages/common/my_message.vue

@ -248,7 +248,7 @@ export default {
//跳转页面-系统消息列表 //跳转页面-系统消息列表
openViewSysMsgList(e){ openViewSysMsgList(e){
let hair_staff_id = e.hair_staff_id//发信人id let hair_staff_id = e.hair_staff_id//发信人id
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/sys_msg_list?hair_staff_id=${hair_staff_id}` url: `/pages/common/sys_msg_list?hair_staff_id=${hair_staff_id}`
}) })
}, },
@ -271,7 +271,7 @@ export default {
to_id = e.personnel_id to_id = e.personnel_id
} }
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
} }

2
pages/common/sys_msg_list.vue

@ -134,7 +134,7 @@ export default {
openViewArticleInfo(item) { openViewArticleInfo(item) {
let id = item.id let id = item.id
let redirect = item.redirect//重定向地址 let redirect = item.redirect//重定向地址
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/article_info?id=${id}` url: `/pages/common/article_info?id=${id}`
}) })
}, },

128
pages/market/clue/add_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<!--来源渠道--> <!--来源-->
<fui-form-item <fui-form-item
label="来源渠道" label="来源"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -41,14 +41,15 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source_channel`)"> @click="openCicker(`source`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} {{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--来源--> <!--来源渠道-->
<fui-form-item <fui-form-item
label="来源" v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -60,11 +61,12 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source`)"> @click="openCicker(`source_channel`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }} {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--顾问--> <!--顾问-->
<!-- <!--
<fui-form-item <fui-form-item
@ -87,6 +89,7 @@
</fui-form-item> </fui-form-item>
--> -->
<fui-form-item <fui-form-item
v-show="false"
label="顾问" label="顾问"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
@ -188,6 +191,7 @@
backgroundColor="#434544" backgroundColor="#434544"
size="26" size="26"
color="#fff" color="#fff"
@blur="handlePhoneBlur"
></fui-input> ></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -222,15 +226,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`decision_maker`)">
v-model="formData.decision_maker" {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--客户初步意向度--> <!--客户初步意向度-->
@ -254,6 +255,7 @@
</fui-form-item> </fui-form-item>
<!--客户状态--> <!--客户状态-->
<fui-form-item <fui-form-item
v-show="false"
label="客户状态" label="客户状态"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
@ -373,16 +375,14 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`distance`)">
v-model="formData.distance" {{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--沟通备注--> <!--沟通备注-->
<fui-form-item <fui-form-item
@ -448,8 +448,8 @@
<!--数据列表--> <!--数据列表-->
<view class="ul" v-else> <view class="ul" v-else>
<view class="li" v-for="(v,k) in clientUserList" :key="k"> <view class="li" v-for="(v,k) in clientUserList" :key="k" @click="openViewClueInfo(v)">
<view class="left_box" @click="openViewClueInfo(v)"> <view class="left_box">
<view class="box_1"> <view class="box_1">
<image <image
class="img" class="img"
@ -496,8 +496,8 @@
</view> </view>
</view> </view>
<view class="right_box"> <view class="right_box">
<image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image> <!-- <image v-if="v.member_id" class="img" :src="$util.img('/uniapp_src/static/images/index/message.png')" @click="openViewMyMessage(v)"></image>-->
<image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image> <!-- <image v-if="v.phone_number" class="img" :src="$util.img('/uniapp_src/static/images/index/phone.png')" @click="dialTel(v)"></image>-->
</view> </view>
</view> </view>
</view> </view>
@ -605,7 +605,7 @@ export default {
demand:'',//需求 demand:'',//需求
decision_maker:'',//决策人 decision_maker:'',//决策人
initial_intent:'',//客户初步意向度: high-高, medium-中, low-低 initial_intent:'',//客户初步意向度: high-高, medium-中, low-低
status:'',//客户状态: active-活跃, inactive-不活跃, pending-待定 status:'pending',//客户状态: active-活跃, inactive-不活跃, pending-待定
//六要素信息 //六要素信息
purchasing_power:'',//购买力 purchasing_power:'',//购买力
@ -663,6 +663,11 @@ export default {
text:'', text:'',
options:[], options:[],
}, },
//决策人
decision_maker:{
text:'',
options:[],
},
//所属校区 //所属校区
campus:{ campus:{
text:'', text:'',
@ -672,7 +677,12 @@ export default {
status:{ status:{
text:'', text:'',
options:[], options:[],
} },
//距离
distance:{
text:'',
options:[],
},
},//选择器选项配置 },//选择器选项配置
// 年月日选择组件 // 年月日选择组件
@ -721,6 +731,8 @@ export default {
await this.getDict('initial_intent')//获取字典-客户初步意向度 await this.getDict('initial_intent')//获取字典-客户初步意向度
await this.getDict('cognitive_idea')//获取字典-认知理念 await this.getDict('cognitive_idea')//获取字典-认知理念
await this.getDict('status')//获取字典-客户状态 await this.getDict('status')//获取字典-客户状态
await this.getDict('decision_maker')//获取字典-决策人
await this.getDict('distance')//获取字典-距离
// this.getStaffList()//获取人员列表 // this.getStaffList()//获取人员列表
// this.getAreaTree()//获取地区树形结构 // this.getAreaTree()//获取地区树形结构
}, },
@ -851,6 +863,10 @@ export default {
case 'cognitive_idea': case 'cognitive_idea':
key = 'cognitive_concept' key = 'cognitive_concept'
break; break;
//决策人
case 'decision_maker':
key = 'decision_maker'
break;
//客户初步意向度 //客户初步意向度
case 'initial_intent': case 'initial_intent':
key = 'preliminarycustomerintention' key = 'preliminarycustomerintention'
@ -859,6 +875,11 @@ export default {
case 'status': case 'status':
key = 'kh_status' key = 'kh_status'
break; break;
//距离
case 'distance':
key = 'distance'
break;
} }
if(!key){ if(!key){
return return
@ -952,7 +973,7 @@ export default {
return; return;
} }
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
}) })
}, },
@ -961,7 +982,7 @@ export default {
openViewMyMessage(item) { openViewMyMessage(item) {
let from_id = this.userInfo.id//发送者的id let from_id = this.userInfo.id//发送者的id
let to_id = item.customerResource.id//接收者ID let to_id = item.customerResource.id//接收者ID
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
}, },
@ -1006,7 +1027,32 @@ export default {
//联系电话失去焦点时间
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
this.openDuplicateCheck()
},
@ -1106,10 +1152,19 @@ export default {
}, },
//监听-下拉选择器 //监听-下拉选择器
changeCicker(e) { changeCicker(e) {
console.log('监听-下拉选择器', this.picker_input_name, e) console.log('监听-下拉选择器', this.picker_input_name, e,this.formData)
let input_name = this.picker_input_name let input_name = this.picker_input_name
this.formData[input_name] = e.value this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线下
}else{
this.formData.source_channel = ''//线下
}
}
this.cancelCicker() this.cancelCicker()
}, },
//关闭下拉选择器 //关闭下拉选择器
@ -1337,7 +1392,8 @@ export default {
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-线索列表 //跳转页面-线索列表
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

8
pages/market/clue/clue_info.vue

@ -354,14 +354,14 @@
//跳转页面-添加跟进记录 //跳转页面-添加跟进记录
openViewWritingFollowUp() { openViewWritingFollowUp() {
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/writing_followUp` url: `/pages/market/clue/writing_followUp`
}) })
}, },
//跳转页面-编辑客户详情 //跳转页面-编辑客户详情
openViewEditClues(){ openViewEditClues(){
let resource_sharing_id = this.resource_sharing_id//共享资源表id let resource_sharing_id = this.resource_sharing_id//共享资源表id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/edit_clues?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/edit_clues?resource_sharing_id=${resource_sharing_id}`
}) })
}, },
@ -369,14 +369,14 @@
//跳转页面-客户信息修改记录 //跳转页面-客户信息修改记录
openViewEditCluesLog() { openViewEditCluesLog() {
let resource_id = this.clientInfo.resource_id let resource_id = this.clientInfo.resource_id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}` url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}`
}) })
}, },
//跳转页面-转接跟进任务 //跳转页面-转接跟进任务
openViewNewTask() { openViewNewTask() {
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/new_task` url: `/pages/market/clue/new_task`
}) })
}, },

126
pages/market/clue/edit_clues.vue

@ -27,9 +27,9 @@
<view class="title" style="margin-top: 20rpx;">基础信息</view> <view class="title" style="margin-top: 20rpx;">基础信息</view>
<view class="input-style"> <view class="input-style">
<!--来源渠道--> <!--来源-->
<fui-form-item <fui-form-item
label="来源渠道" label="来源"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -41,14 +41,16 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source_channel`)"> @click="openCicker(`source`)">
{{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }} {{ (formData.source) ? picker_config.source.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--来源-->
<!--来源渠道-->
<fui-form-item <fui-form-item
label="来源" v-if="formData.source == 1"
label="来源渠道"
asterisk asteriskPosition="right" asterisk asteriskPosition="right"
labelSize='26' labelSize='26'
prop="" prop=""
@ -60,11 +62,12 @@
<view <view
class="input-title" class="input-title"
style="margin-right:14rpx;" style="margin-right:14rpx;"
@click="openCicker(`source`)"> @click="openCicker(`source_channel`)">
{{ (formData.source) ? picker_config.source.text : '点击选择' }} {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
</view> </view>
</view> </view>
</fui-form-item> </fui-form-item>
<!--顾问--> <!--顾问-->
<!-- <!--
<fui-form-item <fui-form-item
@ -188,6 +191,7 @@
backgroundColor="#434544" backgroundColor="#434544"
size="26" size="26"
color="#fff" color="#fff"
@blur="handlePhoneBlur"
></fui-input> ></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -222,15 +226,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`decision_maker`)">
v-model="formData.decision_maker" {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
@ -374,15 +375,12 @@
labelColor='#fff' labelColor='#fff'
:bottomBorder='false'> :bottomBorder='false'>
<view class="input-title" style="margin-right:14rpx;"> <view class="input-title" style="margin-right:14rpx;">
<fui-input <view
:borderBottom="false" class="input-title"
:padding="[0]" style="margin-right:14rpx;"
placeholder="点击填写" @click="openCicker(`distance`)">
v-model="formData.distance" {{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
backgroundColor="#434544" </view>
size="26"
color="#fff"
></fui-input>
</view> </view>
</fui-form-item> </fui-form-item>
<!--沟通备注--> <!--沟通备注-->
@ -715,7 +713,17 @@ export default {
status:{ status:{
text:'', text:'',
options:[], options:[],
} },
//决策人
decision_maker:{
text:'',
options:[],
},
//距离
distance:{
text:'',
options:[],
},
},//选择器选项配置 },//选择器选项配置
// 年月日选择组件 // 年月日选择组件
@ -765,6 +773,8 @@ export default {
await this.getDict('initial_intent')//获取字典-客户初步意向度 await this.getDict('initial_intent')//获取字典-客户初步意向度
await this.getDict('cognitive_idea')//获取字典-认知理念 await this.getDict('cognitive_idea')//获取字典-认知理念
await this.getDict('status')//获取字典-客户状态 await this.getDict('status')//获取字典-客户状态
await this.getDict('decision_maker')//获取字典-决策人
await this.getDict('distance')//获取字典-距离
// this.getStaffList()//获取人员列表 // this.getStaffList()//获取人员列表
// this.getAreaTree()//获取地区树形结构 // this.getAreaTree()//获取地区树形结构
@ -829,9 +839,12 @@ export default {
this.picker_config.initial_intent.text = customerResource.initial_intent_name || '点击选择'//客户初步意向度 this.picker_config.initial_intent.text = customerResource.initial_intent_name || '点击选择'//客户初步意向度
this.picker_config.status.text = customerResource.status_name || '点击选择'//客户状态 this.picker_config.status.text = customerResource.status_name || '点击选择'//客户状态
this.picker_config.decision_maker.text = customerResource.decision_maker || '点击选择'//决策人
//六要素相关 //六要素相关
this.picker_config.purchasing_power.text = sixSpeed.purchase_power_name || '点击选择'//购买力 this.picker_config.purchasing_power.text = sixSpeed.purchase_power_name || '点击选择'//购买力
this.picker_config.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'//认知理念 this.picker_config.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'//认知理念
this.picker_config.distance.text = sixSpeed.distance || '点击选择'//距离
}, },
@ -943,6 +956,10 @@ export default {
case 'cognitive_idea': case 'cognitive_idea':
key = 'cognitive_concept' key = 'cognitive_concept'
break; break;
//决策人
case 'decision_maker':
key = 'decision_maker'
break;
//客户初步意向度 //客户初步意向度
case 'initial_intent': case 'initial_intent':
key = 'preliminarycustomerintention' key = 'preliminarycustomerintention'
@ -951,6 +968,10 @@ export default {
case 'status': case 'status':
key = 'kh_status' key = 'kh_status'
break; break;
//距离
case 'distance':
key = 'distance'
break;
} }
if(!key){ if(!key){
return return
@ -1032,7 +1053,7 @@ export default {
//跳转页面-客户详情 //跳转页面-客户详情
openViewClueInfo(item) { openViewClueInfo(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?id=${id}` url: `/pages/market/clue/clue_info?id=${id}`
}) })
}, },
@ -1040,7 +1061,7 @@ export default {
//跳转页面-我的消息 //跳转页面-我的消息
openViewMyMessage(item) { openViewMyMessage(item) {
let hair_staff_id = item.hair_staff_id let hair_staff_id = item.hair_staff_id
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}` url: `/pages/common/im_chat_info?hair_staff_id=${hair_staff_id}`
}) })
}, },
@ -1075,7 +1096,43 @@ export default {
}, },
//联系电话失去焦点时间
async handlePhoneBlur(){
if(!this.formData.phone_number){
return
}
this.clientUserList = []
let param = {
phone_number:this.formData.phone_number
}
let res = await apiRoute.xs_getAllCustomerResources(param)
if(res.code != 1){
if(res.msg == '暂无数据'){
return
}
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
console.log('查重',res)
this.clientUserList = res.data
if(this.clientUserList.length == 1){
if (this.clientUserList[0].id == this.formData.id) {
//查重后的手机号是自己,就不展示查重结果了
return
}
}
this.openDuplicateCheck()
},
@ -1180,6 +1237,13 @@ export default {
let input_name = this.picker_input_name let input_name = this.picker_input_name
this.formData[input_name] = e.value this.formData[input_name] = e.value
this.picker_config[input_name]['text'] = e.text this.picker_config[input_name]['text'] = e.text
if(input_name == 'source'){
if(e.value != 1){
this.formData.source_channel = '0'//0=线下
}else{
this.formData.source_channel = ''//线下
}
}
this.cancelCicker() this.cancelCicker()
}, },
//关闭下拉选择器 //关闭下拉选择器
@ -1220,6 +1284,7 @@ export default {
}, },
//表单验证 //表单验证
async validatorForm(data) { async validatorForm(data) {
console.log('tijiao',data)
//客户基础信息 //客户基础信息
//来源渠道 //来源渠道
@ -1407,7 +1472,8 @@ export default {
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-客户详情列表 //跳转页面-客户详情列表
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}`
}) })
}, 1000) }, 1000)

44
pages/market/clue/edit_clues_log.vue

@ -9,7 +9,7 @@
type="button" type="button"
radius="8" radius="8"
height="80" height="80"
color="#465cff" color="#29d3b4"
bold="true" bold="true"
@click="segmented"> @click="segmented">
</fui-segmented-control> </fui-segmented-control>
@ -25,9 +25,9 @@
> >
<!--时间轴--> <!--时间轴-->
<view class="table_list"> <view class="table_list">
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> <fui-timeaxis background="#292929" :padding="['36rpx','16rpx']">
<fui-timeaxis-node <fui-timeaxis-node
:lineColor="k<3?v.activeColor:'#ccc'" :lineColor="k<3 ? v.activeColor:'#ccc'"
:lined="k!==tableList.length-1" :lined="k!==tableList.length-1"
v-for="(v,k) in tableList" v-for="(v,k) in tableList"
:key="k" :key="k"
@ -35,7 +35,7 @@
<!--inco--> <!--inco-->
<view <view
class="fui-node" class="fui-node"
:style="{borderColor:(k != tableList.length-1 ? '#465CFF' :'' ) }" :style="{borderColor:(k != tableList.length-1 ? '#29d3b4' :'' ) }"
> >
</view> </view>
<template v-slot:right> <template v-slot:right>
@ -57,17 +57,17 @@
<thead> <thead>
<tr> <tr>
<th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th> <th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">原数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">原数据</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">新数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">新数据</th>
</tr> </tr>
</thead> </thead>
<!-- 自定义每一行数据 --> <!-- 自定义每一行数据 -->
<tbody> <tbody>
<tr v-for="(row, index) in v.update_arr" :key="index"> <tr v-for="(row, index) in v.update_arr" :key="index">
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> <td style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -90,7 +90,7 @@
> >
<!--时间轴--> <!--时间轴-->
<view class="table_list"> <view class="table_list">
<fui-timeaxis background="#f8f8f8" :padding="['36rpx','16rpx']"> <fui-timeaxis background="#292929" :padding="['36rpx','16rpx']">
<fui-timeaxis-node <fui-timeaxis-node
:lineColor="k<3?v.activeColor:'#ccc'" :lineColor="k<3?v.activeColor:'#ccc'"
:lined="k!==tableList.length-1" :lined="k!==tableList.length-1"
@ -100,7 +100,7 @@
<!--inco--> <!--inco-->
<view <view
class="fui-node" class="fui-node"
:style="{borderColor:(k != tableList.length-1 ? '#465CFF' :'' ) }" :style="{borderColor:(k != tableList.length-1 ? '#29d3b4' :'' ) }"
> >
</view> </view>
<template v-slot:right> <template v-slot:right>
@ -122,17 +122,17 @@
<thead> <thead>
<tr> <tr>
<th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th> <th style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">字段名称</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">原数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">原数据</th>
<th style="width: 35%; border: 1px solid #ddd; padding: 12rpx;">新数据</th> <th style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">新数据</th>
</tr> </tr>
</thead> </thead>
<!-- 自定义每一行数据 --> <!-- 自定义每一行数据 -->
<tbody> <tbody>
<tr v-for="(row, index) in v.update_arr" :key="index"> <tr v-for="(row, index) in v.update_arr" :key="index">
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td> <td style="width: 30%; border: 1px solid #ddd; padding: 12rpx;">{{ row.field_name_zh }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.old_value }}</td>
<td style="border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td> <td style="width: 34%; border: 1px solid #ddd; padding: 12rpx;">{{ row.new_value }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@ -281,13 +281,18 @@ export default {
.assemble{ .assemble{
width: 100%; width: 100%;
height: 100%; height: 100%;
//background-color: #292929; background-color: #292929;
overflow: auto; overflow: auto;
.tab_section{ .tab_section{
padding: 0 20rpx; padding: 0 20rpx;
padding-top: 30rpx; padding-top: 30rpx;
} }
.table_list{ .table_list{
color: #fff;
::v-deep .fui-timeaxis__line{
background-color: #fff;
}
.itme_box { .itme_box {
margin-top: 30rpx; margin-top: 30rpx;
display: flex; display: flex;
@ -301,6 +306,11 @@ export default {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
table-layout: fixed; table-layout: fixed;
tr{
display: flex;
th{}
td{}
}
} }
} }

4
pages/market/clue/index.vue

@ -453,7 +453,7 @@ export default {
openViewMyMessage(item) { openViewMyMessage(item) {
let from_id = this.userInfo.id//发送者的id let from_id = this.userInfo.id//发送者的id
let to_id = item.customerResource.id//接收者ID let to_id = item.customerResource.id//接收者ID
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}` url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
}) })
}, },
@ -503,7 +503,7 @@ export default {
//客户详情 //客户详情
clue_info(item) { clue_info(item) {
let resource_sharing_id = item.id///共享资源表id let resource_sharing_id = item.id///共享资源表id
uni.navigateTo({ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}` url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
}) })
}, },

3
pages/market/clue/new_task.vue

@ -287,7 +287,8 @@ import memberApi from '@/api/member.js';
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-线索列表 //跳转页面-线索列表
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

3
pages/market/clue/writing_followUp.vue

@ -763,7 +763,8 @@ export default {
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-线索列表 //跳转页面-线索列表
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/market/clue/index` url: `/pages/market/clue/index`
}) })
}, 1000) }, 1000)

14
pages/market/data/index.vue

@ -538,42 +538,42 @@ export default {
//打开到课率统计 //打开到课率统计
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/arrival_statistics' url: '/pages/market/my/arrival_statistics'
}) })
}, },
//打开即将到期 //打开即将到期
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/due_soon' url: '/pages/market/my/due_soon'
}) })
}, },
//打开授课统计 //打开授课统计
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/schooling_statistics' url: '/pages/market/my/schooling_statistics'
}) })
}, },
//打开意见反馈 //打开意见反馈
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
//打开个人资料 //打开个人资料
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/info' url: '/pages/market/my/info'
}) })
}, },
//打开企业信息 //打开企业信息
openViewFirmInfo(){ openViewFirmInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/firm_info' url: '/pages/market/my/firm_info'
}) })
}, },
@ -581,7 +581,7 @@ export default {
//打开设置 //打开设置
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/set_up' url: '/pages/market/my/set_up'
}) })
} }

27
pages/market/my/index.vue

@ -23,12 +23,12 @@
<view class="bottom" v-for="(v,k) in userInfo.cameus_dept_arr"> <view class="bottom" v-for="(v,k) in userInfo.cameus_dept_arr">
<view class="left"> <view class="left">
<view class="title">校区:</view> <view class="title">校区:</view>
<view class="title">{{v.campus_id_name}}</view> <view class="title">{{v.campus_id_name || ''}}</view>
</view> </view>
<view class="division"></view> <view class="division"></view>
<view class="right"> <view class="right">
<view class="title">部门:</view> <view class="title">部门:</view>
<view class="title dept">{{v.dept_name_str}}</view> <view class="title dept">{{v.dept_name_str || ''}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -185,35 +185,35 @@ export default {
//打开到课率统计 //打开到课率统计
openViewArrivalStatistics(){ openViewArrivalStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/arrival_statistics' url: '/pages/market/my/arrival_statistics'
}) })
}, },
//打开即将到期 //打开即将到期
openViewDueSoon(){ openViewDueSoon(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/due_soon' url: '/pages/market/my/due_soon'
}) })
}, },
//打开授课统计 //打开授课统计
openViewSchoolingStatistics(){ openViewSchoolingStatistics(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/schooling_statistics' url: '/pages/market/my/schooling_statistics'
}) })
}, },
//打开意见反馈 //打开意见反馈
openViewFeedback(){ openViewFeedback(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
//打开个人资料 //打开个人资料
openViewMyInfo(){ openViewMyInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/info' url: '/pages/market/my/info'
}) })
}, },
@ -221,14 +221,14 @@ export default {
//跳转页面-已签客户 //跳转页面-已签客户
openViewSignedClientList(){ openViewSignedClientList(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/signed_client_list' url: '/pages/market/my/signed_client_list'
}) })
}, },
//跳转页面-我的考勤 //跳转页面-我的考勤
openViewMyAttendance(){ openViewMyAttendance(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_attendance' url: '/pages/common/my_attendance'
}) })
}, },
@ -236,7 +236,7 @@ export default {
//打开企业信息 //打开企业信息
openViewFirmInfo(){ openViewFirmInfo(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/firm_info' url: '/pages/market/my/firm_info'
}) })
}, },
@ -244,14 +244,14 @@ export default {
//打开设置 //打开设置
openViewSetUp(){ openViewSetUp(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/set_up' url: '/pages/market/my/set_up'
}) })
}, },
//跳转页面-我的消息 //跳转页面-我的消息
openViewMyMessage(){ openViewMyMessage(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/my_message' url: '/pages/common/my_message'
}) })
}, },
@ -279,7 +279,8 @@ export default {
/* 小程序端样式 */ /* 小程序端样式 */
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
padding: 80rpx 0rpx; padding-top: 110rpx;
padding-bottom: 40rpx;
// #endif // #endif
font-size: 30rpx; font-size: 30rpx;

4
pages/market/my/set_up.vue

@ -27,12 +27,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/market/my/update_pass' url: '/pages/market/my/update_pass'
}) })
} }

2
pages/market/my/signed_client_list.vue

@ -147,7 +147,7 @@ export default {
//打开学员详情页 //打开学员详情页
openViewStudentInfo(item){ openViewStudentInfo(item){
let students_id= item.id let students_id= item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}` url: `/pages/coach/student/info?students_id=${students_id}`
}) })
}, },

5
pages/market/my/update_pass.vue

@ -123,7 +123,7 @@ import apiRoute from '@/api/apiRoute.js';
}, },
//忘记密码 //忘记密码
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },
@ -178,7 +178,8 @@ import apiRoute from '@/api/apiRoute.js';
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-个人中心 //跳转页面-个人中心
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/market/my/index` url: `/pages/market/my/index`
}) })
}, 1000) }, 1000)

293
pages/student/index/index.vue

@ -49,17 +49,19 @@
<view class="more" @click="physical_examination()">更多</view> <view class="more" @click="physical_examination()">更多</view>
</view> </view>
<view class="upcomin-classes"> <view class="upcomin-classes" v-if="personCourseScheduleInfo.id">
<view class="upcomin-classes-div"> <view class="upcomin-classes-div">
<view class="upcomin-classes-div-con"> <view class="upcomin-classes-div-con">
<view class="upcomin-classes-div-con-left">课程预告</view> <view class="upcomin-classes-div-con-left">课程预告</view>
<view class="upcomin-classes-div-con-centre"
style="width: 2rpx;height: 60rpx;background-color: #fff;margin-left: 25rpx;"></view> <view class="centre_box">
<view style="margin-left: 25rpx;"> <view class="upcomin-classes-div-con-centre"></view>
<view>{{$util.formatToDateTime(memberIndexData.kcyg.date_time,'m-d')}} {{memberIndexData.kcyg.weekday}} {{memberIndexData.kcyg.time_slot[0]}}-{{memberIndexData.kcyg.time_slot[1]}}</view> <view class="centre">
<view>{{memberIndexData.kcyg.address}} {{memberIndexData.kcyg.courses_name}}</view> <view>{{$util.formatToDateTime(personCourseScheduleInfo.course_date,'m-d')}} {{personCourseScheduleInfo.time_slot}}</view>
</view> <view style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">{{personCourseScheduleInfo.courseScheduleHasOne.venue.venue_name}} {{personCourseScheduleInfo.courseScheduleHasOne.course.course_name}}</view>
<view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(memberIndexData.kcyg)"> </view>
</view>
<view class="upcomin-classes-div-con-right" @click="openViewTimetableInfo(personCourseScheduleInfo)">
详情 详情
</view> </view>
</view> </view>
@ -74,37 +76,48 @@
<view class="after-class-con" v-for="(v,k) in jobAssignmentsInfo" :key="k" @click="openViewWorkDetails(v)"> <view class="after-class-con" v-for="(v,k) in jobAssignmentsInfo" :key="k" @click="openViewWorkDetails(v)">
<view class="after-class-con-txt"> <view class="after-class-con-txt">
<view style="width: 25%;margin-top: 5%;"> <!-- <view style="width: 25%;margin-top: 5%;">-->
<view style="font-size: 55rpx;color: #fff;"><span style="color: #29d3b4;">12</span>/23 <!-- <view style="font-size: 55rpx;color: #fff;"><span style="color: #29d3b4;">12</span>/23-->
</view> <!-- </view>-->
<view style="font-size: 35rpx;color: #ccc;padding-left: 10rpx;">已完成</view> <!-- <view style="font-size: 35rpx;color: #ccc;padding-left: 10rpx;">已完成</view>-->
</view> <!-- </view>-->
<view style="width: 70%;"> <view style="width: 100%;">
<view style="color: #fff;display: flex;justify-content: space-between;align-items: center;"> <view style="color: #fff;display: flex;justify-content: space-between;align-items: center;">
<view style="display: flex;align-items: center;"> <view style="display: flex;align-items: center;">
<image :src="$util.img(v.coach_pic)" style="width: 50rpx;height: 50rpx;"> <image :src="v.student.customerResources.member.headimg ? v.student.customerResources.member.headimg : $util.img('/uniapp_src/static/images/common/yong_hu.png')" style="width: 50rpx;height: 50rpx;">
</image> </image>
<span style="padding-left: 10rpx;font-size: 35rpx;">{{v.coach_name}}</span> <span style="padding-left: 10rpx;font-size: 35rpx;">{{v.student.name}}</span>
</view> </view>
<view> <view>
<fui-button background="#404045" color="#F59A23" borderColor="#F59A23" <fui-button background="#404045" color="#F59A23" borderColor="#F59A23"
btnSize="mini" @click="submitJob(v)">上传</fui-button> btnSize="mini" @click="submitJob(v)">上传</fui-button>
</view> </view>
</view> </view>
<view style="color: #fff;padding: 10rpx;">时间:{{v.create_time}}</view> <view style="color: #fff;padding: 10rpx;">时间:{{$util.formatToDateTime(v.created_at, "Y-m-d H:i")}}</view>
<view class="multi-line-ellipsis" v-html="v.content_text"> <view style="color: #fff;padding: 10rpx;">类型:{{v.content_type == 1 ? '图片' : (v.content_type == 2 ? '视频':'文本')}}</view>
<view class="description">
{{v.description}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 已提交的作业列表-->
<view class="item" v-for="(v,k) in assignmentsList" :key="k" @click="openViewWorkDetails(v)"> <view class="item" v-for="(v,k) in assignmentsList" :key="k" @click="openViewWorkDetails(v)">
<view class="multi-line-ellipsis text-style" v-html="v.content_text"></view> <view class="box">
<view style="width: 92%;margin: auto;border-radius: 15rpx;" v-if="v.student_file"> <view class="description">
<video v-if="v.student_file_type == 2" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)"></video> 描述:{{v.description}}
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)" mode="aspectFit"></image> </view>
</view>
<view class="content_box" v-if="v.content_text">
<video class="video" v-if="v.content_type == 2" :src="v.content_text"></video>
<image class="image" v-else-if="v.content_type == 1" :src="v.content_text" mode="aspectFit"></image>
<view class="text" v-else-if="v.content_type == 3" >作业内容:{{ v.content_text }}</view>
</view>
</view>
</view> </view>
<!-- <view class="multi-line-ellipsis text-style">--> <!-- <view class="multi-line-ellipsis text-style">-->
@ -133,36 +146,17 @@
}, },
data() { data() {
return { return {
inited: false, // 添加标记位控制 init 只执行一次
//上传接口地址 //上传接口地址
uploadApiUrl: ``, uploadApiUrl: ``,
uploadImageApiUrl: `${Api_url}/file/image`, uploadImageApiUrl: `${Api_url}/memberUploadImage`,//图片上传接口
uploadVideoApiUrl: `${Api_url}/file/video`, uploadVideoApiUrl: `${Api_url}/memberUploadVideo`,//视频上传接口
member_info: {},//学生信息 member_info: {},//学生信息
assignmentsList: [],//作业列表 assignmentsList: [],//作业列表
jobAssignmentsInfo: [],//待完成的作业 jobAssignmentsInfo: [],//待完成的作业
memberIndexData:{
tx:{//体测信息
height: '', // 身高(单位:米)
weight: '', // 体重(单位:公斤)
score: '', // 综合评分
create_time: '' // 体测时间
},
kcyg: { // 课程预告信息
id: '', // 课程ID
date_time: "", // 课程日期
time_slot: "", // 课程时间段
address: "", // 课程地点
courses_name: "", // 课程名称
date_md: "", // 课程日期(月/日格式)
weekday: "" // 课程星期
}
},//首页数据
path_arr:{ path_arr:{
'1':'/pages/coach/home/index',//教练 '1':'/pages/coach/home/index',//教练
'2':'/pages/market/index/index',//销售 '2':'/pages/market/index/index',//销售
@ -177,24 +171,22 @@
height:'0',//身高 height:'0',//身高
weight:'0',//体重 weight:'0',//体重
},//体测报告详情 },//体测报告详情
personCourseScheduleInfo:{
id:'',
},//课程安排详情
} }
}, },
onLoad() { onLoad() {},
this.openViewHome()//检测首页是否正确跳转-不正确则进行重定向
},
onShow(){ onShow(){
// 防止 onShow 触发后重复 init this.init()
if (!this.inited) {
this.init()
this.inited = true
}
}, },
methods: { methods: {
//学生页面初始化 //学生页面初始化
async init(){ async init(){
await this.member_init() await this.member_init()
await this.getPhysicalTestList() await this.getPhysicalTestList()
this.getMemberIndex() await this.getPersonCourseScheduleList()
this.getList() this.getList()
this.getJobAssignmentsInfo() this.getJobAssignmentsInfo()
}, },
@ -223,54 +215,29 @@
} }
}, },
//学生端-学生课程安排-列表
async getPersonCourseScheduleList(){
async openViewHome_COPY(){ let params = {
//获取当前页面路径 page: 1,//当前页码
let pages = getCurrentPages(); limit: 1,//每页返回数据条数
//当前页面路径 total: 1,//数据总条数
this.thisPath = '/' + pages[0].route resources_id:this.member_info.id,//学生资源表id
//获取缓存用户登陆类型 status:'0',//状态0待上课1已上课2请假
let userType = String(uni.getStorageSync('userType'))
this.openPath = this.path_arr[userType]
console.log(
'跳转',
this.thisPath,
userType,
this.path_arr[userType]
)
if(this.thisPath != this.openPath){
console.log('打印1')
//跳转tabBar首页-页面
uni.setStorageSync('tabBerIndex', 0)
uni.navigateTo({
url: this.openPath
})
return
}else{
//页面正确的情况下->执行学生页面初始化
this.init()
} }
}, let res = await apiRoute.xy_personCourseSchedule(params)
async getMemberIndex(){
let res = await memberApi.memberIndex({})
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
icon: 'none' icon: 'none'
}) })
return
} }
// console.log('首页',res)
if(res.data.kcyg.time_slot){ console.log('课程安排',res.data)
res.data.kcyg.time_slot = res.data.kcyg.time_slot.split(',');
}
this.memberIndexData = res.data let arr = res.data.data
if(arr.length){
this.personCourseScheduleInfo = arr[0]
}
}, },
//获取作业列表 //获取作业列表
@ -278,9 +245,10 @@
let data = { let data = {
page: 1, page: 1,
limit: 10, limit: 10,
status: '2',//1=未提交,2=已提交,3=已批改 resources_id: this.member_info.id,
status: '3',//1待批改 2未提交 3已提交
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -297,9 +265,10 @@
let data = { let data = {
page: 1, page: 1,
limit: 1, limit: 1,
status: '1',//1=未提交,2=已提交,3=已批改 resources_id: this.member_info.id,
status: '2',//状态 1待批改 2未提交 3已提交
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -328,35 +297,35 @@
//跳转页面-作业详情 //跳转页面-作业详情
details() { details() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/index/work_details' url: '/pages/student/index/work_details'
}) })
}, },
//跳转体测列表 //跳转体测列表
physical_examination(){ physical_examination(){
let resource_id = this.member_info.id let resource_id = this.member_info.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/physical_examination?resource_id=${resource_id}` url: `/pages/student/index/physical_examination?resource_id=${resource_id}`
}) })
}, },
//跳转作业列表页 //跳转作业列表页
jobList(){ jobList(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/index/job_list' url: '/pages/student/index/job_list'
}) })
}, },
// 上传作业 // 上传作业
async submitJob(item) { async submitJob(item) {
let type = item.content_type // 作业类型1图片2视频 let type = item.content_type // 作业类型1图片2视频3文本
try { try {
// 等待上传文件的返回结果 // 等待上传文件的返回结果
let uploadRes = await this.uploadFile(type) let uploadRes = await this.uploadFile(type)
// console.log('上传结果', uploadRes) console.log('上传结果', uploadRes)
// 检查上传结果 // 检查上传结果
if (!uploadRes.data.path) { if (!uploadRes.data.url) {
return return
} }
@ -364,22 +333,28 @@
let data = { let data = {
id: item.id, // 作业列表id id: item.id, // 作业列表id
student_file: uploadRes.data.path, // 附件 student_file: uploadRes.data.path, // 附件
student_file_type: type, // 作业类型1图片2视频 resources_id:this.member_info.id, // 学生资源id
student_content: '', // 内容 content_text:uploadRes.data.url
} }
// 提交作业 // 提交作业
await this.assignmentsSubmit(data) await this.assignmentsSubmit(data)
} catch (error) { } catch (error) {
console.error('上传或提交作业失败:', error) console.error('上传或提交作业失败:', error)
alert('上传或提交作业失败') //alert('上传或提交作业失败')
//提示
uni.showToast({
title: '上传或提交作业失败',
icon: 'none'
})
} }
}, },
// 上传单文件(视频/图片) type=作业类型1图片2视频 // 上传单文件(视频/图片) type=作业类型1图片2视频3文本
async uploadFile(type) { async uploadFile(type) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (type == 1) { if (type == 1) {
//图片作业
this.uploadApiUrl = this.uploadImageApiUrl this.uploadApiUrl = this.uploadImageApiUrl
uni.chooseImage({ uni.chooseImage({
count: 1, count: 1,
@ -399,7 +374,8 @@
reject(error) reject(error)
} }
}) })
} else { } else if(type == 2){
//视频作业
this.uploadApiUrl = this.uploadVideoApiUrl this.uploadApiUrl = this.uploadVideoApiUrl
uni.chooseVideo({ uni.chooseVideo({
count: 1, count: 1,
@ -468,12 +444,11 @@
// 提交作业接口 // 提交作业接口
async assignmentsSubmit(item) { async assignmentsSubmit(item) {
let data = { let data = {
id: item.id, // 作业列表id resources_id:item.resources_id, // 学生资源id
student_file: item.student_file, // 附件 id:item.id,
student_file_type: item.student_file_type, // 作业类型1图片2视频 content_text:item.content_text
student_content: item.student_content, // 内容
} }
let res = await memberApi.assignmentsSubmit(data) let res = await apiRoute.xy_assignmentSubmitObj(data)
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -494,16 +469,16 @@
//跳转页面-打开作业详情 //跳转页面-打开作业详情
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/work_details?id=${id}` url: `/pages/student/index/work_details?id=${id}`
}) })
}, },
//跳转页面-打开课时详情 //跳转页面-打开课时详情
openViewTimetableInfo(item) { openViewTimetableInfo(item) {
let id = item.id let person_course_schedule_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/info?id=${id}` url: `/pages/student/timetable/info?person_course_schedule_id=${person_course_schedule_id}`
}) })
}, },
@ -544,6 +519,7 @@
} }
.multi-line-ellipsis { .multi-line-ellipsis {
width: 100%;
color: #fff; color: #fff;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
display: -webkit-box; display: -webkit-box;
@ -696,32 +672,37 @@
.upcomin-classes-div-con { .upcomin-classes-div-con {
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
color: #fff; color: #fff;
padding: 0 40rpx;
.upcomin-classes-div-con-left {
width: 60rpx;
text-align: right;
}
.centre_box{
display: flex;
align-items: center;
.upcomin-classes-div-con-centre {
margin: 0 20rpx;
width: 2rpx;
height: 60rpx;
background-color: #fff;
}
.centre{
width:80%;
}
}
.upcomin-classes-div-con-right {
width: 100rpx;
height: 50rpx;
background-color: #32baa1;
text-align: center;
line-height: 50rpx;
border-radius: 50rpx;
}
} }
.upcomin-classes-div-con-left {
width: 60rpx;
margin-left: 80rpx;
text-align: right;
}
.upcomin-classes-div-con-centre {
width: 2rpx;
height: 60rpx;
background-color: #fff;
margin-left: 25rpx;
}
.upcomin-classes-div-con-right {
width: 100rpx;
height: 50rpx;
background-color: #32baa1;
text-align: center;
line-height: 50rpx;
border-radius: 50rpx;
margin-left: 80rpx;
}
.after-class { .after-class {
background-color: #292929; background-color: #292929;
@ -749,7 +730,7 @@
.after-class-con { .after-class-con {
width: 92%; width: 92%;
height: 246rpx; //height: 246rpx;
background-color: #404045; background-color: #404045;
border-radius: 20rpx; border-radius: 20rpx;
margin: 15rpx auto; margin: 15rpx auto;
@ -761,9 +742,11 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 20rpx; padding: 20rpx;
height: 95%;
width: 100%; width: 100%;
align-content: space-around; align-content: space-around;
.description{
color: #fff;
}
} }
.pic { .pic {
@ -771,4 +754,32 @@
height: 144rpx; height: 144rpx;
border-radius: 50%; border-radius: 50%;
} }
.item{
padding: 40rpx;
.box{
color: #fff;
display: flex;
flex-direction: column;
.description{
}
.content_box{
width: 100%;
margin: auto;
margin-top: 20rpx;
border-radius: 15rpx;
.video{
width: 100%;
border-radius: 15rpx;
}
.image{
width: 100%;
border-radius: 15rpx;
}
.text{
color: #fff;
}
}
}
}
</style> </style>

47
pages/student/index/job_list.vue

@ -13,24 +13,25 @@
> >
<view class="con-list" v-for="(v,k) in tableList" :key="k" @click="openViewWorkDetails(v)"> <view class="con-list" v-for="(v,k) in tableList" :key="k" @click="openViewWorkDetails(v)">
<view class="con-list-img" v-if="v.student_file"> <view class="con-list-img" v-if="v.content_text">
<video v-if="v.student_file_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)"></video> <video v-if="v.content_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.content_text)"></video>
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.student_file)" mode="aspectFit"></image> <image v-else-if="v.content_type == 1" style="width: 100%;border-radius: 15rpx;" :src="$util.img(v.content_text)" mode="aspectFit"></image>
<view class="text" v-else>{{v.content_text}}</view>
</view> </view>
<view class="date_box"> <view class="date_box">
<view class="describe" style="margin-top: 20rpx;"> <view class="describe" style="margin-top: 20rpx;">
时间:{{v.create_time}} 时间:{{v.created_at}}
</view> </view>
<!--是否已经完成作业--> <!--是否已经完成作业-->
<view class="mark" v-if="v.status == 2"> <view class="mark" v-if="v.status == 3">
<image class="check_mark" :src="$util.img('/uniapp_src/static/images/index/check_mark.png')"></image> <image class="check_mark" :src="$util.img('/uniapp_src/static/images/index/check_mark.png')"></image>
</view> </view>
</view> </view>
<!--作业描述--> <!--作业描述-->
<view class="con" style="margin-bottom: 20rpx; color:#fff;" v-html="v.content_text"></view> <view class="con" style="margin-bottom: 20rpx; color:#fff;" v-html="v.description"></view>
<view class="assignment"> <view class="assignment">
<view>{{v.type == 1 ? '班级作业' : '个人作业'}}</view> <view>{{v.type == 1 ? '班级作业' : '个人作业'}}</view>
@ -44,6 +45,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
export default { export default {
@ -58,11 +60,14 @@ import memberApi from '@/api/member.js';
page:1,//当前页码 page:1,//当前页码
limit:10,//每页返回数据条数 limit:10,//每页返回数据条数
total:10,//数据总条数 total:10,//数据总条数
status: '',//1=未提交,2=已提交,3=已批改 resources_id: '',//学生资源id
status: '',//状态 1待批改 2未提交 3已提交
}, },
tableList:[],//表格数据 tableList:[],//表格数据
member_info:{},//学生信息
} }
}, },
onShow(){ onShow(){
@ -77,9 +82,25 @@ import memberApi from '@/api/member.js';
methods: { methods: {
//初始化 //初始化
async init(){ async init(){
await this.memberInit()
await this.getList(); await this.getList();
}, },
//获取学员信息
async memberInit() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.member_info = res.data
this.filteredData.resources_id = this.member_info.id,//学生资源id
console.log('xxxx',this.member_info)
},
//加载更多(下一页) //加载更多(下一页)
loadMoreData() { loadMoreData() {
//判断是否加载 //判断是否加载
@ -117,7 +138,7 @@ import memberApi from '@/api/member.js';
this.tableList = [] this.tableList = []
} }
let res = await memberApi.assignmentsList(data) let res = await apiRoute.xy_assignment(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -138,7 +159,7 @@ import memberApi from '@/api/member.js';
//跳转页面-打开作业详情 //跳转页面-打开作业详情
openViewWorkDetails(item) { openViewWorkDetails(item) {
let id = item.id let id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/index/work_details?id=${id}` url: `/pages/student/index/work_details?id=${id}`
}) })
}, },
@ -192,7 +213,6 @@ import memberApi from '@/api/member.js';
} }
.con-list-img{ .con-list-img{
width: 100%; width: 100%;
height: 280rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -205,6 +225,13 @@ import memberApi from '@/api/member.js';
width: 100%; width: 100%;
height: 280rpx; height: 280rpx;
} }
.text{
width: 100%;
font-size: 28rpx;
color:#fff;
white-space: pre-wrap;
word-wrap: break-word;
}
} }
.pic{ .pic{

56
pages/student/index/work_details.vue

@ -1,25 +1,27 @@
<!--作业详情--> <!--作业详情-->
<template> <template>
<view> <view class="main_box">
<!-- 作业展示--> <!-- 作业展示-->
<view class="top-style" v-if="infoData.student_file"> <view class="top-style" v-if="infoData.content_text">
<video v-if="infoData.student_file_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)"></video> <video v-if="infoData.content_type == 2" class="pic" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)"></video>
<image v-else style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.student_file)" mode="aspectFit"></image> <image v-else-if="infoData.content_type == 1" style="width: 100%;border-radius: 15rpx;" :src="$util.img(infoData.content_text)" mode="aspectFit"></image>
</view> </view>
<!-- 简练信息+作业描述--> <!-- 简练信息+作业描述-->
<view class="below-style"> <view class="below-style">
<view class="head-img"> <view class="head-img">
<!--教练头像--> <!--学生头像-->
<fui-avatar width="80" :src="$util.img(infoData.coach_pic)"></fui-avatar> <fui-avatar width="80" :src="infoData.student.customerResources.member.headimg ? infoData.student.customerResources.member.headimg : $util.img('/uniapp_src/static/images/common/yong_hu.png')"></fui-avatar>
<view class="head-text">{{infoData .coach_name}}</view> <view class="head-text">{{infoData .student.name}}</view>
</view> </view>
<view class="multi-line-ellipsis" v-html="infoData.content_text"></view> <view class="multi-line-ellipsis">
状态:{{ infoData.status == 1 ? '待批改' : infoData.status == 2 ? '未提交' : infoData.status == 3 ? '已提交' :''}} </view>
<view class="multi-line-ellipsis" v-html="infoData.description"></view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
@ -34,7 +36,7 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.id = options.id this.filteredData.id = options.id//作业id
}, },
onShow(){ onShow(){
this.init()//初始化数据 this.init()//初始化数据
@ -48,7 +50,7 @@ export default {
//获取作业详情 //获取作业详情
async getAssignmentsInfo() { async getAssignmentsInfo() {
let params = {...this.filteredData} let params = {...this.filteredData}
let res = await memberApi.assignmentsInfo(params) let res = await apiRoute.xy_assignmentsInfo(params)
if (res.code != 1) { if (res.code != 1) {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -64,11 +66,16 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.main_box{
width: 100%;
height: 100%;
background: #292929;
padding-top: 45rpx;
}
.top-style{ .top-style{
width: 92%; width: 92%;
height: 700rpx; height: 700rpx;
margin: auto; margin: auto;
margin-top: 45rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -80,19 +87,22 @@ export default {
.below-style{ .below-style{
width: 92%; width: 92%;
margin: auto; margin: auto;
.head-img {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.head-text {
color: #fff;
font-size: 35rpx;
padding-left: 20rpx;
}
} }
.head-img {
display: flex;
align-items: center;
padding: 10rpx 20rpx;
}
.head-text {
color: #333333;
font-size: 35rpx;
padding-left: 20rpx;
}
.multi-line-ellipsis { .multi-line-ellipsis {
color: #333333; margin-top: 20rpx;
color: #fff;
font-size: 29rpx; font-size: 29rpx;
padding: 5rpx 10rpx; padding: 5rpx 10rpx;
// display: -webkit-box; // display: -webkit-box;

5
pages/student/login/forgot.vue

@ -18,7 +18,7 @@
</fui-input> </fui-input>
</view> </view>
<view style="width: 95%;margin: auto; margin-top: 30rpx;" @click="openPicker()"> <view style="width: 95%;margin: auto; margin-top: 30rpx;" @click="openPicker()">
<fui-form-item label="" arrow highlight background="#f2f2f2"> <fui-form-item arrow highlight background="#f2f2f2">
<input class="fui-page__input" v-model="formData.user_type_name" placeholder="请选择用户类型" placeholder-style="color:#ccc;" disabled/> <input class="fui-page__input" v-model="formData.user_type_name" placeholder="请选择用户类型" placeholder-style="color:#ccc;" disabled/>
</fui-form-item> </fui-form-item>
</view> </view>
@ -206,7 +206,8 @@ import apiRoute from '@/api/apiRoute.js';
//延迟1s执行 //延迟1s执行
setTimeout(() => { setTimeout(() => {
//跳转页面-登陆页 //跳转页面-登陆页
uni.navigateTo({ //关闭当前页跳转新页面
uni.redirectTo({
url: `/pages/student/login/login` url: `/pages/student/login/login`
}) })
}, 1000) }, 1000)

12
pages/student/login/login.vue

@ -103,7 +103,9 @@ export default {
// uni.hideHomeButton() // uni.hideHomeButton()
// console.log(uni.getStorageSync('um_id')) // console.log(uni.getStorageSync('um_id'))
// 防止 onShow 触发后重复 init // 防止 onShow 触发后重复 init
if (!this.inited) {
let res_codes = options.res_codes || ''//这个是axios.js传错来的接口请求返回的code,如果是401时则说明登陆报错,此时不应进入下方初始化方法
if (!this.inited && !res_codes) {
this.openViewHome() this.openViewHome()
this.inited = true this.inited = true
} }
@ -122,7 +124,7 @@ export default {
this.password = !this.password this.password = !this.password
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },
@ -222,7 +224,7 @@ export default {
}) })
return; return;
} }
uni.navigateTo({ this.$navigateTo({
url: url_path url: url_path
}) })
}, },
@ -275,8 +277,8 @@ export default {
this.password1= '123123' //密码 this.password1= '123123' //密码
}else{ }else{
//学生端 //学生端
this.user= '15335526445' //账户 this.user= '13042409890' //账户
this.password1= '123123' //密码 this.password1= '13042409890' //密码
} }
}, },

47
pages/student/my/lesson_consumption.vue

@ -2,27 +2,23 @@
<template> <template>
<view class="assemble"> <view class="assemble">
<view style="height: 50rpx;"></view> <view style="height: 50rpx;"></view>
<view class="ul">
<view class="message_box" v-if="!tableList.length">
暂无更多数据
</view>
<view class="ul" v-if="tableList.length">
<view class="li" v-for="(v,k) in tableList" :key="k"> <view class="li" v-for="(v,k) in tableList" :key="k">
<view class="left"> <view class="left">
<view class="title">{{v.name}}</view> <view class="title">{{v.name}}</view>
<view class="date">上课时间:{{v.create_time}}</view> <view class="date">课程使用日期:{{v.usage_date}}</view>
</view> </view>
<view class="right"> <view class="right">
<view <view
v-if="v.status == 1"
class="btn" class="btn"
style="background-color: #29d3b4;" style="background-color: #29d3b4;"
> >
{{v.hour}}课时 {{v.usage_date}}课时
</view>
<view
v-if="v.status == 2"
class="btn"
style="background-color: #FAD04D;"
>
请假
</view> </view>
</view> </view>
</view> </view>
@ -31,7 +27,7 @@
</template> </template>
<script> <script>
import memberApi from '@/api/member.js'; import apiRoute from '@/api/apiRoute.js';
export default { export default {
data() { data() {
@ -45,9 +41,12 @@ import memberApi from '@/api/member.js';
page:1,//当前页码 page:1,//当前页码
limit:10,//每页返回数据条数 limit:10,//每页返回数据条数
total:10,//数据总条数 total:10,//数据总条数
resources_id:'',//学生资源表id
}, },
tableList:[],//表格数据 tableList:[],//表格数据
memberInfo:{},//当前登录的学生资源信息
} }
}, },
onLoad(options) { onLoad(options) {
@ -65,9 +64,24 @@ import memberApi from '@/api/member.js';
methods: { methods: {
//初始化 //初始化
async init(){ async init(){
await this.getMemberInfo()//获取当前登录的学生信息
await this.getList()//获取列表 await this.getList()//获取列表
}, },
//获取当前登录的学生信息
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
//加载更多(下一页) //加载更多(下一页)
loadMoreData() { loadMoreData() {
//判断是否加载 //判断是否加载
@ -105,7 +119,7 @@ import memberApi from '@/api/member.js';
this.tableList = [] this.tableList = []
} }
let res = await memberApi.studentsSignList(data) let res = await apiRoute.xy_personCourseScheduleGetStudentCourseUsageList(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -128,6 +142,11 @@ import memberApi from '@/api/member.js';
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.message_box{
font-size: 30rpx;
text-align: center;
color: #fff;
}
.assemble { .assemble {
width: 100%; width: 100%;
height: 100vh; height: 100vh;

25
pages/student/my/my.vue

@ -64,7 +64,7 @@
<view class="section_box"> <view class="section_box">
<view class="item"> <view class="item">
<view>我的教练</view> <view @click="openViewMyCoach()">我的教练</view>
<view></view> <view></view>
</view> </view>
<!-- <view class="item">--> <!-- <view class="item">-->
@ -118,48 +118,55 @@
}, },
//打开设置 //打开设置
setup(item) { setup(item) {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/set_up' url: '/pages/student/my/set_up'
}) })
}, },
//意见反馈 //意见反馈
feedback() { feedback() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/feedback' url: '/pages/common/feedback'
}) })
}, },
//课时消耗 //课时消耗
lesson_consumption() { lesson_consumption() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/lesson_consumption' url: '/pages/student/my/lesson_consumption'
}) })
}, },
//我的成员 //我的成员
my_members() { my_members() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/my_members' url: '/pages/student/my/my_members'
}) })
}, },
//人人资料 //人人资料
personal_data() { personal_data() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/personal_data' url: '/pages/student/my/personal_data'
}) })
}, },
//跳转页面-合同列表 //跳转页面-合同列表
openViewContractList(item) { openViewContractList(item) {
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/contract_list` url: `/pages/common/contract_list`
}) })
}, },
//跳转页面-我的消息 //跳转页面-我的消息
openViewMyMessage(item) { openViewMyMessage(item) {
uni.navigateTo({ this.$navigateTo({
url: `/pages/common/my_message` url: `/pages/common/my_message`
}) })
}, },
//跳转页面-我的教练
openViewMyCoach(){
this.$navigateTo({
url: `/pages/student/my/my_coach`
})
},
} }
} }
</script> </script>
@ -167,7 +174,7 @@
<style lang="less" scoped> <style lang="less" scoped>
.main_box { .main_box {
background: #292929; background: #292929;
min-height: 28vh; height: 100%;
} }
//自定义导航栏 //自定义导航栏

211
pages/student/my/my_coach.vue

@ -0,0 +1,211 @@
<!--我的教练-列表-->
<template>
<view class="main_box">
<scroll-view scroll-y="true" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" style="height: 100%;padding-top:50rpx;padding-bottom: 50rpx">
<!-- <view class="data_hint" v-if="!this.tableList.length">暂无更多数据</view>-->
<view class="main_section" v-for="(v,k) in tableList" :key="k">
<view class="left">
<!-- 头像-->
<image :src="v.head_img ? v.head_img : $util.img('/uniapp_src/static/images/common/yong_hu.png')" class="pic"></image>
</view>
<view class="right">
<view class="title">姓名:{{v.name}}</view>
<view class="title">电话:{{v.phone}}</view>
</view>
</view>
</scroll-view>
<!-- 加载状态-->
<!-- <fui-loading :isFixed="true" srcCol="/static/icon-img/loading_white.png" text="正在加载..." v-if="loading"></fui-loading>-->
</view>
</template>
<script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js';
import AQTabber from "@/components/AQ/AQTabber.vue"
export default {
components: {
AQTabber,
},
data() {
return {
loading:false,//加载状态
lowerThreshold: 100,//距离底部多远触发
isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载
memberInfo:{id:''},//客户资源信息
//筛选条件
filteredData:{
page:1,//当前页码
limit:10,//每页返回数据条数
total:10,//数据总条数
resources_id:'',//学生资源表id
},
tableList:[],//表格数据
}
},
onLoad(options) {},
onShow() {
this.init()//初始化
},
//下拉刷新
async onPullDownRefresh() {
//重置为第一页
await this.resetFilteredData()
await this.getList()
},
methods: {
//初始化
async init() {
await this.getMemberInfo();
await this.getList();
},
//重置为第一页
async resetFilteredData() {
this.isReachedBottom = false; // 重置状态,以便下次触发加载更多
this.filteredData.page = 1//当前页码
this.filteredData.limit = 10//每页返回数据条数
this.filteredData.total = 10//数据总条数
},
//获取当前登录的学生信息
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
//加载更多(下一页)
loadMoreData() {
return //本页面无需下一页
//判断是否加载
if (!this.isReachedBottom) {
this.isReachedBottom = true;//设置为不可请求状态
this.getList();
}
},
//重置为第一页
loadData() {
setTimeout(() => {
this.isReachedBottom = false; // 重置状态,以便下次触发加载更多
}, 1000);
},
//获取教练列表
async getList(){
this.loading = true
let data = {...this.filteredData}
//判断是否还有数据
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
this.loading = false
uni.showToast({
title: '暂无更多',
icon: 'none'
})
return
}
if(data.page == 1){
this.tableList = []
}
let res = await apiRoute.xy_personCourseScheduleGetMyCoach(data)
this.loading = false
this.isReachedBottom = false;
if (res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
console.log('列表',this.tableList)
this.filteredData.total = res.data.total
this.filteredData.page++
},
}
}
</script>
<style lang="less" scoped>
.main_box {
width: 100%;
height: 100%;
overflow: auto;
background: #292929;
}
.data_hint{
margin-top: 100rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
}
.main_section{
width: 92%;
border-radius: 15rpx;
background-color: #404045;
margin: 20rpx auto;
padding: 30rpx;
color: #fff;
display: flex;
align-items: center;
.left{
display: flex;
flex-direction: column;
align-items: center;
.pic{
width: 100rpx;
height: 100rpx;
border-radius: 50%;
}
}
.right{
margin-left: 20rpx;
display: flex;
flex-direction: column;
gap: 20rpx;
}
}
.title{
font-size: 32rpx;
}
.con{
color: #D7D7D7;
font-size: 26rpx;
margin-top: 20rpx;
}
.current-venue{
border-radius: 8rpx;
border: 2rpx #F59A23 solid;
width: 120rpx;
text-align: center;
color: #F59A23;
position: absolute;
top: 10%;
right: 3%;
}
</style>

4
pages/student/my/set_up.vue

@ -26,12 +26,12 @@
}, },
privacy_agreement(type){ privacy_agreement(type){
uni.navigateTo({ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type url: '/pages/common/privacy_agreement?type='+type
}) })
}, },
update_pass(){ update_pass(){
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/my/update_pass' url: '/pages/student/my/update_pass'
}) })
} }

2
pages/student/my/update_pass.vue

@ -82,7 +82,7 @@
}); });
}, },
forgot() { forgot() {
uni.navigateTo({ this.$navigateTo({
url: '/pages/student/login/forgot' url: '/pages/student/login/forgot'
}) })
}, },

183
pages/student/timetable/index.vue

@ -12,9 +12,9 @@
<view class="li" v-for="(v,k) in dateList" :key="k" @click="selectDate(v.date)"> <view class="li" v-for="(v,k) in dateList" :key="k" @click="selectDate(v.date)">
<text>{{v.week}}</text> <text>{{v.week}}</text>
<text :class="[filteredData.schedule_date == v.date ? 'today':'']">{{today == v.date ? '今':v.today}}</text> <text :class="[filteredData.course_date == v.date ? 'today':'']">{{today == v.date ? '今':v.today}}</text>
<text :class="[v.status == 2 ?'select_plan':'']"></text> <text :class="[v.is_sign == 1 ? 'select_plan':'']"></text>
</view> </view>
</view> </view>
<view class="btn" @click="show_calendar=true"> <view class="btn" @click="show_calendar=true">
@ -24,10 +24,10 @@
<view class="section_2"> <view class="section_2">
<view class="item_box"> <view class="item_box">
{{venuesInfo.name}} <text v-if="(venuesInfo.id || '')">{{venuesInfo.venue_name}}</text>
</view> </view>
<view class="item_box" style="text-align: right;color: #F59A23;" @click="more"> <view class="item_box" style="text-align: right;color: #F59A23;" @click="more">
更多 更多场馆
</view> </view>
</view> </view>
@ -43,29 +43,31 @@
<view v-for="(v,k) in tableList" :key="k" class="li" @click="openViewCourseInfo(v)"> <view v-for="(v,k) in tableList" :key="k" class="li" @click="openViewCourseInfo(v)">
<view class="top_box"> <view class="top_box">
<view class="center_box"> <view class="center_box">
<view>班级:{{v.classes_name}}</view> <view>教练:{{v.courseScheduleHasOne.coach.name}}</view>
<view>时间:{{v.date}}</view> <view>课程:{{v.courseScheduleHasOne.course.course_name}}</view>
<view>课室:{{v.address}}</view> <view>时间:{{v.course_date}}</view>
<view>课程:{{v.courses_name}}</view> <view>课室:{{v.courseScheduleHasOne.campus_name}} {{v.courseScheduleHasOne.venue.venue_name}}</view>
</view> </view>
<view class="right_box"> <view class="right_box">
<!-- v.status|1=未开始,2=进行中,3=已结束--> <!-- v.status|1=未开始,2=进行中,3=已结束-->
<view class="tag" :style="{background: v.status == 1 ? '#1cd188' : v.status == 2 ? '#fad24e' : '#ff4d4f'}"> <view class="tag"
{{ v.status === 1 ? '未开始' : v.status === 2 ? '上课中' : '已结束' }} v-if="v.status != null"
:style="{background: v.status == 1 ? '#1cd188' : v.status == 2 ? '#fad24e' : '#ff4d4f'}">
{{ v.status == 0 ? '待上课' : v.status == 1 ? '已上课' : '请假' }}
</view> </view>
<!-- <view class="tag" style="background:#1cd188;">待上课</view>--> <!-- <view class="tag" style="background:#1cd188;">待上课</view>-->
</view> </view>
</view> </view>
<view class="bottom_box"> <view class="bottom_box">
<view class="hint"> <view class="hint">
已签到学生 ({{v.sign_list.length }}/{{v.max_students.split(',').length }}) <!-- 已签到学生 ({{v.sign_list.length }}/{{v.max_students.split(',').length }})-->
</view> </view>
<view class="list_box"> <view class="list_box">
<view class="list"> <!-- <view class="list">-->
<view class="itme" v-for="(item,index) in v.sign_list || 0" :key="index"> <!-- <view class="itme" v-for="(item,index) in v.sign_list || 0" :key="index">-->
<image :src="$util.img(item.header)"></image> <!-- <image :src="$util.img(item.header)"></image>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
<view class="btn"> <view class="btn">
详情 详情
</view> </view>
@ -99,6 +101,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
import memberApi from '@/api/member.js'; import memberApi from '@/api/member.js';
import commonApi from '@/api/common.js'; import commonApi from '@/api/common.js';
import AQTabber from "@/components/AQ/AQTabber.vue" import AQTabber from "@/components/AQ/AQTabber.vue"
@ -114,17 +117,20 @@ export default {
lowerThreshold: 100,//距离底部多远触发 lowerThreshold: 100,//距离底部多远触发
isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载 isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载
memberInfo:{},//当前登录的学生详情
//筛选条件 //筛选条件
filteredData: { filteredData: {
page: 1,//当前页码 page: 1,//当前页码
limit: 10,//每页返回数据条数 limit: 10,//每页返回数据条数
total: 10,//数据总条数 total: 10,//数据总条数
schedule_date: '',//日期 resources_id:'',//客户资源表id
course_date: '',//上课日期
venue_id: '',//场地id venue_id: '',//场地id
}, },
tableList: [],//表格数据 tableList: [],//表格数据
venuesInfo: {},//场地信息 venuesInfo: {id:''},//场地信息
//今日日期 //今日日期
today: '', today: '',
@ -134,7 +140,16 @@ export default {
show_calendar:false,//是否展示日期 show_calendar:false,//是否展示日期
startDate:'',//开始日期 startDate:'',//开始日期
endDate:'',//结束日期 endDate:'',//结束日期
calendarSelected: [],//日历打点 calendarSelected: [
// {
// date: '2025-04-07',//需要上课的日期
// },
// {
// date: '2025-04-09',//需要上课的日期
// },
],//日历打点(有课的日期)
} }
}, },
onLoad(options) { onLoad(options) {
@ -148,27 +163,58 @@ export default {
//下拉刷新 //下拉刷新
async onPullDownRefresh() { async onPullDownRefresh() {
//重置为第一页 //重置为第一页
let schedule_date = this.filteredData.schedule_date let course_date = this.filteredData.course_date
await this.loadData() await this.loadData()
this.filteredData.schedule_date = schedule_date this.filteredData.course_date = course_date
await this.getList() await this.getList()
}, },
methods: { methods: {
//初始化 //初始化
async init() { async init() {
await this.getThisDate() await this.getMemberInfo()//获取当前登录的学生信息
await this.getHeadDate() await this.getThisDate()//获取当前日期
await this.getList() await this.getList()//获取列表
await this.getHeadDate()//获取课程头日期
this.getDateRange() this.getDateRange()//获取日期范围
this.setCalendarSelected() this.setCalendarSelected()//设置日期打点
}, },
//获取当前登录的学生信息
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
//获取课程头日期 //获取课程头日期
async getHeadDate() { async getHeadDate() {
let res = await commonApi.getDate() // 计算开始日期:从今天往前推2天
let startDate = new Date();
startDate.setDate(startDate.getDate() - 2);
let start_date = startDate.toISOString().split('T')[0];
// 计算结束日期:从今天往后推4天
let endDate = new Date();
endDate.setDate(endDate.getDate() + 4);
let end_date = endDate.toISOString().split('T')[0];
let params = {
resources_id: this.memberInfo.id, // 客户资源ID
start_date: start_date, // 开始日期(Y-m-d)
end_date: end_date, // 结束日期(Y-m-d)
}
let res = await apiRoute.xy_personCourseScheduleGetCalendar(params)
if (res.code != 1) { if (res.code != 1) {
//提示 //提示
uni.showToast({ uni.showToast({
@ -180,12 +226,12 @@ export default {
this.dateList = [] this.dateList = []
res.data.forEach((v, k) => { res.data.forEach((v, k) => {
let today = v.date.split("-")[2]; // "09"
this.dateList.push({ this.dateList.push({
date: v.date, date: v.date,
status: v.status,//1是正常 2请假 status: v.status,//1是正常 2请假
week: v.week, week: v.week,
today: today, today: v.today,
is_sign: v.is_sign,
}) })
}) })
@ -206,15 +252,15 @@ export default {
let res = `${year}-${month}-${day}`; // 格式化日期 let res = `${year}-${month}-${day}`; // 格式化日期
this.today = res; this.today = res;
this.filteredData.schedule_date = res; this.filteredData.course_date = res;
}, },
//加载更过(下一页) //加载更过(下一页)
loadMoreData() { async loadMoreData() {
//判断是否加载 //判断是否加载
if (!this.isReachedBottom) { if (!this.isReachedBottom) {
this.isReachedBottom = true;//设置为不可请求状态 this.isReachedBottom = true;//设置为不可请求状态
this.getList(); await this.getList();
} }
}, },
//重置为第一页 //重置为第一页
@ -230,6 +276,9 @@ export default {
this.loading = true this.loading = true
let data = {...this.filteredData} let data = {...this.filteredData}
if(this.filteredData.page == 1){
this.tableList = []
}
//判断是否还有数据 //判断是否还有数据
if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) { if ((this.filteredData.page - 1) * this.filteredData.limit >= this.filteredData.total) {
@ -241,7 +290,7 @@ export default {
return return
} }
let res = await memberApi.courseList(data) let res = await apiRoute.xy_personCourseSchedule(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1) { if (res.code != 1) {
@ -252,18 +301,19 @@ export default {
return return
} }
this.tableList = res.data.list.data this.tableList = this.tableList.concat(res.data.data); // 使用 concat 方法 将新数据追加到数组中
//场地信息 //场地信息
this.venuesInfo = res.data.venues_info this.venuesInfo = res.data.venues_info
this.filteredData.total = res.data.list.total this.filteredData.total = res.data.total
this.filteredData.page++ this.filteredData.page++
}, },
//选择日期 //选择日期
async selectDate(date) { async selectDate(date) {
this.loadData() this.loadData()
this.filteredData.schedule_date = date this.filteredData.course_date = date
this.getList() this.getList()
}, },
@ -296,25 +346,43 @@ export default {
//设置日期打点 //设置日期打点
async setCalendarSelected(){ async setCalendarSelected(){
//获取当前月份 //获取当前月份
let month = new Date().getMonth() + 1; const today = new Date(); // 获取当前日期
const year = today.getFullYear(); // 获取年份
const month = today.getMonth(); // 获取月份(0-11)
let res = await commonApi.getMonthDate({month:month}) // 计算本月第一天
if (res.code != 1){ const firstDay = new Date(year, month, 1);
//提示 // 计算本月最后一天(下个月的第一天减去1天)
uni.showToast({ const lastDay = new Date(year, month + 1, 0);
title: res.msg,
icon: 'none', // 格式化日期为 YYYY-MM-DD
duration: 2000 const formatDate = (date) => {
}) const y = date.getFullYear();
return const m = String(date.getMonth() + 1).padStart(2, '0'); // 月份补零
const d = String(date.getDate()).padStart(2, '0'); // 日期补零
return `${y}-${m}-${d}`;
};
let start_date = formatDate(firstDay); // 本月第一天
let end_date = formatDate(lastDay); // 本月最后一天
let params = {
resources_id: this.memberInfo.id, // 客户资源ID
start_date: start_date, // 开始日期(Y-m-d)
end_date: end_date, // 结束日期(Y-m-d)
} }
let res = await apiRoute.xy_personCourseScheduleGetCalendar(params)
this.calendarSelected = [] this.calendarSelected = []
res.data.forEach((v,k)=>{ res.data.forEach((v,k)=>{
this.calendarSelected.push({ if(v.is_sign == 1){
date: v.date, this.calendarSelected.push({
}) date: v.date,
})
}
}) })
// this.calendarSelected = [ // this.calendarSelected = [
// { // {
// date: '2025-04-07', // date: '2025-04-07',
@ -334,23 +402,24 @@ export default {
console.log('日历',e) console.log('日历',e)
this.show_calendar = false this.show_calendar = false
this.loadData() this.loadData()
this.filteredData.schedule_date = e.fulldate this.filteredData.course_date = e.fulldate
this.getList() this.getList()
}, },
//打开课表详情页 //打开课表详情页
openViewCourseInfo(item) { openViewCourseInfo(item) {
uni.navigateTo({ let person_course_schedule_id = item.id
url: `/pages/student/timetable/info?id=${item.id}` this.$navigateTo({
url: `/pages/student/timetable/info?person_course_schedule_id=${person_course_schedule_id}`
}) })
}, },
//体育馆列表 //体育馆列表
more() { more() {
let schedule_date = this.filteredData.schedule_date let course_date = this.filteredData.course_date
let venue_id = this.venuesInfo.id//当前场馆id let venue_id = this.venuesInfo.id || ''//当前场馆id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/list?schedule_date=${schedule_date}&venue_id=${venue_id}` url: `/pages/student/timetable/list?course_date=${course_date}&venue_id=${venue_id}`
}) })
} }
} }
@ -443,8 +512,8 @@ export default {
padding: 0 20rpx ; padding: 0 20rpx ;
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: space-between;
align-items: center; align-items: center;
gap: 20rpx;
.item_box { .item_box {
width: 45%; width: 45%;
.fui-filter__item { .fui-filter__item {

101
pages/student/timetable/info.vue

@ -3,55 +3,55 @@
<view class="main_box"> <view class="main_box">
<view class="main_section"> <view class="main_section">
<view class="section_1"> <view class="section_1">
<view class="title_box">{{infoData.courses_name}}</view> <view class="title_box">{{infoData.courseScheduleHasOne.course.course_name}}</view>
<view class="ul"> <view class="ul">
<view class="li"> <view class="li">
<view class="title">课程名称</view> <view class="title">课程名称</view>
<view class="content">{{infoData.courses_name}}</view> <view class="content">{{infoData.courseScheduleHasOne.course.course_name}}</view>
</view> </view>
<view class="li"> <!-- <view class="li">-->
<view class="title">班级</view> <!-- <view class="title">班级</view>-->
<view class="content">{{infoData.classes_name}}</view> <!-- <view class="content">{{infoData.classes_name}}</view>-->
</view> <!-- </view>-->
<view class="li"> <view class="li">
<view class="title">上课时间</view> <view class="title">上课时间</view>
<view class="content">{{infoData.date_time}} {{infoData.time_slot.replace(',', '-')}}</view> <view class="content">{{infoData.courseScheduleHasOne.course_date}} {{infoData.courseScheduleHasOne.time_slot}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">上课地址</view> <view class="title">上课地址</view>
<view class="content">{{infoData.address}}</view> <view class="content">{{infoData.courseScheduleHasOne.campus_name}} {{infoData.courseScheduleHasOne.venue.venue_name}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">教练</view> <view class="title">教练</view>
<view class="content">{{infoData.staff_name}}</view> <view class="content">{{infoData.courseScheduleHasOne.coach.name}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">教练号码</view> <view class="title">教练号码</view>
<view class="content">{{infoData.staff_phone}}</view> <view class="content">{{infoData.courseScheduleHasOne.coach.phone}}</view>
</view> </view>
<view class="li"> <view class="li">
<view class="title">扣除课时</view> <view class="title">扣除课时</view>
<view class="content">{{infoData.hour}}个课时</view> <view class="content">{{infoData.courseScheduleHasOne.course.single_session_count}}个课时</view>
</view> </view>
<!--1未上课 2已上课--> <!--状态0待上课1已上课2请假-->
<view class="state_box" v-if="infoData.status == 2"> <view class="state_box" v-if="infoData.status == 1">
<view>已上</view> <view>已上</view>
</view> </view>
<view class="state_box_btn" v-if="infoData.status != 2"> <view class="state_box_btn" v-if="infoData.status != 1">
<!--sign_status字段| 0未签到 1已签到 2请假--> <!--状态0待上课1已上课2请假-->
<view v-if="!['1','2'].includes(String(infoData.sign_status))" @click="askForLeave(1)">请假</view> <view v-if="['2'].includes(String(infoData.status))" @click="askForLeave(2)">取消请假</view>
<view v-else @click="askForLeave(2)">取消请假</view> <view v-else @click="askForLeave(1)">请假</view>
</view> </view>
</view> </view>
@ -61,11 +61,11 @@
<!-- 请假模态框--> <!-- 请假模态框-->
<fui-modal class="leave_section" :buttons="[{text: '取消',plain: true}, {text: '保存'}]" width="600" :show="leaveShow" @cancel="closeLeaveModal" @click="closeLeaveModal"> <fui-modal class="leave_section" :buttons="[{text: '取消',plain: true}, {text: '保存'}]" width="600" :show="leaveShow" @cancel="closeLeaveModal" @click="closeLeaveModal">
<text class="fui-title" style="font-size: 30rpx;padding: 15rpx">请假申请</text> <text class="fui-title" style="font-size: 30rpx;padding: 15rpx">请假申请</text>
<view class="form_box" style="width: 100%;padding: 20rpx"> <!-- <view class="form_box" style="width: 100%;padding: 20rpx">-->
<view class="input_box" style="border: 1px solid #888888;font-size: 28rpx;"> <!-- <view class="input_box" style="border: 1px solid #888888;font-size: 28rpx;">-->
<fui-input style="font-size: 28rpx;height: 60rpx;line-height: 60rpx;padding-left: 15rpx" :borderBottom="false" placeholder="请输入请假原因" v-model="leaveFormData.reason"></fui-input> <!-- <fui-input style="font-size: 28rpx;height: 60rpx;line-height: 60rpx;padding-left: 15rpx" :borderBottom="false" placeholder="请输入请假原因" v-model="leaveFormData.reason"></fui-input>-->
</view> <!-- </view>-->
</view> <!-- </view>-->
</fui-modal> </fui-modal>
<!--取消请假--> <!--取消请假-->
@ -74,6 +74,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
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"
@ -84,18 +85,19 @@ export default {
}, },
data() { data() {
return { return {
infoData:{},//详情数据 memberInfo:{id:''},//当前登录用户的学生详情
infoData:{id:''},//详情数据
//筛选条件 //筛选条件
filteredData: { filteredData: {
id: '',//课程id person_course_schedule_id: '',//人员与课程安排关系表id
}, },
leaveShow:false,//请假模态框显示状态 leaveShow:false,//请假模态框显示状态
//请假表单 //请假表单
leaveFormData:{ leaveFormData:{
schedules_id: '',//详情 id person_course_schedule_id: '',//人员与课程安排关系表id
courses_id: '',//课程id status: '',//状态0待上课1已上课2请假
reason: '',//请假原因 reason: '',//请假原因
file_url: '',//附件 file_url: '',//附件
}, },
@ -105,9 +107,10 @@ export default {
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.id = options.id//课程id
this.leaveFormData.courses_id = options.id//课程id this.filteredData.person_course_schedule_id = options.person_course_schedule_id//人员与课程安排关系表id
this.leaveFormData.schedules_id = options.id//请假详情id
this.leaveFormData.person_course_schedule_id = options.person_course_schedule_id//人员与课程安排关系表id
}, },
onShow(){ onShow(){
this.init() this.init()
@ -115,13 +118,27 @@ export default {
methods: { methods: {
//初始化 //初始化
async init(){ async init(){
await this.getMemberInit()
await this.getInfo() await this.getInfo()
}, },
//获取学生登录人的学生资源详情
async getMemberInit(){
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
},
//获取课程详情 //获取课程详情
async getInfo(){ async getInfo(){
let res = await memberApi.courseInfo({ let res = await apiRoute.xy_personCourseScheduleInfo({
id: this.filteredData.id, person_course_schedule_id: this.filteredData.person_course_schedule_id,
}) })
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
@ -136,7 +153,7 @@ export default {
//打开课时详情页 //打开课时详情页
openViewCourseInfo(item){ openViewCourseInfo(item){
uni.navigateTo({ this.$navigateTo({
url: '/pages/coach/course/info' url: '/pages/coach/course/info'
}) })
}, },
@ -162,13 +179,13 @@ export default {
this.leaveFormData.reason = '' this.leaveFormData.reason = ''
}else{ }else{
//点击了确定 //点击了确定
if (!this.leaveFormData.reason){ // if (!this.leaveFormData.reason){
uni.showToast({ // uni.showToast({
title: '请输入请假原因', // title: '请输入请假原因',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
this.submitLeave()//发送请假请求 this.submitLeave()//发送请假请求
} }
this.leaveShow = false this.leaveShow = false
@ -176,7 +193,8 @@ export default {
//发送请假申请 //发送请假申请
async submitLeave(){ async submitLeave(){
let data = {...this.leaveFormData} let data = {...this.leaveFormData}
let res = await memberApi.askForLeave(data) data.status = 2
let res = await apiRoute.xy_personCourseScheduleEditStatus(data)
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
@ -203,7 +221,8 @@ export default {
//取消请假 //取消请假
this.leaveFormData.reason = ''//请假原因 this.leaveFormData.reason = ''//请假原因
let data = {...this.leaveFormData} let data = {...this.leaveFormData}
let res = await memberApi.delAskForLeave(data) data.status = 0
let res = await apiRoute.xy_personCourseScheduleEditStatus(data)
this.cancelLeaveShow = false this.cancelLeaveShow = false
if(res.code != 1){ if(res.code != 1){
uni.showToast({ uni.showToast({

75
pages/student/timetable/list.vue

@ -4,11 +4,13 @@
<scroll-view scroll-y="true" :lower-threshold="lowerThreshold" <scroll-view scroll-y="true" :lower-threshold="lowerThreshold"
@scrolltolower="loadMoreData" style="height: 100vh;"> @scrolltolower="loadMoreData" style="height: 100vh;">
<view class="data_hint" v-if="!this.tableList.length">暂无更多数据</view>
<view class="main_section" v-for="(v,k) in tableList" :key="k" @click="opebViewTimetable(v)"> <view class="main_section" v-for="(v,k) in tableList" :key="k" @click="opebViewTimetable(v)">
<view class="title">{{v.name}}</view> <view class="title">{{v.campus.campus_name}} </view>
<view class="con">{{v.address}}</view> <view class="con">{{v.campus.campus_address}} {{v.venue_name}}</view>
<view class="con" v-if="v.distance === null ">无法获取定位</view> <!-- <view class="con" v-if="v.distance === null ">无法获取定位</view>-->
<view class="con" v-else-if="v.distance">距您{{v.distance}}km</view> <!-- <view class="con" v-else-if="v.distance">距您{{v.distance}}km</view>-->
<view class="current-venue" v-if="venue_id == v.id"> <view class="current-venue" v-if="venue_id == v.id">
当前场馆 当前场馆
</view> </view>
@ -20,6 +22,7 @@
</template> </template>
<script> <script>
import apiRoute from '@/api/apiRoute.js';
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"
@ -34,12 +37,15 @@
lowerThreshold: 100,//距离底部多远触发 lowerThreshold: 100,//距离底部多远触发
isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载 isReachedBottom: false,//防止重复加载|true=不可加载|false=可加载
memberInfo:{id:''},//客户资源信息
//筛选条件 //筛选条件
filteredData:{ filteredData:{
// page:1,//当前页码 // page:1,//当前页码
// limit:10,//每页返回数据条数 // limit:10,//每页返回数据条数
// total:10,//数据总条数 // total:10,//数据总条数
schedule_date:'',//日期 course_date:'',//日期
resources_id:'',//客户资源ID
}, },
tableList:[],//表格数据 tableList:[],//表格数据
@ -50,9 +56,9 @@
} }
}, },
onLoad(options) { onLoad(options) {
this.filteredData.schedule_date = options.schedule_date//日期 this.filteredData.course_date = options.course_date//上课日期
//场馆id //场馆id
this.venue_id = options.venue_id || '' this.venue_id = options.venue_id || ''//场地ID
}, },
onShow() { onShow() {
this.init()//初始化 this.init()//初始化
@ -60,10 +66,26 @@
methods: { methods: {
//初始化 //初始化
async init() { async init() {
await this.getUserLocation(); // await this.getUserLocation();
await this.getMemberInfo();
await this.getList(); await this.getList();
}, },
//获取当前登录的学生信息
async getMemberInfo() {
let res = await apiRoute.xy_memberInfo({})
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
return
}
this.memberInfo = res.data
this.filteredData.resources_id = res.data.id
},
// 获取用户当前位置(支持多端) // 获取用户当前位置(支持多端)
async getUserLocation() { async getUserLocation() {
@ -142,16 +164,16 @@
let data = {...this.filteredData} let data = {...this.filteredData}
//判断是否还有数据 //判断是否还有数据
if(this.filteredData.page * this.filteredData.limit > this.total){ // if(this.filteredData.page * this.filteredData.limit > this.total){
this.loading = false // this.loading = false
uni.showToast({ // uni.showToast({
title: '暂无更多', // title: '暂无更多',
icon: 'none' // icon: 'none'
}) // })
return // return
} // }
let res = await memberApi.venuesList(data) let res = await apiRoute.xy_personCourseScheduleGetVenueListAll(data)
this.loading = false this.loading = false
this.isReachedBottom = false; this.isReachedBottom = false;
if (res.code != 1){ if (res.code != 1){
@ -165,9 +187,9 @@
this.tableList = res.data this.tableList = res.data
this.tableList.forEach((v,k)=>{ this.tableList.forEach((v,k)=>{
if(this.longitude && this.latitude && v.longitude && v.latitude){ if(this.longitude && this.latitude && (v.longitude || '') && (v.latitude || '')){
//计算距离
v.distance = this.getDistance(this.latitude, this.longitude, v.latitude, v.longitude) v.distance = this.getDistance(this.latitude, this.longitude, v.latitude, v.longitude)
}else{ }else{
v.distance = null v.distance = null
@ -175,17 +197,12 @@
}) })
console.log('列表',this.tableList) console.log('列表',this.tableList)
}, },
//跳转页面-课程列表 //跳转页面-课程列表
opebViewTimetable(item) { opebViewTimetable(item) {
let venue_id = item.id let venue_id = item.id
uni.navigateTo({ this.$navigateTo({
url: `/pages/student/timetable/index?venue_id=${venue_id}` url: `/pages/student/timetable/index?venue_id=${venue_id}`
}) })
}, },
@ -201,6 +218,12 @@
overflow: auto; overflow: auto;
background: #292929; background: #292929;
} }
.data_hint{
margin-top: 100rpx;
font-size: 30rpx;
text-align: center;
color: #fff;
}
.main_section{ .main_section{
width: 92%; width: 92%;
border-radius: 15rpx; border-radius: 15rpx;

Loading…
Cancel
Save