From 6148e3012f5af824accd99a2d00939e032c80e10 Mon Sep 17 00:00:00 2001
From: unknown <331404948@qq.com>
Date: Mon, 11 Mar 2024 18:32:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=99=E7=BB=83=E8=A7=92?=
=?UTF-8?q?=E8=89=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 2 +-
components/UserTab/UserTab.vue | 7 +-
components/user-info/user-info.vue | 2 +-
pages.json | 54 +++----
pages/login/login.vue | 39 ++++-
pages/tabbar/examSimulation/comp/coach.vue | 2 +-
pages/tabbar/examSimulation/index.vue | 2 +-
pages/tabbar/mine/index.vue | 82 +++++++---
pages/tabbar/operateTrain/index.vue | 8 +-
pages/tabbar/statistics/comp/examinCoach.vue | 2 +-
pages/tabbar/statistics/index.vue | 6 +-
pages/tabbar/student/index.vue | 3 +-
pages/userCenter/statistics/comp/columnChart.vue | 174 --------------------
pages/userCenter/statistics/comp/comp.scss | 186 ----------------------
pages/userCenter/statistics/comp/examinCoach.vue | 117 --------------
pages/userCenter/statistics/comp/operateCoach.vue | 76 ---------
pages/userCenter/statistics/comp/principal.vue | 99 ------------
pages/userCenter/statistics/comp/stage.vue | 51 ------
pages/userCenter/statistics/comp/tabDate.vue | 74 ---------
pages/userCenter/statistics/comp/topUserInfo.vue | 55 -------
pages/userCenter/statistics/index.vue | 76 ---------
store/modules/user.js | 3 +-
22 files changed, 149 insertions(+), 971 deletions(-)
delete mode 100644 pages/userCenter/statistics/comp/columnChart.vue
delete mode 100644 pages/userCenter/statistics/comp/comp.scss
delete mode 100644 pages/userCenter/statistics/comp/examinCoach.vue
delete mode 100644 pages/userCenter/statistics/comp/operateCoach.vue
delete mode 100644 pages/userCenter/statistics/comp/principal.vue
delete mode 100644 pages/userCenter/statistics/comp/stage.vue
delete mode 100644 pages/userCenter/statistics/comp/tabDate.vue
delete mode 100644 pages/userCenter/statistics/comp/topUserInfo.vue
delete mode 100644 pages/userCenter/statistics/index.vue
diff --git a/App.vue b/App.vue
index 479e25a..be961be 100644
--- a/App.vue
+++ b/App.vue
@@ -2,7 +2,7 @@
export default {
onLaunch: function() {
console.log('App Launch')
- ;
+ uni.hideTabBar();
},
onShow: function() {
console.log('App Show')
diff --git a/components/UserTab/UserTab.vue b/components/UserTab/UserTab.vue
index ffc5785..c2c9d85 100644
--- a/components/UserTab/UserTab.vue
+++ b/components/UserTab/UserTab.vue
@@ -46,7 +46,12 @@
if (this.identity == '实操教练') {
//教练
this.list = [
-
+ {
+ "pagePath": "/pages/tabbar/statistics/index",
+ "text": "统计",
+ "iconPath": require("../../static/images/tabbar/tj.png"),
+ "selectedIconPath": require("../../static/images/tabbar/tjActive.png")
+ },
{
"pagePath": "/pages/tabbar/student/index",
"text": "学员",
diff --git a/components/user-info/user-info.vue b/components/user-info/user-info.vue
index 4a143a7..3fc4b5b 100644
--- a/components/user-info/user-info.vue
+++ b/components/user-info/user-info.vue
@@ -18,7 +18,7 @@
-
+ {{identity}}
diff --git a/pages.json b/pages.json
index 365dac2..8ed0000 100644
--- a/pages.json
+++ b/pages.json
@@ -9,7 +9,15 @@
"backgroundTextStyle": "dark"
}
},
-
+ {
+ "path": "pages/tabbar/statistics/index",
+ "style": {
+ "navigationBarTitleText": "首页",
+ "navigationStyle": "custom",
+ "enablePullDownRefresh": true,
+ "backgroundTextStyle": "dark"
+ }
+ },
{
"path": "pages/tabbar/examSimulation/index",
"style": {
@@ -213,15 +221,7 @@
{
"root": "pages/userCenter",
"pages": [
- {
- "path": "statistics/index",
- "style": {
- "navigationBarTitleText": "结算统计",
- "navigationStyle": "custom",
- "enablePullDownRefresh": true,
- "backgroundTextStyle": "dark"
- }
- },
+
{
"path": "forgetPwd/forgetPwd",
"style": {
@@ -364,24 +364,17 @@
"color": "#999999",
"selectedColor": "#218DFF",
"backgroundColor": "#FFFFFF",
- "list": [
- // {
- // "pagePath": "pages/tabbar/statistics/index",
- // "text": "首页",
- // "iconPath": "static/images/tabbar/tj.png",
- // "selectedIconPath": "static/images/tabbar/tjActive.png"
- // },
- // {
- // "pagePath": "pages/tabbar/examSimulation/index",
- // "text": "考场模拟",
- // "iconPath": "static/images/tabbar/kc.png",
- // "selectedIconPath": "static/images/tabbar/kcActive.png"
- // },
+ "list": [{
+ "pagePath": "pages/tabbar/statistics/index",
+ "text": "首页",
+ "iconPath": "static/images/tabbar/tj.png",
+ "selectedIconPath": "static/images/tabbar/tjActive.png"
+ },
{
- "pagePath": "pages/tabbar/student/index",
- "text": "学员",
- "iconPath": "static/images/tabbar/xy.png",
- "selectedIconPath": "static/images/tabbar/xyActive.png"
+ "pagePath": "pages/tabbar/examSimulation/index",
+ "text": "考场模拟",
+ "iconPath": "static/images/tabbar/kc.png",
+ "selectedIconPath": "static/images/tabbar/kcActive.png"
},
{
"pagePath": "pages/tabbar/operateTrain/index",
@@ -389,7 +382,12 @@
"iconPath": "static/images/tabbar/sc.png",
"selectedIconPath": "static/images/tabbar/scActive.png"
},
-
+ {
+ "pagePath": "pages/tabbar/student/index",
+ "text": "学员",
+ "iconPath": "static/images/tabbar/xy.png",
+ "selectedIconPath": "static/images/tabbar/xyActive.png"
+ },
{
"pagePath": "pages/tabbar/mine/index",
"text": "我的",
diff --git a/pages/login/login.vue b/pages/login/login.vue
index ca8b88a..a8bf4b4 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -34,6 +34,7 @@
-->
+
@@ -55,6 +56,9 @@
show: false,
columnsArea: [],
list: [],
+ title: '请选择您要登录的角色',
+ showRole: false,
+ roleObj: {}
}
},
onLoad() {
@@ -76,8 +80,23 @@
if(!this.columnsArea.length) return this.$u.toast('没有获得服务地区,请下拉刷新重新加载')
this.show = true
},
-
-
+ selectClick(item) {
+ this.showRole = false
+ this.chooseIdentity(item.name)
+ // alert(item.name)
+ },
+ chooseIdentity(name) {
+ let url = '/pages/tabbar/statistics/index'
+ this.$store.commit('upDateIdentity', name)
+ if(name=='实操教练') {
+ url = '/pages/tabbar/student/index'
+ }else if(name=='模拟器老师') {
+ url = '/pages/tabbar/examSimulation/index'
+ }
+ uni.reLaunch({
+ url
+ })
+ },
confirmArea(val) {
let item = val.value[0]
this.FormData.tenantName =item.name
@@ -135,10 +154,20 @@
// return
await this.$store.dispatch('getUserInfo')
- uni.switchTab({
- url: '/pages/tabbar/student/index'
+ console.log(this.role)
+ this.list = []
+ this.role.forEach((item)=>{
+ let obj = {
+ name: this.roleObj[item]
+ }
+ this.list.push(obj)
})
-
+ if(this.list.length>1) {
+ this.showRole = true
+ }else {
+ this.chooseIdentity(this.list[0].name)
+ }
+ console.log(this.list)
}
}
diff --git a/pages/tabbar/examSimulation/comp/coach.vue b/pages/tabbar/examSimulation/comp/coach.vue
index 3cb0f56..9d5a71e 100644
--- a/pages/tabbar/examSimulation/comp/coach.vue
+++ b/pages/tabbar/examSimulation/comp/coach.vue
@@ -61,7 +61,7 @@
},
onLoad() {},
onShow() {
- ;
+ uni.hideTabBar();
},
methods: {
goPage() {}
diff --git a/pages/tabbar/examSimulation/index.vue b/pages/tabbar/examSimulation/index.vue
index ff84fdc..3540531 100644
--- a/pages/tabbar/examSimulation/index.vue
+++ b/pages/tabbar/examSimulation/index.vue
@@ -21,7 +21,7 @@
}
},
onShow() {
- ;
+ uni.hideTabBar();
},
onPullDownRefresh() {
this.$refs.studentCommentRef.initList()
diff --git a/pages/tabbar/mine/index.vue b/pages/tabbar/mine/index.vue
index 5f87381..dcd4ba2 100644
--- a/pages/tabbar/mine/index.vue
+++ b/pages/tabbar/mine/index.vue
@@ -1,12 +1,17 @@
-
+
-
+
+
+
+
+ 切换身份
+
-
+
@@ -14,7 +19,7 @@
-
+
@@ -25,7 +30,7 @@
-
+
@@ -33,31 +38,72 @@
export default {
data() {
return {
- tabData:[
- // {text: '待结算记录', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/settled/settled'},
- // {text: '指标充值记录', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/userCenter/indicatorRecharge/indicatorRecharge'},
- {text: '今日预约', icon: require('../../../static/images/coach/coach.png'), id: 2, url: '/pages/recordEntry/operate/todayStudent/todayStudent'},
- {text: '结算统计', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/userCenter/statistics/index'},
- {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
- {text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'},
- {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
- {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
- ],
+ tabData: [],
list: [],
showRole: false
}
},
onLoad() {
// this.$store.dispatch('refreshToken')
+ this.initMenu()
this.roleListFn()
},
onShow() {
- ;
+ uni.hideTabBar();
// this.getIpAddress()
},
methods: {
-
-
+ goPage(item) {
+ // if(item.text=='结算统计') {
+ // uni.switchTab({
+ // url: item.url
+ // })
+ // }
+ this.$goPage(item.url)
+ },
+ initMenu() {
+ if(this.identity=='实操教练') {
+ this.tabData = [
+ {text: '今日预约', icon: require('../../../static/images/coach/ic_zhibiao.png'), id: 2, url: '/pages/recordEntry/operate/todayStudent/todayStudent'},
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ // {text: '考场信息', icon: require('../../../static/images/coach/ic_changdi.png'), id: 4, url: '/pages/userCenter/examinInfo/examinInfo'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
+ {text: '结算统计', icon: require('../../../static/images/coach/ic_daijiesuan.png'), id: 1, url: '/pages/tabbar/statistics/index'},
+ // {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
+
+ ]
+ }else if(this.identity=='校长'||this.identity=='驾校财务') {
+ this.tabData = [
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ {text: '驾校场地', icon: require('../../../static/images/coach/site.png'), id: 7, url: '/pages/userCenter/schoolSite/schoolSite'},
+ {text: '驾校教练', icon: require('../../../static/images/coach/coach.png'), id: 7, url: '/pages/userCenter/schoolCoach/schoolCoach'},
+ {text: '教学数据', icon: require('../../../static/images/coach/ic_shuju.png'), id: 6, url: '/pages/userCenter/teachingData/teachingData'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ {text: '学员退款', icon: require('../../../static/images/coach/ic_tuikuan.png'), id: 7, url: '/pages/userCenter/refund/refund'},
+
+ ]
+ }else if(this.identity=='考场模拟教练') {
+ this.tabData = [
+ {text: '我的车辆', icon: require('../../../static/images/coach/ic_cheliang.png'), id: 3, url: '/pages/userCenter/myCar/myCar'},
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ ]
+ }else if(this.identity=='模拟器老师') {
+ this.tabData = [
+ {text: '学员评价', icon: require('../../../static/images/coach/ic_pingjia.png'), id: 5, url: '/pages/userCenter/studentComment/studentComment'},
+ ]
+ }
+ },
+ // 切换角色
+ selectClick(item) {
+ this.showRole = false
+ this.$store.commit('upDateIdentity', item.name)
+ this.initMenu()
+ uni.reLaunch({
+ url: '/pages/tabbar/mine/index'
+ })
+
+ },
roleListFn() {
this.list = []
if(this.role.length<=1) return
diff --git a/pages/tabbar/operateTrain/index.vue b/pages/tabbar/operateTrain/index.vue
index 790d2fd..1ea72a2 100644
--- a/pages/tabbar/operateTrain/index.vue
+++ b/pages/tabbar/operateTrain/index.vue
@@ -1,7 +1,7 @@
-
+
@@ -10,6 +10,10 @@
我的排课
去管理
+
-
-
+
+
+
@@ -23,6 +24,7 @@
}
},
onShow() {
+ uni.hideTabBar();
},
}
diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue
index 7ae1070..b483848 100644
--- a/pages/tabbar/student/index.vue
+++ b/pages/tabbar/student/index.vue
@@ -2,7 +2,7 @@
-
+
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/userCenter/statistics/comp/topUserInfo.vue b/pages/userCenter/statistics/comp/topUserInfo.vue
deleted file mode 100644
index edd3811..0000000
--- a/pages/userCenter/statistics/comp/topUserInfo.vue
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
- Hi,{{vuex_userInfo.user.nickname}}
-
-
-
-
- {{ vuex_userInfo.user.schoolName}}
- {{identity}}
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/userCenter/statistics/index.vue b/pages/userCenter/statistics/index.vue
deleted file mode 100644
index 3c2557b..0000000
--- a/pages/userCenter/statistics/index.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-
- Hi,大乔教练
-
-
-
-
- 翔力驾校
- 合作教练
-
-
-
- 今日已结算金额
- ¥36333.66
-
- 截止:2023/08/08 11:00:00
-
- 刷新
-
-
-
-
-
-
-
- 结算统计
-
-
-
-
-
-
-
-
-
- 结算明细
-
-
-
-
-
-
-
- 查看更多
-
-
-
-
-
-
-
diff --git a/store/modules/user.js b/store/modules/user.js
index 595da35..00ee816 100644
--- a/store/modules/user.js
+++ b/store/modules/user.js
@@ -9,7 +9,8 @@ const user = {
vuex_loginInfo: uni.getStorageSync('vuex_loginInfo') ? uni.getStorageSync('vuex_loginInfo') : {},
vuex_TenantId: uni.getStorageSync('vuex_TenantId') ? uni.getStorageSync('vuex_TenantId') : '',
vuex_role: {
- schoolManager: '校长',
+ // schoolManager
+ manager: '校长',
schoolFinance: '驾校财务',
coach: '实操教练',
examSiteCoach: '考场模拟教练',