guhongwei 2 năm trước cách đây
mục cha
commit
3b54abe0a8
73 tập tin đã thay đổi với 1565 bổ sung255 xóa
  1. 1 1
      pages/match/index.js
  2. 1 1
      pages/school/index.js
  3. 1 1
      pagesMatch/matchAdmin/address/list.js
  4. 1 1
      pagesMatch/matchAdmin/elimmatch/list.js
  5. 1 1
      pagesMatch/matchAdmin/group/list.js
  6. 1 1
      pagesMatch/matchAdmin/match/list.js
  7. 1 1
      pagesMatch/matchAdmin/mtgroup/list.js
  8. 1 1
      pagesMatch/matchAdmin/mtschedule/list.js
  9. 1 1
      pagesMatch/matchAdmin/profit/list.js
  10. 1 1
      pagesMatch/matchAdmin/project/list.js
  11. 1 1
      pagesMatch/matchAdmin/referee/list.js
  12. 1 1
      pagesMatch/matchAdmin/refund/list.js
  13. 1 1
      pagesMatch/matchAdmin/sign/list.js
  14. 1 1
      pagesMatch/matchAdmin/teamapply/list.js
  15. 1 1
      pagesMatch/refereeAdmin/mtschedule/list.js
  16. 1 1
      pagesMatch/refereeAdmin/outschedule/list.js
  17. 1 1
      pagesMatch/userAdmin/bill/list.js
  18. 1 1
      pagesMatch/userAdmin/schedule/list.js
  19. 1 1
      pagesMatch/userAdmin/sign/list.js
  20. 1 1
      pagesMatch/userAdmin/team/list.js
  21. 2 2
      pagesSchool/coaAdmin/course/list.js
  22. 2 2
      pagesSchool/coaAdmin/course/tpStudent.js
  23. 9 4
      pagesSchool/coaAdmin/course/tpStudentadd.js
  24. 2 2
      pagesSchool/coaAdmin/school/list.js
  25. 93 26
      pagesSchool/coaAdmin/stat/lecture.js
  26. 3 2
      pagesSchool/coaAdmin/stat/lecture.json
  27. 19 1
      pagesSchool/coaAdmin/stat/lecture.less
  28. 6 1
      pagesSchool/coaAdmin/stat/lecture.wxml
  29. 15 0
      pagesSchool/coaAdmin/stat/lecture.wxss
  30. 2 2
      pagesSchool/common/lessoninfo.js
  31. 2 2
      pagesSchool/common/lessonstudent.js
  32. 1 1
      pagesSchool/common/lessonstudent.wxml
  33. 2 2
      pagesSchool/schAdmin/coach/list.js
  34. 39 39
      pagesSchool/schAdmin/course/coachlist.js
  35. 2 2
      pagesSchool/schAdmin/course/coachlist.wxml
  36. 2 2
      pagesSchool/schAdmin/course/list.js
  37. 190 25
      pagesSchool/schAdmin/stat/coach.js
  38. 4 2
      pagesSchool/schAdmin/stat/coach.json
  39. 53 1
      pagesSchool/schAdmin/stat/coach.less
  40. 19 1
      pagesSchool/schAdmin/stat/coach.wxml
  41. 42 0
      pagesSchool/schAdmin/stat/coach.wxss
  42. 32 0
      pagesSchool/schAdmin/stat/income.js
  43. 105 1
      pagesSchool/schAdmin/stat/income.less
  44. 39 1
      pagesSchool/schAdmin/stat/income.wxml
  45. 80 0
      pagesSchool/schAdmin/stat/income.wxss
  46. 101 6
      pagesSchool/schAdmin/stat/lesson.js
  47. 3 1
      pagesSchool/schAdmin/stat/lesson.json
  48. 62 1
      pagesSchool/schAdmin/stat/lesson.less
  49. 52 2
      pagesSchool/schAdmin/stat/lesson.wxml
  50. 45 0
      pagesSchool/schAdmin/stat/lesson.wxss
  51. 75 25
      pagesSchool/schAdmin/stat/student.js
  52. 3 2
      pagesSchool/schAdmin/stat/student.json
  53. 10 1
      pagesSchool/schAdmin/stat/student.less
  54. 1 1
      pagesSchool/schAdmin/stat/student.wxml
  55. 8 0
      pagesSchool/schAdmin/stat/student.wxss
  56. 2 2
      pagesSchool/schAdmin/student/list.js
  57. 2 2
      pagesSchool/school/info.js
  58. 2 2
      pagesSchool/stuAdmin/course/list.js
  59. 2 2
      pagesSchool/stuAdmin/money/list.js
  60. 2 2
      pagesSchool/stuAdmin/school/list.js
  61. 93 26
      pagesSchool/stuAdmin/stat/fee.js
  62. 3 2
      pagesSchool/stuAdmin/stat/fee.json
  63. 19 1
      pagesSchool/stuAdmin/stat/fee.less
  64. 6 1
      pagesSchool/stuAdmin/stat/fee.wxml
  65. 16 1
      pagesSchool/stuAdmin/stat/fee.wxss
  66. 223 23
      pagesSchool/stuAdmin/stat/study.js
  67. 3 2
      pagesSchool/stuAdmin/stat/study.json
  68. 19 1
      pagesSchool/stuAdmin/stat/study.less
  69. 6 1
      pagesSchool/stuAdmin/stat/study.wxml
  70. 16 1
      pagesSchool/stuAdmin/stat/study.wxss
  71. 2 2
      pagesSchool/superAdmin/dict/list.js
  72. 2 2
      pagesSchool/superAdmin/school/list.js
  73. 2 2
      pagesSchool/superAdmin/user/list.js

+ 1 - 1
pages/match/index.js

@@ -10,7 +10,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 跳转菜单
     tabPath(e) {

+ 1 - 1
pages/school/index.js

@@ -8,7 +8,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 跳转菜单
     tabPath(e) {

+ 1 - 1
pagesMatch/matchAdmin/address/list.js

@@ -9,7 +9,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/elimmatch/list.js

@@ -20,7 +20,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         statusList: []
     },
     initValidate() {

+ 1 - 1
pagesMatch/matchAdmin/group/list.js

@@ -9,7 +9,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/match/list.js

@@ -11,7 +11,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/mtgroup/list.js

@@ -9,7 +9,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/mtschedule/list.js

@@ -12,7 +12,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         statusList: []
     },
     initValidate() {

+ 1 - 1
pagesMatch/matchAdmin/profit/list.js

@@ -9,7 +9,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         dialog: { title: '查询条件', show: false, type: '1' },
         form: {},
         typeList: bill_type,

+ 1 - 1
pagesMatch/matchAdmin/project/list.js

@@ -13,7 +13,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/referee/list.js

@@ -14,7 +14,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         // 弹框
         dialog: { title: '选择教练', show: false, type: '1' },
     },

+ 1 - 1
pagesMatch/matchAdmin/refund/list.js

@@ -10,7 +10,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/sign/list.js

@@ -10,7 +10,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/matchAdmin/teamapply/list.js

@@ -11,7 +11,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         dialog: { title: '审核申请', show: false, type: '1' },
         form: {},
     },

+ 1 - 1
pagesMatch/refereeAdmin/mtschedule/list.js

@@ -17,7 +17,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         dialog: { title: '赛程上分', show: false, type: '1' },
         //查询
         searchInfo: {},

+ 1 - 1
pagesMatch/refereeAdmin/outschedule/list.js

@@ -17,7 +17,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         dialog: { title: '赛程上分', show: false, type: '1' },
         //查询
         searchInfo: {},

+ 1 - 1
pagesMatch/userAdmin/bill/list.js

@@ -7,7 +7,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/userAdmin/schedule/list.js

@@ -14,7 +14,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         statusList: []
     },
     // 返回

+ 1 - 1
pagesMatch/userAdmin/sign/list.js

@@ -7,7 +7,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
     },
     // 返回
     back: function () { wx.navigateBack({ delta: 1 }) },

+ 1 - 1
pagesMatch/userAdmin/team/list.js

@@ -10,7 +10,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 5,
+        limit: 10,
         statusList: []
     },
     // 返回

+ 2 - 2
pagesSchool/coaAdmin/course/list.js

@@ -10,7 +10,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // 状态列表
         statusList: [],
@@ -30,7 +30,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 详细信息
     toView(e) {

+ 2 - 2
pagesSchool/coaAdmin/course/tpStudent.js

@@ -12,7 +12,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
     },
 
@@ -32,7 +32,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 9 - 4
pagesSchool/coaAdmin/course/tpStudentadd.js

@@ -49,7 +49,7 @@ Page({
         let arr = list.filter((i, index) => index != e.detail.index)
         that.setData({ 'form.file': arr })
     },
-    // 提交登录
+    // 提交
     onSubmit: async function (e) {
         const that = this;
         const params = e.detail.value;
@@ -62,9 +62,14 @@ Page({
         } else {
             let res = await app.$post(`/tempLessonApply`, params);
             if (res.errcode == '0') {
-                let data = JSON.parse(res.data);
-                that.createPayUrl(data.code_url);
-                that.setData({ dialog: { title: '二维码支付', show: true, type: '1' } })
+                if (res.data == 'ok') {
+                    wx.showToast({ title: '临时报名上课成功', icon: 'none' })
+                    that.back()
+                } else {
+                    let data = JSON.parse(res.data);
+                    that.createPayUrl(data.code_url);
+                    that.setData({ dialog: { title: '二维码支付', show: true, type: '1' } })
+                }
             } else {
                 wx.showToast({ title: res.errmsg, icon: 'none' })
             }

+ 2 - 2
pagesSchool/coaAdmin/school/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
     },
     // 跳转菜单
@@ -29,7 +29,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 详细信息
     toView: function (e) {

+ 93 - 26
pagesSchool/coaAdmin/stat/lecture.js

@@ -1,38 +1,111 @@
-const app = getApp();
+const app = getApp()
+import * as echarts from '../../../commpents/ec-canvas/echarts'
+let chart;
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
         frameStyle: { useTop: true, name: '授课情况', leftArrow: true, useBar: false },
+        xdata: [],
+        // 学校
+        zhSchool: '',
+        school_id: '',
+        schoolList: [],
     },
-    // 跳转菜单
+    // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
+    // 选择学校
+    schoolChange: function (e) {
+        const that = this;
+        let data = that.data.schoolList[e.detail.value];
+        if (data) {
+            that.setData({ school_id: data.school_id });
+            that.setData({ zhSchool: data.school_id_name });
+        }
+        that.watchLogin();
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ ec: { onInit: that.initChart } })
+        // 监听用户是否登录
+        await that.watchLogin();
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学校
+                const school = await app.$get(`/rcs`, { coach_id: res.data.info.id });
+                if (school.errcode == '0' && school.total > 0) {
+                    that.setData({ schoolList: school.data })
+                }
+                if (that.data.school_id) {
+                    const arr = await app.$get(`/statistics/coachLesson`, { school_id: that.data.school_id, coach_id: res.data.info.id });
+                    if (arr.errcode == '0') {
+                        that.setData({ xdata: arr.data })
+                        const option = {
+                            series: [{ data: arr.data }],
+                        }
+                        if (chart) chart.setOption(option)
+                    }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    // 饼图
+    initChart(canvas, width, height, dpr) {
+        const that = this;
+        var xdata = that.data.xdata;
+        chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr });
+        canvas.setChart(chart);
+        var option = {
+            tooltip: { trigger: 'item' },
+            legend: {
+                orient: 'vertical',
+                height: 40,
+                padding: 50
+            },
+            series: [
+                {
+                    name: '授课情况',
+                    type: 'pie',
+                    radius: '50%',
+                    data: xdata,
+                    emphasis: {
+                        itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' }
+                    },
+                    label: {
+                        normal: {
+                            show: true,
+                            formatter: '{b}({c}节课)'
+                        }
+                    }
+                }
+            ]
+        };
+        chart.setOption(option, true);
+        return chart;
     },
-
+    /**
+    * 生命周期函数--监听页面初次渲染完成
+    */
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        const that = this;
-
     },
-
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -54,17 +127,11 @@ Page({
 
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage: function () {
+    onShareAppMessage: function (res) {
 
-    }
+    },
 })

+ 3 - 2
pagesSchool/coaAdmin/stat/lecture.json

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+      "mobile-main": "/commpents/mobile-frame/index",
+      "ec-canvas": "/commpents/ec-canvas/ec-canvas"
     }
-}
+  } 

+ 19 - 1
pagesSchool/coaAdmin/stat/lecture.less

@@ -1 +1,19 @@
-@import (css) "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .top {
+        font-size: var(--font14Size);
+        background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+        padding: 2vw;
+        text-align: center;
+        color: var(--mainColor);
+    }
+
+    ec-canvas {
+        width: 100%;
+        height: 100%;
+    }
+}

+ 6 - 1
pagesSchool/coaAdmin/stat/lecture.wxml

@@ -1,5 +1,10 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>授课情况</view>
+        <view class="top">
+            <picker mode="selector" bindchange="schoolChange" name="school_id" value="{{school_id}}" range="{{schoolList}}" range-key="school_id_name">
+                <view class="picker">{{zhSchool||'请选择学校'}}</view>
+            </picker>
+        </view>
+        <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>
     </view>
 </mobile-main>

+ 15 - 0
pagesSchool/coaAdmin/stat/lecture.wxss

@@ -1 +1,16 @@
 @import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .top {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+  padding: 2vw;
+  text-align: center;
+  color: var(--mainColor);
+}
+.main ec-canvas {
+  width: 100%;
+  height: 100%;
+}

+ 2 - 2
pagesSchool/common/lessoninfo.js

@@ -22,7 +22,7 @@ Page({
         studentList: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // 字典表
         //状态
@@ -165,7 +165,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 分页
     toPage: function () {

+ 2 - 2
pagesSchool/common/lessonstudent.js

@@ -12,7 +12,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         is_payList: is_pay,
     },
@@ -31,7 +31,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 签到
     toSign(e) {

+ 1 - 1
pagesSchool/common/lessonstudent.wxml

@@ -28,7 +28,7 @@
                             </view>
                         </view>
                         <view class="btn">
-                            <button type="primary" size="mini" bindtap="toSign" data-item="{{item}}" wx:if="{{item.is_sign=='0'&&is_pay=='1'}}">签到</button>
+                            <button type="primary" size="mini" bindtap="toSign" data-item="{{item}}" wx:if="{{item.lesson_id_status=='3'&&item.is_pay=='1'&&item.is_sign=='0'}}">签到</button>
                         </view>
                     </view>
                 </view>

+ 2 - 2
pagesSchool/schAdmin/coach/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // dialog弹框
         dialog: { title: '账号绑定', show: false, type: '1' },
@@ -33,7 +33,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 39 - 39
pagesSchool/schAdmin/course/coachlist.js

@@ -13,7 +13,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // dialog弹框
         dialog: { title: '添加教练', show: false, type: '1' },
@@ -42,41 +42,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
-    },
-    // 信息维护
-    async toEdit(e) {
-        const that = this;
-        let { item } = e.currentTarget.dataset;
-        that.clearPage();
-        let res = await app.$get(`/lessonCoach/${item._id}`);
-        if (res.errcode == '0') {
-            that.setData({ form: res.data });
-            that.setData({ dialog: { title: '添加教练', show: true, type: '1' } })
-        } else {
-            wx.showToast({ title: res.errmsg, icon: 'none' })
-        }
-    },
-    // 删除信息
-    async toDel(e) {
-        const that = this;
-        const { item } = e.currentTarget.dataset;
-        wx.showModal({
-            title: '提示',
-            content: '是否确认删除该条数据?',
-            async success(res) {
-                if (res.confirm) {
-                    const arr = await app.$delete(`/lessonCoach/${item.id}`);
-                    if (arr.errcode == '0') {
-                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
-                        that.clearPage();
-                        that.watchLogin()
-                    } else {
-                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
-                    }
-                }
-            }
-        })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {
@@ -84,14 +50,13 @@ Page({
         that.clearPage();
         that.setData({ dialog: { title: '添加教练', show: true, type: '1' } })
     },
-
     // 选择教练
     coachChange(e) {
         const that = this;
         let data = that.data.coachList[e.detail.value];
         if (data) {
             that.setData({ 'form.coach_id': data.coach_id });
-            that.setData({ 'form.zhcoach': data.coach_id_name });
+            that.setData({ 'form.zhCoach': data.coach_id_name });
         }
     },
     // 提交保存
@@ -121,7 +86,42 @@ Page({
         that.setData({ dialog: { title: '添加教练', show: false, type: '1' } })
         that.search()
     },
-
+    // 信息维护
+    async toEdit(e) {
+        const that = this;
+        let { item } = e.currentTarget.dataset;
+        that.clearPage();
+        let res = await app.$get(`/lessonCoach/${item._id}`);
+        if (res.errcode == '0') {
+            let coach = that.data.coachList.find((i) => i.coach_id == res.data.coach_id);
+            if (coach) res.data.zhCoach = coach.coach_id_name;
+            that.setData({ form: res.data });
+            that.setData({ dialog: { title: '添加教练', show: true, type: '1' } })
+        } else {
+            wx.showToast({ title: res.errmsg, icon: 'none' })
+        }
+    },
+    // 删除信息
+    async toDel(e) {
+        const that = this;
+        const { item } = e.currentTarget.dataset;
+        wx.showModal({
+            title: '提示',
+            content: '是否确认删除该条数据?',
+            async success(res) {
+                if (res.confirm) {
+                    const arr = await app.$delete(`/lessonCoach/${item.id}`);
+                    if (arr.errcode == '0') {
+                        wx.showToast({ title: `删除信息成功`, icon: 'success', duration: 2000 })
+                        that.clearPage();
+                        that.watchLogin()
+                    } else {
+                        wx.showToast({ title: `${arr.errmsg}`, icon: 'error', duration: 2000 })
+                    }
+                }
+            }
+        })
+    },
     /**
      * 生命周期函数--监听页面加载
      */

+ 2 - 2
pagesSchool/schAdmin/course/coachlist.wxml

@@ -37,14 +37,14 @@
                     <view class="label">教练:</view>
                     <view class="value">
                         <picker mode="selector" bindchange="coachChange" name="coach_id" value="{{form.coach_id}}" range="{{coachList}}" range-key="coach_id_name">
-                            <view class="picker">{{form.zhcoach||'请选择教练'}}</view>
+                            <view class="picker">{{form.zhCoach||'请选择教练'}}</view>
                         </picker>
                     </view>
                 </view>
                 <view class="content">
                     <view class="label">课时费:</view>
                     <view class="value">
-                        <input name="money" type="number" value="{{form.money}}" placeholder="请输入金额" />
+                        <input name="money" type="digit" value="{{form.money}}" placeholder="请输入金额" />
                     </view>
                 </view>
                 <view class="btn">

+ 2 - 2
pagesSchool/schAdmin/course/list.js

@@ -10,7 +10,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // 状态列表
         statusList: [],
@@ -30,7 +30,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 190 - 25
pagesSchool/schAdmin/stat/coach.js

@@ -1,38 +1,209 @@
-const app = getApp();
+const app = getApp()
+import * as echarts from '../../../commpents/ec-canvas/echarts'
+let chart;
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
         frameStyle: { useTop: true, name: '教练统计', leftArrow: true, useBar: false },
+        // 选中
+        tabs: {
+            active: '0',
+            menu: [
+                { title: '教练出勤率', active: '0' },
+                { title: '教练收入情况', active: '1' },
+            ]
+        },
+        // 教练
+        zhcoach: '',
+        coach_id: '',
+        coachList: [],
+        value: [],
+        date: [],
     },
-    // 跳转菜单
+    // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
+    // 选项卡选择
+    tabsChange: function (e) {
+        const that = this;
+        let data = e.detail;
+        that.setData({ 'tabs.active': data.active })
+        that.watchLogin();
+    },
+    // 选择教练
+    coachChange: async function (e) {
+        const that = this;
+        let data = that.data.coachList[e.detail.value];
+        if (data) {
+            that.setData({ coach_id: data.coach_id });
+            that.setData({ zhcoach: data.coach_id_name });
+        }
+        await that.watchLogin();
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ ec: { onInit: that.initChart } })
+        // 监听用户是否登录
+        await that.watchLogin();
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 教练
+                const abb = await app.$get(`/rcs`, { school_id: res.data.info.id });
+                if (abb.errcode == '0' && abb.total > 0) {
+                    that.setData({ coachList: abb.data })
+                }
+                if (that.data.coach_id) {
+                    if (that.data.tabs.active == '0') {
+                        const arr = await app.$get(`/statistics/schoolSignCoach`, { school_id: res.data.info.id, coach_id: that.data.coach_id });
+                        if (arr.errcode == '0') {
+                            var date = []
+                            var value = []
+                            arr.data.map(function (item) {
+                                var m = ''; m = item.m; date.push(m)
+                                var sevm = '';
+                                sevm = item.value.split('%').join('')
+                                value.push(sevm)
+                            })
+                            that.setData({ date: date })
+                            that.setData({ value: value })
+                            const option = {
+                                xAxis: [{ data: date, }],
+                                yAxis: [{
+                                    axisLabel: {
+                                        formatter: '{value}%',
+                                    },
+                                }],
+                                series: [{
+                                    data: value,
+                                    itemStyle: {
+                                        normal: {
+                                            label: { show: true, formatter: '{c}%', }
+                                        }
+                                    },
+                                }],
+                                tooltip: [{ formatter: '{b}月:出勤率{c}%' }]
+                            }
+                            if (chart) chart.setOption(option)
+                        }
+                    } else {
+                        const arr = await app.$get(`/statistics/schoolCoachIn`, { school_id: res.data.info.id, coach_id: that.data.coach_id });
+                        if (arr.errcode == '0') {
+                            var date = []
+                            var value = []
+                            arr.data.map(function (item) {
+                                var m = ''; m = item.m; date.push(m)
+                                var sevm = ''; sevm = item.total; value.push(sevm)
+                            })
+                            that.setData({ date: date })
+                            that.setData({ value: value })
+                            const option = {
+                                xAxis: [{ data: date, }],
+                                yAxis: [{
+                                    axisLabel: {
+                                        formatter: '{value}元',
+                                    },
+                                }],
+                                series: [{
+                                    data: value,
+                                    itemStyle: {
+                                        normal: {
+                                            label: { show: true, formatter: '{c}元', }
+                                        }
+                                    },
+                                }],
+                                tooltip: [{ formatter: '{b}月:收入{c}元' }]
+                            }
+                            if (chart) chart.setOption(option)
+                        }
+                    }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
+    // 折线图
+    initChart(canvas, width, height, dpr) {
+        const that = this;
+        var date = that.data.date;
+        var value = that.data.value;
+        chart = echarts.init(canvas, null, {
+            width: width,
+            height: height,
+            devicePixelRatio: dpr
+        });
+        canvas.setChart(chart);
+        var option = {
+            grid: {
+                left: 20,
+                right: 20,
+                bottom: 145,
+                top: 60,
+                containLabel: true
+            },
+            tooltip: {
+                show: true,
+                trigger: 'axis',
+                formatter: '{b}:{c}' // 格式化数值百分比输出
+            },
+            xAxis: {
+                type: 'category',
+                boundaryGap: false,
+                data: date,
+                // 设置x轴线的属性
+                //使x轴文字显示全
+                axisLabel: {
+                    formatter: '{value}月',
+                    show: true, interval: 0,
+                },
+            },
+            yAxis: {
+                x: 'center',
+                type: 'value',
+                splitLine: {
+                    lineStyle: { type: 'dashed' }
+                },
+            },
+            series: [
+                {
+                    type: 'line',
+                    smooth: true,
+                    data: value,
+                    itemStyle: {
+                        normal: {
+                            color: '#ff7f50',
+                            lineStyle: { color: '#5470C6' },
+                            label: { show: true }
+                        }
+                    },
+                }
+            ]
+        };
+        chart.setOption(option, true);
+        return chart;
+    },
+    /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        const that = this;
 
     },
-
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -54,17 +225,11 @@ Page({
 
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage: function () {
+    onShareAppMessage: function (res) {
 
-    }
+    },
 })

+ 4 - 2
pagesSchool/schAdmin/stat/coach.json

@@ -1,6 +1,8 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+      "mobile-main": "/commpents/mobile-frame/index",
+      "ec-canvas": "/commpents/ec-canvas/ec-canvas",
+      "s-tab": "/commpents/tabs/index"
     }
-}
+  }

+ 53 - 1
pagesSchool/schAdmin/stat/coach.less

@@ -1 +1,53 @@
-@import "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .one {
+        padding: 0 2vw;
+
+        .top {
+            margin: 2vw 5vw;
+            background-color: rgb(79, 165, 112);
+            padding: 2vw;
+            text-align: center;
+            color: #fff;
+            font-size: 14px;
+        }
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+        height: 83vh;
+
+        .container {
+            position: absolute;
+            top: 0;
+            left: 0;
+            right: 0;
+            bottom: 0;
+
+            ec-canvas {
+                width: 100%;
+                height: 100%;
+            }
+        }
+
+
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 19 - 1
pagesSchool/schAdmin/stat/coach.wxml

@@ -1,5 +1,23 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>教练统计</view>
+        <view class="one">
+            <view class="top">
+                <picker mode="selector" bindchange="coachChange" name="coach_id" value="{{coach_id}}" range="{{coachList}}" range-key="coach_id_name">
+                    <view class="picker">{{zhcoach||'请选择教练'}}</view>
+                </picker>
+            </view>
+            <view class="foot">
+                <s-tab tabs="{{tabs}}" bind:tabsChange="tabsChange"></s-tab>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    <view class="container">
+                        <ec-canvas id="mychart" canvas-id="mychart" ec="{{ ec }}"></ec-canvas>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </mobile-main>

+ 42 - 0
pagesSchool/schAdmin/stat/coach.wxss

@@ -1 +1,43 @@
 @import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .one {
+  padding: 0 2vw;
+}
+.main .one .top {
+  margin: 2vw 5vw;
+  background-color: #4fa570;
+  padding: 2vw;
+  text-align: center;
+  color: #fff;
+  font-size: 14px;
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+  height: 83vh;
+}
+.main .two .container {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.main .two .container ec-canvas {
+  width: 100%;
+  height: 100%;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 32 - 0
pagesSchool/schAdmin/stat/income.js

@@ -5,6 +5,38 @@ Page({
      */
     data: {
         frameStyle: { useTop: true, name: '收入统计', leftArrow: true, useBar: false },
+        numList: [
+            // {
+            //     title: '本月',
+            //     type: '0',
+            //     money: 10
+            // },
+            // {
+            //     title: '近三月',
+            //     type: '1',
+            //     money: 10
+            // },
+            // {
+            //     title: '半年内',
+            //     type: '2',
+            //     money: 10
+            // },
+            // {
+            //     title: '一年内',
+            //     type: '3',
+            //     money: 10
+            // },
+        ],
+        dataList: [
+            // {
+            //     time: '2022-01-01 10:10:10',
+            //     name: '课程名称',
+            //     zStudent: 10,
+            //     lStudent: 10,
+            //     money: 0.01,
+            //     totalMoney: 0.1
+            // }
+        ]
     },
     // 跳转菜单
     back(e) {

+ 105 - 1
pagesSchool/schAdmin/stat/income.less

@@ -1 +1,105 @@
-@import "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    height: 91vh;
+
+    .one {
+        display: flex;
+        justify-content: space-around;
+        margin: 0 0 2vw 0;
+
+        .list {
+            width: 22vw;
+            height: 21vw;
+            background-color: var(--f1Color);
+            box-shadow: 0 0 5px var(--f85Color);
+            margin: 2vw 2vw 2vw 2vw;
+            border-radius: 90px;
+            text-align: center;
+
+            .type {
+                font-size: 14px;
+                color: #000;
+                margin: 5vw 0 1vw 0;
+            }
+
+            .money {
+                text {
+                    font-size: 16px;
+                    font-weight: bold;
+                    color: #ff0000;
+                }
+            }
+        }
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+
+        .list {
+            background-color: #fff;
+            padding: 2vw;
+            margin: 0 2vw 2vw 2vw;
+            border-radius: 5px;
+
+            .totalMoney {
+                text {
+                    font-size: 18px;
+                    font-weight: bold;
+                    color: #ff0000;
+                    margin: 0 0 2vw 0;
+                }
+            }
+
+            .other_1 {
+                font-size: 16px;
+                margin: 0 0 1vw 0;
+                color: #858585;
+
+                text:last-child {
+                    color: #000;
+                }
+            }
+
+            .money {
+                text:last-child {
+                    color: #ff0000;
+                }
+            }
+
+            .num {
+                display: flex;
+                justify-content: space-around;
+
+                .num_1 {
+                    font-size: 16px;
+                    margin: 0 0 1vw 0;
+                    color: #858585;
+
+                    text:last-child {
+                        color: #000;
+                    }
+                }
+            }
+
+        }
+
+        .list:last-child {
+            margin: 0 2vw;
+        }
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}

+ 39 - 1
pagesSchool/schAdmin/stat/income.wxml

@@ -1,5 +1,43 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>收入统计</view>
+        <view class="one">
+            <view class="list" wx:for="{{numList}}" wx:key="index" bindtap="toSearch" data-item="{{item}}">
+                <view class="type">{{item.title}}</view>
+                <view class="money"><text>¥{{item.money}}</text></view>
+            </view>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view" bindscrolltolower="toPage">
+                <view class="list-scroll-view">
+                    <view class="list" wx:for="{{dataList}}" wx:key="indexs">
+                        <view class="totalMoney">
+                            <text>¥{{item.totalMoney}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>课程时间:</text>
+                            <text>{{item.time}}</text>
+                        </view>
+                        <view class="other_1">
+                            <text>课程名称:</text>
+                            <text>{{item.name}}</text>
+                        </view>
+                        <view class="other_1 money">
+                            <text>课程费:</text>
+                            <text>¥{{item.money}}</text>
+                        </view>
+                        <view class="num">
+                            <view class="num_1">
+                                <text>正式学员:</text>
+                                <text>{{item.zStudent}}</text>
+                            </view>
+                            <view class="num_1">
+                                <text>临时学员:</text>
+                                <text>{{item.lStudent}}</text>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </scroll-view>
+        </view>
     </view>
 </mobile-main>

+ 80 - 0
pagesSchool/schAdmin/stat/income.wxss

@@ -1 +1,81 @@
 @import "/app.wxss";
+.main {
+  height: 91vh;
+}
+.main .one {
+  display: flex;
+  justify-content: space-around;
+  margin: 0 0 2vw 0;
+}
+.main .one .list {
+  width: 22vw;
+  height: 21vw;
+  background-color: var(--f1Color);
+  box-shadow: 0 0 5px var(--f85Color);
+  margin: 2vw 2vw 2vw 2vw;
+  border-radius: 90px;
+  text-align: center;
+}
+.main .one .list .type {
+  font-size: 14px;
+  color: #000;
+  margin: 5vw 0 1vw 0;
+}
+.main .one .list .money text {
+  font-size: 16px;
+  font-weight: bold;
+  color: #ff0000;
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+}
+.main .two .list {
+  background-color: #fff;
+  padding: 2vw;
+  margin: 0 2vw 2vw 2vw;
+  border-radius: 5px;
+}
+.main .two .list .totalMoney text {
+  font-size: 18px;
+  font-weight: bold;
+  color: #ff0000;
+  margin: 0 0 2vw 0;
+}
+.main .two .list .other_1 {
+  font-size: 16px;
+  margin: 0 0 1vw 0;
+  color: #858585;
+}
+.main .two .list .other_1 text:last-child {
+  color: #000;
+}
+.main .two .list .money text:last-child {
+  color: #ff0000;
+}
+.main .two .list .num {
+  display: flex;
+  justify-content: space-around;
+}
+.main .two .list .num .num_1 {
+  font-size: 16px;
+  margin: 0 0 1vw 0;
+  color: #858585;
+}
+.main .two .list .num .num_1 text:last-child {
+  color: #000;
+}
+.main .two .list:last-child {
+  margin: 0 2vw;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}

+ 101 - 6
pagesSchool/schAdmin/stat/lesson.js

@@ -5,12 +5,77 @@ Page({
      */
     data: {
         frameStyle: { useTop: true, name: '课程统计', leftArrow: true, useBar: false },
+        user: {},
+        list: [],
+        total: 0,
+        skip: 0,
+        limit: 10,
+        page: 0,
+        // dialog弹框
+        dialog: { title: '筛选条件', show: false, type: '1' },
+        form: {},
+        // 课程信息
+        lessonList: [],
+        // 学生
+        studentList: []
     },
     // 跳转菜单
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
+    // 清空列表
+    clearPage() {
+        const that = this;
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
+    },
+    // 筛选条件
+    toSearch() {
+        const that = this;
+        that.clearPage();
+        that.setData({ dialog: { title: '筛选条件', show: true, type: '1' } })
+    },
+    // 选择课程
+    lessonChange(e) {
+        const that = this;
+        let data = that.data.lessonList[e.detail.value];
+        console.log(data);
+        if (data) that.setData({ 'form.lesson_id': data.id, 'form.lesson_title': data.title })
+    },
+    // 选择学员
+    stuChange(e) {
+        const that = this;
+        let data = that.data.studentList[e.detail.value];
+        if (data) that.setData({ 'form.student_id': data.student_id, 'form.student_id_name': data.student_id_name })
+    },
+    // 时间确定选择
+    datetimeChange: function (e) {
+        const that = this;
+        that.setData({ [`form.${e.detail.name}`]: e.detail.datetime });
+    },
+    // 提交查询
+    onSubmit(e) {
+        const that = this;
+        // let form = that.data.form;
+        // const params = e.detail.value;
+        // params.time_start = form.time_start;
+        // params.time_end = form.time_end;
+        that.search()
+    },
+    // 关闭弹框
+    toClose: function () {
+        const that = this;
+        that.clearPage();
+        that.setData({ form: {} })
+        that.setData({ dialog: { title: '筛选条件', show: false, type: '1' } })
+        that.search()
+    },
+    // 重置查询
+    onReset(e) {
+        const that = this;
+        that.clearPage()
+        that.setData({ form: {} })
+        that.search();
+    },
     /**
      * 生命周期函数--监听页面加载
      */
@@ -27,17 +92,47 @@ Page({
     /**
      * 生命周期函数--监听页面显示
      */
-    onShow: function () {
+    onShow: async function () {
         const that = this;
-
+        // 监听用户登录
+        await that.watchLogin();
+    },
+    watchLogin() {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({ user: res.data })
+                await that.searchOther()
+                await that.search()
+
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    async search() {
+        const that = this;
+        console.log(that.data.form);
+    },
+    async searchOther() {
+        const that = this;
+        let user = that.data.user;
+        let res;
+        // 查詢課程信息
+        res = await app.$get(`/lesson`, { school_id: user.info.id });
+        if (res.errcode == '0') { that.setData({ lessonList: res.data }) }
+        // 查询学校学生
+        res = await app.$get(`/rss`, { school_id: user.info.id })
+        if (res.errcode == '0') { that.setData({ studentList: res.data }) }
     },
-
-
     /**
      * 生命周期函数--监听页面隐藏
      */
     onHide: function () {
-
+        const that = this;
+        that.clearPage();
     },
 
     /**

+ 3 - 1
pagesSchool/schAdmin/stat/lesson.json

@@ -1,6 +1,8 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+        "mobile-main": "/commpents/mobile-frame/index",
+        "dialog": "/commpents/dialog/index",
+        "datatime-picker": "/commpents/datetime-picker/index"
     }
 }

+ 62 - 1
pagesSchool/schAdmin/stat/lesson.less

@@ -1 +1,62 @@
-@import "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    .one {
+        padding: 2vw;
+        border-bottom: 1px solid #858585;
+        margin: 0 0 2vw 0;
+        text-align: center;
+    }
+
+    .two {
+        position: relative;
+        flex-grow: 1;
+    }
+}
+
+.scroll-view {
+    position: absolute;
+    top: 0;
+    left: 0;
+    right: 0;
+    bottom: 0;
+
+    .list-scroll-view {
+        display: flex;
+        flex-direction: column;
+    }
+}
+
+.dialog {
+    .dialog_1 {
+        .content {
+            display: flex;
+            flex-direction: row;
+            border-bottom: 1px dashed var(--f1Color);
+            padding: 2vw 0;
+            margin: 0 2vw 2vw 2vw;
+
+            .value {
+                flex-grow: 1;
+                color: var(--blackColor);
+
+                textarea {
+                    width: 100%;
+                    height: 120px;
+                }
+
+            }
+        }
+
+        .btn {
+            text-align: center;
+            margin: 5vw 0 0 0;
+
+            button {
+                width: 40vw;
+                margin: 0 2vw;
+                padding: 1vw 0;
+            }
+        }
+    }
+}

+ 52 - 2
pagesSchool/schAdmin/stat/lesson.wxml

@@ -1,5 +1,55 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>课程统计</view>
+        <view class="one">
+            <button type="primary" size="mini" bindtap="toSearch">筛选条件</button>
+        </view>
+        <view class="two">
+            <scroll-view scroll-y="true" class="scroll-view">
+                <view class="list-scroll-view">
+                    列表
+                </view>
+            </scroll-view>
+        </view>
     </view>
-</mobile-main>
+</mobile-main>
+<dialog dialog="{{dialog}}" bind:toClose="toClose">
+    <view slot="info" class="dialog">
+        <view class="dialog_1" wx:if="{{dialog.type=='1'}}">
+            <form catchsubmit="onSubmit" catchreset="onReset">
+                <view class="content">
+                    <view class="label">课程:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="lessonChange" name="lesson_id" value="{{form.lesson_id}}" range="{{lessonList}}" range-key="title">
+                            <view class="picker">{{form.lesson_title||'请选择课程'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">学员:</view>
+                    <view class="value">
+                        <picker mode="selector" bindchange="stuChange" name="student_id" value="{{form.student_id}}" range="{{studentList}}" range-key="student_id_name">
+                            <view class="picker">{{form.student_id_name||'请选择学员'}}</view>
+                        </picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">开始时间:</view>
+                    <view class="value">
+                        <datatime-picker datetime="{{form.time_start}}" name="time_start" bind:datetimeChange="datetimeChange"></datatime-picker>
+                    </view>
+                </view>
+                <view class="content">
+                    <view class="label">结束时间:</view>
+                    <view class="value">
+                        <datatime-picker datetime="{{form.time_end}}" name="time_end" bind:datetimeChange="datetimeChange"></datatime-picker>
+                    </view>
+                </view>
+
+                <view class="btn">
+                    <button type="primary" size="mini" formType="submit">提交查询</button>
+                    <button type="warn" size="mini" formType="reset">重置查询</button>
+                </view>
+            </form>
+        </view>
+    </view>
+</dialog>

+ 45 - 0
pagesSchool/schAdmin/stat/lesson.wxss

@@ -1 +1,46 @@
 @import "/app.wxss";
+.main .one {
+  padding: 2vw;
+  border-bottom: 1px solid #858585;
+  margin: 0 0 2vw 0;
+  text-align: center;
+}
+.main .two {
+  position: relative;
+  flex-grow: 1;
+}
+.scroll-view {
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+}
+.scroll-view .list-scroll-view {
+  display: flex;
+  flex-direction: column;
+}
+.dialog .dialog_1 .content {
+  display: flex;
+  flex-direction: row;
+  border-bottom: 1px dashed var(--f1Color);
+  padding: 2vw 0;
+  margin: 0 2vw 2vw 2vw;
+}
+.dialog .dialog_1 .content .value {
+  flex-grow: 1;
+  color: var(--blackColor);
+}
+.dialog .dialog_1 .content .value textarea {
+  width: 100%;
+  height: 120px;
+}
+.dialog .dialog_1 .btn {
+  text-align: center;
+  margin: 5vw 0 0 0;
+}
+.dialog .dialog_1 .btn button {
+  width: 40vw;
+  margin: 0 2vw;
+  padding: 1vw 0;
+}

+ 75 - 25
pagesSchool/schAdmin/stat/student.js

@@ -1,38 +1,94 @@
-const app = getApp();
+const app = getApp()
+import * as echarts from '../../../commpents/ec-canvas/echarts'
+let chart;
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
         frameStyle: { useTop: true, name: '学员统计', leftArrow: true, useBar: false },
+        piedata: []
     },
-    // 跳转菜单
+    // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ ec: { onInit: that.initChart } })
+        // 监听用户是否登录
+        await that.watchLogin();
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                const arr = await app.$get(`/statistics/schoolStudentAge`, { school_id: res.data.info.id });
+                if (arr.errcode == '0') {
+                    that.setData({ piedata: arr.data })
+                    const option = {
+                        series: [{ data: arr.data }],
+                    }
+                    if (chart) chart.setOption(option)
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
-
+    // 饼图
+    initChart(canvas, width, height, dpr) {
+        let that = this;
+        var piedata = that.data.piedata;
+        chart = echarts.init(canvas, null, {
+            width: width,
+            height: height,
+            devicePixelRatio: dpr
+        });
+        canvas.setChart(chart);
+        var option = {
+            backgroundColor: "#ffffff",
+            series: [{
+                label: {
+                    normal: {
+                        show: true,
+                        formatter: '{b}:{c}人' + '\n\r' + '({d}%)'
+                    },
+                },
+                type: 'pie',
+                center: ['50%', '50%'],
+                radius: ['20%', '40%'],
+                data: piedata
+            }],
+            legend: {
+                orient: 'vertical',
+                height: 40,
+                padding: 50,
+            },
+            tooltip: {
+                trigger: 'item',
+                formatter: '{b}:{c}人' + '\n\r' + '({d}%)' // 格式化数值百分比输出
+            },
+        };
+        chart.setOption(option, true);
+        return chart;
+    },
+    /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        const that = this;
 
     },
-
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -54,17 +110,11 @@ Page({
 
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage: function () {
+    onShareAppMessage: function (res) {
 
-    }
+    },
 })

+ 3 - 2
pagesSchool/schAdmin/stat/student.json

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+      "mobile-main": "/commpents/mobile-frame/index",
+      "ec-canvas": "/commpents/ec-canvas/ec-canvas"
     }
-}
+  } 

+ 10 - 1
pagesSchool/schAdmin/stat/student.less

@@ -1 +1,10 @@
-@import "/app.wxss";
+@import (css) "/app.wxss";
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+  
+    ec-canvas {
+      width: 100%;
+      height: 100%;
+    }
+  }

+ 1 - 1
pagesSchool/schAdmin/stat/student.wxml

@@ -1,5 +1,5 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>学员统计</view>
+        <ec-canvas id="myechart" canvas-id="mychart" ec="{{ ec }}"></ec-canvas>
     </view>
 </mobile-main>

+ 8 - 0
pagesSchool/schAdmin/stat/student.wxss

@@ -1 +1,9 @@
 @import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main ec-canvas {
+  width: 100%;
+  height: 100%;
+}

+ 2 - 2
pagesSchool/schAdmin/student/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // dialog弹框
         dialog: { title: '账号绑定', show: false, type: '1' },
@@ -34,7 +34,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 2 - 2
pagesSchool/school/info.js

@@ -29,7 +29,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 100,
+        limit: 10,
         // 字典表
         // 教练等级
         levelList: [],
@@ -47,7 +47,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ teacherList: [], studentList: [], lessonList: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ teacherList: [], studentList: [], lessonList: [], skip: 0, limit: 10, page: 0 })
     },
     // 选项卡选择
     tabsChange: function (e) {

+ 2 - 2
pagesSchool/stuAdmin/course/list.js

@@ -11,7 +11,7 @@ Page({
         total: 0,
         page: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         // 支付状态
         is_payList: is_pay,
         // 课程状态
@@ -22,7 +22,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     //详细信息
     toView: function (e) {

+ 2 - 2
pagesSchool/stuAdmin/money/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // dialog弹框
         dialog: { title: '充值', show: false, type: '1' },
@@ -30,7 +30,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 充值
     toMoney(e) {

+ 2 - 2
pagesSchool/stuAdmin/school/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
     },
     // 跳转菜单
@@ -29,7 +29,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 详细信息
     toView: function (e) {

+ 93 - 26
pagesSchool/stuAdmin/stat/fee.js

@@ -1,38 +1,111 @@
-const app = getApp();
+const app = getApp()
+import * as echarts from '../../../commpents/ec-canvas/echarts'
+let chart;
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
         frameStyle: { useTop: true, name: '消费情况', leftArrow: true, useBar: false },
+        xdata: [],
+        // 学校
+        zhSchool: '',
+        school_id: '',
+        schoolList: [],
     },
-    // 跳转菜单
+    // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
+    // 选择学校
+    schoolChange: function (e) {
+        const that = this;
+        let data = that.data.schoolList[e.detail.value];
+        if (data) {
+            that.setData({ school_id: data.school_id });
+            that.setData({ zhSchool: data.school_id_name });
+        }
+        that.watchLogin();
+    },
     /**
      * 生命周期函数--监听页面加载
      */
-    onLoad: function (options) {
-
+    onLoad: async function (options) {
+        const that = this;
+        that.setData({ ec: { onInit: that.initChart } })
+        // 监听用户是否登录
+        await that.watchLogin();
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                // 学校
+                const school = await app.$get(`/rss`, { student_id: res.data.info.id });
+                if (school.errcode == '0' && school.total > 0) {
+                    that.setData({ schoolList: school.data })
+                }
+                if (that.data.school_id) {
+                    const arr = await app.$get(`/statistics/studentPay`, { school_id: that.data.school_id, student_id: res.data.info.id });
+                    if (arr.errcode == '0') {
+                        that.setData({ xdata: arr.data })
+                        const option = {
+                            series: [{ data: arr.data }],
+                        }
+                        if (chart) chart.setOption(option)
+                    }
+                }
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
+    },
+    // 饼图
+    initChart(canvas, width, height, dpr) {
+        const that = this;
+        var xdata = that.data.xdata;
+        chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr });
+        canvas.setChart(chart);
+        var option = {
+            tooltip: { trigger: 'item' },
+            legend: {
+                orient: 'vertical',
+                height: 40,
+                padding: 50
+            },
+            series: [
+                {
+                    name: '课时费',
+                    type: 'pie',
+                    radius: '50%',
+                    data: xdata,
+                    emphasis: {
+                        itemStyle: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' }
+                    },
+                    label: {
+                        normal: {
+                            show: true,
+                            formatter: '{b}({c}元)'
+                        }
+                    }
+                }
+            ]
+        };
+        chart.setOption(option, true);
+        return chart;
     },
-
+    /**
+    * 生命周期函数--监听页面初次渲染完成
+    */
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
-        const that = this;
-
     },
-
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -54,17 +127,11 @@ Page({
 
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage: function () {
+    onShareAppMessage: function (res) {
 
-    }
+    },
 })

+ 3 - 2
pagesSchool/stuAdmin/stat/fee.json

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+      "mobile-main": "/commpents/mobile-frame/index",
+      "ec-canvas": "/commpents/ec-canvas/ec-canvas"
     }
-}
+  } 

+ 19 - 1
pagesSchool/stuAdmin/stat/fee.less

@@ -1 +1,19 @@
-@import (css) "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .top {
+        font-size: var(--font14Size);
+        background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+        padding: 2vw;
+        text-align: center;
+        color: var(--mainColor);
+    }
+
+    ec-canvas {
+        width: 100%;
+        height: 100%;
+    }
+}

+ 6 - 1
pagesSchool/stuAdmin/stat/fee.wxml

@@ -1,5 +1,10 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>消费情况</view>
+        <view class="top">
+            <picker mode="selector" bindchange="schoolChange" name="school_id" value="{{school_id}}" range="{{schoolList}}" range-key="school_id_name">
+                <view class="picker">{{zhSchool||'请选择学校'}}</view>
+            </picker>
+        </view>
+        <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>
     </view>
 </mobile-main>

+ 16 - 1
pagesSchool/stuAdmin/stat/fee.wxss

@@ -1 +1,16 @@
-@import "/app.wxss";
+@import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .top {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+  padding: 2vw;
+  text-align: center;
+  color: var(--mainColor);
+}
+.main ec-canvas {
+  width: 100%;
+  height: 100%;
+}

+ 223 - 23
pagesSchool/stuAdmin/stat/study.js

@@ -1,38 +1,244 @@
-const app = getApp();
+const app = getApp()
+import * as echarts from '../../../commpents/ec-canvas/echarts'
 Page({
-    /**
-     * 页面的初始数据
-     */
     data: {
         frameStyle: { useTop: true, name: '出勤情况', leftArrow: true, useBar: false },
+        // 学校
+        zhSchool: '',
+        school_id: '',
+        schoolList: [],
     },
-    // 跳转菜单
+    // 返回
     back(e) {
         wx.navigateBack({ delta: 1 })
     },
-
+    // 选择学校
+    schoolChange: function (e) {
+        const that = this;
+        let data = that.data.schoolList[e.detail.value];
+        if (data) {
+            that.setData({ school_id: data.school_id });
+            that.setData({ zhSchool: data.school_id_name });
+        }
+        that.watchLogin();
+    },
     /**
      * 生命周期函数--监听页面加载
      */
     onLoad: function (options) {
-
     },
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady: function () {
-
+    // 监听用户是否登录
+    watchLogin: async function () {
+        const that = this;
+        wx.getStorage({
+            key: 'user',
+            success: async res => {
+                that.setData({
+                    ec: {
+                        onInit: that.initChart
+                    }
+                })
+                // 学校
+                const school = await app.$get(`/rss`, { student_id: res.data.info.id });
+                if (school.errcode == '0' && school.total > 0) {
+                    that.setData({ schoolList: school.data })
+                }
+                // 模拟请求
+                var times = setTimeout(async function () {
+                    if (that.data.school_id) {
+                        const arr = await app.$get(`/statistics/studentLearning`, { school_id: that.data.school_id, student_id: res.data.info.id });
+                        if (arr.errcode == '0') {
+                            that.data.data1 = arr.data.signs;
+                            that.data.data2 = arr.data.minutes;
+                        }
+                    }
+                    clearTimeout(times);
+                }, 1000)
+            },
+            fail: async res => {
+                wx.redirectTo({ url: '/pages/index/index' })
+            }
+        })
     },
+    // 折线图
+    initChart(canvas, width, height, dpr) {
+        let that = this;
+        // 由于请求数据有延迟所以写一个时间函数,当数据存在的时候再执行绘制
+        var times = setInterval(function () {
+            var data1 = that.data.data1;
+            var data2 = that.data.data2;
+            if (data1 && data2) {
+                clearInterval(times)
+                const chart = echarts.init(canvas, null, {
+                    width: width,
+                    height: height,
+                    devicePixelRatio: dpr // new
+                });
+                canvas.setChart(chart);
+                var option = {
+                    tooltip: {
+                        trigger: 'axis',
+                        axisPointer: {
+                            type: 'cross',
+                            label: {
+                                backgroundColor: '#6a7985'
+                            }
+                        }
+                        ,
+                        formatter: function (params) {
+                            let html = params[0].name + "<br>";
+                            for (let i = 0; i < params.length; i++) {
+                                html += '<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:' + params[i].color + ';"></span>'
+                                if (params[i].seriesName == "签到数") {
+                                    html += params[i].seriesName + ":" + params[i].value + "%<br>";
+                                }
+                                if (params[i].seriesName == "时长") {
+                                    html += params[i].seriesName + ":" + params[i].value + "小时<br>";
+                                }
+                            }
+                            return html;
+                        }
+                    },
 
+                    legend: {
+                        textStyle: { color: '#4CA6A3' },
+                        x: 'right',
+                        data: [{ name: '签到数', icon: 'rect' }, { name: '时长', icon: 'rect' }]
+                    },
+                    grid: {
+                        left: '2%',
+                        right: '2%',
+                        containLabel: true
+                    },
+                    xAxis: [
+                        {
+                            type: 'category',
+                            boundaryGap: false,
+                            // 设置x轴线的属性
+                            axisLabel: {
+                                //x轴文字的配置
+                                show: true,
+                                interval: 0,//使x轴文字显示全
+                            },
+                            axisLine: {
+                                lineStyle: {
+                                    color: '#4CA6A3', // 设置x轴字体颜色
+                                    width: 2, // 设置x轴字体宽度
+                                }
+                            },
+                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
+                        }
+                    ],
+                    yAxis: [
+                        {
+                            type: 'value',
+                            name: '时长',
+                            position: 'left',
+                            alignTicks: true,
+                            axisLine: {
+                                show: true,
+                                lineStyle: {
+                                    fontSize: 16,
+                                    color: '#293C55'
+                                }
+                            },
+                            axisLabel: {
+                                formatter: '{value} 小时'
+                            }
+                        },
+                        {
+                            type: 'value',
+                            alignTicks: true,
+                            nameGap: 10,
+                            nameRotate: 0,
+                            nameTextStyle: {
+                                fontSize: 16,
+                                color: '#293C55'
+                            },
+                            splitLine: { show: false },//去除网格线
+                            min: 0,
+                            max: 100,
+                            interval: 10,
+                            // 设置轴线的属性
+                            axisLine: {
+                                show: true,
+                                lineStyle: {
+                                    color: '#293C55',
+                                }
+                            }
+                        }
+                    ],
+                    series: [
+                        {
+                            name: '签到数',
+                            type: 'line',
+                            stack: '总量',
+                            areaStyle: {},
+                            itemStyle: {
+                                normal: {
+                                    color: "#25DEDB",//折线点的颜色
+                                    lineStyle: {
+                                        color: "#25DEDB"//折线的颜色
+                                    }
+                                }
+                            },
+                            areaStyle: { // 该属性设置可以使这下图区域颜色达到渐变的效果
+                                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                                    offset: 0,
+                                    color: '#25DEDB'
+                                }, {
+                                    offset: 1,
+                                    color: '#ffe'
+                                }])
+                            },
+                            data: data1
+                        },
+                        {
+                            name: '时长',
+                            type: 'line',
+                            stack: '总量',
+                            areaStyle: {},
+                            itemStyle: {
+                                normal: {
+                                    color: "#E96C44",//折线点的颜色
+                                    lineStyle: {
+                                        color: "#E96C44"//折线的颜色
+                                    }
+                                }
+                            },
+                            areaStyle: { // 该属性设置可以使这下图区域颜色达到渐变的效果
+                                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
+                                    offset: 0,
+                                    color: '#E96C44'
+                                }, {
+                                    offset: 1,
+                                    color: '#ffe'
+                                }])
+                            },
+                            data: data2
+                        }
+                    ]
+                };
+                chart.setOption(option, true);
+                return chart;
+            }
+        }, 100)
+    },
+    /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+    onReady: function () { },
     /**
      * 生命周期函数--监听页面显示
      */
     onShow: function () {
         const that = this;
-
+        // 监听用户是否登录
+        that.watchLogin();
     },
-
-
+    /**
+     * 页面上拉触底事件的处理函数
+     */
     /**
      * 生命周期函数--监听页面隐藏
      */
@@ -54,17 +260,11 @@ Page({
 
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom: function () {
-
-    },
 
     /**
      * 用户点击右上角分享
      */
-    onShareAppMessage: function () {
+    onShareAppMessage: function (res) {
 
-    }
+    },
 })

+ 3 - 2
pagesSchool/stuAdmin/stat/study.json

@@ -1,6 +1,7 @@
 {
     "component": true,
     "usingComponents": {
-        "mobile-main": "/commpents/mobile-frame/index"
+      "mobile-main": "/commpents/mobile-frame/index",
+      "ec-canvas": "/commpents/ec-canvas/ec-canvas"
     }
-}
+  } 

+ 19 - 1
pagesSchool/stuAdmin/stat/study.less

@@ -1 +1,19 @@
-@import (css) "/app.wxss";
+@import (css) "/app.wxss";
+
+.main {
+    background-color: var(--mainColor);
+    height: var(--twoHeight);
+
+    .top {
+        font-size: var(--font14Size);
+        background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+        padding: 2vw;
+        text-align: center;
+        color: var(--mainColor);
+    }
+
+    ec-canvas {
+        width: 100%;
+        height: 100%;
+    }
+}

+ 6 - 1
pagesSchool/stuAdmin/stat/study.wxml

@@ -1,5 +1,10 @@
 <mobile-main frameStyle="{{frameStyle}}" bind:back="back">
     <view slot="info" class="container main">
-        <view>出勤情况</view>
+        <view class="top">
+            <picker mode="selector" bindchange="schoolChange" name="school_id" value="{{school_id}}" range="{{schoolList}}" range-key="school_id_name">
+                <view class="picker">{{zhSchool||'请选择学校'}}</view>
+            </picker>
+        </view>
+        <ec-canvas id="mychart-dom-pie" canvas-id="mychart-pie" ec="{{ ec }}"></ec-canvas>
     </view>
 </mobile-main>

+ 16 - 1
pagesSchool/stuAdmin/stat/study.wxss

@@ -1 +1,16 @@
-@import "/app.wxss";
+@import "/app.wxss";
+.main {
+  background-color: var(--mainColor);
+  height: var(--twoHeight);
+}
+.main .top {
+  font-size: var(--font14Size);
+  background: -webkit-linear-gradient(right, lightblue, #53C9F8);
+  padding: 2vw;
+  text-align: center;
+  color: var(--mainColor);
+}
+.main ec-canvas {
+  width: 100%;
+  height: 100%;
+}

+ 2 - 2
pagesSchool/superAdmin/dict/list.js

@@ -10,7 +10,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
     },
     // 跳转菜单
@@ -28,7 +28,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 2 - 2
pagesSchool/superAdmin/school/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // dialog弹框
         dialog: { title: '账号绑定', show: false, type: '1' },
@@ -32,7 +32,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 添加
     toAdd() {

+ 2 - 2
pagesSchool/superAdmin/user/list.js

@@ -11,7 +11,7 @@ Page({
         list: [],
         total: 0,
         skip: 0,
-        limit: 6,
+        limit: 10,
         page: 0,
         // 字典表
         typeList: [],
@@ -31,7 +31,7 @@ Page({
     // 清空列表
     clearPage() {
         const that = this;
-        that.setData({ list: [], skip: 0, limit: 6, page: 0 })
+        that.setData({ list: [], skip: 0, limit: 10, page: 0 })
     },
     // 信息维护
     toEdit: function (e) {