Changpeng Duan 4 роки тому
батько
коміт
c09d68bbae

+ 928 - 924
pc/src/views/heartEquip.vue

@@ -1,937 +1,941 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>心率设备</h5>
-            <div class="likeTab">
-                <el-button type="primary" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
-                <el-button type @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
-            </div>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="5">
-                            <em>心率设备:</em>
-                            <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
-                        </el-col>
-                        <!--<el-col :span="4">-->
-                        <!--<em>设备状态:</em>-->
-                        <!--&lt;!&ndash;status&ndash;&gt;-->
-                        <!--<el-select v-model="panel.status" placeholder="请选择">-->
-                        <!--<el-option-->
-                        <!--v-for="item in panel.statusOptions"-->
-                        <!--:key="item.value"-->
-                        <!--:label="item.label"-->
-                        <!--:value="item.value">-->
-                        <!--</el-option>-->
-                        <!--</el-select>-->
-                        <!--</el-col>-->
-                        <el-col :span="2">
-                            <el-button size type="primary" @click="query" plain>查询</el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
+  <div class="context">
+    <div class="panel">
+      <h5>心率设备</h5>
+      <div class="likeTab">
+        <el-button type="primary" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
+        <el-button type @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="20">
+            <el-col :span="5">
+              <em>心率设备:</em>
+              <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
+            </el-col>
+            <!--<el-col :span="4">-->
+            <!--<em>设备状态:</em>-->
+            <!--&lt;!&ndash;status&ndash;&gt;-->
+            <!--<el-select v-model="panel.status" placeholder="请选择">-->
+            <!--<el-option-->
+            <!--v-for="item in panel.statusOptions"-->
+            <!--:key="item.value"-->
+            <!--:label="item.label"-->
+            <!--:value="item.value">-->
+            <!--</el-option>-->
+            <!--</el-select>-->
+            <!--</el-col>-->
+            <el-col :span="2">
+              <el-button size type="primary" @click="query" plain>查询</el-button>
+            </el-col>
+          </el-row>
         </div>
-        <div class="change">
-            <el-button @click="addMember" type="primary" size="mini">新增心率设备</el-button>
-            <el-button @click="editList" size="mini">编辑心率设备</el-button>
-            <el-button type="success" @click="getAllPower" :loading="BtnGetAllPower" size="mini">全部设备电量</el-button>
-            <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
-        </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addMember" type="primary" size="mini">新增心率设备</el-button>
+      <el-button @click="editList" size="mini">编辑心率设备</el-button>
+      <el-button type="success" @click="getAllPower" :loading="BtnGetAllPower" size="mini">全部设备电量</el-button>
+      <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize
                 :default-sort="{ prop: 'date', order: 'descending' }" element-loading-background="rgba(0, 0, 0, 0.8)"
                 class @selection-change="handleSelectionChange" @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55">
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row">
-                            <i></i>
-                        </el-radio>
-                    </template>
-                </el-table-column>
-                <!--<el-table-column-->
-                <!--type="index"-->
-                <!--label="序号"-->
-                <!--align="center"-->
-
-                <!--width="50">-->
-                <!--</el-table-column>-->
-                <!--<el-table-column-->
-                <!--prop="InVenueNo"-->
-                <!--label="馆内编号"-->
-                <!--align="center"-->
-                <!--width="90"-->
-                <!--&gt;-->
-                <!--</el-table-column>-->
-                <el-table-column prop="Sn" label="序列号" align="InVenueNo" width="100px" sortable></el-table-column>
-                <el-table-column prop="UserName" label="用户" align="center" sortable>
-                    <template slot-scope="scope">
-                        {{ scope.row.UserName }}
-                        <!--<el-select v-model="scope.row.BindUserId" @change="getRowTop(scope.row)" filterable v-if="scope.row.BindUserId">-->
-                        <!--<el-option-->
-                        <!--v-for="item in panel.options"-->
-                        <!--:key="item.value"-->
-                        <!--:label="item.label"-->
-                        <!--:value="item.value">-->
-                        <!--</el-option>-->
-                        <!--</el-select>-->
-
-                        <!--<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="PowerPercent" label="电量" align="center" width="80px" sortable>
-                    <template slot-scope="scope">
-                        <span style="color: red" v-if="parseInt(scope.row.PowerPercent) <= 20">{{ scope.row.PowerPercent
-                            }}</span>
-                        <span style="color: gold"
-                            v-if="parseInt(scope.row.PowerPercent) > 20 && parseInt(scope.row.PowerPercent) < 80">{{
-                            scope.row.PowerPercent }}</span>
-                        <span style="color: #67C23A" v-if="parseInt(scope.row.PowerPercent) >= 80">{{
-                            scope.row.PowerPercent }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="PowerUpdateAt" label="电量更新时间" align="center" width="150px"
-                    :formatter="filterFmtDate"></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>-->
-
-                        <el-button type="danger" size="mini" @click="pauseRowDel(scope.row)">删除</el-button>
-
-                        <el-button type="primary" size="mini" @click="goPage(scope.row)">记录</el-button>
-                        <el-button type="success" size="mini" @click="getPower(scope.row)">获取电量</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br />
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange"
-                :current-page.sync="cur_page"
-                ></el-pagination>
-        </div>
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-            <div class="dialogContent">
-                <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.sn"></el-input>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+        >
+        <el-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="InVenueNo"-->
+        <!--label="馆内编号"-->
+        <!--align="center"-->
+        <!--width="90"-->
+        <!--&gt;-->
+        <!--</el-table-column>-->
+        <el-table-column prop="Sn" label="序列号" align="InVenueNo" width="100px" sortable></el-table-column>
+        <el-table-column prop="UserName" label="用户" align="center" sortable>
+          <template slot-scope="scope">
+            {{ scope.row.UserName }}
+            <!--<el-select v-model="scope.row.BindUserId" @change="getRowTop(scope.row)" filterable v-if="scope.row.BindUserId">-->
+            <!--<el-option-->
+            <!--v-for="item in panel.options"-->
+            <!--:key="item.value"-->
+            <!--:label="item.label"-->
+            <!--:value="item.value">-->
+            <!--</el-option>-->
+            <!--</el-select>-->
+
+            <!--<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="PowerPercent" label="电量" align="center" width="80px" sortable>
+          <template slot-scope="scope">
+                        <span style="color: red" v-if="parseInt(scope.row.PowerPercent) <= 20">{{
+                            scope.row.PowerPercent
+                          }}</span>
+            <span style="color: gold"
+                  v-if="parseInt(scope.row.PowerPercent) > 20 && parseInt(scope.row.PowerPercent) < 80">{{
+                scope.row.PowerPercent
+              }}</span>
+            <span style="color: #67C23A" v-if="parseInt(scope.row.PowerPercent) >= 80">{{
+                scope.row.PowerPercent
+              }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="PowerUpdateAt" label="电量更新时间" align="center" width="150px"
+                         :formatter="filterFmtDate"></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>-->
+
+            <el-button type="danger" size="mini" @click="pauseRowDel(scope.row)">删除</el-button>
+
+            <el-button type="primary" size="mini" @click="goPage(scope.row)">记录</el-button>
+            <el-button type="success" size="mini" @click="getPower(scope.row)">获取电量</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br/>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                     @current-change="pageChange"
+                     :current-page.sync="cur_page"
+      ></el-pagination>
     </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+      <div class="dialogContent">
+        <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.sn"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import Global from '../Global.js'
-    import {
-        testTable,
-        testSelect,
-        ShopManagerStatusEdit,
-        ClassDetailOne,
-        QueryHrSensors,
-        AddHrSensors,
-        HrSensorsStatusEdit,
-        EditHrSensors,
-        UnBindHrSensorsToUser,
-        GetHrSensorsPowerPercent,
-        ShopVenueEquipEditStatus,
-    } from "../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                activeName: 'comm',
-                dialogVisible: false,//其他dialog
-                BtnGetAllPower: false,//
-                dialogMemberVisible: false,//新增心率设备dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//心率设备课程
-                dialogTitle: '新增心率设备',
-                dialogValue: [],
-                tableRadio: [],
-                // panel 配置项目
-                panel: {
-                    str: '',
-                    phone: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    status: "",
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    statusOptions: [
-                        { value: "", label: '全部' },
-                        { value: 1, label: '启用' },
-                        { value: 8, label: '暂停' },
-                        { value: 9, label: '删除' },
-                    ], 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: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    sn: '',
-                    venueNo: '',
-                    shopId: '',
-                    teacherId: 0,
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    phone: '',
-                    expTime: '',
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: [
-                    { value: 1, label: '年心率设备' },
-                    { value: 2, label: '充值心率设备' },
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            handleClick(tab, event) {
-                let that = this;
-
-                if (tab.name == "personal") {
-                    // 私有
-                    that.$router.push({ path: '/heartEquipPerson' });
-                } else {
-                    // 公共
-                    that.$router.push({ path: '/heartEquip' });
-                }
-            },
-            // 设备回收
-            takeBack(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);
-                    UnBindHrSensorsToUser(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 + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消回收'
-                    });
-                });
-            },
-            goPage(row) {
-                // 查看绑定记录
-                this.$router.push({ path: '/bindRecord', query: { hrId: row.HrId } });
-            },
-            goType(url) {
-                this.$router.push({ path: '/' + url });
-            },
-            // 编辑
-            editList() {
-                let that = this;
-                this.clearForm();
-                console.log(this.tableRadio);
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.shopid = row.ShopId;
-                this.form.userId = row.Id;
-                this.form.name = row.Name;
-                this.form.userCode = row.Usercode;
-                this.form.password = '';
-                this.form.hrId = row.HrId;
-                this.form.sn = row.Sn;
-                this.form.venueNo = row.InVenueNo;
-                this.dialogVisible = true;
-                this.dialogTitle = '编辑心率设备';
-                this.form.btnType = 1;
-                this.dialogMemberVisible = true
-            },
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 选择课程后,获取当前课程的建议上课人数和课时消耗
-            getRowTop(row) {
-                let that = this;
-                console.log(row);
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassId,
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailOne(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        row.TopLimit = json.Rs.TopLimit;
-                        row.ConsumeHour = json.Rs.ConsumeHour;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 编辑
-            editMember(row) {
-                this.clearForm();
-                this.form.name = row.Name;
-                this.form.phone = row.Phone;
-                this.form.shopId = row.ShopId;
-                this.form.teacherId = row.TeacherId;
-                this.form.btnType = 1;
-                this.dialogMemberVisible = true
-                this.dialogTitle = '编辑心率设备'
-            },
-            // 禁用
-            pauseRow(row, status) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    hrId: row.HrId,
-                    status: status,//1:启用 8:暂停 9:删除
-                };
-                let postdata = qs.stringify(param);
-                HrSensorsStatusEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '执行成功!',
-                            type: 'success'
-                        });
-                        // table 重载
-                        that.getTableQuery();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // pauseRow(row) {
-            //     let that = this;
-            //     this.$confirm('是否禁用心率设备' + row.Sn + '?', '禁用操作', {
-            //         confirmButtonText: '确定',
-            //         cancelButtonText: '取消',
-            //         type: 'warning'
-            //     }).then(() => {
-            //         let param = {
-            //             token: localStorage.token,
-            //             shopId : localStorage.token,
-            //             status: 8,
-            //         };
-            //         let postdata = qs.stringify(param);
-            //         ShopVenueEquipEditStatus(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 + ' 错误码:' + json.Code);
-            //             }
-            //         })
-            //     }).catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已取消禁用'
-            //         });
-            //     });
-            // },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用心率设备' + row.Sn + '?', '启用操作', {
-                    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 + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
-                });
-            },
-            // 获取电量
-            getPower(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    shopId: row.ShopId,
-                    hrId: row.HrId,
-                };
-                let postdata = qs.stringify(param);
-                GetHrSensorsPowerPercent(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        console.log(json);
-                        that.$message({
-                            showClose: true,
-                            message: '电量获取成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            getAllPower() {
-                let that = this;
-                that.BtnGetAllPower = true;
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.ShopId,
-                };
-                let postdata = qs.stringify(param);
-                GetHrSensorsPowerPercent(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // table 重载
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '电量获取成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                    that.BtnGetAllPower = false;
-                })
-            },
-            // 删除
-            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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            // 关闭所有
-            allDialogClose() {
-                this.dialogVisible = false;
-                this.dialogGift = false;
-                this.dialogLesson = false;
-                this.dialogExpTime = false;
-                this.dialogLessonTable = false;
-            },
-            // 确认提交新增心率设备
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.sn) {
-                    this.$message.error('错了哦,编号不能为空');
-                    return false
-                }
-                if (that.form.sn.length > 20) {
-                    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
-                // }
-
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    sn: that.form.sn,
-                    venueNo: that.form.venueNo,
-                };
-                let postdata = qs.stringify(param);
-                AddHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '心率设备添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.sn) {
-                    this.$message.error('错了哦,编号不能为空');
-                    return false
-                }
-                if (that.form.sn.length > 20) {
-                    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
-                // }
-
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    hrId: that.form.hrId,
-                    sn: that.form.sn,
-                    venueNo: that.form.venueNo,
-                };
-                let postdata = qs.stringify(param);
-                EditHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '心率设备信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交课时
-            confirmLesson() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 新增心率设备
-            addMember() {
-                this.clearForm();
-                this.dialogMemberVisible = true;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增心率设备'
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let hrId = this.tableRadio.HrId;
-
-                let param = {
-                    token: localStorage.token,
-                    hrId: 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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.sn = '';
-                this.form.venueNo = '';
-                this.form.phone = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    str: this.panel.str,//
-                    status: this.panel.status,//
-                    shopId: localStorage.shopId,//
-                };
-                let postdata = qs.stringify(param);
-                QueryHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
-            //            过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                if (column == 0) {
-                    return '未获得'
-                } else {
-                    return nonTfmtDatetoLength(new Date(column * 1000), 16);
-                }
-            },
-        },
+import Global from '../Global.js'
+import {
+  testTable,
+  testSelect,
+  ShopManagerStatusEdit,
+  ClassDetailOne,
+  QueryHrSensors,
+  AddHrSensors,
+  HrSensorsStatusEdit,
+  EditHrSensors,
+  UnBindHrSensorsToUser,
+  GetHrSensorsPowerPercent,
+  ShopVenueEquipEditStatus,
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      activeName: 'comm',
+      dialogVisible: false,//其他dialog
+      BtnGetAllPower: false,//
+      dialogMemberVisible: false,//新增心率设备dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//心率设备课程
+      dialogTitle: '新增心率设备',
+      dialogValue: [],
+      tableRadio: [],
+      // panel 配置项目
+      panel: {
+        str: '',
+        phone: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '暂停'},
+          {value: 9, label: '删除'},
+        ], 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: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        userCode: '',
+        sn: '',
+        venueNo: '',
+        shopId: '',
+        teacherId: 0,
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        phone: '',
+        expTime: '',
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年心率设备'},
+        {value: 2, label: '充值心率设备'},
+      ],
+      tableData: []
     }
+  },
+  mounted() {
+    this.getTableQuery();
+  },
+  methods: {
+    handleClick(tab, event) {
+      let that = this;
+
+      if (tab.name == "personal") {
+        // 私有
+        that.$router.push({path: '/heartEquipPerson'});
+      } else {
+        // 公共
+        that.$router.push({path: '/heartEquip'});
+      }
+    },
+    // 设备回收
+    takeBack(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);
+        UnBindHrSensorsToUser(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 + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消回收'
+        });
+      });
+    },
+    goPage(row) {
+      // 查看绑定记录
+      this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
+    },
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    // 编辑
+    editList() {
+      let that = this;
+      this.clearForm();
+      console.log(this.tableRadio);
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.shopid = row.ShopId;
+      this.form.userId = row.Id;
+      this.form.name = row.Name;
+      this.form.userCode = row.Usercode;
+      this.form.password = '';
+      this.form.hrId = row.HrId;
+      this.form.sn = row.Sn;
+      this.form.venueNo = row.InVenueNo;
+      this.dialogVisible = true;
+      this.dialogTitle = '编辑心率设备';
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true
+    },
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 选择课程后,获取当前课程的建议上课人数和课时消耗
+    getRowTop(row) {
+      let that = this;
+      console.log(row);
+      let param = {
+        token: localStorage.token,
+        classId: row.ClassId,
+      };
+      let postdata = qs.stringify(param);
+      ClassDetailOne(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          row.TopLimit = json.Rs.TopLimit;
+          row.ConsumeHour = json.Rs.ConsumeHour;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 编辑
+    editMember(row) {
+      this.clearForm();
+      this.form.name = row.Name;
+      this.form.phone = row.Phone;
+      this.form.shopId = row.ShopId;
+      this.form.teacherId = row.TeacherId;
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true
+      this.dialogTitle = '编辑心率设备'
+    },
+    // 禁用
+    pauseRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        hrId: row.HrId,
+        status: status,//1:启用 8:暂停 9:删除
+      };
+      let postdata = qs.stringify(param);
+      HrSensorsStatusEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '执行成功!',
+            type: 'success'
+          });
+          // table 重载
+          that.getTableQuery();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // pauseRow(row) {
+    //     let that = this;
+    //     this.$confirm('是否禁用心率设备' + row.Sn + '?', '禁用操作', {
+    //         confirmButtonText: '确定',
+    //         cancelButtonText: '取消',
+    //         type: 'warning'
+    //     }).then(() => {
+    //         let param = {
+    //             token: localStorage.token,
+    //             shopId : localStorage.token,
+    //             status: 8,
+    //         };
+    //         let postdata = qs.stringify(param);
+    //         ShopVenueEquipEditStatus(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 + ' 错误码:' + json.Code);
+    //             }
+    //         })
+    //     }).catch(() => {
+    //         this.$message({
+    //             type: 'info',
+    //             message: '已取消禁用'
+    //         });
+    //     });
+    // },
+    // 启用
+    runRow(row) {
+      let that = this;
+      this.$confirm('是否启用心率设备' + row.Sn + '?', '启用操作', {
+        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 + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消启用'
+        });
+      });
+    },
+    // 获取电量
+    getPower(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        shopId: row.ShopId,
+        hrId: row.HrId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          console.log(json);
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+      })
+    },
+    getAllPower() {
+      let that = this;
+      that.BtnGetAllPower = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.ShopId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // table 重载
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+        that.BtnGetAllPower = false;
+      })
+    },
+    // 删除
+    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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 关闭所有
+    allDialogClose() {
+      this.dialogVisible = false;
+      this.dialogGift = false;
+      this.dialogLesson = false;
+      this.dialogExpTime = false;
+      this.dialogLessonTable = false;
+    },
+    // 确认提交新增心率设备
+    confirmMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.sn) {
+        this.$message.error('错了哦,编号不能为空');
+        return false
+      }
+      if (that.form.sn.length > 20) {
+        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
+      // }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        sn: that.form.sn,
+        venueNo: that.form.venueNo,
+      };
+      let postdata = qs.stringify(param);
+      AddHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogMemberVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '心率设备添加成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    confirmEditMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.sn) {
+        this.$message.error('错了哦,编号不能为空');
+        return false
+      }
+      if (that.form.sn.length > 20) {
+        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
+      // }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        hrId: that.form.hrId,
+        sn: that.form.sn,
+        venueNo: that.form.venueNo,
+      };
+      let postdata = qs.stringify(param);
+      EditHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogMemberVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '心率设备信息编辑成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交课时
+    confirmLesson() {
+      let that = this;
+      // checkNum
+
+      let param = {
+        token: localStorage.token,
+        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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 新增心率设备
+    addMember() {
+      this.clearForm();
+      this.dialogMemberVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增心率设备'
+    },
+    // 删除
+    delList() {
+      let that = this;
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let hrId = this.tableRadio.HrId;
+
+      let param = {
+        token: localStorage.token,
+        hrId: 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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.sn = '';
+      this.form.venueNo = '';
+      this.form.phone = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        str: this.panel.str,//
+        status: this.panel.status,//
+        shopId: localStorage.shopId,//
+      };
+      let postdata = qs.stringify(param);
+      QueryHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
+        }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  },
+}
 </script>
 
 <style scoped>
-    @import "../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #f0f2f5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .likeTab {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 0;
-        border-bottom: 1px solid #ccc;
-        margin-bottom: 10px;
-    }
-
-    .likeTab button {
-        float: left;
-        border-radius: 0;
-    }
-
-    .likeTab button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799ff;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    .panel_control /deep/ .el-input {
-        width: 90px;
-        float: left;
-    }
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #f0f2f5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799ff;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
 </style>

+ 941 - 938
pc/src/views/heartEquipPerson.vue

@@ -1,954 +1,957 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>心率设备</h5>
-            <div class="likeTab">
-                <el-button type="" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
-                <el-button type="primary" @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
-            </div>
-            <div class="panel-body">
-                <div class="panel_control">
-                    <el-row :gutter="20">
-                        <el-col :span="5">
-                            <em>心率设备:</em>
-                            <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
-                        </el-col>
-                        <!--<el-col :span="5">-->
-                        <!--<em>设备状态:</em>-->
-                        <!--&lt;!&ndash;status&ndash;&gt;-->
-                        <!--<el-select v-model="panel.status" placeholder="请选择">-->
-                        <!--<el-option-->
-                        <!--v-for="item in panel.statusOptions"-->
-                        <!--:key="item.value"-->
-                        <!--:label="item.label"-->
-                        <!--:value="item.value">-->
-                        <!--</el-option>-->
-                        <!--</el-select>-->
-                        <!--</el-col>-->
-                        <el-col :span="2">
-                            <el-button size="" type="primary" @click="query" plain>查询</el-button>
-                        </el-col>
-                    </el-row>
-                </div>
-            </div>
+  <div class="context">
+    <div class="panel">
+      <h5>心率设备</h5>
+      <div class="likeTab">
+        <el-button type="" @click="goType('heartEquip')" size="mini">场馆心率设备</el-button>
+        <el-button type="primary" @click="goType('heartEquipPerson')" size="mini">私有心率设备</el-button>
+      </div>
+      <div class="panel-body">
+        <div class="panel_control">
+          <el-row :gutter="20">
+            <el-col :span="5">
+              <em>心率设备:</em>
+              <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
+            </el-col>
+            <!--<el-col :span="5">-->
+            <!--<em>设备状态:</em>-->
+            <!--&lt;!&ndash;status&ndash;&gt;-->
+            <!--<el-select v-model="panel.status" placeholder="请选择">-->
+            <!--<el-option-->
+            <!--v-for="item in panel.statusOptions"-->
+            <!--:key="item.value"-->
+            <!--:label="item.label"-->
+            <!--:value="item.value">-->
+            <!--</el-option>-->
+            <!--</el-select>-->
+            <!--</el-col>-->
+            <el-col :span="2">
+              <el-button size="" type="primary" @click="query" plain>查询</el-button>
+            </el-col>
+          </el-row>
         </div>
-        <div class="change">
-            <el-button @click="addMember" type="primary" size="mini">新增心率设备</el-button>
-            <el-button @click="editList" size="mini">编辑心率设备</el-button>
-            <el-button type="success" @click="getAllPower" :loading="BtnGetAllPower" size="mini">全部设备电量</el-button>
-            <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
-        </div>
-        <div class="table">
-            <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
+      </div>
+    </div>
+    <div class="change">
+      <el-button @click="addMember" type="primary" size="mini">新增心率设备</el-button>
+      <el-button @click="editList" size="mini">编辑心率设备</el-button>
+      <el-button type="success" @click="getAllPower" :loading="BtnGetAllPower" size="mini">全部设备电量</el-button>
+      <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
+    </div>
+    <div class="table">
+      <el-table :data="tableData" border is-horizontal-resize :default-sort="{prop: 'date', order: 'descending'}"
                 element-loading-background="rgba(0, 0, 0, 0.8)" class="" @selection-change="handleSelectionChange"
                 @current-change="clickChange">
-                >
-                <el-table-column label="选择" width="55">
-                    <template slot-scope="scope">
-                        <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
-                    </template>
-                </el-table-column>
-                <!--<el-table-column-->
-                <!--type="index"-->
-                <!--label="序号"-->
-                <!--align="center"-->
-
-                <!--width="50">-->
-                <!--</el-table-column>-->
-                <el-table-column prop="Sn" label="序列号" align="InVenueNo" width="100px" sortable>
-                </el-table-column>
-                <el-table-column prop="UserName" label="用户" align="center" sortable>
-
-                    <template slot-scope="scope">
-                        {{scope.row.UserName}}
-                        <!--<el-select v-model="scope.row.BindUserId" @change="getRowTop(scope.row)" filterable v-if="scope.row.BindUserId">-->
-                        <!--<el-option-->
-                        <!--v-for="item in panel.options"-->
-                        <!--:key="item.value"-->
-                        <!--:label="item.label"-->
-                        <!--:value="item.value">-->
-                        <!--</el-option>-->
-                        <!--</el-select>-->
-
-                        <!--<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="PowerPercent" label="电量" align="center" width="80px" sortable>
-                    <template slot-scope="scope">
+        >
+        <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="Sn" label="序列号" align="InVenueNo" width="100px" sortable>
+        </el-table-column>
+        <el-table-column prop="UserName" label="用户" align="center" sortable>
+
+          <template slot-scope="scope">
+            {{ scope.row.UserName }}
+            <!--<el-select v-model="scope.row.BindUserId" @change="getRowTop(scope.row)" filterable v-if="scope.row.BindUserId">-->
+            <!--<el-option-->
+            <!--v-for="item in panel.options"-->
+            <!--:key="item.value"-->
+            <!--:label="item.label"-->
+            <!--:value="item.value">-->
+            <!--</el-option>-->
+            <!--</el-select>-->
+
+            <!--<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="PowerPercent" label="电量" align="center" width="80px" sortable>
+          <template slot-scope="scope">
                         <span style="color: red"
-                            v-if="parseInt(scope.row.PowerPercent) <= 20">{{scope.row.PowerPercent}}</span>
-                        <span style="color: gold"
-                            v-if="parseInt(scope.row.PowerPercent) > 20 && parseInt(scope.row.PowerPercent) < 80">{{scope.row.PowerPercent}}</span>
-                        <span style="color: #67C23A"
-                            v-if="parseInt(scope.row.PowerPercent) >= 80">{{scope.row.PowerPercent}}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column prop="PowerUpdateAt" label="电量更新时间" align="center" width="140px"
-                    :formatter="filterFmtDate">
-                </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>-->
-                        <el-button type="danger" size="mini" @click="pauseRowDel(scope.row)">
-                            删除
-                        </el-button>
-                        <el-button type="primary" size="mini" @click="goPage(scope.row)">记录</el-button>
-                        <el-button type="success" size="mini" @click="getPower(scope.row)">获取电量</el-button>
-                    </template>
-                </el-table-column>
-            </el-table>
-            <br>
-            <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
-                @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
-        </div>
-        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
-            <div class="dialogContent">
-                <div class="">
-                    <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="会员账号" :required="true">
-                            <!--userId-->
-                            <el-select v-model="form.userId" placeholder="请选择" :disabled="form.btnType == 1" filterable>
-                                <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="序列号" :required="true">
-                            <el-input v-model="form.sn"></el-input>
-                        </el-form-item>
-                    </el-form>
-                </div>
-            </div>
-            <div class="dialogFooter">
-                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
-                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
-                </el-button>
-                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
-            </div>
-        </el-dialog>
+                              v-if="parseInt(scope.row.PowerPercent) <= 20">{{ scope.row.PowerPercent }}</span>
+            <span style="color: gold"
+                  v-if="parseInt(scope.row.PowerPercent) > 20 && parseInt(scope.row.PowerPercent) < 80">{{
+                scope.row.PowerPercent
+              }}</span>
+            <span style="color: #67C23A"
+                  v-if="parseInt(scope.row.PowerPercent) >= 80">{{ scope.row.PowerPercent }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="PowerUpdateAt" label="电量更新时间" align="center" width="140px"
+                         :formatter="filterFmtDate">
+        </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>-->
+            <el-button type="danger" size="mini" @click="pauseRowDel(scope.row)">
+              删除
+            </el-button>
+            <el-button type="primary" size="mini" @click="goPage(scope.row)">记录</el-button>
+            <el-button type="success" size="mini" @click="getPower(scope.row)">获取电量</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <br>
+      <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+                     @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
     </div>
+    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+      <div class="dialogContent">
+        <div class="">
+          <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="会员账号" :required="true">
+              <!--userId-->
+              <el-select v-model="form.userId" placeholder="请选择" :disabled="form.btnType == 1" filterable>
+                <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="序列号" :required="true">
+              <el-input v-model="form.sn"></el-input>
+            </el-form-item>
+          </el-form>
+        </div>
+      </div>
+      <div class="dialogFooter">
+        <el-button type="primary" size="small" v-if="form.btnType == 0" @click="confirmMember">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditMember">确定
+        </el-button>
+        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-    import Global from '../Global.js'
-    import {
-        testTable,
-        testSelect,
-        ShopManagerStatusEdit,
-        ClassDetailOne,
-        QueryPvtHrSensors,
-        AddPvtHrSensors,
-        HrSensorsStatusEdit,
-        EditHrSensors,
-        UnBindHrSensorsToUser,
-        VipUserSimpleQuery,
-        GetHrSensorsPowerPercent
-    } from "../api/getApiRes";
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                activeName: 'comm',
-                dialogVisible: false,//其他dialog
-                BtnGetAllPower: false,//
-                dialogMemberVisible: false,//新增心率设备dialog
-                dialogLesson: false,//课时调整
-                dialogGift: false,//赠送课时调整
-                dialogExpTime: false,//有效期调整
-                dialogLessonTable: false,//心率设备课程
-                dialogTitle: '新增心率设备',
-                dialogValue: [],
-                tableRadio: [],
-                // panel 配置项目
-                panel: {
-                    str: '',
-                    phone: '',
-                    compname: '',
-                    keyword: '',
-                    USERCODE: '',
-                    endType: '',
-                    taskstatus: 99,
-                    status: "",
-                    draw: 1,
-                    start: 0,
-                    recordsTotal: 0,
-                    tableData: [],
-                    allTableData: [],
-                    limit: '10',
-                    multipleSort: false,
-                    loading: false,
-                    fileList: [],
-                    multipleSelection: [],
-                    detectedmac: '',
-                    statusOptions: [
-                        { value: "", label: '全部' },
-                        { value: 1, label: '启用' },
-                        { value: 8, label: '暂停' },
-                        { value: 9, label: '删除' },
-                    ], 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: 10,
-                    pageoptions: pageOptions(),
-                    total: 100,
-                    pageIndex: 1,
-                },
-                form: {
-                    name: '',
-                    userCode: '',
-                    sn: '',
-                    venueNo: '',
-                    shopId: '',
-                    teacherId: 0,
-                    memberType: 1,
-                    lesson: 1,
-                    gift: 1,
-                    btnType: 0,//0新建,1编辑编辑
-                    memo: '',
-                    phone: '',
-                    expTime: '',
-                    userId: '',
-                    userList: [],//穿梭待选
-                    dialogdata: [],//穿梭待选
-                    dialogValue: [],//穿梭已选
-                },
-                memberTypes: [
-                    { value: 1, label: '年心率设备' },
-                    { value: 2, label: '充值心率设备' },
-                ],
-                tableData: []
-            }
-        },
-        mounted() {
-            this.vipSelect();
-            this.getTableQuery();
-        },
-        methods: {
-            vipSelect() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                VipUserSimpleQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.form.userId = '';
-                        that.form.userList = turnResToOptionBySimViper(json.Rs);
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            handleClick(tab, event) {
-                let that = this;
-
-                if (tab.name == "personal") {
-                    // 私有
-                    that.$router.push({ path: '/heartEquipPerson' });
-                } else {
-                    // 公共
-                    that.$router.push({ path: '/heartEquip' });
-                }
-            },
-            // 设备回收
-            takeBack(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);
-                    UnBindHrSensorsToUser(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 + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消回收'
-                    });
-                });
-            },
-            goPage(row) {
-                // 查看绑定记录
-                this.$router.push({ path: '/bindRecord', query: { hrId: row.HrId } });
-            },
-            goType(url) {
-                this.$router.push({ path: '/' + url });
-            },
-            // 编辑
-            editList() {
-                let that = this;
-                this.clearForm();
-                console.log(this.tableRadio);
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let row = this.tableRadio;
-                this.form.shopid = row.ShopId;
-                this.form.userId = row.UserId;
-                this.form.name = row.Name;
-                this.form.userCode = row.Usercode;
-                this.form.password = '';
-                this.form.hrId = row.HrId;
-                this.form.sn = row.Sn;
-                this.form.venueNo = row.InVenueNo;
-                this.dialogVisible = true;
-                this.dialogTitle = '编辑心率设备';
-                this.form.btnType = 1;
-                this.dialogMemberVisible = true
-            },
-            clickChange(item) {
-                this.tableRadio = item
-            },
-            // 选择课程后,获取当前课程的建议上课人数和课时消耗
-            getRowTop(row) {
-                let that = this;
-                console.log(row);
-                let param = {
-                    token: localStorage.token,
-                    classId: row.ClassId,
-                };
-                let postdata = qs.stringify(param);
-                ClassDetailOne(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        row.TopLimit = json.Rs.TopLimit;
-                        row.ConsumeHour = json.Rs.ConsumeHour;
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 获取电量
-            getPower(row) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    shopId: row.ShopId,
-                    hrId: row.HrId,
-                };
-                let postdata = qs.stringify(param);
-                GetHrSensorsPowerPercent(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        console.log(json);
-                        that.$message({
-                            showClose: true,
-                            message: '电量获取成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            getAllPower() {
-                let that = this;
-                that.BtnGetAllPower = true;
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.ShopId,
-                };
-                let postdata = qs.stringify(param);
-                GetHrSensorsPowerPercent(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // table 重载
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '电量获取成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                    that.BtnGetAllPower = false;
-                })
-            },
-            // 编辑
-            editMember(row) {
-                this.clearForm();
-                this.form.name = row.Name;
-                this.form.phone = row.Phone;
-                this.form.shopId = row.ShopId;
-                this.form.teacherId = row.TeacherId;
-                this.form.btnType = 1;
-                this.dialogMemberVisible = true
-                this.dialogTitle = '编辑心率设备'
-            },
-            // 禁用
-            pauseRow(row, status) {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    hrId: row.HrId,
-                    status: status,//1:启用 8:暂停 9:删除
-                };
-                let postdata = qs.stringify(param);
-                HrSensorsStatusEdit(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.$message({
-                            showClose: true,
-                            message: '执行成功!',
-                            type: 'success'
-                        });
-                        // table 重载
-                        that.getTableQuery();
-                        that.vipSelect();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // pauseRow(row) {
-            //     let that = this;
-            //     this.$confirm('是否禁用心率设备' + row.Sn + '?', '禁用操作', {
-            //         confirmButtonText: '确定',
-            //         cancelButtonText: '取消',
-            //         type: 'warning'
-            //     }).then(() => {
-            //         let param = {
-            //             token: localStorage.token,
-            //             shopId : localStorage.token,
-            //             status: 8,
-            //         };
-            //         let postdata = qs.stringify(param);
-            //         ShopVenueEquipEditStatus(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 + ' 错误码:' + json.Code);
-            //             }
-            //         })
-            //     }).catch(() => {
-            //         this.$message({
-            //             type: 'info',
-            //             message: '已取消禁用'
-            //         });
-            //     });
-            // },
-            // 启用
-            runRow(row) {
-                let that = this;
-                this.$confirm('是否启用心率设备' + row.Sn + '?', '启用操作', {
-                    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 + ' 错误码:' + json.Code);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消启用'
-                    });
-                });
-            },
-            // 删除
-            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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-            // 关闭所有
-            allDialogClose() {
-                this.dialogVisible = false;
-                this.dialogGift = false;
-                this.dialogLesson = false;
-                this.dialogExpTime = false;
-                this.dialogLessonTable = false;
-            },
-            // 确认提交新增心率设备
-            confirmMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.sn) {
-                    this.$message.error('错了哦,编号不能为空');
-                    return false
-                }
-                if (that.form.sn.length > 20) {
-                    this.$message.error('错了哦,编号不能超过20个字符');
-                    return false
-                }
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    sn: that.form.sn,
-                    userId: that.form.userId,
-                };
-                let postdata = qs.stringify(param);
-                AddPvtHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '心率设备添加成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            confirmEditMember() {
-                let that = this;
-                // checkNum
-                if (!that.form.sn) {
-                    this.$message.error('错了哦,编号不能为空');
-                    return false
-                }
-                if (that.form.sn.length > 20) {
-                    this.$message.error('错了哦,编号不能超过20个字符');
-                    return false
-                }
-
-                let param = {
-                    token: localStorage.token,
-                    shopId: localStorage.shopId,
-                    hrId: that.form.hrId,
-                    sn: that.form.sn,
-                    venueNo: 0,
-                };
-                let postdata = qs.stringify(param);
-                EditHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // 关闭弹窗
-                        that.dialogMemberVisible = false;
-                        // 重载列表
-                        that.getTableQuery();
-                        that.$message({
-                            showClose: true,
-                            message: '心率设备信息编辑成功!',
-                            type: 'success'
-                        });
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 确认提交课时
-            confirmLesson() {
-                let that = this;
-                // checkNum
-
-                let param = {
-                    token: localStorage.token,
-                    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 + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 新增心率设备
-            addMember() {
-                this.clearForm();
-                this.dialogMemberVisible = true;
-                this.form.btnType = 0;
-                this.dialogTitle = '新增心率设备'
-            },
-            // 删除
-            delList() {
-                let that = this;
-                if (this.tableRadio.length == 0) {
-                    this.$message.error("请先选中一条记录");
-                    return false
-                }
-                let hrId = this.tableRadio.HrId;
-
-                let param = {
-                    token: localStorage.token,
-                    hrId: 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 + ' 错误码:' + json.Code);
-                        }
-                    });
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消删除'
-                    });
-                });
-            },
-
-            handleSelectionChange(val) {
-                this.multipleSelection = val;
-            },
-            // 查询按钮
-            query() {
-                let that = this;
-                that.start = 0;
-                that.cur_page = 1;
-                this.getTableQuery();
-                this.$message.success('查询完毕');
-            },
-            clearForm() {
-                // clear
-                this.form.name = '';
-                this.form.sn = '';
-                this.form.venueNo = '';
-                this.form.phone = '';
-                this.form.userCode = '';
-                this.form.shopId = '';
-                this.form.userId = '';
-            },
-            // 页面数据查询
-            getTableQuery() {
-                let that = this;
-                that.loading = true;
-                let param = {
-                    token: localStorage.token,
-                    str: this.panel.str,//
-                    status: this.panel.status,//
-                    shopId: localStorage.shopId,//
-                };
-                let postdata = qs.stringify(param);
-                QueryPvtHrSensors(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.loading = false;
-                        if (json.Rs) {
-                            that.allTableData = json.Rs;
-                            that.recordsTotal = json.Rs.length;
-                        } else {
-                            that.allTableData = [];
-                            that.recordsTotal = 0;
-                        }
-
-                        // 设置分页数据
-                        that.setPaginations();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
-            // 设置分页数据
-            setPaginations() {
-                // 分页属性
-                let that = this;
-                that.pageination.total = that.recordsTotal;
-
-                // 默认分页
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-            },
-            // 每页显示数量
-            handleSizeChange() {
-                let that = this;
-                that.tableData = that.allTableData.filter((item, index) => {
-                    return index < that.pageination.pageItem;
-                });
-                that.draw = that.pageination.pageItem;
-                // that.getTableQuery();
-            },
-            // 翻页
-            pageChange(pageIndex) {
-                let that = this;
-                // 获取当前页
-                let index = that.pageination.pageItem * (pageIndex - 1);
-                // 数据总数
-                let nums = that.pageination.pageItem * pageIndex;
-                // 容器
-                let tables = [];
-                for (var i = index; i < nums; i++) {
-                    if (that.allTableData[i]) {
-                        tables.push(that.allTableData[i])
-                    }
-                    this.tableData = tables;
-                }
-                that.start = index * that.draw;
-                // that.getTableQuery();
-            },
-            // 自动排序
-            sortChange(params) {
-                console.log(params)
-            },
-            //            过滤时间
-            filterFmtDate(value, row, column) {
-                let that = this;
-                if (column == 0) {
-                    return '未获得'
-                } else {
-                    return nonTfmtDatetoLength(new Date(column * 1000), 16);
-                }
-            },
+import Global from '../Global.js'
+import {
+  testTable,
+  testSelect,
+  ShopManagerStatusEdit,
+  ClassDetailOne,
+  QueryPvtHrSensors,
+  AddPvtHrSensors,
+  HrSensorsStatusEdit,
+  EditHrSensors,
+  UnBindHrSensorsToUser,
+  VipUserSimpleQuery,
+  GetHrSensorsPowerPercent
+} from "../api/getApiRes";
+
+let qs = require('qs');
+export default {
+  data() {
+    return {
+      activeName: 'comm',
+      dialogVisible: false,//其他dialog
+      BtnGetAllPower: false,//
+      dialogMemberVisible: false,//新增心率设备dialog
+      dialogLesson: false,//课时调整
+      dialogGift: false,//赠送课时调整
+      dialogExpTime: false,//有效期调整
+      dialogLessonTable: false,//心率设备课程
+      dialogTitle: '新增心率设备',
+      dialogValue: [],
+      tableRadio: [],
+      // panel 配置项目
+      panel: {
+        str: '',
+        phone: '',
+        compname: '',
+        keyword: '',
+        USERCODE: '',
+        endType: '',
+        taskstatus: 99,
+        status: "",
+        draw: 1,
+        start: 0,
+        recordsTotal: 0,
+        tableData: [],
+        allTableData: [],
+        limit: '10',
+        multipleSort: false,
+        loading: false,
+        fileList: [],
+        multipleSelection: [],
+        detectedmac: '',
+        statusOptions: [
+          {value: "", label: '全部'},
+          {value: 1, label: '启用'},
+          {value: 8, label: '暂停'},
+          {value: 9, label: '删除'},
+        ], 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: 10,
+        pageoptions: pageOptions(),
+        total: 100,
+        pageIndex: 1,
+      },
+      form: {
+        name: '',
+        userCode: '',
+        sn: '',
+        venueNo: '',
+        shopId: '',
+        teacherId: 0,
+        memberType: 1,
+        lesson: 1,
+        gift: 1,
+        btnType: 0,//0新建,1编辑编辑
+        memo: '',
+        phone: '',
+        expTime: '',
+        userId: '',
+        userList: [],//穿梭待选
+        dialogdata: [],//穿梭待选
+        dialogValue: [],//穿梭已选
+      },
+      memberTypes: [
+        {value: 1, label: '年心率设备'},
+        {value: 2, label: '充值心率设备'},
+      ],
+      tableData: []
+    }
+  },
+  mounted() {
+    this.vipSelect();
+    this.getTableQuery();
+  },
+  methods: {
+    vipSelect() {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+      };
+      let postdata = qs.stringify(param);
+      VipUserSimpleQuery(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.form.userId = '';
+          that.form.userList = turnResToOptionBySimViper(json.Rs);
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    handleClick(tab, event) {
+      let that = this;
+
+      if (tab.name == "personal") {
+        // 私有
+        that.$router.push({path: '/heartEquipPerson'});
+      } else {
+        // 公共
+        that.$router.push({path: '/heartEquip'});
+      }
+    },
+    // 设备回收
+    takeBack(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);
+        UnBindHrSensorsToUser(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 + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消回收'
+        });
+      });
+    },
+    goPage(row) {
+      // 查看绑定记录
+      this.$router.push({path: '/bindRecord', query: {hrId: row.HrId}});
+    },
+    goType(url) {
+      this.$router.push({path: '/' + url});
+    },
+    // 编辑
+    editList() {
+      let that = this;
+      this.clearForm();
+      console.log(this.tableRadio);
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let row = this.tableRadio;
+      this.form.shopid = row.ShopId;
+      this.form.userId = row.UserId;
+      this.form.name = row.Name;
+      this.form.userCode = row.Usercode;
+      this.form.password = '';
+      this.form.hrId = row.HrId;
+      this.form.sn = row.Sn;
+      this.form.venueNo = row.InVenueNo;
+      this.dialogVisible = true;
+      this.dialogTitle = '编辑心率设备';
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true
+    },
+    clickChange(item) {
+      this.tableRadio = item
+    },
+    // 选择课程后,获取当前课程的建议上课人数和课时消耗
+    getRowTop(row) {
+      let that = this;
+      console.log(row);
+      let param = {
+        token: localStorage.token,
+        classId: row.ClassId,
+      };
+      let postdata = qs.stringify(param);
+      ClassDetailOne(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          row.TopLimit = json.Rs.TopLimit;
+          row.ConsumeHour = json.Rs.ConsumeHour;
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 获取电量
+    getPower(row) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        shopId: row.ShopId,
+        hrId: row.HrId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          console.log(json);
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+      })
+    },
+    getAllPower() {
+      let that = this;
+      that.BtnGetAllPower = true;
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.ShopId,
+      };
+      let postdata = qs.stringify(param);
+      GetHrSensorsPowerPercent(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // table 重载
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '电量获取成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo);
+        }
+        that.BtnGetAllPower = false;
+      })
+    },
+    // 编辑
+    editMember(row) {
+      this.clearForm();
+      this.form.name = row.Name;
+      this.form.phone = row.Phone;
+      this.form.shopId = row.ShopId;
+      this.form.teacherId = row.TeacherId;
+      this.form.btnType = 1;
+      this.dialogMemberVisible = true
+      this.dialogTitle = '编辑心率设备'
+    },
+    // 禁用
+    pauseRow(row, status) {
+      let that = this;
+      let param = {
+        token: localStorage.token,
+        hrId: row.HrId,
+        status: status,//1:启用 8:暂停 9:删除
+      };
+      let postdata = qs.stringify(param);
+      HrSensorsStatusEdit(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.$message({
+            showClose: true,
+            message: '执行成功!',
+            type: 'success'
+          });
+          // table 重载
+          that.getTableQuery();
+          that.vipSelect();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // pauseRow(row) {
+    //     let that = this;
+    //     this.$confirm('是否禁用心率设备' + row.Sn + '?', '禁用操作', {
+    //         confirmButtonText: '确定',
+    //         cancelButtonText: '取消',
+    //         type: 'warning'
+    //     }).then(() => {
+    //         let param = {
+    //             token: localStorage.token,
+    //             shopId : localStorage.token,
+    //             status: 8,
+    //         };
+    //         let postdata = qs.stringify(param);
+    //         ShopVenueEquipEditStatus(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 + ' 错误码:' + json.Code);
+    //             }
+    //         })
+    //     }).catch(() => {
+    //         this.$message({
+    //             type: 'info',
+    //             message: '已取消禁用'
+    //         });
+    //     });
+    // },
+    // 启用
+    runRow(row) {
+      let that = this;
+      this.$confirm('是否启用心率设备' + row.Sn + '?', '启用操作', {
+        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 + ' 错误码:' + json.Code);
+          }
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消启用'
+        });
+      });
+    },
+    // 删除
+    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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+    // 关闭所有
+    allDialogClose() {
+      this.dialogVisible = false;
+      this.dialogGift = false;
+      this.dialogLesson = false;
+      this.dialogExpTime = false;
+      this.dialogLessonTable = false;
+    },
+    // 确认提交新增心率设备
+    confirmMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.sn) {
+        this.$message.error('错了哦,编号不能为空');
+        return false
+      }
+      if (that.form.sn.length > 20) {
+        this.$message.error('错了哦,编号不能超过20个字符');
+        return false
+      }
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        sn: that.form.sn,
+        userId: that.form.userId,
+      };
+      let postdata = qs.stringify(param);
+      AddPvtHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogMemberVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '心率设备添加成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    confirmEditMember() {
+      let that = this;
+      // checkNum
+      if (!that.form.sn) {
+        this.$message.error('错了哦,编号不能为空');
+        return false
+      }
+      if (that.form.sn.length > 20) {
+        this.$message.error('错了哦,编号不能超过20个字符');
+        return false
+      }
+
+      let param = {
+        token: localStorage.token,
+        shopId: localStorage.shopId,
+        hrId: that.form.hrId,
+        sn: that.form.sn,
+        venueNo: 0,
+      };
+      let postdata = qs.stringify(param);
+      EditHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          // 关闭弹窗
+          that.dialogMemberVisible = false;
+          // 重载列表
+          that.getTableQuery();
+          that.$message({
+            showClose: true,
+            message: '心率设备信息编辑成功!',
+            type: 'success'
+          });
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 确认提交课时
+    confirmLesson() {
+      let that = this;
+      // checkNum
+
+      let param = {
+        token: localStorage.token,
+        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 + ' 错误码:' + json.Code);
+        }
+      })
+    },
+    // 新增心率设备
+    addMember() {
+      this.clearForm();
+      this.dialogMemberVisible = true;
+      this.form.btnType = 0;
+      this.dialogTitle = '新增心率设备'
+    },
+    // 删除
+    delList() {
+      let that = this;
+      if (this.tableRadio.length == 0) {
+        this.$message.error("请先选中一条记录");
+        return false
+      }
+      let hrId = this.tableRadio.HrId;
+
+      let param = {
+        token: localStorage.token,
+        hrId: 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 + ' 错误码:' + json.Code);
+          }
+        });
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
+
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      this.getTableQuery();
+      this.$message.success('查询完毕');
+    },
+    clearForm() {
+      // clear
+      this.form.name = '';
+      this.form.sn = '';
+      this.form.venueNo = '';
+      this.form.phone = '';
+      this.form.userCode = '';
+      this.form.shopId = '';
+      this.form.userId = '';
+    },
+    // 页面数据查询
+    getTableQuery() {
+      let that = this;
+      that.loading = true;
+      let param = {
+        token: localStorage.token,
+        str: this.panel.str,//
+        status: this.panel.status,//
+        shopId: localStorage.shopId,//
+      };
+      let postdata = qs.stringify(param);
+      QueryPvtHrSensors(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          that.loading = false;
+          if (json.Rs) {
+            that.allTableData = json.Rs;
+            that.recordsTotal = json.Rs.length;
+          } else {
+            that.allTableData = [];
+            that.recordsTotal = 0;
+          }
+
+          // 设置分页数据
+          that.setPaginations();
+        } else {
+          that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
-        ,
-        watch: {
-            $route(to) {
-                if (to.name == 'heartEquipPerson') {
-                    if (this.$route.query.page == 'second') {
-                        this.getTableQuery();
-                        this.vipSelect();
-                    }
-                }
-
-            }
-            ,
+      })
+    },
+    // 设置分页数据
+    setPaginations() {
+      // 分页属性
+      let that = this;
+      that.pageination.total = that.recordsTotal;
+
+      // 默认分页
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+    },
+    // 每页显示数量
+    handleSizeChange() {
+      let that = this;
+      that.tableData = that.allTableData.filter((item, index) => {
+        return index < that.pageination.pageItem;
+      });
+      that.draw = that.pageination.pageItem;
+      // that.getTableQuery();
+    },
+    // 翻页
+    pageChange(pageIndex) {
+      let that = this;
+      // 获取当前页
+      let index = that.pageination.pageItem * (pageIndex - 1);
+      // 数据总数
+      let nums = that.pageination.pageItem * pageIndex;
+      // 容器
+      let tables = [];
+      for (var i = index; i < nums; i++) {
+        if (that.allTableData[i]) {
+          tables.push(that.allTableData[i])
         }
+        this.tableData = tables;
+      }
+      that.start = index * that.draw;
+      // that.getTableQuery();
+    },
+    // 自动排序
+    sortChange(params) {
+      console.log(params)
+    },
+    //            过滤时间
+    filterFmtDate(value, row, column) {
+      let that = this;
+      if (column == 0) {
+        return '未获得'
+      } else {
+        return nonTfmtDatetoLength(new Date(column * 1000), 16);
+      }
+    },
+  }
+  ,
+  watch: {
+    $route(to) {
+      if (to.name == 'heartEquipPerson') {
+        if (this.$route.query.page == 'second') {
+          this.getTableQuery();
+          this.vipSelect();
+        }
+      }
+
     }
+    ,
+  }
+}
 </script>
 
 <style scoped>
-    @import "../assets/css/panel.css";
-
-    .context {
-        /* height: 770px; */
-        overflow-y: scroll;
-
-        display: block;
-        margin: 0 auto;
-        background-color: #fff !important;
-        padding: 30px;
-    }
-
-    .panel-body {
-        padding: 20px;
-        background: #F0F2F5;
-    }
-
-    .change {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 10px;
-    }
-
-    .change button {
-        float: left;
-    }
-
-    .change button.pull-right {
-        float: right;
-    }
-
-    .likeTab {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 10px;
-        padding-bottom: 0;
-        border-bottom: 1px solid #ccc;
-        margin-bottom: 10px;
-    }
-
-    .likeTab button {
-        float: left;
-        border-radius: 0;
-    }
-
-    .likeTab button.pull-right {
-        float: right;
-    }
-
-    .dialogTitle {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #000000;
-        font-size: 18px;
-        text-align: center;
-    }
-
-    .dialogTitle em {
-        float: none;
-        font-style: normal;
-        color: #3799FF;
-        margin: 0;
-    }
-
-    /deep/ .el-transfer-panel__item .el-checkbox__input {
-        left: 40px;
-    }
-
-    .dialogFooter {
-        width: 90%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-top: 10px;
-    }
-
-    .dialogFooter button {
-        float: right;
-        margin-left: 10px;
-    }
-
-    .dialogContent {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .dialogContent .pull-left {
-        width: 30%;
-        float: left;
-    }
-
-    .dialogContent .pull-right {
-        width: 70%;
-        float: right;
-    }
-
-    /deep/ .el-dialog .el-select {
-        width: 100%;
-    }
-
-    .panel_control /deep/ .el-input {
-        width: 90px;
-        float: left;
-    }
+@import "../assets/css/panel.css";
+
+.context {
+  /* height: 770px; */
+  overflow-y: scroll;
+
+  display: block;
+  margin: 0 auto;
+  background-color: #fff !important;
+  padding: 30px;
+}
+
+.panel-body {
+  padding: 20px;
+  background: #F0F2F5;
+}
+
+.change {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 10px;
+}
+
+.change button {
+  float: left;
+}
+
+.change button.pull-right {
+  float: right;
+}
+
+.likeTab {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  padding-top: 10px;
+  padding-bottom: 0;
+  border-bottom: 1px solid #ccc;
+  margin-bottom: 10px;
+}
+
+.likeTab button {
+  float: left;
+  border-radius: 0;
+}
+
+.likeTab button.pull-right {
+  float: right;
+}
+
+.dialogTitle {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #000000;
+  font-size: 18px;
+  text-align: center;
+}
+
+.dialogTitle em {
+  float: none;
+  font-style: normal;
+  color: #3799FF;
+  margin: 0;
+}
+
+/deep/ .el-transfer-panel__item .el-checkbox__input {
+  left: 40px;
+}
+
+.dialogFooter {
+  width: 90%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  margin-top: 10px;
+}
+
+.dialogFooter button {
+  float: right;
+  margin-left: 10px;
+}
+
+.dialogContent {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.dialogContent .pull-left {
+  width: 30%;
+  float: left;
+}
+
+.dialogContent .pull-right {
+  width: 70%;
+  float: right;
+}
+
+/deep/ .el-dialog .el-select {
+  width: 100%;
+}
+
+.panel_control /deep/ .el-input {
+  width: 90px;
+  float: left;
+}
 </style>

+ 1 - 0
pc/vue.config.js

@@ -35,4 +35,5 @@ module.exports = {
     },
     // 输出文件目录
     outputDir: 'D:/wwwroot/flyLongStaticPc/build',
+    productionSourceMap: false,//关闭map文件,减少打包后体积
 };

+ 6 - 1
v2tv/src/Mock/index.js

@@ -197,12 +197,15 @@ let testStudent = function (num, team, mustbeTeamOne) {
 let getNewUser = function (code) {
 
     let item = [];
-    for (var i = 0; i < 3; i++) {
+    for (var i = 0; i < 7; i++) {
         item.push({
             "SvId": "@guid",
             "UserId": "@integer(15253135600, 15253135699)",
             "name": "测试人",
             "Name": "测试人",
+            "Sex": 1,
+            "Head": require('../static/img/testhead.png'),
+
         })
     }
 
@@ -223,6 +226,8 @@ let getRecordBreak = function (code) {
         "Ck": "@integer(10, 100)",
         "CleUnit": "千卡",
         "CkUnit": "CK",
+        "Sex": 1,
+        "Head": require('../static/img/testhead.png'),
     };
 
     return {

Різницю між файлами не показано, бо вона завелика
+ 26 - 0
v2tv/src/assets/imgs/newRecord/bg.svg


BIN
v2tv/src/assets/imgs/newRecord/shine.png


Різницю між файлами не показано, бо вона завелика
+ 26 - 0
v2tv/src/assets/imgs/newStudent/bg.svg


BIN
v2tv/src/assets/imgs/rank/Training.png


+ 14 - 0
v2tv/src/assets/imgs/rank/ck.svg

@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="89.63" height="69.973"
+     viewBox="0 0 89.63 69.973">
+    <defs>
+        <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+            <stop offset="0" stop-color="#ffe61f"/>
+            <stop offset="0.355" stop-color="#f47c29"/>
+            <stop offset="0.65" stop-color="#da2d24"/>
+            <stop offset="1" stop-color="#190002"/>
+        </linearGradient>
+    </defs>
+    <path id="路径_178" data-name="路径 178"
+          d="M1.009-19.541v3.327A38.284,38.284,0,0,1,.2-7.341Q-2.621,5.867-19.358,5.867a46.391,46.391,0,0,1-9.679-.807,12.994,12.994,0,0,1-6.453-3.63,14.422,14.422,0,0,1-4.285-7.663,71.887,71.887,0,0,1-.857-12.906V-44.244q0-10.284,5.394-15.074t15.678-4.789a36.181,36.181,0,0,1,9.78,1.059,13.41,13.41,0,0,1,6.352,4.134A17.013,17.013,0,0,1,.3-50.8a59.491,59.491,0,0,1,.706,10.587v3.63h-17.14V-47.369a31.513,31.513,0,0,0-.1-3.529,2.752,2.752,0,0,0-2.924-2.521q-3.428,0-3.428,4.336v39.02q0,5.344,3.327,5.344a2.4,2.4,0,0,0,2.621-1.714,30.206,30.206,0,0,0,.5-6.957v-8.772H1.009ZM49,5.564H30.344L23.085-24.179V5.564H5.037V-63.8H23.085v26.921L31.05-63.8H47.989L37.6-32.548Z"
+          transform="translate(40.633 64.106)" fill="url(#linear-gradient)"/>
+</svg>

BIN
v2tv/src/assets/imgs/rank/cr.png


+ 14 - 0
v2tv/src/assets/imgs/rank/fire.svg

@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="67.151" height="83"
+     viewBox="0 0 67.151 83">
+    <defs>
+        <linearGradient id="linear-gradient" x1="0.5" x2="0.5" y2="1" gradientUnits="objectBoundingBox">
+            <stop offset="0" stop-color="#ffe61f"/>
+            <stop offset="0.355" stop-color="#f47c29"/>
+            <stop offset="0.65" stop-color="#da2d24"/>
+            <stop offset="1" stop-color="#190002"/>
+        </linearGradient>
+    </defs>
+    <path id="路径_62" data-name="路径 62"
+          d="M3591,820.634s3.276,9.592.8,18.558-11.5,16.738-11.5,16.738a9.1,9.1,0,0,1-1.822-2.164c-1.113-1.651-2.618-4.44-2.618-4.44s-10.818,16.849-5.806,34.156,18.442,20.152,18.442,20.152a31.853,31.853,0,0,1,0-15.484c2.19-7.771,8.766-15.6,8.766-15.6a46.561,46.561,0,0,0,2.958,10.36,22.672,22.672,0,0,0,4.9,6.832,16.71,16.71,0,0,1,4.783,5.465,15.509,15.509,0,0,1,1.139,6.831s18.669.341,23.906-22.885-13.321-33.131-13.321-33.131a16.724,16.724,0,0,1-1.934,5.351,15.414,15.414,0,0,1-3.872,3.985s2.049-12.183-5.467-21.974S3591,820.634,3591,820.634Z"
+          transform="translate(-3568.724 -820.634)" fill="url(#linear-gradient)"/>
+</svg>

+ 52 - 0
v2tv/src/assets/imgs/rank/icons.svg

@@ -0,0 +1,52 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="709" height="37" viewBox="0 0 709 37">
+    <g id="组_730" data-name="组 730" transform="translate(-606 -1026)">
+        <g id="矩形_243" data-name="矩形 243" transform="translate(606 1026)" fill="rgba(255,255,255,0.27)" stroke="#707070"
+           stroke-width="1">
+            <rect width="53" height="37" rx="8" stroke="none"/>
+            <rect x="0.5" y="0.5" width="52" height="36" rx="7.5" fill="none"/>
+        </g>
+        <text id="CR" transform="translate(632 1053)" font-size="25" font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-17.375" y="0">CR</tspan>
+        </text>
+        <text id="场馆纪录" transform="translate(710 1053)" fill="#585858" font-size="22"
+              font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-44" y="0">场馆纪录</tspan>
+        </text>
+        <g id="矩形_243-2" data-name="矩形 243" transform="translate(980 1026)" fill="rgba(255,255,255,0.27)"
+           stroke="#707070" stroke-width="1">
+            <rect width="53" height="37" rx="8" stroke="none"/>
+            <rect x="0.5" y="0.5" width="52" height="36" rx="7.5" fill="none"/>
+        </g>
+        <text id="CB" transform="translate(1006 1053)" font-size="25" font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-17.438" y="0">CB</tspan>
+        </text>
+        <text id="场馆最佳" transform="translate(1084 1053)" fill="#585858" font-size="22"
+              font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-44" y="0">场馆最佳</tspan>
+        </text>
+        <g id="矩形_243-3" data-name="矩形 243" transform="translate(1167 1026)" fill="rgba(255,255,255,0.27)"
+           stroke="#707070" stroke-width="1">
+            <rect width="53" height="37" rx="8" stroke="none"/>
+            <rect x="0.5" y="0.5" width="52" height="36" rx="7.5" fill="none"/>
+        </g>
+        <text id="PB" transform="translate(1193 1053)" font-size="25" font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-16.3" y="0">PB</tspan>
+        </text>
+        <text id="个人最佳" transform="translate(1271 1053)" fill="#585858" font-size="22"
+              font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-44" y="0">个人最佳</tspan>
+        </text>
+        <g id="矩形_243-4" data-name="矩形 243" transform="translate(793 1026)" fill="rgba(255,255,255,0.27)"
+           stroke="#707070" stroke-width="1">
+            <rect width="53" height="37" rx="8" stroke="none"/>
+            <rect x="0.5" y="0.5" width="52" height="36" rx="7.5" fill="none"/>
+        </g>
+        <text id="MR" transform="translate(819 1053)" font-size="25" font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-19.175" y="0">MR</tspan>
+        </text>
+        <text id="竞技纪录" transform="translate(897 1053)" fill="#585858" font-size="22"
+              font-family="PingFangSC-Regular, PingFang SC">
+            <tspan x="-44" y="0">竞技纪录</tspan>
+        </text>
+    </g>
+</svg>

BIN
v2tv/src/assets/imgs/rank/mr.png


BIN
v2tv/src/assets/imgs/rank/pb.png


BIN
v2tv/src/assets/imgs/rank/titleBg.png


+ 147 - 148
v2tv/src/components/newRecord.vue

@@ -1,164 +1,163 @@
 <template>
-    <el-dialog title="" :visible.sync="toperInfo.dialogVisible" :close-on-click-modal="false" >
-        <div class="eggContainer">
-            <div class="toper">
-                <!--<img v-bind:src="require('../static/img/people/' + toperInfo.toper.head)" alt="">-->
-                <img :src="toperInfo.toper.Head" alt="" v-if="toperInfo.toper.Head">
-                <img src="../static/img/people/flyhead.png" alt="" v-if="!toperInfo.toper.Head">
-                <span>{{toperInfo.toper.UserName}}</span>
-            </div>
-            <div class="info">
-                <div class="lt">
-                    <h5>{{toperInfo.toper.CleTitle}}</h5>
-                    <div class="detail">
-                        <em>{{toperInfo.toper.Cle|fmtInt}}</em>
-                        <span>{{toperInfo.toper.CleUnit}}</span>
-                    </div>
-                    <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
-                </div>
-                <div class="rt">
-                    <h5>{{toperInfo.toper.CkTitle}}</h5>
-                    <div class="detail">
-                        <em>{{toperInfo.toper.Ck|fmtFloat}}</em>
-                        <span>{{toperInfo.toper.CkUnit}}</span>
-                    </div>
-                    <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
-                </div>
-            </div>
+  <el-dialog title="" :visible.sync="toperInfo.dialogVisible" :close-on-click-modal="false">
+    <div class="eggContainer">
+      <div class="eggBg">
+        <div class="toper">
+          <img :src="toperInfo.toper.Head" alt="" v-if="toperInfo.toper.Head"
+               :class="[{'boy':toperInfo.toper.Sex == 1},{'girl':toperInfo.toper.Sex == 2}]">
+          <img src="../static/img/people/flyhead.png" alt="" v-if="!toperInfo.toper.Head"
+               :class="[{'boy':toperInfo.toper.Sex == 1},{'girl':toperInfo.toper.Sex == 2}]">
+          <span class="names">{{ toperInfo.toper.UserName }}</span>
         </div>
-    </el-dialog>
+        <div class="info">
+          <div class="detail">
+            <em>{{ toperInfo.toper.Ck|fmtFloat }}</em>
+          </div>
+        </div>
+      </div>
+    </div>
+  </el-dialog>
 
 </template>
 
 <script>
-    export default {
-        data() {
-            return {
-                dialogTableVisible: true,
-                dialogFormVisible: false,
-            };
-        },
-        props: ['toperInfo'],
-        filters: {
-            fmtNum(val) {
-                if (val == 0) {
-                    return '--'
-                } else {
-                    if (parseInt(val) < 0) return 0;
-                    if (parseInt(val) > 0) return val
-                }
-            },
-            fmtFloat(val){
-                if (val == 0) {
-                    return '0'
-                } else {
-                    return parseFloat(val).toFixed(1);
-                }
-            },
-            fmtInt(val){
-                if (val == 0) {
-                    return '0'
-                } else {
-                    return parseInt(val);
-                }
-            },
-        },
-    }
+export default {
+  data() {
+    return {
+      dialogTableVisible: true,
+      dialogFormVisible: false,
+    };
+  },
+  props: ['toperInfo'],
+  filters: {
+    fmtNum(val) {
+      if (val == 0) {
+        return '--'
+      } else {
+        if (parseInt(val) < 0) return 0;
+        if (parseInt(val) > 0) return val
+      }
+    },
+    fmtFloat(val) {
+      if (val == 0) {
+        return '0'
+      } else {
+        return parseFloat(val).toFixed(1);
+      }
+    },
+    fmtInt(val) {
+      if (val == 0) {
+        return '0'
+      } else {
+        return parseInt(val);
+      }
+    },
+  },
+}
 </script>
 
-<style scoped>
-    /*成就彩蛋*/
-    /deep/ .el-dialog {
-        width: 22rem;
-        height: 6rem;
-        background: url("../static/img/newRecord/record.svg");
-        background-position: top center;
-        background-repeat: no-repeat;
-        background-size: 120% 100%;
-        box-shadow: none;
-        padding-bottom: 1rem;
-    }
+<style lang="scss" scoped>
+@mixin cube {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
 
-    .eggContainer {
-        width: 100%;
-        overflow: hidden;
-        margin: 0 auto;
-        float: left;
-    }
+/*成就彩蛋*/
+/deep/ .el-dialog {
+  @include cube;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  //background: url("../assets/imgs/newRecord/bg.svg");
+  background-position: top center;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+  box-shadow: none;
+  background-color: transparent;
+  margin-top: 0 !important;
+
+  &::after {
+    content: "";
+    background: url("../assets/imgs/newRecord/shine.png");
+    opacity: 0.5;
+    top: 0;
+    left: 0;
+    bottom: 0;
+    right: 0;
+    position: absolute;
+    z-index: -1;
+  }
+}
+
+.eggContainer {
+  @include cube;
+
+  .eggBg {
+    @include cube;
+    background: url("../assets/imgs/newRecord/bg.svg");
+    background-position: top center;
+    background-repeat: no-repeat;
+    background-size: 100% 100%;
+    margin-top: 10%;
+    height: 4rem;
+    overflow: visible;
 
     .toper {
-        width: 2.2rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        color: #fff;
-        font-size: 0.3rem;
-        line-height: 0.9rem;
-    }
-    .toper img {
-        width: 0.7rem;
-        height: 0.7rem;
-        float: left;
-        border-radius: 250px;
-        border: 2px dotted #fff;
-        padding: 0.1rem;
-    }
-    .info {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-    .info .lt {
-        width: 50%;
-        height: 4rem;
-        float: left;
-    }
-    .info .rt {
-        width: 50%;
-        height: 4rem;
-        float: left;
-    }
-    .info h5 {
-        width: 4rem;
-        height: 0.6rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        background: url("../static/img/newRecord/record_title.png");
-        background-repeat: no-repeat;
-        background-size: 100%;
-        background-position: top center;
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.3rem;
-        color: #333;
-        text-align: center;
-        line-height: 0.6rem;
-    }
+      @include cube;
+      position: relative;
+      top: -30%;
 
-    .info .detail {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-    .detail em {
-        font-size: 1.8rem;
-        color: #fff;
-        font-style: normal;
-    }
-    .detail span {
+      img {
+        @include cube;
+        width: 1.6rem;
+        border-radius: 250rem;
+
+        &.girl {
+          border: 0.05rem solid #EA26EA;
+        }
+
+        &.boy {
+          border: 0.05rem solid #39B6FF;
+        }
+      }
+
+      .names {
+        @include cube;
+        width: 1.2rem;
+        height: 0.5rem;
+        line-height: 0.5rem;
+        background: rgba(0, 0, 0, 0.49);
+        font-size: 0.25rem;
+        text-align: center;
+        border-radius: 250rem;
+        position: relative;
+        bottom: 0.4rem;
         color: #fff;
-        font-size: 0.3rem;
-        font-family: vista;
+      }
     }
-    .info img {
-        position: relative;
-        width: 2rem;
-        height: 2rem;
-        float: left;
-        left: 0;
-        bottom: 1rem;
+  }
+
+  .info {
+    @include cube;
+
+    em {
+      @include cube;
+      font-weight: bold;
+      font-size: 0.7rem;
+      text-align: center;
+      font-family: "Arial Black";
+      color: #b5000f;
+      text-shadow: 0px 4px 8px #fff;
+      font-style: normal !important;
+      text-decoration: none;
+      margin-top: 0.3rem;
     }
+  }
+}
+
+
 </style>

+ 172 - 0
v2tv/src/components/newRecord2.vue

@@ -0,0 +1,172 @@
+<template>
+  <el-dialog title="" :visible.sync="toperInfo.dialogVisible" :close-on-click-modal="false">
+    <div class="eggContainer">
+      <div class="toper">
+        <!--<img v-bind:src="require('../static/img/people/' + toperInfo.toper.head)" alt="">-->
+        <img :src="toperInfo.toper.Head" alt="" v-if="toperInfo.toper.Head">
+        <img src="../static/img/people/flyhead.png" alt="" v-if="!toperInfo.toper.Head">
+        <span>{{ toperInfo.toper.UserName }}</span>
+      </div>
+      <div class="info">
+        <div class="lt">
+          <h5>{{ toperInfo.toper.CleTitle }}</h5>
+          <div class="detail">
+            <em>{{ toperInfo.toper.Cle|fmtInt }}</em>
+            <span>{{ toperInfo.toper.CleUnit }}</span>
+          </div>
+          <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
+        </div>
+        <div class="rt">
+          <h5>{{ toperInfo.toper.CkTitle }}</h5>
+          <div class="detail">
+            <em>{{ toperInfo.toper.Ck|fmtFloat }}</em>
+            <span>{{ toperInfo.toper.CkUnit }}</span>
+          </div>
+          <img class="icons" src="../static/img/newRecord/record_icon.svg"/>
+        </div>
+      </div>
+    </div>
+  </el-dialog>
+
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      dialogTableVisible: true,
+      dialogFormVisible: false,
+    };
+  },
+  props: ['toperInfo'],
+  filters: {
+    fmtNum(val) {
+      if (val == 0) {
+        return '--'
+      } else {
+        if (parseInt(val) < 0) return 0;
+        if (parseInt(val) > 0) return val
+      }
+    },
+    fmtFloat(val) {
+      if (val == 0) {
+        return '0'
+      } else {
+        return parseFloat(val).toFixed(1);
+      }
+    },
+    fmtInt(val) {
+      if (val == 0) {
+        return '0'
+      } else {
+        return parseInt(val);
+      }
+    },
+  },
+}
+</script>
+
+<style scoped>
+/*成就彩蛋*/
+/deep/ .el-dialog {
+  width: 22rem;
+  height: 6rem;
+  background: url("../static/img/newRecord/record.svg");
+  background-position: top center;
+  background-repeat: no-repeat;
+  background-size: 120% 100%;
+  box-shadow: none;
+  padding-bottom: 1rem;
+}
+
+.eggContainer {
+  width: 100%;
+  overflow: hidden;
+  margin: 0 auto;
+  float: left;
+}
+
+.toper {
+  width: 2.2rem;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  color: #fff;
+  font-size: 0.3rem;
+  line-height: 0.9rem;
+}
+
+.toper img {
+  width: 0.7rem;
+  height: 0.7rem;
+  float: left;
+  border-radius: 250px;
+  border: 2px dotted #fff;
+  padding: 0.1rem;
+}
+
+.info {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.info .lt {
+  width: 50%;
+  height: 4rem;
+  float: left;
+}
+
+.info .rt {
+  width: 50%;
+  height: 4rem;
+  float: left;
+}
+
+.info h5 {
+  width: 4rem;
+  height: 0.6rem;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: url("../static/img/newRecord/record_title.png");
+  background-repeat: no-repeat;
+  background-size: 100%;
+  background-position: top center;
+  font-family: vista;
+  font-weight: normal;
+  font-size: 0.3rem;
+  color: #333;
+  text-align: center;
+  line-height: 0.6rem;
+}
+
+.info .detail {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.detail em {
+  font-size: 1.8rem;
+  color: #fff;
+  font-style: normal;
+}
+
+.detail span {
+  color: #fff;
+  font-size: 0.3rem;
+  font-family: vista;
+}
+
+.info img {
+  position: relative;
+  width: 2rem;
+  height: 2rem;
+  float: left;
+  left: 0;
+  bottom: 1rem;
+}
+</style>

+ 73 - 147
v2tv/src/components/newStudent.vue

@@ -1,24 +1,19 @@
 <template>
   <el-dialog title="" class="sss" :visible.sync="studentInfo.dialogVisible" :close-on-click-modal="false">
-    <div :class="[{'newStudentContainer1':bg == 0},{'newStudentContainer2':bg != 0}]">
+    <div :class="[{'newStudentContainer':true}]">
       <div class="info">
-        <span v-for="(s,i) in studentInfo.Rs" v-if="i < 8">{{ s.Name }}</span>
-      </div>
-      <div class="studentTips">
-                <span>
-                    欢迎新学员加入英泓小飞龙俱乐部
-                </span>
-        <span>
-                    欢迎入伙,以后你就是英泓小飞龙俱乐部的人啦,<i style="color: red">❤</i>!
-                </span>
-      </div>
-      <div class="progress">
-        <el-progress :percentage="studentInfo.percent" :show-text="false"></el-progress>
+        <ul :class="[{'many':studentInfo.Rs.length >= 2}]">
+          <li v-for="(s,i) in studentInfo.Rs" v-if="i < 8"
+              :class="[{'bigLi':studentInfo.Rs.length <= 4},{'smallLi':studentInfo.Rs.length > 4}]">
+            <img :src="s.Head" alt="" v-if="s.Head" :class="[{'boy':s.Sex == 1},{'girl':s.Sex == 2}]">
+            <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
+            <span class="names">{{ s.Name }}</span>
+          </li>
+        </ul>
+
       </div>
     </div>
-    <img class="long" src="../static/img/newStudent/long.png" alt="">
   </el-dialog>
-
 </template>
 
 <script>
@@ -51,16 +46,20 @@ export default {
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+
+@mixin cube {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
 /*成就彩蛋*/
 /deep/ .el-dialog {
   width: 80%;
   height: 6rem;
   background: none;
-  /*background: url("../static/img/newStudent/newStudent1.png");*/
-  /*background-position: top center;*/
-  /*background-repeat: no-repeat;*/
-  /*background-size: 100% 100%;*/
   box-shadow: none;
   border: none;
   padding-bottom: 1rem;
@@ -70,153 +69,80 @@ export default {
   display: none;
 }
 
-.newStudentContainer1 {
-  height: 6rem;
-  margin-top: 0;
-  background: url("../static/img/newStudent/newStudent1.png");
-  background-position: top center;
-  background-repeat: no-repeat;
-  background-size: 100% 100%;
-}
-
-.newStudentContainer2 {
+.newStudentContainer {
   height: 6rem;
   margin-top: 0;
-  background: url("../static/img/newStudent/newStudent2.png");
+  background: url("../assets/imgs/newStudent/bg.svg");
   background-position: top center;
   background-repeat: no-repeat;
   background-size: 100% 100%;
 }
 
-.info .lt {
-  width: 50%;
-  height: 4rem;
-  float: left;
-}
-
-.info .rt {
-  width: 50%;
-  height: 4rem;
-  float: left;
-}
-
-.info h5 {
-  width: 4rem;
-  height: 0.6rem;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  background: url("../static/img/newRecord/record_title.png");
-  background-repeat: no-repeat;
-  background-size: 100%;
-  background-position: top center;
-  font-family: vista;
-  font-weight: normal;
-  font-size: 0.3rem;
-  color: #333;
-  text-align: center;
-  line-height: 0.6rem;
-}
+ul {
+  @include cube;
+  width: 67%;
+  display: inline-flex;
+  align-items: center;
+  align-content: center;
+  justify-content: center;
+  flex-wrap: wrap;
+  flex-grow: 1;
+  padding-top: 12%;
 
-.info .detail {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+  &.many {
+    justify-content: space-between;
+  }
 
-.detail em {
-  font-size: 1.8rem;
-  color: #fff;
-  font-style: normal;
-}
+  li {
+    height: 2rem;
+    overflow: hidden;
 
-.detail span {
-  color: #fff;
-  font-size: 0.6rem;
-  font-family: vista;
-}
+    img {
+      @include cube;
+      width: 1.6rem;
+      border-radius: 250rem;
 
-.info img {
-  position: relative;
-  width: 2rem;
-  height: 2rem;
-  float: left;
-  left: 0;
-  bottom: 1rem;
-}
+      &.girl {
+        border: 0.05rem solid #EA26EA;
+      }
 
-.info {
-  width: 50%;
-  height: 2rem;
-  overflow: hidden;
-  display: flex;
-  margin: 0 auto;
-  padding-top: 2.9rem;
-  flex: 1;
-  flex-wrap: wrap;
-  /*justify-content: space-between;*/
-  justify-content: center;
-}
+      &.boy {
+        border: 0.05rem solid #39B6FF;
+      }
+    }
 
-.info span {
-  font-weight: 900;
-  font-size: 0.4rem;
-  text-align: center;
-  color: #FDED2E;
-  text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.38);
-  /*margin-right: 1rem;*/
-  padding-left: 0.1rem;
-  padding-right: 0.1rem;
-  padding-bottom: 0rem;
+    &.smallLi {
+      height: 2rem;
 
-}
+      img {
+        width: 1.6rem;
+      }
+    }
 
-.studentTips {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+    &.bigLi {
+      height: 3rem;
 
-.studentTips span {
-  width: 100%;
-  height: 0.3rem;
-  overflow: hidden;
-  display: flex;
-  margin: 0 auto;
-  padding-top: 0.1rem;
-  text-align: center;
-  font-weight: 500;
-  font-size: 0.3rem;
-  color: #000;
-  align-items: center;
-  justify-content: center;
-}
+      img {
+        width: 2.3rem;
+      }
+    }
 
-.progress {
-  position: relative;
-  top: 0.1rem;
-  width: 94%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
 
-/deep/ .el-progress-bar .el-progress-bar__outer {
-  height: 0.4rem;
+  }
 
+  .names {
+    @include cube;
+    width: 1.2rem;
+    background: rgba(0, 0, 0, 0.49);
+    font-size: 0.25rem;
+    text-align: center;
+    padding: 3% 1%;
+    border-radius: 250rem;
+    position: relative;
+    bottom: 0.4rem;
+    color: #fff;
+  }
 }
 
-/deep/ .el-progress-bar__inner {
-  background-color: #FFEE00;
-}
 
-.long {
-  position: relative;
-  float: right;
-  bottom: 1.6rem;
-  right: -0.5rem;
-  width: 1.5rem;
-}
 </style>

+ 222 - 0
v2tv/src/components/newStudent2.vue

@@ -0,0 +1,222 @@
+<template>
+  <el-dialog title="" class="sss" :visible.sync="studentInfo.dialogVisible" :close-on-click-modal="false">
+    <div :class="[{'newStudentContainer1':bg == 0},{'newStudentContainer2':bg != 0}]">
+      <div class="info">
+        <span v-for="(s,i) in studentInfo.Rs" v-if="i < 8">{{ s.Name }}</span>
+      </div>
+      <div class="studentTips">
+                <span>
+                    欢迎新学员加入英泓小飞龙俱乐部
+                </span>
+        <span>
+                    欢迎入伙,以后你就是英泓小飞龙俱乐部的人啦,<i style="color: red">❤</i>!
+                </span>
+      </div>
+      <div class="progress">
+        <el-progress :percentage="studentInfo.percent" :show-text="false"></el-progress>
+      </div>
+    </div>
+    <img class="long" src="../static/img/newStudent/long.png" alt="">
+  </el-dialog>
+
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      percent: 0,
+      totalTime: 0,
+      sumTime: 4,
+      bg: 0,
+    };
+  },
+  props: ['studentInfo'],
+  watch: {
+    studentInfo: {
+      handler(newName, oldName) {
+        let that = this;
+        if (newName.Rs != '') {
+          if (newName.Rs.length > 3) {
+            that.bg = 0
+          } else {
+            that.bg = 1
+          }
+        }
+      },
+      deep: true,
+      immediate: true
+    }
+  }
+}
+</script>
+
+<style scoped>
+/*成就彩蛋*/
+/deep/ .el-dialog {
+  width: 80%;
+  height: 6rem;
+  background: none;
+  /*background: url("../static/img/newStudent/newStudent1.png");*/
+  /*background-position: top center;*/
+  /*background-repeat: no-repeat;*/
+  /*background-size: 100% 100%;*/
+  box-shadow: none;
+  border: none;
+  padding-bottom: 1rem;
+}
+
+/deep/ .el-dialog__header {
+  display: none;
+}
+
+.newStudentContainer1 {
+  height: 6rem;
+  margin-top: 0;
+  background: url("../static/img/newStudent/newStudent1.png");
+  background-position: top center;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+
+.newStudentContainer2 {
+  height: 6rem;
+  margin-top: 0;
+  background: url("../static/img/newStudent/newStudent2.png");
+  background-position: top center;
+  background-repeat: no-repeat;
+  background-size: 100% 100%;
+}
+
+.info .lt {
+  width: 50%;
+  height: 4rem;
+  float: left;
+}
+
+.info .rt {
+  width: 50%;
+  height: 4rem;
+  float: left;
+}
+
+.info h5 {
+  width: 4rem;
+  height: 0.6rem;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+  background: url("../static/img/newRecord/record_title.png");
+  background-repeat: no-repeat;
+  background-size: 100%;
+  background-position: top center;
+  font-family: vista;
+  font-weight: normal;
+  font-size: 0.3rem;
+  color: #333;
+  text-align: center;
+  line-height: 0.6rem;
+}
+
+.info .detail {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.detail em {
+  font-size: 1.8rem;
+  color: #fff;
+  font-style: normal;
+}
+
+.detail span {
+  color: #fff;
+  font-size: 0.6rem;
+  font-family: vista;
+}
+
+.info img {
+  position: relative;
+  width: 2rem;
+  height: 2rem;
+  float: left;
+  left: 0;
+  bottom: 1rem;
+}
+
+.info {
+  width: 50%;
+  height: 2rem;
+  overflow: hidden;
+  display: flex;
+  margin: 0 auto;
+  padding-top: 2.9rem;
+  flex: 1;
+  flex-wrap: wrap;
+  /*justify-content: space-between;*/
+  justify-content: center;
+}
+
+.info span {
+  font-weight: 900;
+  font-size: 0.4rem;
+  text-align: center;
+  color: #FDED2E;
+  text-shadow: 0px 0px 1px rgba(0, 0, 0, 0.38);
+  /*margin-right: 1rem;*/
+  padding-left: 0.1rem;
+  padding-right: 0.1rem;
+  padding-bottom: 0rem;
+
+}
+
+.studentTips {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.studentTips span {
+  width: 100%;
+  height: 0.3rem;
+  overflow: hidden;
+  display: flex;
+  margin: 0 auto;
+  padding-top: 0.1rem;
+  text-align: center;
+  font-weight: 500;
+  font-size: 0.3rem;
+  color: #000;
+  align-items: center;
+  justify-content: center;
+}
+
+.progress {
+  position: relative;
+  top: 0.1rem;
+  width: 94%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+/deep/ .el-progress-bar .el-progress-bar__outer {
+  height: 0.4rem;
+
+}
+
+/deep/ .el-progress-bar__inner {
+  background-color: #FFEE00;
+}
+
+.long {
+  position: relative;
+  float: right;
+  bottom: 1.6rem;
+  right: -0.5rem;
+  width: 1.5rem;
+}
+</style>

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

@@ -205,7 +205,7 @@ export default {
       let clock = window.setInterval(() => {
         this.totalTime--;
         if (parseInt(this.totalTime) < 0) {
-          that.toperInfo.dialogVisible = false;
+          that.toperInfo.dialogVisible = false;// 关闭 自动关闭彩蛋
           clearInterval(clock);
         }
       }, 1000)
@@ -223,7 +223,7 @@ export default {
         this.studentInfo.percent = parseInt(num) > 100 ? 100 : num;
         console.log('num' + num);
         if (parseInt(this.studentTime) <= 0) {
-          that.studentInfo.dialogVisible = false;
+          that.studentInfo.dialogVisible = false; //关闭 自动关闭
           clearInterval(clock);
         }
       }, 1000)

+ 168 - 4
v2tv/src/views/Rank.vue

@@ -1,21 +1,185 @@
 <template>
   <div class="content">
+    <Headside></Headside>
     <div class="sumTitle">
       <div class="lt">
-
+        <img src="../assets/imgs/rank/fire.svg" alt="">
+        <h5>卡路里排名</h5>
+      </div>
+      <div class="md">本轮训练排名</div>
+      <div class="rt">
+        <h5>CK排名</h5>
+        <img src="../assets/imgs/rank/ck.svg" alt="">
+      </div>
+    </div>
+    <div class="listContainer">
+      <div class="lt">
+        <ul>
+          <div class="ltTitle">
+            <span>排名</span>
+            <span>成员</span>
+            <span>卡路里</span>
+          </div>
+          <li v-for="(s,i) in students.CalSort" v-if="i <= 7">
+            <div class="gary">
+              <em>{{ i + 1 }}</em>
+              <img :src="s.Head" alt="" v-if="s.Head" :class="[{'boy':s.Sex == 1},{'girl':s.Sex == 2}]">
+              <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head"
+                   :class="[{'boy':s.Sex == 1},{'girl':s.Sex == 2}]">
+              <span class="names">{{ s.UserName }}</span>
+              <span class="glory">
+                <img src="../assets/imgs/rank/cr.png" alt="">
+                <img src="../assets/imgs/rank/mr.png" alt="">
+                <img src="../assets/imgs/rank/pb.png" alt="">
+              </span>
+            </div>
+          </li>
+        </ul>
       </div>
-      <div class="md"></div>
       <div class="rt"></div>
     </div>
+    <div class="icons">
+      <img src="../assets/imgs/rank/icons.svg" alt="">
+    </div>
   </div>
 </template>
 
 <script>
+import Headside from '@/components/Headside'
+import {ClassUserRank} from "@/api/getApiRes";
+
 export default {
-  name: "Rank"
+  data() {
+    return {
+      eqSn: '30:9C:23:0C:8B:1E',
+      pageStyle: RandomBg(),
+      trueDate: true,//真实数据 true false
+      autoJump: true,//开启自动跳走
+      students: {
+        CkSort: [],
+        CalSort: [],
+      },
+      rankTimer: null,
+      totalTime: ''
+    }
+  },
+  methods: {
+    init() {
+      this.getClassUserRank();
+    },
+    getClassUserRank() {
+      let that = this;
+      let param = {
+        eqSn: localStorage.eqSn
+      };
+      let postdata = qs.stringify(param);
+      ClassUserRank(postdata).then(res => {
+        let json = res;
+        if (json.Code == 0) {
+          let totalTime = 40;
+          let Studenlength = 0;
+          if (json.Rs) {
+            Studenlength = json.Rs.length;
+          }
+          // 根据人数多少显示停留时间
+          if (Studenlength > 3) {
+            totalTime = 60
+          } else {
+            totalTime = 40
+          }
+          this.jumpWait(totalTime);
+          let CkSort = json.Rs;
+          let CalSort = deepClone(json.Rs);
+          let Rs = json.Rs;
+          if (Rs != '') {
+            // 排序
+            that.students.CkSort = json.Rs.sort(function (a, b) {
+              return b.Ck - a.Ck;
+            });
+
+            that.students.CalSort = CalSort.sort(function (a, b) {
+              return b.Cle - a.Cle;
+            });
+          }
+        } else {
+          this.students.CkSort = [];
+          this.students.CalSort = [];
+          if (json.Code == '999') {
+            // that.$router.push({path: '/'});
+          } else {
+            // 已出错
+            that.$message.error(json.Memo);
+          }
+        }
+      })
+    },
+  },
+  filters: {
+    fmtNum(val) {
+      if (val == 0) {
+        return '--'
+      } else {
+        if (parseInt(val) < 0) return 0;
+        if (parseInt(val) > 0) return val
+      }
+    },
+    fmtFloat(val) {
+      if (val == 0) {
+        return '0.0'
+      } else {
+        return parseFloat(val).toFixed(1);
+      }
+    },
+    fmtInt(val) {
+      if (val == 0) {
+        return '0'
+      } else {
+        return parseInt(val);
+      }
+    },
+  },
+  components: {
+    Headside
+  }
 }
 </script>
 
-<style scoped>
+<style lang="scss" scoped>
+@mixin bg {
+  height: 100%;
+  background-color: #333;
+  background-repeat: no-repeat;
+  background-position: top center;
+  background-size: 100% 100%;
+}
+
+@mixin cube {
+  width: 100%;
+  overflow: hidden;
+  display: block;
+  margin: 0 auto;
+}
+
+.content {
+  background: url("../../src/assets/imgs/rank/Training.png");
+  @include bg;
 
+  .sumTitle {
+    @include cube;
+    width: 80%;
+    height: 0.75rem;
+    margin-top: 0.5rem;
+    border-radius: 250rem;
+
+    .lt {
+      width: 40%;
+      float: left;
+    }
+
+    .rt {
+      width: 40%;
+      float: right;
+    }
+  }
+}
 </style>

Деякі файли не було показано, через те що забагато файлів було змінено