浏览代码

Merge branch 'master' of git.beswell.com:duanchangpeng/flyLong

Changpeng Duan 5 年之前
父节点
当前提交
417c65ff96

+ 349 - 328
app/src/page/mainpage.vue

@@ -1,341 +1,362 @@
 <template>
-    <div id="mainPage">
-        <img src="../static/images/main/banner.png" height="121" width="414"/>
-        <span class="shopNum">
+  <div id="mainPage">
+    <img class="banner" src="../static/images/main/banner.png"/>
+    <span class="shopNum">
             俱乐部场馆共 {{ list.length }} 处
         </span>
-        <ul class="list">
-            <li v-for="l in list" @click="goAppoint(l)" v-if="l.Status == 1 ">
-                <img src="../static/images/main/shop.jpg" width="130px" v-if="l.ShopID == 4"/>
-                <img src="../static/images/main/shop2.jpg" width="130px" v-else/>
-                <div class="rt">
-                    <h5>{{ l.ShopName }}</h5>
-                    <span>今日预约名额剩余
-                        <i v-if="l.RemainOrdernum > 0">{{ l.RemainOrdernum }}</i>
-                        <i v-if="l.RemainOrdernum == 0" class="red">{{ l.RemainOrdernum }}</i>
-                        人</span>
-                    <span>地址:{{ l.Addr }}</span>
-                    <em class="green" v-if="l.WxStatus == 1 && l.IsJoin ==1">点击预约</em>
-                    <em class="red" v-else>不可预约</em>
-                </div>
-            </li>
-            <div class="tips" v-if="list == ''">
-                <p style="text-align: center">
-                    暂无可预约的门店
-                </p>
-            </div>
-        </ul>
-        <bottomTab :curTab="thisTab"></bottomTab>
-        <alert ref="alertPart"></alert>
-    </div>
+    <ul class="list">
+      <li v-for="l in list" @click="goAppoint(l)" v-if="l.Status == 1 ">
+        <img src="../static/images/main/shop2.jpg" width="130px" v-if="l.ShopID == 3"/>
+        <img src="../static/images/main/shop.jpg" width="130px" v-if="l.ShopID == 4"/>
+        <img src="../static/images/main/shop3.png" width="130px" v-if="l.ShopID == 5"/>
+        <div class="rt">
+          <h5>{{ l.ShopName.substr(0,5)}}</h5>
+          <h4>{{ l.ShopName.substr(5,12) }}</h4>
+          <span>今日预约名额剩余
+              <i v-if="l.RemainOrdernum > 0">{{ l.RemainOrdernum }}</i>
+              <i v-if="l.RemainOrdernum == 0" class="red">{{ l.RemainOrdernum }}</i>
+              人</span>
+          <span>地址:{{ l.Addr }}</span>
+          <em class="green" v-if="l.WxStatus == 1 && l.IsJoin ==1">点击预约</em>
+          <em class="red" v-else>不可预约</em>
+        </div>
+      </li>
+      <div class="tips" v-if="list == ''">
+        <p style="text-align: center">
+          暂无可预约的门店
+        </p>
+      </div>
+    </ul>
+    <bottomTab :curTab="thisTab"></bottomTab>
+    <alert ref="alertPart"></alert>
+  </div>
 </template>
 
 <script>
-    import {
-        ManagerSelfQuery,
-        OrderShopQuery,
-    } from '../api/getApiRes.js'
-
-    import bottomTab from '../components/bottomTab'
-    import alert from '../components/alert'
-    import axios from 'axios';
-
-    let qs = require('qs');
-    import Global from '../Global.js'
-
-    export default {
-        data() {
-            return {
-                thisTab: '预约课程',
-                shopNum: 0,
-                recordNum: 0,
-                Dannum: 0,
-                GetHotelCounts: 0,
-                GetDetectorNum: 0,
-                currShopId: 0,
-                list: [],
-            }
-        },
-        mounted() {
-            this.getManagerSelfQuery();
-        },
-        destroyed() {
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'main') {
-                    this.getList();
-                }
-            },
-            'active'() {
-                this.getList();
-            }
-        },
-        methods: {
-            alertInfo(info) {
-                this.$refs.alertPart.openSimpleDialog(info);
-            },
-            getManagerSelfQuery() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                ManagerSelfQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        this.currShopId = json.Rs.ShopId;
-                        this.getList();
-                    } else {
-                        that.alertInfo(json.Memo);
-                        if (json.Code == 1010) {
-                            localStorage.clear();
-                            console.log(1010);
-                            that.$router.push({path: '/login'});
-                        }
-                    }
-                })
-            },
-            getList() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                OrderShopQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.list = json.Rs;
-                        if (that.list) {
-                            that.shopNum = json.Rs.length;
-                        }
-                    } else {
-                        that.alertInfo(json.Memo);
-                        // 权限失效后,删掉本地token
-                        if (json.Code == 1004) {
-                            localStorage.clear();
-                            console.log(1010);
-                            this.$router.push({path: '/login'});
-                        }
-                    }
-                })
-            },
-            onGoNewPage(path) {
-                this.$router.push({path: '/' + path});
-            },
-            goPage(pages) {
-                this.$router.push({path: pages});
-            },
-            goAppoint(row) {
-                let that = this;
-                if (row.IsJoin == 0) {
-                    that.alertInfo('您不是该店会员,不可预约');
-                    return false
-                }
-                if (row.Status == 2) {
-                    that.alertInfo(row.name + '不可预约');
-                    return false
-                } else {
-                    this.$router.push({
-                        path: '/appoint', query: {
-                            shopId: row.ShopID
-                        }
-                    });
-                }
-            }
-        },
-        beforeRouteEnter(to, from, next) {
-            next(vm => {
-                //因为当钩子执行前,组件实例还没被创建
-                // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
-                if (to.name == '') {
-                    vm.getList();
-                }
-            });
-        },
-        components: {
-            bottomTab, alert
-        }
-    }
-</script>
-
-<style scoped>
-    #mainPage {
-        width: 100%;
-        height: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        background: #f2f2f2;
-        overflow-y: scroll;
-    }
-
-
-    .goPage {
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        background: #fff;
-        height: 50px;
-        line-height: 50px;
-        padding: 0 20px;
-        color: #333;
-        font-size: 18px;
-        border-bottom: 1px solid #f2f2f2;
+import {
+  ManagerSelfQuery,
+  OrderShopQuery,
+} from '../api/getApiRes.js'
+
+import bottomTab from '../components/bottomTab'
+import alert from '../components/alert'
+import axios from 'axios';
+
+let qs = require('qs');
+import Global from '../Global.js'
+
+export default {
+  data() {
+    return {
+      thisTab: '预约课程',
+      shopNum: 0,
+      recordNum: 0,
+      Dannum: 0,
+      GetHotelCounts: 0,
+      GetDetectorNum: 0,
+      currShopId: 0,
+      list: [],
     }
-
-    .goPage span {
-        float: left;
-    }
-
-    .goPage i {
-        float: right;
-        margin-top: 12px;
-    }
-
-    .goPage img {
-        overflow: hidden;
-        display: block;
-        width: 8px;
-        height: 14px;
-        float: right;
-        margin-top: 16px;
-        margin-right: 10px;
-    }
-
-    .goTitle i {
-        margin-top: 10px;
-        float: right;
-    }
-
-    .mapContainer {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        max-height: 317px;
-    }
-
-    .shopNum {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        font-family: "PingFang SC";
-        font-weight: 300;
-        font-size: 14px;
-        color: #909090;
-        text-align: center;
-    }
-
-    .list {
-        width: 94%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-left: 3%;
-        padding-right: 3%;
-        margin-top: 10px;
-        padding-bottom: 20px;
-    }
-
-    .list li {
-        width: 100%;
-        height: 133px;
-        background: transparent;
-        margin-bottom: 20px;
-        border-radius: 13px;
-        background: #fff;
-        box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
-        overflow: hidden;
-    }
-
-    .list img {
-        float: left;
-    }
-
-    .list .rt {
-        width: 58%;
-        float: left;
-        padding-left: 15px;
-    }
-
-    .list .rt h5 {
-        font-family: "PingFang SC";
-        font-weight: normal;
-        font-size: 18px;
-        text-align: left;
-        color: #3b3b3b;
-        margin: 0;
-        margin-top: 18px;
-        margin-bottom: 7px;
+  },
+  mounted() {
+    this.getManagerSelfQuery();
+  },
+  destroyed() {
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'main') {
+        this.getList();
+      }
+    },
+    'active'() {
+      this.getList();
     }
-
-    .list .rt span {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        font-family: "PingFang SC";
-        font-weight: normal;
-        font-size: 12px;
-        text-align: left;
-        color: #909090;
-    }
-
-    .list .rt em {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        font-family: "PingFang SC";
-        font-weight: normal;
-        font-size: 16px;
-        padding-right: 1px;
-        margin-top: 5px;
-        float: right;
-        text-align: right;
-    }
-
-    .list .rt em.green {
-        color: #37cb00;
-    }
-
-    .list .rt em.red {
-        color: #F8847F;
-    }
-
-    .red {
-        color: #F8847F;
-    }
-
-    @media only screen and (max-width: 640px) {
-
-    }
-
-    @media only screen and (max-width: 480px) {
-
-    }
-
-    @media only screen and (max-width: 375px) {
-
-    }
-
-    @media only screen and (max-width: 360px) {
-
-    }
-
-    @media only screen and (max-width: 320px) {
-        .list .rt {
-            width: 52%;
+  },
+  methods: {
+    alertInfo(info) {
+      this.$refs.alertPart.openSimpleDialog(info);
+    },
+    getManagerSelfQuery() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+      };
+      let postdata = qs.stringify(param);
+      ManagerSelfQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          this.currShopId = json.Rs.ShopId;
+          this.getList();
+        } else {
+          that.alertInfo(json.Memo);
+          if (json.Code == 1010) {
+            localStorage.clear();
+            console.log(1010);
+            that.$router.push({path: '/login'});
+          }
         }
-
-        .list .rt em {
-            font-size: 14px;
+      })
+    },
+    getList() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+      };
+      let postdata = qs.stringify(param);
+      OrderShopQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.list = json.Rs;
+          if (that.list) {
+            that.shopNum = json.Rs.length;
+          }
+        } else {
+          that.alertInfo(json.Memo);
+          // 权限失效后,删掉本地token
+          if (json.Code == 1004) {
+            localStorage.clear();
+            console.log(1010);
+            this.$router.push({path: '/login'});
+          }
         }
+      })
+    },
+    onGoNewPage(path) {
+      this.$router.push({path: '/' + path});
+    },
+    goPage(pages) {
+      this.$router.push({path: pages});
+    },
+    goAppoint(row) {
+      let that = this;
+      if (row.IsJoin == 0) {
+        that.alertInfo('您不是该店会员,不可预约');
+        return false
+      }
+      if (row.Status == 2) {
+        that.alertInfo(row.name + '不可预约');
+        return false
+      } else {
+        this.$router.push({
+          path: '/appoint', query: {
+            shopId: row.ShopID
+          }
+        });
+      }
     }
+  },
+  beforeRouteEnter(to, from, next) {
+    next(vm => {
+      //因为当钩子执行前,组件实例还没被创建
+      // vm 就是当前组件的实例相当于上面的 this,所以在 next 方法里你就可以把 vm 当 this 来用了。
+      if (to.name == '') {
+        vm.getList();
+      }
+    });
+  },
+  components: {
+    bottomTab, alert
+  }
+}
+</script>
 
-    @media only screen and (min-width: 641px) {
-
-    }
+<style scoped>
+#mainPage {
+  width: 100%;
+  height: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #f2f2f2;
+  overflow-y: scroll;
+}
+#mainPage .banner {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.goPage {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: #fff;
+  height: 50px;
+  line-height: 50px;
+  padding: 0 20px;
+  color: #333;
+  font-size: 18px;
+  border-bottom: 1px solid #f2f2f2;
+}
+
+.goPage span {
+  float: left;
+}
+
+.goPage i {
+  float: right;
+  margin-top: 12px;
+}
+
+.goPage img {
+  overflow: hidden;
+  display: block;
+  width: 8px;
+  height: 14px;
+  float: right;
+  margin-top: 16px;
+  margin-right: 10px;
+}
+
+.goTitle i {
+  margin-top: 10px;
+  float: right;
+}
+
+.mapContainer {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  max-height: 317px;
+}
+
+.shopNum {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-family: "PingFang SC";
+  font-weight: 300;
+  font-size: 14px;
+  color: #909090;
+  text-align: center;
+}
+
+.list {
+  width: 98%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-left: 1%;
+  padding-right: 1%;
+  margin-top: 10px;
+  padding-bottom: 40px;
+}
+
+.list li {
+  width: 100%;
+  background: transparent;
+  margin-bottom: 20px;
+  border-radius: 13px;
+  background: #fff;
+  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
+  overflow: hidden;
+}
+
+.list img {
+  height: 100%;
+  float: left;
+}
+
+.list .rt {
+  width: 65%;
+  float: left;
+  padding-left: 15px;
+}
+
+.list .rt h5 {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 16px;
+  text-align: left;
+  color: #3b3b3b;
+  margin: 0;
+  margin-top: 6px;
+  margin-bottom: 0px;
+}
+.list .rt h4 {
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 16px;
+  text-align: left;
+  color: #3b3b3b;
+  margin: 0;
+  margin-top: 0px;
+  margin-bottom: 1px;
+}
+
+.list .rt span {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 12px;
+  text-align: left;
+  color: #909090;
+}
+
+.list .rt em {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  font-family: "PingFang SC";
+  font-weight: normal;
+  font-size: 16px;
+  padding-right: 1px;
+  margin-top: 5px;
+  float: right;
+  text-align: right;
+}
+
+.list .rt em.green {
+  color: #37cb00;
+}
+
+.list .rt em.red {
+  color: #F8847F;
+}
+
+.red {
+  color: #F8847F;
+}
+
+@media only screen and (max-width: 640px) {
+
+}
+
+@media only screen and (max-width: 480px) {
+
+}
+
+@media only screen and (max-width: 375px) {
+  .list .rt {
+    width: 61%;
+  }
+}
+
+@media only screen and (max-width: 360px) {
+  .list .rt {
+    width: 57%;
+  }
+}
+
+@media only screen and (max-width: 320px) {
+  .list .rt {
+    width: 52%;
+  }
+
+  .list .rt em {
+    font-size: 14px;
+  }
+}
+
+@media only screen and (min-width: 641px) {
+
+}
 </style>

二进制
app/src/static/images/main/shop3.png


文件差异内容过多而无法显示
+ 0 - 0
hbuild/GoAllOutTv/GoAllOutTv/index.html


+ 2 - 2
hbuild/GoAllOutTv/GoAllOutTv/manifest.json

@@ -3,8 +3,8 @@
     "id" : "H5BB8BEB3", /*应用的标识*/
     "name" : "小飞龙", /*应用名称,程序桌面图标名称*/
     "version" : {
-        "name" : "1.2.9", /*应用版本名称*/
-        "code" : 9
+        "name" : "1.2.15", /*应用版本名称*/
+        "code" : 15
     },
     "description" : "小飞龙TV平台", /*应用描述信息*/
     "icons" : {

+ 1 - 0
pc/package.json

@@ -17,6 +17,7 @@
     "v-charts": "^1.19.0",
     "vue": "^2.6.11",
     "vue-amap": "^0.5.10",
+    "vue-img-cutter": "^2.1.10",
     "vue-router": "^3.2.0",
     "vuex": "^3.4.0"
   },

+ 1097 - 1075
pc/src/views/courseEdit.vue

@@ -1,1118 +1,1140 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <div class="panel-body">
-                <br>
-                <el-page-header @back="goBack" content="课程管理">
-                    <br>
-                </el-page-header>
-                <span class="classNames">
-                    {{title}}   {{ClassStateText}}
+  <div class="context">
+    <div class="panel">
+      <div class="panel-body">
+        <br>
+        <el-page-header @back="goBack" content="课程管理">
+          <br>
+        </el-page-header>
+        <span class="classNames">
+                    {{ title }}   {{ ClassStateText }}
                 </span>
 
-                <br>
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="4">
-                            <em>会员名:</em>
-                            <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
-                        </el-col>
-                        <el-col :span="4">
-                            <em>手机号:</em>
-                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                        </el-col>
-                        <el-col :span="4">
-                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
-                            </el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
-            <div class="change">
-                <el-button @click="confirmBegin" type="primary" :disabled="BeginState" v-if="FinishClass == 3">确认上课
-                </el-button>
-                <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
-                <el-button @click="addFinishMember">添加上课会员</el-button>
-            </div>
+        <br>
+        <div class="panel_control">
+          <el-row :gutter="20">
+            <el-col :span="4">
+              <em>会员名:</em>
+              <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
+            </el-col>
+            <el-col :span="4">
+              <em>手机号:</em>
+              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+            </el-col>
+            <el-col :span="4">
+              <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'}"
-                    element-loading-background="rgba(0, 0, 0, 0.8)"
-                    class=""
-            >
-                >
-                <el-table-column
-                        type="index"
-                        label="排名"
-                        align="center"
-                        width="50">
-                </el-table-column>
-                <el-table-column
-                        prop="head"
-                        label="头像"
-                        width="75"
-                        align="center"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <div class="demo-image__preview" v-if="scope.row.Head">
-                            <el-image
-                                    style="width: 25px; height: 25px"
-                                    :src="scope.row.Head"
-                                    :preview-src-list="[scope.row.Head]"
+      </div>
+      <div class="change">
+        <el-button @click="confirmBegin" type="primary" :disabled="BeginState" v-if="FinishClass == 3">确认上课
+        </el-button>
+        <el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
+        <el-button @click="addFinishMember">添加上课会员</el-button>
+      </div>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{prop: 'group_no', order: 'descending'}"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class=""
+          :row-class-name="tableRowClassName"
+      >
+        >
+        <el-table-column
+            type="index"
+            label="排名"
+            align="center"
+            width="50">
+        </el-table-column>
+        <el-table-column
+            prop="head"
+            label="头像"
+            width="75"
+            align="center"
+            sortable
+        >
+          <template slot-scope="scope">
+            <div class="demo-image__preview" v-if="scope.row.Head">
+              <el-image
+                  style="width: 25px; height: 25px"
+                  :src="scope.row.Head"
+                  :preview-src-list="[scope.row.Head]"
 
-                            >
-                            </el-image>
-                        </div>
-                        <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
-                        <!--<img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">-->
-                        <!--<img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>-->
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Name"
-                        label="会员名"
-                        width="90"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="Phone"
-                        label="手机号"
-                        width="120"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="ClassName"
-                        label="课程"
-                        width="110"
-                        sortable
-                >
-                    <template slot-scope="scope">
+              >
+              </el-image>
+            </div>
+            <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+            <!--<img class="head" :src="scope.row.Head" alt="" height="51" width="51" v-if="scope.row.Head">-->
+            <!--<img class="head" src="../assets/img/nav/head.png" height="51" width="51" v-else/>-->
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Name"
+            label="会员名"
+            width="90"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="Phone"
+            label="手机号"
+            width="120"
+            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="OrderTime"
-                        label="预约时间"
-                        :formatter="filterFmtDate"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="RemainTotalhour"
-                        label="剩余课时"
-                        width="110"
-                        sortable
-                >
-                </el-table-column>
-                <el-table-column
-                        prop="group_no"
-                        label="队伍"
-                        width="140"
-                        v-if="ClassType == 2"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <el-select v-model="scope.row.group_no"
-                                   filterable
-                                   :disabled="FinishClass == 2 && scope.row.DpId != 0"
-                                   placeholder="请选团队">
-                            <el-option
-                                    v-for="item in panel.groupList"
-                                    :key="item.value"
-                                    :label="item.label"
-                                    :value="item.value">
-                            </el-option>
-                        </el-select>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="BindId"
-                        label="心率带"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <el-select v-model="scope.row.BindId"
-                                   @change="bindSensorToUser(scope.row)"
-                                   @focus="getSelectHrSensors(scope.row)"
-                                   filterable
-                                   v-if="!scope.row.BindId" placeholder="请选心率带">
-                            <el-option
-                                    v-for="item in panel.bindList"
-                                    :key="item.index"
-                                    :label="item.label"
-                                    :value="item.HrId">
-                            </el-option>
-                        </el-select>
+                              :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="OrderTime"
+            label="预约时间"
+            :formatter="filterFmtDate"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="RemainTotalhour"
+            label="剩余课时"
+            width="110"
+            sortable
+        >
+        </el-table-column>
+        <el-table-column
+            prop="group_no"
+            label="队伍"
+            width="140"
+            v-if="ClassType == 2"
+            sortable
+        >
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.group_no"
+                       filterable
+                       :disabled="FinishClass == 2 && scope.row.DpId != 0"
+                       placeholder="请选团队">
+              <el-option
+                  v-for="item in panel.groupList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+              </el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="BindId"
+            label="心率带"
+            sortable
+        >
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.BindId"
+                       @change="bindSensorToUser(scope.row)"
+                       @focus="getSelectHrSensors(scope.row)"
+                       filterable
+                       v-if="!scope.row.BindId" placeholder="请选心率带">
+              <el-option
+                  v-for="item in panel.bindList"
+                  :key="item.index"
+                  :label="item.label"
+                  :value="item.HrId">
+              </el-option>
+            </el-select>
 
-                        <el-button @click="takeBack(scope.row)" type="danger" v-if="scope.row.BindId"
-                                   icon="el-icon-cpu">
-                            {{scope.row.Sn}}
-                            设备收回
-                        </el-button>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        width="110"
-                        sortable
-                >
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1">预约上课 </span>
-                        <span v-if="scope.row.Status == 2">预约未到</span>
-                        <span v-if="scope.row.Status == 3">上课未预约</span>
-                    </template>
-                </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="操作"
-                >
-                    <template slot-scope="scope">
-                        <div v-if="scope.row.DpId <= 0">
-                            <el-button type="primary" round v-if="scope.row.Status == 1 " size="mini"
-                                       @click="pauseRow(scope.row,2)">
-                                预约未到
-                            </el-button>
-                            <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"
-                                       @click="pauseRow(scope.row,1)">
-                                上课
-                            </el-button>
-                            <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
-                                       @click="getClassOverDetailDel(scope.row)">
-                                删除
-                            </el-button>
-                            <em v-if="FinishClass != 3">
-                                <el-button type="warning" round
-                                           v-if="scope.row.Status == 1 || scope.row.Status == 3 && FinishClass == 2 "
-                                           size="mini"
-                                           :disabled="scope.row.HrSubmitFlag == 1"
-                                           @click="getClassDetailAndSnAdd(scope.row)">
-                                    提交
-                                </el-button>
-                            </em>
-                        </div>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination
-                    background
-                    :total="pageination.total"
-                    :page-size="pageination.pageItem"
-                    @current-change="pageChange"
-            ></el-pagination>
-        </div>
-        <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="650px">
-            <div class="dialogContent viplist">
-                <span class="blueTitle">{{ClassName}} {{BeginTime}}</span>
-                <div>
-                    <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
-                                 :titles="['会员列表', '已添加会员']"></el-transfer>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
-                <el-button size="small" @click="dialogVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
-        <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
-            <div class="dialogContent">
-                <span class="blueTitle">{{ClassName}} {{BeginTime}}</span>
-                <div>
-                    <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"-->
-                    <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
-                    <p>
-                        您是否确认下课?
-                        <br>
-                        <br>
-                        (确定后将不可再编辑上课学员的信息)
-                    </p>
-                    <br>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" @click="confirmClassFinish">确定</el-button>
-                <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
+            <el-button @click="takeBack(scope.row)" type="danger" v-if="scope.row.BindId"
+                       icon="el-icon-cpu">
+              {{ scope.row.Sn }}
+              设备收回
+            </el-button>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="状态"
+            width="110"
+            sortable
+        >
+          <template slot-scope="scope">
+            <span v-if="scope.row.Status == 1">预约上课 </span>
+            <span v-if="scope.row.Status == 2">预约未到</span>
+            <span v-if="scope.row.Status == 3">上课未预约</span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="Status"
+            label="操作"
+        >
+          <template slot-scope="scope">
+            <div v-if="scope.row.DpId <= 0">
+              <el-button type="primary" round v-if="scope.row.Status == 1 " size="mini"
+                         @click="pauseRow(scope.row,2)">
+                预约未到
+              </el-button>
+              <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"
+                         @click="pauseRow(scope.row,1)">
+                上课
+              </el-button>
+              <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
+                         @click="getClassOverDetailDel(scope.row)">
+                删除
+              </el-button>
+              <em v-if="FinishClass != 3">
+                <el-button type="warning" round
+                           v-if="scope.row.Status == 1 || scope.row.Status == 3 && FinishClass == 2 "
+                           size="mini"
+                           :disabled="scope.row.HrSubmitFlag == 1"
+                           @click="getClassDetailAndSnAdd(scope.row)">
+                  提交
+                </el-button>
+              </em>
             </div>
-        </el-dialog>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination
+          background
+          :total="pageination.total"
+          :page-size="pageination.pageItem"
+          @current-change="pageChange"
+      ></el-pagination>
     </div>
+    <el-dialog title="添加上课会员" :visible.sync="dialogVisible" width="650px">
+      <div class="dialogContent viplist">
+        <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+        <div>
+          <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"
+                       :titles="['会员列表', '已添加会员']"></el-transfer>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" @click="confirmMember">确定</el-button>
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="确认下课" :visible.sync="dialogFinishVisible" width="650px">
+      <div class="dialogContent">
+        <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+        <div>
+          <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachdata"-->
+          <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
+          <p>
+            您是否确认下课?
+            <br>
+            <br>
+            (确定后将不可再编辑上课学员的信息)
+          </p>
+          <br>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" @click="confirmClassFinish">确定</el-button>
+        <el-button size="small" @click="dialogFinishVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
 
-    import Global from '../Global.js'
-    import {
-        ClassDetailQuery,
-        ClassOverDetailListQuery,
-        VipUserSimpleQuery,
-        ClassOverDetailAdd,
-        ClassDetailAndSnAdd,
-        ClassOverDetailStatusEdit,
-        ClassOverDetailDel,
-        SelectHrSensors,
-        BindHrSensorsToUser,
-        UnBindHrSensorsToUser,
-        ClassStartConfirm,
-        ShopManagerListQuery,
-        ClassOverConfirm,
-    } from "../api/getApiRes";
+import Global from '../Global.js'
+import {
+  ClassDetailQuery,
+  ClassOverDetailListQuery,
+  VipUserSimpleQuery,
+  ClassOverDetailAdd,
+  ClassDetailAndSnAdd,
+  ClassOverDetailStatusEdit,
+  ClassOverDetailDel,
+  SelectHrSensors,
+  BindHrSensorsToUser,
+  UnBindHrSensorsToUser,
+  ClassStartConfirm,
+  ShopManagerListQuery,
+  ClassOverConfirm,
+} from "../api/getApiRes";
 
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                serachBtnStatus: false,
-                BeginState: true,//确认上课
-                tableData: [],
-                title: '',
-                ClassType: 0,
-                PkNum: 0,
-                ClassStateText: '',
-                FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
-                dialogVisible: false,//添加下课会员
-                dialogFinishVisible: false,//确认下课dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//会员课程
-                dialogTitle: '新增会员',
-                current: getNowDate(),
-                dialogValue: [],
-                dialogCoachValue: [],
-                BeginTime: '',
-                ClassName: '',
-                // panel 配置项目
-                panel: {
-                    name: '',
-                    phone: '',
-                    usercode: '',
-                    username: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    bindList: [
-                        {
-                            value: 0,
-                            HrId: 0,
-                            label: "请选择心率带",
-                            InVenueNo: 0,
-                            index: 0
-                        }
-                    ],
-                    groupList: [
-                        {label: '红队', value: 1},
-                        {label: '蓝队', value: 2},
-                        {label: '黄队', value: 3}
-                    ],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    BeginTime: '',
-                    ClassName: '',
-                    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(),
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    coach: '',
-                    coachOptions: [],
-                    shopId: '',
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    expTime: '',
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                    dialogCoachdata: [],//穿梭已选
-                },
-                memberTypes: [
-                    {value: 1, label: '年会员'},
-                    {value: 2, label: '充值会员'},
-                ],
-                pageination: {
-                    pageItem: 100,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-            // this.getSelectHrSensors();
-            this.ClassType = this.$route.query.ClassType;
-            this.PkNum = this.$route.query.PkNum;
-            this.FinishClass = this.$route.query.FinishClass;
-            this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
-        },
-        methods: {
-            // 请选心率带
-            bindSensorToUser(row) {
-                let that = this;
-                let obj = {};
-                // 未到用户不能绑心率带
-                if (row.Status == 2) {
-                    row.BindId = 0;
-                    that.$message.error("会员未到不能绑定心率带");
-                    return false
-                }
-                obj = this.panel.bindList.find((item) => {
-                    return item.HrId === row.BindId;
-                });
-                // let oldSn = row.BindId == 0 ? row.Sn : '';
-                let oldSn = "";
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    cfId: row.CfId,
-                    userId: row.UserId,
-                    sn: obj.Sn,
-                    hrId: row.BindId,
-                };
-                let postdata = qs.stringify(param);
-                BindHrSensorsToUser(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '心率带绑定成功!',
-                            type: 'success'
-                        });
-                        // table 重载
-                        that.getTableQuery();
-                        // 重置心率带可选列表
-                        // that.getSelectHrSensors();
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设备回收
-            takeBack(row) {
-                let that = this;
-                let text = "";
-                if (this.$route.query.FinishClass == 2) {
-                    text = '当前上课种是否回收用户' + row.Name + '的心率设备?(回收将重置用户的上课成绩)'
-                } else {
-                    text = '是否回收用户' + row.Name + '的心率设备?'
-                }
-                this.$confirm(text, '回收操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        cfId: row.CfId,
-                        bindId: row.BindId,
-                        userId: row.UserId,
-                        sn: row.Sn,
-                    };
-                    let postdata = qs.stringify(param);
-                    UnBindHrSensorsToUser(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: '心率带' + row.Sn + '回收成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                            // 重置心率带可选列表
-                            // that.getSelectHrSensors();
-                        } else {
-                            that.$message.error(json.Memo + '错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消回收'
-                    });
-                });
-            },
-            // 确认下课
-            addFinish() {
-                this.clearForm();
-                // 重新获得教练名单
-                this.getCoachOption();
-                this.dialogFinishVisible = true;
-                this.btnType = 0;
-                this.dialogTitle = '确认下课'
-            },
-            // 获取教练选项
-            getCoachOption() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    name: this.panel.name,//
-                    phone: this.panel.phone,//
-                    shopId: localStorage.ShopId,//
-                    adminType: 4,//
-                    start: 1,//
-                    tableMax: 299,//
-                };
-                let postdata = qs.stringify(param);
-                ShopManagerListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认下课
-            confirmClassFinish() {
-                let that = this;
-                // checkNum
-                let userlist = that.dialogCoachValue.toString();
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    teacherList: userlist
-                };
-                let postdata = qs.stringify(param);
-                // 下课记录详情添加
-                ClassOverConfirm(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogFinishVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '当前课程已确认下课!',
-                            type: 'success'
-                        });
-                        // 返回下课列表
-                        // that.$router.push({path: '/finish'});
-                        this.$router.go(-1);
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认上课
-            confirmBegin() {
-                let that = this;
-                // 没绑心率带不能开课,预约未到的不管他
-                for (var i = 0; i < this.tableData.length; i++) {
-                    if (this.tableData[i].BindId == 0 && this.tableData[i].Status != 2) {
-                        that.$message.error("会员" + this.tableData[i].Name + '没绑心率带,不能开课');
-                        return false
-                    }
-                }
-                let duRs = [];
-                // "sn":"10001",//心率带
-                // "group_no":0,// 0不分队 1蓝队 2红队 3黄队
-                // "begin_time":1605686788,//开始上课时间戳
-                // "name":"张三",
-                // "head":"http://192.168.0.2/lhs.png",
-                // "static_hr":100,
-                // "sex":1,//性别
-                // "height":176,
-                // "age":40,
-                // "user_id":50,
-                // "weight":1000
-                let row;
-                let begin_time = parseInt(new Date().valueOf() / 1000);
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      serachBtnStatus: false,
+      BeginState: true,//确认上课
+      tableData: [],
+      title: '',
+      ClassType: 0,
+      PkNum: 0,
+      ClassStateText: '',
+      FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
+      dialogVisible: false,//添加下课会员
+      dialogFinishVisible: false,//确认下课dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//会员课程
+      dialogTitle: '新增会员',
+      current: getNowDate(),
+      dialogValue: [],
+      dialogCoachValue: [],
+      BeginTime: '',
+      ClassName: '',
+      // panel 配置项目
+      panel: {
+        name: '',
+        phone: '',
+        usercode: '',
+        username: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        bindList: [
+          {
+            value: 0,
+            HrId: 0,
+            label: "请选择心率带",
+            InVenueNo: 0,
+            index: 0
+          }
+        ],
+        groupList: [
+          {label: '红队', value: 1},
+          {label: '蓝队', value: 2},
+          {label: '黄队', value: 3}
+        ],
+        multipleSelection: [],
+        detectedmac: '',
+        BeginTime: '',
+        ClassName: '',
+        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(),
+      },
+      form: {
+        name: '',
+        userCode: '',
+        coach: '',
+        coachOptions: [],
+        shopId: '',
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        expTime: '',
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+        dialogCoachdata: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年会员'},
+        {value: 2, label: '充值会员'},
+      ],
+      pageination: {
+        pageItem: 100,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+    // this.getSelectHrSensors();
+    this.ClassType = this.$route.query.ClassType;
+    this.PkNum = this.$route.query.PkNum;
+    this.FinishClass = this.$route.query.FinishClass;
+    this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
+  },
+  methods: {
+    // 请选心率带
+    bindSensorToUser(row) {
+      let that = this;
+      let obj = {};
+      // 未到用户不能绑心率带
+      if (row.Status == 2) {
+        row.BindId = 0;
+        that.$message.error("会员未到不能绑定心率带");
+        return false
+      }
+      obj = this.panel.bindList.find((item) => {
+        return item.HrId === row.BindId;
+      });
+      // let oldSn = row.BindId == 0 ? row.Sn : '';
+      let oldSn = "";
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        cfId: row.CfId,
+        userId: row.UserId,
+        sn: obj.Sn,
+        hrId: row.BindId,
+      };
+      let postdata = qs.stringify(param);
+      BindHrSensorsToUser(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '心率带绑定成功!',
+            type: 'success'
+          });
+          // table 重载
+          that.getTableQuery();
+          // 重置心率带可选列表
+          // that.getSelectHrSensors();
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    // 设备回收
+    takeBack(row) {
+      let that = this;
+      let text = "";
+      if (this.$route.query.FinishClass == 2) {
+        text = '当前上课种是否回收用户' + row.Name + '的心率设备?(回收将重置用户的上课成绩)'
+      } else {
+        text = '是否回收用户' + row.Name + '的心率设备?'
+      }
+      this.$confirm(text, '回收操作', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let param = {
+          token: localStorage.token,
+          cfId: row.CfId,
+          bindId: row.BindId,
+          userId: row.UserId,
+          sn: row.Sn,
+        };
+        let postdata = qs.stringify(param);
+        UnBindHrSensorsToUser(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            that.$message({
+              showClose: true,
+              message: '心率带' + row.Sn + '回收成功!',
+              type: 'success'
+            });
+            // table 重载
+            that.getTableQuery();
+            // 重置心率带可选列表
+            // that.getSelectHrSensors();
+          } else {
+            that.$message.error(json.Memo + '错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消回收'
+        });
+      });
+    },
+    // 确认下课
+    addFinish() {
+      this.clearForm();
+      // 重新获得教练名单
+      this.getCoachOption();
+      this.dialogFinishVisible = true;
+      this.btnType = 0;
+      this.dialogTitle = '确认下课'
+    },
+    // 获取教练选项
+    getCoachOption() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        name: this.panel.name,//
+        phone: this.panel.phone,//
+        shopId: localStorage.ShopId,//
+        adminType: 4,//
+        start: 1,//
+        tableMax: 299,//
+      };
+      let postdata = qs.stringify(param);
+      ShopManagerListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认下课
+    confirmClassFinish() {
+      let that = this;
+      // checkNum
+      let userlist = that.dialogCoachValue.toString();
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        teacherList: userlist
+      };
+      let postdata = qs.stringify(param);
+      // 下课记录详情添加
+      ClassOverConfirm(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogFinishVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '当前课程已确认下课!',
+            type: 'success'
+          });
+          // 返回下课列表
+          // that.$router.push({path: '/finish'});
+          this.$router.go(-1);
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认上课
+    confirmBegin() {
+      let that = this;
+      // 没绑心率带不能开课,预约未到的不管他
+      for (var i = 0; i < this.tableData.length; i++) {
+        if (this.tableData[i].BindId == 0 && this.tableData[i].Status != 2) {
+          that.$message.error("会员" + this.tableData[i].Name + '没绑心率带,不能开课');
+          return false
+        }
+      }
+      let duRs = [];
+      // "sn":"10001",//心率带
+      // "group_no":0,// 0不分队 1蓝队 2红队 3黄队
+      // "begin_time":1605686788,//开始上课时间戳
+      // "name":"张三",
+      // "head":"http://192.168.0.2/lhs.png",
+      // "static_hr":100,
+      // "sex":1,//性别
+      // "height":176,
+      // "age":40,
+      // "user_id":50,
+      // "weight":1000
+      let row;
+      let begin_time = parseInt(new Date().valueOf() / 1000);
 
-                // 过滤未到会员
-                let curPeolle = this.tableData.filter(item => {
-                    if (item.Status != 2) {
-                        return item
-                    }
-                });
+      // 过滤未到会员
+      let curPeolle = this.tableData.filter(item => {
+        if (item.Status != 2) {
+          return item
+        }
+      });
 
-                // 拼装上课人员信息
-                for (var i = 0; i < curPeolle.length; i++) {
-                    row = curPeolle[i];
-                    // 过滤预约未到
-                    duRs[i] = {
-                        sn: row.Sn,
-                        group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
-                        begin_time: begin_time,
-                        name: row.Name,
-                        head: row.Head,
-                        static_hr: row.StaticHr,
-                        sex: row.Sex,
-                        height: row.Height,
-                        age: row.Age,
-                        user_id: row.UserId,
-                        weight: row.Weight,
-                        user_md5: row.UserMd5,
-                        birthday: row.Birthday,
-                    }
-                }
-                // 确认上课
-                this.getClassStartConfirm(duRs);
-            },
-            // 确认上课
-            getClassStartConfirm(duRs) {
-                duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    duRs: duRs
-                };
-                let postdata = qs.stringify(param);
-                ClassStartConfirm(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '确认上课成功!',
-                            type: 'success'
-                        });
+      // 拼装上课人员信息
+      for (var i = 0; i < curPeolle.length; i++) {
+        row = curPeolle[i];
+        // 过滤预约未到
+        duRs[i] = {
+          sn: row.Sn,
+          group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
+          begin_time: begin_time,
+          name: row.Name,
+          head: row.Head,
+          static_hr: row.StaticHr,
+          sex: row.Sex,
+          height: row.Height,
+          age: row.Age,
+          user_id: row.UserId,
+          weight: row.Weight,
+          user_md5: row.UserMd5,
+          birthday: row.Birthday,
+        }
+      }
+      // 确认上课
+      this.getClassStartConfirm(duRs);
+    },
+    // 确认上课
+    getClassStartConfirm(duRs) {
+      duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        duRs: duRs
+      };
+      let postdata = qs.stringify(param);
+      ClassStartConfirm(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '确认上课成功!',
+            type: 'success'
+          });
 
-                        // 返回课程管理
-                        that.$router.push({
-                            path: '/courses', query: {}
-                        });
-                        // that.FinishClass = 2;
-                        // that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
-            },
-            // 添加下课会员
-            addFinishMember() {
-                let that = this;
-                this.clearForm();
-                this.getClassVipuserQuery();
-                this.dialogValue = [];
-                let std = [];
-                if (this.tableData) {
-                    this.tableData.map(function (item) {
-                        std.push(item.UserId)
-                    })
-                }
-                that.dialogValue = std;
-                this.dialogVisible = true
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.dialogCoachValue = [];
-            },
-            // 获取本课程下的会员列表
-            getClassVipuserQuery() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    // classId: this.$route.query.classId,
-                };
-                let postdata = qs.stringify(param);
-                // ClassVipuserQuery(postdata).then(res => {
-                VipUserSimpleQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // that.form.dialogdata = turnResToOptionByViper(json.Rs);
-                        that.form.dialogdata = turnResToOptionBySimViper(json.Rs);
-                        console.log(that.form.dialogdata);
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交下课会员
-            confirmMember() {
-                let that = this;
-                // checkNum
-                let userlist = that.dialogValue.toString();
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    userlist: userlist
-                };
-                let postdata = qs.stringify(param);
-                // 下课记录详情添加
-                ClassOverDetailAdd(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);
-                    }
-                })
-            },
-            pauseRow(row, status) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    cfId: row.CfId,
-                    status: status,
-                };
-                let postdata = qs.stringify(param);
-                ClassOverDetailStatusEdit(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);
-                    }
-                })
-            },
-            // 下课记录详情删除
-            getClassOverDetailDel(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: row.StdId,
-                    cfId: row.CfId,
-                };
-                this.$confirm('是否删除用户  ' + row.Name + '?', '提示', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let postdata = qs.stringify(param);
-                    ClassOverDetailDel(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: '已取消删除'
-                    });
-                });
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                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('查询完毕');
-            },
-            goBack() {
-                this.$router.push({
-                    path: '/courses', query: {}
-                });
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                that.BeginState = true;
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    start: 1,//
-                    tableMax: 9999,//
-                };
-                let postdata = qs.stringify(param);
-                ClassOverDetailListQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            // 没人不允许开课
-                            if (json.Rs.length > 0) {
-                                // 全部预约 都是未到也不允许开课
-                                json.Rs.map(function (item) {
-                                    // 只要有一个不是就放开
-                                    if (item.Status != 2) {
-                                        that.BeginState = false;
-                                    }
-                                });
-                            }
-
-                            // 分队处理
-                            // 未上课的分队,已上课的旧的不处理,新人需要处理
-                            if (that.FinishClass == 3) {
-                                if (that.ClassType == 2) {
-                                    that.TurnUnit(json.Rs);
-                                } else {
-                                    json.Rs.map(function (item) {
-                                        item.group_no = item.GroupNo;
-                                    })
-                                }
-                            } else {
-                                // 已上课的状态
-                                json.Rs.map(function (item, i) {
-                                    if (that.ClassType == 2) {
-                                        if (item.GroupNo == 0) {
-                                            item.group_no = i % that.PkNum + 1;
-                                        } else {
-                                            item.group_no = item.GroupNo;
-                                        }
-                                    } else {
-                                        item.group_no = item.GroupNo;
-                                    }
-                                });
-                            }
-                            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);
-                    }
-                })
-            },
-            // 分队
-            TurnUnit(Rs) {
-                let that = this;
-                // 分拆2队
-                if (that.PkNum == 2) {
-                    Rs.map(function (item, t) {
-                        item.group_no = t % 2 + 1;
-                    })
+          // 返回课程管理
+          that.$router.push({
+            path: '/courses', query: {}
+          });
+          // that.FinishClass = 2;
+          // that.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    // 添加下课会员
+    addFinishMember() {
+      let that = this;
+      this.clearForm();
+      this.getClassVipuserQuery();
+      this.dialogValue = [];
+      let std = [];
+      if (this.tableData) {
+        this.tableData.map(function (item) {
+          std.push(item.UserId)
+        })
+      }
+      that.dialogValue = std;
+      this.dialogVisible = true
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.dialogCoachValue = [];
+    },
+    // 获取本课程下的会员列表
+    getClassVipuserQuery() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        // classId: this.$route.query.classId,
+      };
+      let postdata = qs.stringify(param);
+      // ClassVipuserQuery(postdata).then(res => {
+      VipUserSimpleQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // that.form.dialogdata = turnResToOptionByViper(json.Rs);
+          that.form.dialogdata = turnResToOptionBySimViper(json.Rs);
+          console.log(that.form.dialogdata);
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交下课会员
+    confirmMember() {
+      let that = this;
+      // checkNum
+      let userlist = that.dialogValue.toString();
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        userlist: userlist
+      };
+      let postdata = qs.stringify(param);
+      // 下课记录详情添加
+      ClassOverDetailAdd(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);
+        }
+      })
+    },
+    pauseRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        cfId: row.CfId,
+        status: status,
+      };
+      let postdata = qs.stringify(param);
+      ClassOverDetailStatusEdit(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);
+        }
+      })
+    },
+    // 下课记录详情删除
+    getClassOverDetailDel(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: row.StdId,
+        cfId: row.CfId,
+      };
+      this.$confirm('是否删除用户  ' + row.Name + '?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let postdata = qs.stringify(param);
+        ClassOverDetailDel(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: '已取消删除'
+        });
+      });
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      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('查询完毕');
+    },
+    goBack() {
+      this.$router.push({
+        path: '/courses', query: {}
+      });
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      that.BeginState = true;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        start: 1,//
+        tableMax: 9999,//
+      };
+      let postdata = qs.stringify(param);
+      ClassOverDetailListQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            // 没人不允许开课
+            if (json.Rs.length > 0) {
+              // 全部预约 都是未到也不允许开课
+              json.Rs.map(function (item) {
+                // 只要有一个不是就放开
+                if (item.Status != 2) {
+                  that.BeginState = false;
                 }
+              });
+            }
 
-                // 分拆3队
-                if (that.PkNum == 3) {
-                    Rs.map(function (item, t) {
-                        item.group_no = t % 3 + 1;
-                    })
-                }
-            },
-            // 获取心率带下拉菜单
-            getSelectHrSensors(row) {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    userId: row.UserId,
-                };
-                let postdata = qs.stringify(param);
-                SelectHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.panel.bindList = json.Rs;
-                            let HrTypeText = "";
-                            json.Rs.map(function (item, i) {
-                                HrTypeText = item.HrType == 1 ? "(私有)" : "";
-                                item.label = "Sn:" + item.Sn + HrTypeText;
-                                item.index = i + 1;
-                            });
-                            that.panel.bindList.push({
-                                value: 0,
-                                HrId: 0,
-                                label: "请选择心率带",
-                                InVenueNo: 0
-                            });
-                        } else {
-                            that.panel.bindList = [];
-                        }
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
+            // 分队处理
+            // 未上课的分队,已上课的旧的不处理,新人需要处理
+            if (that.FinishClass == 3) {
+              if (that.ClassType == 2) {
+                that.TurnUnit(json.Rs);
+              } else {
+                json.Rs.map(function (item) {
+                  item.group_no = item.GroupNo;
                 })
-            },
-            // 设置分页数据
-            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 {
+              // 已上课的状态
+              json.Rs.map(function (item, i) {
+                if (that.ClassType == 2) {
+                  if (item.GroupNo == 0) {
+                    item.group_no = i % that.PkNum + 1;
+                  } else {
+                    item.group_no = item.GroupNo;
+                  }
                 } else {
-                    return nonTfmtDate(column, 11);
-                }
-            },
-            // 提交单人
-            getClassDetailAndSnAdd(row) {
-                let begin_time = parseInt(new Date().valueOf() / 1000);
-                let duRs = [];
-                if (!row.Sn) {
-                    this.$message.error(row.Name + '没有绑定心率带');
-                    return false
+                  item.group_no = item.GroupNo;
                 }
-                // 拼装上课人员信息
-                duRs[0] = {
-                    sn: row.Sn,
-                    group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
-                    begin_time: begin_time,
-                    name: row.Name,
-                    head: row.Head,
-                    static_hr: row.StaticHr,
-                    sex: row.Sex,
-                    height: row.Height,
-                    age: row.Age,
-                    user_id: row.UserId,
-                    weight: row.Weight,
-                    user_md5: row.UserMd5,
-                    birthday: row.Birthday,
-                };
-                duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    stdId: this.$route.query.StdId,
-                    duRs: duRs
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailAndSnAdd(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '提交成功!',
-                            type: 'success'
-                        });
-                        this.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + '错误码:' + json.Code);
-                    }
-                })
+              });
             }
-        },
-        watch: {
-            $route(to) {
-                if (to.name == 'courseEdit') {
-                    this.getTableQuery();
-                    this.FinishClass = this.$route.query.FinishClass;
-                    this.ClassType = this.$route.query.ClassType;
-                    this.PkNum = this.$route.query.PkNum;
+            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);
+        }
+      })
+    },
+    // 分队
+    TurnUnit(Rs) {
+      let that = this;
+      // 分拆2队
+      if (that.PkNum == 2) {
+        Rs.map(function (item, t) {
+          item.group_no = t % 2 + 1;
+        })
+      }
 
-                    this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
-                }
-            },
-            FinishClass(to) {
-                switch (parseInt(to)) {
-                    case 1:
-                        this.ClassStateText = "已下课";
-                        break;
-                    case 2:
-                        this.ClassStateText = "已上课";
-                        break;
-                    case 3:
-                        this.ClassStateText = "准备上课";
-                        break;
-                }
-            },
-            PkNum(to) {
-                let that = this;
-                console.log(to);
-                if (to == 2) {
-                    that.panel.groupList = [
-                        {label: '红队', value: 1},
-                        {label: '蓝队', value: 2},
-                    ]
-                } else {
-                    that.panel.groupList = [
-                        {label: '红队', value: 1},
-                        {label: '蓝队', value: 2},
-                        {label: '黄队', value: 3}
-                    ]
-                }
-            }
-        },
+      // 分拆3队
+      if (that.PkNum == 3) {
+        Rs.map(function (item, t) {
+          item.group_no = t % 3 + 1;
+        })
+      }
+    },
+    // 获取心率带下拉菜单
+    getSelectHrSensors(row) {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        userId: row.UserId,
+      };
+      let postdata = qs.stringify(param);
+      SelectHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.panel.bindList = json.Rs;
+            let HrTypeText = "";
+            json.Rs.map(function (item, i) {
+              HrTypeText = item.HrType == 1 ? "(私有)" : "";
+              item.label = "Sn:" + item.Sn + HrTypeText;
+              item.index = i + 1;
+            });
+            that.panel.bindList.push({
+              value: 0,
+              HrId: 0,
+              label: "请选择心率带",
+              InVenueNo: 0
+            });
+          } else {
+            that.panel.bindList = [];
+          }
+        } 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 nonTfmtDate(column, 11);
+      }
+    },
+    // 提交单人
+    getClassDetailAndSnAdd(row) {
+      let begin_time = parseInt(new Date().valueOf() / 1000);
+      let duRs = [];
+      if (!row.Sn) {
+        this.$message.error(row.Name + '没有绑定心率带');
+        return false
+      }
+      // 拼装上课人员信息
+      duRs[0] = {
+        sn: row.Sn,
+        group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
+        begin_time: begin_time,
+        name: row.Name,
+        head: row.Head,
+        static_hr: row.StaticHr,
+        sex: row.Sex,
+        height: row.Height,
+        age: row.Age,
+        user_id: row.UserId,
+        weight: row.Weight,
+        user_md5: row.UserMd5,
+        birthday: row.Birthday,
+      };
+      duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        duRs: duRs
+      };
+      let postdata = qs.stringify(param);
+      ClassDetailAndSnAdd(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '提交成功!',
+            type: 'success'
+          });
+          this.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + '错误码:' + json.Code);
+        }
+      })
+    },
+    tableRowClassName({row, rowIndex}) {
+      if (row.group_no == 1) {
+        return 'red-row';
+      } else if (row.group_no == 2) {
+        return 'blue-row';
+      } else if (row.group_no == 3) {
+        return 'yellow-row';
+      }
+      return '';
+    }
+  },
+  watch: {
+    $route(to) {
+      if (to.name == 'courseEdit') {
+        this.getTableQuery();
+        this.FinishClass = this.$route.query.FinishClass;
+        this.ClassType = this.$route.query.ClassType;
+        this.PkNum = this.$route.query.PkNum;
+
+        this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
+      }
+    },
+    FinishClass(to) {
+      switch (parseInt(to)) {
+        case 1:
+          this.ClassStateText = "已下课";
+          break;
+        case 2:
+          this.ClassStateText = "已上课";
+          break;
+        case 3:
+          this.ClassStateText = "准备上课";
+          break;
+      }
+    },
+    PkNum(to) {
+      let that = this;
+      console.log(to);
+      if (to == 2) {
+        that.panel.groupList = [
+          {label: '红队', value: 1},
+          {label: '蓝队', value: 2},
+        ]
+      } else {
+        that.panel.groupList = [
+          {label: '红队', value: 1},
+          {label: '蓝队', value: 2},
+          {label: '黄队', value: 3}
+        ]
+      }
     }
+  },
+}
 </script>
 
 <style scoped>
-    @import "../assets/css/panel.css";
+@import "../assets/css/panel.css";
 
-    .context {
-        height: 770px;
-        overflow-y: scroll;
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
+.context {
+  height: 770px;
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
 
-    .classNames {
-        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-top: 15px;
-        margin-bottom: 3px;
-        float: left;
-        padding-left: 10px;
-        padding-right: 10px;
-    }
+.classNames {
+  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-top: 15px;
+  margin-bottom: 3px;
+  float: left;
+  padding-left: 10px;
+  padding-right: 10px;
+}
 
-    .head {
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        border-radius: 250px;
-    }
+.head {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  border-radius: 250px;
+}
 
-    .panel_control {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
+.panel_control {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
 
-    /*.panel-body {*/
-    .panel_control {
-        padding: 20px;
-        background: #F0F2F5;
-    }
+/*.panel-body {*/
+.panel_control {
+  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;
+}
 
-    .lessons {
-        padding: 1px 7px;
-        border-radius: 250px;
-        float: left;
-        color: #000;
-    }
+.lessons {
+  padding: 1px 7px;
+  border-radius: 250px;
+  float: left;
+  color: #000;
+}
 
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        /*float: left;*/
-        left: 10%;
-    }
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  /*float: left;*/
+  left: 10%;
+}
 
-    /*/deep/ .el-checkbox  .el-checkbox {*/
-    /*margin-right: 1px;*/
-    /*}*/
-    /deep/ .el-checkbox__label span {
-        width: 100%;
-        white-space: nowrap;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        float: left;
-    }
+/*/deep/ .el-checkbox  .el-checkbox {*/
+/*margin-right: 1px;*/
+/*}*/
+/deep/ .el-checkbox__label span {
+  width: 100%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  float: left;
+}
 
-    .cell em {
-        margin-left: 5px;
-        margin-right: 5px;
-    }
+.cell em {
+  margin-left: 5px;
+  margin-right: 5px;
+}
 
-    /deep/ .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span {
-        width: 50px;
-        float: right;
-        right: 0;
-    }
+/deep/ .el-transfer-panel .el-transfer-panel__header .el-checkbox .el-checkbox__label span {
+  width: 50px;
+  float: right;
+  right: 0;
+}
+
+/deep/ .el-table .red-row {
+  background: #fb88c1;
+}
+
+/deep/ .el-table .blue-row {
+  background: #7099d0;
+}
+/deep/ .el-table .yellow-row {
+  background: #fbe56e;
+}
 </style>

+ 6 - 2
tv/README.md

@@ -110,7 +110,7 @@ https://segmentfault.com/a/1190000021281307
 ========================
 12/17
 
-1. 月、周卡路里总计火焰字体√ *没更新
+1. 月、周卡路里总计火焰字体√ 
 31.TV本地字典,针对不同的EQSN给出本店的转发服务器ip地址(定一下字段名的接口)√ *没更新
 getServeIpAddress
     parame{
@@ -123,6 +123,8 @@ getServeIpAddress
 
 
 
+
+
 =================================
 
 
@@ -130,8 +132,10 @@ getServeIpAddress
 9. 胜率显示从后台取胜率数据
 23.彩蛋和新学生接口可以合并 todo  
 29.首页界面和内页都给课程增加关课按钮
+3.PC端网络不好无法退出
+4.课程管理每次打开加入学生,没清理穿梭框
 
-
+* rem重构小飞龙
 
 
 

+ 3 - 3
tv/src/Global.js

@@ -7,9 +7,9 @@ companyInfo = {
 
 // headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
 // headapi = 'http://192.168.0.110:8080/';//从郑伟那里获得数据源
-headapi = '';//从郑伟那里获得数据源
-headapi = 'http://192.168.0.63:8080/';//从郑伟那里获得数据源
-// headapi = 'http://192.168.0.10:8080/';//实际场馆
+// headapi = '';//从郑伟那里获得数据源
+// headapi = 'http://192.168.0.63:8080/';//从郑伟那里获得数据源
+headapi = 'http://192.168.0.10:8080/';//实际场馆默认数据源
 
 // 七牛云imgsrc
 imgUrl = "http://qjzpcd34v.hb-bkt.clouddn.com";

+ 9 - 8
tv/src/Mock/index.js

@@ -118,16 +118,17 @@ let getUserList = function () {
 
 let testStudent = function (num, team) {
     let item = [];
+    let group = team == 2 ? "@integer(1, 2)":"@integer(1, 3)";
     for (var i = 0; i < num; i++) {
         item.push({
             Age: 13,
             AvgHr: 0,
             BeginTime: 1608188579,
-            Ck: 0.0020378087647259235,
+            Ck: "@integer(1, 99)",
             Cle: 0.10189043977055452,
             DuId: 119,
             EndTime: 0,
-            GroupNo: team,
+            GroupNo: group,
             Head: "http://192.168.0.2/gc.png",
             Height: 160,
             HrId: 41,
@@ -226,11 +227,11 @@ let CalorieStatsQuery = function () {
     let Rs = [
         {
             Title: '本<s>周</s>场馆卡路里总消耗',
-            Result: [{'Values': "@integer(7654321, 1)", Unite: '千卡'}],
+            Result: [{'Values': "@integer(888888, 1)", Unite: '千卡'}],
         },
         {
             Title: '本<s>周</s>场馆卡路里总消耗',
-            Result: [{'Values': "@integer(7654321, 1)", Unite: '千卡'}],
+            Result: [{'Values': "@integer(888888, 1)", Unite: '千卡'}],
         }
     ];
     return {
@@ -315,17 +316,17 @@ let getClassStat = function (ClassOn, dp) {
     };
 };
 
-let t = 0;//0 is on 1 is off
+let t = 1;//0 is on 1 is off
 if (t == 1) {
     // 列表测试
     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.10:8080/';
     // 学生列表
     Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 1));
     // 下课排名
-    Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(1, 2));
+    Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(6, 2));
     // 英雄榜
     Mock.mock(curheadapi + 'HerosRankingQuery', 'post', testHerosRankingQuery(1));
     // 卡路里排行榜
@@ -333,7 +334,7 @@ if (t == 1) {
     // 用户排行榜
     Mock.mock(curheadapi + 'UserRankingQuery', 'post', testStudent(1, 2));
     // 上课状态
-    Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
+    Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 2));
     // 新同学 0 999
     Mock.mock(curheadapi + 'getNewUser', 'post', getNewUser(999));
     // 彩蛋 0 999

+ 2 - 2
tv/src/components/sumNumber.vue

@@ -72,8 +72,8 @@
         /*flex: 1;*/
     }
     .imgContainer span em img {
-        width: 100%;
-        width: 1.1rem;
+        /*width: 100%;*/
+        width: 1.3rem;
         height: 2rem;
         overflow: hidden;
         display: block;

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

@@ -11,7 +11,7 @@
                         <em>{{redSum}}</em><i>Ck</i>
                     </span>
                     <span class="flagContainer">
-                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum >= blueSum">
+                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="parseFloat(redSum) >= parseFloat(blueSum)">
                     </span>
                     <span class="mineUniteName">
                         红队
@@ -23,7 +23,7 @@
                         蓝队
                     </span>
                     <span class="flagContainer">
-                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum <= blueSum">
+                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="parseFloat(redSum) <= parseFloat(blueSum)">
                     </span>
                     <span class="sumCK">
                         <em>{{blueSum}}</em><i>Ck</i>

+ 4 - 3
tv/src/views/Index.vue

@@ -44,7 +44,6 @@
             localStorage.eqSn = '30:9C:23:0C:8B:1E';
             localStorage.version = '1.1.0';
             this.getCurVersion();
-            // test
 
         },
         methods: {
@@ -86,7 +85,8 @@
                             // alert('clientWidth:' + document.documentElement.clientHeight);
                             // alert('devicePixelRatio:' + window.devicePixelRatio);
                             console.log('getDeviceInfo success: ' + JSON.stringify(e.uuid));
-                            // that.getServeIpAddress(e.uuid);
+                            // 正式版打开
+                            that.getServeIpAddress(e.uuid);
                         },
                         fail: function (e) {
                             console.log('getDeviceInfo failed: ' + JSON.stringify(e));
@@ -164,7 +164,7 @@
                 const that = this;
                 let url = 'http://cal.beswell.com:85/v1/Sensors/GetShopConfigParam';
                 // 测试 todo
-                url = "http://192.168.0.3:19096/v1/Sensors/GetShopConfigParam";
+                // url = "http://192.168.0.3:19096/v1/Sensors/GetShopConfigParam";
                 let param = {
                     eqSn : eqsn
                 };
@@ -175,6 +175,7 @@
                         headapi = json.Rs.DataServiceIP;
                     } else {
                         headapi = 'http://192.168.0.10:8080/';
+                        console.log(json.memo);
                         that.$message.error(json.memo);
                     }
                 }, function (response) {

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

@@ -190,7 +190,7 @@
         },
         methods: {
             init() {
-                console.log(headTest);
+                // console.log(headTest);
                 this.GetgetUserList();
                 this.createEgg();
                 this.createNewStudent();

部分文件因为文件数量过多而无法显示