diff --git a/api/apiRoute.js b/api/apiRoute.js
index 37bab48..1cdf8bd 100644
--- a/api/apiRoute.js
+++ b/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;
+ })
+ },
+
+
+
+
diff --git a/common/axios.js b/common/axios.js
index 5766b1f..7cf0f5e 100644
--- a/common/axios.js
+++ b/common/axios.js
@@ -37,7 +37,7 @@ export default {
title:'加载中...'
})
return new Promise((cback, reject) => {
- console.log(Api_url + url)
+ console.log('请求地址',Api_url + url)
uni.request({
url: Api_url + url,
data: param,
@@ -55,8 +55,8 @@ export default {
if (res_code == 200) {
if (res_codes == 401) {
uni.navigateTo({
- url: '/pages/student/login/login'
- })
+ url: `/pages/student/login/login?res_codes=${res_codes}`
+ })
}else{
cback(res.data);
}
@@ -70,7 +70,7 @@ export default {
} else {
if (res_codes == 401) {
uni.navigateTo({
- url: '/pages/student/login/login'
+ url: `/pages/student/login/login?res_codes=${res_codes}`
})
} else {
console.log('400/500', url, error, res)
diff --git a/components/AQ/AQTabber.vue b/components/AQ/AQTabber.vue
index 87de67a..2c29176 100644
--- a/components/AQ/AQTabber.vue
+++ b/components/AQ/AQTabber.vue
@@ -157,9 +157,18 @@
//跳转tabBar页面
uni.setStorageSync('tabBerIndex', e.index)
console.log('qqq', e.urlPath)
- uni.navigateTo({
- url: e.urlPath
- })
+
+ //关闭当前页面跳转新页面
+ uni.redirectTo({
+ url: e.urlPath
+ })
+
+ //关闭全部页面
+ // uni.reLaunch({
+ // url: e.urlPath
+ // })
+
+ console.log('qqq2,执行完了')
}else{
this.show = true
}
diff --git a/main.js b/main.js
index 8d266d4..f046e2a 100644
--- a/main.js
+++ b/main.js
@@ -21,6 +21,60 @@ Vue.prototype.$getimg = Api_url
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({
store,
...App
diff --git a/pages.json b/pages.json
index e4795b8..1bc726a 100644
--- a/pages.json
+++ b/pages.json
@@ -36,6 +36,15 @@
"navigationBarTextStyle": "white"
}
},
+ {
+ "path": "pages/student/my/my_coach",
+ "style": {
+ "navigationBarTitleText": "我的教练",
+ "navigationStyle": "default",
+ "navigationBarBackgroundColor": "#29d3b4",
+ "navigationBarTextStyle": "white"
+ }
+ },
{
"path": "pages/student/login/forgot",
@@ -481,7 +490,7 @@
"navigationBarTitleText": "线索",
"navigationStyle": "default",
"navigationBarBackgroundColor": "#292929",
- "navigationBarTextStyle": "black"
+ "navigationBarTextStyle": "white"
}
},
{
diff --git a/pages/coach/class/info.vue b/pages/coach/class/info.vue
index d130daf..245ff5d 100644
--- a/pages/coach/class/info.vue
+++ b/pages/coach/class/info.vue
@@ -322,14 +322,14 @@
//打开课程详情
openViewCourseInfo(item) {
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}`
})
},
//打开学员详情页
openViewStudentInfo(item) {
let students_id = item.student.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}`
})
},
diff --git a/pages/coach/class/list.vue b/pages/coach/class/list.vue
index 3da09fb..6ac9e2a 100644
--- a/pages/coach/class/list.vue
+++ b/pages/coach/class/list.vue
@@ -156,7 +156,7 @@ export default {
//打开班级详情页
openViewClassInfo(item){
let class_id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/class/info?class_id=${class_id}`
})
},
diff --git a/pages/coach/course/info.vue b/pages/coach/course/info.vue
index 54b244e..4efe2bc 100644
--- a/pages/coach/course/info.vue
+++ b/pages/coach/course/info.vue
@@ -137,7 +137,7 @@ export default {
//打开课时详情页
openViewCourseInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/course/info'
})
},
diff --git a/pages/coach/course/info_list.vue b/pages/coach/course/info_list.vue
index 43886a4..f6eef69 100644
--- a/pages/coach/course/info_list.vue
+++ b/pages/coach/course/info_list.vue
@@ -227,7 +227,7 @@
//打开课时详情页
openViewCourseInfo(item) {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/course/info'
})
},
@@ -238,7 +238,7 @@
//跳转页面-作业详情
openViewWorkDetails(item) {
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}`
})
},
diff --git a/pages/coach/course/list.vue b/pages/coach/course/list.vue
index 872d074..987078e 100644
--- a/pages/coach/course/list.vue
+++ b/pages/coach/course/list.vue
@@ -233,7 +233,7 @@
//打开课时详情页
openViewCourseInfoList(item) {
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}`
})
},
diff --git a/pages/coach/home/index.vue b/pages/coach/home/index.vue
index 0b910eb..f81d44d 100644
--- a/pages/coach/home/index.vue
+++ b/pages/coach/home/index.vue
@@ -199,14 +199,14 @@ export default {
//打开-发布作业页
openObjAddView(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/job/add'
})
},
//打开作业列表页
openObjListView(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/job/list'
})
},
@@ -214,7 +214,7 @@ export default {
//跳转页面-课程详情
openViewCourseInfoList(item){
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}`
})
},
@@ -222,7 +222,7 @@ export default {
//跳转页面-作业详情
openViewWorkDetails(item){
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}`
})
},
diff --git a/pages/coach/job/add.vue b/pages/coach/job/add.vue
index d15ea19..52f610c 100644
--- a/pages/coach/job/add.vue
+++ b/pages/coach/job/add.vue
@@ -351,7 +351,8 @@ export default {
})
//延迟1s
setTimeout(() => {
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: '/pages/coach/home/index'
})
}, 1000)
diff --git a/pages/coach/job/list.vue b/pages/coach/job/list.vue
index 8f31169..dc3c9b4 100644
--- a/pages/coach/job/list.vue
+++ b/pages/coach/job/list.vue
@@ -130,7 +130,7 @@ export default {
//跳转页面-作业详情
openViewWorkDetails(item){
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/work_details?id=${id}`
})
},
diff --git a/pages/coach/my/arrival_statistics.vue b/pages/coach/my/arrival_statistics.vue
index 9c903f1..f39f1b7 100644
--- a/pages/coach/my/arrival_statistics.vue
+++ b/pages/coach/my/arrival_statistics.vue
@@ -156,7 +156,7 @@ export default {
//打开课程详情
openViewCourseInfo(item){
let id= item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/course/info_list?id=${id}`
})
},
diff --git a/pages/coach/my/due_soon.vue b/pages/coach/my/due_soon.vue
index b456977..4b4a5af 100644
--- a/pages/coach/my/due_soon.vue
+++ b/pages/coach/my/due_soon.vue
@@ -189,13 +189,13 @@ export default {
//打开课程详情
openViewCourseInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/course/info'
})
},
//打开学员详情页
openViewStudentInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/student/info'
})
},
diff --git a/pages/coach/my/exam_results.vue b/pages/coach/my/exam_results.vue
index 1e1083c..12b757f 100644
--- a/pages/coach/my/exam_results.vue
+++ b/pages/coach/my/exam_results.vue
@@ -34,7 +34,7 @@
},
methods: {
back() {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/teaching_management'
})
}
diff --git a/pages/coach/my/gotake_exam.vue b/pages/coach/my/gotake_exam.vue
index e675ceb..c8f9bff 100644
--- a/pages/coach/my/gotake_exam.vue
+++ b/pages/coach/my/gotake_exam.vue
@@ -105,7 +105,7 @@
})
const res = await apiRoute.submitTestPaper({optionList: this.optionList,testPaperId: this.testPaperId, id: this.zid});
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
})
} else {
diff --git a/pages/coach/my/index.vue b/pages/coach/my/index.vue
index 26ed68b..ff88060 100644
--- a/pages/coach/my/index.vue
+++ b/pages/coach/my/index.vue
@@ -152,56 +152,56 @@ export default {
//打开到课率统计
openViewArrivalStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/arrival_statistics'
})
},
//打开即将到期
openViewDueSoon(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/due_soon'
})
},
//打开授课统计
openViewSchoolingStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/schooling_statistics'
})
},
//打开教研管理
teachingResearchManagement(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/teaching_management'
})
},
//打开意见反馈
openViewFeedback(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/feedback'
})
},
//打开个人资料
openViewMyInfo(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/info'
})
},
//打开设置
openViewSetUp(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/set_up'
})
},
//跳转页面-我的考勤
openViewMyAttendance(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/my_attendance'
})
},
diff --git a/pages/coach/my/schooling_statistics.vue b/pages/coach/my/schooling_statistics.vue
index adc0cef..9072f4c 100644
--- a/pages/coach/my/schooling_statistics.vue
+++ b/pages/coach/my/schooling_statistics.vue
@@ -141,7 +141,7 @@ export default {
//打开课时详情页
openViewCourseInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/course/info'
})
},
diff --git a/pages/coach/my/set_up.vue b/pages/coach/my/set_up.vue
index 0785c35..40ee02d 100644
--- a/pages/coach/my/set_up.vue
+++ b/pages/coach/my/set_up.vue
@@ -27,12 +27,12 @@
},
privacy_agreement(type){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type
})
},
update_pass(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/update_pass'
})
}
diff --git a/pages/coach/my/teaching_management.vue b/pages/coach/my/teaching_management.vue
index 7b1d912..16826cb 100644
--- a/pages/coach/my/teaching_management.vue
+++ b/pages/coach/my/teaching_management.vue
@@ -104,7 +104,7 @@
return this.tableTypeName[text]
},
info(id) {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/teaching_management_info?id=' + id
})
},
@@ -127,7 +127,7 @@
})
},
goTake(id,zid) {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/my/gotake_exam?id=' + id + '&zid=' + zid
})
}
diff --git a/pages/coach/my/update_pass.vue b/pages/coach/my/update_pass.vue
index 3544848..99b14fa 100644
--- a/pages/coach/my/update_pass.vue
+++ b/pages/coach/my/update_pass.vue
@@ -64,7 +64,7 @@
this.tset_style = 2
},
forgot() {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/login/forgot'
})
},
diff --git a/pages/coach/student/info.vue b/pages/coach/student/info.vue
index d8e314b..9540b1d 100644
--- a/pages/coach/student/info.vue
+++ b/pages/coach/student/info.vue
@@ -292,13 +292,13 @@ export default {
//打开课程详情
openViewCourseInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/course/info'
})
},
//打开学员详情页
openViewStudentInfo(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/student/info'
})
},
@@ -306,14 +306,14 @@ export default {
//打开体测报告
openViewPhysicalExamination(item){
let survey_id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/physical_examination?survey_id=${survey_id}`
})
},
//打开作业任务
opebViewWorkDetails(item){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/coach/student/work_details'
})
},
diff --git a/pages/common/my_attendance.vue b/pages/common/my_attendance.vue
index 7b36c0e..cf71e4b 100644
--- a/pages/common/my_attendance.vue
+++ b/pages/common/my_attendance.vue
@@ -25,28 +25,35 @@
-
-
-
-
+
普通考勤
{{v.status_name}}
- 校区:{{v.campus_id_name}}
+ 校区:{{v.campus_id_name || ''}}
备注:{{v.remarks || ''}}
- {{v.attendance_date}} {{v.check_in_time}}
- -
- {{v.attendance_date}} {{v.check_out_time}}
+
+
+ 开始时间:{{ v.attendance_date }} {{ v.check_in_time || '' }}
+ 结束时间:{{ v.attendance_date }} {{ v.check_out_time || '' }}
+
+
+
+
+ 开始时间:{{ v.attendance_date }} {{v.leave_start_time || ''}}
+ 结束时间:{{ v.attendance_date }} {{v.leave_end_time || ''}}
+
+
+ 签退
+
@@ -67,7 +74,21 @@
:key="k"
>
-
+ 普通考勤
+
+ {{v.status_name}}
+
+
+ 校区:{{v.campus_id_name}}
+
+
+ 备注:{{v.remarks || ''}}
+
+
+ {{v.attendance_date}} {{v.check_in_time}}
+ -
+ {{v.attendance_date}} {{v.check_out_time}}
+
普通考勤
@@ -105,7 +126,21 @@
:key="k"
>
-
+ 普通考勤
+
+ {{v.status_name}}
+
+
+ 校区:{{v.campus_id_name}}
+
+
+ 备注:{{v.remarks || ''}}
+
+
+ {{v.attendance_date}} {{v.check_in_time}}
+ -
+ {{v.attendance_date}} {{v.check_out_time}}
+
普通考勤
@@ -150,8 +185,69 @@
{{signIn_content}}
+
+
+
+
+ {{ (formData.attendance_date) ? formData.attendance_date : '点击选择' }}
+
+
+
+
+
+
+
+
+
+ {{ (formData.leave_time) ? formData.leave_time : '点击选择' }}
+
+
+
+
+
+
+
+
+
+
+
@@ -324,6 +423,9 @@ export default {
status:'',//考勤状态: present-出勤, absent-缺勤, late-迟到, leave_early-早退,leave-请假,sign_out-签退
remarks:'',//备注
attendance_date:'',//请假/打卡日期
+ leave_time:'',//请假时间范围
+ leave_start_time:'',//请假开始时间
+ leave_end_time:'',//请假结束时间
longitude:'',//经度
latitude:'',//纬度
},
@@ -349,6 +451,16 @@ export default {
// },
],//选择器可选值列表
+ //请假日期选择器相关
+ showLeaveData:false,
+ leaveMinDate:'',//请假日期选择器的最小可选日期
+ leaveMaxDate:'',//请假日期选择器的最大可选日期
+
+ //请假开始时间选择器相关
+ showLeaveStartTime:false,
+
+
+
//详情模态窗
info_show:false,//是否展示|true=是,false=否
info_data:{},//详情数据
@@ -399,11 +511,20 @@ export default {
this.userInfo = res.data
this.picker_options = []
res.data.cameus_dept_arr.forEach((v,k)=>{
- this.picker_options.push({
- text: v.campus_id_name,
- value: v.campus_id
- })
+ if(v.campus_id){
+ this.picker_options.push({
+ 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)
},
@@ -420,7 +541,17 @@ export default {
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列表
async segmented(e) {
@@ -531,10 +662,19 @@ export default {
//打卡签到相关
//显示打卡弹窗
- openSignInShow(status){
+ openSignInShow(status,obj={}){
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){
case 'present':
this.signIn_title = `是否确认打卡?`
@@ -546,7 +686,7 @@ export default {
break;
case 'sign_out':
this.signIn_title = `是否确认签退?`
- this.signIn_content = `${this.formData.attendance_date} 是否确认签退?`
+ this.signIn_content = `${attendance_date} 是否确认签退?`
break;
}
@@ -571,7 +711,8 @@ export default {
//取消按钮
this.closeSignInShow()
}else{
- if(!this.formData.campus_id){
+ console.log('提交',this.formData)
+ if(!this.formData.campus_id && this.picker_options.length){
uni.showToast({
title: '请选择校区',
icon: 'none'
@@ -706,6 +847,10 @@ export default {
async submitFormData() {
this.closeSignInShow()
+ if(!this.formData.campus_id && !this.picker_options.length){
+ this.formData.campus_id = 0
+ }
+
let param = {...this.formData}
let res = await apiRoute.common_attendanceEdit(param)
if (res.code != 1) {
@@ -773,6 +918,43 @@ export default {
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
+ },
+
}
}
@@ -820,29 +1002,38 @@ export default {
.li{
border: 1px solid #5f5f5f;
border-radius: 15rpx;
- padding: 20rpx 0;
+ padding: 20rpx 20rpx;
display: flex;
+ justify-content: space-between;
align-items: center;
gap: 43rpx;
.left{
- image{
- width: 174rpx;
- height: 174rpx;
- border-radius: 24rpx;
- background-color: #333333;
- }
- }
- .right{
+ width: 70%;
display: flex;
flex-direction: column;
gap: 18rpx;
.content{
font-size: 24rpx;
+ .item{
+ display: flex;
+ flex-direction: column;
+ }
}
.content:nth-child(1){
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{
@@ -856,6 +1047,7 @@ export default {
}
.section_btn{
+ margin-top: 20rpx;
display: flex;
justify-content: center;
display: flex;
@@ -901,6 +1093,7 @@ export default {
.input-style {
text-align: right !important;
+ .input-title{}
}
.button_box{
margin-top: 30rpx;
diff --git a/pages/common/my_message.vue b/pages/common/my_message.vue
index 5ab28e7..58c0f01 100644
--- a/pages/common/my_message.vue
+++ b/pages/common/my_message.vue
@@ -248,7 +248,7 @@ export default {
//跳转页面-系统消息列表
openViewSysMsgList(e){
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}`
})
},
@@ -271,7 +271,7 @@ export default {
to_id = e.personnel_id
}
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/common/im_chat_info?from_id=${from_id}&to_id=${to_id}`
})
}
diff --git a/pages/common/sys_msg_list.vue b/pages/common/sys_msg_list.vue
index 8e24630..6905270 100644
--- a/pages/common/sys_msg_list.vue
+++ b/pages/common/sys_msg_list.vue
@@ -134,7 +134,7 @@ export default {
openViewArticleInfo(item) {
let id = item.id
let redirect = item.redirect//重定向地址
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/common/article_info?id=${id}`
})
},
diff --git a/pages/market/clue/add_clues.vue b/pages/market/clue/add_clues.vue
index b92c090..e318d85 100644
--- a/pages/market/clue/add_clues.vue
+++ b/pages/market/clue/add_clues.vue
@@ -27,9 +27,9 @@
基础信息
-
+
- {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
+ @click="openCicker(`source`)">
+ {{ (formData.source) ? picker_config.source.text : '点击选择' }}
-
+
- {{ (formData.source) ? picker_config.source.text : '点击选择' }}
+ @click="openCicker(`source_channel`)">
+ {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
+
@@ -222,15 +226,12 @@
labelColor='#fff'
:bottomBorder='false'>
-
+
+ {{ (formData.decision_maker) ? picker_config.decision_maker.text : '点击选择' }}
+
@@ -254,6 +255,7 @@
-
+
+ {{ (formData.distance) ? picker_config.distance.text : '点击选择' }}
+
+
-
-
+
+
-
-
+
+
@@ -605,7 +605,7 @@ export default {
demand:'',//需求
decision_maker:'',//决策人
initial_intent:'',//客户初步意向度: high-高, medium-中, low-低
- status:'',//客户状态: active-活跃, inactive-不活跃, pending-待定
+ status:'pending',//客户状态: active-活跃, inactive-不活跃, pending-待定
//六要素信息
purchasing_power:'',//购买力
@@ -663,6 +663,11 @@ export default {
text:'',
options:[],
},
+ //决策人
+ decision_maker:{
+ text:'',
+ options:[],
+ },
//所属校区
campus:{
text:'',
@@ -672,7 +677,12 @@ export default {
status:{
text:'',
options:[],
- }
+ },
+ //距离
+ distance:{
+ text:'',
+ options:[],
+ },
},//选择器选项配置
// 年月日选择组件
@@ -721,6 +731,8 @@ export default {
await this.getDict('initial_intent')//获取字典-客户初步意向度
await this.getDict('cognitive_idea')//获取字典-认知理念
await this.getDict('status')//获取字典-客户状态
+ await this.getDict('decision_maker')//获取字典-决策人
+ await this.getDict('distance')//获取字典-距离
// this.getStaffList()//获取人员列表
// this.getAreaTree()//获取地区树形结构
},
@@ -851,6 +863,10 @@ export default {
case 'cognitive_idea':
key = 'cognitive_concept'
break;
+ //决策人
+ case 'decision_maker':
+ key = 'decision_maker'
+ break;
//客户初步意向度
case 'initial_intent':
key = 'preliminarycustomerintention'
@@ -859,6 +875,11 @@ export default {
case 'status':
key = 'kh_status'
break;
+ //距离
+ case 'distance':
+ key = 'distance'
+ break;
+
}
if(!key){
return
@@ -952,7 +973,7 @@ export default {
return;
}
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
})
},
@@ -961,7 +982,7 @@ export default {
openViewMyMessage(item) {
let from_id = this.userInfo.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}`
})
},
@@ -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) {
- console.log('监听-下拉选择器', this.picker_input_name, e)
+ console.log('监听-下拉选择器', this.picker_input_name, e,this.formData)
let input_name = this.picker_input_name
this.formData[input_name] = e.value
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()
},
//关闭下拉选择器
@@ -1337,7 +1392,8 @@ export default {
//延迟1s执行
setTimeout(() => {
//跳转页面-线索列表
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: `/pages/market/clue/index`
})
}, 1000)
diff --git a/pages/market/clue/clue_info.vue b/pages/market/clue/clue_info.vue
index 1bcae69..78a09b7 100644
--- a/pages/market/clue/clue_info.vue
+++ b/pages/market/clue/clue_info.vue
@@ -354,14 +354,14 @@
//跳转页面-添加跟进记录
openViewWritingFollowUp() {
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/writing_followUp`
})
},
//跳转页面-编辑客户详情
openViewEditClues(){
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}`
})
},
@@ -369,14 +369,14 @@
//跳转页面-客户信息修改记录
openViewEditCluesLog() {
let resource_id = this.clientInfo.resource_id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/edit_clues_log?resource_id=${resource_id}`
})
},
//跳转页面-转接跟进任务
openViewNewTask() {
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/new_task`
})
},
diff --git a/pages/market/clue/edit_clues.vue b/pages/market/clue/edit_clues.vue
index fe6aee4..92c5cf6 100644
--- a/pages/market/clue/edit_clues.vue
+++ b/pages/market/clue/edit_clues.vue
@@ -27,9 +27,9 @@
基础信息
-
+
- {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
+ @click="openCicker(`source`)">
+ {{ (formData.source) ? picker_config.source.text : '点击选择' }}
-
+
+
- {{ (formData.source) ? picker_config.source.text : '点击选择' }}
+ @click="openCicker(`source_channel`)">
+ {{ (formData.source_channel) ? picker_config.source_channel.text : '点击选择' }}
+
@@ -715,7 +713,17 @@ export default {
status:{
text:'',
options:[],
- }
+ },
+ //决策人
+ decision_maker:{
+ text:'',
+ options:[],
+ },
+ //距离
+ distance:{
+ text:'',
+ options:[],
+ },
},//选择器选项配置
// 年月日选择组件
@@ -765,6 +773,8 @@ export default {
await this.getDict('initial_intent')//获取字典-客户初步意向度
await this.getDict('cognitive_idea')//获取字典-认知理念
await this.getDict('status')//获取字典-客户状态
+ await this.getDict('decision_maker')//获取字典-决策人
+ await this.getDict('distance')//获取字典-距离
// this.getStaffList()//获取人员列表
// this.getAreaTree()//获取地区树形结构
@@ -829,9 +839,12 @@ export default {
this.picker_config.initial_intent.text = customerResource.initial_intent_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.cognitive_idea.text = sixSpeed.concept_awareness_name || '点击选择'//认知理念
+ this.picker_config.distance.text = sixSpeed.distance || '点击选择'//距离
},
@@ -943,6 +956,10 @@ export default {
case 'cognitive_idea':
key = 'cognitive_concept'
break;
+ //决策人
+ case 'decision_maker':
+ key = 'decision_maker'
+ break;
//客户初步意向度
case 'initial_intent':
key = 'preliminarycustomerintention'
@@ -951,6 +968,10 @@ export default {
case 'status':
key = 'kh_status'
break;
+ //距离
+ case 'distance':
+ key = 'distance'
+ break;
}
if(!key){
return
@@ -1032,7 +1053,7 @@ export default {
//跳转页面-客户详情
openViewClueInfo(item) {
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/clue_info?id=${id}`
})
},
@@ -1040,7 +1061,7 @@ export default {
//跳转页面-我的消息
openViewMyMessage(item) {
let hair_staff_id = item.hair_staff_id
- uni.navigateTo({
+ this.$navigateTo({
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
this.formData[input_name] = e.value
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()
},
//关闭下拉选择器
@@ -1220,6 +1284,7 @@ export default {
},
//表单验证
async validatorForm(data) {
+ console.log('tijiao',data)
//客户基础信息
//来源渠道
@@ -1407,7 +1472,8 @@ export default {
//延迟1s执行
setTimeout(() => {
//跳转页面-客户详情列表
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${this.resource_sharing_id}`
})
}, 1000)
diff --git a/pages/market/clue/edit_clues_log.vue b/pages/market/clue/edit_clues_log.vue
index 76f1f00..7340b68 100644
--- a/pages/market/clue/edit_clues_log.vue
+++ b/pages/market/clue/edit_clues_log.vue
@@ -9,7 +9,7 @@
type="button"
radius="8"
height="80"
- color="#465cff"
+ color="#29d3b4"
bold="true"
@click="segmented">
@@ -25,9 +25,9 @@
>
-
+
@@ -57,17 +57,17 @@
| 字段名称 |
- 原数据 |
- 新数据 |
+ 原数据 |
+ 新数据 |
- | {{ row.field_name_zh }} |
- {{ row.old_value }} |
- {{ row.new_value }} |
+ {{ row.field_name_zh }} |
+ {{ row.old_value }} |
+ {{ row.new_value }} |
@@ -90,7 +90,7 @@
>
-
+
@@ -122,17 +122,17 @@
| 字段名称 |
- 原数据 |
- 新数据 |
+ 原数据 |
+ 新数据 |
- | {{ row.field_name_zh }} |
- {{ row.old_value }} |
- {{ row.new_value }} |
+ {{ row.field_name_zh }} |
+ {{ row.old_value }} |
+ {{ row.new_value }} |
@@ -281,13 +281,18 @@ export default {
.assemble{
width: 100%;
height: 100%;
- //background-color: #292929;
+ background-color: #292929;
overflow: auto;
.tab_section{
padding: 0 20rpx;
padding-top: 30rpx;
}
.table_list{
+ color: #fff;
+ ::v-deep .fui-timeaxis__line{
+ background-color: #fff;
+ }
+
.itme_box {
margin-top: 30rpx;
display: flex;
@@ -301,6 +306,11 @@ export default {
width: 100%;
border-collapse: collapse;
table-layout: fixed;
+ tr{
+ display: flex;
+ th{}
+ td{}
+ }
}
}
diff --git a/pages/market/clue/index.vue b/pages/market/clue/index.vue
index 3ad30de..2163f43 100644
--- a/pages/market/clue/index.vue
+++ b/pages/market/clue/index.vue
@@ -453,7 +453,7 @@ export default {
openViewMyMessage(item) {
let from_id = this.userInfo.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}`
})
},
@@ -503,7 +503,7 @@ export default {
//客户详情
clue_info(item) {
let resource_sharing_id = item.id///共享资源表id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/market/clue/clue_info?resource_sharing_id=${resource_sharing_id}`
})
},
diff --git a/pages/market/clue/new_task.vue b/pages/market/clue/new_task.vue
index 4ea2c82..86181d3 100644
--- a/pages/market/clue/new_task.vue
+++ b/pages/market/clue/new_task.vue
@@ -287,7 +287,8 @@ import memberApi from '@/api/member.js';
//延迟1s执行
setTimeout(() => {
//跳转页面-线索列表
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: `/pages/market/clue/index`
})
}, 1000)
diff --git a/pages/market/clue/writing_followUp.vue b/pages/market/clue/writing_followUp.vue
index f839e43..b95c4b8 100644
--- a/pages/market/clue/writing_followUp.vue
+++ b/pages/market/clue/writing_followUp.vue
@@ -763,7 +763,8 @@ export default {
//延迟1s执行
setTimeout(() => {
//跳转页面-线索列表
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: `/pages/market/clue/index`
})
}, 1000)
diff --git a/pages/market/data/index.vue b/pages/market/data/index.vue
index 51fc111..0d79bbd 100644
--- a/pages/market/data/index.vue
+++ b/pages/market/data/index.vue
@@ -538,42 +538,42 @@ export default {
//打开到课率统计
openViewArrivalStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/arrival_statistics'
})
},
//打开即将到期
openViewDueSoon(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/due_soon'
})
},
//打开授课统计
openViewSchoolingStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/schooling_statistics'
})
},
//打开意见反馈
openViewFeedback(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/feedback'
})
},
//打开个人资料
openViewMyInfo(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/info'
})
},
//打开企业信息
openViewFirmInfo(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/firm_info'
})
},
@@ -581,7 +581,7 @@ export default {
//打开设置
openViewSetUp(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/set_up'
})
}
diff --git a/pages/market/my/index.vue b/pages/market/my/index.vue
index 7e0484a..542ebfe 100644
--- a/pages/market/my/index.vue
+++ b/pages/market/my/index.vue
@@ -23,12 +23,12 @@
校区:
- {{v.campus_id_name}}
+ {{v.campus_id_name || ''}}
部门:
- {{v.dept_name_str}}
+ {{v.dept_name_str || ''}}
@@ -185,35 +185,35 @@ export default {
//打开到课率统计
openViewArrivalStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/arrival_statistics'
})
},
//打开即将到期
openViewDueSoon(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/due_soon'
})
},
//打开授课统计
openViewSchoolingStatistics(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/schooling_statistics'
})
},
//打开意见反馈
openViewFeedback(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/feedback'
})
},
//打开个人资料
openViewMyInfo(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/info'
})
},
@@ -221,14 +221,14 @@ export default {
//跳转页面-已签客户
openViewSignedClientList(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/signed_client_list'
})
},
//跳转页面-我的考勤
openViewMyAttendance(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/my_attendance'
})
},
@@ -236,7 +236,7 @@ export default {
//打开企业信息
openViewFirmInfo(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/firm_info'
})
},
@@ -244,14 +244,14 @@ export default {
//打开设置
openViewSetUp(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/set_up'
})
},
//跳转页面-我的消息
openViewMyMessage(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/my_message'
})
},
@@ -279,7 +279,8 @@ export default {
/* 小程序端样式 */
// #ifdef MP-WEIXIN
- padding: 80rpx 0rpx;
+ padding-top: 110rpx;
+ padding-bottom: 40rpx;
// #endif
font-size: 30rpx;
diff --git a/pages/market/my/set_up.vue b/pages/market/my/set_up.vue
index 9a63516..26668eb 100644
--- a/pages/market/my/set_up.vue
+++ b/pages/market/my/set_up.vue
@@ -27,12 +27,12 @@
},
privacy_agreement(type){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type
})
},
update_pass(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/market/my/update_pass'
})
}
diff --git a/pages/market/my/signed_client_list.vue b/pages/market/my/signed_client_list.vue
index 4ec8166..c342372 100644
--- a/pages/market/my/signed_client_list.vue
+++ b/pages/market/my/signed_client_list.vue
@@ -147,7 +147,7 @@ export default {
//打开学员详情页
openViewStudentInfo(item){
let students_id= item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/coach/student/info?students_id=${students_id}`
})
},
diff --git a/pages/market/my/update_pass.vue b/pages/market/my/update_pass.vue
index 486fe37..77cc555 100644
--- a/pages/market/my/update_pass.vue
+++ b/pages/market/my/update_pass.vue
@@ -123,7 +123,7 @@ import apiRoute from '@/api/apiRoute.js';
},
//忘记密码
forgot() {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/login/forgot'
})
},
@@ -178,7 +178,8 @@ import apiRoute from '@/api/apiRoute.js';
//延迟1s执行
setTimeout(() => {
//跳转页面-个人中心
- uni.navigateTo({
+ //关闭当前页跳转新页面
+ uni.redirectTo({
url: `/pages/market/my/index`
})
}, 1000)
diff --git a/pages/student/index/index.vue b/pages/student/index/index.vue
index 6e85635..d1ae90e 100644
--- a/pages/student/index/index.vue
+++ b/pages/student/index/index.vue
@@ -49,17 +49,19 @@
更多
-
+
课程预告
-
-
- {{$util.formatToDateTime(memberIndexData.kcyg.date_time,'m-d')}} {{memberIndexData.kcyg.weekday}} {{memberIndexData.kcyg.time_slot[0]}}-{{memberIndexData.kcyg.time_slot[1]}}
- {{memberIndexData.kcyg.address}} {{memberIndexData.kcyg.courses_name}}
-
-
+
+
+
+
+ {{$util.formatToDateTime(personCourseScheduleInfo.course_date,'m-d')}} {{personCourseScheduleInfo.time_slot}}
+ {{personCourseScheduleInfo.courseScheduleHasOne.venue.venue_name}} {{personCourseScheduleInfo.courseScheduleHasOne.course.course_name}}
+
+
+
详情
@@ -74,37 +76,48 @@
-
- 12/23
-
- 已完成
-
-
+
+
+
+
+
+
-
+
- {{v.coach_name}}
+ {{v.student.name}}
上传
- 时间:{{v.create_time}}
-
-
+ 时间:{{$util.formatToDateTime(v.created_at, "Y-m-d H:i")}}
+ 类型:{{v.content_type == 1 ? '图片' : (v.content_type == 2 ? '视频':'文本')}}
+
+ {{v.description}}
+
-
-
-
-
-
+
+
+ 描述:{{v.description}}
+
+
+
+
+
+
+
+ 作业内容:{{ v.content_text }}
+
+
+
@@ -133,36 +146,17 @@
},
data() {
return {
- inited: false, // 添加标记位控制 init 只执行一次
//上传接口地址
uploadApiUrl: ``,
- uploadImageApiUrl: `${Api_url}/file/image`,
- uploadVideoApiUrl: `${Api_url}/file/video`,
+ uploadImageApiUrl: `${Api_url}/memberUploadImage`,//图片上传接口
+ uploadVideoApiUrl: `${Api_url}/memberUploadVideo`,//视频上传接口
member_info: {},//学生信息
assignmentsList: [],//作业列表
jobAssignmentsInfo: [],//待完成的作业
- memberIndexData:{
- tx:{//体测信息
- height: '', // 身高(单位:米)
- weight: '', // 体重(单位:公斤)
- score: '', // 综合评分
- create_time: '' // 体测时间
- },
- kcyg: { // 课程预告信息
- id: '', // 课程ID
- date_time: "", // 课程日期
- time_slot: "", // 课程时间段
- address: "", // 课程地点
- courses_name: "", // 课程名称
- date_md: "", // 课程日期(月/日格式)
- weekday: "" // 课程星期
- }
- },//首页数据
-
path_arr:{
'1':'/pages/coach/home/index',//教练
'2':'/pages/market/index/index',//销售
@@ -177,24 +171,22 @@
height:'0',//身高
weight:'0',//体重
},//体测报告详情
+
+ personCourseScheduleInfo:{
+ id:'',
+ },//课程安排详情
}
},
- onLoad() {
- this.openViewHome()//检测首页是否正确跳转-不正确则进行重定向
- },
+ onLoad() {},
onShow(){
- // 防止 onShow 触发后重复 init
- if (!this.inited) {
- this.init()
- this.inited = true
- }
+ this.init()
},
methods: {
//学生页面初始化
async init(){
await this.member_init()
await this.getPhysicalTestList()
- this.getMemberIndex()
+ await this.getPersonCourseScheduleList()
this.getList()
this.getJobAssignmentsInfo()
},
@@ -223,54 +215,29 @@
}
},
-
-
- async openViewHome_COPY(){
- //获取当前页面路径
- let pages = getCurrentPages();
- //当前页面路径
- this.thisPath = '/' + pages[0].route
- //获取缓存用户登陆类型
- 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()
+ //学生端-学生课程安排-列表
+ async getPersonCourseScheduleList(){
+ let params = {
+ page: 1,//当前页码
+ limit: 1,//每页返回数据条数
+ total: 1,//数据总条数
+ resources_id:this.member_info.id,//学生资源表id
+ status:'0',//状态0待上课1已上课2请假
}
- },
-
- async getMemberIndex(){
- let res = await memberApi.memberIndex({})
+ let res = await apiRoute.xy_personCourseSchedule(params)
if(res.code != 1){
uni.showToast({
title: res.msg,
icon: 'none'
})
- return
}
- // console.log('首页',res)
- if(res.data.kcyg.time_slot){
- res.data.kcyg.time_slot = res.data.kcyg.time_slot.split(',');
- }
+ console.log('课程安排',res.data)
- this.memberIndexData = res.data
+ let arr = res.data.data
+ if(arr.length){
+ this.personCourseScheduleInfo = arr[0]
+ }
},
//获取作业列表
@@ -278,9 +245,10 @@
let data = {
page: 1,
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){
uni.showToast({
title: res.msg,
@@ -297,9 +265,10 @@
let data = {
page: 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){
uni.showToast({
title: res.msg,
@@ -328,35 +297,35 @@
//跳转页面-作业详情
details() {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/index/work_details'
})
},
//跳转体测列表
physical_examination(){
let resource_id = this.member_info.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/student/index/physical_examination?resource_id=${resource_id}`
})
},
//跳转作业列表页
jobList(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/index/job_list'
})
},
// 上传作业
async submitJob(item) {
- let type = item.content_type // 作业类型1图片2视频
+ let type = item.content_type // 作业类型1图片2视频3文本
try {
// 等待上传文件的返回结果
let uploadRes = await this.uploadFile(type)
- // console.log('上传结果', uploadRes)
+ console.log('上传结果', uploadRes)
// 检查上传结果
- if (!uploadRes.data.path) {
+ if (!uploadRes.data.url) {
return
}
@@ -364,22 +333,28 @@
let data = {
id: item.id, // 作业列表id
student_file: uploadRes.data.path, // 附件
- student_file_type: type, // 作业类型1图片2视频
- student_content: '', // 内容
+ resources_id:this.member_info.id, // 学生资源id
+ content_text:uploadRes.data.url
}
// 提交作业
await this.assignmentsSubmit(data)
} catch (error) {
console.error('上传或提交作业失败:', error)
- alert('上传或提交作业失败')
+ //alert('上传或提交作业失败')
+ //提示
+ uni.showToast({
+ title: '上传或提交作业失败',
+ icon: 'none'
+ })
}
},
-// 上传单文件(视频/图片) type=作业类型1图片2视频
+// 上传单文件(视频/图片) type=作业类型1图片2视频3文本
async uploadFile(type) {
return new Promise((resolve, reject) => {
if (type == 1) {
+ //图片作业
this.uploadApiUrl = this.uploadImageApiUrl
uni.chooseImage({
count: 1,
@@ -399,7 +374,8 @@
reject(error)
}
})
- } else {
+ } else if(type == 2){
+ //视频作业
this.uploadApiUrl = this.uploadVideoApiUrl
uni.chooseVideo({
count: 1,
@@ -468,12 +444,11 @@
// 提交作业接口
async assignmentsSubmit(item) {
let data = {
- id: item.id, // 作业列表id
- student_file: item.student_file, // 附件
- student_file_type: item.student_file_type, // 作业类型1图片2视频
- student_content: item.student_content, // 内容
+ resources_id:item.resources_id, // 学生资源id
+ id:item.id,
+ content_text:item.content_text
}
- let res = await memberApi.assignmentsSubmit(data)
+ let res = await apiRoute.xy_assignmentSubmitObj(data)
if (res.code != 1) {
uni.showToast({
title: res.msg,
@@ -494,16 +469,16 @@
//跳转页面-打开作业详情
openViewWorkDetails(item) {
let id = item.id
- uni.navigateTo({
+ this.$navigateTo({
url: `/pages/student/index/work_details?id=${id}`
})
},
//跳转页面-打开课时详情
openViewTimetableInfo(item) {
- let id = item.id
- uni.navigateTo({
- url: `/pages/student/timetable/info?id=${id}`
+ let person_course_schedule_id = item.id
+ this.$navigateTo({
+ url: `/pages/student/timetable/info?person_course_schedule_id=${person_course_schedule_id}`
})
},
@@ -544,6 +519,7 @@
}
.multi-line-ellipsis {
+ width: 100%;
color: #fff;
padding: 5rpx 10rpx;
display: -webkit-box;
@@ -696,32 +672,37 @@
.upcomin-classes-div-con {
display: flex;
+ justify-content: space-between;
align-items: center;
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 {
background-color: #292929;
@@ -749,7 +730,7 @@
.after-class-con {
width: 92%;
- height: 246rpx;
+ //height: 246rpx;
background-color: #404045;
border-radius: 20rpx;
margin: 15rpx auto;
@@ -761,9 +742,11 @@
display: flex;
justify-content: space-between;
padding: 20rpx;
- height: 95%;
width: 100%;
align-content: space-around;
+ .description{
+ color: #fff;
+ }
}
.pic {
@@ -771,4 +754,32 @@
height: 144rpx;
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;
+ }
+ }
+ }
+ }
\ No newline at end of file
diff --git a/pages/student/index/job_list.vue b/pages/student/index/job_list.vue
index e46ba6e..9c4ff5b 100644
--- a/pages/student/index/job_list.vue
+++ b/pages/student/index/job_list.vue
@@ -13,24 +13,25 @@
>
-
-
-
+
+
+
+ {{v.content_text}}
- 时间:{{v.create_time}}
+ 时间:{{v.created_at}}
-
+
-
+
{{v.type == 1 ? '班级作业' : '个人作业'}}
@@ -44,6 +45,7 @@
\ No newline at end of file
diff --git a/pages/student/my/set_up.vue b/pages/student/my/set_up.vue
index f247c33..1102d86 100644
--- a/pages/student/my/set_up.vue
+++ b/pages/student/my/set_up.vue
@@ -26,12 +26,12 @@
},
privacy_agreement(type){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/common/privacy_agreement?type='+type
})
},
update_pass(){
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/my/update_pass'
})
}
diff --git a/pages/student/my/update_pass.vue b/pages/student/my/update_pass.vue
index 2234fd7..244132b 100644
--- a/pages/student/my/update_pass.vue
+++ b/pages/student/my/update_pass.vue
@@ -82,7 +82,7 @@
});
},
forgot() {
- uni.navigateTo({
+ this.$navigateTo({
url: '/pages/student/login/forgot'
})
},
diff --git a/pages/student/timetable/index.vue b/pages/student/timetable/index.vue
index a01020a..5cc8b6b 100644
--- a/pages/student/timetable/index.vue
+++ b/pages/student/timetable/index.vue
@@ -12,9 +12,9 @@
{{v.week}}
- {{today == v.date ? '今':v.today}}
+ {{today == v.date ? '今':v.today}}
-
+
@@ -24,10 +24,10 @@
- {{venuesInfo.name}}
+ {{venuesInfo.venue_name}}
- 更多
+ 更多场馆
@@ -43,29 +43,31 @@
- 班级:{{v.classes_name}}
- 时间:{{v.date}}
- 课室:{{v.address}}
- 课程:{{v.courses_name}}
+ 教练:{{v.courseScheduleHasOne.coach.name}}
+ 课程:{{v.courseScheduleHasOne.course.course_name}}
+ 时间:{{v.course_date}}
+ 课室:{{v.courseScheduleHasOne.campus_name}} {{v.courseScheduleHasOne.venue.venue_name}}
-
- {{ v.status === 1 ? '未开始' : v.status === 2 ? '上课中' : '已结束' }}
+
+ {{ v.status == 0 ? '待上课' : v.status == 1 ? '已上课' : '请假' }}
- 已签到学生 ({{v.sign_list.length }}/{{v.max_students.split(',').length }})
+
-
-
-
-
-
+
+
+
+
+
详情
@@ -99,6 +101,7 @@