Browse Source

增加教练角色

master
unknown 2 months ago
parent
commit
6148e3012f
  1. 2
      App.vue
  2. 7
      components/UserTab/UserTab.vue
  3. 2
      components/user-info/user-info.vue
  4. 54
      pages.json
  5. 39
      pages/login/login.vue
  6. 2
      pages/tabbar/examSimulation/comp/coach.vue
  7. 2
      pages/tabbar/examSimulation/index.vue
  8. 82
      pages/tabbar/mine/index.vue
  9. 8
      pages/tabbar/operateTrain/index.vue
  10. 2
      pages/tabbar/statistics/comp/examinCoach.vue
  11. 6
      pages/tabbar/statistics/index.vue
  12. 3
      pages/tabbar/student/index.vue
  13. 174
      pages/userCenter/statistics/comp/columnChart.vue
  14. 186
      pages/userCenter/statistics/comp/comp.scss
  15. 117
      pages/userCenter/statistics/comp/examinCoach.vue
  16. 76
      pages/userCenter/statistics/comp/operateCoach.vue
  17. 99
      pages/userCenter/statistics/comp/principal.vue
  18. 51
      pages/userCenter/statistics/comp/stage.vue
  19. 74
      pages/userCenter/statistics/comp/tabDate.vue
  20. 55
      pages/userCenter/statistics/comp/topUserInfo.vue
  21. 76
      pages/userCenter/statistics/index.vue
  22. 3
      store/modules/user.js

2
App.vue

@ -2,7 +2,7 @@
export default {
onLaunch: function() {
console.log('App Launch')
;
uni.hideTabBar();
},
onShow: function() {
console.log('App Show')

7
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": "学员",

2
components/user-info/user-info.vue

@ -18,7 +18,7 @@
<!-- <view class="tag" v-if="identity=='校长'">驾校校长</view>
<view class="tag" v-else>合作教练</view> -->
</view>
<!-- <view class="tag" >{{identity}}</view> -->
<view class="tag" >{{identity}}</view>
</view>
</view>
</template>

54
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": "我的",

39
pages/login/login.vue

@ -34,6 +34,7 @@
</view> -->
</view>
<u-picker :show="show" :columns="columnsArea" keyName="name" @confirm="confirmArea" @cancel="show=false" @close="show=false"></u-picker>
<u-action-sheet :actions="list" :title="title" :show="showRole" @select="selectClick" ></u-action-sheet>
</view>
</template>
@ -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)
}
}

2
pages/tabbar/examSimulation/comp/coach.vue

@ -61,7 +61,7 @@
},
onLoad() {},
onShow() {
;
uni.hideTabBar();
},
methods: {
goPage() {}

2
pages/tabbar/examSimulation/index.vue

@ -21,7 +21,7 @@
}
},
onShow() {
;
uni.hideTabBar();
},
onPullDownRefresh() {
this.$refs.studentCommentRef.initList()

82
pages/tabbar/mine/index.vue

@ -1,12 +1,17 @@
<template>
<view class="pageBgImg">
<view class="status_bar"></view>
<view style="height: 88rpx;" ></view>
<view class="" style="height: 88rpx;"></view>
<view class="card">
<view class="cut_row" @click.stop="showRole=true" v-if="list.length>1">
<view class="flex-b">
<view class="cut_icon">
<image src="@/static/images/userCenter/cut.png" mode=""></image>
</view>
<view class="cut_text">切换身份</view>
</view>
</view>
<view class="qcode" @click="$goPage('/pages/userCenter/scanCode/scanCode')" v-if="identity=='实操教练'">
<view class="qcode" @click="$goPage('/pages/userCenter/scanCode/scanCode')" >
<image src="@/static/images/coach/ic_erweima.png" mode=""></image>
</view>
<user-info/>
@ -14,7 +19,7 @@
<view class="card" style="padding: 35rpx 0 0 0;">
<view class="ul">
<view class="li" v-for="(item,index) in tabData" :key="index" @click="$goPage(item.url)">
<view class="li" v-for="(item,index) in tabData" :key="index" @click="goPage(item)">
<view class="icon">
<image :src="item.icon" mode=""></image>
</view>
@ -25,7 +30,7 @@
<u-action-sheet :actions="list" title="请选择您要登录的角色" :show="showRole" @select="selectClick" @close="showRole=false" ></u-action-sheet>
<!-- <UserTab name ='我的'></UserTab> -->
<UserTab name ='我的'></UserTab>
</view>
</template>
@ -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

8
pages/tabbar/operateTrain/index.vue

@ -1,7 +1,7 @@
<template>
<view class="pageBgImg pad">
<view class="status_bar"></view>
<view style="height: 88rpx;" ></view>
<view class="" style="height: 88rpx;"></view>
<view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
@ -10,6 +10,10 @@
<view class="leftTxt">我的排课</view>
<view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/mySchedule/mySchedule')">去管理</view>
</view>
<!-- <view class="myClass">
<view class="leftTxt">今日预约学员</view>
<view class="leftBtn" @click="$goPage('/pages/recordEntry/operate/todayStudent/todayStudent')">去管理</view>
</view> -->
</view>
<view class="tabs">
<view class="tab" v-for="(item,index) in tabArr" :key="index" :class="{active: params.status==item.id}"
@ -129,7 +133,7 @@
this.maxDate = parseInt( nowTime + oneMonthMilliseconds )
},
onShow() {
;
uni.hideTabBar();
this.initList()
},
onPullDownRefresh() {

2
pages/tabbar/statistics/comp/examinCoach.vue

@ -88,7 +88,7 @@
},
onShow() {
;
uni.hideTabBar();
},
methods: {

6
pages/tabbar/statistics/index.vue

@ -1,7 +1,8 @@
<template>
<view class="main" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }">
<operateCoach />
<principal />
<!-- <examinCoach v-if="identity=='考场模拟教练'"/> -->
<operateCoach v-if="identity=='实操教练'"/>
<principal v-if="identity=='校长'||identity=='驾校财务'"/>
</view>
</template>
@ -23,6 +24,7 @@
}
},
onShow() {
uni.hideTabBar();
},
}
</script>

3
pages/tabbar/student/index.vue

@ -2,7 +2,7 @@
<view class="pageBgImg pad" >
<!-- <view class="pad" :style="{ background: `url(${imgUrl}) #f6f6f6 no-repeat`, backgroundSize: backgroundSize }" > -->
<view class="status_bar"></view>
<view style="height: 88rpx;" ></view>
<view class="" style="height: 88rpx;"></view>
<!-- <view class="searchBox">
<searchRow placeholder="搜索学员姓名、学员手机号"></searchRow>
</view>
@ -141,6 +141,7 @@
}
},
onShow() {
uni.hideTabBar();
this.studentOwnerFn()
},
onLoad() {

174
pages/userCenter/statistics/comp/columnChart.vue

@ -1,174 +0,0 @@
<template>
<view class="charts-box">
<qiun-data-charts
type="line"
:opts="opts"
:chartData="chartData"
/>
</view>
</template>
<script>
export default {
data() {
return {
chartData: {},
// opts type="column" config-ucharts.js ['column'] opts
opts: {
timing: "easeOut",
duration: 1000,
rotate: false,
rotateLock: false,
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
padding: [15,15,0,5],
fontSize: 13,
fontColor: "#1989FA",
dataLabel: true,
dataPointShape: true,
dataPointShapeType: "solid",
touchMoveLimit: 60,
enableScroll: false,
enableMarkLine: false,
legend: {
show: false,
position: "bottom",
float: "center",
padding: 5,
margin: 5,
backgroundColor: "rgba(0,0,0,0)",
borderColor: "rgba(0,0,0,0)",
borderWidth: 0,
fontSize: 13,
fontColor: "#666666",
lineHeight: 11,
hiddenColor: "#CECECE",
itemGap: 10
},
xAxis: {
disableGrid: true,
disabled: false,
axisLine: true,
axisLineColor: "#E8E9EC",
calibration: false,
fontColor: "#686B73",
fontSize: 12,
lineHeight: 20,
marginTop: 0,
rotateLabel: false,
rotateAngle: 45,
itemCount: 5,
boundaryGap: "center",
splitNumber: 5,
gridColor: "#CCCCCC",
gridType: "solid",
dashLength: 4,
gridEval: 1,
scrollShow: false,
scrollAlign: "left",
scrollColor: "#A6A6A6",
scrollBackgroundColor: "#EFEBEF",
title: "",
titleFontSize: 13,
titleOffsetY: 0,
titleOffsetX: 0,
titleFontColor: "#666666",
format: ""
},
yAxis: {
data: [
{
min: 0
}
],
disabled: true,
disableGrid: false,
splitNumber: 5,
gridType: "dash",
dashLength: 8,
gridColor: "#E8E9EC",
padding: 10,
showTitle: false
},
extra: {
column: {
type: "group",
width: 9,
activeBgColor: "#000000",
activeBgOpacity: 0.08,
seriesGap: 2,
categoryGap: 3,
barBorderCircle: false,
linearType: "none",
linearOpacity: 1,
colorStop: 0,
meterBorder: 1,
meterFillColor: "#FFFFFF",
labelPosition: "outside"
},
tooltip: {
showBox: false,
showArrow: true,
showCategory: false,
borderWidth: 0,
borderRadius: 0,
borderColor: "#000000",
borderOpacity: 0.7,
bgColor: "#000000",
bgOpacity: 0.7,
gridType: "solid",
dashLength: 4,
gridColor: "#CCCCCC",
boxPadding: 3,
fontSize: 12,
lineHeight: 20,
fontColor: "#FFFFFF",
legendShow: true,
legendShape: "auto",
splitLine: true,
horizentalLine: false,
xAxisLabel: false,
yAxisLabel: false,
labelBgColor: "#FFFFFF",
labelBgOpacity: 0.7,
labelFontColor: "#666666"
},
markLine: {
type: "solid",
dashLength: 4,
data: []
}
}
}
};
},
mounted() {
this.getServerData();
},
methods: {
getServerData() {
//
setTimeout(() => {
//
let res = {
categories: ["08/01","08/02","08/03","08/04","08/05","08/06"],
series: [
{
name: "目标值",
data: [35,16,31,33,35,36,]
}
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 500);
},
}
};
</script>
<style scoped>
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
.charts-box {
width: 100%;
height: 100%;
}
</style>

186
pages/userCenter/statistics/comp/comp.scss

@ -1,186 +0,0 @@
.pageBgImg {
width: 100%;
// background: url('http://192.168.1.20:81/zhili/image/20230824/30073140957f4349b6579cb0ff00d4b1.png') #F6F6F6 no-repeat;
// background-size: 100% 492rpx;
padding: 40rpx 28rpx 140rpx 28rpx;
.userInfo {
.tit {
font-size: 48rpx;
color: #fff;
font-weight: 500;
}
.userRow {
align-items: center;
margin-bottom: 20rpx;
.schoolIcon {
width: 28rpx;
height: 28rpx;
}
.schoolName {
font-size: 28rpx;
padding: 20rpx;
max-width: 220rpx;
color: #fff;
}
.tag {
min-width: 112rpx;
height: 44rpx;
padding: 0 20rpx;
background: #82AFDD;
border-radius: 22rpx;
font-size: 20rpx;
color: #fff;
line-height: 44rpx;
text-align: center;
white-space: nowrap;
width: fit-content;
}
}
}
.priceBox {
padding: 32rpx;
color: $themC;
.blueLab {
font-weight: 500;
font-size: 28rpx;
}
.price {
font-size: 56rpx;
font-weight: 600;
padding: 12rpx 0 24rpx 0;
}
.toDay {
padding: 14rpx 0;
border-top: 2rpx dashed #E8E9EC;
border-bottom: 2rpx dashed #E8E9EC;
margin-bottom: 20rpx;
.row {
padding: 16rpx 0;
display: flex;
align-items: center;
.lab {
color: #686B73;
font-size: 24rpx;
width: 210rpx;
}
.val {
font-size: 28rpx;
font-weight: 600;
}
}
}
.flex-b {
.data {
font-size: 24rpx;
color: #363A44;
}
.refresh {
width: 130rpx;
height: 60rpx;
background: rgba(25,137,250,0.1);
border-radius: 8rpx;
border: 2rpx solid #1989FA;
line-height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
.text {
font-size: 28rpx;
}
.icon {
width: 24rpx;
height: 24rpx;
margin-left: 6rpx;
}
}
}
}
.h1 {
margin: 32rpx 0 24rpx 0;
}
.tabs {
display: flex;
justify-content: space-between;
padding-bottom: 24rpx;
.tab {
width: 96rpx;
height: 60rpx;
background: rgba(25,137,250,0.1);
border-radius: 8rpx;
border: 2rpx solid #1989FA;
font-size: 28rpx;
text-align: center;
line-height: 60rpx;
color: $themC;
&.active {
color: #fff;
background-color: $themC;
}
&.long {
min-width: 336rpx;
width: fit-content !important;
}
}
}
.card {
margin-bottom: 20rpx;
.chart {
}
}
.moreBtn {
width: 200rpx;
height: 60rpx;
background: #FFFFFF;
border-radius: 8rpx;
border: 2rpx solid #E8E9EC;
color: #ADADAD;
text-align: center;
line-height: 60rpx;
margin: 32rpx auto 8rpx auto;
}
}
.chart {
width:100%;
height: 390rpx;
background: #FFFFFF;
border-radius: 16rpx;
padding: 28rpx;
}
.toDayServe {
display: flex;
justify-content: space-around;
padding: 20rpx 0;
.serveItem {
width: 33%;
width: 140rpx;
height: 146rpx;
background: rgba(25,137,250,0.06);
border-radius: 12rpx;
text-align: center;
.lab {
font-size: 24rpx;
margin: 18rpx 0 16rpx 0;
}
.val {
font-size: 56rpx;
font-weight: 600;
}
}
}

117
pages/userCenter/statistics/comp/examinCoach.vue

@ -1,117 +0,0 @@
<template>
<view class="content">
<view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.user.nickname }}</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">缺字段</view>
<view class="tag">{{identity}}</view>
</view>
</view>
<view class="card priceBox">
<view class="blueLab">今日待服务</view>
<view class="toDayServe">
<view class="serveItem">
<view class="lab">科目二</view>
<view class="val">6</view>
</view>
<view class="serveItem">
<view class="lab">科目三</view>
<view class="val">10</view>
</view>
</view>
<view class="flex-b">
<view class="data">截止2023/08/08 11:00:00</view>
<view class="refresh">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="h1">服务次数统计</view>
<view class="navBox">
<cardNav :navData="navData" :currentNav="currentNav" @changeNav="changeNav"></cardNav>
</view>
<view class="tab_box">
<tabDate/>
</view>
<view class="card">
<view class="chart">
<columnChart/>
</view>
</view>
<view class="h1">服务学员人数统计</view>
<view class="tab_box">
<tabDate/>
</view>
<view class="card">
<view class="chart">
<columnChart/>
</view>
</view>
<UserTab name ='统计'></UserTab>
</view>
</template>
<script>
import stage from './stage'
import columnChart from './columnChart'
import tabDate from './tabDate'
export default {
components: { stage, columnChart, tabDate },
data() {
return {
value1: '',
currentTab: 1,
currentTab2: 1,
showDatePicker: false,
navData: [
{text: '全部', id: 0},
{text: '科目二', id: 1},
{text: '科目三', id: 2},
],
currentNav: 1
}
},
onLoad() {
},
onShow() {
;
},
methods: {
tabClick2(num) {
this.currentTab2 = num
if(num==4) {
this.showDatePicker = true
}
},
changeNav(num) {
this.currentNav = num
},
// 2
selectDateClick(val) {
console.log(val)
},
}
}
</script>
<style lang="scss" scoped>
@import './comp.scss';
.navBox {
margin-bottom: 24rpx;
}
</style>

76
pages/userCenter/statistics/comp/operateCoach.vue

@ -1,76 +0,0 @@
<template>
<view class="content">
<view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">翔力驾校</view>
<view class="tag">合作教练</view>
</view>
</view>
<view class="card priceBox">
<view class="blueLab">今日已结算金额</view>
<view class="price">36333.66</view>
<view class="flex-b">
<view class="data">截止2023/08/08 11:00:00</view>
<view class="refresh">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="h1"> 结算统计</view>
<view class="tab_box">
<tabDate/>
</view>
<view class="card">
<view class="chart">
<columnChart/>
</view>
</view>
<view class="flex-b">
<view class="h1">结算明细</view>
<moreRight text="更多"/>
</view>
<view class="record">
<view class="card" v-for="(item,index) in 10" :key="index">
<stage/>
</view>
</view>
<view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
<UserTab name ='统计'></UserTab>
</view>
</template>
<script>
import stage from './stage'
import columnChart from './columnChart'
import tabDate from './tabDate'
export default {
components: { stage, columnChart, tabDate },
data() {
return {
value1: '',
currentTab: 1,
}
},
onLoad() {
},
methods: {
tabClick(num) {
this.currentTab = num
},
}
}
</script>
<style lang="scss" scoped>
@import './comp.scss'
</style>

99
pages/userCenter/statistics/comp/principal.vue

@ -1,99 +0,0 @@
<template>
<view class="content">
<view class="userInfo">
<view class="tit">Hi,{{ vuex_userInfo.user.nickname }}</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.user.schoolName}}</view>
<view class="tag">{{ identity }}</view>
</view>
</view>
<view class="card priceBox">
<view class="blueLab">今日已结算金额</view>
<view class="price">36333.66</view>
<view class="toDay">
<view class="row">
<view class="lab">今日学员退款</view>
<view class="val">900</view>
</view>
<view class="row">
<view class="lab">今日代收费</view>
<view class="val">900</view>
</view>
<view class="row">
<view class="lab">今日学员退款</view>
<view class="val">900</view>
</view>
</view>
<view class="flex-b">
<view class="data">截止2023/08/08 11:00:00</view>
<view class="refresh">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="h1"> 收入统计</view>
<view class="tab_box">
<tabDate/>
</view>
<view class="card">
<view class="chart">
<columnChart/>
</view>
</view>
<view class="flex-b">
<view class="h1">收入明细</view>
<moreRight text="更多"/>
</view>
<view class="record">
<view class="card" v-for="(item,index) in 10" :key="index">
<stage/>
</view>
</view>
<view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
<UserTab name ='统计'></UserTab>
</view>
</template>
<script>
import stage from './stage'
import columnChart from './columnChart'
import tabDate from './tabDate'
export default {
components: { stage, columnChart, tabDate },
data() {
return {
value1: '',
currentTab: 1,
showDatePicker: false,
}
},
onLoad() {
},
methods: {
tabClick(num) {
this.currentTab = num
if(num==4) {
this.showDatePicker = true
}
},
// 2
confirmDatePicker(val) {
this.showDatePicker = false
let date = uni.$u.date(val.value, 'yyyy-mm-dd')
console.log(date)
},
}
}
</script>
<style lang="scss" scoped>
@import './comp.scss'
</style>

51
pages/userCenter/statistics/comp/stage.vue

@ -1,51 +0,0 @@
<template>
<view class="li">
<view class="name_row">
<view class="name">张三三</view>
<view class="price">+¥1,130.86</view>
</view>
<view class="stage">
<view>第一阶段</view>
<view>2023/08/08 10:55:21</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.li {
height: 168rpx;
padding: 0 34rpx;
.name_row {
display: flex;
justify-content: space-between;
height: 98rpx;
align-items: center;
.name {
font-weight: 500;
font-size: 32rpx;
}
.price {
font-size: 32rpx;
color: $themC;
font-weight: 500;
}
}
.stage {
display: flex;
justify-content: space-between;
height: 68rpx;
align-items: center;
font-size: 24rpx;
color: #686B73;
border-top: 2rpx dashed #E8E9EC;
;
}
}
</style>

74
pages/userCenter/statistics/comp/tabDate.vue

@ -1,74 +0,0 @@
<template>
<view class="tabBox">
<view class="tabs">
<view class="tab" @click="tabClick(1)" :class="{active: currentTab==1}">按日</view>
<view class="tab" @click="tabClick(2)" :class="{active: currentTab==2}">按月</view>
<!-- <view class="tab" @click="tabClick(3)" :class="{active: currentTab==3}">按年</view> -->
<!-- <view class="tab long" @click="tabClick(4)" :class="{active: currentTab==4}">{{ customDate }}</view> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
currentTab: 1,
showDatePicker: false,
customDate: '自定义日期'
}
},
mounted() {
let numDate = this.$u.utils.getCustomDay(-7)
console.log(numDate)
},
methods: {
tabClick(num) {
this.currentTab = num
if(num==4) {
this.showDatePicker = true
}
},
// 2
selectDateClick(val) {
if(val.date1) {
this.customDate = val.date1
}else {
this.customDate = val.date2+ '至' + val.date3
}
this.showDatePicker = false
}
}
}
</script>
<style lang="scss" scoped>
.tabs {
display: flex;
// justify-content: space-between;
padding-bottom: 24rpx;
.tab {
width: 96rpx;
height: 60rpx;
background: rgba(25, 137, 250, 0.1);
border-radius: 8rpx;
border: 2rpx solid #1989FA;
font-size: 28rpx;
text-align: center;
line-height: 60rpx;
color: $themC;
margin-right: 30rpx;
&.active {
color: #fff;
background-color: $themC;
}
&.long {
min-width: 336rpx;
width: fit-content !important;
}
}
}
</style>

55
pages/userCenter/statistics/comp/topUserInfo.vue

@ -1,55 +0,0 @@
<template>
<view class="userInfo">
<view class="tit">Hi,{{vuex_userInfo.user.nickname}}</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">{{ vuex_userInfo.user.schoolName}}</view>
<view class="tag">{{identity}}</view>
</view>
</view>
</template>
<script>
</script>
<style lang="scss" scoped>
.userInfo {
.tit {
font-size: 48rpx;
color: #fff;
font-weight: 500;
}
.userRow {
align-items: center;
margin-bottom: 20rpx;
.schoolIcon {
width: 28rpx;
height: 28rpx;
}
.schoolName {
font-size: 28rpx;
padding: 20rpx;
max-width: 420rpx;
color: #fff;
}
.tag {
min-width: 112rpx;
height: 44rpx;
background: #82AFDD;
border-radius: 22rpx;
font-size: 20rpx;
color: #fff;
line-height: 44rpx;
text-align: center;
white-space: nowrap;
width: fit-content;
}
}
}
</style>

76
pages/userCenter/statistics/index.vue

@ -1,76 +0,0 @@
<template>
<view class="main">
<view class="userInfo">
<view class="tit">Hi,大乔教练</view>
<view class="flex userRow">
<view class="schoolIcon">
<image src="@/static/images/index/ic_jiaxiao.png" mode=""></image>
</view>
<view class="schoolName oneRowText">翔力驾校</view>
<view class="tag">合作教练</view>
</view>
</view>
<view class="card priceBox">
<view class="blueLab">今日已结算金额</view>
<view class="price">36333.66</view>
<view class="flex-b">
<view class="data">截止2023/08/08 11:00:00</view>
<view class="refresh">
<view class="text">刷新</view>
<view class="icon">
<image src="@/static/images/index/ic_shuaxin.png" mode=""></image>
</view>
</view>
</view>
</view>
<view class="h1"> 结算统计</view>
<view class="tab_box">
<tabDate/>
</view>
<view class="card">
<view class="chart">
<columnChart/>
</view>
</view>
<view class="flex-b">
<view class="h1">结算明细</view>
<moreRight text="更多"/>
</view>
<view class="record">
<view class="card" v-for="(item,index) in 10" :key="index">
<stage/>
</view>
</view>
<view class="moreBtn" @click="$goPage('/pages/indexEntry/settlement/settlement')">查看更多</view>
<UserTab name ='统计'></UserTab>
</view>
</template>
<script>
import stage from './comp/stage'
import columnChart from './comp/columnChart'
import tabDate from './comp/tabDate'
export default {
components: { stage, columnChart, tabDate },
data() {
return {
value1: '',
currentTab: 1,
}
},
onLoad() {
},
methods: {
tabClick(num) {
this.currentTab = num
},
}
}
</script>
<style lang="scss" scoped>
@import './comp/comp.scss'
</style>

3
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: '考场模拟教练',

Loading…
Cancel
Save