Browse Source

0609commit

zhengwei 4 years ago
parent
commit
403f6e9a40

+ 11 - 1
src/Global.js

@@ -341,7 +341,17 @@ turnResToOptionBySimViper = function (data) {
     });
     return ids
 };
-
+turnResToOptionByShopRegion = function (data) {
+    if (!data) return false;
+    let ids = data.map(item => {
+        return {
+            label: item.name,
+            key: item.uu_sv_id,
+            value: item.uu_sv_id
+        }
+    });
+    return ids
+};
 turnResToOptionByTempUser = function (data) {
     if (!data) return false;
     let ids = data.map(item => {

+ 1 - 1
src/components/Headside.vue

@@ -64,7 +64,7 @@ export default {
     }
   },
   mounted() {
-    this.left_hide();//默认展开侧边栏
+    // this.left_hide();//默认展开侧边栏
     this.name = localStorage.shopName;
     this.userName = localStorage.userName;
     this.canChange = localStorage.canChange;

+ 3 - 3
src/views/Class/ClassEdit.vue

@@ -1053,7 +1053,7 @@ export default {
 
 					// 返回课程管理
 					that.$router.push({
-						path: "/courses",
+						path: "/classManage",
 						query: {},
 					});
 					// that.FinishClass = 2;
@@ -1098,7 +1098,7 @@ export default {
 					});
 					// 返回课程管理
 					that.$router.push({
-						path: "/courses",
+						path: "/classManage",
 						query: {},
 					});
 				} else {
@@ -1437,7 +1437,7 @@ export default {
 		},
 		goBack() {
 			this.$router.push({
-				path: "/courses",
+				path: "/classManage",
 				query: {},
 			});
 		},

+ 154 - 112
src/views/Class/ClassManage.vue

@@ -1,11 +1,10 @@
 <template>
   <div class="context">
     <div class="panel">
-      <h5>课程管理
-      </h5>
+      <h5>课程管理</h5>
       <div class="likeTab">
         <el-button type="primary" @click="goType('classManage')" size="mini">当前课程</el-button>
-        <el-button type="" @click="goType('classHistory')" size="mini">历史记录</el-button>
+        <el-button @click="goType('classHistory')" size="mini">历史记录</el-button>
       </div>
       <div class="panel-body">
         <div class="panel_control">
@@ -27,75 +26,72 @@
     <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">
-        >
         <el-table-column label="序号" type="index" width="50" align="center" fixed>
           <template scope="scope">
             <span>{{ (start) + scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="BeginTime" label="上课时间" width="160" :formatter="filterFmtDate" fixed>
+        <el-table-column prop="begin_time" label="上课时间" width="160" :formatter="filterFmtDate" fixed>
         </el-table-column>
-        <el-table-column prop="ClassName" label="课程" sortable width="120" fixed>
+        <el-table-column prop="class_name" label="课程" sortable width="120" fixed>
           <template slot-scope="scope">
                         <span class="lessonSpan"
-                              :style="{background:scope.row.ClassColor}">{{ scope.row.ClassName }}</span>
+                              :style="{background:scope.row.ClassColor}">{{ scope.row.class_name }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="ConsumeHour" label="消耗课时" width="110" sortable>
-        </el-table-column>
-        <el-table-column prop="OrderNum" label="实际预约" width="110" sortable>
-        </el-table-column>
-        <el-table-column prop="SvName" label="区域" width="110" sortable>
+        <el-table-column prop="course_type" label="课程类型" width="110" sortable>
+          <template slot-scope="scope">
+            <span v-if="scope.row.course_type == 1">室内课</span>
+            <span v-if="scope.row.course_type == 2">户外课</span>
+            <span v-if="scope.row.course_type == 3">线上课</span>
+            <span v-if="scope.row.course_type == 4">混合课</span>
+          </template>
         </el-table-column>
-        <el-table-column prop="WxOrder" label="预约状态" width="110" sortable>
+        <el-table-column prop="class_type" label="上课方式" width="110" sortable>
           <template slot-scope="scope">
-            <span v-if="scope.row.WxOrder == 1" style="color: yellowgreen">可约</span>
-            <span v-if="scope.row.WxOrder == 0" style="color: red">不可约</span>
+            <span v-if="scope.row.class_type == 1">团课</span>
+            <span v-if="scope.row.class_type == 3">私教</span>
+            <span v-if="scope.row.class_type == 2 && scope.row.PkNum == 2">两队PK</span>
+            <span v-if="scope.row.class_type == 2 && scope.row.PkNum == 3">三队PK</span>
           </template>
         </el-table-column>
-        <el-table-column prop="ClassType" label="课程类型" width="110" sortable>
+        <el-table-column prop="sv_name" label="区域" width="110" sortable/>
+        <el-table-column prop="consume_hour" label="消耗课时" width="110" sortable/>
+        <el-table-column prop="order_num" label="实际预约" width="110" sortable/>
+        <el-table-column prop="wx_order" label="预约状态" width="110" sortable>
           <template slot-scope="scope">
-            <span v-if="scope.row.ClassType == 1">团课</span>
-            <span v-if="scope.row.ClassType == 3">私教</span>
-            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
-            <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
+            <span v-if="scope.row.wx_order == 1" style="color: yellowgreen">可约</span>
+            <span v-if="scope.row.wx_order == 0" style="color: red">不可约</span>
           </template>
         </el-table-column>
-        <el-table-column prop="FinishClass" label="当前状态" width="110" sortable>
+        <el-table-column prop="finish_class" label="当前状态" width="110" sortable>
           <template slot-scope="scope">
-            <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
-            <span v-if="scope.row.FinishClass == 1">已下课</span>
-            <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
-            <span v-if="scope.row.FinishClass == 3">准备上课</span>
-            <span v-if="scope.row.FinishClass == 4">已完成</span>
+            <span v-if="scope.row.finish_class == 0" style="color: red">未上课</span>
+            <span v-if="scope.row.finish_class == 1">已下课</span>
+            <span v-if="scope.row.finish_class == 2" style="color: yellowgreen">已上课</span>
+            <span v-if="scope.row.finish_class == 3">准备上课</span>
+            <span v-if="scope.row.finish_class == 4">已完成</span>
           </template>
         </el-table-column>
         <el-table-column prop="Status" label="操作">
           <template slot-scope="scope">
-            <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
-            <!--下课-->
-            <!--</el-button>-->
-            <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"
-                       @click="showDialogMemberVisible(scope.row)">
-              上课
+            <el-button type="primary" round size="mini" v-if="scope.row.finish_class == 0"
+                       @click="showDialogClassOn(scope.row)"> 上课
             </el-button>
-            <!--<el-button type="danger" round size="mini" v-if="scope.row.FinishClass == 0"-->
-            <!--@click="closeLesson(scope.row)">-->
-            <!--关课-->
-            <!--</el-button>-->
             <el-button type="primary" round size="mini"
-                       v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2" @click="seeEdit(scope.row)">
+                       v-if="scope.row.finish_class == 3 || scope.row.finish_class == 2"
+                       @click="classManage(scope.row)">
               管理
             </el-button>
             <!--修改区域 todo-->
-            <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
-                       @click="changeShopVenue(scope.row)">
+            <el-button type="primary" round plain size="mini" v-if="scope.row.finish_class == 3"
+                       @click="classEdit(scope.row)">
               编辑
             </el-button>
             <!--已完成才能看详情-->
             <el-button type="primary" round plain size="mini"
-                       v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
-                       @click="seeDetail(scope.row)">
+                       v-if="scope.row.finish_class == 1 || scope.row.finish_class == 4"
+                       @click="classDetail(scope.row)">
               详情
             </el-button>
 
@@ -106,11 +102,50 @@
       <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
                      @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
     </div>
-    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+    <el-dialog :title="dialogTitle" :visible.sync="dialogClassPrepareVisible" width="650px">
       <div class="dialogContent">
         <h5 class="classNames">{{ className }}</h5>
         <div class="">
           <el-form ref="form" :model="form" label-width="160px">
+            <!--选教练,非必选-->
+            <el-form-item label="上课教练">
+              <el-select v-model="coachValue" filterable placeholder="请选择">
+                <el-option v-for="item in form.coachData" :key="item.key" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <!--课程类型-->
+            <el-form-item label="课程类型" :required="true">
+              <el-select v-model="form.courseType" filterable placeholder="请选择">
+                <el-option v-for="item in form.courseTypeOptions" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <!--是否是心率课-->
+            <el-form-item align="left">
+              <span style="margin-left: -60px">
+                心率课
+              <el-switch
+                  style="margin-left: 30px"
+                  v-model="form.IsHr"
+                  active-color="#13ce66"
+                  inactive-color="#ff4949">
+              </el-switch>
+              </span>
+              <span style="margin-left: 50px">
+                评分课
+              <el-switch
+                  style="margin-left: 30px"
+                  v-model="form.IsScore"
+                  active-color="#13ce66"
+                  inactive-color="#ff4949">
+              </el-switch>
+              </span>
+            </el-form-item>
+
+            <!--选择区域-->
             <el-form-item label="区域" :required="true">
               <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
                 <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
@@ -118,30 +153,31 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="类型" :required="true">
+            <!--显示设备-->
+            <el-form-item label="显示设备">
+              <el-checkbox-group v-model="form.equipList">
+                <el-checkbox label="复选框 A"></el-checkbox>
+                <el-checkbox label="复选框 B"></el-checkbox>
+                <el-checkbox label="复选框 C"></el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+            <!--上课方式-->
+            <el-form-item label="上课方式" :required="true">
               <el-select v-model="form.classType" filterable placeholder="请选择">
-                <el-option v-for="item in form.ClassTypeOptions" :key="item.value" :label="item.label"
+                <el-option v-for="item in form.classTypeOptions" :key="item.value" :label="item.label"
                            :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="组队方式" v-if="form.classType == 2">
+            <!--分队方式-->
+            <el-form-item label="分队方式" v-if="form.classLabel == 2">
               <el-select v-model="form.pkNum" filterable placeholder="请选择">
                 <el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
                            :value="item.value">
                 </el-option>
               </el-select>
             </el-form-item>
-            <!--选教练,非必选-->
-            <el-form-item label="上课教练">
-              <!--<el-transfer filterable v-model="dialogCoachValue" :data="form.dialogCoachData"-->
-              <!--:titles="['教练列表', '已添加教练']"></el-transfer>-->
-              <el-select v-model="dialogCoachValue" filterable placeholder="请选择">
-                <el-option v-for="item in form.dialogCoachData" :key="item.key" :label="item.label"
-                           :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
+
           </el-form>
         </div>
       </div>
@@ -152,7 +188,7 @@
         <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
           确定
         </el-button>
-        <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+        <el-button size="small" @click="dialogClassPrepareVisible = false">取消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -176,11 +212,11 @@ let qs = require('qs');
 export default {
   data() {
     return {
-      dialogMemberVisible: false,
+      dialogClassPrepareVisible: false,
       searchBtnStatus: false,
       PrepareBtnStatus: false,
       dialogTitle: '上课准备',
-      dialogCoachValue: [],
+      coachValue: [],
       className: '',
       current: getNowDate(),
       dialogValue: [],
@@ -209,25 +245,34 @@ export default {
         pageIndex: 1,
       },
       form: {
-        name: '',
         svId: '',
         StdId: '',
+        IsHr: 1,
+        IsScore: 1,
         svName: '',
-        classType: 1,
+        equipList: ['选中且禁用', '复选框 A'],
+        classType: 1,//课程类型
+        courseType: 1,//课程标签
         coach: '',
         coachOptions: [],
         pkNum: 2,
         btnType: 0,//0新建,1编辑
         svList: [],//区域列表
-        dialogCoachData: [],//穿梭已选
-        ClassTypeOptions: [
+        coachData: [],//穿梭已选
+        courseTypeOptions: [
+          {value: 1, label: '室内课'},
+          {value: 2, label: '户外课'},
+          {value: 3, label: '线上课'},
+          {value: 4, label: '混合课'}
+        ],
+        classTypeOptions: [
           {value: 1, label: '团课'},
           {value: 2, label: '竞技PK'},
-          {value: 3, label: '私教'},
+          {value: 3, label: '私教'}
         ],
         PKTypeOptions: [
           {value: 2, label: '2队PK'},
-          {value: 3, label: '3队PK'},
+          {value: 3, label: '3队PK'}
         ],
       },
       tableData: []
@@ -241,17 +286,17 @@ export default {
       this.$router.push({path: '/' + url});
     },
     // 更改上课区域
-    changeShopVenue(row) {
-      this.dialogMemberVisible = true;
+    classEdit(row) {
+      this.dialogClassPrepareVisible = true;
       this.form.btnType = 1;//0新建,1编辑
       // 读取本行信息
-      this.dialogMemberVisible = true;
-      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-      this.form.StdId = row.StdId;
+      this.className = row.class_name + ' ' + row.begin_str + ' - ' + row.end_str;
+      this.form.StdId = row.std_id;
       this.getQueryShopVenue();
-      this.form.svId = row.SvId;
-      this.form.classType = row.ClassType;
-      this.form.pkNum = row.PkNum;
+      this.form.svId = row.sv_id;
+      this.form.classType = row.class_type;
+      this.form.courseType = row.course_type;
+      this.form.pkNum = row.pk_num;
     },
     // 准备上课
     getClassStartPrepare() {
@@ -263,7 +308,7 @@ export default {
       that.PrepareBtnStatus = true;
       // 不是竞技pk的时候为0
       let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
-      let tid = that.dialogCoachValue.toString();
+      let tid = that.coachValue.toString();
       let param = {
         token: localStorage.token,
         stdId: that.form.StdId,
@@ -299,7 +344,7 @@ export default {
               PkNum: uppkNum,
             }
           });
-          that.dialogMemberVisible = false;
+          that.dialogClassPrepareVisible = false;
           this.getTableQuery();
 
         } else {
@@ -330,33 +375,33 @@ export default {
         let json = res;
         if (json.Code == 0) {
           // NewId: 0
-          that.dialogMemberVisible = false;
+          that.dialogClassPrepareVisible = false;
           this.getTableQuery();
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
       })
     },
-    seeDetail(row) {
+    classDetail(row) {
       this.$router.push({
         path: '/classInfoDetail', query: {
-          StdId: row.StdId,
-          ClassName: row.ClassName,
-          BeginStr: row.BeginStr,
-          EndStr: row.EndStr,
+          StdId: row.std_id,
+          ClassName: row.class_name,
+          BeginStr: row.begin_str,
+          EndStr: row.end_str,
         }
       });
     },
-    seeEdit(row) {
+    classManage(row) {
       this.$router.push({
         path: '/classEdit', query: {
-          StdId: row.StdId,
-          ClassName: row.ClassName,
-          BeginStr: row.BeginStr,
-          EndStr: row.EndStr,
-          FinishClass: row.FinishClass,
-          ClassType: row.ClassType,
-          PkNum: row.PkNum,
+          StdId: row.std_id,
+          ClassName: row.class_name,
+          BeginStr: row.begin_str,
+          EndStr: row.end_str,
+          FinishClass: row.finish_class,
+          ClassType: row.class_type,
+          PkNum: row.pk_num,
         }
       });
     },
@@ -450,24 +495,22 @@ export default {
         }
       })
     },
-    showDialogMemberVisible(row) {
-      this.dialogMemberVisible = true;
+    //上课按钮弹出框
+    showDialogClassOn(row) {
+      this.dialogClassPrepareVisible = true;
       this.form.btnType = 0;//0新建,1编辑编辑
       // clear
       this.form.svList = "";
-      this.form.classType = 1;
-      this.form.pkNum = 2;
-
-      this.form.StdId = row.StdId;
-      this.form.ClassName = row.ClassName;
-      this.form.BeginStr = row.BeginStr;
-      this.form.EndStr = row.EndStr;
-      this.form.FinishClass = row.FinishClass;
-      this.form.ClassType = row.ClassType;
-      this.form.PkNum = row.PkNum;
-
-      this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
-      this.form.StdId = row.StdId;
+      this.form.StdId = row.std_id;
+      this.form.ClassName = row.class_name;
+      this.form.BeginStr = row.begin_str;
+      this.form.EndStr = row.end_str;
+      this.form.FinishClass = row.finish_class;
+      this.form.ClassType = row.class_type;
+      this.form.courseType = row.course_type;
+      this.form.PkNum = row.pk_num;
+      this.className = row.class_name + ' ' + row.begin_str + ' - ' + row.end_str;
+      this.form.StdId = row.std_id;
       this.getCoachOption();
       this.getQueryShopVenue();
     },
@@ -487,7 +530,7 @@ export default {
       ShopManagerListQuery(postdata).then(res => {
         let json = res;
         if (json.Code == 0) {
-          that.form.dialogCoachData = turnResToOptionByUsers(json.Rs);
+          that.form.coachData = turnResToOptionByUsers(json.Rs);
         } else {
           that.$message.error(json.Memo + ' 错误码:' + json.Code);
         }
@@ -499,7 +542,7 @@ export default {
       let that = this;
       let param = {
         token: localStorage.token,
-        stdId: row.StdId,
+        stdId: row.std_id,
       };
       let postdata = qs.stringify(param);
       ClassOverPrepare(postdata).then(res => {
@@ -514,10 +557,10 @@ export default {
     goFinish(row) {
       this.$router.push({
         path: '/classFinishDetail', query: {
-          id: row.StdId,
+          id: row.std_id,
           classId: row.ClassId,
-          ClassName: row.ClassName,
-          BeginTime: row.BeginTime,
+          ClassName: row.class_name,
+          BeginTime: row.begin_time,
         }
       });
     },
@@ -552,11 +595,10 @@ export default {
         bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
         et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
         fcStatus: 1,// 0:历史记录(对应finishClass 10,4组合 ) 1:上课中
-        courseType:-99,//-99是全部 1:室内课 2:户外课 3:线上课 4:混合课
+        courseType: -99,//-99是全部 1:室内课 2:户外课 3:线上课 4:混合课
         start: that.start,
         tableMax: that.pagination.pageItem
       };
-
       let paraRequest = new StandardRequest();
       paraRequest.setShopid(localStorage.shopId);
       paraRequest.setJsonstr(JSON.stringify(jsonStr));
@@ -569,10 +611,10 @@ export default {
           let res = JSON.parse(StandardReply);
           if (res.code === 0) {
             that.loading = false;
-            if(res.rs){
+            if (res.rs) {
               that.allTableData = res.rs;
               that.recordsTotal = res.rs.length;
-            }else{
+            } else {
               that.allTableData = [];
               that.recordsTotal = 0;
             }

+ 26 - 52
src/views/Member/MemberFull.vue

@@ -31,7 +31,7 @@
               </el-select>
             </el-col>
             <el-col :span="2">
-              <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
+              <el-button size="" type="primary" @click="query" plain :disabled="searchBtnStatus">查询</el-button>
             </el-col>
           </el-row>
         </div>
@@ -39,9 +39,9 @@
     </div>
     <div class="change">
       <el-button @click="addMember" type="primary" size="mini">新增会员</el-button>
-      <el-button @click="lessonChange"  size="mini">课时调整</el-button>
+      <el-button @click="lessonChange" size="mini">课时调整</el-button>
       <el-button @click="lessonStudenChange" size="mini">增删会员可预约课程</el-button>
-      <el-button @click="deleteMember"   size="mini">删除会员</el-button>
+      <el-button @click="deleteMember" size="mini">删除会员</el-button>
     </div>
     <div class="table">
       <br>
@@ -107,7 +107,7 @@
         <!--        <el-table-column prop="ClassInfo" label="会员课程" width="180px"/>-->
         <el-table-column prop="en_status" label="操作" width="300px">
           <template slot-scope="scope">
-            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)"  >
+            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)">
               编辑
             </el-button>
             <el-popover placement="left" title="开通课程" width="400" trigger="click">
@@ -129,7 +129,7 @@
         </el-table-column>
       </el-table>
       <div v-if="pageshow">
-        <el-pagination background :total="pageination.total" :page-size="pageination.pageItem"
+        <el-pagination background :total="pagination.total" :page-size="pagination.pageItem"
                        @current-change="pageChange" :current-page.sync="cur_page"></el-pagination>
       </div>
     </div>
@@ -275,7 +275,6 @@ export default {
       imageUrl: '',
       token: {}, // 七牛云的上传地址,根据自己所在地区选择,我这里是华南区
       domain: 'https://up-z1.qiniup.com', // 这是七牛云空间的外链默认域名
-      qiniuaddr: 'xhead.beswell.com',//xhead.beswell.com 旧的 qjzpcd34v.hb-bkt.clouddn.com
       pullRight: true,//其他dialog
       addDisabled: true,//禁止添加新用户
       dialogVisible: false,//其他dialog
@@ -287,48 +286,29 @@ export default {
       dialogLessonTable: false,//会员课程
       dialogTitle: '新增会员',
       dialogValue: [],
-      Takevalue: 0,
-      Takeoptions: [],
-      TakeHid: 0,
       start: 0,
       draw: 1,
       cur_page: 1,
+      recordsTotal: 0,
       pageshow: true,
       sexOptions: [
         {value: 1, label: '男'},//性别 1:男, 2:女
         {value: 2, label: '女'},
       ],
-      yearOptions: getyearOptions(15),
       userClassInfo: [],
       // panel 配置项目
       panel: {
-        usercode: '',
-        username: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        endType: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
         tableData: [],
         allTableData: [],
-        limit: '10',
-        multipleSort: false,
         loading: false,
-        fileList: [],
-        multipleSelection: [],
-        detectedmac: '',
         vipType: -99,
         expDay: -99999,
         vipOptions: vipOptions(0),
         endTypeOptions: endTypeOptions(),
-        time1: globalBt(),
       },
       multipleSelection: [],
       //分页数据
-      pageination: {
+      pagination: {
         pageItem: 10,//每页的条数
         pageoptions: pageOptions(),
         total: 10,
@@ -362,7 +342,7 @@ export default {
       memberTypes: vipOptions(1),
       tableData: [],
       tableRadio: [],
-      serachBtnStatus: false
+      searchBtnStatus: false
     }
   },
   mounted() {
@@ -382,11 +362,6 @@ export default {
     },
   },
   methods: {
-    // 查询用户是否乃跨店用户
-    // todo 逻辑
-    //  1.新用户正常注册
-    //  2.
-
     getUsrInfoList() {
       let that = this;
       // 只有新增的时候启用当前功能
@@ -453,7 +428,7 @@ export default {
     },
     // 关联手机号跳转
     goRelevance(row) {
-      this.$router.push({path: '/relevancePhone', query: {userId: row.uu_user_id,shopId: row.shop_id}});
+      this.$router.push({path: '/relevancePhone', query: {userId: row.uu_user_id, shopId: row.shop_id}});
     },
     cutDown(e) {
       this.imageUrl = e.dataURL;
@@ -501,8 +476,6 @@ export default {
           that.$message.error(res.message + ',错误码:' + res.code);
         }
       })
-
-
     },
     // 编辑会员信息
     editMember(row) {
@@ -827,7 +800,7 @@ export default {
         weight: that.form.weight,
         staticHr: that.form.staticHr,
         sex: that.form.sex,
-        expTime: getDate(1, 0),
+        expTime: getDate(new Date(), 1, 0, 0),
         headIconUrl: that.form.head,
         birthday: nonTfmtDatetoLength(that.form.birthday, 10)
       };
@@ -836,10 +809,11 @@ export default {
       standardReq.setShopid(localStorage.shopId);
       standardReq.setSign(getSignStr(jsonStr));
       standardReq.setJsonstr(JSON.stringify(jsonStr));
+      console.log(standardReq);
       that.client.shopVipUserAdd(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
         if (err == null) {
           let res = JSON.parse(StandardReply);
-
+          console.log(res);
           if (res.code == 0) {
             // 关闭弹窗
             that.dialogMemberVisible = false;
@@ -1033,7 +1007,7 @@ export default {
       that.client.classQuery(standardReq, {"Token": localStorage.token}, (err, StandardReply) => {
         if (err == null) {
           let res = JSON.parse(StandardReply);
-          if (res.code ==0) {
+          if (res.code == 0) {
             that.form.dialogdata = turnClassResToOption(res.rs);
           } else {
             that.$message.error(res.memo + ',错误代码:' + res.code);
@@ -1062,7 +1036,7 @@ export default {
       let that = this;
       that.start = 0;
       that.cur_page = 1;
-      that.serachBtnStatus = true;
+      that.searchBtnStatus = true;
       that.getTableQuery();
       this.pageshow = false;//让分页隐藏
       this.$nextTick(() => {//重新渲染分页
@@ -1074,7 +1048,7 @@ export default {
         totalTime--;
         if (totalTime < 0) {
           totalTime = 2;
-          that.serachBtnStatus = false;
+          that.searchBtnStatus = false;
         }
       }, 1000)
     },
@@ -1097,7 +1071,7 @@ export default {
       this.form.classlist = [];
     },
     // 页面数据查询
-     getTableQuery() {
+    getTableQuery() {
       let that = this;
       that.loading = true;
       that.allTableData = [];
@@ -1109,14 +1083,14 @@ export default {
         phone: that.panel.phone,
         expDay: that.panel.expDay,
         start: that.start,
-        tableMax: that.pageination.pageItem
+        tableMax: that.pagination.pageItem
       };
 
       let standardReq = new StandardRequest();
       standardReq.setShopid(localStorage.shopId);
       standardReq.setSign(getSignStr(jsonStr));
       standardReq.setJsonstr(JSON.stringify(jsonStr));
-
+      console.log(standardReq);
       that.allTableData = [];
       that.recordsTotal = 0;
 
@@ -1127,7 +1101,7 @@ export default {
           that.loading = false;
           if (res.rs) {
             that.allTableData = res.rs;
-            that.recordsTotal = res.pagecount * that.pageination.pageItem;
+            that.recordsTotal = res.pagecount * that.pagination.pageItem;
           } else {
             that.allTableData = [];
             that.recordsTotal = 0;
@@ -1144,31 +1118,31 @@ export default {
     setPagination() {
       // 分页属性
       let that = this;
-      that.pageination.total = that.recordsTotal;
+      that.pagination.total = that.recordsTotal;
       // 默认分页
       that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
+        return index < that.pagination.pageItem;
       });
     },
     // 每页显示数量
     handleSizeChange() {
       let that = this;
       that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
+        return index < that.pagination.pageItem;
       });
-      that.draw = that.pageination.pageItem;
+      that.draw = that.pagination.pageItem;
       that.getTableQuery();
     },
     // 翻页
     pageChange(pageIndex) {
       let that = this;
       // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
+      let index = that.pagination.pageItem * (pageIndex - 1);
       // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
+      let nums = that.pagination.pageItem * pageIndex;
       // 容器
       let tables = [];
-      for (var i = index; i < nums; i++) {
+      for (let i = index; i < nums; i++) {
         if (that.allTableData[i]) {
           tables.push(that.allTableData[i])
         }

+ 273 - 139
src/views/SystemManage/ShopDevice.vue

@@ -2,10 +2,37 @@
   <div class="context">
     <div class="panel">
       <h5> 商家设备管理 </h5>
+      <div class="panel-body">
+        <el-row :gutter="20">
+          <el-col :span="5" style=" width: 260px">
+            <em>设备编号:</em>
+            <el-input style="margin-left:10px; width: 140px" v-model="panel.eqSn" placeholder="请输入设备编号"/>
+          </el-col>
+          <el-col :span="5" style="width: 260px">
+            <em>所属区域:</em>
+            <el-select style="margin-left:10px; width: 150px" v-model="panel.region">
+              <el-option v-for="item in regionList" :key="item.value" :label="item.label"
+                         :value="item.value">
+              </el-option>
+            </el-select>
+          </el-col>
+          <el-col :span="5" style="width: 260px">
+            <em>设备类型:</em>
+            <el-select style="margin-left:10px; width: 150px" v-model="panel.equipType">
+              <el-option v-for="item in equipSearchOptions" :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 :disabled="searchBtnStatus">查询</el-button>
+          </el-col>
+        </el-row>
+      </div>
     </div>
     <div class="change">
       <el-button @click="addRegionEquip" type="primary" size="mini">新增区域设备</el-button>
-      <el-button @click="editList" size="mini">编辑区域设备</el-button>
+      <el-button @click="editRegionEquip" size="mini">编辑区域设备</el-button>
     </div>
     <div class="table">
       <el-table
@@ -28,17 +55,20 @@
             align="center"
             width="50">
         </el-table-column>
+
+        <el-table-column
+            prop="eq_name"
+            label="设备名"
+        />
         <el-table-column
             prop="eqsn"
             label="序列号"
-        >
-        </el-table-column>
+        />
         <el-table-column
             prop="version"
             label="版本"
             sortable
-        >
-        </el-table-column>
+        />
         <el-table-column
             prop="equip_type"
             label="类型"
@@ -58,19 +88,18 @@
           <!--1:启用  8:暂停  9:删除-->
           <template slot-scope="scope">
             <span v-if="scope.row.status == 1" style="color: yellowgreen">启用</span>
-            <span v-if="scope.row.status == 8" style="color: yellow">暂停</span>
-            <span v-if="scope.row.status == 9" style="color: red">删除</span>
+            <span v-if="scope.row.status == 0" style="color: red">暂停</span>
+            <span v-if="scope.row.status == 9" style="color: purple">删除</span>
           </template>
         </el-table-column>
         <el-table-column
             prop="address"
             label="操作">
           <template slot-scope="scope">
-            <el-button type="success" @click="run(scope.row)" v-if="scope.row.status == 8">开启</el-button>
-            <el-button type="danger" @click="pause(scope.row)" v-if="scope.row.status == 1">暂停</el-button>
-            <span v-if="scope.row.equip_type != 3" style="color: red">
-                        <el-button type="danger" size="mini" @click="pauseRowDel(scope.row)">删除</el-button>
-                      </span>
+            <el-button type="success" @click="run(scope.row)" v-if="scope.row.status == 0" size="mini">开启</el-button>
+            <el-button type="warning" @click="pause(scope.row)" v-if="scope.row.status == 1" size="mini">暂停</el-button>
+            <el-button type="danger" @click="pauseRowDel(scope.row)" size="mini" v-if="scope.row.equip_type !== 3">删除
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
@@ -86,6 +115,13 @@
       <div class="dialogContent">
         <div class="">
           <el-form ref="form" :model="form" label-width="160px">
+            <el-form-item label="选择区域">
+              <el-select v-model="form.uuSvId">
+                <el-option v-for="item in regionList" :key="item.value" :label="item.label"
+                           :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
             <el-form-item label="设备序列号">
               <el-input v-model="form.eqSn "></el-input>
             </el-form-item>
@@ -93,9 +129,9 @@
               <el-input v-model="form.version"></el-input>
             </el-form-item>
             <el-form-item label="设备类型">
-              <el-select v-model="form.equipType " placeholder="请选择">
+              <el-select v-model="form.equipType" placeholder="请选择">
                 <el-option
-                    v-for="item in options"
+                    v-for="item in equipOptions"
                     :key="item.value"
                     :label="item.label"
                     :value="item.value">
@@ -106,9 +142,8 @@
         </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 type="primary" size="small" v-if="form.btnType == 0" @click="confirmAddEquip">确定</el-button>
+        <el-button type="primary" size="small" v-if="form.btnType == 1" @click="confirmEditEquip">确定</el-button>
         <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
       </div>
     </el-dialog>
@@ -117,12 +152,6 @@
 
 <script>
 import Global from '../../Global.js'
-import {
-  QueryVenueEquip,
-  AddShopVenueEquip,
-  EditShopVenueEquip,
-  ShopVenueEquipEditStatus
-} from "../../api/getApiRes";
 import {
   StandardRequest
 } from "@/grpc/base_pb";
@@ -135,7 +164,6 @@ export default {
       dialogVisible: false,
       dialogMemberVisible: false,
       dialogTitle: '新增区域设备',
-      // panel 配置项目
       multipleSelection: [],
       tableRadio: [],
       pagination: {
@@ -144,6 +172,17 @@ export default {
         total: 100,
         pageIndex: 1,
       },
+      // panel 配置项目
+      regionList: [],
+      panel: {
+        equipType: -99
+      },
+      equipSearchOptions: [
+        {value: -99, label: '全部'},
+        {value: 1, label: 'TVBox'},
+        {value: 2, label: 'BLEHub'},
+        {value: 3, label: '演示设备'},
+      ],
       form: {
         eqId: '',
         eqSn: '',
@@ -154,17 +193,19 @@ export default {
         btnType: 0,
         equipType: 1,
       },
-      options: [
+      equipOptions: [
         {value: 1, label: 'TVBox'},
         {value: 2, label: 'BLEHub'},
         {value: 3, label: '演示设备'},
       ],
       shops: [],
       tableData: [],
+      searchBtnStatus: false
     }
   },
   mounted() {
     this.regionName = this.$route.query.name;
+    this.panelSelect();
     this.getTableQuery();
   },
   methods: {
@@ -193,10 +234,11 @@ export default {
       this.clearForm();
       this.dialogMemberVisible = true;
       this.btnType = 0;
+      this.uuSvId = '';
       this.dialogTitle = '新增区域设备'
     },
     // 确认提交新增区域设备
-    confirmMember() {
+    confirmAddEquip() {
       let that = this;
       // checkNum
       if (!that.form.eqSn) {
@@ -208,34 +250,45 @@ export default {
         return false
       }
 
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-        eqSn: this.form.eqSn,
+      const jsonStr = {
+        shopId: localStorage.shopId,
+        eqsn: this.form.eqSn,
+        eqType: this.form.equipType,
         version: this.form.version,
-        equipType: this.form.equipType,
+        UuSvId: this.form.region,
       };
-      let postdata = qs.stringify(param);
-      AddShopVenueEquip(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '所属设备添加成功!',
-            type: 'success'
-          });
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.shopVenueEquipAdd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '所属设备添加成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
         } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
         }
-      })
+      });
     },
     //修改设备
-    editList() {
+    editRegionEquip() {
       let that = this;
       this.clearForm();
       if (this.tableRadio.length == 0) {
@@ -243,25 +296,17 @@ export default {
         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.phone = row.Phone;
-      this.form.eqId = row.EqId;
+      this.form.uuSvId = row.uu_sv_id;
       this.form.eqSn = row.eqsn.trim();
       this.form.version = row.version.trim();
       this.form.equipType = row.equip_type;
-      this.form.memo = row.Memo;
-      this.form.adminType = row.AdminType;
       this.dialogVisible = true;
       this.dialogTitle = '编辑区域设备';
       this.form.btnType = 1;
       this.dialogMemberVisible = true
     },
     //确认提交修改
-    confirmEditMember() {
+    confirmEditEquip() {
       let that = this;
       console.log(that.form.version.length);
       // checkNum
@@ -275,59 +320,82 @@ export default {
       }
       let param = {
         key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: this.$route.query.svId,
-        eqId: this.form.eqId,
+
+      };
+      const jsonStr = {
         eqSn: this.form.eqSn,
+        shopId: localStorage.shopId,
+        eqType: this.form.equipType,
         version: this.form.version,
-        equipType: this.form.equipType,
+        UuSvId: this.form.uuSvId
       };
-      let postdata = qs.stringify(param);
-      EditShopVenueEquip(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '区域设备信息编辑成功!',
-            type: 'success'
-          });
+
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.shopVenueEquipAdd(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            // 关闭弹窗
+            that.dialogMemberVisible = false;
+            // 重载列表
+            that.getTableQuery();
+            that.$message({
+              showClose: true,
+              message: '区域设备信息编辑成功!',
+              type: 'success'
+            });
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
         } else {
-          that.$message.error(json.Memo + ' 错误码:' + json.Code);
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
         }
-      })
+      });
     },
     //删除
     pauseRowDel(row) {
       let that = this;
-      let param = {
-        key: localStorage.ServiceKey,
-        shopId: localStorage.ServiceId,
-        svId: row.SvId,
-        eqId: row.eq_id,
-        status: 9,//1:启用 8:暂停 9:删除
-      };
-      let postdata = qs.stringify(param);
+
       this.$confirm('此操作将永久删除该区域设备, 是否继续?', '提示', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的区域设备已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
+        const jsonStr = {
+          UuEqId: row.uu_eq_id,
+          status: 1//1启用 0禁用 9删除
+        };
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.shopVenueEquipStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: '选中的区域设备已删除!',
+                type: 'success'
+              });
+              // 重载列表
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
           } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
           }
         });
       }).catch(() => {
@@ -346,30 +414,36 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-
-        let param = {
-          key: localStorage.ServiceKey,
-          shopId: localStorage.ServiceId,
-          svId: this.$route.query.svId,
-          eqId: row.eq_id,
-          status: 8,//1:启用 8:暂停 9:删除
+        const jsonStr = {
+          UuEqId: row.uu_eq_id,
+          status: 0 //1启用 0禁用 9删除
         };
-
-        let postdata = qs.stringify(param);
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.eqsn + '暂停成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.shopVenueEquipStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.eqsn + '暂停成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
           } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
           }
-        })
+        });
       }).catch(() => {
         this.$message({
           type: 'info',
@@ -385,30 +459,36 @@ export default {
         cancelButtonText: '取消',
         type: 'warning'
       }).then(() => {
-
-        let param = {
-          key: localStorage.ServiceKey,
-          shopId: localStorage.ServiceId,
-          svId: this.$route.query.svId,
-          eqId: row.eq_id,
-          status: 1,//1:启用 8:暂停 9:删除
+        const jsonStr = {
+          UuEqId: row.uu_eq_id,
+          status: 1//1启用 0禁用 9删除
         };
-
-        let postdata = qs.stringify(param);
-        ShopVenueEquipEditStatus(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.eqsn + '开启成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
+        let paraRequest = new StandardRequest();
+        paraRequest.setShopid(localStorage.shopId);
+        paraRequest.setJsonstr(JSON.stringify(jsonStr));
+        paraRequest.setSign(getSignStr(jsonStr));
+        console.log(paraRequest);
+        that.client.shopVenueEquipStatusEdit(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+          if (err == null) {
+            console.log(StandardReply.getJsonrst());
+            let res = JSON.parse(StandardReply);
+            if (res.code === 0) {
+              that.$message({
+                showClose: true,
+                message: row.eqsn + '开启成功!',
+                type: 'success'
+              });
+              // table 重载
+              that.getTableQuery();
+            } else {
+              that.$message.error(res.memo + ',错误代码:' + res.code);
+            }
           } else {
-            that.$message.error(json.Memo + ' 错误码:' + json.Code);
+            let res = err;
+            that.$message.error(res.message + ',错误代码:' + res.code);
+            console.log(res);
           }
-        })
+        });
       }).catch(() => {
         this.$message({
           type: 'info',
@@ -416,6 +496,59 @@ export default {
         });
       });
     },
+    panelSelect() {
+      let that = this;
+      that.loading = true;
+      const jsonStr = {
+        shopId: localStorage.shopId
+      };
+      let paraRequest = new StandardRequest();
+      paraRequest.setShopid(localStorage.shopId);
+      paraRequest.setJsonstr(JSON.stringify(jsonStr));
+      paraRequest.setSign(getSignStr(jsonStr));
+      console.log(paraRequest);
+      that.client.shopVenueQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
+        if (err == null) {
+          console.log(StandardReply.getJsonrst());
+          let res = JSON.parse(StandardReply);
+          if (res.code === 0) {
+            that.loading = false;
+            if (res.rs) {
+              that.regionList = turnResToOptionByShopRegion(res.rs);
+            } else {
+              that.regionList = [];
+            }
+          } else {
+            that.$message.error(res.memo + ',错误代码:' + res.code);
+          }
+        } else {
+          let res = err;
+          that.$message.error(res.message + ',错误代码:' + res.code);
+          console.log(res);
+        }
+      });
+    },
+    // 查询按钮
+    query() {
+      let that = this;
+      that.start = 0;
+      that.cur_page = 1;
+      that.searchBtnStatus = true;
+      that.getTableQuery();
+      this.pageshow = false;//让分页隐藏
+      this.$nextTick(() => {//重新渲染分页
+        this.pageshow = true;
+      });
+      that.$message.success('查询完毕');
+      let totalTime = 2;
+      let clock = window.setInterval(() => {
+        totalTime--;
+        if (totalTime < 0) {
+          totalTime = 2;
+          that.searchBtnStatus = false;
+        }
+      }, 1000)
+    },
     // 页面数据查询
     getTableQuery() {
       let that = this;
@@ -423,7 +556,8 @@ export default {
 
       const jsonStr = {
         shopId: localStorage.shopId,
-        eqType: 1//1:TVBox  2:蓝牙心率Hub 3:演示Pad  -99全部
+        eqsn: that.panel.eqSn,
+        eqType: that.panel.equipType//1:TVBox  2:蓝牙心率Hub 3:演示Pad  -99全部
       };
 
       let paraRequest = new StandardRequest();