zhengwei il y a 4 ans
Parent
commit
4d4d127233

+ 27 - 1
app/src/Global.js

@@ -1,4 +1,6 @@
-headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
+
+headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';//课程系统接口
+headbpi = process.env.NODE_ENV === 'development' ? '/bpi/' : 'http://cal.beswell.com:85/';//心率系统接口
 
 //Toast
 Toast = function (message, color) {
@@ -74,6 +76,17 @@ globalCheckPhone = function (val) {
         return true;
     }
 };
+/**
+ *获取当前星期几
+ *
+ */
+getWeekDate = function() {
+    let now = new Date();
+    let day = now.getDay();
+    let weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
+    let week = weeks[day];
+    return week;
+}
 
 // 格式化时间
 globalfmtDate = function (datetime, length) {
@@ -84,6 +97,19 @@ globalfmtDate = function (datetime, length) {
     length = !length ? 10 : length;//缺省参数
     return (datetime != null) ? datetime.substr(0, length) : '';
 };
+
+// 格式化时间去掉TimeZone
+dateFormatWithoutZone = function (datetime, length) {
+    if ((datetime == '') || (datetime == undefined))
+        return '';
+    if ((datetime == '1900-01-01') || (datetime == '1900-01-01 00:00:00.000'))
+        return '';
+    length = !length ? 10 : length;//缺省参数
+    datetime = new Date(+new Date(datetime) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '');
+    return (datetime != null) ? datetime.substr(0, length) : '';
+};
+
+
 //格式化日期  年月日
 globaltime2String = function (time) {
     let datetime = new Date();

+ 55 - 3
app/src/api/getApiRes.js

@@ -16,8 +16,6 @@ export function worldDetail(postdata) {
         return getApiBasic(url,postdata);
 }
 
-
-
 export function editbasicinfo(postdata) {
     let url = headapi + 'editbasicinfo';
     return getApiBasic(url,postdata);
@@ -157,11 +155,65 @@ export function QueryNextWeek(postdata) {
     return getApiBasic(url, postdata);
 }
 
-
 // 用户店铺信息查询
 export function MyShopQuery(postdata) {
     let url = headapi + 'v1/Weixin/MyShopQuery';
     return getApiBasic(url, postdata);
 }
 
+// 首页–上部个人课程统计卡片
+export function PersonCardStatistics(postdata) {
+    let url = headapi + 'v1/Weixin/PersonCardStatistics';
+    return getApiBasic(url, postdata);
+}
 
+// 首页–下部个人课程统计列表
+export function PersonClassStatistics(postdata) {
+    let url = headapi + 'v1/Weixin/PersonClassStatistics';
+    return getApiBasic(url, postdata);
+}
+
+// 首页–中部–三个个人上课情况月统计表
+export function PersonMonthStatistics(postdata) {
+    let url = headapi + 'v1/Weixin/PersonMonthStatistics';
+    return getApiBasic(url, postdata);
+}
+
+// 课程详细信息上部卡片
+export function PersonClassDetail(postdata) {
+    let url = headapi + 'v1/Weixin/PersonClassDetail';
+    return getApiBasic(url, postdata);
+}
+
+// 微信端课程统计页面,带分页
+export function PersonClassList(postdata) {
+    let url = headapi + '/v1/Weixin/PersonClassList';
+    return getApiBasic(url, postdata);
+}
+
+// 某课程动作评分查询
+export function PersonScoreClassQuery(postdata) {
+    let url = headapi + '/v1/Weixin/PersonScoreClassQuery';
+    return getApiBasic(url, postdata);
+}
+
+/**
+ *
+ *心率系统接口
+ *
+ */
+// 首页–中部–三个个人上课情况月统计表
+export function GetUserHistoryInfoByDuId(postdata) {
+    let url = headbpi + 'v1/OutService/GetUserHistoryInfoByDuId';
+    return getApiBasic(url, postdata);
+}
+// 微信端心率折线
+export function GetHrValueInfoByDuId(postdata) {
+    let url = headbpi + 'v1/OutService/GetHrValueInfoByDuId';
+    return getApiBasic(url, postdata);
+}
+//微信端课程运动强度柱状图信息
+export function GetSportPercentByDuId(postdata) {
+    let url = headbpi + 'v1/OutService/GetSportPercentByDuId';
+    return getApiBasic(url, postdata);
+}

+ 105 - 88
app/src/components/bottomTab.vue

@@ -1,106 +1,123 @@
 <template>
-    <div id="bottomTab">
-        <mu-container style="width: 100%;" color="primary">
-            <mu-bottom-nav :value="nowTab" color="#E75296">
-                <mu-bottom-nav-item v-for="tab in tabs" :title="tab.name" :icon="tab.src" :to="tab.class" :key="tab.tabindex"
-                                    :value="tab.name"></mu-bottom-nav-item>
-            </mu-bottom-nav>
-        </mu-container>
-    </div>
+  <div id="bottomTab">
+    <mu-container style="width: 100%;" color="primary">
+      <mu-bottom-nav :value="nowTab" color="#E75296">
+        <mu-bottom-nav-item v-for="tab in tabs" :title="tab.name" :icon="tab.src" :to="tab.class" :key="tab.tabindex"
+                            :value="tab.name"/>
+      </mu-bottom-nav>
+    </mu-container>
+  </div>
 </template>
 
 <script>
-    export default {
-        data() {
-            return {
-                nowTab: this.curTab,
-                tabs: [
-                    {name: '预约课程', class: '/', src: ' ', tabindex: 1},
-                    {name: '预约记录', class: 'record', src: ' ', tabindex: 2},
-                    {name: '我的', class: 'mine', src: ' ', tabindex: 3},
-                    //laptop
-                ]
-            }
-        },
-        props: ['curTab'],
-        methods: {},
-        watch: {
-            '$route': function (e) {
-                this.nowTab = e.meta.title;
-            }
-        },
+export default {
+  data() {
+    return {
+      nowTab: this.curTab,
+      tabs: [
+        {name: '预约课程', class: '/', src: ' ', tabindex: 1},
+        {name: '预约记录', class: 'record', src: ' ', tabindex: 2},
+        {name: '数据统计', class: 'report', src: ' ', tabindex: 3},
+        {name: '我的运动', class: 'mine', src: ' ', tabindex: 4},
+        //laptop
+      ]
     }
+  },
+  props: ['curTab'],
+  methods: {},
+  watch: {
+    '$route': function (e) {
+      this.nowTab = e.meta.title;
+    }
+  },
+}
 </script>
 
 <style scoped>
-    #bottomTab {
-        position: absolute;
-        bottom: 0;
-        width: 100%;
-        background: #fff;
-        border-top: 1px solid #eee;
-        z-index: 9999;
-    }
+#bottomTab {
+  position: absolute;
+  bottom: 0;
+  width: 100%;
+  background: #fff;
+  border-top: 1px solid #eee;
+  z-index: 9999;
+}
 
-    .container {
-        padding: 0;
-    }
+.container {
+  padding: 0;
+}
 
-    /*非选中态图标 */
-    /deep/ a:nth-child(1) .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/Calendar@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/*非选中态图标 */
+/deep/ a:nth-child(1) .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/Calendar@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    /deep/ a:nth-child(2) .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/Newspaper@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/deep/ a:nth-child(2) .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/Newspaper@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    /deep/ a:nth-child(3) .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/User@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/deep/ a:nth-child(3) .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/Report@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    /*选中态图标*/
-    /deep/ a:nth-child(1).mu-bottom-item-active .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/CalendarRed@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/deep/ a:nth-child(4) .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/User@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    /deep/ a:nth-child(2).mu-bottom-item-active .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/NewspaperRed@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/*选中态图标*/
+/deep/ a:nth-child(1).mu-bottom-item-active .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/CalendarRed@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    /deep/  a:nth-child(3).mu-bottom-item-active .mu-bottom-item-icon {
-        background-image: url(../static/images/bottom/UserRed@2x.png);
-        background-repeat: no-repeat;
-        width: 24px;
-        height: 24px;
-        background-size: auto 24px;
-    }
+/deep/ a:nth-child(2).mu-bottom-item-active .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/NewspaperRed@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-     .mu-bottom-item-text {
-        color: #999999
-    }
+/deep/  a:nth-child(3).mu-bottom-item-active .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/ReportRed@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
 
-    .mu-bottom-item-active .mu-bottom-item-text {
-        color: #2b2b2b;
-    }
+/deep/  a:nth-child(4).mu-bottom-item-active .mu-bottom-item-icon {
+  background-image: url(../static/images/bottom/UserRed@2x.png);
+  background-repeat: no-repeat;
+  width: 24px;
+  height: 24px;
+  background-size: auto 24px;
+}
+
+.mu-bottom-item-text {
+  color: #999999
+}
+
+.mu-bottom-item-active .mu-bottom-item-text {
+  color: #2b2b2b;
+}
 </style>

Fichier diff supprimé car celui-ci est trop grand
+ 546 - 181
app/src/page/report.vue


+ 1139 - 0
app/src/page/reportLesson.vue

@@ -0,0 +1,1139 @@
+<template>
+  <div class="pages">
+    <!--顶部头像-->
+    <div class="headerInfo">
+      <img class="headBack" src="../static/images/main/banner_null.png" width="100%"/>
+      <div class="userInfo">
+        <img :src="user.Head" class="round_icon">
+        <span v-if="user.Sex == '男'">{{ user.Name }}</span>
+        <span v-else style="color: #E75296">{{ user.Name }}</span>
+      </div>
+    </div>
+    <div class="info">
+      <ul>
+        <li>
+          <em>{{ user.Height }}</em>
+          <span>身高cm</span>
+        </li>
+        <li>
+          <em>{{ user.Age }}</em>
+          <span>年龄</span>
+        </li>
+        <li>
+          <em>{{ user.Weight }}</em>
+          <span>体重kg</span>
+        </li>
+        <li>
+          <em>{{ user.Sex }}</em>
+          <span>性别</span>
+        </li>
+      </ul>
+    </div>
+
+    <!--以下是控制隐藏项-->
+    <!--全部课程-->
+    <div class="pageClass">
+      <mu-load-more
+          @refresh="refresh"
+          :refreshing="refreshing"
+          :loading="loading"
+          @load="load"
+      >
+        <em>全部课程</em>
+        <ul class="dayList">
+          <li class="dayDetail" v-for="classItem in classRs" @click="showLessonDetail(classItem)">
+            <span class="dayTitle">  {{ classItem.BeginTime | filterTime }}  {{
+                classItem.BeginTime | filterWeek
+              }} </span>
+            <span class="className" :style="{ background: classItem.ClassColor}">{{ classItem.ClassName }}</span>
+            <div class="sportDetail">
+              <ul>
+                <li>
+                  <em>
+                    <i class="fa-circle" style="background: #FF5800;"/>
+                    {{ classItem.Cle }}
+                  </em>
+                  <span>卡路里</span>
+                </li>
+                <li>
+                  <em>
+                    <i class="fa-circle" style="background: #FFA310;"/>
+                    {{ classItem.Ei }}
+                  </em>
+                  <span>运动强度EI</span>
+                </li>
+                <li>
+                  <em>
+                    <i class="fa-circle" style="background: #FFE13C;"/>
+                    {{ classItem.Ck }}
+                  </em>
+                  <span>CK</span>
+                </li>
+              </ul>
+              <div class="sportDuration">
+                <span>运动时长</span>
+                <em>{{ classItem.SportDuration }}</em>
+                <span>分钟</span>
+              </div>
+              <div class="sportView">
+                <span>详细信息</span>
+                <em>&gt;</em>
+              </div>
+            </div>
+          </li>
+        </ul>
+      </mu-load-more>
+    </div>
+
+    <!--底部课程统计-->
+    <bottomTab :curTab="thisTab"/>
+  </div>
+</template>
+
+<script>
+import axios from 'axios';
+import bottomTab from '../components/bottomTab'
+import {
+  VipUserSelfQuery,
+  PersonCardStatistics,
+  PersonClassStatistics,
+  PersonMonthStatistics, PersonClassList,
+} from '../api/getApiRes.js'
+
+let qs = require('qs');
+import Global from '../Global.js'
+// 引入基本模板
+let echarts = require('echarts/lib/echarts')
+// 引入柱状图组件
+require('echarts/lib/chart/bar')
+// 引入提示框和title组件
+require('echarts/lib/component/tooltip')
+require('echarts/lib/component/title')
+
+export default {
+  data() {
+    return {
+      thisTab: '数据统计',
+      testColor2: '#F2F2F2',
+      testColor: '#FFE58D',
+      screenWidth: document.body.clientWidth + 'px',
+      //控制页面开合
+      visiblePageClass: false,//全部课程显示
+      scrollTop: 190,
+      user: {
+        Name: '',
+        Age: '',
+        Height: '',
+        Weight: '',
+        Phone: '',
+        Sex: '',
+        Head: '',
+        CKToTal: 0,
+        CKMonth: 0,
+        CalorieMonth: 0,
+        CalorieTotal: 0,
+      },
+      classRs: [],
+      refreshing: false,
+      loading: false,
+      start: 1,
+      tableMax: 6,
+    }
+  },
+  watch: {
+    '$route'(to) {
+      if (to.name == 'reportLesson') {
+        this.getUserInfo();//获取用户基本信息
+        this.getClassReport();
+      }
+    },
+  },
+  mounted() {
+    let that = this;
+    that.getUserInfo();//获取用户基本信息
+    that.getClassReport();
+  },
+  methods: {
+    //获取用户基本信息
+    getUserInfo() {
+      let that = this;
+      let param = {
+        token: localStorage.token
+      };
+      let postData = qs.stringify(param);
+      VipUserSelfQuery(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.user = json.Rs;
+        } else {
+          that.$toast.message(json.Memo);
+        }
+      })
+    },
+    //获取课程统计
+    getClassReport() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        start: 0,
+        tableMax: 20
+      };
+      let postData = qs.stringify(param);
+      PersonClassList(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.classRs = json.Rs;
+        } else {
+          that.$toast.message(json.Memo);
+        }
+      })
+    },
+    refresh() {
+    },
+    load() {
+    },
+    showLessonDetail(classItem) {
+      this.$router.push({path: '/reportLessonDetail', query: {DuId: classItem.DuId, StdId: classItem.StdId}});
+    }
+  },
+  filters: {
+    hidePhone: function (val) {
+      let str = String(val)
+      let len = str.length;
+      if (len >= 7) {
+        let reg = str.slice(-8, -4)
+        return str.replace(reg, "****")
+      } else if (len < 7 && len >= 6) {
+        let reg = str.slice(-4, -2)
+        return str.replace(reg, "**")
+      }
+    },
+    fmtTime: function (value) {
+      if (!value) {
+        return 0
+      } else {
+      // js默认使用毫秒
+        value = value * 1000
+        let date = new Date(value);
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? ('0' + MM) : MM;
+        let d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        let h = date.getHours();
+        h = h < 10 ? ('0' + h) : h;
+        let m = date.getMinutes();
+        m = m < 10 ? ('0' + m) : m;
+        let s = date.getSeconds();
+        s = s < 10 ? ('0' + s) : s;
+        return y + '-' + MM + '-' + d;
+      }
+    },
+    filterTime: function (value) {
+      if (!value) {
+        return 0;
+      } else {
+        return dateFormatWithoutZone(value, 16);
+      }
+    },
+    filterWeek: function (value) {
+      if (!value) return false;
+      let days = new Date(value).getDay();
+      switch (parseInt(days)) {
+        case 1:
+          return "星期一";
+          break;
+        case 2:
+          return "星期二";
+          break;
+        case 3:
+          return "星期三";
+          break;
+        case 4:
+          return "星期四";
+          break;
+        case 5:
+          return "星期五";
+          break;
+        case 6:
+          return "星期六";
+          break;
+        case 0:
+          return "星期天";
+          break;
+      }
+    },
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //因为当钩子执行前,组件实例还没被创建
+      // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
+      if (to.name == 'reportLesson') {
+        vm.getUserInfo();
+      }
+    });
+  },
+  components: {
+    bottomTab
+  }
+}
+</script>
+
+<style scoped>
+.pages {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #F2F2F2;
+}
+
+.headerInfo {
+  position: relative;
+}
+
+.headerInfo .headBack {
+  height: 120px;
+  position: absolute;
+  z-index: 1;
+}
+
+.headerInfo .userInfo {
+  left: 42%;
+  top: 1.25rem;
+  position: absolute;
+  z-index: 2;
+  text-align: center;
+}
+
+.headerInfo .userInfo span {
+  font-size: 16px;
+  color: #028FE1;
+  display: block;
+  margin-top: 5px;
+}
+
+.round_icon {
+  width: 64px;
+  height: 64px;
+  display: flex;
+  border-radius: 50%;
+  align-items: center;
+  justify-content: center;
+  overflow: hidden;
+  margin-bottom: 3px;
+  border: solid 2px white;
+}
+
+.info {
+  background: #fff;
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 120px;
+}
+
+.info ul {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+
+.info li {
+  width: 25%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  float: left;
+  text-align: center;
+}
+
+.info li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.info li:nth-child(3) {
+  border-color: #e2e2e2;
+  border-left: 0;
+}
+
+.info li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #363636;
+  font-size: 20px;
+  text-align: center;
+}
+
+.info li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 12px;
+  text-align: center;
+}
+
+.tag {
+  height: 252px;
+}
+
+.tag .card {
+  width: 45%;
+  float: left;
+  height: 106px;
+  margin-left: 3%;
+  margin-top: 20px;
+  border-radius: 13px;
+  background: linear-gradient(#FFFFFF, #FFD4D3);
+}
+
+.tag .card .row1 img {
+  margin-left: 10px;
+  margin-top: 10px;
+  width: 17px;
+  height: 18px;
+  float: left;
+}
+
+.tag .card .row1 em {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  line-height: 40px;
+  margin-left: 7px;
+  color: #3b3b3b;
+}
+
+.tag .card .row2 span {
+  font-family: "PingFang SC";
+  font-size: 22px;
+  font-weight: bold;
+  margin-left: 35px;
+  color: #363636;
+}
+
+.tag .card .row2 em {
+  font-family: "PingFang SC";
+  font-size: 10px;
+  margin-left: 5px;
+  color: #909090;
+}
+
+.tag .card .row3 span {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  margin-left: 35px;
+  color: #363636;
+}
+
+.tag .card .row3 em {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  margin-left: 5px;
+  color: #363636;
+}
+
+.reportCalorie {
+  margin-top: 10px;
+  background: #FFF;
+  color: #FF5800;
+}
+
+.reportCalorie .title {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  background: #FFF;
+}
+
+.fa-square {
+  background: #FF5800;
+  height: 8px;
+  width: 8px;
+  float: left;
+  margin-left: 15px;
+  margin-top: 5px;
+  margin-right: 5px;
+}
+
+.fa-circle {
+  width: 8px;
+  height: 8px;
+  border-radius: 100%;
+  background: #c40b0b;
+  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2);
+}
+
+.sportPower {
+  font-size: 18px;
+  margin-bottom: -30px;
+}
+
+.chartCalorie {
+  text-align: center;
+  width: 95%;
+  height: 200px;
+  margin-top: -35px;
+  margin-left: 5%;
+}
+
+.classReport {
+  background: #F2F2F2;
+}
+
+.reportCalorie ul {
+  padding-bottom: 100px;
+  margin-top: 0px;
+}
+
+.classReport li {
+  width: 100%;
+  margin-top: 1px;
+  background: #FFF;
+  height: 66px;
+  padding-left: 15px;
+  float: left;
+}
+
+.classReport li .className {
+  width: 25%;
+  height: 28px;
+  line-height: 28px;
+  background: #EBFFE3;
+  overflow: hidden;
+  font-size: 14px;
+  padding: 1px 11px;
+  border-radius: 250px;
+  float: left;
+  margin-top: 20px;
+  /*border: solid 1px #37CB00;*/
+  text-align: center;
+  color: #333;
+}
+
+.classReport li .calorieToTal {
+  float: left;
+  text-align: center;
+  display: block;
+  width: 25%;
+  margin-top: 15px;
+}
+
+.calorieToTal em {
+  width: 100%;
+  overflow: hidden;
+  color: black;
+  display: block;
+  font-size: 16px;
+}
+
+.calorieToTal span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 10px;
+  color: #C9C9C9;
+}
+
+/*pageClass*/
+.pageClass {
+  text-align: center;
+  margin-top: 15px;
+}
+
+.pageClass em {
+  text-align: center;
+  font-size: 16px;
+}
+
+.dayList .dayDetail {
+  background: #FFF;
+  margin-left: 5%;
+  margin-right: 5%;
+  height: 205px;
+  text-align: center;
+  border-radius: 6px;
+  margin-top: 15px;
+}
+
+.dayDetail .dayTitle {
+  font-size: 12px;
+  float: right;
+  margin-right: 23px;
+  margin-top: 16px;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  color: #9A9A9A;
+}
+
+.dayDetail .className {
+  width: 85px;
+  height: 28px;
+  line-height: 28px;
+  background: #EBFFE3;
+  overflow: hidden;
+  font-size: 14px;
+  padding: 1px 11px;
+  border-radius: 250px;
+  float: left;
+  margin-left: 15px;
+  margin-top: 13px;
+  /*border: solid 1px #37CB00;*/
+  text-align: center;
+  color: #333;
+}
+
+.dayDetail .sportDetail {
+  padding-top: 50px;
+  text-align: center;
+}
+
+.sportDetail ul {
+  width: 90%;
+  margin-top: 5px;
+  margin-left: 5%;
+  height: 65px;
+  border-bottom: 1px solid #EFEFEF;
+}
+
+.sportDetail ul li em i {
+  float: left;
+  margin-top: 10px;
+  margin-left: 10px;
+}
+
+.sportDetail li {
+  width: 33%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  text-align: center;
+  float: left;
+}
+
+.sportDetail li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.sportDetail li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-size: 22px;
+  font-weight: bold;
+  text-align: right;
+  padding-right: 8px;
+}
+
+.sportDetail li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 12px;
+  text-align: right;
+  padding-right: 8px;
+}
+
+.sportDetail .sportDuration {
+  text-align: center;
+  margin: 0 auto;
+  width: 90%;
+  height: 40px;
+  border-bottom: 1px solid #EFEFEF;
+}
+
+.sportDetail .sportDuration em {
+  color: #028FE1;
+  margin-left: 5px;
+  margin-right: 5px;
+}
+
+.sportDetail .sportDuration span {
+  font-size: 14px;
+  line-height: 40px;
+}
+
+.sportDetail .sportView {
+  height: 40px;
+}
+
+.sportDetail .sportView span {
+  float: left;
+  margin-left: 5%;
+  margin-top: 10px;
+  color: #848484;
+}
+
+.sportDetail .sportView em {
+  float: right;
+  font-weight: normal;
+  color: #C4C4C4;
+  margin-right: 5%;
+  margin-top: 10px;
+}
+
+
+.pageDetail {
+  text-align: center;
+  background: #FFF;
+  margin-top: 20px;
+  height: 1200px;
+}
+
+.pageDetail .btnBack {
+  float: left;
+  margin-left: 15px;
+  margin-top: 14px;
+  font-size: 16px;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  color: #ACACAC;
+}
+
+.pageDetail .classDetail {
+  display: inline-block;
+  *display: inline;
+  margin-right: 45px;
+  zoom: 1;
+  margin-top: 30px;
+}
+
+.pageDetail .detailTitle {
+  float: left;
+  background: #EBFFE3;
+  border-radius: 12px;
+  padding: 1px 15px;
+  border: solid 1.5px #37CB00;
+}
+
+.detailTitle span {
+  display: block;
+}
+
+.pageDetail .memberInfo {
+  margin-top: 5px;
+}
+
+.memberInfo em {
+  color: #FFA310;
+  font-size: 12px;
+}
+
+.memberInfo span {
+  font-size: 12px;
+  color: #909090;
+}
+
+.classInfo {
+  background: #FFF;
+  text-align: center;
+}
+
+.classInfo ul {
+  width: 80%;
+  margin-left: 10%;
+  height: 40px;
+  border-bottom: 1px solid #CCC;
+  padding-bottom: 50px
+}
+
+.classInfo li {
+  width: 33%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  text-align: center;
+  float: left;
+}
+
+.classInfo li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.classInfo li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-weight: bold;
+  color: #E75296;
+  font-size: 14px;
+  text-align: center;
+}
+
+.classInfo li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 10px;
+  text-align: center;
+}
+
+/**
+动作评分结果选项
+ */
+
+.pageScore {
+  background: #F2F2F2;
+  margin-top: 10px;
+}
+
+.pageScore .scoreTitle {
+  background: #FFF;
+}
+
+.pageScore span {
+  height: 50px;
+  font-size: 16px;
+  font-weight: bold;
+  padding-top: 10px;
+  text-align: center;
+  line-height: 50px;
+  font-family: "PingFang SC";
+}
+
+.pageScore .scoreContent {
+  margin-top: 5px;
+  font-weight: normal;
+}
+
+.pageScore .scoreContent li {
+  width: 100%;
+  background: #FFF;
+  height: 50px;
+  border-bottom: solid 1px #F2F2F2;
+}
+
+.pageScore .scoreContent li span {
+  font-weight: normal;
+}
+
+.pageScore .scoreContent li:first-child span {
+  font-weight: bold;
+}
+
+.pageScore .scoreContent li .left {
+  width: 50%;
+  float: left;
+  line-height: 30px;
+  text-align: right;
+  padding-right: 10%;
+  display: block;
+  border-right: 1px solid #F2F2F2;
+}
+
+.pageScore .scoreContent li .right {
+  /*background: #EBFFE3;*/
+  width: 50%;
+  float: left;
+  text-align: left;
+  padding-left: 10%;
+  line-height: 30px;
+  border-right: 1px solid #F2F2F2;
+  display: block;
+}
+
+.pageScore .scoreContent li .right em {
+  font-weight: normal;
+  margin-right: 20px;
+  color: #F2F2F2;
+  font-size: 14px;
+  float: right;
+}
+
+.user {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  height: 58px;
+  background: #fff;
+  padding: 17px 3%;
+  margin-bottom: 10px;
+}
+
+.user img {
+  width: 26.29px;
+  height: 26.29px;
+  float: left;
+  margin-right: 11px;
+}
+
+.user span {
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 18px;
+  text-align: left;
+  color: #3b3b3b;
+}
+
+.user em {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 18px;
+  text-align: left;
+  color: #3b3b3b;
+  float: right;
+}
+
+.user p {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 14px;
+  text-align: left;
+  color: #ffb43c;
+  float: right;
+  padding: 0;
+  margin: 0;
+  margin-left: 3px;
+  line-height: 26px;
+}
+
+.value {
+  width: 100%;
+  /*height: 131px;*/
+  background: #fff;
+  padding: 13px 0;
+}
+
+.value .vTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 15px;
+}
+
+.vTitle i {
+  width: 8px;
+  height: 8px;
+  display: inline-block;
+  border-radius: 250px;
+  margin-right: 3px;
+}
+
+.vTitle.year {
+  color: #E75296;
+}
+
+.vTitle.year i {
+  background: #e75296;
+}
+
+.vTitle.price {
+  color: #FFB43C;
+}
+
+.vTitle.price i {
+  background: #FFB43C;
+}
+
+.vNum {
+  width: 100%;
+  /*height: 25px;*/
+  overflow: hidden;
+  display: block;
+  margin: 5px auto;
+  margin-bottom: 0;
+}
+
+.center {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+}
+
+.vNum em {
+  position: relative;
+  float: right;
+  bottom: 20px;
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 12px;
+  color: #c9c9c9;
+  padding-right: 3%;
+}
+
+/deep/ .linear-progress {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  border-radius: 250px;
+}
+
+.limit {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 8px;
+}
+
+.limit em {
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 12px;
+  text-align: right;
+  color: #e75296;
+  padding-left: 10px;
+}
+
+.limit span {
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 12px;
+  text-align: right;
+  color: #909090;
+  float: right;
+  text-align: right;
+  padding-right: 10px;
+}
+
+.dataSum {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #fff;
+  margin-top: 10px;
+}
+
+.dataSum .row {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding: 2% 0;
+}
+
+.dataSum .row em {
+  float: left;
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 18px;
+  text-align: right;
+  color: #3b3b3b;
+}
+
+.dataSum .row span {
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 18px;
+  text-align: right;
+  color: #3b3b3b;
+  float: right;
+}
+
+.row .mid {
+  width: 66%;
+  height: 0px;
+  background: transparent;
+  border: 1px dotted #e0e0e0;
+  float: left;
+  margin-top: 11px;
+  margin-right: 5px;
+  margin-left: 10px;
+}
+
+.row .midl {
+  width: 54%;
+  height: 0px;
+}
+
+.login_btn {
+  width: 96%;
+  height: 50px;
+  line-height: 50px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 30px;
+  padding-left: 3%;
+  padding-right: 3%;
+  background: #E75296;
+  color: #fff;
+  font-size: 14px;
+  text-align: center;
+  border: none;
+  padding: 0;
+  font-size: 24px;
+}
+
+/deep/ .mu-warning-text-color {
+  float: left;
+}
+
+.vNum span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+}
+
+@media only screen and (max-width: 640px) {
+
+}
+
+@media only screen and (max-width: 480px) {
+
+}
+
+@media only screen and (max-width: 375px) {
+  .vNum em {
+    padding-right: 0 !important;
+  }
+
+  .row .mid {
+    width: 49%;
+  }
+
+  .row .midl {
+    width: 44%;
+    height: 0px;
+  }
+}
+
+@media only screen and (max-width: 360px) {
+  .vNum em {
+    padding-right: 0 !important;
+  }
+
+  .row .mid {
+    width: 49%;
+  }
+
+  .row .midl {
+    width: 44%;
+    height: 0px;
+  }
+}
+
+@media only screen and (max-width: 320px) {
+
+}
+
+@media only screen and (min-width: 641px) {
+
+}
+</style>

+ 1502 - 0
app/src/page/reportLessonDetail.vue

@@ -0,0 +1,1502 @@
+<template>
+  <div class="pages">
+    <!--顶部头像-->
+    <div class="headerInfo">
+      <img class="headBack" src="../static/images/main/banner_null.png" width="100%"/>
+      <div class="userInfo">
+        <img :src="user.Head" class="round_icon">
+        <span v-if="user.Sex == '男'">{{ user.Name }}</span>
+        <span v-else style="color: #E75296">{{ user.Name }}</span>
+      </div>
+    </div>
+    <div class="info">
+      <ul>
+        <li>
+          <em>{{ user.Height }}</em>
+          <span>身高cm</span>
+        </li>
+        <li>
+          <em>{{ user.Age }}</em>
+          <span>年龄</span>
+        </li>
+        <li>
+          <em>{{ user.Weight }}</em>
+          <span>体重kg</span>
+        </li>
+        <li>
+          <em>{{ user.Sex }}</em>
+          <span>性别</span>
+        </li>
+      </ul>
+    </div>
+
+    <!--课程详情-->
+    <div class="pageDetail">
+      <span class="btnBack" @click="back()">返回</span>
+      <!--课程标题-->
+      <div class="classDetail">
+        <div class="detailTitle" :style="{ background: classDetail.ClassColor}">
+          <span class="className">{{ classDetail.ClassName }}</span>
+          <span class="classTime">{{ classDetail.BeginTime | filterTime }} -{{
+              classDetail.EndTime | filterTime
+            }}</span>
+        </div>
+      </div>
+      <!--会员基本信息-->
+      <div class="memberInfo">
+        <span>上课时基本信息 |年龄 </span><em>{{ userClassInfo.Age }}</em>
+        <span> 岁 |身高 </span><em>{{ userClassInfo.Height }}</em>
+        <span> cm | 体重 </span><em>{{ userClassInfo.Weight }}</em>
+        <span> Kg</span>
+      </div>
+
+      <!--课程基本信息-->
+      <div class="classInfo">
+        <ul style="border-top: 1px solid #CCC; padding-top: 15px">
+          <li>
+            <em>{{ classDetail.Cle }}</em>
+            <span>卡路里</span>
+          </li>
+          <li>
+            <em>{{ classDetail.Ck }}</em>
+            <span>CK</span>
+          </li>
+          <li>
+            <em>{{ classDetail.Ei }}</em>
+            <span>EI</span>
+          </li>
+        </ul>
+
+        <ul>
+          <li>
+            <em>{{ classDetail.SportDuration }}分钟</em>
+            <span>上课时长</span>
+          </li>
+          <li>
+            <em>{{ classDetail.StaOrder }}</em>
+            <span>排名</span>
+          </li>
+          <li>
+            <em>{{ classDetail.StdUserNum }}</em>
+            <span>上课人数</span>
+          </li>
+        </ul>
+      </div>
+
+      <div v-show="visibleChartAcPercent">
+        <h5 class="sportPower">运动强度</h5>
+        <!--运动强度柱状图-->
+        <!--      <div class="chartCalorie" id="activePercent" style="margin-top: 20px;width: 100%;margin-left: 0"/>-->
+        <div class="chartCalorie" id="activePercent" :style="{width:screenWidth,marginTop:'20px',marginLeft:'0'}"/>
+      </div>
+
+      <!--运动心率折线图-->
+      <!--      <div class="chartCalorie" id="sportHeartRate" style="margin-top: 10px;margin-left: 0;"/>-->
+      <div v-show="visibleChartHeartRate" class="chartCalorie" id="sportHeartRate"
+           :style="{width:screenWidth,marginTop:'10px',marginLeft:'0'}"/>
+      <!--动作评分-->
+      <div class="pageScore" v-show="visiblePageScore">
+        <div style="height: 10px;background: #F2F2F2;"></div>
+        <div class="scoreTitle">
+          <span>动作质量反馈</span>
+        </div>
+        <ul class="scoreContent">
+          <li v-for="scoreItem in classScoreDetail">
+            <span class="left">{{ scoreItem.EaName }}</span>
+            <span class="right">
+              {{ scoreItem.EaScore }}
+              <em>{{ scoreItem.Evaluate }}</em>
+            </span>
+          </li>
+        </ul>
+      </div>
+    </div>
+
+    <!--底部课程统计-->
+    <bottomTab :curTab="thisTab"/>
+  </div>
+</template>
+
+<script>
+import axios from 'axios';
+import bottomTab from '../components/bottomTab'
+import {
+  GetSportPercentByDuId,
+  GetUserHistoryInfoByDuId,
+  VipUserSelfQuery,
+  PersonClassDetail,
+  PersonScoreClassQuery,
+  GetHrValueInfoByDuId,
+} from '../api/getApiRes.js'
+
+let qs = require('qs');
+import Global from '../Global.js'
+// 引入基本模板
+let echarts = require('echarts/lib/echarts')
+// 引入柱状图组件
+require('echarts/lib/chart/bar')
+require('echarts/lib/chart/line')
+// 引入提示框和title组件
+require('echarts/lib/component/title')
+require('echarts/lib/component/tooltip')
+require('echarts/lib/component/dataZoom')
+require('echarts/lib/component/legend')
+require('echarts/lib/component/grid')
+
+export default {
+  data() {
+    return {
+      DuId: '',
+      StdId: '',
+      userMd5: '',
+      thisTab: '数据统计',
+      screenWidth: document.body.clientWidth + 'px',
+      classDetail: {},//课程基础信息
+      userClassInfo: {},//用户上课时的体态信息
+      classScoreDetail: {},//用户评分课结果
+      visibleChartAcPercent: false,//课堂活动百分比柱状图显示控制
+      visibleChartHeartRate: false,//心率折线图显示控制
+      visiblePageScore: false,//评分结果内容显示控制
+      active: 0,
+      user: {
+        Name: '',
+        Age: '',
+        Height: '',
+        Weight: '',
+        Phone: '',
+        Sex: '',
+        Head: '',
+        CKToTal: 0,
+        CKMonth: 0,
+        CalorieMonth: 0,
+        CalorieTotal: 0,
+      }
+    }
+  },
+  watch: {
+    '$route'(to) {
+      if (to.name == 'reportLessonDetail') {
+        this.DuId = this.$route.query.DuId;
+        this.StdId = this.$route.query.StdId;
+        this.getUserInfo();//获取用户基本信息
+        this.getClassInfo();//获取课程详细信息
+      }
+    },
+  },
+  mounted() {
+    let that = this;
+    that.DuId = this.$route.query.DuId;
+    that.StdId = this.$route.query.StdId;
+    that.getUserInfo();//获取用户基本信息
+    that.getClassInfo();//获取课程详细信息
+    that.loadSportHrChart();//载入课程心率
+  },
+  methods: {
+    //返回上一页
+    back() {
+      this.$router.push({path: '/reportLesson'});
+    },
+    //获取用户基本信息
+    getUserInfo() {
+      let that = this;
+      let param = {
+        token: localStorage.token
+      };
+      let postData = qs.stringify(param);
+      VipUserSelfQuery(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.user = json.Rs;
+          that.userMd5 = json.Rs.UserMd5;
+          that.getUserClassInfo();//获取用户上课时的基本信息
+          that.loadActivePercentData();//载入课程柱状图信息
+          that.getUserClassHr();//获取用户上课时的心率
+        } else {
+          that.$toast.message(json.Memo);
+        }
+      })
+    },
+    //获取用户上课时的基本信息
+    getUserClassInfo() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        duId: that.DuId,
+        userMd5: that.userMd5
+      };
+      let postData = qs.stringify(param);
+      GetUserHistoryInfoByDuId(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.userClassInfo = json.Rs;
+        } else {
+          // that.$toast.message(json.Memo);
+        }
+      })
+    },
+    //获取课程基本信息
+    getClassInfo() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: that.StdId
+      };
+      let postData = qs.stringify(param);
+      PersonClassDetail(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.classDetail = json.Rs;
+          if (that.classDetail.IsScore === 0) {
+            that.visiblePageScore = false;
+          } else {
+            that.visiblePageScore = true;
+            that.getClassScoreInfo();
+          }
+        } else {
+          that.$toast.message(json.Memo);
+        }
+      })
+    },
+    //加载课堂活动百分比数据源
+    loadActivePercentData() {
+      let that = this;
+      let dataLine = [];
+      let durationMinutes = 0;
+      let param = {
+        token: localStorage.token,
+        duId: that.DuId,
+        userMd5: that.userMd5
+      };
+      let postData = qs.stringify(param);
+      GetSportPercentByDuId(postData).then(res => {
+        let json = res;
+        console.log(json);
+        if (json.Code == 0) {
+          dataLine = json.Rs.DataY;
+          durationMinutes = json.Rs.Duration;
+          that.visibleChartAcPercent = true;
+          that.loadActivePercentChart(dataLine, durationMinutes);//载入课程运动强度柱状图
+        } else {
+          dataLine = {};
+          durationMinutes = {};
+          that.visibleChartAcPercent = false;
+          // that.$toast.message(json.Memo);
+        }
+      })
+    },
+    //加载课堂学生心率数据源
+    getUserClassHr() {
+      let that = this;
+      let dataHrX = [];
+      let dataHrY = [];
+      that.visibleChartHeartRate = false;
+
+      let param = {
+        duId: that.DuId,
+        userMd5: that.userMd5
+      };
+      let postData = qs.stringify(param);
+      GetHrValueInfoByDuId(postData).then(res => {
+        let json = res;
+        console.log(json);
+        if (json.Code == 0) {
+          if (json.Rs.DataX && json.Rs.DataY) {
+            dataHrX = json.Rs.DataX;
+            dataHrY = json.Rs.DataY;
+            that.visibleChartHeartRate = true;
+          }
+        } else {
+          // that.$toast.message(json.Memo);
+        }
+        that.loadSportHrChart(dataHrX, dataHrY);//载入课程运动强度柱状图
+      })
+    },
+    //加载课程运动强度柱状图
+    loadActivePercentChart(dataLine, durationMinutes) {
+      let echarts = require('echarts');
+      let activePercentChart = echarts.init(document.getElementById('activePercent'));
+      let dataMax = 100;
+      // dataLine = [11, 11, 11, 11, 11, 11];
+      // durationMinutes = 50;
+      // 绘制图表
+      let option = {
+        // 设置图表的位置
+        grid: [
+          {
+            left: '8%',//左侧留白
+            top: '12%',//顶部留白
+            bottom: '8%',//底部留白
+            width: '80%',//宽度占比
+            // width: 500,
+            containLabel: true
+          },
+          {
+            top: '12%',
+            bottom: '8%',
+            containLabel: true
+          }
+        ],
+        // 提示框组件
+        tooltip: {
+          trigger: 'axis', // 触发类型, axis: 坐标轴触发
+          axisPointer: {
+            // 指示器类型  'line' 直线指示器 'shadow' 阴影指示器 'none' 无指示器
+            // 'cross' 十字准星指示器 其实是种简写,表示启用两个正交的轴的 axisPointer
+            type: 'none'
+          },
+          color: '#cdd3ee', // 文字颜色
+          // 提示框浮层内容格式器,支持字符串模板和回调函数两种形式 折线(区域)图、柱状(条形)图、K线图
+          // {a}(系列名称),{b}(类目值),{c}(数值), {d}(无)
+          formatter: '{b}<br/>{a0}: {c}%'
+        },
+        // X轴
+        xAxis: [{
+          max: dataMax,
+          show: false
+        }],
+        yAxis: [{
+          axisTick: 'none',
+          axisLine: 'none',
+          offset: '10',
+          // inverse: true,
+          axisLabel: {
+            color: '#000000', //y轴字体颜色
+            fontSize: '16'
+          },
+          // data: ['激活放松', '动态热身', '脂肪燃烧', '糖分消耗', '心肺训练', '峰值训练']
+          data: ['峰值训练', '心肺训练', '糖分消耗', '脂肪燃烧', '动态热身', '激活放松']
+        },
+          {
+            axisTick: 'none',
+            axisLine: 'none',
+            show: false,
+            axisLabel: {
+              color: '#ffffff',
+              fontSize: '16'
+            },
+            data: [1, 1, 1, 1, 1, 1]
+          }, {
+            axisLine: {
+              lineStyle: {
+                color: 'rgba(0,0,0,0)' //y轴线颜色
+              }
+            },
+            data: []
+          },
+          {  //设置柱状图右边参数
+            // show: true,
+            // inverse: true,
+            // data: dataLine,
+            axisLine: {
+              show: false
+            },
+            // splitLine: {
+            //   show: false
+            // },
+            // axisTick: {
+            //   show: false
+            // }
+          },
+        ],
+        // 系列列表
+        series: [{
+          name: '占比',
+          type: 'bar',
+          stack: 'b',
+          yAxisIndex: 0,
+          data: dataLine,
+          color: '#ffffff',
+          fontSize: '16',
+          label: {
+            show: true,
+            position: 'right',
+            distance: 5,
+            formatter: function (param) {
+              // let sportWeight = (param.value / dataMax).toFixed(2) * 100;
+              // return parseInt(sportWeight) + '%'
+              return param.value + '%'
+            },
+          },
+          barWidth: 11,
+          itemStyle: {
+            color: function (params) {
+              //注意,如果颜色太少的话,后面颜色不会自动循环,最好多定义几个颜色
+              // let colorList = ['#028FE1', '#6D29FA', '#0AB105', '#B9CB01', '#EA8813', '#D11122'];
+              let colorList = ['#D11122', '#EA8813', '#B9CB01', '#0AB105', '#6D29FA', '#028FE1'];
+              return colorList[params.dataIndex];
+            },
+            borderRadius: [100, 100, 100, 100, 100, 100],
+          },
+          z: 2
+        }, { //背景灰框
+          name: '白框',
+          type: 'bar',
+          yAxisIndex: 1,
+          barGap: '-100%',//设置-100% 则表示灰色柱状图与红色柱状图重合
+          data: [99.8, 99.9, 99.9, 99.9],
+          barWidth: 11,
+          itemStyle: {
+            color: '#DDDDDD',
+            borderRadius: [100, 100, 100, 100, 100, 100],
+          },
+          z: 1  // 设置维度越高这表示覆盖低的
+        }, //进度条底框
+          {
+            name: '外框',
+            type: 'bar',
+            yAxisIndex: 2,
+            barGap: '-100%',
+            data: [100, 100, 100, 100, 100, 100],
+            barWidth: 13,
+            label: {//右边的文字
+              show: true,
+              position: 'right',
+              distance: 5,
+              color: '#000000',
+              formatter: function (data) {
+                if (dataLine[data.dataIndex] < 1) {
+                  return '0分钟';
+                }
+                let actualDuration = parseInt(dataLine[data.dataIndex] / 100 * durationMinutes);
+                if (actualDuration == 0) {
+                  return '<1分钟';
+                } else {
+                  return actualDuration + "分钟";
+                }
+              },
+            },
+            //进度条底色
+            itemStyle: {
+              color: '#DDDDDD',
+              borderRadius: [100, 100, 100, 100, 100, 100],
+            },
+            z: 0
+          }
+        ]
+      }
+      activePercentChart.setOption(option);
+    },
+    //课程运动心率折线图
+    loadSportHrChart(dataX, dataY) {
+      // 基于准备好的dom,初始化echarts实例
+      let sportHeartRateChart = echarts.init(document.getElementById('sportHeartRate'));
+      let options = {
+        title: {
+          left: 'center',
+          text: '心率趋势图'
+        },
+        tooltip: {
+          // 当trigger为’item’时只会显示该点的数据,为’axis’时显示该列下所有坐标轴所对应的数据。
+          trigger: 'axis',
+          // 提示框的位置
+          position: function (pt) {
+            return [pt[0], '50%'];
+          }
+        },
+        // toolbox:这是ECharts中的工具栏。内置有导出图片、数据视图、动态类型切换、数据区域缩放、重置五个工具。
+        // toolbox: {
+        // feature 各工具配置项: dataZoom 数据区域缩放;restore 配置项还原;saveAsImage下载为图片;magicType动态类型切换
+        // feature: {
+        //   dataZoom: {
+        //     yAxisIndex: 'none'  // y轴不缩放,Index默认为0
+        //   },
+        // restore: {},
+        // saveAsImage: {}
+        // ,magicType: {
+        //     type: ['bar', 'line']
+        // }
+        // }
+        // },
+        xAxis: [{
+          type: 'category', // category为一级分类,适用于离散的类目数据
+          boundaryGap: false,  // 无间隙
+          data: dataX
+        }],
+        yAxis: [{
+          type: 'value', // 'value' 数值轴,适用于连续数据。
+          boundaryGap: [0, '100%'] // 分别表示数据最小值和最大值的延伸范围,可以直接设置数值或者相对的百分比,
+        }],
+        // 内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系
+        dataZoom: [{
+          type: 'inside',
+          start: 0,
+          end: 100
+        }, {
+          start: 0,
+          end: 5,
+          //柄的 icon 形状,支持路径字符串
+          //handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
+          //控制手柄的尺寸,可以是像素大小,也可以是相对于 dataZoom 组件宽度的百分比,默认跟 dataZoom 宽度相同。
+          handleSize: '20%',
+          handleStyle: {
+            color: 'pink',
+            shadowBlur: 3,      // shadowBlur图片阴影模糊值,shadowColor阴影的颜色
+            shadowColor: 'red',
+            shadowOffsetX: 2,
+            shadowOffsetY: 2
+          }
+        }],
+        series: [
+          {
+            name: '瞬时心率',
+            type: 'line',
+            // smooth: true,  // 开启平滑处理。true的平滑程度相当于0.5
+            symbol: 'none', // 标记的图形。
+            sampling: 'average', //  取过滤点的平均值
+            itemStyle: {
+              lineStyle: {
+                color: '#ff6f4a'/*折线的颜色*/
+              },
+              color: "#ff6f4a"/*图例(legend)的颜色,不是图例说明文字的颜色*/
+            },
+            areaStyle: {    // 区域填充样式。
+              color: new echarts.graphic.LinearGradient(
+                  0, 0, 0, 1,
+                  [
+                    {offset: 0, color: '#ff6f4a'},
+                    /* {offset: 0.5, color: '#c4e1ff'},*/
+                    {offset: 1, color: '#ecf5ff'}
+                  ]
+              )
+            },
+            data: dataY
+          }
+        ]
+      };
+      sportHeartRateChart.setOption(options);
+    },
+    //获取课程评分信息
+    getClassScoreInfo() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: that.StdId
+      };
+      let postData = qs.stringify(param);
+      PersonScoreClassQuery(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.classScoreDetail = json.Rs;
+        } else {
+          that.classScoreDetail = [];
+          // that.$toast.message(json.Memo);
+        }
+      })
+    },
+  },
+  filters: {
+    hidePhone: function (val) {
+      let str = String(val)
+      let len = str.length;
+      if (len >= 7) {
+        let reg = str.slice(-8, -4)
+        return str.replace(reg, "****")
+      } else if (len < 7 && len >= 6) {
+        let reg = str.slice(-4, -2)
+        return str.replace(reg, "**")
+      }
+    },
+    filterTime: function (value) {
+      if (!value) {
+        return 0;
+      } else {
+        let resStr = dateFormatWithoutZone(value, 16);
+        return resStr.substr(10, 15);
+      }
+    },
+    fmtTime: function (value) {
+      if (!value) {
+        return 0
+      } else {
+        // js默认使用毫秒
+        value = value * 1000
+        let date = new Date(value);
+        let y = date.getFullYear();
+        let MM = date.getMonth() + 1;
+        MM = MM < 10 ? ('0' + MM) : MM;
+        let d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        let h = date.getHours();
+        h = h < 10 ? ('0' + h) : h;
+        let m = date.getMinutes();
+        m = m < 10 ? ('0' + m) : m;
+        let s = date.getSeconds();
+        s = s < 10 ? ('0' + s) : s;
+        return y + '-' + MM + '-' + d;
+      }
+    },
+  },
+  beforeRouteEnter(to, from, next) {
+    // A跳转到B,B页面停留在A页面的滚动位置;解决方法:将scrollTop设置为0
+    next(vm => {
+      //因为当钩子执行前,组件实例还没被创建
+      // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
+      if (to.name == 'reportLessonDetail') {
+        vm.getUserInfo();
+      }
+    });
+  },
+  components: {
+    bottomTab
+  }
+}
+</script>
+
+<style scoped>
+.pages {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #F2F2F2;
+}
+
+.headerInfo {
+  position: relative;
+}
+
+.headerInfo .headBack {
+  height: 120px;
+  position: absolute;
+  z-index: 1;
+}
+
+.headerInfo .userInfo {
+  left: 42%;
+  top: 1.25rem;
+  position: absolute;
+  z-index: 2;
+  text-align: center;
+}
+
+.headerInfo .userInfo span {
+  font-size: 16px;
+  color: #028FE1;
+  display: block;
+  margin-top: 5px;
+}
+
+.round_icon {
+  width: 64px;
+  height: 64px;
+  display: flex;
+  border-radius: 50%;
+  align-items: center;
+  justify-content: center;
+  overflow: hidden;
+  margin-bottom: 3px;
+  border: solid 2px white;
+}
+
+.info {
+  background: #fff;
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 120px;
+}
+
+.info ul {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 10px;
+}
+
+.info li {
+  width: 25%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  float: left;
+  text-align: center;
+}
+
+.info li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.info li:nth-child(3) {
+  border-color: #e2e2e2;
+  border-left: 0;
+}
+
+.info li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #363636;
+  font-size: 20px;
+  text-align: center;
+}
+
+.info li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 12px;
+  text-align: center;
+}
+
+.tag {
+  height: 252px;
+}
+
+.tag .card {
+  width: 45%;
+  float: left;
+  height: 106px;
+  margin-left: 3%;
+  margin-top: 20px;
+  border-radius: 13px;
+  background: linear-gradient(#FFFFFF, #FFD4D3);
+}
+
+.tag .card .row1 img {
+  margin-left: 10px;
+  margin-top: 10px;
+  width: 17px;
+  height: 18px;
+  float: left;
+}
+
+.tag .card .row1 em {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  line-height: 40px;
+  margin-left: 7px;
+  color: #3b3b3b;
+}
+
+.tag .card .row2 span {
+  font-family: "PingFang SC";
+  font-size: 22px;
+  font-weight: bold;
+  margin-left: 35px;
+  color: #363636;
+}
+
+.tag .card .row2 em {
+  font-family: "PingFang SC";
+  font-size: 10px;
+  margin-left: 5px;
+  color: #909090;
+}
+
+.tag .card .row3 span {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  margin-left: 35px;
+  color: #363636;
+}
+
+.tag .card .row3 em {
+  font-family: "PingFang SC";
+  font-size: 12px;
+  margin-left: 5px;
+  color: #363636;
+}
+
+.reportCalorie {
+  margin-top: 10px;
+  background: #FFF;
+  color: #FF5800;
+}
+
+.reportCalorie .title {
+  padding-top: 10px;
+  padding-bottom: 10px;
+  background: #FFF;
+}
+
+.fa-square {
+  background: #FF5800;
+  height: 8px;
+  width: 8px;
+  float: left;
+  margin-left: 15px;
+  margin-top: 5px;
+  margin-right: 5px;
+}
+
+.fa-circle {
+  width: 8px;
+  height: 8px;
+  border-radius: 100%;
+  background: #c40b0b;
+  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, .2);
+}
+
+.sportPower {
+  font-size: 18px;
+  margin-bottom: -30px;
+}
+
+.chartCalorie {
+  text-align: center;
+  width: 95%;
+  height: 200px;
+  margin-top: -35px;
+  margin-left: 5%;
+}
+
+.classReport {
+  background: #F2F2F2;
+}
+
+.reportCalorie ul {
+  padding-bottom: 100px;
+  margin-top: 0px;
+}
+
+.classReport li {
+  width: 100%;
+  margin-top: 1px;
+  background: #FFF;
+  height: 66px;
+  padding-left: 15px;
+  float: left;
+}
+
+.classReport li .className {
+  width: 25%;
+  height: 28px;
+  line-height: 28px;
+  background: #EBFFE3;
+  overflow: hidden;
+  font-size: 14px;
+  padding: 1px 11px;
+  border-radius: 250px;
+  float: left;
+  margin-top: 20px;
+  /*border: solid 1px #37CB00;*/
+  text-align: center;
+  color: #333;
+}
+
+.classReport li .calorieToTal {
+  float: left;
+  text-align: center;
+  display: block;
+  width: 25%;
+  margin-top: 15px;
+}
+
+.calorieToTal em {
+  width: 100%;
+  overflow: hidden;
+  color: black;
+  display: block;
+  font-size: 16px;
+}
+
+.calorieToTal span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 10px;
+  color: #C9C9C9;
+}
+
+/*pageClass*/
+.pageClass {
+  text-align: center;
+  margin-top: 15px;
+}
+
+.pageClass em {
+  text-align: center;
+  font-size: 16px;
+}
+
+.dayList .dayDetail {
+  background: #FFF;
+  margin-left: 5%;
+  margin-right: 5%;
+  height: 205px;
+  text-align: center;
+  border-radius: 6px;
+  margin-top: 15px;
+}
+
+.dayDetail .dayTitle {
+  font-size: 12px;
+  float: right;
+  margin-right: 23px;
+  margin-top: 16px;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  color: #9A9A9A;
+}
+
+.dayDetail .className {
+  width: 85px;
+  height: 28px;
+  line-height: 28px;
+  background: #EBFFE3;
+  overflow: hidden;
+  font-size: 14px;
+  padding: 1px 11px;
+  border-radius: 250px;
+  float: left;
+  margin-left: 15px;
+  margin-top: 13px;
+  border: solid 1px #37CB00;
+  text-align: center;
+  color: #333;
+}
+
+.dayDetail .sportDetail {
+  padding-top: 50px;
+  text-align: center;
+}
+
+.sportDetail ul {
+  width: 90%;
+  margin-top: 5px;
+  margin-left: 5%;
+  height: 65px;
+  border-bottom: 1px solid #EFEFEF;
+}
+
+.sportDetail ul li em i {
+  float: left;
+  margin-top: 10px;
+  margin-left: 10px;
+}
+
+.sportDetail li {
+  width: 33%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  text-align: center;
+  float: left;
+}
+
+.sportDetail li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.sportDetail li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-size: 22px;
+  font-weight: bold;
+  text-align: right;
+  padding-right: 8px;
+}
+
+.sportDetail li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 12px;
+  text-align: right;
+  padding-right: 8px;
+}
+
+.sportDetail .sportDuration {
+  text-align: center;
+  margin: 0 auto;
+  width: 90%;
+  height: 40px;
+  border-bottom: 1px solid #EFEFEF;
+}
+
+.sportDetail .sportDuration em {
+  color: #028FE1;
+  margin-left: 5px;
+  margin-right: 5px;
+}
+
+.sportDetail .sportDuration span {
+  font-size: 14px;
+  line-height: 40px;
+}
+
+.sportDetail .sportView {
+  height: 40px;
+}
+
+.sportDetail .sportView span {
+  float: left;
+  margin-left: 5%;
+  margin-top: 10px;
+  color: #848484;
+}
+
+.sportDetail .sportView em {
+  float: right;
+  font-weight: normal;
+  color: #C4C4C4;
+  margin-right: 5%;
+  margin-top: 10px;
+}
+
+
+.pageDetail {
+  text-align: center;
+  background: #FFF;
+  margin-top: 20px;
+  padding-bottom: 40px;
+}
+
+.pageDetail .btnBack {
+  float: left;
+  margin-left: 15px;
+  margin-top: 14px;
+  font-size: 16px;
+  overflow: hidden;
+  display: block;
+  font-family: "PingFang SC";
+  color: #ACACAC;
+}
+
+.pageDetail .classDetail {
+  display: inline-block;
+  *display: inline;
+  margin-right: 45px;
+  zoom: 1;
+  margin-top: 30px;
+}
+
+.pageDetail .detailTitle {
+  float: left;
+  background: #EBFFE3;
+  border-radius: 12px;
+  padding: 1px 15px;
+  /*border: solid 1.5px #37CB00;*/
+}
+
+.detailTitle span {
+  display: block;
+}
+
+.pageDetail .memberInfo {
+  margin-top: 5px;
+}
+
+.memberInfo em {
+  color: #FFA310;
+  font-size: 12px;
+}
+
+.memberInfo span {
+  font-size: 12px;
+  color: #909090;
+}
+
+.classInfo {
+  background: #FFF;
+  text-align: center;
+}
+
+.classInfo ul {
+  width: 80%;
+  margin-left: 10%;
+  height: 40px;
+  border-bottom: 1px solid #CCC;
+  padding-bottom: 50px
+}
+
+.classInfo li {
+  width: 33%;
+  border-left: 1px solid #fff;
+  border-right: 1px solid #fff;
+  text-align: center;
+  float: left;
+}
+
+.classInfo li:nth-child(2) {
+  border-color: #e2e2e2;
+}
+
+.classInfo li em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-weight: bold;
+  color: #E75296;
+  font-size: 14px;
+  text-align: center;
+}
+
+.classInfo li span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #c4c4c4;
+  font-size: 10px;
+  text-align: center;
+}
+
+/**
+动作评分结果选项
+ */
+
+.pageScore {
+  background: #F2F2F2;
+  margin-top: 10px;
+}
+
+.pageScore .scoreTitle {
+  background: #FFF;
+}
+
+.pageScore span {
+  height: 50px;
+  font-size: 16px;
+  font-weight: bold;
+  padding-top: 10px;
+  text-align: center;
+  line-height: 50px;
+  font-family: "PingFang SC";
+}
+
+.pageScore .scoreContent {
+  margin-top: 5px;
+  font-weight: normal;
+}
+
+.pageScore .scoreContent li {
+  width: 100%;
+  background: #FFF;
+  height: 50px;
+  border-bottom: solid 1px #F2F2F2;
+}
+
+.pageScore .scoreContent li span {
+  font-weight: normal;
+}
+
+.pageScore .scoreContent li:first-child span {
+  font-weight: bold;
+}
+
+.pageScore .scoreContent li .left {
+  width: 50%;
+  float: left;
+  line-height: 30px;
+  text-align: right;
+  padding-right: 10%;
+  display: block;
+  border-right: 1px solid #F2F2F2;
+}
+
+.pageScore .scoreContent li .right {
+  /*background: #EBFFE3;*/
+  width: 50%;
+  float: left;
+  text-align: left;
+  padding-left: 10%;
+  line-height: 30px;
+  border-right: 1px solid #F2F2F2;
+  display: block;
+}
+
+.pageScore .scoreContent li .right em {
+  font-weight: normal;
+  margin-right: 20px;
+  color: #C5C5C5;
+  font-size: 14px;
+  float: right;
+}
+
+.user {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  height: 58px;
+  background: #fff;
+  padding: 17px 3%;
+  margin-bottom: 10px;
+}
+
+.user img {
+  width: 26.29px;
+  height: 26.29px;
+  float: left;
+  margin-right: 11px;
+}
+
+.user span {
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 18px;
+  text-align: left;
+  color: #3b3b3b;
+}
+
+.user em {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 18px;
+  text-align: left;
+  color: #3b3b3b;
+  float: right;
+}
+
+.user p {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 14px;
+  text-align: left;
+  color: #ffb43c;
+  float: right;
+  padding: 0;
+  margin: 0;
+  margin-left: 3px;
+  line-height: 26px;
+}
+
+.value {
+  width: 100%;
+  /*height: 131px;*/
+  background: #fff;
+  padding: 13px 0;
+}
+
+.value .vTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 15px;
+}
+
+.vTitle i {
+  width: 8px;
+  height: 8px;
+  display: inline-block;
+  border-radius: 250px;
+  margin-right: 3px;
+}
+
+.vTitle.year {
+  color: #E75296;
+}
+
+.vTitle.year i {
+  background: #e75296;
+}
+
+.vTitle.price {
+  color: #FFB43C;
+}
+
+.vTitle.price i {
+  background: #FFB43C;
+}
+
+.vNum {
+  width: 100%;
+  /*height: 25px;*/
+  overflow: hidden;
+  display: block;
+  margin: 5px auto;
+  margin-bottom: 0;
+}
+
+.center {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+}
+
+.vNum em {
+  position: relative;
+  float: right;
+  bottom: 20px;
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 12px;
+  color: #c9c9c9;
+  padding-right: 3%;
+}
+
+/deep/ .linear-progress {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  border-radius: 250px;
+}
+
+.limit {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 8px;
+}
+
+.limit em {
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 12px;
+  text-align: right;
+  color: #e75296;
+  padding-left: 10px;
+}
+
+.limit span {
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 12px;
+  text-align: right;
+  color: #909090;
+  float: right;
+  text-align: right;
+  padding-right: 10px;
+}
+
+.dataSum {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #fff;
+  margin-top: 10px;
+}
+
+.dataSum .row {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding: 2% 0;
+}
+
+.dataSum .row em {
+  float: left;
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 18px;
+  text-align: right;
+  color: #3b3b3b;
+}
+
+.dataSum .row span {
+  font-family: "PingFang SC";
+  font-weight: 500;
+  font-size: 18px;
+  text-align: right;
+  color: #3b3b3b;
+  float: right;
+}
+
+.row .mid {
+  width: 66%;
+  height: 0px;
+  background: transparent;
+  border: 1px dotted #e0e0e0;
+  float: left;
+  margin-top: 11px;
+  margin-right: 5px;
+  margin-left: 10px;
+}
+
+.row .midl {
+  width: 54%;
+  height: 0px;
+}
+
+.login_btn {
+  width: 96%;
+  height: 50px;
+  line-height: 50px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 30px;
+  padding-left: 3%;
+  padding-right: 3%;
+  background: #E75296;
+  color: #fff;
+  font-size: 14px;
+  text-align: center;
+  border: none;
+  padding: 0;
+  font-size: 24px;
+}
+
+/deep/ .mu-warning-text-color {
+  float: left;
+}
+
+.vNum span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  text-align: center;
+}
+
+@media only screen and (max-width: 640px) {
+
+}
+
+@media only screen and (max-width: 480px) {
+
+}
+
+@media only screen and (max-width: 375px) {
+  .vNum em {
+    padding-right: 0 !important;
+  }
+
+  .row .mid {
+    width: 49%;
+  }
+
+  .row .midl {
+    width: 44%;
+    height: 0px;
+  }
+}
+
+@media only screen and (max-width: 360px) {
+  .vNum em {
+    padding-right: 0 !important;
+  }
+
+  .row .mid {
+    width: 49%;
+  }
+
+  .row .midl {
+    width: 44%;
+    height: 0px;
+  }
+}
+
+@media only screen and (max-width: 320px) {
+
+}
+
+@media only screen and (min-width: 641px) {
+
+}
+</style>

+ 29 - 5
app/src/router/index.js

@@ -12,7 +12,7 @@ let NPconfig = {
     size: 2,               // progress size
     className: ''          // progress custom class
 };
-Vue.use(NProgress,NPconfig);
+Vue.use(NProgress, NPconfig);
 
 const routes = [
     {
@@ -38,7 +38,7 @@ const routes = [
                     index: 2
                 },
                 component: () => import( '../page/appoint.vue')
-            },  {
+            }, {
                 path: '/record',
                 name: 'record',
                 meta: {
@@ -46,15 +46,39 @@ const routes = [
                     index: 1
                 },
                 component: () => import( '../page/record.vue')
+            }, {
+                path: '/report',
+                name: 'report',
+                meta: {
+                    title: '数据统计',
+                    index: 1
+                },
+                component: () => import( '../page/report.vue')
+            }, {
+                path: '/reportLesson',
+                name: 'reportLesson',
+                meta: {
+                    title: '数据统计',
+                    index: 1
+                },
+                component: () => import( '../page/reportLesson.vue')
+            }, {
+                path: '/reportLessonDetail',
+                name: 'reportLessonDetail',
+                meta: {
+                    title: '数据统计',
+                    index: 1
+                },
+                component: () => import( '../page/reportLessonDetail.vue')
             }, {
                 path: '/mine',
                 name: 'mine',
                 meta: {
-                    title: '我的',
+                    title: '我的运动',
                     index: 1
                 },
                 component: () => import( '../page/mine.vue')
-            },{
+            }, {
                 path: '/lesson',
                 name: 'lesson',
                 meta: {
@@ -82,7 +106,7 @@ const routes = [
             index: 1
         },
         component: () => import( '../page/test.vue')
-    },{
+    }, {
         path: '/404',
         name: '404',
         meta: {

+ 9 - 1
app/vue.config.js

@@ -10,6 +10,13 @@ module.exports = {
                 pathRewrite: {
                     '^/api': '',
                 }
+            },
+            '/bpi': {
+                target: 'http://192.168.0.3:19096/',
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/bpi': '',
+                }
             }
         }
     },
@@ -20,5 +27,6 @@ module.exports = {
         }
       },
     // 输出文件目录
-    outputDir: 'D:/wwwroot/webApp/build',
+    // outputDir: 'D:/wwwroot/webApp/build',//windows输出目录
+    outputDir: '/Users/macbook/Working/vueBuild/flyLong/WeChatApp',//mac输出目录
 }

+ 16 - 7
pc/src/Global.js

@@ -10,19 +10,28 @@ headbpi = process.env.NODE_ENV === 'development' ? '/bpi/' : 'http://cal.beswell
 headcpi = process.env.NODE_ENV === 'development' ? 'http://192.168.0.62:9010/' : 'http://cal.beswell.com:85/DataTransfer/';
 
 
-// 常用选项
+// 常用课程状态d
 globalQuipState = function () {
     let option = [
         {
-            value: '',
-            label: '全部'
-        }, {
             value: '0',
-            label: '新入库'
+            label: '未上课'
         }, {
             value: '1',
-            label: '未售'
-        },
+            label: '已下课'
+        }, {
+            value: '2',
+            label: '已上课'
+        }, {
+            value: '3',
+            label: '准备上课'
+        }, {
+            value: '4',
+            label: '课程已完成'
+        }, {
+            value: '5',
+            label: '课程已关闭'
+        }
     ];
     return option
 };

+ 35 - 0
pc/src/api/getApiRes.js

@@ -952,6 +952,11 @@ export function ENRelationQuery(postdata) {
     let url = headapi + 'v1/Score/ENRelationQuery';
     return getApiBasic(url, postdata);
 }
+//通过动作分组详情ID查询动作与节点关联
+export function ENRelationQueryByAgdId(postdata) {
+    let url = headapi + 'v1/Score/ENRelationQueryByAgdId';
+    return getApiBasic(url, postdata);
+}
 // 动作与节点关联添加
 export function ENRelationAdd(postdata) {
     let url = headapi + 'v1/Score/ENRelationAdd';
@@ -1007,6 +1012,11 @@ export function BodyNodeStatusEdit(postdata) {
     let url = headapi + 'v1/Score/BodyNodeStatusEdit';
     return getApiBasic(url, postdata);
 }
+//动作与节点关联批量修改
+export function ENRelationBatchEdit(postdata) {
+    let url = headapi + 'v1/Score/ENRelationBatchEdit';
+    return getApiBasic(url, postdata);
+}
 //课程综合评分查询
 export function ScoreClassQuery(postdata) {
     let url = headapi + 'v1/ScoreClass/ScoreClassQuery';
@@ -1016,4 +1026,29 @@ export function ScoreClassQuery(postdata) {
 export function ScoreClassDetailQuery(postdata) {
     let url = headapi + 'v1/ScoreClass/ScoreClassDetailQuery';
     return getApiBasic(url, postdata);
+}
+//动作批量打分
+export function ScoreClassDetailBatchScore(postdata) {
+    let url = headapi + 'v1/ScoreClass/ScoreClassDetailBatchScore';
+    return getApiBasic(url, postdata);
+}
+//动作批量打分 评分结束
+export function ScoreClassScoreFinish(postdata) {
+    let url = headapi + 'v1/ScoreClass/ScoreClassScoreFinish';
+    return getApiBasic(url, postdata);
+}
+//动作分组与动作关联批量修改-orderNo
+export function AGDetailBatchEdit(postdata) {
+    let url = headapi + 'v1/Score/AGDetailBatchEdit';
+    return getApiBasic(url, postdata);
+}
+//动作标签查询
+export function AGDetailCurrStdQuery(postdata) {
+    let url = headapi + 'v1/ScoreClass/AGDetailCurrStdQuery';
+    return getApiBasic(url, postdata);
+}
+//身体节点查询
+export function ENRelationCurrStdQuery(postdata) {
+    let url = headapi + 'v1/ScoreClass/ENRelationCurrStdQuery';
+    return getApiBasic(url, postdata);
 }

+ 8 - 0
pc/src/router/index.js

@@ -172,6 +172,14 @@ const routes = [
                     title: "动作管理",
                     // clmid: "9",
                 }
+            },{
+                path: '/actionGroupManage',
+                name: 'actionGroupManage',
+                component: () => import('@/views/ActionGroupManage.vue'),
+                meta: {
+                    title: "动作管理",
+                    // clmid: "9",
+                }
             },{
                 path: '/bodyNode',
                 name: 'bodyNode',

+ 21 - 36
pc/src/views/ActionExercise.vue

@@ -4,21 +4,21 @@
       <h5>锻炼动作</h5>
       <div class="likeTab">
         <el-button @click="goType('ratingManage')" size="mini" type>动作分组</el-button>
-        <el-button @click="goType('actionExercise')" size="mini" type="primary" >锻炼动作</el-button>
+        <el-button @click="goType('actionExercise')" size="mini" type="primary">锻炼动作</el-button>
         <el-button @click="goType('bodyNode')" size="mini" type>身体节点</el-button>
       </div>
       <div class="panel-body">
         <div class="panel_control">
           <el-row :gutter="1">
-            <el-col :span="6" align="center">
+            <el-col :span="5" align="center">
               <em>动作名称:</em>
               <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
             </el-col>
-            <el-col :span="6" align="center">
+            <el-col :span="5" align="center">
               <em>动作标签:</em>
               <el-input v-model="panel.tag" placeholder="请输入标签" type="text" style="width: 150px"/>
             </el-col>
-            <el-col :span="3">
+            <el-col :span="4">
               <em>状态:</em>
               <!--status-->
               <el-select v-model="panel.status" placeholder="请选择">
@@ -38,7 +38,7 @@
       </div>
     </div>
     <div class="change">
-      <el-button @click="addAction" size="mini" type="primary" >新增动作</el-button>
+      <el-button @click="addAction" size="mini" type="primary">新增动作</el-button>
       <el-button @click="editAction" size="mini">编辑动作</el-button>
       <el-button @click="deleteAction" size="mini" type="danger">删除动作</el-button>
     </div>
@@ -93,6 +93,12 @@
       <div class="dialogContent">
         <div class>
           <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="是否跨店" v-show="false">
+              <el-radio-group v-model="form.isAcross" style="margin-left: -20.5rem">
+                <el-radio-button :label="0">是</el-radio-button>
+                <el-radio-button :label="1">否</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
             <el-form-item label="动作名称" :required="true">
               <el-input v-model="form.name"/>
             </el-form-item>
@@ -111,31 +117,6 @@
         <el-button size="small" @click="addActionVisible = false">取消</el-button>
       </div>
     </el-dialog>
-
-    <el-dialog :title="dialogTitle" :visible.sync="associateNodeVisible" width="650px">
-      <div class="dialogContent">
-        <div class>
-          <el-form ref="form" :model="form" label-width="160px">
-            <el-form-item label="身体节点" :required="true">
-              <el-input v-model="form.name"/>
-            </el-form-item>
-            <el-form-item label="所占权重" :required="true">
-              <el-input v-model="form.tag"/>
-            </el-form-item>
-            <el-form-item label="默认分数">
-              <el-input v-model="form.memo"/>
-            </el-form-item>
-          </el-form>
-        </div>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddAction">确定</el-button>
-        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditAction">确定</el-button>
-        <el-button size="small" @click="addActionVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
-
-
   </div>
 </template>
 
@@ -156,7 +137,6 @@ export default {
       activeName: 'comm',
       dialogVisible: false,//其他dialog
       addActionVisible: false,//新增动作分组弹窗
-      associateNodeVisible: false,//关联身体节点弹窗
       dialogTitle: '新增心率设备',
       BtnGetAllPower: false,
       tableRadio: [],
@@ -186,6 +166,7 @@ export default {
         pageIndex: 1,
       },
       form: {
+        isAcross: 1,
         eaId: '',
         name: '',
         tag: '',
@@ -217,9 +198,12 @@ export default {
     },
     //动作分组动作管理
     manageAction(row) {
-      this.$router.push({path: '/actionManage', query: {
-        eaId: row.EaId,
-        eaName: row.EaName}});
+      this.$router.push({
+        path: '/actionManage', query: {
+          eaId: row.EaId,
+          eaName: row.EaName
+        }
+      });
     },
     // 关闭所有弹窗
     allDialogClose() {
@@ -252,7 +236,7 @@ export default {
       }
       let param = {
         token: localStorage.token,
-        shopId: localStorage.shopId,
+        shopId: that.form.isAcross == 0 ? 0 : localStorage.shopId,
         eaName: that.form.name,
         eaTag: that.form.tag,
         memo: that.form.memo
@@ -288,6 +272,7 @@ export default {
       this.dialogTitle = '编辑动作分组';
 
       let row = this.tableRadio;
+      this.form.isAcross = row.ShopId == 0 ? 0 : 1;
       this.form.eaId = row.EaId;
       this.form.name = row.EaName;
       this.form.tag = row.EaTag;
@@ -308,7 +293,7 @@ export default {
 
       let param = {
         token: localStorage.token,
-        shopId: localStorage.shopId,
+        shopId: that.form.isAcross == 0 ? 0 : localStorage.shopId,
         eaId: that.form.eaId,
         eaName: that.form.name,
         eaTag: that.form.tag,

+ 588 - 0
pc/src/views/ActionGroupManage.vue

@@ -0,0 +1,588 @@
+<template>
+  <div class="context">
+    <el-page-header @back="goBack" content="动作分组管理"></el-page-header>
+    <div class="panel">
+      <br>
+      <h5> {{ actionName }}</h5>
+    </div>
+    <div class="change">
+      <el-button @click="addAction" size="mini" type="primary" v-show="enableAdd">添加动作</el-button>
+      <el-button @click="deleteAction" size="mini" type="danger" v-show="enableDelete">删除动作</el-button>
+      <el-button @click="postPageData" size="mini" style="float: right;" v-bind:disabled="disablePush">提交</el-button>
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize
+                element-loading-background="rgba(0, 0, 0, 0.8)"
+                class @selection-change="handleSelectionChange" @current-change="clickChange"
+                :row-class-name="tableRowClassName">
+        >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row">
+            </el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" label="动作位序" align="center" width="80"/>
+        <el-table-column prop="EaName" label="动作名称" align="center"/>
+        <el-table-column prop="id" label="操作">
+          <template slot-scope="scope">
+            <el-button type="success" size="mini" @click="moveRow(scope.row,-1)"
+                       v-if="scope.$index > 0">
+              上移
+            </el-button>
+            <el-button type="warning" size="mini" @click="moveRow(scope.row,1)"
+                       v-if="scope.$index < tableData.length-1">
+              下移
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br/>
+      <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+                     v-show="false"
+      />
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="addBodyNodeVisible" width="650px">
+      <div class="dialogContent">
+        <div class>
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="身体动作" :required="true">
+              <!--全选框-->
+              <el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="checkBoxAllChange"
+                           style="float:left; margin-left: 30px">全选
+              </el-checkbox>
+              <!--实际可选内容-->
+              <el-checkbox-group v-model="checkedOptions" @change="checkBoxSingleChange"
+                                 style="float:left; margin-left: 10px">
+                <el-checkbox v-for="item in selectOptions" :label="item" :key="item.EaId" :value="item.EaId">
+                  {{ item.EaName }}
+                </el-checkbox>
+              </el-checkbox-group>
+
+            </el-form-item>
+
+            <el-form-item label="身体动作" :required="true" v-show="false">
+              <el-select v-model="form.action" value-key="EaId" placeholder="请选择" v-if="form.btnType == 0"
+                         @change="selectAction">
+                <el-option
+                    v-for="item in form.eaList"
+                    :key="item.EaId"
+                    :label="item.EaName"
+                    :value="item">
+                </el-option>
+              </el-select>
+              <span v-if="form.btnType == 1">{{ form.bnName }}</span>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddNodeRelation">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditRelation">确定</el-button>
+        <el-button size="small" @click="addBodyNodeVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../Global.js'
+import {
+  ExerciseActionQuery,
+  AGDetailBatchEdit,
+  AGDetailQuery,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      agId: '',
+      shopId: '',
+      actionName: '',
+      dialogVisible: false,//其他dialog
+      addBodyNodeVisible: false,//新增关联动作弹窗
+      dialogTitle: '',
+      tableRadio: [],
+      cur_page: 1,
+      enableAdd: true,
+      enableDelete: true,
+      disablePush: true,
+      //弹出框
+      selectOptions: [],
+      checkedOptions: [],
+      checkAll: false,
+      isIndeterminate: true,
+      // panel 配置项目
+      panel: {
+        str: '',
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        loading: false,
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '禁用'},
+        ]
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 200,
+        pageOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        eaId: '',
+        eaName: '',
+        eaList: [],
+        action: {},
+        btnType: 0,//0新建,1编辑编辑
+      },
+      tableData: []
+    }
+  },
+  mounted() {
+    this.agId = this.$route.query.agId;
+    this.actionName = this.$route.query.agName;
+    this.shopId = this.$route.query.shopId;
+    this.getTableQuery();
+    this.getActions();
+  },
+  methods: {
+    //返回上一页
+    goBack() {
+      this.$router.push({path: '/ratingManage'});
+    },
+    //顶部菜单项切换
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    //tableData中的行点击事件
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    //tableData中的行选择事件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    tableRowClassName({row, rowIndex}) {
+      row.index = rowIndex;
+      // console.log(row, rowIndex);
+    },
+    // 关闭所有弹窗
+    allDialogClose() {
+      this.dialogVisible = false;
+    },
+    //清除弹窗输入项
+    clearForm() {
+      let that = this;
+      that.form.eaId = '';
+      that.form.eaName = '';
+      that.form.action = '';
+    },
+    // 新增身体动作
+    addAction() {
+      this.clearForm();
+      this.addBodyNodeVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '添加动作'
+      this.getActions();
+    },
+    selectAction(val) {
+      let that = this;
+      that.form.eaId = val.EaId;
+      that.form.eaName = val.EaName;
+      that.form.action = val;
+    },
+    //checkBox全部选中事件
+    checkBoxAllChange(val) {
+      let checked = this.selectOptions.map(item => {
+        return item;
+      });
+      this.checkedOptions = val ? checked : [];
+      this.isIndeterminate = false;
+    },
+    //checkBox单个选中事件
+    checkBoxSingleChange(value) {
+      let checkedCount = value.length;
+      this.checkAll = checkedCount === this.selectOptions.length;
+      this.isIndeterminate = checkedCount > 0 && checkedCount < this.selectOptions.length;
+    },
+    //确认提交新动作
+    confirmAddNodeRelation() {
+      let that = this;
+      if (that.checkedOptions == null || that.checkedOptions.length < 1) {
+        this.$message.error('错了哦,动作不能为空');
+        return false
+      }
+      for (let i in that.checkedOptions) {
+        that.tableData.push(that.checkedOptions[i]);
+      }
+      this.addBodyNodeVisible = false;
+      this.checkedOptions = [];//清空已选中
+      this.checkAll = false;//清空已选中
+      that.disablePush = false;
+    },
+    //删除关联动作
+    deleteAction() {
+      let that = this;
+      if (that.tableRadio === null || that.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      this.$confirm('此操作将删除身体动作, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let row = that.tableRadio;
+        for (let i in that.tableData) {
+          if (row.index == i) {
+            that.tableData.splice(i, 1);
+          }
+        }
+        that.disablePush = false;
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    //设置行等级变动事件
+    handleChange() {
+      let that = this;
+      that.disablePush = false;
+    },
+    //提交本页数据
+    postPageData() {
+      let that = this;
+
+      //拼接要提交的数据
+      let actionRs = [];
+      for (let i = 0; i < that.tableData.length; i++) {//遍历table中的人员名单
+        let thisRow = {};
+        thisRow.index = that.tableData[i].index;
+        // thisRow.AgId = that.tableData[i].AgId;
+        thisRow.AgdId = that.tableData[i].AgdId;
+        thisRow.EaId = that.tableData[i].EaId;
+        thisRow.EaName = that.tableData[i].EaName;
+        actionRs.push(thisRow);
+      }
+      console.log(JSON.stringify(actionRs))
+      let param = {
+        token: localStorage.token,
+        agId: that.agId,
+        agName: that.actionName,
+        agdRs: JSON.stringify(actionRs)
+      };
+      console.log(JSON.stringify(param));
+      let postData = qs.stringify(param);
+      AGDetailBatchEdit(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '执行成功!',
+            type: 'success'
+          });
+          // table 重载
+          that.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+      that.disablePush = true;
+    },
+    //设置行状态 1:后移 -1:前移
+    moveRow(row, status) {
+      let that = this;
+
+      for (let i = 0; i < that.tableData.length; i++) {
+        if (i == row.index) {
+          if (i + status < 0 || i + status > that.tableData.length - 1) {
+            console.log(false);
+            return false;
+          }
+
+          if (status == 1) {//后移
+            let temp = deepClone(that.tableData[i + 1])
+            that.tableData[i + 1] = deepClone(that.tableData[i]);
+            that.tableData[i] = deepClone(temp);
+          }
+
+          if (status == -1) {//后移
+            let temp = deepClone(that.tableData[i - 1])
+            that.tableData[i - 1] = deepClone(that.tableData[i]);
+            that.tableData[i] = deepClone(temp);
+          }
+        }
+      }
+      that.disablePush = false;
+    },
+    ////获取当前动作可绑定节点
+    getActions() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        agId: 0,
+        status: 1
+      };
+      let postData = qs.stringify(param);
+      ExerciseActionQuery(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          if (json.Rs.length > 0) {
+            that.form.eaList = json.Rs;
+            that.selectOptions = json.Rs;
+            that.enableAdd = true;
+          } else {
+            that.form.eaList = [];
+            that.enableAdd = false;
+          }
+          // 设置分页数据
+          that.setPagination();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: that.shopId,
+        agId: that.agId
+      };
+      let postData = qs.stringify(param);
+      AGDetailQuery(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          if (json.Rs != '') {
+            if (json.Rs.length == 0) {
+              that.enableDelete = false;
+            } else {
+              that.enableDelete = true;
+            }
+            //不使用分页
+            that.tableData = json.Rs;
+            //分页
+            // that.allTableData = json.Rs;
+            // that.recordsTotal = json.Rs.length;
+          } else {
+            //不使用分页
+            that.tableData = [];
+
+            //使用分页
+            // that.allTableData = [];
+            // that.recordsTotal = 0;
+          }
+          that.disablePush = true;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      // that.tableData = that.allTableData.filter((item, index) => {
+      //   return index < that.pagination.pageItem;
+      // });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.path == '/actionGroupManage') {
+        this.agId = this.$route.query.agId;
+        this.actionName = this.$route.query.agName;
+        this.shopId = this.$route.query.shopId;
+        this.getTableQuery();
+        this.getActions();
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #f0f2f5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799ff;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
+
+.panel-body em {
+  /*float: left;*/
+  line-height: 40px;
+  margin-right: 10px;
+}
+
+</style>

+ 49 - 29
pc/src/views/ActionGroups.vue

@@ -10,11 +10,11 @@
       <div class="panel-body">
         <div class="panel_control">
           <el-row :gutter="1">
-            <el-col :span="6" align="center">
+            <el-col :span="5" align="center">
               <em>分组名称:</em>
               <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
             </el-col>
-            <el-col :span="3">
+            <el-col :span=4>
               <em>状态:</em>
               <!--status-->
               <el-select v-model="panel.status" placeholder="请选择">
@@ -90,6 +90,12 @@
       <div class="dialogContent">
         <div class>
           <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="是否跨店">
+              <el-radio-group v-model="form.isAcross" style="margin-left: -20.5rem">
+                <el-radio-button :label="0">是</el-radio-button>
+                <el-radio-button :label="1">否</el-radio-button>
+              </el-radio-group>
+            </el-form-item>
             <el-form-item label="动作名称" :required="true">
               <el-input v-model="form.name"/>
             </el-form-item>
@@ -129,7 +135,6 @@ import {
   ActionGroupEdit,
   ActionGroupQuery,
   ActionGroupAdd,
-  ClassListQuery,
   ExerciseActionQuery,
   AGDetailEdit,
   AGDetailQuery
@@ -172,6 +177,7 @@ export default {
       },
       form: {
         agId: '',
+        isAcross: 1,
         agName: '',
         name: '',
         memo: '',
@@ -202,13 +208,25 @@ export default {
     },
     //动作分组动作管理
     manageActionGroup(row) {
-      let that = this;
-      that.allDialogClose();
-      that.manageActionGroupVisible = true;
-      that.dialogTitle = '分组动作管理'
-      that.form.agId = row.AgId;
-      that.form.agName = row.AgName;
-      that.getAcGroupDetail(row);
+      if (true) {
+        //方式一:到管理页面管理
+        this.$router.push({
+          path: '/actionGroupManage', query: {
+            agId: row.AgId,
+            agName: row.AgName,
+            shopId: row.ShopId
+          }
+        });
+      } else {
+        //方式二:穿梭框管理
+        let that = this;
+        that.allDialogClose();
+        that.manageActionGroupVisible = true;
+        that.dialogTitle = '分组动作管理'
+        that.form.agId = row.AgId;
+        that.form.agName = row.AgName;
+        that.getAcGroupDetail(row);
+      }
     },
     // 关闭所有弹窗
     allDialogClose() {
@@ -242,12 +260,12 @@ export default {
       }
       let param = {
         token: localStorage.token,
-        shopId: localStorage.shopId,
+        shopId: that.form.isAcross == 0 ? 0 : localStorage.shopId,
         agName: that.form.name,
         memo: that.form.memo
       };
-      let postdata = qs.stringify(param);
-      ActionGroupAdd(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ActionGroupAdd(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           // 关闭弹窗
@@ -277,7 +295,8 @@ export default {
       this.dialogTitle = '编辑动作分组';
 
       let row = this.tableRadio;
-      this.form.shopid = row.ShopId;
+      this.form.isAcross = row.ShopId == 0 ? 0 : 1;
+      this.form.shopid = row.ShopId == 0 ? 0 : localStorage.shopId;
       this.form.agId = row.AgId;
       this.form.name = row.AgName;
       this.form.memo = row.Memo;
@@ -297,13 +316,13 @@ export default {
 
       let param = {
         token: localStorage.token,
-        shopId: localStorage.shopId,
+        shopId: that.form.isAcross == 0 ? 0 : localStorage.shopId,
         agId: that.form.agId,
         agName: that.form.name,
         memo: that.form.memo
       };
-      let postdata = qs.stringify(param);
-      ActionGroupEdit(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ActionGroupEdit(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           // 关闭弹窗
@@ -331,14 +350,14 @@ export default {
         agName: row.AgName,
         status: 9 //1:启用,8:禁用,9:删除
       };
-      let postdata = qs.stringify(param);
+      let postData = qs.stringify(param);
 
       this.$confirm('此操作将永久删除该动作分组, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        ActionGroupStatusEdit(postdata).then(res => {
+        ActionGroupStatusEdit(postData).then(res => {
           let json = res;
           if (json.Code == 0) {
             // table 重载
@@ -373,8 +392,8 @@ export default {
         agName: that.form.agName,
         ecList: that.form.dialogValue.toString()
       };
-      let postdata = qs.stringify(param);
-      AGDetailEdit(postdata).then(res => {
+      let postData = qs.stringify(param);
+      AGDetailEdit(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           that.$message({
@@ -399,8 +418,8 @@ export default {
         agName: row.AgName,
         status: status,//1:启用 8:暂停 9:删除
       };
-      let postdata = qs.stringify(param);
-      ActionGroupStatusEdit(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ActionGroupStatusEdit(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           that.$message({
@@ -426,8 +445,8 @@ export default {
         shopId: localStorage.shopId,
         agId: row.AgId,
       };
-      let postdata = qs.stringify(param);
-      AGDetailQuery(postdata).then(res => {
+      let postData = qs.stringify(param);
+      AGDetailQuery(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           if (json.Rs != '') {
@@ -451,9 +470,10 @@ export default {
         token: localStorage.token,
         shopId: localStorage.shopId,
         agId: 0,
+        status: 1
       };
-      let postdata = qs.stringify(param);
-      ExerciseActionQuery(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ExerciseActionQuery(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           if (json.Rs != '') {
@@ -484,8 +504,8 @@ export default {
         agName: that.panel.str,
         status: that.panel.status,
       };
-      let postdata = qs.stringify(param);
-      ActionGroupQuery(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ActionGroupQuery(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           that.loading = false;

+ 188 - 62
pc/src/views/ActionManage.vue

@@ -3,12 +3,13 @@
     <el-page-header @back="goBack" content="动作管理"></el-page-header>
     <div class="panel">
       <br>
-      <h5> {{eaName}}</h5>
+      <h5> {{ eaName }}</h5>
     </div>
     <div class="change">
-      <el-button @click="addBodyNode" size="mini" type="primary">新增节点</el-button>
-      <el-button @click="editBodyNode" size="mini">编辑节点</el-button>
-      <el-button @click="deleteBodyNode" size="mini" type="danger">删除节点</el-button>
+      <el-button @click="addBodyNode" size="mini" type="primary" v-show="enableAdd">新增节点</el-button>
+      <el-button @click="editBodyNode" size="mini" v-show="false">编辑节点</el-button>
+      <el-button @click="deleteBodyNode" size="mini" type="danger" v-show="enableDelete">删除节点</el-button>
+      <el-button @click="postPageData" size="mini" style="float: right;" v-bind:disabled="disablePush">提交</el-button>
     </div>
     <div class="table">
       <el-table :data="tableData" border is-horizontal-resize
@@ -24,31 +25,42 @@
         </el-table-column>
         <el-table-column type="index" label="序号" align="center" width="60"/>
         <el-table-column prop="BnName" label="节点名称" align="center" sortable/>
-        <el-table-column prop="Weight" label="所占权重" align="center" sortable/>
-        <el-table-column prop="DefScore" label="默认分数" align="center" sortable/>
-        <el-table-column prop="id" label="状态">
+        <el-table-column prop="Weight" label="权重等级" align="center" sortable>
           <template slot-scope="scope">
-            <el-button type="success" v-if="scope.row.Status == 8" size="mini" @click="enableRow(scope.row,1)">
-              启用
-            </el-button>
-            <el-button type="warning" v-if="scope.row.Status == 1" size="mini" @click="enableRow(scope.row,8)">
-              禁用
-            </el-button>
+            <el-input-number v-model="scope.row.Weight" @change="handleChange" :min="0" :max="3"
+                             label="一级"></el-input-number>
           </template>
         </el-table-column>
+
+        <el-table-column prop="DefScore" label="权重分数" align="center" sortable>
+          <template slot-scope="scope">
+            {{ scope.row.DefScore }}
+          </template>
+        </el-table-column>
+        <!--        <el-table-column prop="id" label="状态">-->
+        <!--          <template slot-scope="scope">-->
+        <!--            <el-button type="success" v-if="scope.row.Status == 8" size="mini" @click="enableRow(scope.row,1)">-->
+        <!--              启用-->
+        <!--            </el-button>-->
+        <!--            <el-button type="warning" v-if="scope.row.Status == 1" size="mini" @click="enableRow(scope.row,8)">-->
+        <!--              禁用-->
+        <!--            </el-button>-->
+        <!--          </template>-->
+        <!--        </el-table-column>-->
       </el-table>
       <br/>
       <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
                      @current-change="pageChange"
                      :current-page.sync="cur_page"
-      ></el-pagination>
+                     v-show="false"
+      />
     </div>
     <el-dialog :title="dialogTitle" :visible.sync="addBodyNodeVisible" width="650px">
       <div class="dialogContent">
         <div class>
           <el-form ref="form" :model="form" label-width="160px">
             <el-form-item label="身体节点" :required="true">
-              <el-select v-model="form.bnId" placeholder="请选择">
+              <el-select v-model="form.bnId" placeholder="请选择" v-if="form.btnType == 0">
                 <el-option
                     v-for="item in form.bnList"
                     :key="item.BnId"
@@ -56,13 +68,15 @@
                     :value="item.BnId">
                 </el-option>
               </el-select>
+              <span v-if="form.btnType == 1">{{ form.bnName }}</span>
+
             </el-form-item>
-            <el-form-item label="权重">
-              <el-input-number v-model="form.weight" :min="1" :max="10" label="1122"></el-input-number>
-            </el-form-item>
-            <el-form-item label="默认分数">
-              <el-input-number v-model="form.score" :min="1" :max="10" label="描述文字"></el-input-number>
+            <el-form-item label="权重" v-if="form.btnType == 1">
+              <el-input-number v-model="form.weight" :min="0" :max="3"></el-input-number>
             </el-form-item>
+            <!--            <el-form-item label="默认分数">-->
+            <!--              <el-input-number v-model="form.score" :min="1" :max="10" label="描述文字"></el-input-number>-->
+            <!--            </el-form-item>-->
           </el-form>
         </div>
       </div>
@@ -78,11 +92,12 @@
 <script>
 import Global from '../Global.js'
 import {
-  BodyNodeStatusEdit,
   ENRelationEdit,
   ENRelationQuery,
   ENRelationAdd,
-  BodyNodeQuery, ENRelationStatusEdit,
+  BodyNodeQuery,
+  ENRelationStatusEdit,
+  ENRelationBatchEdit,
 } from "../api/getApiRes";
 
 let qs = require('qs');
@@ -96,6 +111,9 @@ export default {
       dialogTitle: '',
       tableRadio: [],
       cur_page: 1,
+      enableAdd: true,
+      enableDelete: true,
+      disablePush: true,
       // panel 配置项目
       panel: {
         str: '',
@@ -114,18 +132,18 @@ export default {
       },
       multipleSelection: [],
       pagination: {
-        pageItem: 10,
+        pageItem: 200,
         pageOptions: pageOptions(),
         total: 100,
         pageIndex: 1,
       },
       form: {
-        enId:'',
-        bnId:'',
-        bnName:'',
-        bnList:[],
-        weight:5,
-        score:5,
+        enId: '',
+        bnId: '',
+        bnName: '',
+        bnList: [],
+        weight: 0,
+        score: 0,
         btnType: 0,//0新建,1编辑编辑
       },
       tableData: []
@@ -136,6 +154,7 @@ export default {
     this.eaId = this.$route.query.eaId;
     this.eaName = this.$route.query.eaName;
     this.getTableQuery();
+    this.getBodyNodes();
   },
   methods: {
     //返回上一页
@@ -162,7 +181,7 @@ export default {
     clearForm() {
       this.form.bnId = '';
     },
-    // 新增动作
+    // 新增身体节点
     addBodyNode() {
       this.clearForm();
       this.addBodyNodeVisible = true;
@@ -183,12 +202,12 @@ export default {
         eaId: that.eaId,
         eaName: that.eaName,
         bnId: that.form.bnId,
-        bnName: "bodyNode:"+that.form.bnId,
+        bnName: "bodyNode:" + that.form.bnId,
         weight: that.form.weight,
         defScore: that.form.score
       };
-      let postdata = qs.stringify(param);
-      ENRelationAdd(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ENRelationAdd(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           // 关闭弹窗
@@ -200,6 +219,10 @@ export default {
             message: '关联节点添加成功!',
             type: 'success'
           });
+          that.getTableQuery();
+          if (that.form.bnList.length === 1) {
+            that.enableAdd = false;
+          }
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
@@ -209,29 +232,29 @@ export default {
     editBodyNode() {
       let that = this;
       this.clearForm();
-      if (this.tableRadio.length == 0) {
+      if (this.tableRadio == null) {
         this.$message.error("请先选中一条记录");
         return false
       }
       this.dialogVisible = true;
       this.addBodyNodeVisible = true
       this.dialogTitle = '编辑节点';
-      this.getBodyNodes();
 
       let row = this.tableRadio;
       this.form.shopid = row.ShopId;
       this.form.bnId = row.BnId;
       this.form.enId = row.EnId;
-      this.form.name = row.BnName;
+      this.form.weight = row.Weight;
+      this.form.bnName = row.BnName;
       this.form.btnType = 1;
     },
     //提交编辑关联节点
     confirmEditRelation() {
       let that = this;
-      if (!that.form.name) {
-        this.$message.error('错了哦,关联节点名称不能为空');
-        return false
-      }
+      // if (!that.form.name) {
+      //   this.$message.error('错了哦,关联节点名称不能为空');
+      //   return false
+      // }
 
       let param = {
         token: localStorage.token,
@@ -242,8 +265,8 @@ export default {
         weight: that.form.weight,
         defScore: that.form.score
       };
-      let postdata = qs.stringify(param);
-      ENRelationEdit(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ENRelationEdit(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           // 关闭弹窗
@@ -263,7 +286,11 @@ export default {
     //删除关联节点
     deleteBodyNode() {
       let that = this;
-      let row = this.tableRadio;
+      if (that.tableRadio === null) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = that.tableRadio;
       let param = {
         token: localStorage.token,
         bnId: row.BnId,
@@ -272,14 +299,14 @@ export default {
         eaName: that.eaName,
         status: 9 //1:启用,8:禁用,9:删除
       };
-      let postdata = qs.stringify(param);
+      let postData = qs.stringify(param);
 
       this.$confirm('此操作将永久删除关联的身体节点, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        ENRelationStatusEdit(postdata).then(res => {
+        ENRelationStatusEdit(postData).then(res => {
           let json = res;
           if (json.Code == 0) {
             // table 重载
@@ -289,6 +316,7 @@ export default {
               message: '删除成功',
               type: 'success'
             });
+            that.enableAdd = true;
           } else {
             that.$message.error(json.Memo);
           }
@@ -300,6 +328,87 @@ export default {
         });
       });
     },
+    //设置行等级变动事件
+    handleChange() {
+      let that = this;
+      that.disablePush = false;
+
+      //计算每个动作节点的权重分数 一级权重:1/二级权重:1.5/三级权重:2
+      //首先计算出单位权重比例的分数
+      let sumWeight = 0, perWeightScore = 0.00;
+      for (let i = 0; i < that.tableData.length; i++) {//遍历table
+        console.log(JSON.stringify(that.tableData[i]));
+        if (that.tableData[i].Weight > 0) {
+          if (that.tableData[i].Weight == 1) {
+            sumWeight += 1;
+          }
+          if (that.tableData[i].Weight == 2) {
+            sumWeight += 1.5;
+          }
+          if (that.tableData[i].Weight == 3) {
+            sumWeight += 2;
+          }
+        }
+      }
+      perWeightScore = 100 / sumWeight;
+      //还原到每个动作节点的分数中
+      let perWeight = 1;
+      for (let i = 0; i < that.tableData.length; i++) {//遍历table
+        console.log(JSON.stringify(that.tableData[i]));
+        if (that.tableData[i].Weight == 0) {
+          perWeight = 0;
+        }
+        if (that.tableData[i].Weight == 1) {
+          perWeight = 1;
+        }
+        if (that.tableData[i].Weight == 2) {
+          perWeight = 1.5;
+        }
+        if (that.tableData[i].Weight == 3) {
+          perWeight = 2;
+        }
+        that.tableData[i].DefScore = (perWeight * perWeightScore).toFixed(2);
+      }
+    },
+    //提交本页数据
+    postPageData() {
+      let that = this;
+
+      //拼接要提交的数据
+      let scoreRs = [];
+      for (let i = 0; i < that.tableData.length; i++) {//遍历table中的人员名单
+        console.log(i,JSON.stringify(that.tableData[i]));
+        let thisRow = {};
+        thisRow.EnId = that.tableData[i].EnId;
+        thisRow.Weight = that.tableData[i].Weight;
+        thisRow.DefScore = that.tableData[i].DefScore;
+        scoreRs.push(thisRow);
+      }
+      let param = {
+        token: localStorage.token,
+        eaId: that.eaId,
+        eaName: that.eaName,
+        BodyNodeRs: JSON.stringify(scoreRs)
+      };
+      console.log(JSON.stringify(param));
+      let postData = qs.stringify(param);
+      ENRelationBatchEdit(postData).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '执行成功!',
+            type: 'success'
+          });
+          // table 重载
+          that.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+
+      that.disablePush = true;
+    },
     //设置行状态
     enableRow(row, status) {
       let that = this;
@@ -311,8 +420,8 @@ export default {
         eaName: that.eaName,
         status: status,//1:启用 8:暂停 9:删除
       };
-      let postdata = qs.stringify(param);
-      ENRelationStatusEdit(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ENRelationStatusEdit(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           that.$message({
@@ -327,24 +436,27 @@ export default {
         }
       })
     },
-    //查询所有身体节点
-    getBodyNodes(){
+    ////获取当前动作可绑定节点
+    getBodyNodes() {
       let that = this;
       that.loading = true;
       let param = {
-        token: localStorage.token
+        token: localStorage.token,
+        eaId: that.eaId
       };
-      let postdata = qs.stringify(param);
-      BodyNodeQuery(postdata).then(res => {
+      let postData = qs.stringify(param);
+      BodyNodeQuery(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
-          if (json.Rs) {
+          if (json.Rs.length > 0) {
             that.form.bnList = json.Rs;
+            that.enableAdd = true;
           } else {
             that.form.bnList = [];
+            that.enableAdd = false;
           }
           // 设置分页数据
-          that.setPaginations();
+          that.setPagination();
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
@@ -366,27 +478,40 @@ export default {
         token: localStorage.token,
         eaId: that.eaId
       };
-      let postdata = qs.stringify(param);
-      ENRelationQuery(postdata).then(res => {
+      let postData = qs.stringify(param);
+      ENRelationQuery(postData).then(res => {
         let json = res;
         if (json.Code == 0) {
           that.loading = false;
           if (json.Rs) {
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
+            if (json.Rs.length == 0) {
+              that.enableDelete = false;
+            } else {
+              that.enableDelete = true;
+            }
+            //不使用分页
+            that.tableData = json.Rs;
+            //分页
+            // that.allTableData = json.Rs;
+            // that.recordsTotal = json.Rs.length;
+
           } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
+            //不使用分页
+            that.tableData = [];
+
+            //使用分页
+            // that.allTableData = [];
+            // that.recordsTotal = 0;
           }
           // 设置分页数据
-          that.setPaginations();
+          that.setPagination();
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
       })
     },
     // 设置分页数据
-    setPaginations() {
+    setPagination() {
       // 分页属性
       let that = this;
       that.pagination.total = that.recordsTotal;
@@ -443,6 +568,7 @@ export default {
         this.eaId = this.$route.query.eaId;
         this.eaName = this.$route.query.eaName;
         this.getTableQuery();
+        this.getBodyNodes();
       }
     },
   },

+ 73 - 46
pc/src/views/ActionScore.vue

@@ -5,7 +5,7 @@
         <el-page-header @back="goBack" content="动作评分"/>
         <span class="classNames">{{ title }}</span>
         <div class="likeTab">
-          <el-button @click="goType('courseEdit')" size="mini">人员管理</el-button>
+          <el-button @click="goType('courseEdit')" size="mini" v-if="FinishClass == 2 || FinishClass == 3">人员管理</el-button>
           <el-button type="primary" @click="goType('actionScore')" size="mini">动作评分</el-button>
           <el-button @click="goType('scoreResult')" size="mini">评分结果</el-button>
         </div>
@@ -14,7 +14,7 @@
             <el-col :span="22">
               <el-radio-group v-model="action" size="mini" @change="handleClick" align="left"
                               style="margin-left: -10px;float: left;padding-left: 10px">
-                <el-radio v-for="item in actionList" :label="item.AgdId"
+                <el-radio v-for="item in actionList" :label="item.HAgdId"
                           border style="margin-top: 10px;margin-left: -10px">
                   {{ item.EaName }}
                 </el-radio>
@@ -27,7 +27,7 @@
       </div>
       <div class="change">
         <span v-if="actionDesc" align="left" style="float: left;">{{ actionDesc }}</span>
-        <el-button @click="postPageMember" size="mini" style="float: right;">提交本页</el-button>
+        <el-button @click="postPageMember" :disabled="FinishClass == 0 || FinishClass == 3" type="success" size="mini" :loading="enablePost" style="float: right;">提交本页</el-button>
       </div>
     </div>
     <div class="table">
@@ -43,9 +43,17 @@
         <el-table-column
             type="index"
             label="排名"
+            fixed
             align="center"
             width="50"
-        ></el-table-column>
+        />
+        <el-table-column
+            prop="Name"
+            label="会员名"
+            width="90"
+            fixed
+            sortable
+        />
         <el-table-column
             prop="head"
             label="头像"
@@ -70,13 +78,6 @@
             />
           </template>
         </el-table-column>
-        <el-table-column
-            prop="Name"
-            label="会员名"
-            width="90"
-            sortable
-        ></el-table-column>
-
         <el-table-column
             prop="Usercode"
             label="手机号"
@@ -100,10 +101,10 @@
         </el-table-column>
 
         <el-table-column
-            v-for="item in bodyList" :key="item.BnId" :label="item.BnName" :prop="''+item.BnId">
+            v-for="item in bodyList" :key="item.HEnID" :label="item.BnName" :prop="''+item.HEnID" width ="180rem">
           <template slot-scope="scope">
             <el-switch
-                v-model="scope.row.BodyNodeRs[''+item.BnId]"
+                v-model="scope.row.BodyNodeRs[''+item.HEnID]"
                 :disabled="scope.row.EaScoreLevel == 0"
                 inactive-color="#13ce66"
                 active-color="#ff4949"
@@ -128,8 +129,10 @@
 import Global from "../Global.js";
 import {
   ScoreClassDetailQuery,
-  AGDetailQuery,
-  ENRelationQuery,
+  AGDetailCurrStdQuery,
+  ENRelationCurrStdQuery,
+  ScoreClassDetailBatchScore,
+  ScoreClassScoreFinish,
 } from "../api/getApiRes";
 
 let qs = require("qs");
@@ -137,6 +140,7 @@ export default {
   data() {
     return {
       AgId: 0,
+      ScoreIsFinish: true,
       ClassType: 0,
       PkNum: 0,
       BeginTime: "",
@@ -144,6 +148,7 @@ export default {
       FinishClass: 0, //当前上课状态 1已下课 2已上课 3准备上课 FinishClass
       title: "",
       action: "",
+      enablePost: false,
       actionList: [],
       actionDesc: "",
       tableData: [],
@@ -192,25 +197,25 @@ export default {
         this.$route.query.EndStr;
   },
   methods: {
-    handleClick(AgdId) {
+    handleClick(hAgdId) {
       let that = this;
-      that.getActionBodyNode(AgdId);
+      that.getActionBodyNode(hAgdId);
     },
     //获取动作下的身体节点
-    getActionBodyNode(AgdId) {
+    getActionBodyNode(hAgdId) {
       let that = this;
       let param = {
         token: localStorage.token,
-        // agdId: AgdId,
-        eaId: 3,
+        stdId: this.$route.query.StdId,
+        hAgdId: hAgdId
       };
       let postdata = qs.stringify(param);
-      ENRelationQuery(postdata).then((res) => {
+      ENRelationCurrStdQuery(postdata).then((res) => {
         let json = res;
         if (json.Code == 0) {
           if (json.Rs) {
             that.bodyList = json.Rs;
-            that.getTableQuery(AgdId);
+            that.getTableQuery(hAgdId);
           } else {
             that.bodyList = [];
           }
@@ -221,21 +226,23 @@ export default {
     },
     postPageMember() {
       let that = this;
+
+      that.pausePushButton();
       //拼接打分权重数据
       let rowScore = deepClone(that.tableData[0].BodyNodeRs);
-      // console.log(JSON.stringify(rowScore));
+      console.log(JSON.stringify(rowScore));
       for (let key in rowScore) {
         for (let i = 0; i < that.bodyList.length; i++) {//遍历table中的人员名单
           for (let bodyNd in that.bodyList[i]) {
-            if (key == that.bodyList[i].BnId) {
-              // console.log(key, that.bodyList[i].BnId, rowScore[key]);
-              rowScore[key] = that.bodyList[i].BnId;
+            if (key == that.bodyList[i].HEnID) {
+              // console.log(key, that.bodyList[i].HEnID, rowScore[key]);
+              rowScore[key] = that.bodyList[i].DefScore;
               break;
             }
           }
         }
       }
-      // console.log(JSON.stringify(rowScore));
+      console.log(JSON.stringify(rowScore));
 
       //拼接人员数据
       let scoreRs = [];
@@ -244,14 +251,14 @@ export default {
         thisRow = deepClone(that.tableData[i]);
         thisRow.BodyNodeScore = rowScore;
         thisRow.EaScore = 0;//默认评分是0
-        if (thisRow.EaScoreLevel == 2) {//优秀时计算分数
+        if (thisRow.EaScoreLevel == 1 || thisRow.EaScoreLevel == 2) {//不达标时、优秀时计算分数
 
           for (let nodeScore in rowScore) {
-            // console.log(key, that.bodyList[i].BnId, rowScore[key]);
-            console.log(nodeScore, rowScore[nodeScore]);
+            // console.log(key, that.bodyList[i].HEnID, rowScore[key]);
+            // console.log(nodeScore, rowScore[nodeScore]);
 
             for (let nodeName in thisRow.BodyNodeRs) {
-              console.log(nodeName, thisRow.BodyNodeRs[nodeName]);
+              // console.log(nodeName, thisRow.BodyNodeRs[nodeName]);
               if (nodeScore == nodeName) {
                 //找对应节点的状态
                 if (!thisRow.BodyNodeRs[nodeName]) {//false为优秀
@@ -265,31 +272,49 @@ export default {
         this.$delete(thisRow, 'Usercode');//删除Usercode属性
         scoreRs.push(thisRow);
       }
-      console.log(scoreRs);
-
       let param = {
         token: localStorage.token,
         stdId: this.$route.query.StdId,
-        BodyNodeRs: scoreRs
+        scoreRs: JSON.stringify(scoreRs)
       };
-      console.log(param);
-      console.log(JSON.stringify(param));
-
       let postData = qs.stringify(param);
-      console.log(postData);
+      ScoreClassDetailBatchScore(postData).then((res) => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '提交成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + " 错误码:" + json.Code);
+        }
+      });
+    },
+    pausePushButton(){
+      let that = this;
+      let totalTime = 2;
+      that.enablePost = true;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.enablePost = false;
+        }
+      }, 1000);
     },
     editMemberRow(row) {
       let that = this;
       //默认等级优秀
       if (row.EaScoreLevel == 2) {
         for (let tempBody in that.bodyList) {
-          row.BodyNodeRs[that.bodyList[tempBody]["BnId"]] = false;
+          row.BodyNodeRs[that.bodyList[tempBody]["HEnID"]] = false;
         }
       }
       //默认等级不达标
       if (row.EaScoreLevel == 1) {
         for (let tempBody in that.bodyList) {
-          row.BodyNodeRs[that.bodyList[tempBody]["BnId"]] = true;
+          row.BodyNodeRs[that.bodyList[tempBody]["HEnID"]] = true;
         }
       }
       if (row.EaScoreLevel == 0) {
@@ -307,15 +332,15 @@ export default {
       let that = this;
       let param = {
         token: localStorage.token,
-        agId: this.$route.query.AgId
+        stdId: this.$route.query.StdId
       };
       let postData = qs.stringify(param);
-      AGDetailQuery(postData).then((res) => {
+      AGDetailCurrStdQuery(postData).then((res) => {
         let json = res;
         if (json.Code == 0) {
           if (json.Rs) {
             that.actionList = json.Rs;
-            that.action = json.Rs[0].AgdId;
+            that.action = json.Rs[0].HAgdId;
             that.getActionBodyNode(that.action);
           } else {
             that.actionList = [];
@@ -332,12 +357,12 @@ export default {
       });
     },
     // 页面数据查询
-    getTableQuery(AgdId) {
+    getTableQuery(hAgdId) {
       let that = this;
       that.loading = true;
       let param = {
         token: localStorage.token,
-        agdId: AgdId,
+        hAgdId: hAgdId,
         stdId: this.$route.query.StdId
       };
       that.allTableData = [];
@@ -404,6 +429,7 @@ export default {
       this.$router.push({
         path: '/' + url, query: {
           AgId: this.$route.query.AgId,
+          ScoreIsFinish: this.$route.query.ScoreIsFinish,
           StdId: this.$route.query.StdId,
           ClassName: this.$route.query.ClassName,
           BeginStr: this.$route.query.BeginStr,
@@ -420,7 +446,8 @@ export default {
       if (to.name == "actionScore") {
         this.getActionQuery();
         this.AgId = this.$route.query.AgId;
-        this.FinishClass = this.$route.query.FinishClass;
+        this.ScoreIsFinish = this.$route.query.ScoreIsFinish,
+            this.FinishClass = this.$route.query.FinishClass;
         this.ClassType = this.$route.query.ClassType;
         this.PkNum = this.$route.query.PkNum;
         this.title =

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

@@ -10,11 +10,11 @@
       <div class="panel-body">
         <div class="panel_control">
           <el-row :gutter="1">
-            <el-col :span="6" align="center">
+            <el-col :span="5" align="center">
               <em>节点名称:</em>
               <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
             </el-col>
-            <el-col :span="3">
+            <el-col :span="4">
               <em>状态:</em>
               <!--status-->
               <el-select v-model="panel.status" placeholder="请选择">

+ 0 - 1
pc/src/views/Index.vue

@@ -47,7 +47,6 @@
         },
         mounted() {
             // checkScreen
-            console.log(this.isCollapse);
             if (document.body.clientWidth < 768) {
                 this.$message.warning('请横屏使用本系统');
             }

+ 1374 - 1374
pc/src/views/Member.vue

@@ -1,1434 +1,1434 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>会员管理</h5>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="5">
-                            <em>姓名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>会员类型:</em>
-                            <el-select v-model="panel.vipType">
-                                <el-option v-for="item in panel.vipOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="5">
-                            <em>到期日:</em>
-                            <el-select v-model="panel.expDay">
-                                <el-option v-for="item in panel.endTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="2">
-                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-        </div>
-        <div class="change">
-            <el-button @click="addMember" v-if="userLevel != 4" type="primary" size="mini">新增会员</el-button>
-            <el-button @click="delList" v-if="userLevel != 4" size="mini">删除会员</el-button>
-            <el-button @click="lessonChange" v-if="userLevel != 4" size="mini">课时调整</el-button>
-            <el-button @click="giftChange" v-if="userLevel != 4" size="mini">赠送课时调整</el-button>
-            <el-button @click="ExpTimeChange" v-if="userLevel != 4" size="mini">有效期调整</el-button>
-            <el-button @click="lessonStudenChange" v-if="userLevel != 4" size="mini">增删会员可预约课程</el-button>
-            <!--            <el-button class="pull-right" icon="el-icon-position">导出</el-button>-->
+  <div class="context">
+    <div class="panel">
+      <h5>会员管理</h5>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="1">
+            <el-col :span="4" align="center">
+              <em>姓名:</em>
+              <el-input v-model="panel.name" placeholder="请输入姓名"/>
+            </el-col>
+            <el-col :span="4">
+              <em>手机号:</em>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+            </el-col>
+            <el-col :span="3">
+              <em>会员类型:</em>
+              <el-select v-model="panel.vipType">
+                <el-option v-for="item in panel.vipOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="3">
+              <em>到期日:</em>
+              <el-select v-model="panel.expDay">
+                <el-option v-for="item in panel.endTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
+              </el-button>
+            </el-col>
+          </el-row>
         </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addMember" v-if="userLevel != 4" type="primary" size="mini">新增会员</el-button>
+      <el-button @click="delList" v-if="userLevel != 4" size="mini">删除会员</el-button>
+      <el-button @click="lessonChange" v-if="userLevel != 4" size="mini">课时调整</el-button>
+      <el-button @click="giftChange" v-if="userLevel != 4" size="mini">赠送课时调整</el-button>
+      <el-button @click="ExpTimeChange" v-if="userLevel != 4" size="mini">有效期调整</el-button>
+      <el-button @click="lessonStudenChange" v-if="userLevel != 4" size="mini">增删会员可预约课程</el-button>
+      <!--            <el-button class="pull-right" icon="el-icon-position">导出</el-button>-->
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
                 element-loading-background="rgba(0, 0, 0, 0.8)" @selection-change="handleSelectionChange"
                 @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55" fixed>
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
-                        width="50"
-                >
-                </el-table-column> -->
-                <el-table-column label="序号" type="index" width="50" align="center" fixed>
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Name" label="会员名" width="90" fixed>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Phone" label="手机号" width="110" sortable fixed>
-                </el-table-column>
-                <el-table-column prop="UserInfo.head" label="头像" width="50">
-                    <template slot-scope="scope">
-                        <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>
-                <el-table-column prop="UserInfo.VipType" label="类型" align="center" width="80px" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
-                        <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ExpTime" label="会员有效期" width="115" :formatter="filterFmtDate" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.RemainNormalhour" label="剩余课时" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.RemainGifthour" label="剩余赠送" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ConsumeNormalhour" label="消费课时" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="UserInfo.ConsumeGifthour" label="消费赠送" width="105" sortable>
-                </el-table-column>
-                <el-table-column prop="ClassInfo" label="会员课程" width="220px">
-                    <template slot-scope="scope">
+        >
+        <el-table-column label="选择" width="55" fixed>
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
+                type="index"
+                label="序号"
+                align="center"
+                width="50"
+        >
+        </el-table-column> -->
+        <el-table-column label="序号" type="index" width="50" align="center" fixed>
+          <template scope="scope">
+            <span>{{(start) + scope.$index + 1}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="UserInfo.Name" label="会员名" width="90" fixed>
+        </el-table-column>
+        <el-table-column prop="UserInfo.Phone" label="手机号" width="110" sortable fixed>
+        </el-table-column>
+        <el-table-column prop="UserInfo.head" label="头像" width="50">
+          <template slot-scope="scope">
+            <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>
+        <el-table-column prop="UserInfo.VipType" label="类型" align="center" width="80px" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
+            <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="UserInfo.ExpTime" label="会员有效期" width="115" :formatter="filterFmtDate" sortable>
+        </el-table-column>
+        <el-table-column prop="UserInfo.RemainNormalhour" label="剩余课时" width="105" sortable>
+        </el-table-column>
+        <el-table-column prop="UserInfo.RemainGifthour" label="剩余赠送" width="105" sortable>
+        </el-table-column>
+        <el-table-column prop="UserInfo.ConsumeNormalhour" label="消费课时" width="105" sortable>
+        </el-table-column>
+        <el-table-column prop="UserInfo.ConsumeGifthour" label="消费赠送" width="105" sortable>
+        </el-table-column>
+        <el-table-column prop="ClassInfo" label="会员课程" width="220px">
+          <template slot-scope="scope">
                         <span class="lessonSpan" :style="{background:lesson.ClassColor}"
-                            v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.IsAcross" label="跨店会员" width="105" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.IsAcross == 0" class="green">本店用户</span>
-                        <span v-else class="red">跨店用户</span>
-                    </template>
-                </el-table-column>
-                <!-- <el-table-column
-                        prop="TakeId"
-                        label="Take绑定"
-                        width="105"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
-                        <span v-else>已绑定</span>
-                    </template>
-                </el-table-column> -->
-                <el-table-column prop="UserInfo.Memo" label="备注">
-                    <template slot-scope="scope">
-                        <el-popover placement="top" title="" width="200" trigger="hover"
-                            :content="scope.row.UserInfo.Memo">
+                              v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="UserInfo.IsAcross" label="跨店会员" width="105" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.UserInfo.IsAcross == 0" class="green">本店用户</span>
+            <span v-else class="red">跨店用户</span>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
+                prop="TakeId"
+                label="Take绑定"
+                width="105"
+                sortable
+        >
+            <template slot-scope="scope">
+                <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
+                <span v-else>已绑定</span>
+            </template>
+        </el-table-column> -->
+        <el-table-column prop="UserInfo.Memo" label="备注">
+          <template slot-scope="scope">
+            <el-popover placement="top" title="" width="200" trigger="hover"
+                        :content="scope.row.UserInfo.Memo">
                             <span slot="reference" v-if="scope.row.UserInfo.Memo.length > 6">{{
                                 scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
-                        </el-popover>
-                        <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="UserInfo.Status" label="操作" width="120px">
-                    <template slot-scope="scope">
-                        <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
-                            v-if="userLevel != 4">编辑
-                        </el-button>
-                        <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
-                            @click="pauseRow(scope.row)">
-                            禁用
-                        </el-button>
-                        <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
-                            @click="runRow(scope.row)">
-                            启用
-                        </el-button>
-                        <!-- <el-button class="btn" type="primary" size="mini"
-                                   @click="addTake(scope.row)">Take绑定
-                        </el-button> -->
-                        <el-button class="btn relevance" type="default" size="mini" @click="goRelevance(scope.row)">
-                            关联手机号
-                        </el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <div v-if="pageshow">
-                <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                    @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
-            </div>
-        </div>
+            </el-popover>
+            <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="UserInfo.Status" label="操作" width="120px">
+          <template slot-scope="scope">
+            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"
+                       v-if="userLevel != 4">编辑
+            </el-button>
+            <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
+                       @click="pauseRow(scope.row)">
+              禁用
+            </el-button>
+            <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
+                       @click="runRow(scope.row)">
+              启用
+            </el-button>
+            <!-- <el-button class="btn" type="primary" size="mini"
+                       @click="addTake(scope.row)">Take绑定
+            </el-button> -->
+            <el-button class="btn relevance" type="default" size="mini" @click="goRelevance(scope.row)">
+              关联手机号
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <div v-if="pageshow">
+        <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                       @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
+      </div>
+    </div>
 
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
-            :width="form.btnType == 1 ?'650px':'1200px'">
-            <div class="dialogContent">
-                <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
-                    <el-form ref="form" :model="form" label-width="80px">
-                        <el-form-item label="手机号" :required="true">
-                            <el-input v-model="form.phone" @blur="getUsrInfoList()"></el-input>
-                        </el-form-item>
-                        <el-form-item label="会员名" :required="true">
-                            <el-input v-model="form.name"></el-input>
-                        </el-form-item>
-                        <el-form-item label="会员类型" v-if="form.btnType == 0">
-                            <el-select v-model="form.vipType" placeholder="请选择所属门店">
-                                <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
-                                    :value="item.value"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.normalhour " :min="0" :max="99999" label="(天)">
-                            </el-input-number>
-                        </el-form-item>
-                        <el-form-item label="赠送课时" v-if="form.btnType == 0">
-                            <el-input-number v-model="form.gifthour " :min="0" :max="99999" label="(天)">
-                            </el-input-number>
-                        </el-form-item>
-                        <el-form-item label="备注">
-                            <el-input v-model="form.memo"></el-input>
-                        </el-form-item>
-                        <el-form-item label="身高" :required="true">
-                            <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="体重" :required="true">
-                            <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="静态心率">
-                            <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
-                        </el-form-item>
-                        <el-form-item label="性别" :required="true">
-                            <el-select v-model="form.sex " placeholder="">
-                                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
-                                    :value="item.value"></el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="头像" :required="true">
-                            <!--                            <div class="upload">-->
-                            <!--                                <el-upload-->
-                            <!--                                        class="avatar-uploader"-->
-                            <!--                                        :action=domain-->
-                            <!--                                        :http-request=upqiniu-->
-                            <!--                                        :show-file-list="false"-->
-                            <!--                                        :before-upload="beforeUpload">-->
-                            <!--                                    &lt;!&ndash;<i v-else class="el-icon-plus avatar-uploader-icon"></i>&ndash;&gt;-->
-                            <!--                                </el-upload>-->
-                            <img v-if="imageUrl" :src="imageUrl" class="avatar">
-                            <cropper :width="300" :height="300" :fixed-number="[1,1]" @subUploadSucceed="getShopImages">
-                            </cropper>
-                            <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
-                            <!--                            </div>-->
-                        </el-form-item>
-                        <el-form-item label="出生年份" :required="true">
-                            <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
-                            </el-date-picker>
-                        </el-form-item>
-                    </el-form>
-                </div>
-                <div class="pull-right" v-if="form.btnType == 0 && pullRight">
-                    <el-form ref="form" :model="form" label-width="10px">
-                        <el-form-item label="">
-                            <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
-                                :titles="['全部课程','已选课程']"></el-transfer>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button :disabled="addDisabled" type="primary" size="small" v-if="form.btnType == 0"
-                    @click="confirmMember">确定
-                </el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
+               :width="form.btnType == 1 ?'650px':'1200px'">
+      <div class="dialogContent">
+        <div :class="['pull-left',{'tabwild':form.btnType == 1}]">
+          <el-form ref="form" :model="form" label-width="80px">
+            <el-form-item label="手机号" :required="true">
+              <el-input v-model="form.phone" @blur="getUsrInfoList()"></el-input>
+            </el-form-item>
+            <el-form-item label="会员名" :required="true">
+              <el-input v-model="form.name"></el-input>
+            </el-form-item>
+            <el-form-item label="会员类型" v-if="form.btnType == 0">
+              <el-select v-model="form.vipType" placeholder="请选择所属门店">
+                <el-option v-for="item in memberTypes" :key="item.value" :label="item.label"
+                           :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="课时" v-if="form.btnType == 0">
+              <el-input-number v-model="form.normalhour " :min="0" :max="99999" label="(天)">
+              </el-input-number>
+            </el-form-item>
+            <el-form-item label="赠送课时" v-if="form.btnType == 0">
+              <el-input-number v-model="form.gifthour " :min="0" :max="99999" label="(天)">
+              </el-input-number>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"></el-input>
+            </el-form-item>
+            <el-form-item label="身高" :required="true">
+              <el-input v-model="form.height" placeholder="cm" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="体重" :required="true">
+              <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="静态心率">
+              <el-input v-model="form.staticHr" placeholder="请输入" type="number"></el-input>
+            </el-form-item>
+            <el-form-item label="性别" :required="true">
+              <el-select v-model="form.sex " placeholder="">
+                <el-option v-for="item in sexOptions" :key="item.value" :label="item.label"
+                           :value="item.value"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="头像" :required="true">
+              <!--                            <div class="upload">-->
+              <!--                                <el-upload-->
+              <!--                                        class="avatar-uploader"-->
+              <!--                                        :action=domain-->
+              <!--                                        :http-request=upqiniu-->
+              <!--                                        :show-file-list="false"-->
+              <!--                                        :before-upload="beforeUpload">-->
+              <!--                                    &lt;!&ndash;<i v-else class="el-icon-plus avatar-uploader-icon"></i>&ndash;&gt;-->
+              <!--                                </el-upload>-->
+              <img v-if="imageUrl" :src="imageUrl" class="avatar">
+              <cropper :width="300" :height="300" :fixed-number="[1,1]" @subUploadSucceed="getShopImages">
+              </cropper>
+              <!--<ImgCutter v-on:cutDown="cutDown"></ImgCutter>-->
+              <!--                            </div>-->
+            </el-form-item>
+            <el-form-item label="出生年份" :required="true">
+              <el-date-picker v-model="form.birthday" align="right" type="date" placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="pull-right" v-if="form.btnType == 0 && pullRight">
+          <el-form ref="form" :model="form" label-width="10px">
+            <el-form-item label="">
+              <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
+                           :titles="['全部课程','已选课程']"></el-transfer>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button :disabled="addDisabled" type="primary" size="small" v-if="form.btnType == 0"
+                   @click="confirmMember">确定
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
 
-        <el-dialog :visible.sync="dialogVisible" width="650px">
-            <div class="dialogTitle">
-                <h5>
-                    用户:
-                    <em class="blue">【 {{ form.rowName }}】</em>
-                    <br>
-                    <br>
-                    <span v-if="dialogLesson">当前课时 {{ form.normalhour }}</span>
-                    <span v-if="dialogGift">赠送课时 {{ form.gifthour }}</span>
-                    <span v-if="dialogExpTime">当前到期时间</span>
-                    <span v-if="dialogLessonTable">增删会员可预约课程</span>
-                </h5>
-            </div>
-            <div v-if="dialogLesson">
-                <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
-            </div>
-            <div v-if="dialogGift">
-                <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
-            </div>
-            <div v-if="dialogExpTime">
-                <el-date-picker v-model="form.expTime" type="date" placeholder="选择日期">
-                </el-date-picker>
-            </div>
-            <div v-if="dialogLessonTable">
-                <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata" :titles="['全部课程','已选课程']">
-                </el-transfer>
-            </div>
-            <div class="dialogFooter">
-                <!--课时调整-->
-                <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
-                <!--赠送课时调整-->
-                <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
-                <!--                有效期调整-->
-                <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
-                <!--                课程增删-->
-                <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
-                </el-button>
-                <el-button size="small" @click="dialogVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+    <el-dialog :visible.sync="dialogVisible" width="650px">
+      <div class="dialogTitle">
+        <h5>
+          用户:
+          <em class="blue">【 {{ form.rowName }}】</em>
+          <br>
+          <br>
+          <span v-if="dialogLesson">当前课时 {{ form.normalhour }}</span>
+          <span v-if="dialogGift">赠送课时 {{ form.gifthour }}</span>
+          <span v-if="dialogExpTime">当前到期时间</span>
+          <span v-if="dialogLessonTable">增删会员可预约课程</span>
+        </h5>
+      </div>
+      <div v-if="dialogLesson">
+        <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
+      </div>
+      <div v-if="dialogGift">
+        <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
+      </div>
+      <div v-if="dialogExpTime">
+        <el-date-picker v-model="form.expTime" type="date" placeholder="选择日期">
+        </el-date-picker>
+      </div>
+      <div v-if="dialogLessonTable">
+        <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata" :titles="['全部课程','已选课程']">
+        </el-transfer>
+      </div>
+      <div class="dialogFooter">
+        <!--课时调整-->
+        <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
+        <!--赠送课时调整-->
+        <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
+        <!--                有效期调整-->
+        <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
+        <!--                课程增删-->
+        <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
+        </el-button>
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
 
-        <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
-            <div>
-                <el-select v-model="Takevalue" placeholder="请选择">
-                    <el-option v-for="item in Takeoptions" :key="item.Id" :label="item.Name + item.PhoneNo"
-                        :value="item.Id">
-                    </el-option>
-                </el-select>
-            </div>
-            <div class="dialogFooter">
-                <!--take绑定调整-->
-                <el-button type="primary" size="small" @click="confirmTake">确定</el-button>
-                <el-button size="small" @click="TakeVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-    </div>
+    <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
+      <div>
+        <el-select v-model="Takevalue" placeholder="请选择">
+          <el-option v-for="item in Takeoptions" :key="item.Id" :label="item.Name + item.PhoneNo"
+                     :value="item.Id">
+          </el-option>
+        </el-select>
+      </div>
+      <div class="dialogFooter">
+        <!--take绑定调整-->
+        <el-button type="primary" size="small" @click="confirmTake">确定</el-button>
+        <el-button size="small" @click="TakeVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import Global from '../Global.js'
-    import ImgCutter from 'vue-img-cutter'
-    import {
-        VipUserListQuery,
-        ClassListQuery,
-        VipUserAdd,
-        VipUserStatusEdit,
-        VipUserEdit,
-        VipUserHourEdit,
-        VipUserExpEdit,
-        VipUserClassEdit,
-        QueryTakeCustomerByName,
-        BindTakeCustomer,
-        VipUserQueryByPhone,
-        testTable,
-        testSelect
-    } from "../api/getApiRes";
-    import cropper from '@/components/cropper.vue'
+import Global from '../Global.js'
+import ImgCutter from 'vue-img-cutter'
+import {
+  VipUserListQuery,
+  ClassListQuery,
+  VipUserAdd,
+  VipUserStatusEdit,
+  VipUserEdit,
+  VipUserHourEdit,
+  VipUserExpEdit,
+  VipUserClassEdit,
+  QueryTakeCustomerByName,
+  BindTakeCustomer,
+  VipUserQueryByPhone,
+  testTable,
+  testSelect
+} from "../api/getApiRes";
+import cropper from '@/components/cropper.vue'
 
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                imageUrl: '',
-                token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
-                domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
-                qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
-                pullRight: true,//其他dialog
-                addDisabled: true,//禁止添加新用户
-                dialogVisible: false,//其他dialog
-                TakeVisible: false,//take dialog
-                dialogMemberVisible: false,//新增会员dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                dialogValue: [],
-                Takevalue: 0,
-                Takeoptions: [],
-                TakeHid: 0,
-                start: 0,
-                draw: 1,
-                cur_page: 1,
-                pageshow: true,
-                sexOptions: [
-                    { value: 1, label: '男' },//性别 1:男, 2:女
-                    { value: 2, label: '女' },
-                ],
-                yearOptions: getyearOptions(15),
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    vipType: '',
-                    expDay: '',
-                    vipOptions: vipOptions(0),
-                    endTypeOptions: endTypeOptions(),
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 10,
-                    pageIndex: 1,
-                },
-                form: {
-                    phone: '',
-                    name: '',
-                    userCode: '',
-                    shopId: '',
-                    Id: '',
-                    userId: '',
-                    height: '',
-                    weight: '',
-                    staticHr: '',
-                    head: '',
-                    birthday: '',
-                    sex: 1,
-                    vipType: 1,
-                    normalhour: 0,
-                    newnormalhour: 0,
-                    gifthour: 0,
-                    newgifthour: 0,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    classlist: [],
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: vipOptions(1),
-                tableData: [],
-                tableRadio: [],
-                userLevel: localStorage.userLevel,
-                serachBtnStatus: false
-            }
-        },
-        mounted() {
-            // 加载课程选项
-            this.panelSelect();
-            // 读取列表
-            this.getTableQuery();
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'Member') {
-                    // 加载课程选项
-                    this.panelSelect();
-                    // 读取列表
-                    this.getTableQuery();
-                }
-            },
-        },
-        methods: {
-            // 查询用户是否乃跨店用户
-            // todo 逻辑
-            //  1.新用户正常注册
-            //  2.
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      imageUrl: '',
+      token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
+      domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
+      qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
+      pullRight: true,//其他dialog
+      addDisabled: true,//禁止添加新用户
+      dialogVisible: false,//其他dialog
+      TakeVisible: false,//take dialog
+      dialogMemberVisible: false,//新增会员dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '新增会员',
+      dialogValue: [],
+      Takevalue: 0,
+      Takeoptions: [],
+      TakeHid: 0,
+      start: 0,
+      draw: 1,
+      cur_page: 1,
+      pageshow: true,
+      sexOptions: [
+        { value: 1, label: '男' },//性别 1:男, 2:女
+        { value: 2, label: '女' },
+      ],
+      yearOptions: getyearOptions(15),
+      // panel 配置项目
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        vipType: '',
+        expDay: '',
+        vipOptions: vipOptions(0),
+        endTypeOptions: endTypeOptions(),
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 10,
+        pageIndex: 1,
+      },
+      form: {
+        phone: '',
+        name: '',
+        userCode: '',
+        shopId: '',
+        Id: '',
+        userId: '',
+        height: '',
+        weight: '',
+        staticHr: '',
+        head: '',
+        birthday: '',
+        sex: 1,
+        vipType: 1,
+        normalhour: 0,
+        newnormalhour: 0,
+        gifthour: 0,
+        newgifthour: 0,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        classlist: [],
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: vipOptions(1),
+      tableData: [],
+      tableRadio: [],
+      userLevel: localStorage.userLevel,
+      serachBtnStatus: false
+    }
+  },
+  mounted() {
+    // 加载课程选项
+    this.panelSelect();
+    // 读取列表
+    this.getTableQuery();
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'Member') {
+        // 加载课程选项
+        this.panelSelect();
+        // 读取列表
+        this.getTableQuery();
+      }
+    },
+  },
+  methods: {
+    // 查询用户是否乃跨店用户
+    // todo 逻辑
+    //  1.新用户正常注册
+    //  2.
 
-            getUsrInfoList() {
+    getUsrInfoList() {
 
-                // 只有新增的时候启用当前功能
-                if (this.form.btnType == 1) {
-                    return false
-                }
+      // 只有新增的时候启用当前功能
+      if (this.form.btnType == 1) {
+        return false
+      }
 
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    phone: this.form.phone,
-                };
-                let postdata = qs.stringify(param);
-                VipUserQueryByPhone(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        let Status = json.Status;
-                        let Info = json.Info;
-                        // clear info
-                        that.pullRight = true;
-                        that.addDisabled = false;
-                        that.pullRight = true;
-                        that.form.name = '';
-                        that.form.height = '';
-                        that.form.weight = '';
-                        that.form.birthday = '';
-                        that.imageUrl = '';
-                        that.form.head = '';
-                        this.form.sex = 1;
-                        switch (parseInt(Status)) {
-                            case 1:
-                                that.$message.error('用户已存在,手机号不能重复添加');
-                                that.addDisabled = true;
-                                break;
-                            case 2:
-                                that.$message.success('已读取到当前用户信息');
-                                // 关掉右侧
-                                that.pullRight = false;
-                                that.form.name = Info.UserName;
-                                that.form.height = Info.Height;
-                                that.form.weight = parseInt(Info.Weight) / 10;
-                                that.form.birthday = Info.Birthday;
-                                that.imageUrl = Info.Head;
-                                that.form.head = Info.Head;
-                                this.form.sex = Info.Sex;
-                                break;
-                            case 3:
-                                that.$message.error('手机号已经关联其他用户不能重复添加');
-                                that.addDisabled = true;
-                                break;
-                            case 4:
-                                // 手机号在本店不存在,在其他店也不存在,前台应允许用户填写
-                                break;
-                        }
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            // 关联手机号跳转
-            goRelevance(row) {
-                this.$router.push({ path: '/relevancePhone', query: { userId: row.UserInfo.Id } });
-            },
-            cutDown(e) {
-                console.log(e);
-                this.imageUrl = e.dataURL;
-                this.upqiniu(e);
-            },
-            // 上传文件到七牛云
-            upqiniu(req) {
-                let that = this;
-                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(headapi + '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;
-                        this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
-                    })
-                })
-            },
-            // 验证文件合法性
-            beforeUpload(file) {
-                const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
-                const isLt2M = file.size / 1024 / 1024 < 70;
-                if (!isJPG) {
-                    this.$message.error('上传头像图片只能是 JPG 格式!')
-                }
-                if (!isLt2M) {
-                    this.$message.error('上传头像图片大小不能超过 70MB!')
-                }
-                return isJPG && isLt2M
-            },
-            // 打开take绑定和拉取take数据
-            addTake(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    userId: row.UserInfo.Id,
-                };
-                this.TakeHid = row.UserInfo.HId;
-                let postdata = qs.stringify(param);
-                QueryTakeCustomerByName(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs != '') {
-                            that.Takeoptions = json.Rs;
-                            that.Takevalue = json.Rs[0].Id;
-                            // 有值才能打开
-                            this.TakeVisible = true;
-                        } else {
-                            that.$message.error('当前用户没有可用的Take账号');
-                            this.TakeVisible = false;
-                            console.log('null');
-                        }
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 绑定take
-            confirmTake() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    hId: this.TakeHid,
-                    customerId: this.Takevalue,
-                    memo: '后台管理手动绑定',
-                };
-                let postdata = qs.stringify(param);
-                BindTakeCustomer(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: 'Take绑定成功!',
-                            type: 'success'
-                        });
-                        this.TakeVisible = false;
-                        // 读取列表
-                        this.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        phone: this.form.phone,
+      };
+      let postdata = qs.stringify(param);
+      VipUserQueryByPhone(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          let Status = json.Status;
+          let Info = json.Info;
+          // clear info
+          that.pullRight = true;
+          that.addDisabled = false;
+          that.pullRight = true;
+          that.form.name = '';
+          that.form.height = '';
+          that.form.weight = '';
+          that.form.birthday = '';
+          that.imageUrl = '';
+          that.form.head = '';
+          this.form.sex = 1;
+          switch (parseInt(Status)) {
+            case 1:
+              that.$message.error('用户已存在,手机号不能重复添加');
+              that.addDisabled = true;
+              break;
+            case 2:
+              that.$message.success('已读取到当前用户信息');
+              // 关掉右侧
+              that.pullRight = false;
+              that.form.name = Info.UserName;
+              that.form.height = Info.Height;
+              that.form.weight = parseInt(Info.Weight) / 10;
+              that.form.birthday = Info.Birthday;
+              that.imageUrl = Info.Head;
+              that.form.head = Info.Head;
+              this.form.sex = Info.Sex;
+              break;
+            case 3:
+              that.$message.error('手机号已经关联其他用户不能重复添加');
+              that.addDisabled = true;
+              break;
+            case 4:
+              // 手机号在本店不存在,在其他店也不存在,前台应允许用户填写
+              break;
+          }
+        } else {
+          that.$message.error(json.Memo);
+        }
+      })
+    },
+    // 关联手机号跳转
+    goRelevance(row) {
+      this.$router.push({ path: '/relevancePhone', query: { userId: row.UserInfo.Id } });
+    },
+    cutDown(e) {
+      console.log(e);
+      this.imageUrl = e.dataURL;
+      this.upqiniu(e);
+    },
+    // 上传文件到七牛云
+    upqiniu(req) {
+      let that = this;
+      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(headapi + '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;
+          this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
+        })
+      })
+    },
+    // 验证文件合法性
+    beforeUpload(file) {
+      const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
+      const isLt2M = file.size / 1024 / 1024 < 70;
+      if (!isJPG) {
+        this.$message.error('上传头像图片只能是 JPG 格式!')
+      }
+      if (!isLt2M) {
+        this.$message.error('上传头像图片大小不能超过 70MB!')
+      }
+      return isJPG && isLt2M
+    },
+    // 打开take绑定和拉取take数据
+    addTake(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        userId: row.UserInfo.Id,
+      };
+      this.TakeHid = row.UserInfo.HId;
+      let postdata = qs.stringify(param);
+      QueryTakeCustomerByName(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          if (json.Rs != '') {
+            that.Takeoptions = json.Rs;
+            that.Takevalue = json.Rs[0].Id;
+            // 有值才能打开
+            this.TakeVisible = true;
+          } else {
+            that.$message.error('当前用户没有可用的Take账号');
+            this.TakeVisible = false;
+            console.log('null');
+          }
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 绑定take
+    confirmTake() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        hId: this.TakeHid,
+        customerId: this.Takevalue,
+        memo: '后台管理手动绑定',
+      };
+      let postdata = qs.stringify(param);
+      BindTakeCustomer(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: 'Take绑定成功!',
+            type: 'success'
+          });
+          this.TakeVisible = false;
+          // 读取列表
+          this.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
 
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 编辑
-            editMember(row) {
-                let that = this;
-                this.clearForm();
-                this.form.phone = row.UserInfo.Phone;
-                this.form.name = row.UserInfo.Name;
-                this.form.memo = row.UserInfo.Memo;
-                this.imageUrl = row.UserInfo.Head;
-                this.form.height = row.UserInfo.Height;
-                this.form.weight = parseInt(row.UserInfo.Weight) / 10;
-                this.form.staticHr = row.UserInfo.StaticHr;
-                this.form.sex = row.UserInfo.Sex;
-                this.form.birthday = row.UserInfo.Birthday;
-                this.form.ubId = row.UserInfo.UbId;
-                this.form.btnType = 1;
-                this.form.shopId = row.UserInfo.ShopId;
-                this.form.Id = row.UserInfo.Id;
-                this.dialogMemberVisible = true;
-                this.dialogTitle = '编辑会员'
-            },
-            // 禁用
-            pauseRow(row) {
-                let that = this;
-                this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        userId: row.UserInfo.Id,
-                        status: 8,//状态 8:禁用 1:启用 9:删除
-                    };
-                    let postdata = qs.stringify(param);
-                    VipUserStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.UserInfo.Name + '禁用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消禁用'
-                    });
-                });
-            },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        userId: row.UserInfo.Id,
-                        status: 1,//状态 8:禁用 1:启用 9:删除
-                    };
-                    let postdata = qs.stringify(param);
-                    VipUserStatusEdit(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.UserInfo.Name + '启用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
-                });
-            },
-            // 关闭所有
-            allDialogClose() {
-                this.dialogVisible = false;
-                this.dialogGift = false;
-                this.dialogLesson = false;
-                this.dialogExpTime = false;
-                this.dialogLessonTable = false;
-            },
-            // 有效期调整
-            ExpTimeChange() {
-                // 仅针对年费用户,使用日期格式
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                if (parseInt(row.UserInfo.VipType) == 2) {
-                    this.$message({
-                        showClose: true,
-                        message: '错了哦,充值会员不能调整有效期',
-                        type: 'error'
-                    });
-                    return false
-                }
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.form.expTime = row.UserInfo.ExpTime
-                this.dialogVisible = true;
-                this.dialogExpTime = true;
-            },
-            // 课时调整
-            lessonChange() {
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.normalhour = row.UserInfo.RemainNormalhour;
-                this.form.newnormalhour = 0;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.dialogVisible = true;
-                this.dialogLesson = true;
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 编辑
+    editMember(row) {
+      let that = this;
+      this.clearForm();
+      this.form.phone = row.UserInfo.Phone;
+      this.form.name = row.UserInfo.Name;
+      this.form.memo = row.UserInfo.Memo;
+      this.imageUrl = row.UserInfo.Head;
+      this.form.height = row.UserInfo.Height;
+      this.form.weight = parseInt(row.UserInfo.Weight) / 10;
+      this.form.staticHr = row.UserInfo.StaticHr;
+      this.form.sex = row.UserInfo.Sex;
+      this.form.birthday = row.UserInfo.Birthday;
+      this.form.ubId = row.UserInfo.UbId;
+      this.form.btnType = 1;
+      this.form.shopId = row.UserInfo.ShopId;
+      this.form.Id = row.UserInfo.Id;
+      this.dialogMemberVisible = true;
+      this.dialogTitle = '编辑会员'
+    },
+    // 禁用
+    pauseRow(row) {
+      let that = this;
+      this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let param = {
+          token: localStorage.token,
+          userId: row.UserInfo.Id,
+          status: 8,//状态 8:禁用 1:启用 9:删除
+        };
+        let postdata = qs.stringify(param);
+        VipUserStatusEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: row.UserInfo.Name + '禁用成功!',
+              type: 'success'
+            });
+            // table 重载
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消禁用'
+        });
+      });
+    },
+    // 启用
+    runRow(row) {
+      let that = this;
+      this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let param = {
+          token: localStorage.token,
+          userId: row.UserInfo.Id,
+          status: 1,//状态 8:禁用 1:启用 9:删除
+        };
+        let postdata = qs.stringify(param);
+        VipUserStatusEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: row.UserInfo.Name + '启用成功!',
+              type: 'success'
+            });
+            // table 重载
+            that.getTableQuery();
+          } else {
+            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消启用'
+        });
+      });
+    },
+    // 关闭所有
+    allDialogClose() {
+      this.dialogVisible = false;
+      this.dialogGift = false;
+      this.dialogLesson = false;
+      this.dialogExpTime = false;
+      this.dialogLessonTable = false;
+    },
+    // 有效期调整
+    ExpTimeChange() {
+      // 仅针对年费用户,使用日期格式
+      this.allDialogClose();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      if (parseInt(row.UserInfo.VipType) == 2) {
+        this.$message({
+          showClose: true,
+          message: '错了哦,充值会员不能调整有效期',
+          type: 'error'
+        });
+        return false
+      }
+      this.form.rowName = row.UserInfo.Name;
+      this.form.userId = row.UserInfo.Id;
+      this.form.expTime = row.UserInfo.ExpTime
+      this.dialogVisible = true;
+      this.dialogExpTime = true;
+    },
+    // 课时调整
+    lessonChange() {
+      this.allDialogClose();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.normalhour = row.UserInfo.RemainNormalhour;
+      this.form.newnormalhour = 0;
+      this.form.rowName = row.UserInfo.Name;
+      this.form.userId = row.UserInfo.Id;
+      this.dialogVisible = true;
+      this.dialogLesson = true;
 
-            },
-            // 赠送调整
-            giftChange() {
-                this.allDialogClose();
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.gifthour = row.UserInfo.RemainGifthour;
-                this.form.newgifthour = 0;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                this.dialogVisible = true;
-                this.dialogGift = true;
+    },
+    // 赠送调整
+    giftChange() {
+      this.allDialogClose();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.gifthour = row.UserInfo.RemainGifthour;
+      this.form.newgifthour = 0;
+      this.form.rowName = row.UserInfo.Name;
+      this.form.userId = row.UserInfo.Id;
+      this.dialogVisible = true;
+      this.dialogGift = true;
 
-            },
-            // 增删会员课程
-            lessonStudenChange() {
-                let that = this;
-                this.allDialogClose();
-                // 重载课程列表选项
-                this.form.dialogValue = [];
-                this.panelSelect();
-                if (this.tableRadio.length == 0) {
-                    that.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.rowName = row.UserInfo.Name;
-                this.form.userId = row.UserInfo.Id;
-                if (row.ClassInfo) {
-                    row.ClassInfo.map(function (item) {
-                        that.form.dialogValue.push(item.ClassId)
-                    })
-                }
-                this.dialogVisible = true;
-                this.dialogLessonTable = true;
-            },
-            // 确认提交新增会员
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    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
-                    }
-                }
+    },
+    // 增删会员课程
+    lessonStudenChange() {
+      let that = this;
+      this.allDialogClose();
+      // 重载课程列表选项
+      this.form.dialogValue = [];
+      this.panelSelect();
+      if (this.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.rowName = row.UserInfo.Name;
+      this.form.userId = row.UserInfo.Id;
+      if (row.ClassInfo) {
+        row.ClassInfo.map(function (item) {
+          that.form.dialogValue.push(item.ClassId)
+        })
+      }
+      this.dialogVisible = true;
+      this.dialogLessonTable = true;
+    },
+    // 确认提交新增会员
+    confirmMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        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
+        }
+      }
 
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      // if (!that.form.staticHr) {
+      //     this.$message.error('错了哦,静态心率不能为空');
+      //     return false
+      // }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
 
-                // 课程添加使用字符串形式
-                let curClasslist = '';
-                if (that.form.classlist) {
-                    curClasslist = that.form.classlist.toString();
-                }
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    vipType: that.form.vipType,
-                    normalhour: that.form.normalhour,
-                    gifthour: that.form.gifthour,
-                    classlist: curClasslist,
-                    memo: that.form.memo,
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    sex: that.form.sex,
-                    head: that.form.head,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                };
-                let postdata = qs.stringify(param);
-                VipUserAdd(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.phone) {
-                    this.$message.error('错了哦,手机号不能为空');
-                    return false
-                }
-                if (!globalCheckPhone(that.form.phone)) {
-                    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 curClasslist = '';
+      if (that.form.classlist) {
+        curClasslist = that.form.classlist.toString();
+      }
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        phone: that.form.phone,
+        name: that.form.name,
+        vipType: that.form.vipType,
+        normalhour: that.form.normalhour,
+        gifthour: that.form.gifthour,
+        classlist: curClasslist,
+        memo: that.form.memo,
+        height: that.form.height,
+        weight: that.form.weight,
+        staticHr: that.form.staticHr,
+        sex: that.form.sex,
+        head: that.form.head,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10),
+      };
+      let postdata = qs.stringify(param);
+      VipUserAdd(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    confirmEditMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.phone) {
+        this.$message.error('错了哦,手机号不能为空');
+        return false
+      }
+      if (!globalCheckPhone(that.form.phone)) {
+        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
+        }
+      }
 
-                if (!that.form.height) {
-                    this.$message.error('错了哦,身高不能为空');
-                    return false
-                }
-                if (!that.form.weight) {
-                    this.$message.error('错了哦,体重不能为空');
-                    return false
-                }
-                // if (!that.form.staticHr) {
-                //     this.$message.error('错了哦,静态心率不能为空');
-                //     return false
-                // }
-                if (!that.form.birthday) {
-                    this.$message.error('错了哦,出生年份不能为空');
-                    return false
-                }
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.Id,
-                    phone: that.form.phone,
-                    name: that.form.name,
-                    memo: that.form.memo,
-                    head: that.form.head,
-                    height: that.form.height,
-                    weight: that.form.weight,
-                    staticHr: that.form.staticHr,
-                    sex: that.form.sex,
-                    birthday: nonTfmtDatetoLength(that.form.birthday, 10),
-                    ubId: that.form.ubId
-                };
-                let postdata = qs.stringify(param);
-                console.log(param);
-                VipUserEdit(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交课时
-            confirmLesson() {
-                let that = this;
-                // checkNum
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    chgHour: that.form.newnormalhour,
-                    chgType: 1,//课时类型 1:普通课时 2:赠送课时
-                };
-                let postdata = qs.stringify(param);
-                VipUserHourEdit(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交赠送
-            confirmGift() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    chgHour: that.form.newgifthour,
-                    chgType: 2,//课时类型 1:普通课时 2:赠送课时
-                };
-                let postdata = qs.stringify(param);
-                VipUserHourEdit(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交有效期
-            confirmExpTime() {
-                let that = this;
-                // checkNum
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    expTime: nonTfmtDate(that.form.expTime, 16),
-                };
-                let postdata = qs.stringify(param);
-                VipUserExpEdit(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交会员课程
-            confirmLessonTable() {
-                let that = this;
-                // checkNum
-                let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
+      if (!that.form.height) {
+        this.$message.error('错了哦,身高不能为空');
+        return false
+      }
+      if (!that.form.weight) {
+        this.$message.error('错了哦,体重不能为空');
+        return false
+      }
+      // if (!that.form.staticHr) {
+      //     this.$message.error('错了哦,静态心率不能为空');
+      //     return false
+      // }
+      if (!that.form.birthday) {
+        this.$message.error('错了哦,出生年份不能为空');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        userId: that.form.Id,
+        phone: that.form.phone,
+        name: that.form.name,
+        memo: that.form.memo,
+        head: that.form.head,
+        height: that.form.height,
+        weight: that.form.weight,
+        staticHr: that.form.staticHr,
+        sex: that.form.sex,
+        birthday: nonTfmtDatetoLength(that.form.birthday, 10),
+        ubId: that.form.ubId
+      };
+      let postdata = qs.stringify(param);
+      console.log(param);
+      VipUserEdit(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交课时
+    confirmLesson() {
+      let that = this;
+      // checkNum
+      let param = {
+        token: localStorage.token,
+        userId: that.form.userId,
+        chgHour: that.form.newnormalhour,
+        chgType: 1,//课时类型 1:普通课时 2:赠送课时
+      };
+      let postdata = qs.stringify(param);
+      VipUserHourEdit(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交赠送
+    confirmGift() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        userId: that.form.userId,
+        chgHour: that.form.newgifthour,
+        chgType: 2,//课时类型 1:普通课时 2:赠送课时
+      };
+      let postdata = qs.stringify(param);
+      VipUserHourEdit(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交有效期
+    confirmExpTime() {
+      let that = this;
+      // checkNum
+      let param = {
+        token: localStorage.token,
+        userId: that.form.userId,
+        expTime: nonTfmtDate(that.form.expTime, 16),
+      };
+      let postdata = qs.stringify(param);
+      VipUserExpEdit(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交会员课程
+    confirmLessonTable() {
+      let that = this;
+      // checkNum
+      let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
 
-                let param = {
-                    token: localStorage.token,
-                    userId: that.form.userId,
-                    classList: classList,
-                };
-                let postdata = qs.stringify(param);
-                VipUserClassEdit(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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 加载课程列表选项
-            panelSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    vipType: '',
-                    classType: 1,//不显示 午饭类 课程
-                    start: 1,
-                    expDay: 0,
-                    tableMax: 9999,
-                };
-                let postdata = qs.stringify(param);
-                ClassListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        if (json.Rs == null) return false
-                        that.form.dialogdata = turnClassResToOption(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 新增会员
-            addMember() {
-                this.clearForm();
-                this.panelSelect();
-                this.dialogMemberVisible = true;
-                this.btnType = 0;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增会员'
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    that.$message.error("请先选中一条记录");
-                    return false
-                }
-                let detectorid = this.tableRadio.UserInfo.Id;
+      let param = {
+        token: localStorage.token,
+        userId: that.form.userId,
+        classList: classList,
+      };
+      let postdata = qs.stringify(param);
+      VipUserClassEdit(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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 加载课程列表选项
+    panelSelect() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        vipType: '',
+        classType: 1,//不显示 午饭类 课程
+        start: 1,
+        expDay: 0,
+        tableMax: 9999,
+      };
+      let postdata = qs.stringify(param);
+      ClassListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          if (json.Rs == null) return false
+          that.form.dialogdata = turnClassResToOption(json.Rs);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 新增会员
+    addMember() {
+      this.clearForm();
+      this.panelSelect();
+      this.dialogMemberVisible = true;
+      this.btnType = 0;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增会员'
+    },
+    // 删除
+    delList() {
+      let that = this;
+      if (this.tableRadio.length == 0) {
+        that.$message.error("请先选中一条记录");
+        return false
+      }
+      let detectorid = this.tableRadio.UserInfo.Id;
 
-                let param = {
-                    token: localStorage.token,
-                    userId: detectorid,
-                    status: 9,//0禁用1启用9删除
-                };
-                let postdata = qs.stringify(param);
+      let param = {
+        token: localStorage.token,
+        userId: detectorid,
+        status: 9,//0禁用1启用9删除
+      };
+      let postdata = qs.stringify(param);
 
-                this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    VipUserStatusEdit(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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                that.getTableQuery();
-                this.pageshow = false;//让分页隐藏
-                this.$nextTick(() => {//重新渲染分页
-                    this.pageshow = true;
-                });
-                that.$message.success('查询完毕');
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000)
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.head = '';
-                this.imageUrl = '';
-                this.form.phone = '';
-                this.form.memo = '';
-                this.form.normalhour = 0;
-                this.form.gifthour = 0;
-                this.form.height = '';
-                this.form.weight = '';
-                this.form.staticHr = '';
-                this.form.sex = 1;
-                this.form.birthday = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.form.classlist = [];
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    vipType: that.panel.vipType,//
-                    phone: that.panel.phone,//
-                    name: that.panel.name,//
-                    expDay: that.panel.expDay,//
-                    start: that.start,//
-                    tableMax: 10,//
-                };
-                that.allTableData = [];
-                that.recordsTotal = 0;
-                let postdata = qs.stringify(param);
-                VipUserListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.PageCount * that.pageination.pageItem;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                that.getTableQuery();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
-                    return '无有效期';
-                } else {
-                    return nonTfmtDatetoLength(column, 10);
-                }
-            },
-            // 海报上传成功
-            getShopImages(url) {
-                this.imageUrl = url;
-                this.form.head = url;
-            }
-        },
-        components: {
-            cropper
+      this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        VipUserStatusEdit(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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      that.getTableQuery();
+      this.pageshow = false;//让分页隐藏
+      this.$nextTick(() => {//重新渲染分页
+        this.pageshow = true;
+      });
+      that.$message.success('查询完毕');
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000)
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.head = '';
+      this.imageUrl = '';
+      this.form.phone = '';
+      this.form.memo = '';
+      this.form.normalhour = 0;
+      this.form.gifthour = 0;
+      this.form.height = '';
+      this.form.weight = '';
+      this.form.staticHr = '';
+      this.form.sex = 1;
+      this.form.birthday = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.classlist = [];
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        vipType: that.panel.vipType,//
+        phone: that.panel.phone,//
+        name: that.panel.name,//
+        expDay: that.panel.expDay,//
+        start: that.start,//
+        tableMax: 10,//
+      };
+      that.allTableData = [];
+      that.recordsTotal = 0;
+      let postdata = qs.stringify(param);
+      VipUserListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.PageCount * that.pageination.pageItem;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
         }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      that.getTableQuery();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
+        return '无有效期';
+      } else {
+        return nonTfmtDatetoLength(column, 10);
+      }
+    },
+    // 海报上传成功
+    getShopImages(url) {
+      this.imageUrl = url;
+      this.form.head = url;
     }
+  },
+  components: {
+    cropper
+  }
+}
 </script>
 
 <style scoped>
-    @import "../assets/css/panel.css";
+@import "../assets/css/panel.css";
 
-    .context {
-        border-radius: 12px;
-        /*  height: 770px;*/
-        overflow-y: scroll;
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-        padding-bottom: 30px;
-    }
+.context {
+  border-radius: 12px;
+  /*  height: 770px;*/
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+  padding-bottom: 30px;
+}
 
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
 
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
 
-    .change button {
-        float: left;
-    }
+.change button {
+  float: left;
+}
 
-    .change button.pull-right {
-        float: right;
-    }
+.change button.pull-right {
+  float: right;
+}
 
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
 
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
 
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
 
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
 
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
 
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .dialogContent .pull-left {
-        width: 40%;
-        float: left;
-    }
+.dialogContent .pull-left {
+  width: 40%;
+  float: left;
+}
 
-    .dialogContent .pull-right {
-        width: 60%;
-        float: right;
-    }
+.dialogContent .pull-right {
+  width: 60%;
+  float: right;
+}
 
-    .tabwild {
-        width: 100% !important;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.tabwild {
+  width: 100% !important;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .lessonSpan {
-        width: 78px;
-        height: 22px;
-        border-radius: 11px;
-        margin-right: 5px;
-        float: left;
-        margin-bottom: 3px;
-        text-align: center;
-        color: #000;
-        font-size: 12px;
-    }
+.lessonSpan {
+  width: 78px;
+  height: 22px;
+  border-radius: 11px;
+  margin-right: 5px;
+  float: left;
+  margin-bottom: 3px;
+  text-align: center;
+  color: #000;
+  font-size: 12px;
+}
 
-    .btn {
-        float: left !important;
-        margin-right: 5px;
-    }
+.btn {
+  float: left !important;
+  margin-right: 5px;
+}
 
-    /deep/ table .el-button+.el-button {
-        margin-left: 0;
-        margin-right: 3px;
-        /*float: left;*/
-        padding: 7px 6px;
-    }
+/deep/ table .el-button+.el-button {
+  margin-left: 0;
+  margin-right: 3px;
+  /*float: left;*/
+  padding: 7px 6px;
+}
 
-    table {
-        width: 100%;
-        display: block;
-        margin: 0 auto;
-        overflow: scroll;
+table {
+  width: 100%;
+  display: block;
+  margin: 0 auto;
+  overflow: scroll;
 
-    }
+}
 
-    .pull-left /deep/ .el-form .el-form-item {
-        width: 50%;
-        float: left;
-    }
+.pull-left /deep/ .el-form .el-form-item {
+  width: 50%;
+  float: left;
+}
 
-    .pull-left /deep/ .el-form-item__content {
-        margin-left: 20px;
-    }
+.pull-left /deep/ .el-form-item__content {
+  margin-left: 20px;
+}
 
-    .pull-left .el-input-number {
-        width: 130px;
-    }
+.pull-left .el-input-number {
+  width: 130px;
+}
 
-    .cell img {
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.cell img {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .el-date-editor.el-input__inner {
-        width: 156px;
-    }
+.el-date-editor.el-input__inner {
+  width: 156px;
+}
 
-    .avatar-uploader {
-        /*border: 1px solid #ccc;*/
-        cursor: pointer;
-        border-radius: 5px;
-    }
+.avatar-uploader {
+  /*border: 1px solid #ccc;*/
+  cursor: pointer;
+  border-radius: 5px;
+}
 
-    /deep/ .el-upload {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+/deep/ .el-upload {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    /deep/ .el-upload img {
-        width: 70px;
-        height: 70px;
-        float: left;
-    }
+/deep/ .el-upload img {
+  width: 70px;
+  height: 70px;
+  float: left;
+}
 
-    .relevance {
-        margin-top: 10px;
-    }
+.relevance {
+  margin-top: 10px;
+}
 </style>

+ 17 - 10
pc/src/views/ScoreResult.vue

@@ -5,7 +5,7 @@
         <el-page-header @back="goBack" content="评分结果"/>
         <span class="classNames">{{ title }} {{ ClassStateText }}</span>
         <div class="likeTab">
-          <el-button @click="goType('courseEdit')" size="mini">人员管理</el-button>
+          <el-button @click="goType('courseEdit')" size="mini" v-if="FinishClass == 2 || FinishClass == 3">人员管理</el-button>
           <el-button @click="goType('actionScore')" size="mini">动作评分</el-button>
           <el-button type="primary" @click="goType('scoreResult')" size="mini">评分结果</el-button>
         </div>
@@ -59,17 +59,21 @@
             sortable
         />
         <el-table-column
-            prop="ToTalScore"
+            prop="TotalScore"
             label="总分"
             width="90"
             sortable
-        />
+        >
+          <template slot-scope="scope">
+            {{scope.row.TotalScore.toFixed(0)}}
+          </template>
+        </el-table-column>
         <el-table-column
-            v-for="item in actionList" :key="item.AgdId" :label="item.EaName"
-            :value="item.AgdId" :prop="item.AgdId+''"
+            v-for="item in actionList" :key="item.HAgdId" :label="item.EaName"
+            :value="item.HAgdId" :prop="item.HAgdId+''"
         >
           <template slot-scope="scope">
-            {{scope.row.DetailScore[item.AgdId]}}
+            {{scope.row.DetailScore[item.HAgdId].toFixed(0)}}
           </template>
         </el-table-column>
       </el-table>
@@ -87,7 +91,7 @@
 <script>
 import Global from "../Global.js";
 import {
-  AGDetailQuery,
+  AGDetailCurrStdQuery,
   ScoreClassQuery,
 } from "../api/getApiRes";
 
@@ -96,6 +100,7 @@ export default {
   data() {
     return {
       AgId: 0,
+      ScoreIsFinish: true,
       tableData: [],
       title: "",
       ClassType: 0,
@@ -140,10 +145,10 @@ export default {
       let that = this;
       let param = {
         token: localStorage.token,
-        agId: this.$route.query.AgId
+        stdId: this.$route.query.StdId
       };
       let postData = qs.stringify(param);
-      AGDetailQuery(postData).then((res) => {
+      AGDetailCurrStdQuery(postData).then((res) => {
         let json = res;
         if (json.Code == 0) {
           if (json.Rs) {
@@ -225,6 +230,7 @@ export default {
       this.$router.push({
         path: '/' + url, query: {
           AgId: this.$route.query.AgId,
+          ScoreIsFinish: this.$route.query.ScoreIsFinish,
           StdId: this.$route.query.StdId,
           ClassName: this.$route.query.ClassName,
           BeginStr: this.$route.query.BeginStr,
@@ -242,7 +248,8 @@ export default {
         this.getActionQuery();
         this.AgId = this.$route.query.AgId;
         this.FinishClass = this.$route.query.FinishClass;
-        this.ClassType = this.$route.query.ClassType;
+        this.ScoreIsFinish = this.$route.query.ScoreIsFinish,
+            this.ClassType = this.$route.query.ClassType;
         this.PkNum = this.$route.query.PkNum;
         this.title =
             this.$route.query.ClassName +

+ 6 - 7
pc/src/views/appoint.vue

@@ -17,16 +17,16 @@
         <el-tab-pane label="会员预约列表" name="second">
           <div class="panel-body">
             <div class="panel_control">
-              <el-row :gutter="20">
-                <el-col :span="6">
+              <el-row :gutter="1">
+                <el-col :span="4">
                   <em>会员名:</em>
                   <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
                 </el-col>
-                <el-col :span="6">
+                <el-col :span="4">
                   <em>手机号:</em>
                   <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
                 </el-col>
-                <el-col :span="6">
+                <el-col :span="4">
                   <em>预约课程:</em>
                   <el-select v-model="panel.classId">
                     <el-option
@@ -42,9 +42,8 @@
                     查询
                   </el-button>
                 </el-col>
-                &nbsp;
-                <el-col :span="4">
-                  <el-button class="pull-right vipAddBtn" type="warning" @click="addMember(1)">本店预约</el-button>
+                <el-col :span="8" style="float:right">
+                  <el-button class="pull-right vipAddBtn" type="warning" @click="addMember(1)"  style="margin-left: 10px">本店预约</el-button>
                   <el-button class="pull-right acrossAddBtn" type="success" @click="addMember(2)">跨店预约</el-button>
                 </el-col>
               </el-row>

+ 70 - 18
pc/src/views/courseEdit.vue

@@ -6,19 +6,19 @@
         <span class="classNames">{{ title }} {{ ClassStateText }}</span>
         <div class="likeTab">
           <el-button type="primary" @click="goType('courseEdit')" size="mini">人员管理</el-button>
-          <el-button v-if="AgId>0" @click="goType('actionScore')" size="mini">动作评分</el-button>
-          <el-button v-if="AgId>0" @click="goType('scoreResult')" size="mini">评分结果</el-button>
+          <el-button v-if="AgId > 0" @click="goType('actionScore')" size="mini">动作评分</el-button>
+          <el-button v-if="AgId > 0" @click="goType('scoreResult')" size="mini">评分结果</el-button>
         </div>
         <div class="panel_control">
-          <el-row :gutter="20">
-            <el-col :span="6">
+          <el-row :gutter="2">
+            <el-col :span="4">
               <em>会员名:</em>
               <el-input
                   v-model="panel.name"
                   placeholder="请输入会员名"
               ></el-input>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="4">
               <em>手机号:</em>
               <el-input
                   v-model="panel.phone"
@@ -26,7 +26,7 @@
                   type="number"
               ></el-input>
             </el-col>
-            <el-col :span="4">
+            <el-col :span="3">
               <el-button
                   size
                   type="primary"
@@ -61,7 +61,7 @@
         </el-button
         >
         <el-button
-            @click="addFinish"
+            @click="checkUnPostBeforeFinish()"
             type="primary"
             v-if="FinishClass == 2"
             size="mini"
@@ -160,7 +160,7 @@
             sortable
             v-if="!isCollapse"
         ></el-table-column>
-        <el-table-column prop="IsOnline" label="是否网课" width="140">
+        <el-table-column prop="IsOnline" label="是否网课" width="140" v-if="false">
           <template slot="header" slot-scope="scope">
             <el-checkbox
                 @change="(val) => handleSelectAll(val)"
@@ -368,8 +368,9 @@
                     type="warning"
                     round
                     v-if="
-										scope.row.Status == 1 ||
-											(scope.row.Status == 3 && FinishClass == 2)
+										scope.row.HrClassOn < 1
+										|| scope.row.Status == 1
+										// ||(scope.row.Status == 3 && FinishClass == 2)
 									"
                     size="mini"
                     :disabled="scope.row.Sn == '' && scope.row.IsOnline == 0"
@@ -481,6 +482,35 @@
         >
       </div>
     </el-dialog>
+    <el-dialog
+        title="当前有未提交学生"
+        :visible.sync="dialogHavaUnSubmitVisible"
+        width="650px"
+    >
+      <div class="dialogContent">
+        <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+        <div>
+          <p>
+            当前有未提交学生,您确定要确认下课吗
+            <br/>
+          </p>
+          <br/>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button
+            type="primary"
+            size="small"
+            @click="addFinish"
+        >确定
+        </el-button
+        >
+        <el-button size="small" @click="dialogHavaUnSubmitVisible = false"
+        >取消
+        </el-button
+        >
+      </div>
+    </el-dialog>
     <el-dialog
         title="确认下课"
         :visible.sync="dialogFinishVisible"
@@ -557,11 +587,13 @@ export default {
       ClassType: 0,
       PkNum: 0,
       AgId: 0,
+      ScoreIsFinish: true,
       ClassStateText: "",
       FinishClass: 0, //当前上课状态 1已下课 2已上课 3准备上课 FinishClass
       dialogVisible: false, //添加下课会员
       dialogTempVisible: false, //添加临时会员
       dialogAcrossVisible: false, //
+      dialogHavaUnSubmitVisible: false, //是否有未提交dialog
       dialogFinishVisible: false, //确认下课dialog
       dialogLesson: false, //课时调整
       dialogGift: false, //赠送课时调整
@@ -663,6 +695,7 @@ export default {
     this.ClassType = this.$route.query.ClassType;
     this.PkNum = this.$route.query.PkNum;
     this.AgId = this.$route.query.AgId;
+    this.ScoreIsFinish = this.$route.query.ScoreIsFinish;
     this.FinishClass = this.$route.query.FinishClass;
     this.title =
         this.$route.query.ClassName +
@@ -670,6 +703,7 @@ export default {
         this.$route.query.BeginStr +
         "-" +
         this.$route.query.EndStr;
+    console.log(this.ScoreIsFinish);
   },
   methods: {
     handleSelectionChange(val) {
@@ -834,11 +868,27 @@ export default {
         that.$message.error("临时会员无法替换心率带");
       }
     },
+    // 下课前检查是否有未提交用户
+    checkUnPostBeforeFinish() {
+      let that = this;
+      let noUnSubmit = true;
+      for (let i in that.tableData) {
+        if (that.tableData[i].HrClassOn == 0) {
+          noUnSubmit = false;
+        }
+      }
+      if(noUnSubmit){
+        that.addFinish();
+      }else{
+        this.dialogHavaUnSubmitVisible = true;
+      }
+    },
     // 确认下课
     addFinish() {
       this.clearForm();
       // 重新获得教练名单
       this.getCoachOption();
+      this.dialogHavaUnSubmitVisible = false;
       this.dialogFinishVisible = true;
       this.btnType = 0;
       this.dialogTitle = "确认下课";
@@ -892,8 +942,8 @@ export default {
             type: "success",
           });
           // 返回下课列表
-          // that.$router.push({path: '/finish'});
-          this.$router.go(-1);
+          that.$router.push({path: '/courses'});
+          // this.$router.go(-1);
         } else {
           that.$message.error(json.Memo + " 错误码:" + json.Code);
         }
@@ -1645,6 +1695,7 @@ export default {
       this.$router.push({
         path: '/' + url, query: {
           AgId: this.$route.query.AgId,
+          ScoreIsFinish: this.$route.query.ScoreIsFinish,
           StdId: this.$route.query.StdId,
           ClassName: this.$route.query.ClassName,
           BeginStr: this.$route.query.BeginStr,
@@ -1664,13 +1715,14 @@ export default {
         this.ClassType = this.$route.query.ClassType;
         this.PkNum = this.$route.query.PkNum;
         this.AgId = this.$route.query.AgId;
+        this.ScoreIsFinish = this.$route.query.ScoreIsFinish,
 
-        this.title =
-            this.$route.query.ClassName +
-            " " +
-            this.$route.query.BeginStr +
-            "-" +
-            this.$route.query.EndStr;
+            this.title =
+                this.$route.query.ClassName +
+                " " +
+                this.$route.query.BeginStr +
+                "-" +
+                this.$route.query.EndStr;
       }
     },
     FinishClass(to) {

+ 6 - 3
pc/src/views/courses.vue

@@ -41,6 +41,7 @@
                               :style="{background:scope.row.ClassColor}">{{ scope.row.ClassName }}</span>
           </template>
         </el-table-column>
+        <el-table-column prop="AgName" label="评分课程" width="110" sortable/>
         <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
         </el-table-column>
         <el-table-column prop="OrderNum" label="实际预约" width="110" sortable>
@@ -268,7 +269,7 @@ export default {
         ClassTypeOptions: [
           {value: 1, label: '团课'},
           {value: 2, label: '竞技PK'},
-          {value: 3, label: '私教'},
+          // {value: 3, label: '私教'},
         ],
         PKTypeOptions: [
           {value: 2, label: '2队PK'},
@@ -349,6 +350,7 @@ export default {
             path: '/courseEdit',
             query: {
               AgId: that.form.agId,
+              ScoreIsFinish: that.form.ScoreIsFinish,
               StdId: that.form.StdId,
               ClassName: that.form.ClassName,
               BeginStr: that.form.BeginStr,
@@ -421,7 +423,8 @@ export default {
           FinishClass: row.FinishClass,
           ClassType: row.ClassType,
           PkNum: row.PkNum,
-          AgId: row.AgId
+          AgId: row.AgId,
+          ScoreIsFinish: row.ScoreIsFinish,
         }
       });
     },
@@ -460,7 +463,7 @@ export default {
       let that = this;
       let param = {
         token: localStorage.token,
-        shopId: localStorage.ServiceId
+        shopId: localStorage.ShopId
       };
       let postdata = qs.stringify(param);
       ActionGroupQuery(postdata).then(res => {

+ 745 - 722
pc/src/views/coursesHistory.vue

@@ -1,736 +1,759 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>课程管理
-            </h5>
-            <div class="likeTab">
-                <el-button type="" @click="goType('courses')"  size="mini">当前课程</el-button>
-                <el-button type="primary" @click="goType('coursesHistory')"  size="mini">历史记录</el-button>
-            </div>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="7">
-                            <el-date-picker v-model="panel.timeScope" type="daterange" range-separator="至"
-                                start-placeholder="开始日期" end-placeholder="结束日期">
-                            </el-date-picker>
-                        </el-col>
-                        <el-col :span="4">
-                            <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
+  <div class="context">
+    <div class="panel">
+      <h5>课程管理
+      </h5>
+      <div class="likeTab">
+        <el-button type="" @click="goType('courses')" size="mini">当前课程</el-button>
+        <el-button type="primary" @click="goType('coursesHistory')" size="mini">历史记录</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="20">
+            <el-col :span="7">
+              <el-date-picker v-model="panel.timeScope" type="daterange" range-separator="至"
+                              start-placeholder="开始日期" end-placeholder="结束日期">
+              </el-date-picker>
+            </el-col>
+            <el-col :span="4">
+              <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
+              </el-button>
+            </el-col>
+          </el-row>
         </div>
+      </div>
+    </div>
 
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
                 element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange">
-                >
-                <el-table-column label="序号" type="index" width="50" align="center">
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="BeginTime" label="上课时间" :formatter="filterFmtDate" width="160">
-                </el-table-column>
-                <el-table-column prop="ClassName" label="课程" width="110" sortable>
-                    <template slot-scope="scope">
+        >
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{ (start) + scope.$index + 1 }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="BeginTime" label="上课时间" :formatter="filterFmtDate" width="160">
+        </el-table-column>
+        <el-table-column prop="ClassName" label="课程" width="110" sortable>
+          <template slot-scope="scope">
                         <span class="lessonSpan"
-                            :style="{background:scope.row.ClassColor}">{{scope.row.ClassName}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="OrderNum" label="实际预约人数" width="130" sortable>
-                </el-table-column>
-                <el-table-column prop="SvName" label="区域" width="110" sortable>
-                </el-table-column>
-                <el-table-column prop="ClassType" label="课程类型" width="110" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.ClassType == 1">团课</span>
-                        <span v-if="scope.row.ClassType == 3">私教</span>
-                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
-                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="FinishClass" label="当前状态" width="110" sortable>
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
-                        <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 prop="Status" label="操作">
-                    <template slot-scope="scope">
-                        <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
-                        <!--下课-->
-                        <!--</el-button>-->
-                        <!--                        <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"-->
-                        <!--                                   @click="showDialogMemberVisible(scope.row)">-->
-                        <!--                            上课-->
-                        <!--                        </el-button>-->
-                        <el-button type="primary" round size="mini"
-                            v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2" @click="seeEdit(scope.row)">
-                            管理
-                        </el-button>
-                        <!--修改区域 todo-->
-                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
-                            @click="changeShopVenue(scope.row)">
-                            编辑
-                        </el-button>
-                        <!--已完成才能看详情-->
-                        <el-button type="primary" round plain size="mini"
-                            v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
-                            @click="seeDetail(scope.row)">
-                            详情
-                        </el-button>
-
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange"     :current-page.sync="cur_page"></el-pagination>
-        </div>
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-            <div class="dialogContent">
-                <h5 class="classNames">{{className}}</h5>
-                <div class="">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="区域" :required="true">
-                            <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
-                                <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
-                                    :value="item.SvId">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="类型" :required="true">
-                            <el-select v-model="form.classType" filterable placeholder="请选择">
-                                <el-option v-for="item in form.ClassTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item label="组队方式" v-if="form.classType == 2">
-                            <el-select v-model="form.pkNum" filterable placeholder="请选择">
-                                <el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
-                                    :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="getClassStartPrepare()">确定
-                </el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
-                    确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+                              :style="{background:scope.row.ClassColor}">{{ scope.row.ClassName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
+        </el-table-column>
+        <el-table-column prop="OrderNum" label="实际预约人数" width="130" sortable>
+        </el-table-column>
+        <el-table-column prop="SvName" label="区域" width="110" sortable>
+        </el-table-column>
+        <el-table-column prop="ClassType" label="课程类型" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.ClassType == 1">团课</span>
+            <span v-if="scope.row.ClassType == 3">私教</span>
+            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
+            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="FinishClass" label="当前状态" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
+            <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 prop="Status" label="操作">
+          <template slot-scope="scope">
+            <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
+            <!--下课-->
+            <!--</el-button>-->
+            <!--                        <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"-->
+            <!--                                   @click="showDialogMemberVisible(scope.row)">-->
+            <!--                            上课-->
+            <!--                        </el-button>-->
+            <el-button type="primary" round size="mini"
+                       v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2" @click="seeEdit(scope.row)">
+              管理
+            </el-button>
+            <!--修改区域 todo-->
+            <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
+                       @click="changeShopVenue(scope.row)">
+              编辑
+            </el-button>
+            <!--已完成才能看详情-->
+            <el-button type="primary" round plain size="mini"
+                       v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
+                       @click="seeDetail(scope.row)">
+              详情
+            </el-button>
+            <!--已完成才能看详情-->
+            <el-button type="primary" round plain size="mini"
+                       v-if="scope.row.AgId > 1"
+                       @click="goScore(scope.row)">
+              评分
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                     @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
     </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+      <div class="dialogContent">
+        <h5 class="classNames">{{ className }}</h5>
+        <div class="">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="区域" :required="true">
+              <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
+                <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
+                           :value="item.SvId">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="类型" :required="true">
+              <el-select v-model="form.classType" filterable placeholder="请选择">
+                <el-option v-for="item in form.ClassTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="组队方式" v-if="form.classType == 2">
+              <el-select v-model="form.pkNum" filterable placeholder="请选择">
+                <el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="getClassStartPrepare()">确定
+        </el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
+          确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import Global from '../Global.js'
-    import {
-        ClassPreFinishListQuery,
-        ClassOverPrepare,
-        ClassDetailQuery,
-        QueryShopVenue,
-        ClassStartPrepare,
-        DispPlanInfoEdit,
-    } from "../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                dialogMemberVisible: false,
-                serachBtnStatus: false,
-                dialogVisible: false,//其他dialog
-                dialogFinishVisible: false,//确认下课dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '上课准备',
-                className: '',
-                current: getNowDate(),
-                dialogValue: [],
-                start: 0,
-                draw: 1,
-                // panel 配置项目
-                panel: {
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    options: [
-                        { value: 99, label: '全部' },
-                        { value: 1, label: '进行中' },
-                        { value: 2, label: '已完成' },
-                    ],
-
-                    endTypeOptions: [
-                        { value: 99, label: '全部' },
-                        { value: 30, label: '近一个月' },
-                        { value: 7, label: '近一周' },
-                        { value: 1, label: '当日' },
-                    ],
-                    time1: globalBt(),
-                    timeScope: globalBt2(0),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    svId: '',
-                    svName: '',
-                    classType: 1,
-                    userCode: '',
-                    coach: '',
-                    coachOptions: [],
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    pktype: 1,
-                    pkNum: 2,
-                    btnType: 0,//0新建,1编辑
-                    memo: '',
-                    expTime: '',
-                    StdId: '',
-                    svList: [],//区域列表
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                    ClassTypeOptions: [
-                        { value: 1, label: '团课' },
-                        // {value: 2, label: '竞技PK'},
-                        { value: 3, label: '私教' },
-                    ],
-                    PKTypeOptions: [
-                        { value: 2, label: '2队PK' },
-                        { value: 3, label: '3队PK' },
-                    ],
-                },
-                memberTypes: [
-                    { value: 1, label: '年会员' },
-                    { value: 2, label: '充值会员' },
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            goType(url) {
-                this.$router.push({ path: '/' + url });
-            },
-            // 更改上课区域
-            changeShopVenue(row) {
-                this.dialogMemberVisible = true;
-                this.form.btnType = 1;//0新建,1编辑
-                // 读取本行信息
-                this.dialogMemberVisible = true;
-                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-                this.form.StdId = row.StdId;
-                this.getQueryShopVenue();
-                this.form.svId = row.SvId;
-                this.form.classType = row.ClassType;
-                this.form.pkNum = row.PkNum;
-            },
-            // 准备上课
-            getClassStartPrepare() {
-                let that = this;
-                if (!that.form.svId) {
-                    that.$message.error('上课区域不能为空');
-                    return false
-                }
-                // 不是竞技pk的时候为0
-                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
-
-                let param = {
-                    token: localStorage.token,
-                    stdId: that.form.StdId,
-                    svId: that.form.svId,
-                    svName: that.form.svName,
-                    classType: that.form.classType,
-                    pkNum: uppkNum,
-                };
-                let postdata = qs.stringify(param);
-                ClassStartPrepare(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // NewId: 0
-                        that.dialogMemberVisible = false;
-                        this.getTableQuery();
-                        this.$router.push({
-                            path: '/courseEdit',
-                            query: {
-                                StdId: that.form.StdId,
-                                ClassName: that.form.ClassName,
-                                BeginStr: that.form.BeginStr,
-                                EndStr: that.form.EndStr,
-                                FinishClass: 3,
-                            }
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 编辑
-            getClassStartPrepareForEdit() {
-                let that = this;
-                if (!that.form.svId) {
-                    that.$message.error('上课区域不能为空');
-                    return false
-                }
-                // 不是竞技pk的时候为0
-                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
-
-                let param = {
-                    token: localStorage.token,
-                    stdId: that.form.StdId,
-                    svId: that.form.svId,
-                    svName: that.form.svName,
-                    classType: that.form.classType,
-                    pkNum: uppkNum,
-                };
-                let postdata = qs.stringify(param);
-                DispPlanInfoEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // NewId: 0
-                        that.dialogMemberVisible = false;
-                        this.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            seeDetail(row) {
-                this.$router.push({
-                    path: '/classInfoDetail', query: {
-                        StdId: row.StdId,
-                        ClassName: row.ClassName,
-                        BeginStr: row.BeginStr,
-                        EndStr: row.EndStr,
-                    }
-                });
-            },
-            seeEdit(row) {
-                this.$router.push({
-                    path: '/courseEdit', query: {
-                        StdId: row.StdId,
-                        ClassName: row.ClassName,
-                        BeginStr: row.BeginStr,
-                        EndStr: row.EndStr,
-                        FinishClass: row.FinishClass,
-                    }
-                });
-            },
-            // 获取select的label
-            changeLocationValue(val) {
-                //locations是v-for里面的也是datas里面的值
-                let obj = {};
-                obj = this.form.svList.find((item) => {
-                    return item.SvId === val;
-                });
-                this.form.svName = obj.Name;
-            },
-            // 获取区域列表
-            getQueryShopVenue() {
-                let that = this;
-                let param = {
-                    key: localStorage.ServiceKey,
-                    shopId: localStorage.ServiceId,
-                };
-                if (!localStorage.ServiceKey) {
-                    that.$message.error('还未与心率系统对接,请联系管理员');
-                    return false
-                }
-                let postdata = qs.stringify(param);
-                QueryShopVenue(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.svList = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            vipSelect(stdId) {
-                let that = this;
-                // 筛选相同的stdid的classId
-                that.form.stdList.map(function (item) {
-                    if (item.value == stdId) {
-                        let param = {
-                            token: localStorage.token,
-                            // classId: item.classId
-                        };
-                        let postdata = qs.stringify(param);
-                        // VipUserListQuery
-                        VipUserSimpleQuery(postdata).then(res => {
-                            let json = res;
-                            if (json.Code == 0) {
-                                that.form.userId = '';
-                                that.form.userList = turnResToOptionBySimViper(json.Rs);
-                            } else {
-                                that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                            }
-                        })
-                    }
-                })
-            },
-            showDialogMemberVisible(row) {
-                this.dialogMemberVisible = true;
-                this.form.btnType = 0;//0新建,1编辑编辑
-                // clear
-                this.form.svList = "";
-                this.form.classType = 1;
-                this.form.pkNum = "";
-
-                this.form.StdId = row.StdId;
-                this.form.ClassName = row.ClassName;
-                this.form.BeginStr = row.BeginStr;
-                this.form.EndStr = row.EndStr;
-                this.form.FinishClass = row.FinishClass;
-
-                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-                this.form.StdId = row.StdId;
-                this.getQueryShopVenue();
-            },
-            // 检测当前课是否处于可改变状态
-            // 固定下当前已预约人数列表
-            checkClassOverPrepare(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: row.StdId,
-                };
-                let postdata = qs.stringify(param);
-                ClassOverPrepare(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.goFinish(row);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            goFinish(row) {
-                this.$router.push({
-                    path: '/finishDetail', query: {
-                        id: row.StdId,
-                        classId: row.ClassId,
-                        ClassName: row.ClassName,
-                        BeginTime: row.BeginTime,
-                    }
-                });
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    tagname: that.panel.tagname,//标签名
-                    bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
-                    et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
-                    fcStatus: '1,4',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'courses') {
-                    this.getTableQuery();
-                }
-            },
-        },
+import Global from '../Global.js'
+import {
+  ClassPreFinishListQuery,
+  ClassOverPrepare,
+  ClassDetailQuery,
+  QueryShopVenue,
+  ClassStartPrepare,
+  DispPlanInfoEdit,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      dialogMemberVisible: false,
+      serachBtnStatus: false,
+      dialogVisible: false,//其他dialog
+      dialogFinishVisible: false,//确认下课dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '上课准备',
+      className: '',
+      current: getNowDate(),
+      dialogValue: [],
+      start: 0,
+      cur_page: 1,
+      draw: 1,
+      // panel 配置项目
+      panel: {
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        options: [
+          {value: 99, label: '全部'},
+          {value: 1, label: '进行中'},
+          {value: 2, label: '已完成'},
+        ],
+
+        endTypeOptions: [
+          {value: 99, label: '全部'},
+          {value: 30, label: '近一个月'},
+          {value: 7, label: '近一周'},
+          {value: 1, label: '当日'},
+        ],
+        time1: globalBt(),
+        timeScope: globalBt2(0),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        svId: '',
+        svName: '',
+        classType: 1,
+        userCode: '',
+        coach: '',
+        coachOptions: [],
+        shopId: '',
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        pktype: 1,
+        pkNum: 2,
+        btnType: 0,//0新建,1编辑
+        memo: '',
+        expTime: '',
+        StdId: '',
+        svList: [],//区域列表
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+        ClassTypeOptions: [
+          {value: 1, label: '团课'},
+          // {value: 2, label: '竞技PK'},
+          {value: 3, label: '私教'},
+        ],
+        PKTypeOptions: [
+          {value: 2, label: '2队PK'},
+          {value: 3, label: '3队PK'},
+        ],
+      },
+      memberTypes: [
+        {value: 1, label: '年会员'},
+        {value: 2, label: '充值会员'},
+      ],
+      tableData: []
     }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    // 更改上课区域
+    changeShopVenue(row) {
+      this.dialogMemberVisible = true;
+      this.form.btnType = 1;//0新建,1编辑
+      // 读取本行信息
+      this.dialogMemberVisible = true;
+      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+      this.form.StdId = row.StdId;
+      this.getQueryShopVenue();
+      this.form.svId = row.SvId;
+      this.form.classType = row.ClassType;
+      this.form.pkNum = row.PkNum;
+    },
+    // 准备上课
+    getClassStartPrepare() {
+      let that = this;
+      if (!that.form.svId) {
+        that.$message.error('上课区域不能为空');
+        return false
+      }
+      // 不是竞技pk的时候为0
+      let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+
+      let param = {
+        token: localStorage.token,
+        stdId: that.form.StdId,
+        svId: that.form.svId,
+        svName: that.form.svName,
+        classType: that.form.classType,
+        pkNum: uppkNum,
+      };
+      let postdata = qs.stringify(param);
+      ClassStartPrepare(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // NewId: 0
+          that.dialogMemberVisible = false;
+          this.getTableQuery();
+          this.$router.push({
+            path: '/courseEdit',
+            query: {
+              StdId: that.form.StdId,
+              ClassName: that.form.ClassName,
+              BeginStr: that.form.BeginStr,
+              EndStr: that.form.EndStr,
+              FinishClass: 3,
+            }
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 编辑
+    getClassStartPrepareForEdit() {
+      let that = this;
+      if (!that.form.svId) {
+        that.$message.error('上课区域不能为空');
+        return false
+      }
+      // 不是竞技pk的时候为0
+      let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+
+      let param = {
+        token: localStorage.token,
+        stdId: that.form.StdId,
+        svId: that.form.svId,
+        svName: that.form.svName,
+        classType: that.form.classType,
+        pkNum: uppkNum,
+      };
+      let postdata = qs.stringify(param);
+      DispPlanInfoEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // NewId: 0
+          that.dialogMemberVisible = false;
+          this.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    seeDetail(row) {
+      this.$router.push({
+        path: '/classInfoDetail', query: {
+          StdId: row.StdId,
+          ClassName: row.ClassName,
+          BeginStr: row.BeginStr,
+          EndStr: row.EndStr,
+        }
+      });
+    },
+    goScore(row) {
+      console.log(row);
+      this.$router.push({
+        path: '/actionScore', query: {
+          AgId: row.AgId,
+          ScoreIsFinish: row.ScoreIsFinish,
+          StdId: row.StdId,
+          ClassName: row.ClassName,
+          BeginStr: row.BeginStr,
+          EndStr: row.EndStr,
+          FinishClass: row.FinishClass,
+          ClassType: row.ClassType,
+          PkNum: row.PkNum,
+        }
+      });
+    },
+    seeEdit(row) {
+      this.$router.push({
+        path: '/courseEdit', query: {
+          StdId: row.StdId,
+          ClassName: row.ClassName,
+          BeginStr: row.BeginStr,
+          EndStr: row.EndStr,
+          FinishClass: row.FinishClass,
+        }
+      });
+    },
+    // 获取select的label
+    changeLocationValue(val) {
+      //locations是v-for里面的也是datas里面的值
+      let obj = {};
+      obj = this.form.svList.find((item) => {
+        return item.SvId === val;
+      });
+      this.form.svName = obj.Name;
+    },
+    // 获取区域列表
+    getQueryShopVenue() {
+      let that = this;
+      let param = {
+        key: localStorage.ServiceKey,
+        shopId: localStorage.ServiceId,
+      };
+      if (!localStorage.ServiceKey) {
+        that.$message.error('还未与心率系统对接,请联系管理员');
+        return false
+      }
+      let postdata = qs.stringify(param);
+      QueryShopVenue(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.svList = json.Rs;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    vipSelect(stdId) {
+      let that = this;
+      // 筛选相同的stdid的classId
+      that.form.stdList.map(function (item) {
+        if (item.value == stdId) {
+          let param = {
+            token: localStorage.token,
+            // classId: item.classId
+          };
+          let postdata = qs.stringify(param);
+          // VipUserListQuery
+          VipUserSimpleQuery(postdata).then(res => {
+            let json = res;
+            if (json.Code == 0) {
+              that.form.userId = '';
+              that.form.userList = turnResToOptionBySimViper(json.Rs);
+            } else {
+              that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            }
+          })
+        }
+      })
+    },
+    showDialogMemberVisible(row) {
+      this.dialogMemberVisible = true;
+      this.form.btnType = 0;//0新建,1编辑编辑
+      // clear
+      this.form.svList = "";
+      this.form.classType = 1;
+      this.form.pkNum = "";
+
+      this.form.StdId = row.StdId;
+      this.form.ClassName = row.ClassName;
+      this.form.BeginStr = row.BeginStr;
+      this.form.EndStr = row.EndStr;
+      this.form.FinishClass = row.FinishClass;
+
+      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+      this.form.StdId = row.StdId;
+      this.getQueryShopVenue();
+    },
+    // 检测当前课是否处于可改变状态
+    // 固定下当前已预约人数列表
+    checkClassOverPrepare(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: row.StdId,
+      };
+      let postdata = qs.stringify(param);
+      ClassOverPrepare(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.goFinish(row);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    goFinish(row) {
+      this.$router.push({
+        path: '/finishDetail', query: {
+          id: row.StdId,
+          classId: row.ClassId,
+          ClassName: row.ClassName,
+          BeginTime: row.BeginTime,
+        }
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
+        }
+      }, 1000);
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        tagname: that.panel.tagname,//标签名
+        bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
+        et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
+        fcStatus: '1,4',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
+        start: 1,//
+        tableMax: 9999,//
+      };
+      let postdata = qs.stringify(param);
+      ClassDetailQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      return nonTfmtDate(column, 11);
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'courses') {
+        this.getTableQuery();
+      }
+    },
+  },
+}
 </script>
 
 <style scoped>
-    @import "../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .blueTitle {
-        width: 200px;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-        margin-bottom: 40px;
-        background: #F0F2F5;
-        border-radius: 19px;
-        text-align: center;
-        color: #3799FF;
-        font-size: 16px;
-        padding: 5px 24px;
-    }
-
-    .current {
-        width: 158px;
-        height: 23px;
-        /*float: left;*/
-        border-radius: 250px;
-        text-align: center;
-        background: #F0F2F5;
-        color: #545454;
-        font-size: 14px;
-        padding: 3px 10px;
-        margin-left: 20px;
-    }
-
-    .lessonSpan {
-        width: 78px;
-        height: 22px;
-        border-radius: 11px;
-        margin-right: 5px;
-        float: left;
-        margin-bottom: 3px;
-        text-align: center;
-        color: #000;
-        font-size: 12px;
-    }
-
-    .classNames {
-        width: 211px;
-        height: 25px;
-        background: #f0f2f5;
-        font-family: "Source Han Sans CN";
-        font-weight: normal;
-        font-size: 16px;
-        color: #3799ff;
-        border-radius: 250px;
-        text-align: center;
-        margin: 0 auto;
-        margin-bottom: 10px;
-    }
-
-    /deep/ .el-date-editor .el-range-separator {
-        line-height: 25px;
-    }
-
-    .likeTab {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 0;
-        border-bottom: 1px solid #ccc;
-        margin-bottom: 10px;
-    }
-
-    .likeTab button {
-        float: left;
-        border-radius: 0;
-    }
-
-    .likeTab button.pull-right {
-        float: right;
-    }
-    
-    @media (min-width: 320px) and (max-width: 1367px) {
-        .panel /deep/ .el-date-editor--daterange {
-            max-width: 240px;
-        }
-        .panel /deep/ .el-date-editor .el-range-separator {
-            line-height: 35px;
-        }
-    }
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.blueTitle {
+  width: 200px;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+  margin-bottom: 40px;
+  background: #F0F2F5;
+  border-radius: 19px;
+  text-align: center;
+  color: #3799FF;
+  font-size: 16px;
+  padding: 5px 24px;
+}
+
+.current {
+  width: 158px;
+  height: 23px;
+  /*float: left;*/
+  border-radius: 250px;
+  text-align: center;
+  background: #F0F2F5;
+  color: #545454;
+  font-size: 14px;
+  padding: 3px 10px;
+  margin-left: 20px;
+}
+
+.lessonSpan {
+  width: 78px;
+  height: 22px;
+  border-radius: 11px;
+  margin-right: 5px;
+  float: left;
+  margin-bottom: 3px;
+  text-align: center;
+  color: #000;
+  font-size: 12px;
+}
+
+.classNames {
+  width: 211px;
+  height: 25px;
+  background: #f0f2f5;
+  font-family: "Source Han Sans CN";
+  font-weight: normal;
+  font-size: 16px;
+  color: #3799ff;
+  border-radius: 250px;
+  text-align: center;
+  margin: 0 auto;
+  margin-bottom: 10px;
+}
+
+/deep/ .el-date-editor .el-range-separator {
+  line-height: 25px;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+@media (min-width: 320px) and (max-width: 1367px) {
+  .panel /deep/ .el-date-editor--daterange {
+    max-width: 240px;
+  }
+
+  .panel /deep/ .el-date-editor .el-range-separator {
+    line-height: 35px;
+  }
+}
 </style>

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

@@ -8,9 +8,9 @@
       </div>
       <div class="panel-body">
         <div class="panel_control">
-          <el-row :gutter="20">
+          <el-row :gutter="1">
             <el-col :span="5">
-              <em>心率设备:</em>
+              <em style="line-height: 40px;margin-right: 20px;">心率设备:</em>
               <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
             </el-col>
             <!--<el-col :span="4">-->

+ 538 - 538
pc/src/views/record.vue

@@ -1,553 +1,553 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>预约记录</h5>
-            <div class="panel-body">
-                <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="7">
-                            <em>日期:</em>
-                            <el-date-picker
-                                    v-model="panel.timeScope"
-                                    type="daterange"
-                                    range-separator="至"
-                                    start-placeholder="开始日期"
-                                    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.classOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>状态:</em>
-                            <el-select v-model="panel.status">
-                                <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="2">
-                            <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
+  <div class="context">
+    <div class="panel">
+      <h5>预约记录</h5>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="1">
+            <el-col :span="3">
+              <em>姓名:</em>
+              <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
+            </el-col>
+            <el-col :span="3">
+              <em>手机号:</em>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+            </el-col>
+            <el-col :span="5">
+              <em>日期:</em>
+              <el-date-picker
+                  v-model="panel.timeScope"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+              </el-date-picker>
+            </el-col>
+            <el-col :span="3">
+              <em>预约课程:</em>
+              <el-select v-model="panel.classId">
+                <el-option
+                    v-for="item in panel.classOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <em>状态:</em>
+              <el-select v-model="panel.status">
+                <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" :disabled="serachBtnStatus" plain>查询
+              </el-button>
+            </el-col>
+          </el-row>
         </div>
-        <div class="table">
-            <el-table
-                    :data="tableData"
-                    border
-                    is-horizontal-resize
-                    :default-sort="{prop: 'date', order: 'descending'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
-                    @selection-change="handleSelectionChange"
-            >
-
-                >
-                <el-table-column label="序号" type="index" width="50" align="center">
-                    <template scope="scope">
-                        <span>{{(start) + scope.$index + 1}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="UserName"
-                        label="会员名"
-                        width="90"
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Phone"
-                        label="手机号"
-                        width="110"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassName"
-                        label="预约课程"
-                        width="110"
-                        sortable
-                >
-                    <template slot-scope="scope">
+      </div>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{prop: 'date', order: 'descending'}"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class=""
+          @selection-change="handleSelectionChange"
+      >
+
+        >
+        <el-table-column label="序号" type="index" width="50" align="center">
+          <template scope="scope">
+            <span>{{(start) + scope.$index + 1}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="UserName"
+            label="会员名"
+            width="90"
+        >
+        </el-table-column>
+        <el-table-column
+            prop="Phone"
+            label="手机号"
+            width="110"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="ClassName"
+            label="预约课程"
+            width="110"
+            sortable
+        >
+          <template slot-scope="scope">
                         <span class="lessons"
                               :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="ConsumeHour"
-                        label="课时"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Base.CreatedAt"
-                        label="预约日期"
-                        width="180"
-                        :formatter="filterFmtDate"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="BeginStr"
-                        label="上课时间"
-                        width="180"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        {{ scope.row.BeginTime |filterNoTTime }} - {{ scope.row.EndStr }}
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="RemainHour"
-                        label="是否跨店"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.RemainHour == ''" style="color:red;">跨店</span>
-                        <span v-else style="color: #000">本店用户</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1" style="color:yellowgreen;">已预约</span>
-                        <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
-                        <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
-                        <span v-if="scope.row.Status == 4" style="color:#000;">已完成</span>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-                    :current-page.sync="cur_page"
-            ></el-pagination>
-        </div>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="ConsumeHour"
+            label="课时"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="Base.CreatedAt"
+            label="预约日期"
+            width="180"
+            :formatter="filterFmtDate"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="BeginStr"
+            label="上课时间"
+            width="180"
+            sortable
+        >
+          <template slot-scope="scope">
+            {{ scope.row.BeginTime |filterNoTTime }} - {{ scope.row.EndStr }}
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="RemainHour"
+            label="是否跨店"
+            sortable
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.RemainHour == ''" style="color:red;">跨店</span>
+            <span v-else style="color: #000">本店用户</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="状态"
+            sortable
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.Status == 1" style="color:yellowgreen;">已预约</span>
+            <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
+            <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
+            <span v-if="scope.row.Status == 4" style="color:#000;">已完成</span>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination
+          background
+          :total="pageination.total"
+          :page-size="pageination.pageItem"
+          @current-change="pageChange"
+          :current-page.sync="cur_page"
+      ></el-pagination>
     </div>
+  </div>
 </template>
 
 <script>
-    import Global from '../Global.js'
-    import {
-        OrderListQuery,
-        ClassListQuery,
-    } from "../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                serachBtnStatus: false,
-                dialogVisible: false,//其他dialog
-                dialogMemberVisible: false,//新增会员dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                dialogValue: [],
-                start: 0,
-                draw: 1,
-                cur_page: 1,
-                // panel 配置项目
-                panel: {
-                    status: '',
-                    classId: '',
-                    usercode: '',
-                    username: '',
-                    timeScope: globalBt2(7),
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    classOptions: [],
-                    options: [
-                        {value: '', label: '全部'},
-                        {value: 1, label: '已预约'},
-                        {value: 2, label: '已取消'},
-                        {value: 3, label: '预约未到'},
-                        {value: 4, label: '已完成'},
-                    ],
-                    endTypeOptions: [
-                        {value: 99, label: '全部'},
-                        {value: 30, label: '近一个月'},
-                        {value: 7, label: '近一周'},
-                        {value: 1, label: '当日'},
-                    ],
-                    time1: globalBt(),
-                },
-                multipleSelection: [],
-                pageination: {
-                    pageItem: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: [
-                    {value: 1, label: '年会员'},
-                    {value: 2, label: '充值会员'},
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.panelSelect();
-            this.getTableQuery();
-        },
-        methods: {
-            // 加载选项
-            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.classOptions = turnClassResToOption(json.Rs);
-                        that.panel.classOptions.unshift({value: '', label: '全部'})
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                that.serachBtnStatus = true;
-                let totalTime = 2;
-                let clock = window.setInterval(() => {
-                    totalTime--;
-                    if (totalTime < 0) {
-                        totalTime = 2;
-                        that.serachBtnStatus = false;
-                    }
-                }, 1000);
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                // this.getGetChildRegionSelect(0, 1);
-                that.loading = true;
-                console.log(that.panel.timeScope[0]);
-                // let beginOrdertime = parseInt(that.panel.timeScope[0].valueOf() / 1000);
-                // let endOrdertime = parseInt(that.panel.timeScope[1].valueOf() / 1000);
-
-                // beginOrdertime = '';
-                // endOrdertime = '';
-                // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
-                let param = {
-                    token: localStorage.token,
-                    classId: that.panel.classId,//
-                    name: that.panel.name,//
-                    phone: that.panel.phone,//
-                    beginOrdertime:nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",//
-                    endOrdertime: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",//
-                    status: that.panel.status,//标签名
-                };
-                let postdata = qs.stringify(param);
-                OrderListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
-            // 过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                return nonTfmtDate(column, 11);
-            },
-            // 过滤金额
-            filterMoney(value, row, column) {
-                let that = this;
-                return parseFloat(column).toFixed(2);
-            },
-        },
-        filters: {
-            filterNoTTime: function (value) {
-                if (!value) {
-                    return 0
-                } else {
-                    return nonTfmtDatetoLength(value, 16);
-                }
-            },
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'record') {
-                    this.panelSelect();
-                    this.getTableQuery();
-                }
-            },
-        },
-    }
-</script>
-
-<style scoped>
-    @import "../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
+import Global from '../Global.js'
+import {
+  OrderListQuery,
+  ClassListQuery,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      serachBtnStatus: false,
+      dialogVisible: false,//其他dialog
+      dialogMemberVisible: false,//新增会员dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '新增会员',
+      dialogValue: [],
+      start: 0,
+      draw: 1,
+      cur_page: 1,
+      // panel 配置项目
+      panel: {
+        status: '',
+        classId: '',
+        usercode: '',
+        username: '',
+        timeScope: globalBt2(7),
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        classOptions: [],
+        options: [
+          {value: '', label: '全部'},
+          {value: 1, label: '已预约'},
+          {value: 2, label: '已取消'},
+          {value: 3, label: '预约未到'},
+          {value: 4, label: '已完成'},
+        ],
+        endTypeOptions: [
+          {value: 99, label: '全部'},
+          {value: 30, label: '近一个月'},
+          {value: 7, label: '近一周'},
+          {value: 1, label: '当日'},
+        ],
+        time1: globalBt(),
+      },
+      multipleSelection: [],
+      pageination: {
+        pageItem: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        userCode: '',
+        shopId: '',
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年会员'},
+        {value: 2, label: '充值会员'},
+      ],
+      tableData: []
     }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .panel /deep/ .el-date-editor--daterange {
-        /*width: 260px;*/
-    }
-
-    /deep/ .el-col-4 {
-        width: 15% !important;
-    }
-
-    .panel /deep/ .el-input__inner {
-        /*width: 130px;*/
-    }
-
-    .panel /deep/ .el-input {
-        /*width: 130px;*/
-    }
-
-    .panel /deep/ .el-select {
-        width: 130px;
-    }
-
-    /deep/ .el-date-editor .el-range-separator {
-        line-height: 22px;
-    }
-
-    .lessons {
-        padding: 1px 7px;
-        border-radius: 250px;
-        float: left;
-        color: #000;
-    }
-
-    .el-col-7 {
-        width: 25%;
-    }
-    .panel /deep/ .el-date-editor--daterange {
-        width: 260px;
-    }
-    /*ipad only*/
-    @media only screen and (max-width: 1366px) {
-        .panel-body {
+  },
+  mounted() {
+    this.panelSelect();
+    this.getTableQuery();
+  },
+  methods: {
+    // 加载选项
+    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.classOptions = turnClassResToOption(json.Rs);
+          that.panel.classOptions.unshift({value: '', label: '全部'})
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
-
-        .panel .el-button {
-            margin-top: 5px;
+      })
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.serachBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.serachBtnStatus = false;
         }
-
-        .panel .el-col-4:nth-child(6) {
-            width: 9% !important;
-            float: right;
-            margin-top: 25px;
+      }, 1000);
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      // this.getGetChildRegionSelect(0, 1);
+      that.loading = true;
+      console.log(that.panel.timeScope[0]);
+      // let beginOrdertime = parseInt(that.panel.timeScope[0].valueOf() / 1000);
+      // let endOrdertime = parseInt(that.panel.timeScope[1].valueOf() / 1000);
+
+      // beginOrdertime = '';
+      // endOrdertime = '';
+      // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
+      let param = {
+        token: localStorage.token,
+        classId: that.panel.classId,//
+        name: that.panel.name,//
+        phone: that.panel.phone,//
+        beginOrdertime:nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",//
+        endOrdertime: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",//
+        status: that.panel.status,//标签名
+      };
+      let postdata = qs.stringify(param);
+      OrderListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
-
-        .el-col-7 {
-            width: 29%;
+      })
+    },
+
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
         }
-    }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    // 过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      return nonTfmtDate(column, 11);
+    },
+    // 过滤金额
+    filterMoney(value, row, column) {
+      let that = this;
+      return parseFloat(column).toFixed(2);
+    },
+  },
+  filters: {
+    filterNoTTime: function (value) {
+      if (!value) {
+        return 0
+      } else {
+        return nonTfmtDatetoLength(value, 16);
+      }
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'record') {
+        this.panelSelect();
+        this.getTableQuery();
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel /deep/ .el-date-editor--daterange {
+  /*width: 260px;*/
+}
+
+/deep/ .el-col-4 {
+  width: 15% !important;
+}
+
+.panel /deep/ .el-input__inner {
+  /*width: 130px;*/
+}
+
+.panel /deep/ .el-input {
+  /*width: 130px;*/
+}
+
+.panel /deep/ .el-select {
+  width: 130px;
+}
+
+/deep/ .el-date-editor .el-range-separator {
+  line-height: 22px;
+}
+
+.lessons {
+  padding: 1px 7px;
+  border-radius: 250px;
+  float: left;
+  color: #000;
+}
+
+.el-col-7 {
+  width: 25%;
+}
+.panel /deep/ .el-date-editor--daterange {
+  width: 260px;
+}
+/*ipad only*/
+@media only screen and (max-width: 1366px) {
+  .panel-body {
+  }
+
+  .panel .el-button {
+    margin-top: 5px;
+  }
+
+  .panel .el-col-4:nth-child(6) {
+    width: 9% !important;
+    float: right;
+    margin-top: 25px;
+  }
+
+  .el-col-7 {
+    width: 29%;
+  }
+}
 
 </style>

+ 2 - 1
pc/vue.config.js

@@ -34,6 +34,7 @@ module.exports = {
         }
     },
     // 输出文件目录
-    outputDir: 'D:/wwwroot/flyLongStaticPc/build',
+    // outputDir: 'D:/wwwroot/flyLongStaticPc/build',//windows输出目录
+    outputDir: '/Users/macbook/Working/vueBuild/flyLong/GoAllOutTv',//mac输出目录
     productionSourceMap: false,//关闭map文件,减少打包后体积
 };

+ 14 - 16
tv/src/Mock/index.js

@@ -131,10 +131,11 @@ let testStudent = function (num, team, mustbeTeamOne) {
             BeginTime: 1608188579,
             Ck: "@float(1,99,0,1)",
             Cle: "@float(1,9999,0,1)",
+            EI: "@float(1,9999,0,1)",
             DuId: 119,
             EndTime: 0,
             GroupNo: group,
-            Head: "http://192.168.0.2/gc.png",
+            Head: "http://192.168.0.2/zw.png",
             Height: 160,
             HrId: 41,
             IsBirthday: 0,
@@ -168,7 +169,7 @@ let testStudent = function (num, team, mustbeTeamOne) {
             lastPushDataTime: 1608188947175,
             lastUpdateTime: 1608188945184,
             queuePushData: [],
-            RealHr: "@integer(1, 200)",
+            RealHr: "@integer(80, 200)",
             // RealHr: 0,
             vo2Max: "@float(1,9999,0,1)"
         })
@@ -366,28 +367,29 @@ let getClassStat = function (ClassOn, dp) {
         dp: dp,
         // 1:团课/私教
         // 2:竞技课2PK
-        // 3:竞技课threepk
+        // 3:竞技课3pk
     };
 };
 
 let t = 0;//0 is on 1 is off
-if (t == 1) {
+if (t == 0) {
     // 列表测试
     Mock.mock('/api/testTable', 'post', testTable());
     Mock.mock('/api/getUserList', 'post', getUserList());
 
-    let curheadapi = 'http://192.168.0.63:8080/';
+    let curheadapi = 'http://192.168.0.3:9000/';
+    // let curheadapi = headapi;
 
-    if (runVersion == 'test') {
-        curheadapi = 'http://cal.beswell.com:85/DataTransfer/';
-    }
+    // if (runVersion == versionNormal) {
+    //     curheadapi = 'http://cal.beswell.com:85/DataTransfer/';
+    // }
 
     // 0: 下课 团课/私教/PK 的排名
-    let LessonClass = 1;
+    let LessonClass = 0;
     let LessonDp = 1;
     // 1:团课/私教
     // 2:竞技课2PK
-    // 3:竞技课threepk
+    // 3:竞技课3pk
     if (LessonClass == 1) {
         // 上团课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
@@ -402,18 +404,14 @@ if (t == 1) {
         Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(8, 3,));
     } else if (LessonClass == 0) {
         // 下课
-        if (LessonDp == 0) {
-            Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 0));
-        } else if (LessonDp == 1) {
+        if (LessonDp == 1) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 1));
-            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(16, 2));
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(4, 1, 1));
         } else if (LessonDp == 2) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
-            // 下课排名
             Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(16, 2));
         } else if (LessonDp == 3) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 3));
-            // 下课排名
             Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(16, 3));
         }
     }

+ 9 - 0
tv/src/static/img/ei.svg

@@ -0,0 +1,9 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="305" height="305" viewBox="0 0 305 305">
+    <g id="组_83" data-name="组 83" transform="translate(-4212 -943)">
+        <g id="椭圆_17" data-name="椭圆 17" transform="translate(4212 943)" fill="none" stroke="#fff" stroke-width="22">
+            <circle cx="152.5" cy="152.5" r="102.5" stroke="none"/>
+            <circle cx="152.5" cy="152.5" r="111.5" fill="none"/>
+        </g>
+        <text id="CK" transform="translate(4360 1151)" fill="#fff" font-size="149" font-family="Arial-BoldMT, Arial" font-weight="700"><tspan x="-67" y="0">EI</tspan></text>
+    </g>
+</svg>

+ 1 - 7
tv/src/views/Index.vue

@@ -40,7 +40,6 @@ export default {
       curVersion: '1.0.1',
       viewEqSn: localStorage.eqSn,
       viewVersion: localStorage.version,
-      isPad: true,//pad 展示版本
       viewMode: false,//pad 展示版本
       clientHeight: document.documentElement.clientHeight + 'px'
     }
@@ -103,7 +102,7 @@ export default {
       } else {
         console.log('mui is not ready');
         this.getServeIpAddress(localStorage.eqSn);
-        document.addEventListener('plusready', plusReady, false);
+        document.addEventListener('plusready', this.plusReady, false);
       }
     },
     //获取当前版本号
@@ -252,11 +251,6 @@ ul, li {
   overflow-y: scroll;
 }
 
-/*演示版专供*/
-.isPad {
-  height: 11.2rem;
-}
-
 .IndexContainer > .el-container {
   width: 100%;
   height: 100%;

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

@@ -71,8 +71,8 @@
                 <span>{{ s.Cle |fmtInt }}</span>
               </div>
               <div class="btck">
-                <img src="../static/img/s2.svg"/>
-                <span>{{ s.PureCalorieNoVo2   |fmtInt }}</span>
+                <img src="../static/img/ei.svg"/>
+                <span>{{  s.EI  |fmtInt }}</span>
               </div>
               <div class="step">
                 <img src="../static/img/ck.svg"/>

+ 38 - 3
tv/src/views/Rank.vue

@@ -7,7 +7,7 @@
     <div class="rankContainer">
       <el-row :gutter="20">
         <!--卡路里-->
-        <el-col :span="12">
+        <el-col :span="8">
 <!--          只显示前8个-->
           <li v-for="(s,i) in students.CalSort" v-if="i <= 7">
             <div
@@ -33,8 +33,35 @@
             </div>
           </li>
         </el-col>
+        <!--EI-->
+        <el-col :span="8">
+          <li v-for="(s,i) in students.EISort" v-if="i <= 7">
+            <div
+                :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
+              <div class="head">
+                <img :src="s.Head" class="headImg" v-if="s.Head">
+                <img src="../static/img/people/flyhead.png" class="headImg" alt="" v-if="!s.Head">
+                <img src="../static/img/rank/king1.svg" class="king" alt="" v-if="i == 0">
+                <img src="../static/img/rank/king2.svg" class="king" alt="" v-if="i == 1">
+                <img src="../static/img/rank/king3.svg" class="king" alt="" v-if="i == 2">
+              </div>
+              <div class="name">
+                NO.{{ i + 1 }} {{ s.Name }}
+              </div>
+
+              <div class="score">
+                {{ s.EI|fmtInt }}
+                <em>EI</em>
+              </div>
+              <div class="record">
+                <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
+                     v-if="s.IsNewUser ==0 && s.IsBreaking == 1">
+              </div>
+            </div>
+          </li>
+        </el-col>
         <!--CK-->
-        <el-col :span="12">
+        <el-col :span="8">
           <li v-for="(s,i) in students.CkSort" v-if="i <= 7">
             <div
                 :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
@@ -48,7 +75,6 @@
               <div class="name">
                 NO.{{ i + 1 }} {{ s.Name }}
               </div>
-
               <div class="score">
                 {{ s.Ck|fmtFloat }}
                 <em>CK</em>
@@ -95,12 +121,16 @@ export default {
     } else {
       this.students.CkSort = fakeNews(5);
       this.students.CalSort = fakeNews(5);
+      this.students.EISort = fakeNews(5);
       this.students.CkSort = this.students.CkSort.sort(function (a, b) {
         return b.Ck - a.Ck;
       });
       this.students.CalSort = this.students.CalSort.sort(function (a, b) {
         return b.Cle - a.Cle;
       });
+      this.students.EISort = this.students.EISort.sort(function (a, b) {
+        return b.EI - a.EI;
+      });
     }
   },
   watch: {
@@ -175,10 +205,15 @@ export default {
             that.students.CalSort = CalSort.sort(function (a, b) {
               return b.Cle - a.Cle;
             });
+
+            that.students.EISort = CalSort.sort(function (a, b) {
+              return b.EI - a.EI;
+            });
           }
         } else {
           this.students.CkSort = [];
           this.students.CalSort = [];
+          this.students.EISort = [];
           if (json.Code == '999') {
             // that.$router.push({path: '/'});
           } else {

+ 4 - 4
tv/src/views/pk.vue

@@ -66,8 +66,8 @@
                                     <span>{{ s.Cle |fmtInt }}</span>
                                 </div>
                                 <div class="btck">
-                                    <img src="../static/img/s2.svg"/>
-                                    <span>{{ s.PureCalorieNoVo2  |fmtInt }}</span>
+                                    <img src="../static/img/ei.svg"/>
+                                    <span>{{ s.EI  |fmtInt }}</span>
                                 </div>
                                 <div class="step">
                                     <img src="../static/img/ck.svg"/>
@@ -175,8 +175,8 @@
                                     <span>{{ s.Cle |fmtInt }}</span>
                                 </div>
                                 <div class="btck">
-                                    <img src="../static/img/s2.svg"/>
-                                    <span>{{ s.PureCalorieNoVo2  |fmtInt}}</span>
+                                    <img src="../static/img/ei.svg"/>
+                                    <span>{{ s.EI  |fmtInt}}</span>
                                 </div>
                                 <div class="step">
                                     <img src="../static/img/ck.svg"/>

+ 6 - 6
tv/src/views/threepk.vue

@@ -111,8 +111,8 @@
                   <span>{{ s.Cle |fmtInt }}</span>
                 </div>
                 <div class="btck">
-                  <img src="../static/img/s2.svg"/>
-                  <span>{{ s.PureCalorieNoVo2  |fmtInt }}</span>
+                  <img src="../static/img/ei.svg"/>
+                  <span>{{ s.EI  |fmtInt }}</span>
                 </div>
                 <div class="step">
                   <img src="../static/img/ck.svg"/>
@@ -183,8 +183,8 @@
                   <span>{{ s.Cle |fmtInt }}</span>
                 </div>
                 <div class="btck">
-                  <img src="../static/img/s2.svg"/>
-                  <span>{{ s.PureCalorieNoVo2  |fmtInt }}</span>
+                  <img src="../static/img/ei.svg"/>
+                  <span>{{ s.EI  |fmtInt }}</span>
                 </div>
                 <div class="step">
                   <img src="../static/img/ck.svg"/>
@@ -256,8 +256,8 @@
                   <span>{{ s.Cle |fmtInt }}</span>
                 </div>
                 <div class="btck">
-                  <img src="../static/img/s2.svg"/>
-                  <span>{{ s.PureCalorieNoVo2  |fmtInt }}</span>
+                  <img src="../static/img/ei.svg"/>
+                  <span>{{ s.EI  |fmtInt }}</span>
                 </div>
                 <div class="step">
                   <img src="../static/img/ck.svg"/>

+ 1 - 1
tv/vue.config.js

@@ -37,6 +37,6 @@ module.exports = {
         }
     },
     //打包输出文件目录
-    outputDir: '/Users/macbook/Working/vueBuild/flyLong/GoAllOutTv',
+    outputDir: '/Users/macbook/Working/vueBuild/flyLong/GoAllOutTv',//mac输出目录
     publicPath:'./',
 };

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff