From be1e341bdaf51836f57433e3a499c1b8d07c7b7d Mon Sep 17 00:00:00 2001
From: Lx <935448346@qq.com>
Date: Wed, 16 Apr 2025 17:14:38 +0800
Subject: [PATCH 1/2] 0416
---
components/tabbar/tabbar.vue | 10 ++--
config.js | 2 +-
newPages/my/index.vue | 2 +-
newPages/newIndex/index.vue | 13 ++---
pages.json | 16 ++++++
pages/login/login.vue | 3 +-
pagesA/examinationAdd/index.vue | 75 ++++++++++++++++-------------
pagesA/examinationList/index.vue | 24 +++++----
pagesA/register/index.vue | 83 ++++++++++++++++++++++++--------
9 files changed, 153 insertions(+), 75 deletions(-)
diff --git a/components/tabbar/tabbar.vue b/components/tabbar/tabbar.vue
index 2e860d9..1478a9c 100644
--- a/components/tabbar/tabbar.vue
+++ b/components/tabbar/tabbar.vue
@@ -55,9 +55,10 @@
gogogo(id) {
this.actindex = id;
if (id == 1) {
- uni.reLaunch({
+ /* uni.switchTab({
url: '/newPages/newIndex/index'
- })
+ }) */
+ uni.switchTab({ url: '/newPages/newIndex/index' });
}
if (id == 2) {
uni.reLaunch({
@@ -65,10 +66,11 @@
})
}
if (id == 3) {
- uni.reLaunch({
+ /* uni.switchTab({
// url: '/pages/my/my'
url: '/newPages/my/index'
- })
+ }) */
+ uni.switchTab({ url: '/newPages/my/index' });
}
if (id == 4) {
uni.showToast({
diff --git a/config.js b/config.js
index 5a9980b..66bf81f 100644
--- a/config.js
+++ b/config.js
@@ -3,7 +3,7 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
imagesUrl: 'http://122.51.230.86:9000',
- // baseUrl: 'http://localhost:48080',
+ // baseUrl: 'https://www.nuoyunr.com',
baseUrl: 'http://192.168.1.27:48080',
appId:'wx684fc832e96cee65',
appSecret:'d1fecac806c5f3cd9aca9f3d5c3759c7',
diff --git a/newPages/my/index.vue b/newPages/my/index.vue
index 6ce10ed..ca01322 100644
--- a/newPages/my/index.vue
+++ b/newPages/my/index.vue
@@ -102,7 +102,7 @@
-
+
diff --git a/newPages/newIndex/index.vue b/newPages/newIndex/index.vue
index 2a2af84..33158d5 100644
--- a/newPages/newIndex/index.vue
+++ b/newPages/newIndex/index.vue
@@ -54,15 +54,14 @@
-
+
-
+
@@ -124,6 +123,7 @@ export default {
};
},
onLoad(query) {
+ console.log('query',query)
// setInviteId('JLPXF1')
// this.getTenantIdByInviteId()
this.getSwiperList()
@@ -135,10 +135,10 @@ export default {
//扫码邀请过来的,设置邀请者code
setInviteId(theRequest['inviteId'])
this.getTenantIdByInviteId()
- //先登录
+ /* //先登录
uni.reLaunch({
url: '/pages/login/login'
- })
+ }) */
}else{
removeInviteId()
removeCoachId()
@@ -182,6 +182,7 @@ export default {
})
},
getList() {
+ console.log('getInviteId',getInviteId())
const params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
@@ -267,7 +268,7 @@ export default {
method: 'GET'
}).then(res => {
res.data.forEach(item => {
- item.swiperPicture = this.imageUrl + item.swiperPicture
+ item.swiperPicture = this.imageUrl + '/' + item.swiperPicture
})
this.swiperList = res.data
})
diff --git a/pages.json b/pages.json
index c0351db..3860350 100644
--- a/pages.json
+++ b/pages.json
@@ -199,6 +199,22 @@
"pages": []
}
],
+ "tabBar": {
+ "list": [
+ {
+ "pagePath": "newPages/newIndex/index",
+ "text": "首页",
+ "iconPath": "static/imgs/homeone.png",
+ "selectedIconPath": "static/imgs/hometwo.png"
+ },
+ {
+ "pagePath": "newPages/my/index",
+ "text": "我的",
+ "iconPath": "static/imgs/myone.png",
+ "selectedIconPath": "static/imgs/mytwo.png"
+ }
+ ]
+ },
"globalStyle": {
"navigationBarTextStyle": "black",
diff --git a/pages/login/login.vue b/pages/login/login.vue
index d7e629c..959a07d 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -253,7 +253,8 @@ export default {
uni.setStorageSync('role', res.data.role)
uni.setStorageSync('userinfo', res.data.user)
uni.reLaunch({
- url: '/newPages/newIndex/index'
+ // url: '/newPages/newIndex/index'
+ url: '/newPages/my/index'
})
// uni.navigateBack()
})
diff --git a/pagesA/examinationAdd/index.vue b/pagesA/examinationAdd/index.vue
index 420d401..b5ec560 100644
--- a/pagesA/examinationAdd/index.vue
+++ b/pagesA/examinationAdd/index.vue
@@ -184,8 +184,9 @@ export default {
};
},
onLoad(options) {
+ console.log('options', options)
this.userInfo = getLocalUserInfo()
- this.getUserOrderDetails()
+ // this.getUserOrderDetails()
this.process.subject = options.subject
this.opTenantId = options.tenantId
this.opCourseType = options.courseType
@@ -200,6 +201,8 @@ export default {
this.process.userId = this.userInfo.id
this.process.coachId = options.coachId
this.process.userName = options.nickname
+ this.process.tenantId = options.tenantId
+ this.getCourseCompleteStatus();
},
onReady() {
// 动态计算滚动区域高度
@@ -325,33 +328,35 @@ export default {
});
},
- getUserOrderDetails() {
- request({
- url: '/app-api/small/drive/school-course-order/page',
- method: 'GET',
- params: {
- userId: this.userInfo.id,
- paymentStatus: '2',
- ifEnd: 0,
- },
- tenantIdFlag: false
- }).then(res => {
- this.orderList = res.data.records;
- if (res.data.records.length > 0) {
- const tempData = res.data.records[0]
- if (this.process.subject != 2 && this.process.subject != 3) {
- this.process.courseId = tempData.courseId
- }
+ // getUserOrderDetails() {
+ // request({
+ // url: '/app-api/small/drive/school-course-order/page',
+ // method: 'GET',
+ // params: {
+ // userId: this.userInfo.id,
+ // paymentStatus: '2',
+ // ifEnd: false,
+ // tenantId: 180,
+ // },
+ // tenantIdFlag: false
+ // }).then(res => {
+ // console.log('123123', res)
+ // this.orderList = res.data.records;
+ // if (res.data.records.length > 0) {
+ // const tempData = res.data.records[0]
+ // if (this.process.subject != 2 && this.process.subject != 3) {
+ // this.process.courseId = tempData.courseId
+ // }
- if (this.process.subject != 2 && this.process.subject != 3) {
- this.courseType = tempData.courseType
- }
+ // if (this.process.subject != 2 && this.process.subject != 3) {
+ // this.courseType = tempData.courseType
+ // }
- this.process.tenantId = tempData.tenantId
- this.getCourseCompleteStatus()
- }
- });
- },
+ // this.process.tenantId = tempData.tenantId
+ // this.getCourseCompleteStatus()
+ // }
+ // });
+ // },
getCourseCompleteStatus() {
request({
@@ -362,10 +367,15 @@ export default {
courseId: this.process.courseId,
}
}).then(res => {
+ console.log('res123',res)
this.courseCompleteStatusList = res.data.records
if (this.courseCompleteStatusList.length > 0) {
const subject2 = this.courseCompleteStatusList.find(item => item.subject === 2)
const subject3 = this.courseCompleteStatusList.find(item => item.subject === 3)
+ const subject1Or4 = this.courseCompleteStatusList.find(item => item.subject === 1 || item.subject === 4)
+ if (subject1Or4) {
+ this.courseType = subject1Or4.courseType
+ }
if (subject2?.status === '2' && subject3?.status === '2') {
this.subjectColumns = [['科目一', '科目四']]
@@ -383,7 +393,8 @@ export default {
},
saveData() {
- if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
+ console.log('process', this.process)
+ if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
return;
}
@@ -396,24 +407,23 @@ export default {
},
saveDataOne() {
if (this.process.subject === 1 && this.courseCompleteStatusList.length <= 0) {
- uni.showToast({title: '请联系驾校人员', icon: 'none'});
+ uni.showToast({title: '请联系驾校人员!', icon: 'none'});
return;
}
if (this.process.subject === 4 && this.courseCompleteStatusList.length <= 0) {
- uni.showToast({title: '请联系驾校人员', icon: 'none'});
+ uni.showToast({title: '请联系驾校人员!', icon: 'none'});
return;
}
const postData = {
...this.process, // 先拷贝 process 原有数据
- userName: this.userInfo.nickname,
remark: this.process.remark,
images: this.fileList?.map(item => item.url).join(',') || '',
}
// this.process.images = this.fileList?.map(item => item.url).join(',') || '';
- if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
+ if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
return;
}
@@ -447,7 +457,6 @@ export default {
fraction: this.process.examScore,
ifPass: this.process.examStatus,
id: this.batchItemId,
- userName: this.userInfo.nickname,
remark: this.process.remark,
images: this.fileList?.map(item => item.url).join(',') || '',
}
@@ -456,7 +465,7 @@ export default {
this.process.fraction = this.process.examScore
this.process.ifPass = this.process.examStatus
this.process.images = this.fileList?.map(item => item.url).join(',') || ''; */
- if (!this.process.userId || !this.process.subject || !this.process.examScore || !this.process.examStatus || !this.process.examTime) {
+ if (!this.process.userId || !this.process.subject || this.process.examScore === null || this.process.examStatus === null || !this.process.examTime) {
uni.showToast({title: '信息填写不完整', icon: 'none'});
return;
}
diff --git a/pagesA/examinationList/index.vue b/pagesA/examinationList/index.vue
index 11b4de7..503b74a 100644
--- a/pagesA/examinationList/index.vue
+++ b/pagesA/examinationList/index.vue
@@ -15,7 +15,7 @@
+ :style="{ height: ((item.subject != 2 && item.subject != 3) || (getButtonInfo(item).text === '1' || getButtonInfo(item).text === '2')) ? '230rpx' : 'auto' }">
@@ -45,9 +45,8 @@
考试地址:
{{ item.addr }}
-
+
-
{{ getButtonInfo(item).text }}
@@ -153,13 +152,12 @@ export default {
// 点击笔试成绩录入的时候 检查是否已报名课程
onEnterScoreClick() {
if (this.courseList.length > 0) {
+ console.log('123123123', this.courseList)
this.pickerColumns = this.courseList.map(item => ({
label: item.courseName,
value: item.courseId
}));
this.pickerShow = true;
- } else if (this.courseList.length === 1) {
- this.goToScoreEntry(this.courseList[0]);
} else {
this.$u.toast("暂无课程信息");
}
@@ -174,7 +172,7 @@ export default {
this.getProcess(selectedCourse.courseId).then(processData => {
if (!processData || processData.length === 0) {
uni.showToast({
- title: '请联系驾校负责人',
+ title: '暂无课程进度信息',
icon: 'none'
});
return;
@@ -201,10 +199,14 @@ export default {
// 跳转成绩录入界面
goToScoreEntry(course) {
+ console.log('course', course)
+ /* uni.navigateTo({
+ url: `/pagesA/examinationAdd/index?courseId=${course.value}&courseType=${course.courseType}&userId=${course.userId}&tenantId=${course.tenantId}&coachId=${course.coachUserId}`
+ }); */
this.$u.route({
url: '/pagesA/examinationAdd/index',
params: {
- courseId: course.value,
+ courseId: course.courseId,
courseType: course.courseType,
userId: course.userId,
tenantId: course.tenantId,
@@ -242,7 +244,10 @@ export default {
userId: this.userInfo.id,
}
}).then(res => {
- this.examList = res.data
+ // this.examList = res.data
+ this.examList = res.data.sort((a, b) => {
+ return a.subject - b.subject;
+ });
// this.getExamTwoList()
this.isTriggered = false
})
@@ -267,6 +272,7 @@ export default {
url: '/app-api/small/drive/school-course-order/getCourseByLoginUser',
method: 'GET'
}).then(res => {
+ console.log('课程', res)
this.courseList = res.data
})
},
@@ -318,7 +324,7 @@ export default {
if (item.fraction == null) {
return {text: '成绩录入', type: 'input'}
} else if (!item.ifPass) {
- return {text: '考试未通过', type: 'failed'}
+ return {text: '2', type: 'failed'}
} else if (!item.ifEvaluate) {
return {text: '开始评价', type: 'evaluate'}
}else {
diff --git a/pagesA/register/index.vue b/pagesA/register/index.vue
index d170eaf..3a8f022 100644
--- a/pagesA/register/index.vue
+++ b/pagesA/register/index.vue
@@ -283,7 +283,56 @@ export default {
},
// 教练信息
- async getListAll() {
+ async getListAll() {
+ this.columnjl = []
+ let res = await request({
+ url: '/app-api/dl-drive-school-coach-small/queryCoachByCourseId',
+ method: 'GET',
+ params: {
+ courseId: this.courseId,
+ },
+ tenantIdFlag: false
+ })
+ console.log('data',res.data)
+
+ // 1. 先过滤数据,只保留subject为2或3的教练
+ const filteredData = res.data.filter(coach =>
+ coach.subject === '2' || coach.subject === '3'
+ );
+
+ // 2. 去重处理 - 根据coachId去除重复教练
+ const uniqueCoaches = [];
+ const coachIds = new Set(); // 使用Set来存储已存在的coachId
+
+ filteredData.forEach(coach => {
+ if (!coachIds.has(coach.coachId)) {
+ coachIds.add(coach.coachId);
+ uniqueCoaches.push(coach);
+ }
+ });
+
+ this.columnjl = [
+ uniqueCoaches.map(coach => ({
+ label: coach.coachName,
+ value: coach
+ }))
+ ];
+
+ if (this.localStaffType === '02' && this.localCoachId) {
+ console.log('123123',this.localStaffType)
+ console.log('321321', this.localCoachId)
+ console.log('coach', uniqueCoaches) // 这里改为使用去重后的数据
+ const defaultCoach = uniqueCoaches.find(coach =>
+ String(coach.coachId) === String(this.localCoachId)
+ );
+ console.log('111222333', defaultCoach)
+ if (defaultCoach) {
+ this.jlName = defaultCoach.coachName;
+ this.jlId = defaultCoach.coachId;
+ }
+ }
+ },
+ /* async getListAll() {
this.columnjl = []
let res = await request({
url: '/app-api/dl-drive-school-coach-small/queryCoachByCourseId',
@@ -299,6 +348,16 @@ export default {
const filteredData = res.data.filter(coach =>
coach.subject === '2' || coach.subject === '3'
);
+ // 去重处理 - 根据coachId去除重复教练
+ const uniqueCoaches = [];
+ const coachIds = new Set();
+
+ filteredData.forEach(coach => {
+ if (!coachIds.has(coach.coachId)) {
+ coachIds.add(coach.coachId);
+ uniqueCoaches.push(coach);
+ }
+ });
this.columnjl = [
filteredData.map(coach => ({
@@ -320,25 +379,8 @@ export default {
this.jlId = defaultCoach.coachId;
}
}
- },
+ }, */
- /* async getListAll() {
- this.columnjl = []
- let res = await request({
- url: '/app-api/dl-drive-school-coach-small/list',
- method: 'GET',
- params: {
- tenantId: this.tenantId,
- },
- tenantIdFlag: false
- })
- this.columnjl = [
- res.data.map(coach => ({
- label: coach.name,
- value: coach
- }))
- ];
- }, */
getsexindex(index) {
this.sex = index
},
@@ -353,8 +395,9 @@ export default {
jlconfirm(e) {
console.log('e', e)
this.jlName = e.value[0].label; // 显示名称
- this.jlId = e.value[0].value.userId; // 获取教练ID
+ this.jlId = e.value[0].value.coachId; // 获取教练ID
this.showjl = false;
+ console.log('jlId',this.jlId)
},
jlcancel() {
this.showjl = false
From 222dd08ee99bcc13127242a7284bb8a9e41aceef Mon Sep 17 00:00:00 2001
From: Lx <935448346@qq.com>
Date: Wed, 16 Apr 2025 17:41:03 +0800
Subject: [PATCH 2/2] 0416-2
---
newPages/messageCenter/index.vue | 1 +
newPages/my/index.vue | 4 +-
newPages/newIndex/index.vue | 760 +++++++++++++++----------------
pages.json | 64 ++-
4 files changed, 407 insertions(+), 422 deletions(-)
diff --git a/newPages/messageCenter/index.vue b/newPages/messageCenter/index.vue
index f2b76d2..7ac05ae 100644
--- a/newPages/messageCenter/index.vue
+++ b/newPages/messageCenter/index.vue
@@ -195,6 +195,7 @@
flex-direction: column;
padding: 0 20rpx;
box-sizing: border-box;
+
}
}
.messageItem {
diff --git a/newPages/my/index.vue b/newPages/my/index.vue
index ca01322..3163a2e 100644
--- a/newPages/my/index.vue
+++ b/newPages/my/index.vue
@@ -175,7 +175,9 @@ export default {
},
onShow() {
if (getToken()) {
- // this.findSelfInfo()
+ this.selfInfoLocal = getLocalUserInfo()
+ this.getUserInfo()
+ this.systemInfo()
}
},
diff --git a/newPages/newIndex/index.vue b/newPages/newIndex/index.vue
index 9ee4dc6..3c5cb17 100644
--- a/newPages/newIndex/index.vue
+++ b/newPages/newIndex/index.vue
@@ -1,230 +1,212 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
- 优质驾校
-
- 查看更多
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ 优质驾校
+
+ 查看更多
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+ .itemContent {
+ padding: 30rpx 0;
+ display: flex;
+ flex-direction: column;
+ row-gap: 20rpx;
+ margin-bottom: 200rpx;
+ }
+
+ .top_ {
+ //padding-top: 200rpx;
+ }
+
\ No newline at end of file
diff --git a/pages.json b/pages.json
index 3860350..e97db4a 100644
--- a/pages.json
+++ b/pages.json
@@ -32,7 +32,7 @@
"navigationStyle": "custom"
}
},
-
+
{
"path": "newPages/orderList/index",
"style": {
@@ -41,8 +41,8 @@
"navigationStyle": "custom"
}
},
-
-
+
+
{
"path": "newPages/courseList/index",
"style": {
@@ -51,7 +51,7 @@
"navigationStyle": "custom"
}
},
-
+
{
"path": "newPages/my/index",
"style": {
@@ -60,7 +60,7 @@
"navigationStyle": "custom"
}
},
-
+
{
"path": "newPages/schoolDetail/index",
"style": {
@@ -69,9 +69,9 @@
"navigationStyle": "custom"
}
},
-
-
-
+
+
+
{
"path": "newPages/schoolList/index",
"style": {
@@ -80,7 +80,7 @@
"navigationStyle": "custom"
}
},
-
+
{
"path": "newPages/messageCenter/index",
"style": {
@@ -99,11 +99,9 @@
}
],
- "subPackages": [
- {
+ "subPackages": [{
"root": "pagesA",
- "pages": [
- {
+ "pages": [{
"path": "appointmentAdd/index",
"style": {
"enablePullDownRefresh": true,
@@ -194,28 +192,28 @@
]
},
{
- "root": "uni_modules",
- "name": "modules",
- "pages": []
+ "root": "uni_modules",
+ "name": "modules",
+ "pages": []
}
],
"tabBar": {
- "list": [
- {
- "pagePath": "newPages/newIndex/index",
- "text": "首页",
- "iconPath": "static/imgs/homeone.png",
- "selectedIconPath": "static/imgs/hometwo.png"
- },
- {
- "pagePath": "newPages/my/index",
- "text": "我的",
- "iconPath": "static/imgs/myone.png",
- "selectedIconPath": "static/imgs/mytwo.png"
- }
- ]
- },
-
+ "color": "#999999", // 未选中时的文字颜色(默认灰色)
+ "selectedColor": "#2c78f5", // 选中时的文字颜色(示例蓝色)
+ "list": [{
+ "pagePath": "newPages/newIndex/index",
+ "text": "首页",
+ "iconPath": "static/imgs/homeone.png",
+ "selectedIconPath": "static/imgs/hometwo.png"
+ },
+ {
+ "pagePath": "newPages/my/index",
+ "text": "我的",
+ "iconPath": "static/imgs/myone.png",
+ "selectedIconPath": "static/imgs/mytwo.png"
+ }
+ ]
+ },
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
@@ -223,4 +221,4 @@
"backgroundColor": "#F8F8F8"
},
"uniIdRouter": {}
-}
+}
\ No newline at end of file