Changpeng Duan 5 年之前
父節點
當前提交
df6d861237

+ 23 - 21
pc/src/api/Navs.js

@@ -90,7 +90,7 @@ let navs = [
         "prname": "",
         "show": 3,
         "grouplist": "2,5",
-        "icon": "el-icon-bank-card",
+        "icon": "el-icon-data-analysis",
     },
     // {
     //     "clmid": "10",
@@ -104,6 +104,25 @@ let navs = [
     // },
     {
         "clmid": "11",
+        "clmcode": "heartEquip",
+        "clmname": "心率设备",
+        "clmurl": "/heartEquip",
+        "prname": "",
+        "show": 3,//2
+        "grouplist": "2,5",
+        "icon": "el-icon-cpu",
+    }, {
+        "clmid": "12",
+        "clmcode": "region",
+        "clmname": "区域管理",
+        "clmurl": "/region",
+        "prname": "",
+        "show": 3,//2
+        "grouplist": "2,5",
+        "icon": "el-icon-map-location",
+    },
+    {
+        "clmid": "22",
         "clmcode": "setting",
         "clmname": "系统设置",
         "clmurl": "/setting",
@@ -111,7 +130,8 @@ let navs = [
         "show": 3,
         "grouplist": "2,5",
         "icon": "el-icon-setting",
-    }, {
+    },
+    {
         "clmid": "12",
         "clmcode": "shop",
         "clmname": "店面管理",
@@ -239,27 +259,9 @@ let navs = [
         "prname": "",
         "show": 4,
         "grouplist": "2,5",
-        "icon": "el-icon-bank-card",
+        "icon": "el-icon-data-analysis",
     },
     {
-        "clmid": "16",
-        "clmcode": "heartEquip",
-        "clmname": "心率设备",
-        "clmurl": "/heartEquip",
-        "prname": "",
-        "show": 3,//2
-        "grouplist": "2,5",
-        "icon": "el-icon-cpu",
-    }, {
-        "clmid": "17",
-        "clmcode": "region",
-        "clmname": "区域管理",
-        "clmurl": "/region",
-        "prname": "",
-        "show": 3,//2
-        "grouplist": "2,5",
-        "icon": "el-icon-map-location",
-    }, {
         "clmid": "16",
         "clmcode": "heartEquip",
         "clmname": "心率设备",

+ 10 - 1
pc/src/api/getApiRes.js

@@ -698,4 +698,13 @@ export function DispPlanInfoEdit(postdata) {
     return getApiBasic(url, postdata);
 }
 
-
+// 查询心率带绑定历史记录
+export function HrSensorsBindHistory(postdata) {
+    let url = headapi + 'v1/HrSensors/HrSensorsBindHistory ';
+    return getApiBasic(url, postdata);
+}
+// 课堂记录(下课后)详情
+export function FinshedDispPlanQuery(postdata) {
+    let url = headapi + 'v1/SchoolTimeTable/FinshedDispPlanQuery ';
+    return getApiBasic(url, postdata);
+}

+ 11 - 0
pc/src/assets/css/panel.css

@@ -384,4 +384,15 @@ input[type="number"] {
         padding-right: 1px!important;
     }
 }
+  .el-checkbox-group  .el-checkbox:last-of-type {
+    margin-right: 30px;
+}
+  table .el-radio {
+      width: 20px;
+      overflow: hidden;
+      display: block;
+      margin: 0 auto;
+      float: none;
+
+  }
 

+ 332 - 287
pc/src/components/Navside.vue

@@ -1,295 +1,340 @@
 <template>
-  <div class="Navside">
-    <div class="logoContainer">
-      <img src="../assets/img/nav/logo.png" height="40" width="180"/>
+    <div :class="NavsideClass">
+        <div class="logoContainer">
+            <img src="../assets/img/nav/logo.png" height="40" width="180"/>
+        </div>
+        <div class="userContainer">
+            <img src="../assets/img/nav/head.png" height="51" width="51"/>
+            <span>{{ ShopName }}</span>
+            <em>{{ userLevelText }}</em>
+        </div>
+        <el-row :class="[{'shortnav':isCollapse},{'longNav':!isCollapse}]">
+            <el-col :span="24">
+                <el-menu
+                        :default-active="userLevelDeafult"
+                        class="el-menu-vertical-demo"
+                        @open="handleOpen"
+                        @close="handleClose"
+                        @select="handleSelect"
+                        background-color="#ffffff"
+                        text-color="#777777"
+                        active-text-color="#fff"
+                        router
+                >
+                    <el-menu-item :index="nav.clmid" :route="nav.clmurl" v-for="nav in navs"
+                                  v-if="nav.show == userLevel">
+                        <i :class="nav.icon"></i>
+                        <span slot="title">{{ nav.clmname }}</span>
+                    </el-menu-item>
+                </el-menu>
+            </el-col>
+        </el-row>
     </div>
-    <div class="userContainer">
-      <img src="../assets/img/nav/head.png" height="51" width="51"/>
-      <span>{{ ShopName }}</span>
-      <em>{{ userLevelText }}</em>
-    </div>
-    <el-row :class="[{'shortnav':isCollapse},{'longNav':!isCollapse}]">
-      <el-col :span="24">
-        <el-menu
-            :default-active="userLevelDeafult"
-            class="el-menu-vertical-demo"
-            @open="handleOpen"
-            @close="handleClose"
-            @select="handleSelect"
-            background-color="#ffffff"
-            text-color="#777777"
-            active-text-color="#fff"
-            router
-        >
-          <el-menu-item :index="nav.clmid" :route="nav.clmurl" v-for="nav in navs"
-                        v-if="nav.show == userLevel">
-            <i :class="nav.icon"></i>
-            <span slot="title">{{ nav.clmname }}</span>
-          </el-menu-item>
-        </el-menu>
-      </el-col>
-    </el-row>
-  </div>
 </template>
 <script>
-import Navs from '../api/Navs';
-import {
-  ManagerSelfQuery,
-  ShopListQuery
-} from '../api/getApiRes.js'
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      wildState: 0,
-      navs: [],
-      ShopName: '',
-      userLevelText: '',
-      userLevel: 0,
-      userLevelDeafult: "",
-    }
-  },
-  props: ['isCollapse'],
-  mounted() {
-    this.userLevelDeafult = this.$route.meta.clmid;
-    this.getTableQuery();
-    this.getManagerSelfQuery();
-
-  },
-  methods: {
-    handleSelect(i, s, t) {
-      // this.$emit('TabsAdd', i);//触发事件
-    },
-    getTableQuery() {
-      // 菜单
-      this.navs = Navs;
-    },
-    getManagerSelfQuery() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ManagerSelfQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.userLevelText = json.Rs.Role.Name;
-          // 1 会员 2 系统 3 店铺 4 教练
-          switch (parseInt(json.Rs.Role.Id)) {
-            case 1:
-              that.userLevel = 1;
-              break;
-            case 2:
-              that.userLevel = 2;
-              break;
-            case 3:
-              that.userLevel = 3;
-              break;
-            case 4:
-              that.userLevel = 4;
-              break;
-          }
-          localStorage.shopId = json.Rs.ShopId;
-          this.panelSelect(json.Rs.ShopId);
-        } else {
-          if (json.Code == 1010) {
-            that.$message.error(json.Memo);
-            that.$router.push({path: '/login', query: {status: 1}});
-            return false
-          } else {
-            that.$message.error(json.Memo);
-          }
-        }
-      })
-    },
-    // 获取所属店铺
-    panelSelect(ShopId) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ShopListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          json.Rs.map(function (item) {
-            if (item.ShopID == ShopId) {
-              that.ShopName = item.ShopName;
+    import Navs from '../api/Navs';
+    import {
+        ManagerSelfQuery,
+        ShopListQuery
+    } from '../api/getApiRes.js'
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                wildState: 0,
+                navs: [],
+                ShopName: '',
+                userLevelText: '',
+                NavsideClass: 'Navside',
+                userLevel: 0,
+                userLevelDeafult: "",
             }
-          })
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    handleOpen(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-    handleClose(key, keyPath) {
-      // console.log(key, keyPath);
-    },
-  },
-  watch: {
-    $route(to, from) {
-      this.userLevelDeafult = to.meta.clmid
-    },
-  },
-}
+        },
+        props: ['isCollapse'],
+        mounted() {
+            this.userLevelDeafult = this.$route.meta.clmid;
+            this.getTableQuery();
+            this.getManagerSelfQuery();
+            if (document.body.clientWidth < 1024) {
+                this.NavsideClass = 'NavsideShort'
+            } else {
+                this.NavsideClass = 'Navside'
+            }
+        },
+        methods: {
+            handleSelect(i, s, t) {
+                // this.$emit('TabsAdd', i);//触发事件
+            },
+            getTableQuery() {
+                // 菜单
+                this.navs = Navs;
+            },
+            getManagerSelfQuery() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ManagerSelfQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.userLevelText = json.Rs.Role.Name;
+                        // 1 会员 2 系统 3 店铺 4 教练
+                        switch (parseInt(json.Rs.Role.Id)) {
+                            case 1:
+                                that.userLevel = 1;
+                                break;
+                            case 2:
+                                that.userLevel = 2;
+                                break;
+                            case 3:
+                                that.userLevel = 3;
+                                break;
+                            case 4:
+                                that.userLevel = 4;
+                                break;
+                        }
+                        localStorage.shopId = json.Rs.ShopId;
+                        this.panelSelect(json.Rs.ShopId);
+                    } else {
+                        if (json.Code == 1010) {
+                            that.$message.error(json.Memo);
+                            that.$router.push({path: '/login', query: {status: 1}});
+                            return false
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    }
+                })
+            },
+            // 获取所属店铺
+            panelSelect(ShopId) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ShopListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        json.Rs.map(function (item) {
+                            if (item.ShopID == ShopId) {
+                                that.ShopName = item.ShopName;
+                            }
+                        })
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            handleOpen(key, keyPath) {
+                // console.log(key, keyPath);
+            },
+            handleClose(key, keyPath) {
+                // console.log(key, keyPath);
+            },
+        },
+        watch: {
+            $route(to, from) {
+                this.userLevelDeafult = to.meta.clmid
+            },
+        },
+    }
 </script>
 <style scoped>
-/*注释*/
-.Navside {
-  width: 100%;
-  height: 910px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  /*overflow-y: scroll;*/
-  overflow-y: hidden;
-  background-color: #fff;
-  z-index: 4444;
-}
-
-.logoContainer {
-  width: 256px;
-  height: 72px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #3799FF;
-}
-
-.logoContainer img {
-  width: 100%;
-  height: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 1px;
-}
-
-.userContainer {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 16px;
-  padding-top: 19px;
-  padding-bottom: 19px;
-  border-bottom: 1px solid #F0F2F5;
-  background: #fff;
-}
-
-.userContainer img {
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 16px;
-}
-
-.userContainer span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #565656;
-  font-size: 16px;
-}
-
-.userContainer em {
-  width: 125px;
-  height: 26px;
-  line-height: 26px;
-  text-align: center;
-  color: #fff;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: #E75296;
-  border-radius: 250px;
-  font-style: normal;
-  margin-top: 8px;
-}
-
-/deep/ .el-menu {
-  border: none;
-}
-
-/deep/ .el-menu-item {
-}
-
-/deep/ .el-menu-item span {
-  text-align: left;
-  float: left;
-  margin-left: 70px;
-}
-
-/deep/ .el-menu-item.is-active {
-  background-color: #3799FF !important;
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item:hover {
-  background-color: #3799FF !important;
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item:hover i {
-  color: #fff !important;
-}
-
-/deep/ .el-menu-item i {
-  position: relative;
-  float: left;
-  line-height: 55px;
-  left: 60px;
-}
-
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .userContainer {
-    width: 80%;
-  }
-
-  .el-menu-item span {
-    text-align: left;
-    float: left;
-    margin-left: 20px;
-    line-height: 40px;
-  }
-
-  .userContainer em {
-    width: 100%;
-    overflow: hidden;
-    display: block;
-    margin: 0 auto;
-    font-size: 12px;
-  }
-
-  .el-menu-item {
-    padding: 0 !important;
-    margin: 0;
-  }
-
-  .el-menu-item i {
-    left: 20px;
-    padding: 0;
-    margin: 0;
-    float: left;
-    line-height: 40px;
-  }
-
-  /deep/ .el-tooltip {
-    padding: 0 !important;
-  }
-
-  .userContainer span {
-    font-size: 12px;
-  }
-
-  .el-menu-item, .el-submenu__title {
-    height: 40px;
-  }
-}
+    /*注释*/
+    .Navside {
+        width: 100%;
+        height: 910px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        /*overflow-y: scroll;*/
+        overflow-y: hidden;
+        background-color: #fff;
+        z-index: 4444;
+    }
+
+    .NavsideShort {
+        width: 100%;
+        height: 710px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        /*overflow-y: scroll;*/
+        overflow-y: scroll;
+        background-color: #fff;
+        z-index: 4444
+    }
+
+    .NavsideShort::-webkit-scrollbar { /*滚动条整体样式*/
+
+        width: 3px; /*高宽分别对应横竖滚动条的尺寸*/
+
+        height: 1px;
+
+    }
+
+    .NavsideShort::-webkit-scrollbar-thumb { /*滚动条里面小方块*/
+
+        border-radius: 3px;
+
+        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+
+        background: #f5f5f5;
+
+    }
+
+    .NavsideShort::-webkit-scrollbar-track { /*滚动条里面轨道*/
+
+        -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+
+        border-radius: 3px;
+
+        background: #f5f5f5;
+
+    }
+
+    .logoContainer {
+        width: 256px;
+        height: 72px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #3799FF;
+    }
+
+    .logoContainer img {
+        width: 100%;
+        height: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 1px;
+    }
+
+    .userContainer {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 16px;
+        padding-top: 19px;
+        padding-bottom: 19px;
+        border-bottom: 1px solid #F0F2F5;
+        background: #fff;
+    }
+
+    .userContainer img {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 16px;
+    }
+
+    .userContainer span {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #565656;
+        font-size: 16px;
+    }
+
+    .userContainer em {
+        width: 125px;
+        height: 26px;
+        line-height: 26px;
+        text-align: center;
+        color: #fff;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        background: #E75296;
+        border-radius: 250px;
+        font-style: normal;
+        margin-top: 8px;
+    }
+
+    /deep/ .el-menu {
+        border: none;
+    }
+
+    /deep/ .el-menu-item {
+    }
+
+    /deep/ .el-menu-item span {
+        text-align: left;
+        float: left;
+        margin-left: 70px;
+    }
+
+    /deep/ .el-menu-item.is-active {
+        background-color: #3799FF !important;
+        color: #fff !important;
+    }
+
+    /deep/ .el-menu-item:hover {
+        background-color: #3799FF !important;
+        color: #fff !important;
+    }
+
+    /deep/ .el-menu-item:hover i {
+        color: #fff !important;
+    }
+
+    /deep/ .el-menu-item i {
+        position: relative;
+        float: left;
+        line-height: 55px;
+        left: 60px;
+    }
+
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .userContainer {
+            width: 80%;
+        }
+
+        .el-menu-item span {
+            text-align: left;
+            float: left;
+            margin-left: 20px;
+            line-height: 40px;
+        }
+
+        .userContainer em {
+            width: 100%;
+            overflow: hidden;
+            display: block;
+            margin: 0 auto;
+            font-size: 12px;
+        }
+
+        .el-menu-item {
+            padding: 0 !important;
+            margin: 0;
+        }
+
+        .el-menu-item i {
+            left: 20px;
+            padding: 0;
+            margin: 0;
+            float: left;
+            line-height: 40px;
+        }
+
+        /deep/ .el-tooltip {
+            padding: 0 !important;
+        }
+
+        .userContainer span {
+            font-size: 12px;
+        }
+
+        .el-menu-item, .el-submenu__title {
+            height: 40px;
+        }
+    }
 </style>

+ 114 - 0
pc/src/components/upHead.vue

@@ -0,0 +1,114 @@
+<template>
+    <div>
+        <!--website:qjzpcd34v.hb-bkt.clouddn.com-->
+        <!--<br>-->
+        <!--ak: JvRT6F0pbWwfTwRZOeYCLcTFBwtE_E0CFp6DZklk-->
+        <!--<br>-->
+        <!--SK: vgYd-QjeAk9v5QrIU1z4427xJi_nao4LCuXgWfgJ-->
+        <div class="upload">
+            <el-upload
+                    class="avatar-uploader"
+                    :action=domain
+                    :http-request=upqiniu
+                    :show-file-list="false"
+                    :before-upload="beforeUpload">
+                <img v-if="imageUrl" :src="imageUrl" class="avatar">
+                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+            </el-upload>
+        </div>
+    </div>
+</template>
+
+<script>
+    import * as qiniu from 'qiniu-js';
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                imageUrl: '',
+                token: {},
+                // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
+                // domain: 'https://upload-z2.qiniup.com',
+                domain: 'https://up-z1.qiniup.com',
+                // 这是七牛云空间的外链默认域名
+                qiniuaddr: 'qjzpcd34v.hb-bkt.clouddn.com'
+            };
+        },
+        mounted() {
+
+        },
+        methods: {
+            // 上传文件到七牛云
+            upqiniu(req) {
+                console.log(req);
+                const config = {
+                    headers: {'Content-Type': 'multipart/form-data'}
+                };
+                let filetype = '';
+                if (req.file.type === 'image/png') {
+                    filetype = 'png'
+                } else {
+                    filetype = 'jpg'
+                }
+                // 重命名要上传的文件
+                const keyname = 'GoAllOut' + new Date().valueOf() + Math.floor(Math.random() * 100) + '.' + filetype;
+                // 从后端获取上传凭证token
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                this.axios.post('/api/v1/QiNiu/GetSimpleQiNiuToken',postdata).then(res => {
+                    const formdata = new FormData();
+                    formdata.append('file', req.file);
+                    formdata.append('token', res.data.QiNinToken);
+                    formdata.append('key', keyname);
+                    // 获取到凭证之后再将文件上传到七牛云空间
+                    this.axios.post(this.domain, formdata, config).then(res => {
+                        this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key
+                    })
+                })
+            },
+            // 验证文件合法性
+            beforeUpload(file) {
+                const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+                const isLt2M = file.size / 1024 / 1024 < 2;
+                if (!isJPG) {
+                    this.$message.error('上传头像图片只能是 JPG 格式!')
+                }
+                if (!isLt2M) {
+                    this.$message.error('上传头像图片大小不能超过 2MB!')
+                }
+                return isJPG && isLt2M
+            }
+        },
+    }
+</script>
+
+<style scoped>
+    .avatar-uploader .el-upload {
+        border: 1px dashed #d9d9d9;
+        border-radius: 6px;
+        cursor: pointer;
+        position: relative;
+        overflow: hidden;
+    }
+
+    .avatar-uploader .el-upload:hover {
+        border-color: #409EFF;
+    }
+
+    .avatar-uploader-icon {
+        font-size: 28px;
+        color: #8c939d;
+        width: 178px;
+        height: 178px;
+        line-height: 178px;
+        text-align: center;
+    }
+
+    .avatar {
+        width: 178px;
+        height: 178px;
+        display: block;
+    }
+</style>

+ 10 - 2
pc/src/router/index.js

@@ -98,7 +98,7 @@ const routes = [
                 component: () => import('@/views/AdminSetting.vue'),
                 meta: {
                     title: "系统设置",
-                    clmid: "15",
+                    clmid: "17",
                 }
             }, {
                 path: '/lessonManage',
@@ -146,7 +146,7 @@ const routes = [
                 component: () => import('@/views/setting.vue'),
                 meta: {
                     title: "系统设置",
-                    clmid: "11",
+                    clmid: "22",
                 }
             }, {
                 path: '/finish',
@@ -228,6 +228,14 @@ const routes = [
                     title: "区域管理",
                     clmid: "10",
                 }
+            },{
+                path: '/test',
+                name: 'Test',
+                component: () => import('@/views/Test.vue'),
+                meta: {
+                    title: "test",
+                    clmid: "10",
+                }
             }, {
                 path: '/regionEquip',
                 name: 'regionEquip',

+ 18 - 0
pc/src/server/app.js

@@ -0,0 +1,18 @@
+// 引入包
+const express = require('express');
+const bodyparse = require('body-parser');
+// 创建服务
+const app = express();
+// 解析数据
+app.use(bodyparse.json());
+// 引入七牛云配置
+const qnconfig = require('./config.js');
+// 处理请求
+app.get('/token', (req, res, next) => {
+    // console.log(qnconfig.uploadToken)
+    res.status(200).send(qnconfig.uploadToken)
+});
+// 监听3000端口
+app.listen(3000, () => {
+    console.log('this server are running on localhost:3000!')
+});

+ 19 - 0
pc/src/server/config.js

@@ -0,0 +1,19 @@
+/*
+七牛云配置
+*/
+const qiniu = require('qiniu');
+
+// 创建上传凭证
+const accessKey = 'JvRT6F0pbWwfTwRZOeYCLcTFBwtE_E0CFp6DZklk';//这里填写七牛云的accessKe
+const secretKey = 'vgYd-QjeAk9v5QrIU1z4427xJi_nao4LCuXgWfgJ';//这里填写七牛云的secretKey
+const mac = new qiniu.auth.digest.Mac(accessKey, secretKey);
+const options = {
+    scope: 'beswell',//这里填写七牛云空间名称
+    expires: 7200
+};
+const putPolicy = new qiniu.rs.PutPolicy(options);
+const uploadToken = putPolicy.uploadToken(mac);
+
+module.exports = {
+    uploadToken
+};

+ 22 - 4
pc/src/views/Member.vue

@@ -78,10 +78,18 @@
                 <el-table-column
                         prop="UserInfo.head"
                         label="头像"
+                        width="50"
                 >
                     <template slot-scope="scope">
-                        <img :src="scope.row.UserInfo.Head" alt="" v-if="scope.row.UserInfo.Head" width="25px"
-                             height="25px">
+                        <div class="demo-image__preview" v-if="scope.row.UserInfo.Head">
+                            <el-image
+                                    style="width: 25px; height: 25px"
+                                    :src="scope.row.UserInfo.Head"
+                                    :preview-src-list="[scope.row.UserInfo.Head]"
+
+                            >
+                            </el-image>
+                        </div>
                         <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
                     </template>
                 </el-table-column>
@@ -113,7 +121,7 @@
                 <el-table-column
                         prop="UserInfo.ExpTime"
                         label="会员有效期"
-                        width="155"
+                        width="115"
                         :formatter="filterFmtDate"
                         sortable
                 >
@@ -1066,6 +1074,11 @@
                 this.form.memo = '';
                 this.form.normalhour = 0;
                 this.form.gifthour = 0;
+                this.form.height = '';
+                this.form.weight = '';
+                this.form.staticHr = 0;
+                this.form.sex = 1;
+                this.form.birthday = '';
                 this.form.userCode = '';
                 this.form.shopId = '';
                 this.form.classlist = [];
@@ -1146,7 +1159,7 @@
                 if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
                     return '无有效期';
                 } else {
-                    return nonTfmtDate(column, 11);
+                    return nonTfmtDatetoLength(column, 10);
                 }
             },
         }
@@ -1304,4 +1317,9 @@
     .pull-left .el-input-number {
         width: 130px;
     }
+    .cell img {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 </style>

+ 3 - 74
pc/src/views/Test.vue

@@ -1,24 +1,11 @@
 <template>
     <div>
-        <!--<Radar></Radar>-->
-        <!--<Sankey></Sankey>-->
-
-        <div class="other-people">
-            <div class="image-border image-border1"></div>
-            <div class="image-border image-border2"></div>
-            <div class="image-border image-border3"></div>
-            <div class="image-border image-border4"></div>
-            <div class="other-people-title">旅客人脸图</div>
-        </div>
-
-        <Map></Map>
+        <upHead></upHead>
     </div>
 </template>
 
 <script>
-    import Radar from '@/components/Radar.vue'
-    import Sankey from '@/components/Sankey.vue'
-    import Map from '@/components/Map.vue'
+    import upHead from '@/components/upHead.vue'
 
     export default {
         data() {
@@ -27,69 +14,11 @@
             }
         },
         components: {
-            Radar, Sankey,Map
+            upHead
         }
     }
 </script>
 
 <style scoped>
 
-    .image-border {
-        position: absolute;
-        width: 20px;
-        height: 20px;
-    }
-
-    .image-border1 {
-        top: 0px;
-        left: 0;
-        border-left: 2px solid #6DC1FF;
-        border-top: 2px solid #6DC1FF;
-    }
-
-    .image-border2 {
-        top: 0;
-        right: -2px;
-        border-right: 2px solid #6DC1FF;
-        border-top: 2px solid #6DC1FF;
-    }
-
-    .image-border3 {
-        bottom: 0;
-        left: 0;
-        border-bottom: 2px solid #6DC1FF;
-        border-left: 2px solid #6DC1FF;
-    }
-
-    .image-border4 {
-        bottom: 0;
-        right: -2px;
-        border-right: 2px solid #6DC1FF;
-        border-bottom: 2px solid #6DC1FF;
-    }
-
-    .other-people {
-        border: 1px dashed #01355B;
-        width: 200px;
-        height: 200px;
-        margin-left: 61px;
-        padding: 5px;
-        position: relative;
-    }
-
-    .other-image {
-        width: 100%;
-        height: 100%;
-    }
-
-    .other-people-title {
-        position: absolute;
-        background: rgb(21, 90, 154);
-        height: 52px;
-        opacity: 0.5;
-        font-size: 14px;
-        line-height: 52px;
-        top: 25px;
-        left: 25px;
-    }
 </style>

+ 45 - 567
pc/src/views/bindRecord.vue

@@ -1,18 +1,16 @@
 <template>
     <div class="context">
         <div class="panel">
-            <h5>绑定记录</h5>
-            <div class="panel-body" v-if="false">
+            <el-page-header @back="goBack" content="绑定记录">
+            </el-page-header>
+            <h5></h5>
+            <div class="panel-body" v-if="true">
                 <div class="panel_control">
                     <el-row :gutter="20">
-                        <el-col :span="4">
-                            <em>姓名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
+                        <!--<el-col :span="4">-->
+                        <!--<em>心率带ID:</em>-->
+                        <!--<el-input v-model="panel.hrId" placeholder="请输入心率带ID"></el-input>-->
+                        <!--</el-col>-->
                         <el-col :span="7">
                             <em>日期:</em>
                             <el-date-picker
@@ -23,17 +21,6 @@
                                     end-placeholder="结束日期">
                             </el-date-picker>
                         </el-col>
-                        <el-col :span="4">
-                            <em>状态:</em>
-                            <el-select v-model="panel.classId">
-                                <el-option
-                                        v-for="item in panel.options"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
                         <el-col :span="4">
                             <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
                             </el-button>
@@ -62,19 +49,18 @@
                         width="50">
                 </el-table-column>
                 <el-table-column
-                        prop="Name"
+                        prop="UserName"
                         label="绑定用户"
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="sn"
+                        prop="Sn"
                         label="序列号"
                 >
                 </el-table-column>
                 <el-table-column
                         prop="ClassName"
                         label="课程"
-                        width="110"
                         sortable
                 >
                     <template slot-scope="scope">
@@ -83,7 +69,7 @@
                     </template>
                 </el-table-column>
                 <el-table-column
-                        prop="CreatedAt"
+                        prop="Base.CreatedAt"
                         label="绑定时间"
                         width="180"
                         :formatter="filterFmtDate"
@@ -91,13 +77,31 @@
                 >
                 </el-table-column>
                 <el-table-column
-                        prop="CreatedAt"
+                        prop="Base.UpdatedAt"
                         label="解绑时间"
                         width="180"
                         :formatter="filterFmtDate"
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="IsPrivate"
+                        label="是否私有"
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.IsPrivate == 1">私有</span>
+                        <span v-if="scope.row.IsPrivate == 2">公共</span>
+                    </template>
+                </el-table-column>
+                <!--<el-table-column-->
+                <!--prop="BindStatus"-->
+                <!--label="绑定状态"-->
+                <!--&gt;-->
+                <!--<template slot-scope="scope">-->
+                <!--<span v-if="scope.row.BindStatus == 1" style="color: greenyellow">绑定</span>-->
+                <!--<span v-if="scope.row.BindStatus == 2" style="color:red;">解绑</span>-->
+                <!--</template>-->
+                <!--</el-table-column>-->
             </el-table>
             <br>
             <el-pagination
@@ -113,10 +117,7 @@
 <script>
     import Global from '../Global.js'
     import {
-        VipUserConsumeListQuery,
-        testTable,
-        testSelect,
-        ClassListQuery,
+        HrSensorsBindHistory,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -134,12 +135,12 @@
                 dialogValue: [],
                 // panel 配置项目
                 panel: {
-                    name: '',
+                    hrId: this.$route.query.hrId,
                     phone: '',
                     classId: '',
                     usercode: '',
                     username: '',
-                    timeScope: globalBt2(30),
+                    timeScope: globalBt2(3),
                     compname: '',
                     keyword: '',
                     USERCODE: '',
@@ -187,95 +188,12 @@
             }
         },
         mounted() {
-            this.panelSelect();
             this.getTableQuery();
         },
         methods: {
-            // 编辑
-            editMember(row) {
-                let that = this;
-                this.clearForm();
-
-                this.form.userCode = row.userCode;
-                this.form.name = row.name;
-                this.form.memberType = row.vipType;
-                this.form.lesson = row.Recovered;
-                this.form.gift = row.Recovered;
-                this.form.memo = row.memo;
-                this.form.btnType = 1;
-
-                this.form.shopId = row.Id;
-                this.dialogMemberVisible = true
-                this.dialogTitle = '编辑会员'
-            },
-            // 禁用
-            pauseRow(row) {
-                let that = this;
-                this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        Id: row.Id,
-                        status: 0,
-                    };
-                    let postdata = qs.stringify(param);
-                    testTable(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.name + '禁用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消禁用'
-                    });
-                });
-            },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        Id: row.Id,
-                        status: 1,
-                    };
-                    let postdata = qs.stringify(param);
-                    testTable(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.name + '启用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
+            goBack(){
+                this.$router.push({
+                    path: '/heartEquip', query: {}
                 });
             },
             // 表格合计
@@ -306,431 +224,6 @@
                 return sums;
             },
             // 关闭所有
-            allDialogClose() {
-                this.dialogVisible = false;
-                this.dialogGift = false;
-                this.dialogLesson = false;
-                this.dialogExpTime = false;
-                this.dialogLessonTable = false;
-            },
-            // 用户禁用 todo
-            // 用户启用 todo
-            // 有效期调整
-            ExpTimeChange() {
-                // 仅针对年费用户,使用日期格式
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.tableRadio;
-                if (parseInt(row.vipType) == 2) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,充值会员不能调整有效期',
-                        type: 'error'
-                    });
-                    return false
-                }
-                this.form.expTime = row.expTime;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogExpTime = true;
-            },
-            // 课时调整
-            lessonChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.lesson = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLesson = true;
-
-            },
-            // 赠送调整
-            giftChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogGift = true;
-
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                this.allDialogClose();
-                if (!this.multipleSelection.length) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.gift = row.Recovered;
-                this.form.rowName = row.name;
-                this.dialogVisible = true;
-                this.dialogLessonTable = true;
-            },
-            // 确认提交新增会员
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.userCode) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.userCode)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            confirmEditMember() {
-                console.log(123);
-                let that = this;
-                // checkNum
-                if (!that.form.userCode) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                console.log(that.form.userCode);
-                if (!globalCheckPhone(that.form.userCode)) {
-                    this.$message.error('错了哦,手机号格式不正确');
-                    return false
-                }
-                if (!that.form.name) {
-                    this.$message.error('错了哦,会员名不能为空');
-                    return false
-                }
-                if (that.form.name.length > 8) {
-                    this.$message.error('错了哦,会员名字数超过8个字');
-                    return false
-                }
-                if (that.form.memo) {
-                    if (that.form.memo.length > 200) {
-                        this.$message.error('错了哦,备注字数超过200个字');
-                        return false
-                    }
-                }
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    name: that.form.name,
-                    memberType: that.form.memberType,
-                    lesson: that.form.lesson,
-                    gift: that.form.gift,
-                    memo: that.form.memo,
-                    dialogValue: that.form.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交课时
-            confirmLesson() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    lesson: that.form.lesson,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交赠送
-            confirmGift() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    gift: that.form.gift,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交有效期
-            confirmExpTime() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    expTime: that.form.expTime,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '赠送课时调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 确认提交会员课程
-            confirmLessonTable() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    userCode: that.form.userCode,
-                    dialogValue: that.form.dialogValue,
-                };
-                let postdata = qs.stringify(param);
-                testSelect(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '会员课程调整成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 加载选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    classType: 1//去掉午休
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false
-                        that.panel.options = turnClassResToOption(json.Rs);
-                        that.panel.options.unshift({label: "全部", value: ''})
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 新增会员
-            addMember() {
-                this.clearForm();
-                this.dialogMemberVisible = true
-                this.btnType = 0;
-                this.dialogTitle = '新增会员'
-            },
-            // 删除
-            delList() {
-                let that = this;
-                // checkNum
-                if (!this.multipleSelection.length) {
-                    that.$message({
-                        showClose: true,
-                        message: '错了哦,需要先选中至少一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-                if (this.multipleSelection.length != 1) {
-                    that.$message({
-                        showClose: true,
-                        message: '错了哦,只能选中一条记录',
-                        type: 'error'
-                    });
-                    return false
-                }
-
-                let detectorid = that.tableRadio.Id;
-
-                let param = {
-                    token: localStorage.token,
-                    detectorid: detectorid,
-                    status: 9,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
-
-                this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    testSelect(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '选中的会员已删除!',
-                                type: 'success'
-                            });
-                            // 重载列表
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
@@ -739,14 +232,14 @@
                 // 按钮倒计时
                 let that = this;
                 that.serachBtnStatus = true;
-                let totalTime = 2
+                let totalTime = 2;
                 let clock = window.setInterval(() => {
-                    totalTime--
+                    totalTime--;
                     if (totalTime < 0) {
                         totalTime = 2;
                         that.serachBtnStatus = false;
                     }
-                }, 1000)
+                }, 1000);
                 this.getTableQuery();
                 this.$message.success('查询完毕');
             },
@@ -758,16 +251,17 @@
             },
             // 页面数据查询
             getTableQuery() {
+                console.log(123);
                 let that = this;
                 that.loading = true;
                 let param = {
                     token: localStorage.token,
-                    classId: that.router.query.classId,
-                    start: 1,//
-                    tableMax: 9999,//
+                    hrId: this.$route.query.hrId,
+                    bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:01",
+                    et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
                 };
                 let postdata = qs.stringify(param);
-                VipUserConsumeListQuery(postdata).then(res => {
+                HrSensorsBindHistory(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -778,7 +272,6 @@
                             that.allTableData = [];
                             that.recordsTotal = 0;
                         }
-
                         // 设置分页数据
                         that.setPaginations();
                     } else {
@@ -786,15 +279,6 @@
                     }
                 })
             },
-            // 导出excel
-            btnExpAll() {
-                let that = this;
-                let url = headapi + '?ctl=ajax&mod=czgl&act=czcx_excel';//获取
-                let bt = globaltime2String(that.panel.time1[0]);
-                let et = globaltime2String(that.panel.time1[1]);
-                let usercode = that.panel.usercode;
-                window.location = url + '&bt=' + bt + '&et=' + et + '&usercode=' + usercode;
-            },
             // 设置分页数据
             setPaginations() {
                 // 分页属性
@@ -842,16 +326,10 @@
                 let that = this;
                 return nonTfmtDate(column, 11);
             },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
         },
         watch: {
             $route(to) {
-                if (to.name == 'cost') {
-                    this.panelSelect();
+                if (to.name == 'bindRecord') {
                     this.getTableQuery();
                 }
             },

+ 53 - 3
pc/src/views/classInfoDetail.vue

@@ -34,8 +34,18 @@
                         sortable
                 >
                     <template slot-scope="scope">
-                        <img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">
-                        <img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>
+                        <!--<img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">-->
+                            <div class="demo-image__preview" v-if="scope.row.Head">
+                                <el-image
+                                        style="width: 25px; height: 25px"
+                                        :src="scope.row.Head"
+                                        :preview-src-list="[scope.row.Head]"
+
+                                >
+                                </el-image>
+                            </div>
+                            <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+                        <!--<img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>-->
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -58,6 +68,41 @@
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="MaxHr"
+                        label="最大心率"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="AvgHr"
+                        label="平均心率"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Weight"
+                        label="体重(kg)"
+                        :formatter="filterWeight"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Height"
+                        label="身高(cm)"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Sex"
+                        label="性别"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.Sex == 1">男</span>
+                        <span v-if="scope.row.Sex == 2">女</span>
+                    </template>
+                </el-table-column>
             </el-table>
             <br>
             <el-pagination
@@ -75,6 +120,7 @@
     import Global from '../Global.js'
     import {
         ClassOverDetailListQuery,
+        FinshedDispPlanQuery,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -112,7 +158,7 @@
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
-                ClassOverDetailListQuery(postdata).then(res => {
+                FinshedDispPlanQuery(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         that.loading = false;
@@ -176,6 +222,10 @@
             filterCK(value, row, column) {
                 return parseInt(column / 1000000);
             },
+            // 单位转换去1个零
+            filterWeight(value, row, column) {
+                return parseInt(column / 10);
+            },
 
         },
         watch: {

+ 285 - 27
pc/src/views/courseEdit.vue

@@ -7,8 +7,9 @@
                     <br>
                 </el-page-header>
                 <span class="classNames">
-                    {{title}}
+                    {{title}}   {{ClassStateText}}
                 </span>
+
                 <br>
                 <div class="panel_control">
                     <el-row :gutter="20">
@@ -28,8 +29,8 @@
                 </div>
             </div>
             <div class="change">
-                <el-button @click="addFinish">确认上课</el-button>
-                <!--<el-button @click="addFinish">确认下课</el-button>-->
+                <el-button @click="confirmBegin" type="primary" v-if="FinishClass == 3">确认上课</el-button>
+                <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
                 <el-button @click="addFinishMember">添加上课会员</el-button>
             </div>
         </div>
@@ -57,8 +58,18 @@
                         sortable
                 >
                     <template slot-scope="scope">
-                        <img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">
-                        <img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>
+                        <div class="demo-image__preview" v-if="scope.row.Head">
+                            <el-image
+                                    style="width: 25px; height: 25px"
+                                    :src="scope.row.Head"
+                                    :preview-src-list="[scope.row.Head]"
+
+                            >
+                            </el-image>
+                        </div>
+                        <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+                        <!--<img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">-->
+                        <!--<img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>-->
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -110,14 +121,14 @@
                             <el-option
                                     v-for="item in panel.bindList"
                                     :key="item.HrId"
-                                    :label="item.InVenueNo"
+                                    :label="item.label"
                                     :value="item.HrId">
                             </el-option>
                         </el-select>
 
                         <el-button @click="takeBack(scope.row)" type="danger" v-if="scope.row.BindId"
                                    icon="el-icon-cpu">
-                            {{scope.row.Name}}
+                            {{scope.row.Sn}}
                             设备收回
                         </el-button>
                     </template>
@@ -138,7 +149,7 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="primary" round v-if="scope.row.Status == 1" size="mini"
+                        <el-button type="primary" round v-if="scope.row.Status == 1  && FinishClass != 2" size="mini"
                                    @click="pauseRow(scope.row,2)">
                             预约未到
                         </el-button>
@@ -146,10 +157,18 @@
                                    @click="pauseRow(scope.row,1)">
                             撤销
                         </el-button>
-                        <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
+                        <el-button type="danger" round v-if="scope.row.Status == 3 && FinishClass != 2" size="mini"
                                    @click="getClassOverDetailDel(scope.row)">
                             删除
                         </el-button>
+                        <!--已经上课,已绑心率带-->
+                        <!--{{scope.row.BindUserId}}-->
+                        <!--HrSubmitFlag 0 未提交 1提交-->
+                        <el-button type="warning" round v-if="scope.row.Status == 3 && FinishClass == 2 " size="mini"
+                                   :disabled="scope.row.HrSubmitFlag == 1"
+                                   @click="getClassDetailAndSnAdd(scope.row)">
+                            提交
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -174,6 +193,19 @@
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
             </div>
         </el-dialog>
+        <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
+            <div class="dialogContent">
+                <span class="blueTitle">{{ClassName}} {{BeginTime}}</span>
+                <div>
+                    <el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"
+                                 :titles="['教练列表', '已添加教练']"></el-transfer>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="confirmClassFinish">确定</el-button>
+                <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
     </div>
 </template>
 
@@ -191,6 +223,9 @@
         SelectHrSensors,
         BindHrSensorsToUser,
         UnBindHrSensorsToUser,
+        ClassStartConfirm,
+        ShopManagerListQuery,
+        ClassOverConfirm,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -200,6 +235,8 @@
                 serachBtnStatus: false,
                 tableData: [],
                 title: '',
+                ClassStateText: '',
+                FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
                 dialogVisible: false,//添加下课会员
                 dialogFinishVisible: false,//确认下课dialog
                 dialogLesson: false,//课时调整
@@ -281,17 +318,25 @@
         mounted() {
             this.getTableQuery();
             this.getSelectHrSensors();
+            this.FinishClass = this.$route.query.FinishClass;
             this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
         },
         methods: {
-            // 获取心率带列表
+            // 请选心率带
             bindSensorToUser(row) {
                 let that = this;
-                let Sn = '';
                 let obj = {};
+                // 未到用户不能绑心率带
+                if(row.Status == 2){
+                    row.BindId = 0;
+                    that.$message.error("会员未到不能绑定心率带");
+                    return false
+                }
                 obj = this.panel.bindList.find((item) => {
                     return item.HrId === row.BindId;
                 });
+                // let oldSn = row.BindId == 0 ? row.Sn : '';
+                let oldSn = "";
                 let param = {
                     token: localStorage.token,
                     cfId: row.CfId,
@@ -320,7 +365,13 @@
             // 设备回收
             takeBack(row) {
                 let that = this;
-                this.$confirm('是否回收用户' + row.Name + '的心率设备?', '回收操作', {
+                let text = "";
+                if (this.$route.query.FinishClass == 2) {
+                    text = '当前上课种是否回收用户' + row.Name + '的心率设备?(回收将重置用户的上课成绩)'
+                } else {
+                    text = '是否回收用户' + row.Name + '的心率设备?'
+                }
+                this.$confirm(text, '回收操作', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -358,13 +409,144 @@
             },
             // 确认下课
             addFinish() {
-                // this.clearForm();
-                // // 重新获得教练名单
-                // this.getCoachOption();
-                // this.dialogFinishVisible = true
-                // this.btnType = 0;
+                this.clearForm();
+                // 重新获得教练名单
+                this.getCoachOption();
+                this.dialogFinishVisible = true;
+                this.btnType = 0;
                 this.dialogTitle = '确认下课'
             },
+            // 获取教练选项
+            getCoachOption() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    name: this.panel.name,//
+                    phone: this.panel.phone,//
+                    shopId: localStorage.ShopId,//
+                    adminType: 4,//
+                    start: 1,//
+                    tableMax: 299,//
+                };
+                let postdata = qs.stringify(param);
+                ShopManagerListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认下课
+            confirmClassFinish() {
+                let that = this;
+                // checkNum
+                let userlist = that.dialogCoachValue.toString();
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.StdId,
+                    teacherList: userlist
+                };
+                let postdata = qs.stringify(param);
+                // 下课记录详情添加
+                ClassOverConfirm(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogFinishVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '当前课程已确认下课!',
+                            type: 'success'
+                        });
+                        // 返回下课列表
+                        // that.$router.push({path: '/finish'});
+                        this.$router.go(-1);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认上课
+            confirmBegin() {
+                let that = this;
+                // 没绑心率带不能开课,预约未到的不管他
+                for (var i = 0; i < this.tableData.length; i++) {
+                    if (this.tableData[i].BindId == 0 && this.tableData[i].Status != 2) {
+                        that.$message.error("会员" + this.tableData[i].Name + '没绑心率带,不能开课');
+                        return false
+                    }
+                }
+                let duRs = [];
+                // "sn":"10001",//心率带
+                // "group_no":0,// 0不分队 1蓝队 2红队 3黄队
+                // "begin_time":1605686788,//开始上课时间戳
+                // "name":"张三",
+                // "head":"http://192.168.0.2/lhs.png",
+                // "static_hr":100,
+                // "sex":1,//性别
+                // "height":176,
+                // "age":40,
+                // "user_id":50,
+                // "weight":1000
+                let row;
+                let begin_time = parseInt(new Date().valueOf() / 1000);
+                // 拼装上课人员信息
+                for (var i = 0; i < this.tableData.length; i++) {
+                    row = this.tableData[i];
+                    // 过滤预约未到
+                    if (row.Status != 2) {
+                        duRs[i] = {
+                            sn: row.Sn,
+                            group_no: 0,//0不分队 1蓝队 2红队 3黄队
+                            begin_time: begin_time,
+                            name: row.Name,
+                            head: row.Head,
+                            static_hr: row.StaticHr,
+                            sex: row.Sex,
+                            height: row.Height,
+                            age: row.Age,
+                            user_id: row.UserId,
+                            weight: row.Weight,
+                        }
+                    }
+                }
+                // 确认上课
+                this.getClassStartConfirm(duRs);
+            },
+            // 确认上课
+            getClassStartConfirm(duRs) {
+                duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.StdId,
+                    duRs: duRs
+                };
+                let postdata = qs.stringify(param);
+                ClassStartConfirm(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '确认上课成功!',
+                            type: 'success'
+                        });
+
+                        // 返回课程管理
+                        that.$router.push({
+                            path: '/courses', query: {}
+                        });
+                        // that.FinishClass = 2;
+                        // that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             // 添加下课会员
             addFinishMember() {
                 let that = this;
@@ -498,14 +680,14 @@
             query() {
                 let that = this;
                 that.serachBtnStatus = true;
-                let totalTime = 2
+                let totalTime = 2;
                 let clock = window.setInterval(() => {
-                    totalTime--
+                    totalTime--;
                     if (totalTime < 0) {
                         totalTime = 2;
                         that.serachBtnStatus = false;
                     }
-                }, 1000)
+                }, 1000);
                 this.getTableQuery();
                 this.$message.success('查询完毕');
             },
@@ -557,11 +739,14 @@
                         that.loading = false;
                         if (json.Rs) {
                             that.panel.bindList = json.Rs;
+                            json.Rs.map(function (item, i) {
+                                item.label = "Sn:" + item.Sn;
+                            });
                             that.panel.bindList.push({
                                 HrId: 0,
-                                InVenueNo: '请选择心率带'
+                                label: "请选择心率带",
+                                InVenueNo: 0
                             });
-                            console.log(that.panel.bindList);
                         } else {
                             that.panel.bindList = [];
                         }
@@ -617,14 +802,74 @@
                     return nonTfmtDate(column, 11);
                 }
             },
+            // 提交单人
+            getClassDetailAndSnAdd(row) {
+                let begin_time = parseInt(new Date().valueOf() / 1000);
+                let duRs = [];
+                if (!row.Sn) {
+                    this.$message.error(row.Name + '没有绑定心率带');
+                    return false
+                }
+                // 拼装上课人员信息
+                duRs[0] = {
+                    sn: row.Sn,
+                    group_no: 0,//0不分队 1蓝队 2红队 3黄队
+                    begin_time: begin_time,
+                    name: row.Name,
+                    head: row.Head,
+                    static_hr: row.StaticHr,
+                    sex: row.Sex,
+                    height: row.Height,
+                    age: row.Age,
+                    user_id: row.UserId,
+                    weight: row.Weight,
+                };
+                duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.$route.query.StdId,
+                    duRs: duRs
+                };
+                let postdata = qs.stringify(param);
+                ClassDetailAndSnAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '提交成功!',
+                            type: 'success'
+                        });
+                        this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            }
         },
         watch: {
             $route(to) {
                 if (to.name == 'courseEdit') {
                     this.getTableQuery();
+                    this.FinishClass = this.$route.query.FinishClass;
                     this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
                 }
             },
+            FinishClass(to) {
+                switch (parseInt(to)) {
+                    case 1:
+                        this.ClassStateText = "已下课";
+                        break;
+                    case 2:
+                        this.ClassStateText = "已上课";
+                        break;
+                    case 3:
+                        this.ClassStateText = "准备上课";
+                        break;
+
+                }
+
+            }
         },
     }
 </script>
@@ -642,7 +887,6 @@
     }
 
     .classNames {
-        width: 211px;
         height: 25px;
         background: #f0f2f5;
         font-family: "Source Han Sans CN";
@@ -654,6 +898,8 @@
         margin-top: 15px;
         margin-bottom: 3px;
         float: left;
+        padding-left: 10px;
+        padding-right: 10px;
     }
 
     .head {
@@ -670,10 +916,6 @@
         margin: 0 auto;
     }
 
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        float: left;
-        left: 20%;
-    }
 
     /*.panel-body {*/
     .panel_control {
@@ -704,4 +946,20 @@
         float: left;
         color: #000;
     }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        /*float: left;*/
+        left: 10%;
+    }
+
+    /*/deep/ .el-checkbox  .el-checkbox {*/
+    /*margin-right: 1px;*/
+    /*}*/
+    /deep/ .el-checkbox__label span {
+        width: 100%;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        float: left;
+    }
 </style>

+ 4 - 2
pc/src/views/courses.vue

@@ -85,6 +85,7 @@
                         <span v-if="scope.row.FinishClass == 1">已下课</span>
                         <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
                         <span v-if="scope.row.FinishClass == 3">准备上课</span>
+                        <span v-if="scope.row.FinishClass == 4">已完成</span>
                     </template>
                 </el-table-column>
                 <el-table-column
@@ -111,7 +112,8 @@
                         >
                             编辑
                         </el-button>
-                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 1"
+                        <!--已完成才能看详情-->
+                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 4"
                                    @click="seeDetail(scope.row)"
                         >
                             详情
@@ -238,7 +240,7 @@
                         {value: 1, label: '当日'},
                     ],
                     time1: globalBt(),
-                    timeScope: globalBt2(1),
+                    timeScope: globalBt2(0),
                 },
                 multipleSelection: [],
                 pageination: {

+ 1 - 1
pc/src/views/heartEquip.vue

@@ -290,7 +290,7 @@
             },
             goPage(row) {
                 // 查看绑定记录
-                this.$router.push({path: '/bindRecord', id: row.id});
+                this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
             },
             // 编辑
             editList() {

+ 2 - 2
pc/src/views/heartLog.vue

@@ -251,8 +251,8 @@
                 this.form.password = '';
                 this.form.phone = row.Phone;
                 this.form.eqId = row.EqId;
-                this.form.eqSn = row.EqSn;
-                this.form.version = row.Version;
+                this.form.eqSn = row.EqSn.trim();
+                this.form.version = row.Version.trim();
                 this.form.equipType = row.EquipType;
                 this.form.memo = row.Memo;
                 this.form.adminType = row.AdminType;

+ 1 - 1
pc/src/views/region.vue

@@ -47,7 +47,7 @@
                         width="180">
                     <!--1:启用,8:暂停,9:删除-->
                     <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1" style="color: greenyellow">已启用</span>
+                        <span v-if="scope.row.Status == 1" style="color: rgb(103, 194, 58)">已启用</span>
                         <span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>
                         <span v-if="scope.row.Status == 9" style="color: red">已删除</span>
                     </template>

+ 74 - 57
tv/.idea/workspace.xml

@@ -24,16 +24,27 @@
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
       <change afterPath="$PROJECT_DIR$/../pc/src/components/upHead.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/Global.js" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../pc/src/server/app.js" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../pc/src/server/config.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/api/Navs.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/Navs.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/assets/css/panel.css" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/assets/css/panel.css" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/components/Navside.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/components/Navside.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/router/index.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/Member.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Member.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/Test.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Test.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/bindRecord.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/bindRecord.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/classInfoDetail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/classInfoDetail.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/courses.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courses.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/region.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/region.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/api/Navs.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/Navs.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/components/Headside.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/Headside.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Main.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Wait.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Wait.vue" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -46,23 +57,20 @@
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file pinned="false" current-in-tab="true">
+      <file pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="213">
-              <caret line="347" column="29" lean-forward="true" selection-start-line="334" selection-start-column="26" selection-end-line="347" selection-end-column="29" />
+            <state relative-caret-position="420">
+              <caret line="20" column="22" lean-forward="true" selection-start-line="20" selection-start-column="22" selection-end-line="20" selection-end-column="22" />
             </state>
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/components/Headside.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="462">
-              <caret line="258" column="10" lean-forward="true" selection-start-line="258" selection-start-column="10" selection-end-line="258" selection-end-column="10" />
-              <folding>
-                <element signature="e#5168#5212#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="265">
+              <caret line="36" column="40" selection-start-line="36" selection-start-column="40" selection-end-line="36" selection-end-column="40" />
             </state>
           </provider>
         </entry>
@@ -81,20 +89,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>ClassStat</find>
-      <find>UserListInfo</find>
-      <find>pageStyle</find>
-      <find>fmt</find>
-      <find>then</find>
-      <find>fmtFloat</find>
-      <find>ClassDetailQuery</find>
-      <find>rank</find>
-      <find>eqSn</find>
-      <find>autoUpdate</find>
-      <find>h</find>
-      <find>eqsn</find>
-      <find>getHello</find>
-      <find>GetgetUserList</find>
       <find>sta</find>
       <find>getRecordBreak</find>
       <find>getClassStat</find>
@@ -105,12 +99,26 @@
       <find>push</find>
       <find>.push</find>
       <find>json.dp</find>
-      <find>curgetClassStat</find>
       <find>wait</find>
       <find>timer2</find>
       <find>OpenEgg</find>
-      <find>timer</find>
       <find>createEgg</find>
+      <find>课程管理</find>
+      <find>mymove</find>
+      <find>timer</find>
+      <find>curgetClassStat</find>
+      <find>trueDate</find>
+      <find>that.autoplayStatus = true;</find>
+      <find>curin</find>
+      <find>transition</find>
+      <find>clearInterval</find>
+      <find>curIndex</find>
+      <find>recordMain</find>
+      <find>getcurIndex</find>
+      <find>bottom</find>
+      <find>fmtNum</find>
+      <find>console.log(&quot;ClassOn:&quot; + json.ClassOn);</find>
+      <find>el-fade-in-linear</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
@@ -118,9 +126,10 @@
       <replace>font-family: vista;</replace>
       <replace>eqSn</replace>
       <replace>JSON.stringify(e.uuid)</replace>
-      <replace>rankTimer</replace>
-      <replace>waitTimer</replace>
       <replace>mainTimer</replace>
+      <replace>waitTimer</replace>
+      <replace>rankTimer</replace>
+      <replace>el-zoom-in-top</replace>
     </replaceStrings>
   </component>
   <component name="Git.Settings">
@@ -142,7 +151,6 @@
         <option value="$PROJECT_DIR$/src/components/newRecord.vue" />
         <option value="$PROJECT_DIR$/src/Mock/index.js" />
         <option value="$PROJECT_DIR$/src/App.vue" />
-        <option value="$PROJECT_DIR$/src/components/Headside.vue" />
         <option value="$PROJECT_DIR$/src/views/gropePk.vue" />
         <option value="$PROJECT_DIR$/src/api/test.js" />
         <option value="$PROJECT_DIR$/src/Global.js" />
@@ -152,10 +160,12 @@
         <option value="$PROJECT_DIR$/src/assets/css/bg.css" />
         <option value="$PROJECT_DIR$/vue.config.js" />
         <option value="$PROJECT_DIR$/src/views/Index.vue" />
-        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
         <option value="$PROJECT_DIR$/src/views/Rank.vue" />
-        <option value="$PROJECT_DIR$/src/views/Main.vue" />
         <option value="$PROJECT_DIR$/src/components/upimg.vue" />
+        <option value="$PROJECT_DIR$/src/api/Navs.js" />
+        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
+        <option value="$PROJECT_DIR$/src/views/Main.vue" />
+        <option value="$PROJECT_DIR$/src/components/Headside.vue" />
       </list>
     </option>
   </component>
@@ -165,10 +175,10 @@
     <other-services-enabled>true</other-services-enabled>
     <auto-save>true</auto-save>
   </component>
-  <component name="ProjectFrameBounds" extendedState="1">
-    <option name="x" value="-1287" />
+  <component name="ProjectFrameBounds">
+    <option name="x" value="-2567" />
     <option name="width" value="1294" />
-    <option name="height" value="1386" />
+    <option name="height" value="1379" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
@@ -322,7 +332,7 @@
       <workItem from="1605406240238" duration="51039000" />
       <workItem from="1605668164423" duration="15041000" />
       <workItem from="1605747566783" duration="13000" />
-      <workItem from="1605775278675" duration="36812000" />
+      <workItem from="1605775278675" duration="44441000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -419,10 +429,10 @@
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="266904000" />
+    <option name="totallyTimeSpent" value="274533000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-1287" y="0" width="1294" height="1386" extended-state="1" />
+    <frame x="-2567" y="0" width="1294" height="1379" extended-state="0" />
     <editor active="true" />
     <layout>
       <window_info content_ui="combo" id="Project" order="0" weight="0.29641694" />
@@ -639,13 +649,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/components/Headside.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="509">
-          <caret line="113" column="17" selection-start-line="113" selection-start-column="17" selection-end-line="113" selection-end-column="17" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/Mock/index.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="932">
@@ -706,13 +709,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/Global.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2219">
-          <caret line="390" selection-start-line="390" selection-end-line="390" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/main.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="294">
@@ -772,20 +768,41 @@
         <state relative-caret-position="-3276" />
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/api/Navs.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="359">
+          <caret line="22" column="24" selection-start-line="22" selection-start-column="20" selection-end-line="22" selection-end-column="24" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="420">
+          <caret line="20" column="22" lean-forward="true" selection-start-line="20" selection-start-column="22" selection-end-line="20" selection-end-column="22" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/Global.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="480">
+          <caret line="68" column="21" lean-forward="true" selection-start-line="64" selection-start-column="1" selection-end-line="68" selection-end-column="21" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="462">
-          <caret line="258" column="10" lean-forward="true" selection-start-line="258" selection-start-column="10" selection-end-line="258" selection-end-column="10" />
+        <state relative-caret-position="332">
+          <caret line="379" column="30" lean-forward="true" selection-start-line="379" selection-start-column="30" selection-end-line="379" selection-end-column="30" />
           <folding>
             <element signature="e#5168#5212#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
+    <entry file="file://$PROJECT_DIR$/src/components/Headside.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="213">
-          <caret line="347" column="29" lean-forward="true" selection-start-line="334" selection-start-column="26" selection-end-line="347" selection-end-column="29" />
+        <state relative-caret-position="265">
+          <caret line="36" column="40" selection-start-line="36" selection-start-column="40" selection-end-line="36" selection-end-column="40" />
         </state>
       </provider>
     </entry>

+ 2 - 2
tv/src/api/Navs.js

@@ -25,7 +25,7 @@ let navs = [
         "prname": "",
         "show": 3,
         "grouplist": "2,5",
-        "icon": "el-icon-collection",
+        "icon": "el-icon-s-cooperation",
     }, {
         "clmid": "4",
         "clmcode": "lessonTable",
@@ -161,7 +161,7 @@ let navs = [
         "prname": "",
         "show": 4,
         "grouplist": "2,5",
-        "icon": "el-icon-collection",
+        "icon": "el-icon-s-cooperation",
     }, {
         "clmid": "5",
         "clmcode": "lessonManage",

+ 9 - 3
tv/src/components/Headside.vue

@@ -27,9 +27,15 @@
             }
         },
         mounted() {
-            this.timer = setInterval(() => {
+            this.nowtimer = setInterval(() => {
+                console.time('计时器1');
+                let date = new Date();
+                let h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
+                let m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
+                let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+                this.nowTime =  h + m + s;
+                console.timeEnd('计时器1');
                 this.nowDayFunc();
-                this.nowTimeFunc();
             }, 1000);
             this.getCurVersion();
             if (localStorage.version) {
@@ -47,7 +53,7 @@
                 this.nowDay = globalcurrent();
             },
             nowTimeFunc() {
-                this.nowTime = getHoursAndMinAndSec();
+
             },
             // 获取当前版本
             getCurVersion() {

+ 24 - 24
tv/src/views/Main.vue

@@ -17,7 +17,8 @@
                                 <img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">
                             </div>
                             <div class="cla">
-                                <em v-if="s.activePercent != 0">{{ s.activePercent |fmtNum }}</em>
+                                <!--<em v-if="s.activePercent != 0">{{  s.activePercent |fmtNum }}</em>-->
+                                <em v-if="s.activePercent != 0">{{ s.activePercent }}</em>
                                 <em class="plus" v-if="s.activePercent == 0">
                                     ---
                                 </em>
@@ -233,8 +234,6 @@
                     this.students = this.fakeNews();
                     this.giveClassName(this.students);
                 }, 1000);
-
-
             }
 
 
@@ -331,25 +330,26 @@
                 getHello(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        // 返回空值不处理
-                        if (that.times == 1) {
-                            that.students = json.Rs;
-                            if (!json.Rs) return false;
-                            // // 添加头像 和 姓名 ..
-                            that.times++
-                        } else {
-                            if (localStorage.result != JSON.stringify(json.Rs)) {
-                                that.students = json.Rs;
-                                // this.createEgg(this.students[1]);
-                                if (!json.Rs) return false;
-                                // // 添加头像 和 姓名
-                                // that.students.map(function (i, v) {
-                                //     i.head = that.headImg[v].name;
-                                //     i.userNmae = that.nameList[v].name
-                                // });
-                            }
-                            localStorage.res = JSON.stringify(json.Rs);
-                        }
+                        that.students = json.Rs;
+                        // // 返回空值不处理
+                        // if (that.times == 1) {
+                        //     that.students = json.Rs;
+                        //     if (!json.Rs) return false;
+                        //     // // 添加头像 和 姓名 ..
+                        //     that.times++
+                        // } else {
+                        //     if (localStorage.result != JSON.stringify(json.Rs)) {
+                        //         that.students = json.Rs;
+                        //         // this.createEgg(this.students[1]);
+                        //         if (!json.Rs) return false;
+                        //         // // 添加头像 和 姓名
+                        //         // that.students.map(function (i, v) {
+                        //         //     i.head = that.headImg[v].name;
+                        //         //     i.userNmae = that.nameList[v].name
+                        //         // });
+                        //     }
+                        //     localStorage.res = JSON.stringify(json.Rs);
+                        // }
 
                         that.giveClassName(json.Rs);
                         // test 启动一个成就彩蛋
@@ -357,6 +357,7 @@
                     } else {
                         // 已下课
                         if (json.Code == '999') {
+                            that.students = ""
                             // 没人不做处理
                             //     that.$router.push({path: '/rank'});
                         } else {
@@ -377,8 +378,7 @@
                     let json = res;
                     if (json.Code == 0) {
                         // 没开课
-                        console.log("ClassOn:" + json.ClassOn);
-                        if  (json.ClassOn== 0){
+                        if (json.ClassOn == 0) {
                             console.log("xiakele ");
                             // 1:团课
                             // 2:竞技课PK

+ 24 - 8
tv/src/views/Wait.vue

@@ -4,8 +4,9 @@
         <div class="rankContainer">
             <div class="lt">
                 <div class="recordMain">
-                    <el-carousel :interval="30000" height="370px">
+                        <el-carousel :interval="30000" height="370px" :autoplay="autoplayStatus">
                         <el-carousel-item v-for="rs in recordMain">
+                        <div v-show="t == curIndex" v-for="(rs,t) in recordMain" v-bind:key="t">
                             <h5>{{rs.Title}}</h5>
                             <div class="sumContainer">
                                 <div class="sum">
@@ -14,11 +15,12 @@
                                 </div>
                                 <span class="sumBg"></span>
                             </div>
+                        </div>
                         </el-carousel-item>
-                    </el-carousel>
+                        </el-carousel>
                 </div>
                 <div class="bottom">
-                    <el-carousel :interval="15000" height="280px">
+                    <el-carousel :interval="15000" height="280px" :autoplay="autoplayStatus">
                         <el-carousel-item v-for="Rs in bottom">
                             <div class="topOne" v-if="Rs.Style == 'tops'">
                                 <h5>{{Rs.Title}}</h5>
@@ -49,7 +51,8 @@
                                     <li v-for="(hero,i) in Rs.Result">
                                         <img :id="'circle_'+i"
                                              v-bind:src="hero.Head" alt="" v-if="hero.Head">
-                                        <img :id="'circle_'+i" v-bind:src="require('../static/img/people/flyhead.png')"
+                                        <img :id="'circle_'+i"
+                                             v-bind:src="require('../static/img/people/flyhead.png')"
                                              alt="" v-if="!hero.Head">
                                         <img src="../static/img/wait/boy.png" class="sex" v-if="hero.Sex == 1"/>
                                         <img src="../static/img/wait/girl.png" class="sex" v-if="hero.Sex == 2"/>
@@ -65,7 +68,7 @@
                 </div>
             </div>
             <div class="rt">
-                <el-carousel :interval="15000" height="610px">
+                <el-carousel :interval="15000" height="610px" :autoplay="autoplayStatus">
                     <el-carousel-item v-for="Rs in rt">
                         <h5>{{Rs.Title}}</h5>
                         <ul>
@@ -102,12 +105,14 @@
                 eqSn: '30:9C:23:0C:8B:1E',
                 pageStyle: RandomBg(),
                 trueDate: true,//真实数据 true false
+                autoplayStatus: false,// false
                 fakeNums: 8,//
                 unite: '卡路里',
                 topMsg: '',
                 students: [],
                 studentsLimit: [],
                 showType: 2,//1 单人
+                curIndex: false,//1 单人
                 recordMain: [],
                 bottom: {},
                 rt: [],
@@ -116,6 +121,10 @@
         },
         mounted() {
             if (this.trueDate) {
+                this.getcurIndex = setInterval(() => {
+                    this.curIndex = this.curIndex == 0 ? 1 : 0;
+                }, 3000);
+
                 this.waitTimer = setInterval(() => {
                     // this.GetgetUserList();
                     this.curgetClassStat();
@@ -123,6 +132,8 @@
                     this.GetCalorieStatsQuery();
                     this.GetUserRankingQuery();
                 }, 1000);
+
+                this.autoplayStatus = true;
             } else {
                 this.students = this.fakeNews();
                 this.studentsLimit = this.fakeNewsLimit();
@@ -191,7 +202,6 @@
                         Result: this.fakeNews(),
                     }
                 ];
-                console.log(this.rt[0].Result);
                 this.recordMain = [
                     {
                         Title: '本周场馆卡路里总消耗',
@@ -313,7 +323,6 @@
                 })
             },
             curgetClassStat() {
-                console.log(123);
                 let that = this;
                 let param = {
                     token: localStorage.token,
@@ -327,7 +336,7 @@
                         // alert(JSON.stringify(json.ClassOn));
                         // alert("alert:"+json.ClassOn);
                         // 上课了
-                        if  (json.ClassOn== 1){
+                        if (json.ClassOn == 1) {
                             // 1:团课
                             // 2:竞技课PK
                             // 3:私教课
@@ -363,12 +372,15 @@
                             this.GetCalorieStatsQuery();
                             this.GetUserRankingQuery();
                         }, 1000);
+
+                        this.autoplayStatus = true;
                     } else {
                         this.students = this.fakeNews();
                         this.topMsg = this.students[0];
                     }
                 } else {
                     clearInterval(this.waitTimer);
+                    clearInterval(this.getcurIndex);
                 }
             }
         },
@@ -412,6 +424,10 @@
         width: 40%;
         float: right;
     }
+    .recordMain {
+        /*height: 6rem;*/
+        overflow: hidden;
+    }
 
     .rankContainer .lt .recordMain h5 {
         font-family: vista;