Changpeng Duan hace 5 años
padre
commit
28db485780

+ 1 - 0
pc/src/Global.js

@@ -347,6 +347,7 @@ turnStdToOption = function (data) {
             key: parseInt(item.StdId),
             value: parseInt(item.StdId),
             classId: parseInt(item.ClassId),
+            ConsumeHour:item.ConsumeHour
         }
     })
     return ids

+ 1550 - 1541
pc/src/views/appoint.vue

@@ -1,1614 +1,1623 @@
 <template>
-  <div class="context">
-    <!--        panel-->
-    <div class="">
-      <div class="panel">
-        <h5>预约管理</h5>
-      </div>
+    <div class="context">
+        <!--        panel-->
+        <div class="">
+            <div class="panel">
+                <h5>预约管理</h5>
+            </div>
 
-      <div class="timeList">
-        <ul>
-          <li :class="[{'active': i == choiceDate}]" v-for="(day,i) in weeks" @click="choiceTime(i)">
-            <em>{{ day.name }}</em><span>{{ day.data }}</span>
-          </li>
-        </ul>
-      </div>
-      <el-tabs v-model="activeName" type="card">
-        <el-tab-pane label="会员预约列表" name="second">
-          <div class="panel-body">
-            <div class="panel_control">
-              <el-row :gutter="20">
-                <el-col :span="5">
-                  <em>会员名:</em>
-                  <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
-                </el-col>
-                <el-col :span="5">
-                  <em>手机号:</em>
-                  <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
-                </el-col>
-                <el-col :span="5">
-                  <em>预约课程:</em>
-                  <el-select v-model="panel.classId">
-                    <el-option
-                        v-for="item in panel.classOptions"
-                        :key="item.value"
-                        :label="item.label"
-                        :value="item.value">
-                    </el-option>
-                  </el-select>
-                </el-col>
-                <el-col :span="4">
-                  <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
-                </el-col>
-                <el-col :span="4">
-                  <el-button class="pull-right" type="warning" @click="addMember">增加预约</el-button>
-                </el-col>
-              </el-row>
+            <div class="timeList">
+                <ul>
+                    <li :class="[{'active': i == choiceDate}]" v-for="(day,i) in weeks" @click="choiceTime(i)">
+                        <em>{{ day.name }}</em><span>{{ day.data }}</span>
+                    </li>
+                </ul>
             </div>
-          </div>
-          <br>
-          <div class="table">
-            <el-table
-                :data="tableData2"
-                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="50">
-              </el-table-column>
-              <el-table-column
-                  prop="UserName"
-                  label="会员名"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Phone"
-                  label="手机号"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ClassName"
-                  label="预约课程"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="BeginTime"
-                  label="上课时间"
-                  :formatter="filterFmtDate"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Base.CreatedAt"
-                  label="会员预约时间"
-                  :formatter="filterFmtDate"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ConsumeHour"
-                  label="消耗课时"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="RemainHour"
-                  label="剩余课时"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="Status"
-                  label="预约状态"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span v-if="scope.row.Status == 1" style="color: chartreuse">已预约</span>
-                  <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
-                  <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
-                  <span v-if="scope.row.Status == 4" style="color: #015B9E">已完成</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="Status"
-                  label="操作"
-              >
-                <template slot-scope="scope">
-                  <el-button type="danger" size="mini" round
-                             @click="BtnOrderCancelByManager(scope.row)">取消预约
-                  </el-button>
-                </template>
-              </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination
-                background
-                :total="pageination.total"
-                :page-size="pageination.pageItem"
-                @current-change="pageChange"
-            ></el-pagination>
-          </div>
-        </el-tab-pane>
-        <el-tab-pane label="课程预约列表" name="first">
-          <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
-                  type="index"
-                  label="序号"
-                  align="center"
+            <el-tabs v-model="activeName" type="card">
+                <el-tab-pane label="会员预约列表" name="second">
+                    <div class="panel-body">
+                        <div class="panel_control">
+                            <el-row :gutter="20">
+                                <el-col :span="5">
+                                    <em>会员名:</em>
+                                    <el-input v-model="panel.name" placeholder="请输入会员名"></el-input>
+                                </el-col>
+                                <el-col :span="5">
+                                    <em>手机号:</em>
+                                    <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+                                </el-col>
+                                <el-col :span="5">
+                                    <em>预约课程:</em>
+                                    <el-select v-model="panel.classId">
+                                        <el-option
+                                                v-for="item in panel.classOptions"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value">
+                                        </el-option>
+                                    </el-select>
+                                </el-col>
+                                <el-col :span="4">
+                                    <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">
+                                        查询
+                                    </el-button>
+                                </el-col>
+                                <el-col :span="4">
+                                    <el-button class="pull-right" type="warning" @click="addMember">增加预约</el-button>
+                                </el-col>
+                            </el-row>
+                        </div>
+                    </div>
+                    <br>
+                    <div class="table">
+                        <el-table
+                                :data="tableData2"
+                                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="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="UserName"
+                                    label="会员名"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Phone"
+                                    label="手机号"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="ClassName"
+                                    label="预约课程"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="BeginTime"
+                                    label="上课时间"
+                                    :formatter="filterFmtDate"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Base.CreatedAt"
+                                    label="会员预约时间"
+                                    :formatter="filterFmtDate"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="ConsumeHour"
+                                    label="消耗课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="RemainHour"
+                                    label="剩余课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Status"
+                                    label="预约状态"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <span v-if="scope.row.Status == 1" style="color: chartreuse">已预约</span>
+                                    <span v-if="scope.row.Status == 2" style="color: #ccc">已取消</span>
+                                    <span v-if="scope.row.Status == 3" style="color: red">预约未到</span>
+                                    <span v-if="scope.row.Status == 4" style="color: #015B9E">已完成</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Status"
+                                    label="操作"
+                            >
+                                <template slot-scope="scope">
+                                    <el-button type="danger" size="mini" round
+                                               @click="BtnOrderCancelByManager(scope.row)">取消预约
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <br>
+                        <el-pagination
+                                background
+                                :total="pageination.total"
+                                :page-size="pageination.pageItem"
+                                @current-change="pageChange"
+                        ></el-pagination>
+                    </div>
+                </el-tab-pane>
+                <el-tab-pane label="课程预约列表" name="first">
+                    <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
+                                    type="index"
+                                    label="序号"
+                                    align="center"
 
-                  width="50">
-              </el-table-column>
-              <el-table-column
-                  prop="BeginTime"
-                  label="上课时间"
-                  :formatter="filterFmtDate"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ClassName"
-                  label="课程"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="Recovered"
-                  label="预约比例"
-                  width="220px"
-                  sortable
-              >
-                <template slot-scope="scope">
-                  <el-progress
-                      :percentage="parseInt((scope.row.OrderCount/scope.row.OrderToplimit * 100))"
-                      :format="format"
-                  ></el-progress>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="OrderToplimit"
-                  label="预约名额"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="OrderCount"
-                  label="预约人数"
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="ConsumeHour"
-                  label="消耗课时"
-                  sortable
-              >
-              </el-table-column>
-              <el-table-column
-                  prop="WxOrder"
-                  label="微信可预约"
-              >
-                <template slot-scope="scope">
-                  <!--                                    0:不可预约 1:可预约-->
-                  <el-switch
-                      v-model="scope.row.WxOrder"
-                      :active-value="1"
-                      :inactive-value="0"
-                      active-color="#409EFF"
-                      inactive-color="#D9D9D9"
-                      @change=changeWechat($event,scope.row)
-                  >
-                  </el-switch>
-                </template>
-              </el-table-column>
-              <el-table-column
-                  prop="StdId"
-                  label="操作"
-              >
-                <template slot-scope="scope">
-                  <el-button type="text" @click="seeDetail(scope.row)">详情</el-button>
-                </template>
-              </el-table-column>
+                                    width="50">
+                            </el-table-column>
+                            <el-table-column
+                                    prop="BeginTime"
+                                    label="上课时间"
+                                    :formatter="filterFmtDate"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="ClassName"
+                                    label="课程"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <span class="lessons" :style="{ background:scope.row.ClassColor }">{{ scope.row.ClassName }}</span>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="Recovered"
+                                    label="预约比例"
+                                    width="220px"
+                                    sortable
+                            >
+                                <template slot-scope="scope">
+                                    <el-progress
+                                            :percentage="parseInt((scope.row.OrderCount/scope.row.OrderToplimit * 100))"
+                                            :format="format"
+                                    ></el-progress>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="OrderToplimit"
+                                    label="预约名额"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="OrderCount"
+                                    label="预约人数"
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="ConsumeHour"
+                                    label="消耗课时"
+                                    sortable
+                            >
+                            </el-table-column>
+                            <el-table-column
+                                    prop="WxOrder"
+                                    label="微信可预约"
+                            >
+                                <template slot-scope="scope">
+                                    <!--                                    0:不可预约 1:可预约-->
+                                    <el-switch
+                                            v-model="scope.row.WxOrder"
+                                            :active-value="1"
+                                            :inactive-value="0"
+                                            active-color="#409EFF"
+                                            inactive-color="#D9D9D9"
+                                            @change=changeWechat($event,scope.row)
+                                    >
+                                    </el-switch>
+                                </template>
+                            </el-table-column>
+                            <el-table-column
+                                    prop="StdId"
+                                    label="操作"
+                            >
+                                <template slot-scope="scope">
+                                    <el-button type="text" @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"
+                        ></el-pagination>
+                    </div>
+                </el-tab-pane>
+            </el-tabs>
+        </div>
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" 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.displayDay" placeholder="placeholder" :disabled="true"
+                                      style="width: 220px"></el-input>
+                        </el-form-item>
+                        <el-form-item label="课程" :required="true">
+                            <el-select v-model="form.stdId" filterable placeholder="请选择"
+                                       @change="vipSelect(form.stdId)">
+                                <el-option
+                                        v-for="item in form.stdList"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <!--     课程联动查询userlist by classid-->
+                        <el-form-item label="会员" :required="true">
+                            <el-select v-model="form.userId" filterable placeholder="请选择"
+                                       @change="reMainSelect(form.userId)">
+                                <el-option
+                                        v-for="item in form.userList"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="消耗课时">
+                            <el-input v-model="form.ConsumeHour" placeholder="placeholder" :disabled="true"
+                                      style="width: 220px"></el-input>
+                        </el-form-item>
+                        <el-form-item label="会员剩余课时">
+                            <el-input v-model="form.remain" placeholder="placeholder" :disabled="true"
+                                      style="width: 220px"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" @click="ConfirmOrderAddByManager">确定</el-button>
+                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+        <el-dialog title="预约会员" :visible.sync="dialogTableVisible" width="650px">
+            <el-table :data="gridData">
+                <el-table-column property="UserName" label="姓名" width="200"></el-table-column>
+                <el-table-column property="Phone" label="手机"></el-table-column>
             </el-table>
-            <br>
-            <el-pagination
-                background
-                :total="pageination.total"
-                :page-size="pageination.pageItem"
-                @current-change="pageChange"
-            ></el-pagination>
-          </div>
-        </el-tab-pane>
-      </el-tabs>
+        </el-dialog>
     </div>
-    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" 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.displayDay" placeholder="placeholder" :disabled="true"
-                        style="width: 220px"></el-input>
-            </el-form-item>
-            <el-form-item label="课程" :required="true">
-              <el-select v-model="form.stdId" filterable placeholder="请选择"
-                         @change="vipSelect(form.stdId)">
-                <el-option
-                    v-for="item in form.stdList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <!--     课程联动查询userlist by classid-->
-            <el-form-item label="会员" :required="true">
-              <el-select v-model="form.userId" filterable placeholder="请选择"
-                         @change="reMainSelect(form.userId)">
-                <el-option
-                    v-for="item in form.userList"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="会员剩余课时">
-              <el-input v-model="form.remain" placeholder="placeholder" :disabled="true"
-                        style="width: 220px"></el-input>
-            </el-form-item>
-          </el-form>
-        </div>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small" @click="ConfirmOrderAddByManager">确定</el-button>
-        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
-    <el-dialog title="预约会员" :visible.sync="dialogTableVisible" width="650px">
-      <el-table :data="gridData">
-        <el-table-column property="UserName" label="姓名" width="200"></el-table-column>
-        <el-table-column property="Phone" label="手机"></el-table-column>
-      </el-table>
-    </el-dialog>
-  </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  TodayClassOrderQuery,
-  VipUserListQuery,
-  TodayVipOrderQuery,
-  ClassOrderQuery,
-  OrderAddByManager,
-  ClassListByOrderDate,
-  VipUserOrderQuery,
-  OrderCancelByManager,
-  STTDetailWxOrderEdit,
-  testTable,
-  testSelect,
-  WaitingBeginClassList,
-  ShopWxStatusEdit,
-  ClassListQuery,
-  VipUserSimpleQuery
-} from "../api/getApiRes";
+    import Global from '../Global.js'
+    import {
+        TodayClassOrderQuery,
+        VipUserListQuery,
+        TodayVipOrderQuery,
+        ClassOrderQuery,
+        OrderAddByManager,
+        ClassListByOrderDate,
+        VipUserOrderQuery,
+        OrderCancelByManager,
+        STTDetailWxOrderEdit,
+        testTable,
+        testSelect,
+        WaitingBeginClassList,
+        ShopWxStatusEdit,
+        ClassListQuery,
+        VipUserSimpleQuery
+    } from "../api/getApiRes";
 
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      serachBtnStatus: false,
-      activeName: 'second',
-      choiceDate: 0,//默认为今天
-      tableView: true,//其他dialog
-      dialogVisible: false,//其他dialog
-      dialogTableVisible: false,//其他dialog
-      dialogMemberVisible: false,//新增教练dialog
-      dialogLesson: false,//课时调整
-      dialogGift: false,//赠送课时调整
-      dialogExpTime: false,//有效期调整
-      dialogLessonTable: false,//教练课程
-      dialogTitle: '增加预约',
-      current: getNowDate(),
-      dialogValue: [],
-      weeks: [],
-      gridData: [],
-      // panel 配置项目
-      panel: {
-        name: '',
-        phone: '',
-        classId: '0',
-        usercode: '',
-        username: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        endType: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
-        recordsTotal2: 0,
-        tableData: [],
-        allTableData: [],
-        allTableData2: [],
-        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(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        name: '',
-        displayDay: '',
-        userCode: '',
-        shopId: '',
-        stdId: 0,
-        userId: 0,
-        memberType: 1,
-        lesson: 1,
-        gift: 1,
-        btnType: 0,//0新建,1编辑编辑
-        memo: '',
-        expTime: '',
-        dialogdata: [],//穿梭待选
-        dialogValue: [],//穿梭已选
-        userList: [],//穿梭已选
-        stdList: [],//穿梭已选
-        remain: 0,
-      },
-      memberTypes: [
-        {value: 1, label: '年教练'},
-        {value: 2, label: '充值教练'},
-      ],
-      tableData: [],
-      tableData2: [],
-      tableRadio: [],
-    }
-  },
-  mounted() {
-    if (this.$route.query.page == 'second') {
-      this.panel.name = this.$route.query.name;
-      this.activeName = 'second'
-    } else {
-      this.activeName = 'second'
-    }
-    this.ClassSelect();
-    this.panelSelect();
-    // this.getCurrWeekDays();
-    this.getFurtherDays();
-
-  },
-  methods: {
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // .课程表详情微信可预约状态修改
-    changeWechat(e, appoint) {
-      let that = this;
-      let statusText = appoint.WxOrder == 0 ? "关闭" : "开启";
-      this.$confirm('是否' + statusText + '课程预约?', '微信预约操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          stdId: appoint.StdId,
-          wxOrder: e,
-        };
-        let postdata = qs.stringify(param);
-        STTDetailWxOrderEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '预约已' + statusText + '!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            // 状态返回
-            appoint.WxOrder = e == 0 ? 1 : 0;
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.appoint = "0"
-        this.$message({
-          type: 'info',
-          message: '已取消当前操作'
-        });
-      });
-    },
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-      };
-      let postdata = qs.stringify(param);
-      ClassListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == null) return false
-          that.panel.classOptions = turnClassResToOption(json.Rs);
-          that.panel.classOptions.unshift({value: '0', label: '全部'})
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    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);
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                serachBtnStatus: false,
+                activeName: 'second',
+                choiceDate: 0,//默认为今天
+                tableView: true,//其他dialog
+                dialogVisible: false,//其他dialog
+                dialogTableVisible: false,//其他dialog
+                dialogMemberVisible: false,//新增教练dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//教练课程
+                dialogTitle: '增加预约',
+                current: getNowDate(),
+                dialogValue: [],
+                weeks: [],
+                gridData: [],
+                // panel 配置项目
+                panel: {
+                    name: '',
+                    phone: '',
+                    classId: '0',
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    recordsTotal2: 0,
+                    tableData: [],
+                    allTableData: [],
+                    allTableData2: [],
+                    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(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    displayDay: '',
+                    userCode: '',
+                    shopId: '',
+                    stdId: 0,
+                    userId: 0,
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                    userList: [],//穿梭已选
+                    stdList: [],//穿梭已选
+                    remain: 0,
+                    ConsumeHour: 0,
+                },
+                memberTypes: [
+                    {value: 1, label: '年教练'},
+                    {value: 2, label: '充值教练'},
+                ],
+                tableData: [],
+                tableData2: [],
+                tableRadio: [],
+            }
+        },
+        mounted() {
+            if (this.$route.query.page == 'second') {
+                this.panel.name = this.$route.query.name;
+                this.activeName = 'second'
             } else {
-              that.$message.error(json.Memo);
+                this.activeName = 'second'
             }
-          })
-        }
-      })
-    },
-    reMainSelect(userId) {
-      let that = this;
-      this.form.userList.filter((v) => {
-        if (v.key == userId) {
-          that.form.remain = v.RemainHour;
-        }
-      })
+            this.ClassSelect();
+            this.panelSelect();
+            // this.getCurrWeekDays();
+            this.getFurtherDays();
 
-    },
-    ClassSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        start: 1,//
-        tableMax: 9999,//
-      };
-      let postdata = qs.stringify(param);
-      WaitingBeginClassList(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.form.stdList = turnStdToOption(json.Rs);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
+        },
+        methods: {
+            clickChange(item) {
+                this.tableRadio = item
+            },
+            // .课程表详情微信可预约状态修改
+            changeWechat(e, appoint) {
+                let that = this;
+                let statusText = appoint.WxOrder == 0 ? "关闭" : "开启";
+                this.$confirm('是否' + statusText + '课程预约?', '微信预约操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        stdId: appoint.StdId,
+                        wxOrder: e,
+                    };
+                    let postdata = qs.stringify(param);
+                    STTDetailWxOrderEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '预约已' + statusText + '!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            // 状态返回
+                            appoint.WxOrder = e == 0 ? 1 : 0;
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.appoint = "0"
+                    this.$message({
+                        type: 'info',
+                        message: '已取消当前操作'
+                    });
+                });
+            },
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ClassListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        if (json.Rs == null) return false
+                        that.panel.classOptions = turnClassResToOption(json.Rs);
+                        that.panel.classOptions.unshift({value: '0', label: '全部'})
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            vipSelect(stdId) {
+                let that = this;
+                // 筛选相同的stdid的classId
+                that.form.stdList.map(function (item) {
+                    if (item.value == stdId) {
+                        that.form.ConsumeHour = item.ConsumeHour;
+                        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);
+                            }
+                        })
+                    }
+                })
+            },
+            reMainSelect(userId) {
+                let that = this;
+                this.form.userList.filter((v) => {
+                    if (v.key == userId) {
+                        that.form.remain = v.RemainHour;
+                    }
+                })
 
-    },
-    ConfirmOrderAddByManager() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        stdId: this.form.stdId,
-        userId: this.form.userId,
-      };
-      let postdata = qs.stringify(param);
-      OrderAddByManager(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '预约添加成功!',
-            type: 'success'
-          });
-          this.getTableQuery2();
-          that.dialogMemberVisible = false;
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 选择日期
-    choiceTime(i) {
-      this.choiceDate = parseInt(i);
-      // 读取当前页
-      if (this.activeName == 'first') {
-        this.getTableQuery();
-      } else {
-        // second
-        this.getTableQuery2();
-      }
-    },
-    seeDetail(row) {
-      let that = this;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        classId: row.ClassId,
-        orderDate: this.weeks[dayIndex].orderDate,
-        stdId: row.StdId,
-      };
-      let postdata = qs.stringify(param);
-      VipUserOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          this.dialogTableVisible = true;
-          this.gridData = json.Rs;
-          console.log(123);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    format(percentage) {
-      return percentage === 100 ? '已满' : `${percentage}%`;
-    },
-    // 编辑
-    BtnOrderCancelByManager(row) {
-      let that = this;
-      this.$confirm('是否取消用户  ' + row.UserName + '  的预约?', '取消预约', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          orderId: row.OrderId,
-        };
-        let postdata = qs.stringify(param);
-        OrderCancelByManager(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.UserName + '取消预约成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery2();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消操作'
-        });
-      });
-    },
-    // 禁用
-    pauseRow(row) {
-      let that = this;
-      this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 0,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '禁用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消禁用'
-        });
-      });
-    },
-    // 启用
-    runRow(row) {
-      let that = this;
-      this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 1,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '启用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消启用'
-        });
-      });
-    },
-    // 关闭所有
-    allDialogClose() {
-      this.dialogVisible = false;
-      this.dialogGift = false;
-      this.dialogLesson = false;
-      this.dialogExpTime = false;
-      this.dialogLessonTable = false;
-    },
-    // 用户禁用 todo
-    // 用户启用 todo
-    // 有效期调整
-    ExpTimeChange() {
-      // 仅针对年费用户,使用日期格式
-      this.allDialogClose();
-      if (!this.multipleSelection.length) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,需要先选中至少一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      if (this.multipleSelection.length != 1) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,只能选中一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      let row = this.tableRadio;
-      if (parseInt(row.vipType) == 2) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,充值教练不能调整有效期',
-          type: 'error'
-        });
-        return false
-      }
-      this.form.expTime = row.expTime;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogExpTime = true;
-    },
-    // 课时调整
-    lessonChange() {
-      this.allDialogClose();
-      if (!this.multipleSelection.length) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,需要先选中至少一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      if (this.multipleSelection.length != 1) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,只能选中一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.lesson = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogLesson = true;
+            },
+            ClassSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    start: 1,//
+                    tableMax: 9999,//
+                };
+                let postdata = qs.stringify(param);
+                WaitingBeginClassList(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.stdList = turnStdToOption(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
 
-    },
-    // 赠送调整
-    giftChange() {
-      this.allDialogClose();
-      if (!this.multipleSelection.length) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,需要先选中至少一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      if (this.multipleSelection.length != 1) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,只能选中一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.gift = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogGift = true;
+            },
+            ConfirmOrderAddByManager() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: this.form.stdId,
+                    userId: this.form.userId,
+                };
+                let postdata = qs.stringify(param);
+                OrderAddByManager(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '预约添加成功!',
+                            type: 'success'
+                        });
+                        this.getTableQuery2();
+                        that.dialogMemberVisible = false;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 选择日期
+            choiceTime(i) {
+                this.choiceDate = parseInt(i);
+                // 读取当前页
+                if (this.activeName == 'first') {
+                    this.getTableQuery();
+                } else {
+                    // second
+                    this.getTableQuery2();
+                }
+            },
+            seeDetail(row) {
+                let that = this;
+                let dayIndex = parseInt(this.choiceDate);
+                let param = {
+                    token: localStorage.token,
+                    classId: row.ClassId,
+                    orderDate: this.weeks[dayIndex].orderDate,
+                    stdId: row.StdId,
+                };
+                let postdata = qs.stringify(param);
+                VipUserOrderQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.dialogTableVisible = true;
+                        this.gridData = json.Rs;
+                        console.log(123);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            format(percentage) {
+                return percentage === 100 ? '已满' : `${percentage}%`;
+            },
+            // 编辑
+            BtnOrderCancelByManager(row) {
+                let that = this;
+                this.$confirm('是否取消用户  ' + row.UserName + '  的预约?', '取消预约', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        orderId: row.OrderId,
+                    };
+                    let postdata = qs.stringify(param);
+                    OrderCancelByManager(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.UserName + '取消预约成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery2();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消操作'
+                    });
+                });
+            },
+            // 禁用
+            pauseRow(row) {
+                let that = this;
+                this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        Id: row.Id,
+                        status: 0,
+                    };
+                    let postdata = qs.stringify(param);
+                    testTable(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.name + '禁用成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消禁用'
+                    });
+                });
+            },
+            // 启用
+            runRow(row) {
+                let that = this;
+                this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        Id: row.Id,
+                        status: 1,
+                    };
+                    let postdata = qs.stringify(param);
+                    testTable(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.name + '启用成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消启用'
+                    });
+                });
+            },
+            // 关闭所有
+            allDialogClose() {
+                this.dialogVisible = false;
+                this.dialogGift = false;
+                this.dialogLesson = false;
+                this.dialogExpTime = false;
+                this.dialogLessonTable = false;
+            },
+            // 用户禁用 todo
+            // 用户启用 todo
+            // 有效期调整
+            ExpTimeChange() {
+                // 仅针对年费用户,使用日期格式
+                this.allDialogClose();
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                let row = this.tableRadio;
+                if (parseInt(row.vipType) == 2) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,充值教练不能调整有效期',
+                        type: 'error'
+                    });
+                    return false
+                }
+                this.form.expTime = row.expTime;
+                this.form.rowName = row.name;
+                this.dialogVisible = true;
+                this.dialogExpTime = true;
+            },
+            // 课时调整
+            lessonChange() {
+                this.allDialogClose();
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.lesson = row.Recovered;
+                this.form.rowName = row.name;
+                this.dialogVisible = true;
+                this.dialogLesson = true;
 
-    },
-    // 增删教练课程
-    lessonStudenChange() {
-      this.allDialogClose();
-      if (!this.multipleSelection.length) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,需要先选中至少一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      if (this.multipleSelection.length != 1) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,只能选中一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.gift = row.Recovered;
-      this.form.rowName = row.name;
-      this.dialogVisible = true;
-      this.dialogLessonTable = true;
-    },
-    // 确认提交新增教练
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.userCode) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.userCode)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,教练名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,教练名字数超过8个字');
-        return false
-      }
-      if (that.form.memo) {
-        if (that.form.memo.length > 200) {
-          this.$message.error('错了哦,备注字数超过200个字');
-          return false
-        }
-      }
+            },
+            // 赠送调整
+            giftChange() {
+                this.allDialogClose();
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.gift = row.Recovered;
+                this.form.rowName = row.name;
+                this.dialogVisible = true;
+                this.dialogGift = true;
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        name: that.form.name,
-        memberType: that.form.memberType,
-        lesson: that.form.lesson,
-        gift: that.form.gift,
-        memo: that.form.memo,
-        dialogValue: that.form.dialogValue,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '教练添加成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    confirmEditMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.userCode) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      console.log(that.form.userCode);
-      if (!globalCheckPhone(that.form.userCode)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,教练名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,教练名字数超过8个字');
-        return false
-      }
-      if (that.form.memo) {
-        if (that.form.memo.length > 200) {
-          this.$message.error('错了哦,备注字数超过200个字');
-          return false
-        }
-      }
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        name: that.form.name,
-        memberType: that.form.memberType,
-        lesson: that.form.lesson,
-        gift: that.form.gift,
-        memo: that.form.memo,
-        dialogValue: that.form.dialogValue,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '教练信息编辑成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交课时
-    confirmLesson() {
-      let that = this;
-      // checkNum
+            },
+            // 增删教练课程
+            lessonStudenChange() {
+                this.allDialogClose();
+                if (!this.multipleSelection.length) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.gift = row.Recovered;
+                this.form.rowName = row.name;
+                this.dialogVisible = true;
+                this.dialogLessonTable = true;
+            },
+            // 确认提交新增教练
+            confirmMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.userCode) {
+                    this.$message.error('错了哦,手机号不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.userCode)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (!that.form.name) {
+                    this.$message.error('错了哦,教练名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 8) {
+                    this.$message.error('错了哦,教练名字数超过8个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        lesson: that.form.lesson,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交赠送
-    confirmGift() {
-      let that = this;
-      // checkNum
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    name: that.form.name,
+                    memberType: that.form.memberType,
+                    lesson: that.form.lesson,
+                    gift: that.form.gift,
+                    memo: that.form.memo,
+                    dialogValue: that.form.dialogValue,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '教练添加成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.userCode) {
+                    this.$message.error('错了哦,手机号不能为空');
+                    return false
+                }
+                console.log(that.form.userCode);
+                if (!globalCheckPhone(that.form.userCode)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (!that.form.name) {
+                    this.$message.error('错了哦,教练名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 8) {
+                    this.$message.error('错了哦,教练名字数超过8个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    name: that.form.name,
+                    memberType: that.form.memberType,
+                    lesson: that.form.lesson,
+                    gift: that.form.gift,
+                    memo: that.form.memo,
+                    dialogValue: that.form.dialogValue,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '教练信息编辑成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交课时
+            confirmLesson() {
+                let that = this;
+                // checkNum
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        gift: that.form.gift,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '赠送课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交有效期
-    confirmExpTime() {
-      let that = this;
-      // checkNum
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    lesson: that.form.lesson,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交赠送
+            confirmGift() {
+                let that = this;
+                // checkNum
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        expTime: that.form.expTime,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '赠送课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交教练课程
-    confirmLessonTable() {
-      let that = this;
-      // checkNum
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    gift: that.form.gift,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '赠送课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交有效期
+            confirmExpTime() {
+                let that = this;
+                // checkNum
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        dialogValue: that.form.dialogValue,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '教练课程调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 新增预约
-    addMember() {
-      this.clearForm();
-      // 加载当前可选课程
-      this.getClassListByOrderDate();
-      this.dialogMemberVisible = true;
-      this.form.displayDay = this.weeks[this.choiceDate].data + ' ' + this.weeks[this.choiceDate].name;
-      this.btnType = 0;
-      this.dialogTitle = '新增预约';
-    },
-    // 加载当前可选课程
-    getClassListByOrderDate() {
-      let that = this;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      ClassListByOrderDate(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.form.stdList = turnStdToOption(json.Rs);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 删除
-    delList() {
-      let that = this;
-      // checkNum
-      if (!this.multipleSelection.length) {
-        that.$message({
-          showClose: true,
-          message: '错了哦,需要先选中至少一条记录',
-          type: 'error'
-        });
-        return false
-      }
-      if (this.multipleSelection.length != 1) {
-        that.$message({
-          showClose: true,
-          message: '错了哦,只能选中一条记录',
-          type: 'error'
-        });
-        return false
-      }
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    expTime: that.form.expTime,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '赠送课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交教练课程
+            confirmLessonTable() {
+                let that = this;
+                // checkNum
 
-      let detectorid = that.tableRadio.Id;
+                let param = {
+                    token: localStorage.token,
+                    userCode: that.form.userCode,
+                    dialogValue: that.form.dialogValue,
+                };
+                let postdata = qs.stringify(param);
+                testSelect(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '教练课程调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 新增预约
+            addMember() {
+                this.clearForm();
+                // 加载当前可选课程
+                this.getClassListByOrderDate();
+                this.dialogMemberVisible = true;
+                this.form.displayDay = this.weeks[this.choiceDate].data + ' ' + this.weeks[this.choiceDate].name;
+                this.btnType = 0;
+                this.form.ConsumeHour = 0;
+                this.dialogTitle = '新增预约';
+            },
+            // 加载当前可选课程
+            getClassListByOrderDate() {
+                let that = this;
+                let dayIndex = parseInt(this.choiceDate);
+                let param = {
+                    token: localStorage.token,
+                    orderDate: this.weeks[dayIndex].orderDate,
+                };
+                let postdata = qs.stringify(param);
+                ClassListByOrderDate(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.form.stdList = turnStdToOption(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 删除
+            delList() {
+                let that = this;
+                // checkNum
+                if (!this.multipleSelection.length) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,需要先选中至少一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
+                if (this.multipleSelection.length != 1) {
+                    that.$message({
+                        showClose: true,
+                        message: '错了哦,只能选中一条记录',
+                        type: 'error'
+                    });
+                    return false
+                }
 
-      let param = {
-        token: localStorage.token,
-        detectorid: detectorid,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
+                let detectorid = that.tableRadio.Id;
 
-      this.$confirm('此操作将永久删除该教练, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        testSelect(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的教练已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
-      this.getTableQuery2();
-      this.$message.success('查询完毕');
-    },
-    clearForm() {
-      // clear
-      this.form.stdId = '';
-      this.form.userId = '';
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-      this.form.userList = [];
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      ClassOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData = [];
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
+                let param = {
+                    token: localStorage.token,
+                    detectorid: detectorid,
+                    status: 9,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
 
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    getTableQuery2() {
-      let that = this;
-      that.loading = true;
-      let dayIndex = parseInt(this.choiceDate);
-      let param = {
-        token: localStorage.token,
-        classId: this.panel.classId,//
-        stdId: 0,//
-        name: this.panel.name,//
-        phone: this.panel.phone,//
-        orderDate: this.weeks[dayIndex].orderDate,
-      };
-      let postdata = qs.stringify(param);
-      VipUserOrderQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData2 = json.Rs;
-            that.recordsTotal2 = json.Rs.length;
-          } else {
-            that.allTableData2 = [];
-            that.recordsTotal2 = 0;
-          }
-          // 设置分页数据
-          that.setPaginations2();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
+                this.$confirm('此操作将永久删除该教练, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    testSelect(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的教练已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                let that = this;
+                that.serachBtnStatus = true;
+                let totalTime = 2
+                let clock = window.setInterval(() => {
+                    totalTime--
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000)
+                this.getTableQuery2();
+                this.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.stdId = '';
+                this.form.userId = '';
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+                this.form.userList = [];
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let dayIndex = parseInt(this.choiceDate);
+                let param = {
+                    token: localStorage.token,
+                    orderDate: this.weeks[dayIndex].orderDate,
+                };
+                let postdata = qs.stringify(param);
+                ClassOrderQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = [];
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
 
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 设置分页数据
-    setPaginations2() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal2;
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            getTableQuery2() {
+                let that = this;
+                that.loading = true;
+                let dayIndex = parseInt(this.choiceDate);
+                let param = {
+                    token: localStorage.token,
+                    classId: this.panel.classId,//
+                    stdId: 0,//
+                    name: this.panel.name,//
+                    phone: this.panel.phone,//
+                    orderDate: this.weeks[dayIndex].orderDate,
+                };
+                let postdata = qs.stringify(param);
+                VipUserOrderQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData2 = json.Rs;
+                            that.recordsTotal2 = json.Rs.length;
+                        } else {
+                            that.allTableData2 = [];
+                            that.recordsTotal2 = 0;
+                        }
+                        // 设置分页数据
+                        that.setPaginations2();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
 
-      // 默认分页
-      that.tableData2 = that.allTableData2.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
-        }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
-    },
-    // 过滤金额
-    filterMoney(value, row, column) {
-      let that = this;
-      return parseFloat(column).toFixed(2);
-    },
-    // 本周
-    getCurrWeekDays() {
-      let now = new Date();
-      let nowTime = now.getTime();
-      let day = now.getDay();
-      let oneDayTime = 24 * 60 * 60 * 1000;
-      let days = '';
-      let item = [];
-      let month = 0;
-      for (let i = 0; i < 7; i++) {
-        days = new Date(nowTime + (i - day) * oneDayTime);//显示周日
-        month = days.getMonth() + 1;
-        item = {
-          name: this.numberToWeek(days.getDay()),
-          data: month + '月' + days.getDate() + '日',
-          orderDate: new Date().getFullYear() + '-' + month + '-' + days.getDate()
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 设置分页数据
+            setPaginations2() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal2;
 
-        }
-        this.weeks.push(item)
-      }
-    },
+                // 默认分页
+                that.tableData2 = that.allTableData2.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                // that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return nonTfmtDate(column, 11);
+            },
+            // 过滤金额
+            filterMoney(value, row, column) {
+                let that = this;
+                return parseFloat(column).toFixed(2);
+            },
+            // 本周
+            getCurrWeekDays() {
+                let now = new Date();
+                let nowTime = now.getTime();
+                let day = now.getDay();
+                let oneDayTime = 24 * 60 * 60 * 1000;
+                let days = '';
+                let item = [];
+                let month = 0;
+                for (let i = 0; i < 7; i++) {
+                    days = new Date(nowTime + (i - day) * oneDayTime);//显示周日
+                    month = days.getMonth() + 1;
+                    item = {
+                        name: this.numberToWeek(days.getDay()),
+                        data: month + '月' + days.getDate() + '日',
+                        orderDate: new Date().getFullYear() + '-' + month + '-' + days.getDate()
 
-    // 获取未来7天的
-    getFurtherDays() {
-      let now = new Date();
-      let nowTime = now.getTime();
-      let oneDayTime = 24 * 60 * 60 * 1000;
-      let days = '';
-      let item = [];
-      let month = 0;
-      let day = 0;
-      for (let i = 0; i < 7; i++) {
-        days = new Date(nowTime + (i) * oneDayTime);//显示周日
-        month = days.getMonth() + 1;
-        day = days.getDate();
-        month = month < 10 ? '0' + month : month;
-        day = day < 10 ? '0' + day : day;
-        item = {
-          name: this.numberToWeek(days.getDay()),
-          data: days.getMonth() + 1 + '月' + days.getDate() + '日',
-          orderDate: new Date().getFullYear() + '-' + month + '-' + day
+                    }
+                    this.weeks.push(item)
+                }
+            },
+
+            // 获取未来7天的
+            getFurtherDays() {
+                let now = new Date();
+                let nowTime = now.getTime();
+                let oneDayTime = 24 * 60 * 60 * 1000;
+                let days = '';
+                let item = [];
+                let month = 0;
+                let day = 0;
+                for (let i = 0; i < 7; i++) {
+                    days = new Date(nowTime + (i) * oneDayTime);//显示周日
+                    month = days.getMonth() + 1;
+                    day = days.getDate();
+                    month = month < 10 ? '0' + month : month;
+                    day = day < 10 ? '0' + day : day;
+                    item = {
+                        name: this.numberToWeek(days.getDay()),
+                        data: days.getMonth() + 1 + '月' + days.getDate() + '日',
+                        orderDate: new Date().getFullYear() + '-' + month + '-' + day
+                    }
+                    this.weeks.push(item)
+                }
+                this.getTableQuery();
+                this.getTableQuery2();
+            },
+            numberToWeek(val) {
+                switch (parseInt(val)) {
+                    case 1:
+                        return '星期一';
+                        break;
+                    case 2:
+                        return '星期二';
+                        break;
+                    case 3:
+                        return '星期三';
+                        break;
+                    case 4:
+                        return '星期四';
+                        break;
+                    case 5:
+                        return '星期五';
+                        break;
+                    case 6:
+                        return '星期六';
+                        break;
+                    case 0:
+                        return '星期天';
+                        break;
+                }
+            }
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'appoint') {
+                    if (this.$route.query.page == 'second') {
+                        this.activeName = 'second';
+                        this.panel.name = this.$route.query.name;
+                        // second
+                        this.getTableQuery2();
+                    }
+                }
+
+            },
+            activeName(val) {
+                // 重置一次选择
+                this.tableRadio = [];
+                if (val == 'first') {
+                    this.getTableQuery();
+                } else {
+                    // second
+                    this.getTableQuery2();
+                }
+            },
         }
-        this.weeks.push(item)
-      }
-      this.getTableQuery();
-      this.getTableQuery2();
-    },
-    numberToWeek(val) {
-      switch (parseInt(val)) {
-        case 1:
-          return '星期一';
-          break;
-        case 2:
-          return '星期二';
-          break;
-        case 3:
-          return '星期三';
-          break;
-        case 4:
-          return '星期四';
-          break;
-        case 5:
-          return '星期五';
-          break;
-        case 6:
-          return '星期六';
-          break;
-        case 0:
-          return '星期天';
-          break;
-      }
     }
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'appoint') {
-        if (this.$route.query.page == 'second') {
-          this.activeName = 'second';
-          this.panel.name = this.$route.query.name;
-          // second
-          this.getTableQuery2();
-        }
-      }
-
-    },
-    activeName(val) {
-      // 重置一次选择
-      this.tableRadio = [];
-      if (val == 'first') {
-        this.getTableQuery();
-      } else {
-        // second
-        this.getTableQuery2();
-      }
-    },
-  }
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+    @import "../assets/css/panel.css";
 
-.context {
-  height: 770px;
+    .context {
+        height: 770px;
 
-  overflow-y: scroll;
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-}
+        overflow-y: scroll;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
 
-.change button {
-  float: left;
-}
+    .change button {
+        float: left;
+    }
 
-.change button.pull-right {
-  float: right;
-}
+    .change button.pull-right {
+        float: right;
+    }
 
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
 
-.dialogContent {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-.dialogContent .pull-left {
-  width: 30%;
-  float: left;
-}
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
 
-.dialogContent .pull-right {
-  width: 70%;
-  float: right;
-}
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
 
-.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;
-}
+    .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;
+    }
 
-.timeList {
-  width: 800px;
-  overflow: hidden;
-  float: right;
-  position: relative;
-  z-index: 100;
-  cursor: pointer;
-}
+    .timeList {
+        width: 800px;
+        overflow: hidden;
+        float: right;
+        position: relative;
+        z-index: 100;
+        cursor: pointer;
+    }
 
-.timeList ul {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  list-style: none;
-}
+    .timeList ul {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        list-style: none;
+    }
 
-.timeList li {
-  width: 100px;
-  overflow: hidden;
-  list-style: none;
-  float: left;
-  margin-right: 6px;
-  border: 1px solid #ccc;
-  border-bottom: 0;
-  text-align: center;
-  height: 40px;
-  background: #fff;
-  z-index: 222;
-}
+    .timeList li {
+        width: 100px;
+        overflow: hidden;
+        list-style: none;
+        float: left;
+        margin-right: 6px;
+        border: 1px solid #ccc;
+        border-bottom: 0;
+        text-align: center;
+        height: 40px;
+        background: #fff;
+        z-index: 222;
+    }
 
-em {
-  font-style: normal;
-}
+    em {
+        font-style: normal;
+    }
 
-.timeList em {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-size: 14px;
-  text-align: center;
-}
+    .timeList em {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-size: 14px;
+        text-align: center;
+    }
 
-.timeList span {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  font-size: 12px;
-  text-align: center;
-}
+    .timeList span {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-size: 12px;
+        text-align: center;
+    }
 
-.timeList li.active {
-  border: 1px solid #3799FF;
-  border-bottom: 0;
-}
+    .timeList li.active {
+        border: 1px solid #3799FF;
+        border-bottom: 0;
+    }
 
-.timeList li.active em {
-  color: #3799FF;
-}
+    .timeList li.active em {
+        color: #3799FF;
+    }
 
-.timeList li.active span {
-  color: #3799FF;
-}
+    .timeList li.active span {
+        color: #3799FF;
+    }
 
-.panel_control /deep/ .el-input {
-  max-width: 140px;
-  float: left;
-}
+    .panel_control /deep/ .el-input {
+        max-width: 140px;
+        float: left;
+    }
 
-.panel-body em {
-  float: left;
-  line-height: 40px;
-  margin-right: 10px;
-}
+    .panel-body em {
+        float: left;
+        line-height: 40px;
+        margin-right: 10px;
+    }
 
-.gary {
-  border: 1px solid #ccc;
-  border-bottom: 0;
-  color: #ccc;
-}
+    .gary {
+        border: 1px solid #ccc;
+        border-bottom: 0;
+        color: #ccc;
+    }
 
-.pull-right {
-  float: right;
-}
+    .pull-right {
+        float: right;
+    }
 
-.lessons {
-  padding: 1px 7px;
-  border-radius: 250px;
-  float: left;
-  color: #000;
-}
+    .lessons {
+        padding: 1px 7px;
+        border-radius: 250px;
+        float: left;
+        color: #000;
+    }
 
-/deep/ .el-progress__text {
-  position: relative;
-  top: 1px;
-  float: right;
-  line-height: 14px;
-  height: 16px;
-}
+    /deep/ .el-progress__text {
+        position: relative;
+        top: 1px;
+        float: right;
+        line-height: 14px;
+        height: 16px;
+    }
 
-/deep/ .el-progress-bar {
-  width: 190px;
-  float: left;
-  overflow: hidden;
-  margin-top: 5px;
-}
+    /deep/ .el-progress-bar {
+        width: 190px;
+        float: left;
+        overflow: hidden;
+        margin-top: 5px;
+    }
 
-.timeList li.active {
-  color: #fff;
-  background: #409EFF;
-}
+    .timeList li.active {
+        color: #fff;
+        background: #409EFF;
+    }
 
-.timeList li.active span, .timeList li.active em {
-  color: #fff;
-}
+    .timeList li.active span, .timeList li.active em {
+        color: #fff;
+    }
 
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .panel-body em {
-    font-size: 12px;
-  }
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .panel-body em {
+            font-size: 12px;
+        }
 
-  .timeList {
-    width: 510px;
-  }
+        .timeList {
+            width: 510px;
+        }
 
-  .timeList li {
-    width: 60px;
-    font-size: 12px;
-  }
+        .timeList li {
+            width: 60px;
+            font-size: 12px;
+        }
 
-  .timeList em {
-    font-size: 12px;
-  }
+        .timeList em {
+            font-size: 12px;
+        }
 
-  .timeList span {
-    font-size: 12px;
-  }
-}
+        .timeList span {
+            font-size: 12px;
+        }
+    }
 </style>

+ 17 - 4
pc/src/views/courseEdit.vue

@@ -161,7 +161,7 @@
                             </el-button>
                             <el-button type="warning" round v-if="scope.row.Status == 2" size="mini"
                                        @click="pauseRow(scope.row,1)">
-                                撤销
+                                上课
                             </el-button>
                             <el-button type="danger" round v-if="scope.row.Status == 3" size="mini"
                                        @click="getClassOverDetailDel(scope.row)">
@@ -277,7 +277,14 @@
                     multipleSort: false,
                     loading: false,
                     fileList: [],
-                    bindList: [],
+                    bindList: [
+                        {
+                            value: 0,
+                            HrId: 0,
+                            label: "请选择心率带",
+                            InVenueNo: 0
+                        }
+                    ],
                     multipleSelection: [],
                     detectedmac: '',
                     BeginTime: '',
@@ -667,7 +674,7 @@
                     stdId: row.StdId,
                     cfId: row.CfId,
                 };
-                this.$confirm('是否删除用户  ' + row.Name + '  的下课记录?', '提示', {
+                this.$confirm('是否删除用户  ' + row.Name + '?', '提示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -758,10 +765,15 @@
                         that.loading = false;
                         if (json.Rs) {
                             that.panel.bindList = json.Rs;
+                            console.log(json.Rs);
+                            let HrTypeText = "";
                             json.Rs.map(function (item, i) {
-                                item.label = "Sn:" + item.Sn;
+                                console.log(123);
+                                HrTypeText = item.HrType == 1 ? "(私有)" : "";
+                                item.label =  "Sn:" + item.Sn + HrTypeText;
                             });
                             that.panel.bindList.push({
+                                value: 0,
                                 HrId: 0,
                                 label: "请选择心率带",
                                 InVenueNo: 0
@@ -981,6 +993,7 @@
         text-overflow: ellipsis;
         float: left;
     }
+
     .cell em {
         margin-left: 5px;
         margin-right: 5px;

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

@@ -280,7 +280,7 @@
                     dialogValue: [],//穿梭已选
                     ClassTypeOptions: [
                         {value: 1, label: '团课'},
-                        {value: 2, label: '竞技PK'},
+                        // {value: 2, label: '竞技PK'},
                         {value: 3, label: '私教'},
                     ],
                     PKTypeOptions: [

+ 91 - 49
pc/src/views/heartEquip.vue

@@ -3,8 +3,8 @@
         <div class="panel">
             <h5>心率设备</h5>
             <div class="likeTab">
-                <el-button type="primary" @click="goType('heartEquip')">共有心率设备</el-button>
-                <el-button type="" @click="goType('heartEquipPerson')">私有共有心率设备</el-button>
+                <el-button type="primary" @click="goType('heartEquip')">场馆心率设备</el-button>
+                <el-button type="" @click="goType('heartEquipPerson')">私有心率设备</el-button>
             </div>
             <div class="panel-body">
                 <div class="panel_control">
@@ -35,7 +35,7 @@
         <div class="change">
             <el-button @click="addMember" type="primary">新增心率设备</el-button>
             <el-button @click="editList">编辑心率设备</el-button>
-            <el-button @click="delList" type="danger">删除心率设备</el-button>
+            <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
         </div>
         <div class="table">
             <el-table
@@ -60,13 +60,13 @@
 
                 <!--width="50">-->
                 <!--</el-table-column>-->
-                <el-table-column
-                        prop="InVenueNo"
-                        label="馆内编号"
-                        align="center"
-                        width="90"
-                >
-                </el-table-column>
+                <!--<el-table-column-->
+                <!--prop="InVenueNo"-->
+                <!--label="馆内编号"-->
+                <!--align="center"-->
+                <!--width="90"-->
+                <!--&gt;-->
+                <!--</el-table-column>-->
                 <el-table-column
                         prop="Sn"
                         label="序列号"
@@ -94,31 +94,37 @@
                         <!--<el-button @click="takeBack(scope.row)" type="danger" v-if="!scope.row.BindUserId">{{scope.row.UserName}} 设备收回</el-button>-->
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        align="center"
-                        width="90"
-                >
-                    <template slot-scope="scope">
-                        <!--1:启用  8:暂停  9:删除-->
-                        <span v-if="scope.row.Status == 1" style="color: #67c23a">已启用</span>
-                        <span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>
-                        <span v-if="scope.row.Status == 9" style="color: red">已删除</span>
-                    </template>
-                </el-table-column>
+                <!--<el-table-column-->
+                <!--prop="Status"-->
+                <!--label="状态"-->
+                <!--align="center"-->
+                <!--width="90"-->
+                <!--&gt;-->
+                <!--<template slot-scope="scope">-->
+                <!--&lt;!&ndash;1:启用  8:暂停  9:删除&ndash;&gt;-->
+                <!--<span v-if="scope.row.Status == 1" style="color: #67c23a">已启用</span>-->
+                <!--<span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>-->
+                <!--<span v-if="scope.row.Status == 9" style="color: red">已删除</span>-->
+                <!--</template>-->
+                <!--</el-table-column>-->
                 <el-table-column
                         prop="id"
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="success" v-if="scope.row.Status == 8" size="mini"
-                                   @click="pauseRow(scope.row,1)">
-                            启用
-                        </el-button>
-                        <el-button type="warning" v-if="scope.row.Status == 1" size="mini"
-                                   @click="pauseRow(scope.row,8)">
-                            暂停
+
+                        <!--<el-button type="success" v-if="scope.row.Status == 8" size="mini"-->
+                        <!--@click="pauseRow(scope.row,1)">-->
+                        <!--启用-->
+                        <!--</el-button>-->
+                        <!--<el-button type="warning" v-if="scope.row.Status == 1" size="mini"-->
+                        <!--@click="pauseRow(scope.row,8)">-->
+                        <!--禁用-->
+                        <!--</el-button>-->
+
+                        <el-button type="danger"  size="mini"
+                                   @click="pauseRowDel(scope.row)">
+                            删除
                         </el-button>
 
                         <el-button type="text" @click="goPage(scope.row)">记录</el-button>
@@ -137,9 +143,9 @@
             <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.venueNo"></el-input>
-                        </el-form-item>
+                        <!--<el-form-item label="馆内编号" :required="true">-->
+                        <!--<el-input v-model="form.venueNo"></el-input>-->
+                        <!--</el-form-item>-->
                         <el-form-item label="序列号" :required="true">
                             <el-input v-model="form.sn"></el-input>
                         </el-form-item>
@@ -461,6 +467,42 @@
                     });
                 });
             },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+
+                let param = {
+                    token: localStorage.token,
+                    hrId: row.HrId,
+                    status: 9,//1:启用,8:暂停,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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
             // 关闭所有
             allDialogClose() {
                 this.dialogVisible = false;
@@ -481,14 +523,14 @@
                     this.$message.error('错了哦,编号不能超过20个字符');
                     return false
                 }
-                if (!that.form.venueNo) {
-                    this.$message.error('错了哦,实体序列号不能为空');
-                    return false
-                }
-                if (that.form.venueNo.length > 30) {
-                    this.$message.error('错了哦,实体序列号不能超过30个字符');
-                    return false
-                }
+                // if (!that.form.venueNo) {
+                //     this.$message.error('错了哦,实体序列号不能为空');
+                //     return false
+                // }
+                // if (that.form.venueNo.length > 30) {
+                //     this.$message.error('错了哦,实体序列号不能超过30个字符');
+                //     return false
+                // }
 
                 let param = {
                     token: localStorage.token,
@@ -525,14 +567,14 @@
                     this.$message.error('错了哦,编号不能超过20个字符');
                     return false
                 }
-                if (!that.form.venueNo) {
-                    this.$message.error('错了哦,实体序列号不能为空');
-                    return false
-                }
-                if (that.form.venueNo.length > 30) {
-                    this.$message.error('错了哦,实体序列号不能超过30个字符');
-                    return false
-                }
+                // if (!that.form.venueNo) {
+                //     this.$message.error('错了哦,实体序列号不能为空');
+                //     return false
+                // }
+                // if (that.form.venueNo.length > 30) {
+                //     this.$message.error('错了哦,实体序列号不能超过30个字符');
+                //     return false
+                // }
 
                 let param = {
                     token: localStorage.token,

+ 63 - 24
pc/src/views/heartEquipPerson.vue

@@ -3,8 +3,8 @@
         <div class="panel">
             <h5>心率设备</h5>
             <div class="likeTab">
-                <el-button type="" @click="goType('heartEquip')">共有心率设备</el-button>
-                <el-button type="primary" @click="goType('heartEquipPerson')">私有共有心率设备</el-button>
+                <el-button type="" @click="goType('heartEquip')">场馆心率设备</el-button>
+                <el-button type="primary" @click="goType('heartEquipPerson')">私有心率设备</el-button>
             </div>
             <div class="panel-body">
                 <div class="panel_control">
@@ -35,7 +35,7 @@
         <div class="change">
             <el-button @click="addMember" type="primary">新增心率设备</el-button>
             <el-button @click="editList">编辑心率设备</el-button>
-            <el-button @click="delList" type="danger">删除心率设备</el-button>
+            <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
         </div>
         <div class="table">
             <el-table
@@ -87,33 +87,36 @@
                         <!--<el-button @click="takeBack(scope.row)" type="danger" v-if="!scope.row.BindUserId">{{scope.row.UserName}} 设备收回</el-button>-->
                     </template>
                 </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        align="center"
-                        width="90"
-                >
-                    <template slot-scope="scope">
-                        <!--1:启用  8:暂停  9:删除-->
-                        <span v-if="scope.row.Status == 1" style="color: #67c23a">已启用</span>
-                        <span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>
-                        <span v-if="scope.row.Status == 9" style="color: red">已删除</span>
-                    </template>
-                </el-table-column>
+                <!--<el-table-column-->
+                        <!--prop="Status"-->
+                        <!--label="状态"-->
+                        <!--align="center"-->
+                        <!--width="90"-->
+                <!--&gt;-->
+                    <!--<template slot-scope="scope">-->
+                        <!--&lt;!&ndash;1:启用  8:暂停  9:删除&ndash;&gt;-->
+                        <!--<span v-if="scope.row.Status == 1" style="color: #67c23a">已启用</span>-->
+                        <!--<span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>-->
+                        <!--<span v-if="scope.row.Status == 9" style="color: red">已删除</span>-->
+                    <!--</template>-->
+                <!--</el-table-column>-->
                 <el-table-column
                         prop="id"
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="success" v-if="scope.row.Status == 8" size="mini"
-                                   @click="pauseRow(scope.row,1)">
-                            启用
-                        </el-button>
-                        <el-button type="warning" v-if="scope.row.Status == 1" size="mini"
-                                   @click="pauseRow(scope.row,8)">
-                            暂停
+                        <!--<el-button type="success" v-if="scope.row.Status == 8" size="mini"-->
+                                   <!--@click="pauseRow(scope.row,1)">-->
+                            <!--启用-->
+                        <!--</el-button>-->
+                        <!--<el-button type="warning" v-if="scope.row.Status == 1" size="mini"-->
+                                   <!--@click="pauseRow(scope.row,8)">-->
+                            <!--暂停-->
+                        <!--</el-button>-->
+                        <el-button type="danger"  size="mini"
+                                   @click="pauseRowDel(scope.row)">
+                            删除
                         </el-button>
-
                         <el-button type="text" @click="goPage(scope.row)">记录</el-button>
                     </template>
                 </el-table-column>
@@ -482,6 +485,42 @@
                     });
                 });
             },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+
+                let param = {
+                    token: localStorage.token,
+                    hrId: row.HrId,
+                    status: 9,//1:启用,8:暂停,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);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
             // 关闭所有
             allDialogClose() {
                 this.dialogVisible = false;

+ 54 - 10
pc/src/views/heartLog.vue

@@ -8,7 +8,7 @@
         <div class="change">
             <el-button @click="addMember" type="primary">新增区域设备</el-button>
             <el-button @click="editList">编辑区域设备</el-button>
-            <el-button @click="delList" type="danger">删除区域设备</el-button>
+            <!--<el-button @click="delList" type="danger">删除区域设备</el-button>-->
         </div>
         <div class="table">
             <el-table
@@ -66,8 +66,12 @@
                         prop="address"
                         label="操作">
                     <template slot-scope="scope">
-                        <el-button type="success" @click="run(scope.row)" v-if="scope.row.Status == 8">开启</el-button>
-                        <el-button type="danger" @click="pause(scope.row)" v-if="scope.row.Status == 1">暂停</el-button>
+                        <!--<el-button type="success" @click="run(scope.row)" v-if="scope.row.Status == 8">开启</el-button>-->
+                        <!--<el-button type="danger" @click="pause(scope.row)" v-if="scope.row.Status == 1">暂停</el-button>-->
+                        <el-button type="danger"  size="mini"
+                                   @click="pauseRowDel(scope.row)">
+                            删除
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -169,6 +173,43 @@
                     path: '/region', query: {}
                 });
             },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: row.SvId,
+                    eqId: row.EqId,
+                    status: 9,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+                this.$confirm('此操作将永久删除该区域设备, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的区域设备已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
             clearForm() {
                 // clear
                 this.form.name = '';
@@ -181,12 +222,12 @@
             handleSelectionChange(val) {
                 this.multipleSelection = val;
             },
-            // 新增心率设备
+            // 新增区域设备
             addMember() {
                 this.clearForm();
                 this.dialogMemberVisible = true;
                 this.btnType = 0;
-                this.dialogTitle = '新增心率设备'
+                this.dialogTitle = '新增区域设备'
             },
             clickChange(item) {
                 this.tableRadio = item
@@ -209,7 +250,7 @@
                 };
                 let postdata = qs.stringify(param);
 
-                this.$confirm('此操作将永久删除该心率设备, 是否继续?', '提示', {
+                this.$confirm('此操作将永久删除该区域设备, 是否继续?', '提示', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -219,7 +260,7 @@
                         if (json.Code == 0) {
                             that.$message({
                                 showClose: true,
-                                message: '选中的心率设备已删除!',
+                                message: '选中的区域设备已删除!',
                                 type: 'success'
                             });
                             // 重载列表
@@ -257,11 +298,11 @@
                 this.form.memo = row.Memo;
                 this.form.adminType = row.AdminType;
                 this.dialogVisible = true;
-                this.dialogTitle = '编辑心率设备';
+                this.dialogTitle = '编辑区域设备';
                 this.form.btnType = 1;
                 this.dialogMemberVisible = true
             },
-            // 确认提交新增心率设备
+            // 确认提交新增区域设备
             confirmMember() {
                 let that = this;
                 // checkNum
@@ -331,7 +372,7 @@
                         that.getTableQuery();
                         that.$message({
                             showClose: true,
-                            message: '心率设备信息编辑成功!',
+                            message: '区域设备信息编辑成功!',
                             type: 'success'
                         });
                     } else {
@@ -602,6 +643,9 @@
     /deep/ .el-select {
         width: 100%;
     }
+    .panel h5 {
+        font-size: 24px;
+    }
 
     /*ipad only*/
     @media only screen and (max-width: 1366px) {

+ 129 - 69
tv/.idea/workspace.xml

@@ -23,15 +23,19 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="测试翻页问题">
-      <change afterPath="$PROJECT_DIR$/src/views/test.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/views/Member.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Member.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/Global.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/appoint.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/appoint.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/courses.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courses.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/heartEquipPerson.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartEquipPerson.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/Global.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/router/index.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/views/Index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Index.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Main.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Rank.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Rank.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/views/Wait.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Wait.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/test.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/test.vue" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -44,15 +48,16 @@
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
   <component name="FileEditorManager">
-    <splitter split-orientation="horizontal" split-proportion="0.5">
+    <splitter split-orientation="horizontal" split-proportion="0.689334">
       <split-first>
         <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
           <file pinned="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
               <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="168">
-                  <caret line="8" column="33" lean-forward="true" selection-start-line="8" selection-start-column="33" selection-end-line="8" selection-end-column="33" />
+                <state relative-caret-position="374">
+                  <caret line="397" selection-start-line="397" selection-end-line="397" />
                   <folding>
+                    <element signature="e#5086#5130#0" expanded="true" />
                     <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
                     <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
                   </folding>
@@ -60,11 +65,45 @@
               </provider>
             </entry>
           </file>
+          <file pinned="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+              <provider selected="true" editor-type-id="text-editor">
+                <state relative-caret-position="105">
+                  <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
+                  <folding>
+                    <element signature="n#li#0;n#el-col#1;n#el-row#0;n#div#0;n#div#0;n#template#0;n#!!top" />
+                  </folding>
+                </state>
+              </provider>
+            </entry>
+          </file>
           <file pinned="false" current-in-tab="true">
+            <entry file="file://$PROJECT_DIR$/src/main.js">
+              <provider selected="true" editor-type-id="text-editor">
+                <state relative-caret-position="294">
+                  <caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
+                  <folding>
+                    <element signature="e#0#21#0" expanded="true" />
+                    <element signature="e#136#171#0" expanded="true" />
+                  </folding>
+                </state>
+              </provider>
+            </entry>
+          </file>
+          <file pinned="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
               <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="357">
-                  <caret line="57" column="68" lean-forward="true" selection-start-line="57" selection-start-column="68" selection-end-line="57" selection-end-column="68" />
+                <state relative-caret-position="294">
+                  <caret line="54" lean-forward="true" selection-start-line="54" selection-end-line="54" />
+                </state>
+              </provider>
+            </entry>
+          </file>
+          <file pinned="false" current-in-tab="false">
+            <entry file="file://$PROJECT_DIR$/src/Global.js">
+              <provider selected="true" editor-type-id="text-editor">
+                <state relative-caret-position="231">
+                  <caret line="11" column="12" lean-forward="true" selection-start-line="11" selection-start-column="12" selection-end-line="11" selection-end-column="12" />
                 </state>
               </provider>
             </entry>
@@ -72,8 +111,11 @@
           <file pinned="false" current-in-tab="false">
             <entry file="file://$PROJECT_DIR$/src/views/test.vue">
               <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="42">
-                  <caret line="2" column="36" lean-forward="true" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" />
+                <state relative-caret-position="84">
+                  <caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
+                  <folding>
+                    <element signature="e#307#463#0" expanded="true" />
+                  </folding>
                 </state>
               </provider>
             </entry>
@@ -85,8 +127,11 @@
           <file pinned="false" current-in-tab="true">
             <entry file="file://$PROJECT_DIR$/src/views/test.vue">
               <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="294">
-                  <caret line="14" column="26" selection-start-line="14" selection-start-column="16" selection-end-line="14" selection-end-column="26" />
+                <state relative-caret-position="84">
+                  <caret line="4" column="52" selection-start-line="4" selection-start-column="52" selection-end-line="4" selection-end-column="52" />
+                  <folding>
+                    <element signature="e#303#459#0" expanded="true" />
+                  </folding>
                 </state>
               </provider>
             </entry>
@@ -107,10 +152,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>transition</find>
-      <find>clearInterval</find>
-      <find>curIndex</find>
-      <find>getcurIndex</find>
       <find>bottom</find>
       <find>fmtNum</find>
       <find>console.log(&quot;ClassOn:&quot; + json.ClassOn);</find>
@@ -137,6 +178,10 @@
       <find>test</find>
       <find>recordMain</find>
       <find>:autoplay=&quot;autoplayStatus&quot;</find>
+      <find>ClassOn</find>
+      <find>headImg</find>
+      <find>GetCalorieStatsQuery</find>
+      <find>getcurIndex</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
@@ -167,7 +212,6 @@
         <option value="$PROJECT_DIR$/src/assets/css/mainBk.css" />
         <option value="$PROJECT_DIR$/src/assets/css/mainBk2.css" />
         <option value="$PROJECT_DIR$/package.json" />
-        <option value="$PROJECT_DIR$/src/main.js" />
         <option value="$PROJECT_DIR$/test.html" />
         <option value="$PROJECT_DIR$/src/components/newRecord.vue" />
         <option value="$PROJECT_DIR$/src/Mock/index.js" />
@@ -180,15 +224,16 @@
         <option value="$PROJECT_DIR$/src/api/Navs.js" />
         <option value="$PROJECT_DIR$/src/components/Headside.vue" />
         <option value="$PROJECT_DIR$/src/views/pk.vue" />
-        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
-        <option value="$PROJECT_DIR$/src/views/Main.vue" />
         <option value="$PROJECT_DIR$/vue.config.js" />
         <option value="$PROJECT_DIR$/src/Global.js" />
         <option value="$PROJECT_DIR$/README.md" />
         <option value="$PROJECT_DIR$/src/router/index.js" />
+        <option value="$PROJECT_DIR$/src/views/Index.vue" />
+        <option value="$PROJECT_DIR$/src/views/Main.vue" />
         <option value="$PROJECT_DIR$/src/views/test.vue" />
         <option value="$PROJECT_DIR$/src/views/Wait.vue" />
-        <option value="$PROJECT_DIR$/src/views/Index.vue" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
+        <option value="$PROJECT_DIR$/src/main.js" />
       </list>
     </option>
   </component>
@@ -201,7 +246,7 @@
   <component name="ProjectFrameBounds" extendedState="6">
     <option name="x" value="-2568" />
     <option name="y" value="-8" />
-    <option name="width" value="1296" />
+    <option name="width" value="2576" />
     <option name="height" value="1395" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
@@ -338,7 +383,7 @@
       <workItem from="1605668164423" duration="15041000" />
       <workItem from="1605747566783" duration="13000" />
       <workItem from="1605775278675" duration="48765000" />
-      <workItem from="1606196990553" duration="18104000" />
+      <workItem from="1606196990553" duration="24154000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -452,14 +497,21 @@
       <option name="project" value="LOCAL" />
       <updated>1606269359713</updated>
     </task>
-    <option name="localTasksCounter" value="17" />
+    <task id="LOCAL-00017" summary="测试翻页问题">
+      <created>1606295611593</created>
+      <option name="number" value="00017" />
+      <option name="presentableId" value="LOCAL-00017" />
+      <option name="project" value="LOCAL" />
+      <updated>1606295611593</updated>
+    </task>
+    <option name="localTasksCounter" value="18" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="296961000" />
+    <option name="totallyTimeSpent" value="303011000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-2568" y="-8" width="2576" height="1395" extended-state="6" />
+    <frame x="-2568" y="-8" width="2576" height="1395" extended-state="7" />
     <editor active="true" />
     <layout>
       <window_info content_ui="combo" id="Project" order="0" weight="0.14393939" />
@@ -476,7 +528,7 @@
       <window_info anchor="bottom" id="PHP-CGI Server" order="7" />
       <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.50079745" side_tool="true" weight="0.3319185" />
       <window_info anchor="bottom" id="Version Control" order="9" weight="0.3285594" />
-      <window_info anchor="bottom" id="Terminal" order="10" weight="0.17487267" />
+      <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.17438921" />
       <window_info anchor="bottom" id="Database Changes" order="11" />
       <window_info anchor="bottom" id="TypeScript" order="12" weight="0.3293718" />
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
@@ -544,7 +596,8 @@
     <MESSAGE value="获取设备的uuid" />
     <MESSAGE value="test" />
     <MESSAGE value="升级链接使用正式版" />
-    <option name="LAST_COMMIT_MESSAGE" value="升级链接使用正式版" />
+    <MESSAGE value="测试翻页问题" />
+    <option name="LAST_COMMIT_MESSAGE" value="测试翻页问题" />
   </component>
   <component name="WindowStateProjectService">
     <state x="-1830" y="274" width="1099" height="859" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1604022799787">
@@ -712,17 +765,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="294">
-          <caret line="14" column="18" selection-start-line="14" selection-start-column="14" selection-end-line="14" selection-end-column="18" />
-          <folding>
-            <element signature="e#0#21#0" expanded="true" />
-            <element signature="e#136#171#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/components/upimg.vue">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="399">
@@ -753,13 +795,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="189">
-          <caret line="322" column="55" lean-forward="true" selection-start-line="322" selection-start-column="55" selection-end-line="322" selection-end-column="55" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="432">
@@ -780,20 +815,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-377">
-          <caret line="61" selection-start-line="61" selection-end-line="61" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/Global.js">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="189">
-          <caret line="9" column="15" selection-start-line="9" selection-start-column="15" selection-end-line="9" selection-end-column="15" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/vue.config.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="420">
@@ -811,28 +832,67 @@
         </state>
       </provider>
     </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="290">
+          <caret line="387" column="40" selection-start-line="387" selection-start-column="33" selection-end-line="387" selection-end-column="40" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/Global.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="231">
+          <caret line="11" column="12" lean-forward="true" selection-start-line="11" selection-start-column="12" selection-end-line="11" selection-end-column="12" />
+        </state>
+      </provider>
+    </entry>
     <entry file="file://$PROJECT_DIR$/src/views/test.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="42">
-          <caret line="2" column="36" lean-forward="true" selection-start-line="2" selection-start-column="36" selection-end-line="2" selection-end-column="36" />
+        <state relative-caret-position="84">
+          <caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
+          <folding>
+            <element signature="e#307#463#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="294">
+          <caret line="54" lean-forward="true" selection-start-line="54" selection-end-line="54" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="168">
-          <caret line="8" column="33" lean-forward="true" selection-start-line="8" selection-start-column="33" selection-end-line="8" selection-end-column="33" />
+        <state relative-caret-position="374">
+          <caret line="397" selection-start-line="397" selection-end-line="397" />
           <folding>
+            <element signature="e#5086#5130#0" expanded="true" />
             <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
             <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
+    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="357">
-          <caret line="57" column="68" lean-forward="true" selection-start-line="57" selection-start-column="68" selection-end-line="57" selection-end-column="68" />
+        <state relative-caret-position="105">
+          <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
+          <folding>
+            <element signature="n#li#0;n#el-col#1;n#el-row#0;n#div#0;n#div#0;n#template#0;n#!!top" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/main.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="294">
+          <caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
+          <folding>
+            <element signature="e#0#21#0" expanded="true" />
+            <element signature="e#136#171#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 8 - 0
tv/src/main.js

@@ -7,6 +7,14 @@ import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
 import axios from 'axios'
 
+import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
+
+if(process.env.NODE_ENV === 'development'){
+    console.log(123);
+    // let vConsole = new VConsole() // 初始化
+}else{
+
+}
 
 Vue.config.productionTip = false;
 Vue.use(ElementUI);

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

@@ -500,12 +500,11 @@
                 if (val == 0) {
                     return '0'
                 } else {
-                    // return parseFloat(val).toFixed(2);
-                    return parseInt(val);
+                    return parseFloat(val).toFixed(2);
+                    // return parseInt(val);
                     // return parseFloat(val).toFixed(3);
                 }
             },
-
         },
         watch: {
             '$route': function (val) {

+ 5 - 4
tv/src/views/Rank.vue

@@ -4,7 +4,7 @@
         <div class="rankContainer">
             <el-row :gutter="20">
                 <el-col :span="12">
-                    <li v-for="(s,i) in students.CkSort">
+                    <li v-for="(s,i) in students.CalSort">
                         <div :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
                             <div class="head">
                                 <img :src="s.Head" class="headImg" alt="">
@@ -17,7 +17,7 @@
                             </div>
 
                             <div class="score">
-                                {{s.Ck|fmtFloat}}
+                                {{s.Cle|fmtInt}}
                             </div>
                             <div class="record">
                                 <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
@@ -27,7 +27,7 @@
                     </li>
                 </el-col>
                 <el-col :span="12">
-                    <li v-for="(s,i) in students.CalSort">
+                    <li v-for="(s,i) in students.CkSort">
                         <div :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
                             <div class="head">
                                 <img :src="s.Head" class="headImg" alt="">
@@ -40,7 +40,7 @@
                             </div>
 
                             <div class="score">
-                                {{s.Cle|fmtInt}}
+                                {{s.Ck|fmtFloat}}
                             </div>
                             <div class="record">
                                 <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
@@ -286,6 +286,7 @@
 
     li .head .headImg {
         width: 100%;
+        height: 0.8rem;
         overflow: hidden;
         display: block;
         margin: 0 auto;

+ 14 - 30
tv/src/views/Wait.vue

@@ -4,7 +4,7 @@
         <div class="rankContainer">
             <div class="lt">
                 <div class="recordMain">
-                    <el-carousel :interval="30000" height="370px" >
+                    <el-carousel :interval="30000" height="370px">
                         <el-carousel-item v-for="rs in recordMain">
                             <div>
                                 <h5 v-html="rs.Title"></h5>
@@ -20,7 +20,7 @@
                     </el-carousel>
                 </div>
                 <div class="bottom">
-                    <el-carousel :interval="15000" height="280px" >
+                    <el-carousel :interval="15000" height="280px">
                         <el-carousel-item v-for="Rs in bottom">
                             <div class="topOne" v-if="Rs.Style == 'tops'">
                                 <h5>{{Rs.Title}}</h5>
@@ -45,7 +45,7 @@
                                     </li>
                                 </ul>
                             </div>
-                            <div class="heros" v-if="Rs.Style == 'heros'" >
+                            <div class="heros" v-if="Rs.Style == 'heros'">
                                 <h5>{{Rs.Title}}</h5>
                                 <ul>
                                     <li v-for="(hero,i) in Rs.Result">
@@ -71,7 +71,7 @@
                 </div>
             </div>
             <div class="rt">
-                <el-carousel :interval="15000" height="610px" >
+                <el-carousel :interval="15000" height="610px">
                     <el-carousel-item v-for="Rs in rt">
                         <h5>{{Rs.Title}}</h5>
                         <ul>
@@ -118,33 +118,20 @@
                 studentsLimit: [],
                 showType: 2,//1 单人
                 curIndex: false,//1 单人
+                waitTimer: null,//null
                 test:
                     {
                         Title: '本<s style="font-size: 0.7rem;color: red">周</s>场馆卡路里总消耗',
                         Title2: '本<s style="font-size: 0.7rem;color: red">月</s>场馆卡路里总消耗',
                         Result: [{'Values': 0, Unite: '千卡'}],
                     },
-                recordMain: [
-                    {
-                        Title: '*******',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    },
-                    {
-                        Title: '*******',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    }
-                ],
+                recordMain: [],
                 bottom: {},
                 rt: [],
-
             }
         },
         mounted() {
-            this.autoplayStatus = false;
             if (this.trueDate) {
-                this.getcurIndex = setInterval(() => {
-                    // this.curIndex = this.curIndex == 0 ? 1 : 0;
-                }, 3000);
 
                 this.waitTimer = setInterval(() => {
                     // this.GetgetUserList();
@@ -234,8 +221,8 @@
             }
         },
         beforeDestroy() {
-            clearInterval(this.getcurIndex);
-            this.getcurIndex = null;
+            clearInterval(this.waitTimer);
+            this.waitTimer = null;
         },
         methods: {
             fakeNews() {
@@ -408,15 +395,12 @@
                             this.GetCalorieStatsQuery();
                             this.GetUserRankingQuery();
                         }, 1000);
-
-
                     } else {
                         this.students = this.fakeNews();
                         this.topMsg = this.students[0];
                     }
                 } else {
                     clearInterval(this.waitTimer);
-                    clearInterval(this.getcurIndex);
                 }
             }
         },
@@ -442,16 +426,16 @@
     }
 
     /*/deep/ .el-carousel__item--card {*/
-        /*width: auto !important;*/
+    /*width: auto !important;*/
     /*}*/
     /*/deep/ .el-carousel__item {*/
-        /*width: auto !important;*/
+    /*width: auto !important;*/
     /*}*/
     /*/deep/ .el-carousel__item--card.is-active {*/
-        /*z-index: 2;*/
-        /*position: absolute;*/
-        /*left: 50%;*/
-        /*transform: translate(-50%, 0px) !important;*/
+    /*z-index: 2;*/
+    /*position: absolute;*/
+    /*left: 50%;*/
+    /*transform: translate(-50%, 0px) !important;*/
     /*}*/
 
 

+ 52 - 13
tv/src/views/test.vue

@@ -1,28 +1,67 @@
 <template>
     <div class="block">
-        <el-carousel height="150px">
-            <el-carousel-item v-for="rs in recordMain" >
-                <h3 class="small">{{ rs.Title }}</h3>
+        <el-carousel height="150px" :interval="300">
+            <el-carousel-item v-for="rs in recordMain">
+                <h3 class="small" v-html="rs.Title"></h3>
             </el-carousel-item>
         </el-carousel>
     </div>
 </template>
 
 <script>
+    let qs = require('qs');
+    import {
+        getHello,
+        getClassStat,
+        HerosRankingQuery,
+        CalorieStatsQuery,
+        UserRankingQuery
+    } from '@/api/getApiRes'
+    import '../libs/rem';
+    import '../Global'
     export default {
         data(){
             return {
-                recordMain: [
-                    {
-                        Title: '*123123*',
-                        Result: [{'Values': 33, Unite: '12'}],
-                    },
-                    {
-                        Title: '*******',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    }
-                ],
+                recordMain: [],
             }
+        },
+        mounted() {
+            this.waitTimer = setInterval(() => {
+                // this.GetgetUserList();
+                this.GetCalorieStatsQuery();
+            }, 1000);
+        },
+        beforeDestroy() {
+            clearInterval(this.getcurIndex);
+            this.getcurIndex = null;
+        },
+        methods:{
+            GetCalorieStatsQuery() {
+                let that = this;
+                let param = {
+                    eqSn: localStorage.eqSn,
+                };
+                let postdata = qs.stringify(param);
+                CalorieStatsQuery(postdata).then(res => {
+                    that.recordMain = [];
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.recordMain = json.Rs;
+                    } else {
+                        that.recordMain = [
+                            {
+                                Title: '*******',
+                                Result: [{'Values': 0, Unite: '千卡'}],
+                            },
+                            {
+                                Title: '*******',
+                                Result: [{'Values': 0, Unite: '千卡'}],
+                            }
+                        ];
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
         }
     }
 </script>