Browse Source

0712Commit

zhengwei 4 years ago
parent
commit
446011dc70

+ 1 - 0
pc/package.json

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

+ 10 - 0
pc/src/api/Navs.js

@@ -70,6 +70,16 @@ let navs = [
 		grouplist: "2,5",
 		grouplist: "2,5",
 		icon: "el-icon-date",
 		icon: "el-icon-date",
 	},
 	},
+	{
+		clmid: "33",
+		clmcode: "",
+		clmname: "评分管理",
+		clmurl: "/ratingManage",
+		prname: "",
+		show: 3,
+		grouplist: "2,5",
+		icon: "el-icon-edit",
+	},
 	{
 	{
 		clmid: "8",
 		clmid: "8",
 		clmcode: "coach",
 		clmcode: "coach",

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

@@ -914,4 +914,66 @@ export function ClassHourChgQuery(postdata) {
     let url = headapi + 'v1/User/ClassHourChgQuery';
     let url = headapi + 'v1/User/ClassHourChgQuery';
     return getApiBasic(url, postdata);
     return getApiBasic(url, postdata);
 }
 }
-// 2021/03/12
+// 2021/03/12
+
+//Score组接口-2021/7/12
+//动作分组查询
+export function ActionGroupQuery(postdata) {
+    let url = headapi + 'v1/Score/ActionGroupQuery';
+    return getApiBasic(url, postdata);
+}
+//动作分组添加
+export function ActionGroupAdd(postdata) {
+    let url = headapi + 'v1/Score/ActionGroupAdd';
+    return getApiBasic(url, postdata);
+}
+//动作分组详情修改
+export function ActionGroupEdit(postdata) {
+    let url = headapi + 'v1/Score/ActionGroupEdit';
+    return getApiBasic(url, postdata);
+}
+//动作分组状态修改
+export function ActionGroupStatusEdit(postdata) {
+    let url = headapi + 'v1/Score/ActionGroupStatusEdit';
+    return getApiBasic(url, postdata);
+}
+//锻炼动作查询
+export function ExerciseActionQuery(postdata) {
+    let url = headapi + 'v1/Score/ExerciseActionQuery';
+    return getApiBasic(url, postdata);
+}
+//锻炼动作表添加
+export function ExerciseActionAdd(postdata) {
+    let url = headapi + 'v1/Score/ExerciseActionAdd';
+    return getApiBasic(url, postdata);
+}
+//锻炼动作修改
+export function ExerciseActionEdit(postdata) {
+    let url = headapi + 'v1/Score/ExerciseActionEdit';
+    return getApiBasic(url, postdata);
+}
+//修改锻炼动作状态
+export function ExerciseActionStatusEdit(postdata) {
+    let url = headapi + 'v1/Score/ExerciseActionStatusEdit';
+    return getApiBasic(url, postdata);
+}
+//查询身体节点
+export function BodyNodeQuery(postdata) {
+    let url = headapi + 'v1/Score/BodyNodeQuery';
+    return getApiBasic(url, postdata);
+}
+//添加身体节点
+export function BodyNodeAdd(postdata) {
+    let url = headapi + 'v1/Score/BodyNodeAdd';
+    return getApiBasic(url, postdata);
+}
+//修改身体节点
+export function BodyNodeEdit(postdata) {
+    let url = headapi + 'v1/Score/BodyNodeEdit';
+    return getApiBasic(url, postdata);
+}
+//修改身体节点状态
+export function BodyNodeStatusEdit(postdata) {
+    let url = headapi + 'v1/Score/BodyNodeStatusEdit';
+    return getApiBasic(url, postdata);
+}

+ 40 - 9
pc/src/router/index.js

@@ -3,17 +3,8 @@ import VueRouter from 'vue-router'
 // 加载条
 // 加载条
 import NProgress from 'nprogress'
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
 import 'nprogress/nprogress.css'
-import VueAMap from 'vue-amap';
 
 
 Vue.use(VueRouter);
 Vue.use(VueRouter);
-// Vue.use(VueAMap);
-
-// VueAMap.initAMapApiLoader({
-//     key: 'your amap key',
-//     plugin: ['AMap.Autocomplete', 'AMap.PlaceSearch', 'AMap.Scale', 'AMap.OverView', 'AMap.ToolBar', 'AMap.MapType', 'AMap.PolyEditor', 'AMap.CircleEditor'],
-//     // 默认高德 sdk 版本为 1.4.4
-//     v: '1.4.4'
-// });
 
 
 const routes = [
 const routes = [
     {
     {
@@ -158,6 +149,46 @@ const routes = [
                     // clmid: "9",
                     // clmid: "9",
                 }
                 }
             }, {
             }, {
+                path: '/ratingManage',
+                name: 'cost',
+                component: () => import('@/views/ActionGroups.vue'),
+                meta: {
+                    title: "动作分组",
+                    // clmid: "9",
+                }
+            },{
+                path: '/actionExercise',
+                name: 'cost',
+                component: () => import('@/views/ActionExercise.vue'),
+                meta: {
+                    title: "锻炼动作",
+                    // clmid: "9",
+                }
+            },{
+                path: '/bodyNode',
+                name: 'cost',
+                component: () => import('@/views/BodyNode.vue'),
+                meta: {
+                    title: "身体节点",
+                    // clmid: "9",
+                }
+            },{
+                path: '/actionScore',
+                name: 'cost',
+                component: () => import('@/views/ActionScore.vue'),
+                meta: {
+                    title: "动作评分",
+                    // clmid: "9",
+                }
+            },{
+                path: '/scoreResult',
+                name: 'cost',
+                component: () => import('@/views/ScoreResult.vue'),
+                meta: {
+                    title: "评分结果",
+                    // clmid: "9",
+                }
+            },{
                 path: '/setting',
                 path: '/setting',
                 name: 'setting',
                 name: 'setting',
                 component: () => import('@/views/setting.vue'),
                 component: () => import('@/views/setting.vue'),

+ 630 - 0
pc/src/views/ActionExercise.vue

@@ -0,0 +1,630 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>锻炼动作</h5>
+      <div class="likeTab">
+        <el-button @click="goType('ratingManage')" size="mini" type>动作分组</el-button>
+        <el-button @click="goType('actionExercise')" size="mini" type="primary" >锻炼动作</el-button>
+        <el-button @click="goType('bodyNode')" size="mini" type>身体节点</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="1">
+            <el-col :span="6" align="center">
+              <em>动作名称:</em>
+              <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
+            </el-col>
+            <el-col :span="6" align="center">
+              <em>动作标签:</em>
+              <el-input v-model="panel.tag" placeholder="请输入标签" type="text" style="width: 150px"/>
+            </el-col>
+            <el-col :span="3">
+              <em>状态:</em>
+              <!--status-->
+              <el-select v-model="panel.status" placeholder="请选择">
+                <el-option
+                    v-for="item in panel.statusOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <el-button size type="primary" @click="query" plain>查询</el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addAction" size="mini" type="primary" >新增动作</el-button>
+      <el-button @click="editAction" size="mini">编辑动作</el-button>
+      <el-button @click="deleteAction" size="mini" type="danger">删除动作</el-button>
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize
+                :default-sort="{ prop: 'date', order: 'descending' }" element-loading-background="rgba(0, 0, 0, 0.8)"
+                class @selection-change="handleSelectionChange" @current-change="clickChange">
+        >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row">
+              <i></i>
+            </el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" label="序号" align="center" width="60"/>
+        <el-table-column prop="EaName" label="动作名称" align="center" sortable/>
+        <el-table-column prop="EaTag" label="动作标签" align="center" sortable/>
+        <el-table-column prop="PicUrl" label="动作图片" width="50">
+          <template slot-scope="scope">
+            <div class="demo-image__preview" v-if="scope.row.PicUrl">
+              <el-image style="width: 25px; height: 25px" :src="scope.row.PicUrl"
+                        :preview-src-list="[scope.row.PicUrl]">
+              </el-image>
+            </div>
+            <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
+          </template>
+        </el-table-column>
+        <el-table-column prop="VideoURl" label="视频地址" align="center" sortable/>
+        <el-table-column prop="Memo" label="备注" align="center" sortable/>
+
+        <el-table-column prop="id" label="操作">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="manageAction(scope.row)">管理</el-button>
+            <el-button type="success" v-if="scope.row.Status == 8" size="mini" @click="enableRow(scope.row,1)">
+              启用
+            </el-button>
+            <el-button type="warning" v-if="scope.row.Status == 1" size="mini" @click="enableRow(scope.row,8)">
+              禁用
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br/>
+      <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+      ></el-pagination>
+    </div>
+
+    <el-dialog :title="dialogTitle" :visible.sync="addActionVisible" width="650px">
+      <div class="dialogContent">
+        <div class>
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="动作名称" :required="true">
+              <el-input v-model="form.name"/>
+            </el-form-item>
+            <el-form-item label="动作标签" :required="true">
+              <el-input v-model="form.tag"/>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"/>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddAction">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditAction">确定</el-button>
+        <el-button size="small" @click="addActionVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="dialogTitle" :visible.sync="associateNodeVisible" width="650px">
+      <div class="dialogContent">
+        <div class>
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="身体节点" :required="true">
+              <el-input v-model="form.name"/>
+            </el-form-item>
+            <el-form-item label="所占权重" :required="true">
+              <el-input v-model="form.tag"/>
+            </el-form-item>
+            <el-form-item label="默认分数">
+              <el-input v-model="form.memo"/>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddAction">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditAction">确定</el-button>
+        <el-button size="small" @click="addActionVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+
+  </div>
+</template>
+
+<script>
+import Global from '../Global.js'
+import {
+  GetHrSensorsPowerPercent,
+  ExerciseActionQuery,
+  ExerciseActionAdd,
+  ExerciseActionEdit,
+  ExerciseActionStatusEdit,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      activeName: 'comm',
+      dialogVisible: false,//其他dialog
+      addActionVisible: false,//新增动作分组弹窗
+      dialogTitle: '新增心率设备',
+      BtnGetAllPower: false,
+      tableRadio: [],
+      cur_page: 1,
+      // panel 配置项目
+      panel: {
+        str: '',
+        tag: '',
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        loading: false,
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '禁用'},
+        ]
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 10,
+        pageOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        eaId: '',
+        name: '',
+        tag: '',
+        memo: '',
+        picUrl: '',
+        videoUrl: '',
+        btnType: 0,//0新建,1编辑编辑
+        dialogData: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      tableData: []
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    //顶部菜单项切换
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    //tableData中的行点击事件
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    //tableData中的行选择事件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //动作分组动作管理
+    manageAction(row) {
+      this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
+    },
+    // 关闭所有弹窗
+    allDialogClose() {
+      this.dialogVisible = false;
+    },
+    //清除弹窗输入项
+    clearForm() {
+      this.form.eaId = "";
+      this.form.name = "";
+      this.form.tag = "";
+      this.form.memo = "";
+    },
+    // 新增动作
+    addAction() {
+      this.clearForm();
+      this.addActionVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增动作'
+    },
+    //确认提交新动作
+    confirmAddAction() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,动作名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('动作名称过长,请重新编辑');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        eaName: that.form.name,
+        eaTag: that.form.tag,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      ExerciseActionAdd(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addActionVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '动作添加成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //编辑动作分组
+    editAction() {
+      let that = this;
+      this.clearForm();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      this.dialogVisible = true;
+      this.addActionVisible = true
+      this.dialogTitle = '编辑动作分组';
+
+      let row = this.tableRadio;
+      this.form.eaId = row.EaId;
+      this.form.name = row.EaName;
+      this.form.tag = row.EaTag;
+      this.form.memo = row.Memo;
+      this.form.btnType = 1;
+    },
+    //提交编辑动作分组
+    confirmEditAction() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,动作名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('动作名称过长,请重新编辑');
+        return false
+      }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        eaId: that.form.eaId,
+        eaName: that.form.name,
+        eaTag: that.form.tag,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      ExerciseActionEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addActionVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '动作分组编辑信息编辑成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //删除动作分组
+    deleteAction() {
+      let that = this;
+      let row = this.tableRadio;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.ShopId,
+        eaId: row.EaId,
+        eaName: row.EaName,
+        status: 9 //1:启用,8:禁用,9:删除
+      };
+      let postdata = qs.stringify(param);
+
+      this.$confirm('此操作将永久删除该动作, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        ExerciseActionStatusEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            // table 重载
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '删除成功',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(json.Memo);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    //设置行状态
+    enableRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        eaId: row.EaId,
+        eaName: row.EaName,
+        status: status //1:启用,8:禁用,9:删除
+      };
+      let postdata = qs.stringify(param);
+      ExerciseActionStatusEdit(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);
+        }
+      })
+    },
+    //查看动作分组详情
+    viewAction(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        shopId: row.ShopId,
+        hrId: row.HrId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          console.log(json);
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+      })
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        eaName: that.panel.str,
+        eaTag: that.panel.tag,
+        status: that.panel.status,
+      };
+      let postdata = qs.stringify(param);
+      ExerciseActionQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #f0f2f5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799ff;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
+
+.panel-body em {
+  /*float: left;*/
+  line-height: 40px;
+  margin-right: 10px;
+}
+
+</style>

+ 578 - 0
pc/src/views/ActionGroups.vue

@@ -0,0 +1,578 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>动作分组</h5>
+      <div class="likeTab">
+        <el-button @click="goType('ratingManage')" size="mini" type="primary">动作分组</el-button>
+        <el-button @click="goType('actionExercise')" size="mini" type>锻炼动作</el-button>
+        <el-button @click="goType('bodyNode')" size="mini" type>身体节点</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="1">
+            <el-col :span="6" align="center">
+              <em>分组名称:</em>
+              <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
+            </el-col>
+            <el-col :span="3">
+              <em>状态:</em>
+              <!--status-->
+              <el-select v-model="panel.status" placeholder="请选择">
+                <el-option
+                    v-for="item in panel.statusOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <el-button size type="primary" @click="query" plain>查询</el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addActionGroup" size="mini" type="primary" >新增动作分组</el-button>
+      <el-button @click="editActionGroup" size="mini">编辑动作分组</el-button>
+      <el-button @click="deleteActionGroup" size="mini" type="danger">删除动作分组</el-button>
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize
+                :default-sort="{ prop: 'date', order: 'descending' }" element-loading-background="rgba(0, 0, 0, 0.8)"
+                class @selection-change="handleSelectionChange" @current-change="clickChange">
+        >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row">
+              <i></i>
+            </el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" label="序号" align="center" width="60"/>
+        <el-table-column prop="AgName" label="动作分组名称" align="center" sortable/>
+        <el-table-column prop="Memo" label="备注" align="center" sortable/>
+
+        <el-table-column prop="id" label="操作">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="manageActionGroup(scope.row)">管理</el-button>
+            <el-button type="info" size="mini" @click="viewActionGroup(scope.row)">查看</el-button>
+            <el-button type="success" v-if="scope.row.Status == 8" size="mini" @click="enableRow(scope.row,1)">
+              启用
+            </el-button>
+            <el-button type="warning" v-if="scope.row.Status == 1" size="mini" @click="enableRow(scope.row,8)">
+              禁用
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br/>
+      <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+      ></el-pagination>
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="addActionGroupVisible" width="650px">
+      <div class="dialogContent">
+        <div class>
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="动作名称" :required="true">
+              <el-input v-model="form.name"/>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"/>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddActionGroup">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditActionGroup">确定</el-button>
+        <el-button size="small" @click="addActionGroupVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../Global.js'
+import {
+  ActionGroupStatusEdit,
+  ActionGroupEdit,
+  GetHrSensorsPowerPercent,
+  ActionGroupQuery,
+  ActionGroupAdd,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      activeName: 'comm',
+      dialogVisible: false,//其他dialog
+      addActionGroupVisible: false,//新增动作分组弹窗
+      dialogTitle: '新增心率设备',
+      BtnGetAllPower: false,
+      tableRadio: [],
+      cur_page: 1,
+      // panel 配置项目
+      panel: {
+        str: '',
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        loading: false,
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '禁用'},
+        ]
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 10,
+        pageOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        agId: '',
+        name: '',
+        memo: '',
+        btnType: 0,//0新建,1编辑编辑
+        dialogData: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      tableData: []
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    //顶部菜单项切换
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    //tableData中的行点击事件
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    //tableData中的行选择事件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //动作分组动作管理
+    manageActionGroup(row) {
+      this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
+    },
+    // 关闭所有弹窗
+    allDialogClose() {
+      this.dialogVisible = false;
+    },
+    //清除弹窗输入项
+    clearForm() {
+      this.form.name = '';
+      this.form.memo = "";
+      this.form.agId = '';
+    },
+    // 新增动作
+    addActionGroup() {
+      this.clearForm();
+      this.addActionGroupVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增动作分组'
+    },
+    //确认提交新动作
+    confirmAddActionGroup() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,动作分组名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('动作分组名称过长,请重新编辑');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        agName: that.form.name,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      ActionGroupAdd(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addActionGroupVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '动作分组添加成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //编辑动作分组
+    editActionGroup() {
+      let that = this;
+      this.clearForm();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      this.dialogVisible = true;
+      this.addActionGroupVisible = true
+      this.dialogTitle = '编辑动作分组';
+
+      let row = this.tableRadio;
+      this.form.shopid = row.ShopId;
+      this.form.agId = row.AgId;
+      this.form.name = row.AgName;
+      this.form.memo = row.Memo;
+      this.form.btnType = 1;
+    },
+    //提交编辑动作分组
+    confirmEditActionGroup() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,动作分组名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('动作分组名称过长,请重新编辑');
+        return false
+      }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        agId: that.form.agId,
+        agName: that.form.name,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      ActionGroupEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addActionGroupVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '动作分组编辑信息编辑成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //删除动作分组
+    deleteActionGroup() {
+      let that = this;
+      let row = this.tableRadio;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.ShopId,
+        agId: row.AgId,
+        agName: row.AgName,
+        status: 9 //1:启用,8:禁用,9:删除
+      };
+      let postdata = qs.stringify(param);
+
+      this.$confirm('此操作将永久删除该动作分组, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        ActionGroupStatusEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            // table 重载
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '删除成功',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(json.Memo);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    //设置行状态
+    enableRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        agId: row.AgId,
+        agName: row.AgName,
+        status: status,//1:启用 8:暂停 9:删除
+      };
+      let postdata = qs.stringify(param);
+      ActionGroupStatusEdit(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);
+        }
+      })
+    },
+    //查看动作分组详情
+    viewActionGroup(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        shopId: row.ShopId,
+        hrId: row.HrId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          console.log(json);
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+      })
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        agName: that.panel.str,
+        status: that.panel.status,
+      };
+      let postdata = qs.stringify(param);
+      ActionGroupQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #f0f2f5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799ff;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
+
+.panel-body em {
+  /*float: left;*/
+  line-height: 40px;
+  margin-right: 10px;
+}
+
+</style>

+ 1738 - 0
pc/src/views/ActionScore.vue

@@ -0,0 +1,1738 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <div class="panel-body">
+        <el-page-header @back="goBack" content="动作评分"/>
+        <span class="classNames">{{ title }} {{ ClassStateText }}</span>
+        <div class="likeTab">
+          <el-button @click="goType('courseEdit')" size="mini">人员管理</el-button>
+          <el-button type="primary" @click="goType('actionScore')" size="mini">动作评分</el-button>
+          <el-button @click="goType('scoreResult')" size="mini">评分结果</el-button>
+        </div>
+        <div class="panel_control">
+          <el-row :gutter="0">
+            <el-col :span="22">
+              <el-radio-group v-model="radio1" size="mini" @change="handleClick" align="left"
+                              style="margin-left: -10px;float: left;padding-left: 10px">
+                <el-radio v-for="item in actionList" :key="item.index" :label="item.label"
+                          :value="item.value" border style="margin-top: 10px;margin-left: -10px"/>
+              </el-radio-group>
+            </el-col>
+          </el-row>
+          <el-row :gutter="0" align="left">
+          </el-row>
+        </div>
+      </div>
+      <div class="change">
+        <span v-if="actionDesc" align="left" style="float: left;">{{ actionDesc }}</span>
+        <el-button @click="postPageMember" size="mini" style="float: right;">提交本页</el-button>
+      </div>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{ prop: 'data', order: 'descending' }"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class
+          :row-class-name="tableRowClassName"
+          @selection-change="handleSelectionChange"
+          ref="multipleTable"
+      >
+        <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"
+            />
+          </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
+            prop="Phone"
+            label="评价"
+            width="110"
+            sortable
+        >
+          <template slot-scope="scope">
+            <el-radio-group v-model="scope.row.defaultScore" @change="editMemberRow(scope.row)">
+              <el-radio :label="1" style="width: 110px;">优秀</el-radio>
+              <el-radio :label="2" style="width: 110px;">不达标</el-radio>
+              <el-radio :label="3" style="width: 110px;">未完成</el-radio>
+            </el-radio-group>
+          </template>
+        </el-table-column>
+
+        <el-table-column
+            v-for="item in bodyList" :key="item.index" :label="item.label" :prop="item.prop">
+          <template slot-scope="scope">
+            <el-switch
+                v-model="scope.row.actions[item.prop]"
+                :disabled="scope.row.defaultScore ==3"
+                inactive-color="#13ce66"
+                active-color="#ff4949"
+                inactive-text="优秀"
+                active-text="不达标">
+            </el-switch>
+          </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="720px">
+      <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"
+            :disabled="BtnConfirmMember"
+            :loading="BtnConfirmMember"
+            @click="confirmMember"
+        >确定
+        </el-button
+        >
+        <el-button size="small" @click="dialogVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+    <!--添加临时会员-->
+    <el-dialog
+        title="添加临时会员"
+        :visible.sync="dialogTempVisible"
+        width="720px"
+    >
+      <div class="dialogContent viplist">
+        <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+        <div>
+          <el-transfer
+              filterable
+              v-model="dialogTempValue"
+              :data="form.dialogTempdata"
+              :titles="['临时会员', '已添加会员']"
+          ></el-transfer>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" :disabled="BtnTempConfirmMember" :loading="BtnTempConfirmMember"
+                   @click="TempconfirmMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogTempVisible = false">取消
+        </el-button
+        >
+      </div>
+    </el-dialog>
+    <!--添加跨店会员-->
+    <el-dialog
+        title="添加跨店会员"
+        :visible.sync="dialogAcrossVisible"
+        width="720px"
+    >
+      <div class="dialogContent viplist">
+        <span class="blueTitle">{{ ClassName }} {{ BeginTime }}</span>
+        <div>
+          <el-transfer
+              filterable
+              v-model="dialogAcrossValue"
+              :data="form.dialogAcrossdata"
+              :titles="['跨店会员', '已添加会员']"
+          ></el-transfer>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button
+            type="primary"
+            size="small"
+            :disabled="BtnAcrossConfirmMember"
+            :loading="BtnAcrossConfirmMember"
+            @click="AcrossConfirmMember"
+        >确定
+        </el-button
+        >
+        <el-button size="small" @click="dialogAcrossVisible = 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"
+            :disabled="BtnConfirmClassFinish"
+            :loading="BtnConfirmClassFinish"
+            @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,
+  TmpUserQuery,
+  ClassOverTmpDetailAdd,
+  ClassTmpUserOverDetailDel,
+  BindHrSensorsToTempUser,
+  AcrossUserSimpleQuery,
+  ClassGiveUpConfirm,
+} from "../api/getApiRes";
+
+let qs = require("qs");
+export default {
+  data() {
+    return {
+      searchBtnStatus: false,
+      BtnConfirmClassFinish: false,
+      BtnConfirmMember: false,
+      BtnTempConfirmMember: false,
+      BtnAcrossConfirmMember: false,
+      BeginState: true, //确认上课
+      tableData: [],
+      radio1: '上海',
+      radio2: true,
+      actionDesc: "",
+      title: "",
+      ClassType: 0,
+      PkNum: 0,
+      ClassStateText: "",
+      FinishClass: 0, //当前上课状态 1已下课 2已上课 3准备上课 FinishClass
+      dialogVisible: false, //添加下课会员
+      dialogTempVisible: false, //添加临时会员
+      dialogAcrossVisible: false, //
+      dialogFinishVisible: false, //确认下课dialog
+      dialogLesson: false, //课时调整
+      dialogGift: false, //赠送课时调整
+      dialogExpTime: false, //有效期调整
+      dialogLessonTable: false, //会员课程
+      dialogTitle: "新增会员",
+      current: getNowDate(),
+      dialogValue: [],
+      dialogTempValue: [],
+      dialogCoachValue: [],
+      dialogAcrossValue: [],
+      BeginTime: "",
+      ClassName: "",
+      cur_page: 1,
+      actionList: [{
+        index: 0,
+        value: 0,//actionId
+        label: "平板支撑",
+      }, {
+        index: 1,
+        value: 1,
+        label: "罗马尼亚硬拉",
+      }, {
+        index: 2,
+        value: 2,
+        label: "章丘深蹲",
+      }, {
+        index: 3,
+        value: 3,
+        label: "俄罗斯弹跳",
+      }],
+      bodyList: [{
+        index: 0,
+        value: 0,
+        prop: "左胳",//和动作评分详情中传出的节点名一致
+        label: "左胳膊",
+      }, {
+        index: 1,
+        value: 1,
+        prop: "rightArm",
+        label: "右胳膊",
+      }, {
+        index: 2,
+        value: 2,
+        prop: "knee",
+        label: "膝盖",
+      }],
+      memberList: [{
+        head: "http://xhead.beswell.com/GoAllOut160749884317982.png",
+        Name: "jayChou",
+        defaultScore: 1,
+        Phone: "17854100392",
+        actions: {
+          rightArm: true,
+          knee: false,
+          左胳: false,
+        }
+      }, {
+        head: "http://xhead.beswell.com/GoAllOut160749884317982.png",
+        Name: "jjLin",
+        defaultScore: 2,
+        Phone: "17854100394",
+        actions: {
+          左胳: false,
+          rightArm: true,
+          knee: false
+        }
+      }, {
+        head: "http://xhead.beswell.com/GoAllOut160749884317982.png",
+        Name: "weiboPan",
+        defaultScore: 3,
+        Phone: "17854100395",
+        actions: {
+          左胳: false,
+          rightArm: false,
+          knee: true
+        }
+      }],
+      // 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: [],
+        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: [], //穿梭待选
+        dialogTempdata: [], //穿梭待选
+        dialogValue: [], //穿梭已选
+        dialogCoachdata: [], //穿梭已选
+        dialogAcrossdata: [], //穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: "年会员"},
+        {value: 2, label: "充值会员"},
+      ],
+      pageination: {
+        pageItem: 1000,
+        pageoptions: pageOptions(),
+        total: 1000,
+        pageIndex: 1,
+      },
+      isCollapse: document.body.clientWidth < 1366,
+    };
+  },
+  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: {
+    handleClick() {
+      let that = this;
+      console.log(that.radio1);
+      that.actionDesc = that.radio1;
+    },
+    handleSelectionChange(val) {
+      let row = "";
+      for (let t in this.tableData) {
+        this.tableData[t].IsOnline = 0;
+      }
+      for (let v in val) {
+        val[v].IsOnline = 1;
+      }
+    },
+    handleSelectAll(val) {
+      if (val) {
+        for (let t in this.tableData) {
+          if (!this.tableData[t].Sn) {
+            this.tableData[t].IsOnline = 1;
+            this.tableData[t].IsOnlineState = true;
+          }
+        }
+      } else {
+        for (let t in this.tableData) {
+          if (!this.tableData[t].Sn) {
+            this.tableData[t].IsOnline = 0;
+            this.tableData[t].IsOnlineState = false;
+          }
+        }
+      }
+      console.log();
+    },
+    postPageMember() {
+      let that = this;
+
+      // 提交数据
+      let scoreRs = [];
+      let thisRow = {};
+      for (let i = 0; i < this.tableData.length; i++) {
+        thisRow = this.tableData[i];
+        thisRow.LessonIndex = parseInt(i + 1);
+        thisRow.EndStr = thisRow.Phone;
+        this.$delete(thisRow, 'LessonIndex');
+        scoreRs.push(thisRow);
+      }
+
+      let res = JSON.stringify(scoreRs);
+      console.log(res);
+      let param = {
+        token: localStorage.token,
+        actionId: 112,
+        stuScRs: scoreRs,
+      };
+      let postdata = qs.stringify(param);
+      console.log(postdata);
+
+      // console.log(that.tableData);
+
+    },
+    editMemberRow(row) {
+      let that = this;
+      if (row.defaultScore == 1) {
+        for (let temp in row.actions) {
+          row.actions[temp] = false;
+        }
+      }
+      if (row.defaultScore == 2) {
+        for (let temp in row.actions) {
+          row.actions[temp] = true;
+        }
+      }
+      if (row.defaultScore == 3) {
+        for (let temp in row.actions) {
+          // row.actions[temp].isdisabled = true;
+        }
+      }
+      console.log(row);
+    },
+    // 请选心率带
+    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);
+        }
+      });
+    },
+    toggleSelection(rows) {
+      // if(rows.IsOnline == 1){
+      //     // 网课学生状态置入
+      //
+      // }
+      if (rows) {
+        rows.forEach((row) => {
+          console.log(row);
+          this.$refs.multipleTable.toggleRowSelection(1);
+        });
+      }
+    },
+    // 临时会员绑定心率带
+    bindSensorToTmepUser(row) {
+      let that = this;
+      let obj = {};
+      obj = this.panel.bindList.find((item) => {
+        return item.HrId === row.BindId;
+      });
+      // let oldSn = row.BindId == 0 ? row.Sn : '';
+      let param = {
+        token: localStorage.token,
+        sn: obj.Sn,
+        cfId: row.CfId,
+        userId: row.UserId,
+        shopId: localStorage.shopId,
+        hrId: row.BindId,
+      };
+      let postdata = qs.stringify(param);
+      BindHrSensorsToTempUser(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: "已取消回收",
+            });
+          });
+    },
+    takeTempBack(row) {
+      let that = this;
+      if (this.FinishClass == 2) {
+        that.$message.error("请删除临时会员后重新添加");
+      } else {
+        that.$message.error("临时会员无法替换心率带");
+      }
+
+      // 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() {
+      this.BtnConfirmClassFinish = true;
+      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) => {
+        that.BtnConfirmClassFinish = false;
+        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;
+      // 根据课程类型提示最大上课人数
+      let ClassType = parseInt(this.$route.query.ClassType);
+      if (ClassType == 1 && this.tableData.length > 30) {
+        that.$message.error('团课做多上课人数不应超过30人');
+        // return false
+      }
+      if (ClassType == 2 && this.tableData.length > 16) {
+        that.$message.error('2队pk课最多上课人数不应超过16人');
+        // return false
+      }
+      if (ClassType == 3 && this.tableData.length > 24) {
+        that.$message.error('2队pk课最多上课人数不应超过24人');
+        // return false
+      }
+
+      // 没绑心率带不能开课,预约未到的不管他
+      for (var i = 0; i < this.tableData.length; i++) {
+        if (
+            this.tableData[i].Sn == 0 &&
+            this.tableData[i].Status != 2 &&
+            this.tableData[i].IsOnline != 1
+        ) {
+          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;
+        }
+      });
+
+      // 拼装上课人员信息
+      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,
+          is_tmp_user: row.IsTmpUser,
+          is_private: row.IsPrivate,
+          isOnline: parseInt(row.IsOnline),
+        };
+      }
+      // 确认上课
+      this.getClassStartConfirm(duRs);
+    },
+    // 确认上课
+    getClassStartConfirm(duRs) {
+      duRs = '{"Rs":' + JSON.stringify(duRs).toString() + "}";
+      let that = this;
+      that.BeginState = true;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        duRs: duRs,
+      };
+      let postdata = qs.stringify(param);
+      ClassStartConfirm(postdata).then((res) => {
+        let json = res;
+        that.BeginState = false;
+        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);
+        }
+      });
+    },
+    //关闭课程
+    confirmClose() {
+      this.$confirm("您确认要关闭课程?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+          .then(() => {
+            this.getConfirmClassClose();
+          })
+          .catch(() => {
+            this.$message({
+              type: "info",
+              message: "已取消",
+            });
+          });
+    },
+    //确认执行关闭课程
+    getConfirmClassClose() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+      };
+      let postdata = qs.stringify(param);
+      ClassGiveUpConfirm(postdata).then((res) => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: "课程关闭成功!",
+            type: "success",
+          });
+          // 返回课程管理
+          that.$router.push({
+            path: "/courses",
+            query: {},
+          });
+        } else {
+          that.$message({
+            showClose: true,
+            message: "课程关闭失败",
+            type: "success",
+          });
+          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) {
+          if (item.IsTmpUser != 1) {
+            std.push(item.UserId);
+          }
+        });
+      }
+      that.dialogValue = std;
+      this.dialogVisible = true;
+    },
+    // 获取临时会员列表
+    getTmpUserQuery() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        start: 1,
+        tableMax: 999,
+      };
+      let postdata = qs.stringify(param);
+      TmpUserQuery(postdata).then((res) => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.dialogTempdata = turnResToOptionByTempUser(json.Rs);
+        } else {
+          that.$message.error(json.Memo);
+        }
+      });
+    },
+    // 获取跨店会员列表
+    getAcrossUserQuery() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        start: 1,
+        tableMax: 999,
+      };
+      let postdata = qs.stringify(param);
+      AcrossUserSimpleQuery(postdata).then((res) => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.dialogAcrossdata = turnResToOptionBySimViper(json.Rs);
+        } else {
+          that.$message.error(json.Memo);
+        }
+      });
+    },
+    // 添加临时会员
+    addTempMember() {
+      let that = this;
+      this.clearForm();
+      // this.getClassVipuserQuery();
+      this.getTmpUserQuery();
+      this.dialogTempValue = [];
+      let std = [];
+      if (this.tableData) {
+        this.tableData.map(function (item) {
+          if (item.IsTmpUser == 1) {
+            std.push(item.UserId);
+          }
+        });
+      }
+      that.dialogTempValue = std;
+      this.dialogTempVisible = true;
+    },
+    // 添加跨店会员
+    addCrossMember() {
+      let that = this;
+      this.clearForm();
+      this.getAcrossUserQuery();
+      this.dialogAcrossValue = [];
+      let std = [];
+      if (this.tableData) {
+        this.tableData.map(function (item) {
+          std.push(item.UserId);
+        });
+      }
+      that.dialogAcrossValue = std;
+      this.dialogAcrossVisible = 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);
+        } else {
+          that.$message.error(json.Memo + " 错误码:" + json.Code);
+        }
+      });
+    },
+    // 确认提交上课会员
+    confirmMember() {
+      let that = this;
+      if (that.BtnConfirmMember == true) return false;
+      that.BtnConfirmMember = true;
+      // 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",
+          });
+          that.BtnConfirmMember = false;
+        } else {
+          that.$message.error(json.Memo + " 错误码:" + json.Code);
+          that.BtnConfirmMember = false;
+        }
+      });
+    }, // 确认提交临时会员
+    TempconfirmMember() {
+      let that = this;
+      if (that.BtnTempConfirmMember == true) return false;
+      that.BtnTempConfirmMember = true;
+      // checkNum
+      let userlist = that.dialogTempValue.toString();
+      let param = {
+        token: localStorage.token,
+        stdId: this.$route.query.StdId,
+        tmpuserlist: userlist,
+      };
+      let postdata = qs.stringify(param);
+      // 下课记录详情添加
+      ClassOverTmpDetailAdd(postdata).then((res) => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogTempVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: "会员添加成功!",
+            type: "success",
+          });
+          that.BtnTempConfirmMember = false;
+        } else {
+          that.$message.error(json.Memo + " 错误码:" + json.Code);
+          that.BtnTempConfirmMember = false;
+        }
+      });
+    },
+    // 确认提交跨店会员
+    AcrossConfirmMember() {
+      let that = this;
+      if (that.BtnAcrossConfirmMember == true) return false;
+      that.BtnAcrossConfirmMember = true;
+      // checkNum
+      let userlist = that.dialogAcrossValue.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.dialogAcrossVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: "会员添加成功!",
+            type: "success",
+          });
+          that.BtnAcrossConfirmMember = false;
+        } else {
+          that.$message.error(json.Memo + " 错误码:" + json.Code);
+          that.BtnAcrossConfirmMember = false;
+        }
+      });
+    },
+    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: "已取消删除",
+            });
+          });
+    },
+    // 下课记录临时会员删除
+    getClassOverTempDel(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        stdId: row.StdId,
+        tcfId: row.CfId,
+      };
+      this.$confirm("是否删除临时会员  " + row.Name + "?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+          .then(() => {
+            let postdata = qs.stringify(param);
+            ClassTmpUserOverDetailDel(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.searchBtnStatus = true;
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.searchBtnStatus = 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, //
+      };
+      that.allTableData = [];
+      that.tableData = [];
+      that.recordsTotal = 0;
+      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;
+                }
+                item.IsOnline = item.IsOnline.toString();
+                item.IsOnlineState = item.IsOnline == 1 ? true : 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 = that.memberList;
+            that.recordsTotal = that.memberList.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;
+        });
+      }
+
+      // 分拆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 && row.IsOnline == 0) {
+        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,
+        is_tmp_user: row.IsTmpUser,
+        is_private: row.IsPrivate,
+        isOnline: parseInt(row.IsOnline),
+      };
+      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 "";
+    },
+    // 全部网课todo
+    allSetOnline() {
+      let that = this;
+      let row = "";
+      that.tableData.map(function (item) {
+        row = item;
+        console.log(row);
+        // 没有bindID的 且没有被禁用的 选中
+        if (row.BindId == 0 && row.HrSubmitFlag == 0) {
+          row.IsOnline = "1";
+        } else {
+          // row.IsOnline = 0;
+        }
+      });
+    },
+    goType(url) {
+      this.$router.push({
+        path: '/' + url, query: {
+          StdId: this.$route.query.StdId,
+          ClassName: this.$route.query.ClassName,
+          BeginStr: this.$route.query.BeginStr,
+          EndStr: this.$route.query.EndStr,
+          FinishClass: this.$route.query.FinishClass,
+          ClassType: this.$route.query.ClassType,
+          PkNum: this.$route.query.PkNum,
+        }
+      });
+    }
+  },
+  watch: {
+    $route(to) {
+      if (to.name == "actionScore") {
+        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;
+      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";
+
+.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;
+}
+
+.head {
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  border-radius: 250px;
+}
+
+.panel_control {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+/*.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 button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.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-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;
+}
+
+/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;*/
+/*}*/
+
+/deep/ .el-table__header .el-table-column--selection .cell .el-checkbox:after {
+  content: " 是否网课";
+}
+
+/deep/
+.el-table__body-wrapper
+.el-table-column--selection
+.cell
+.el-checkbox:after {
+  content: " 网课";
+}
+</style>

+ 551 - 0
pc/src/views/BodyNode.vue

@@ -0,0 +1,551 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <h5>身体节点</h5>
+      <div class="likeTab">
+        <el-button @click="goType('ratingManage')" size="mini" type>动作分组</el-button>
+        <el-button @click="goType('actionExercise')" size="mini" type>锻炼动作</el-button>
+        <el-button @click="goType('bodyNode')" size="mini" type="primary">身体节点</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="1">
+            <el-col :span="6" align="center">
+              <em>节点名称:</em>
+              <el-input v-model="panel.str" placeholder="请输入名称" type="text" style="width: 150px"/>
+            </el-col>
+            <el-col :span="3">
+              <em>状态:</em>
+              <!--status-->
+              <el-select v-model="panel.status" placeholder="请选择">
+                <el-option
+                    v-for="item in panel.statusOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                </el-option>
+              </el-select>
+            </el-col>
+            <el-col :span="2">
+              <el-button size type="primary" @click="query" plain>查询</el-button>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addBodyNode" size="mini" type="primary" >新增节点</el-button>
+      <el-button @click="editBodyNode" size="mini">编辑节点</el-button>
+      <el-button @click="deleteBodyNode" size="mini" type="danger">删除节点</el-button>
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize
+                :default-sort="{ prop: 'date', order: 'descending' }" element-loading-background="rgba(0, 0, 0, 0.8)"
+                class @selection-change="handleSelectionChange" @current-change="clickChange">
+        >
+        <el-table-column label="选择" width="55">
+          <template slot-scope="scope">
+            <el-radio v-model="tableRadio" :label="scope.row">
+              <i></i>
+            </el-radio>
+          </template>
+        </el-table-column>
+        <el-table-column type="index" label="序号" align="center" width="60"/>
+        <el-table-column prop="BnName" label="身体节点名称" align="center" sortable/>
+        <el-table-column prop="Memo" label="备注" align="center" sortable/>
+
+        <el-table-column prop="id" label="操作">
+          <template slot-scope="scope">
+            <el-button type="success" v-if="scope.row.Status == 8" size="mini" @click="enableRow(scope.row,1)">
+              启用
+            </el-button>
+            <el-button type="warning" v-if="scope.row.Status == 1" size="mini" @click="enableRow(scope.row,8)">
+              禁用
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br/>
+      <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+      ></el-pagination>
+    </div>
+    <el-dialog :title="dialogTitle" :visible.sync="addBodyNodeVisible" width="650px">
+      <div class="dialogContent">
+        <div class>
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="身体节点" :required="true">
+              <el-input v-model="form.name"/>
+            </el-form-item>
+            <el-form-item label="备注">
+              <el-input v-model="form.memo"/>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddBodyNode">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditBodyNode">确定</el-button>
+        <el-button size="small" @click="addBodyNodeVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import Global from '../Global.js'
+import {
+  BodyNodeStatusEdit,
+  BodyNodeEdit,
+  BodyNodeQuery,
+  BodyNodeAdd,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      activeName: 'comm',
+      dialogVisible: false,//其他dialog
+      addBodyNodeVisible: false,//新增身体节点弹窗
+      dialogTitle: '新增心率设备',
+      BtnGetAllPower: false,
+      tableRadio: [],
+      cur_page: 1,
+      // panel 配置项目
+      panel: {
+        str: '',
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        loading: false,
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '禁用'},
+        ]
+      },
+      multipleSelection: [],
+      pagination: {
+        pageItem: 10,
+        pageOptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        agId: '',
+        name: '',
+        memo: '',
+        btnType: 0,//0新建,1编辑编辑
+        dialogData: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      tableData: []
+    }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    //顶部菜单项切换
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    //tableData中的行点击事件
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    //tableData中的行选择事件
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    //身体节点动作管理
+    manageBodyNode(row) {
+      this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
+    },
+    // 关闭所有弹窗
+    allDialogClose() {
+      this.dialogVisible = false;
+    },
+    //清除弹窗输入项
+    clearForm() {
+      this.form.name = '';
+      this.form.memo = "";
+      this.form.bnId = '';
+    },
+    // 新增动作
+    addBodyNode() {
+      this.clearForm();
+      this.addBodyNodeVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增身体节点'
+    },
+    //确认提交新动作
+    confirmAddBodyNode() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,身体节点名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('身体节点名称过长,请重新编辑');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        bnName: that.form.name,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      BodyNodeAdd(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addBodyNodeVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '身体节点添加成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //编辑身体节点
+    editBodyNode() {
+      let that = this;
+      this.clearForm();
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      this.dialogVisible = true;
+      this.addBodyNodeVisible = true
+      this.dialogTitle = '编辑身体节点';
+
+      let row = this.tableRadio;
+      this.form.shopid = row.ShopId;
+      this.form.bnId = row.BnId;
+      this.form.name = row.BnName;
+      this.form.memo = row.Memo;
+      this.form.btnType = 1;
+    },
+    //提交编辑身体节点
+    confirmEditBodyNode() {
+      let that = this;
+      if (!that.form.name) {
+        this.$message.error('错了哦,身体节点名称不能为空');
+        return false
+      }
+      if (that.form.name.length > 20) {
+        this.$message.error('身体节点名称过长,请重新编辑');
+        return false
+      }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        bnId: that.form.bnId,
+        bnName: that.form.name,
+        memo: that.form.memo
+      };
+      let postdata = qs.stringify(param);
+      BodyNodeEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.addBodyNodeVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '身体节点编辑信息编辑成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    //删除身体节点
+    deleteBodyNode() {
+      let that = this;
+      let row = this.tableRadio;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.ShopId,
+        bnId: row.BnId,
+        bnName: row.BnName,
+        status: 9 //1:启用,8:禁用,9:删除
+      };
+      let postdata = qs.stringify(param);
+
+      this.$confirm('此操作将永久删除该身体节点, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        BodyNodeStatusEdit(postdata).then(res => {
+          let json = res;
+          if (json.Code == 0) {
+            // table 重载
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '删除成功',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(json.Memo);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    //设置行状态
+    enableRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        bnId: row.BnId,
+        bnName: row.BnName,
+        status: status,//1:启用 8:暂停 9:删除
+      };
+      let postdata = qs.stringify(param);
+      BodyNodeStatusEdit(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);
+        }
+      })
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        bnName: that.panel.str,
+        status: that.panel.status,
+      };
+      let postdata = qs.stringify(param);
+      BodyNodeQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pagination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pagination.pageItem;
+      });
+      that.draw = that.pagination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pagination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pagination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #f0f2f5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799ff;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
+
+.panel-body em {
+  /*float: left;*/
+  line-height: 40px;
+  margin-right: 10px;
+}
+
+</style>

+ 460 - 0
pc/src/views/ScoreResult.vue

@@ -0,0 +1,460 @@
+<template>
+  <div class="context">
+    <div class="panel">
+      <div class="panel-body">
+        <el-page-header @back="goBack" content="评分结果"/>
+        <span class="classNames">{{ title }} {{ ClassStateText }}</span>
+        <div class="likeTab">
+          <el-button @click="goType('courseEdit')" size="mini">人员管理</el-button>
+          <el-button @click="goType('actionScore')" size="mini">动作评分</el-button>
+          <el-button type="primary" @click="goType('scoreResult')" size="mini">评分结果</el-button>
+        </div>
+      </div>
+    </div>
+    <div class="table">
+      <el-table
+          :data="tableData"
+          border
+          is-horizontal-resize
+          :default-sort="{ prop: 'data', order: 'descending' }"
+          element-loading-background="rgba(0, 0, 0, 0.8)"
+          class
+          :row-class-name="tableRowClassName"
+          @selection-change="handleSelectionChange"
+          ref="multipleTable"
+      >
+        >
+        <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
+            prop="Phone"
+            label="手机号"
+            width="120"
+            sortable
+            v-if="!isCollapse"
+        />
+        <el-table-column
+            v-for="item in actionList" :key="item.index" :label="item.label"
+            :value="item.HrId" :prop="item.Prop"
+        />
+      </el-table>
+      <br/>
+      <el-pagination
+          background
+          :total="pageination.total"
+          :page-size="pageination.pageItem"
+          @current-change="pageChange"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+import Global from "../Global.js";
+import {
+  ClassOverDetailListQuery,
+} from "../api/getApiRes";
+
+let qs = require("qs");
+export default {
+  data() {
+    return {
+      tableData: [],
+      title: "",
+      ClassType: 0,
+      PkNum: 0,
+      ClassStateText: "",
+      FinishClass: 0, //当前上课状态 1已下课 2已上课 3准备上课 FinishClass
+      current: getNowDate(),
+      ClassName: "",
+      cur_page: 1,
+      actionList: [{
+        index: 0,
+        value: 0,
+        isCheck: false,
+        Prop: "StdId",
+        label: "总分",
+      }, {
+        index: 1,
+        value: 1,
+        isCheck: true,
+        Prop: "StdId",
+        label: "动作1",
+      }, {
+        index: 2,
+        value: 2,
+        isCheck: false,
+        Prop: "StdId",
+        label: "动作1",
+      }, {
+        index: 3,
+        value: 3,
+        isCheck: false,
+        Prop: "StdId",
+        label: "动作2",
+      }],
+      pageination: {
+        pageItem: 1000,
+        pageoptions: pageOptions(),
+        total: 1000,
+        pageIndex: 1,
+      },
+      isCollapse: document.body.clientWidth < 1366,
+    };
+  },
+  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: {
+    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, //
+      };
+      that.allTableData = [];
+      that.tableData = [];
+      that.recordsTotal = 0;
+      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;
+                }
+                item.IsOnline = item.IsOnline.toString();
+                item.IsOnlineState = item.IsOnline == 1 ? true : 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);
+        }
+      });
+    },
+    // 设置分页数据
+    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);
+      }
+    },
+    goType(url) {
+      this.$router.push({
+        path: '/' + url, query: {
+          StdId: this.$route.query.StdId,
+          ClassName: this.$route.query.ClassName,
+          BeginStr: this.$route.query.BeginStr,
+          EndStr: this.$route.query.EndStr,
+          FinishClass: this.$route.query.FinishClass,
+          ClassType: this.$route.query.ClassType,
+          PkNum: this.$route.query.PkNum,
+        }
+      });
+    },
+  },
+  watch: {
+    $route(to) {
+      if (to.name == "scoreResult") {
+        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;
+      }
+    },
+  },
+};
+</script>
+
+<style scoped>
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.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;
+}
+
+.panel_control {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+/*.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 button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.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-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;
+}
+
+/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;*/
+/*}*/
+
+/deep/ .el-table__header .el-table-column--selection .cell .el-checkbox:after {
+  content: " 是否网课";
+}
+
+/deep/
+.el-table__body-wrapper
+.el-table-column--selection
+.cell
+.el-checkbox:after {
+  content: " 网课";
+}
+</style>

File diff suppressed because it is too large
+ 1737 - 1705
pc/src/views/courseEdit.vue


+ 863 - 847
pc/src/views/courses.vue

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

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

@@ -175,6 +175,7 @@
                 dialogValue: [],
                 dialogValue: [],
                 start: 0,
                 start: 0,
                 draw: 1,
                 draw: 1,
+                cur_page: 1,
                 // panel 配置项目
                 // panel 配置项目
                 panel: {
                 panel: {
                     status: '',
                     status: '',

Some files were not shown because too many files changed in this diff