zhengwei 4 éve
szülő
commit
ea06f1ff8e
3 módosított fájl, 944 hozzáadás és 927 törlés
  1. 2 3
      README.md
  2. 1 1
      src/grpc/readme.md
  3. 941 923
      src/views/HrSensor/HrSensor.vue

+ 2 - 3
README.md

@@ -2,7 +2,6 @@
 ## 运动健身综合管理平台
 
 api服务文档
-(略
 
 基于 https://panjiachen.github.io/vue-element-admin-site/zh/guide/ 的版本, 只保留常用功能和修改部分UI效果  
 
@@ -14,7 +13,7 @@ git clone git@git.beswell.com:(未定)
 
 ###进入项目目录  
 
-cd sportCms  
+cd sportFitnessPlatform  
 
 
 ##安装淘宝源,已安装可忽略
@@ -23,7 +22,7 @@ npm install --registry=https://registry.npm.taobao.org
 
 ###安装依赖  
 
-cnpm i 
+cnpm install 
 
 ###本地开发 启动项目  
 

+ 1 - 1
src/grpc/readme.md

@@ -88,7 +88,7 @@ const jsonStr = {
 shopId: localStorage.shopId,
 vipType: -99,
 start: that.start,
-tableMax: that.pagination.pageItem
+tableMax: that.pageination.pageItem
 };
 
 let paraRequest = new StandardRequest();

+ 941 - 923
src/views/HrSensor/HrSensor.vue

@@ -1,937 +1,955 @@
 <template>
-    <div class="context">
-        <div class="panel">
-            <h5>心率设备</h5>
-            <div class="likeTab">
-                <el-button type="primary" @click="goType('hrSensor')" size="mini">场馆心率设备</el-button>
-                <el-button type @click="goType('hrSensorPrivate')" 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('hrSensor')" size="mini">场馆心率设备</el-button>
+        <el-button type @click="goType('hrSensorPrivate')" 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: []
+import Global from '../../Global.js'
+import {
+  testTable,
+  testSelect,
+  ShopManagerStatusEdit,
+  ClassDetailOne,
+  QueryHrSensors,
+  AddHrSensors,
+  HrSensorsStatusEdit,
+  EditHrSensors,
+  UnBindHrSensorsToUser,
+  GetHrSensorsPowerPercent,
+  ShopVenueEquipEditStatus,
+} from "../../api/getApiRes";
+import {
+  StandardRequest
+} from "@/grpc/base_pb";
+
+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: '/hrSensorPrivate'});
+      } else {
+        // 公共
+        that.$router.push({path: '/hrSensor'});
+      }
+    },
+    // 设备回收
+    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: '/hrSensorLog', 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;
+
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        snOrNO: this.panel.str,
+        start: that.start,
+        tableMax: that.pageination.pageItem
+      };
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.hrSensorsPublicQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          that.loading = false;
+          if (res.code === 0) {
+            if (res.rs) {
+              that.allTableData = json.Rs;
+              that.recordsTotal = json.Rs.length;
+            } else {
+              that.allTableData = [];
+              that.recordsTotal = 0;
             }
-        },
-        mounted() {
-            this.getTableQuery();
-        },
-        methods: {
-            handleClick(tab, event) {
-                let that = this;
-
-                if (tab.name == "personal") {
-                    // 私有
-                    that.$router.push({ path: '/hrSensorPrivate' });
-                } else {
-                    // 公共
-                    that.$router.push({ path: '/hrSensor' });
-                }
-            },
-            // 设备回收
-            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: '/hrSensorLog', 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.setPagination();
-                    } else {
-                        that.$message.error(json.Memo + ' 错误码:' + json.Code);
-                    }
-                })
-            },
             // 设置分页数据
-            setPagination() {
-                // 分页属性
-                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);
-                }
-            },
-        },
-    }
+            that.setPagination();
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 设置分页数据
+    setPagination() {
+      // 分页属性
+      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>