瀏覽代碼

小飞龙新版上课系统

Changpeng Duan 5 年之前
父節點
當前提交
d798bcb120
共有 8 個文件被更改,包括 2442 次插入2282 次删除
  1. 1 0
      pc/src/Global.js
  2. 2 0
      pc/src/components/Headside.vue
  3. 1153 1136
      pc/src/views/Member.vue
  4. 585 443
      pc/src/views/heartLog.vue
  5. 648 646
      pc/src/views/region.vue
  6. 7 0
      pc/vue.config.js
  7. 42 55
      tv/.idea/workspace.xml
  8. 4 2
      tv/src/views/Rank.vue

+ 1 - 0
pc/src/Global.js

@@ -6,6 +6,7 @@ companyInfo = {
 };
 
 headapi = process.env.NODE_ENV === 'development' ? '/api/' : '../';
+headbpi = process.env.NODE_ENV === 'development' ? '/bpi/' : '../';
 
 
 // 常用选项

+ 2 - 0
pc/src/components/Headside.vue

@@ -88,6 +88,8 @@
                         that.user.name = json.Rs.Name;
                         localStorage.shopId = json.Rs.ShopId;
                         localStorage.userLevel = json.Rs.Role.Id;
+                        localStorage.ServiceId = json.Rs.Shop.ServiceId;
+                        localStorage.ServiceKey = json.Rs.Shop.ServiceKey;
                     } else {
                         if(json.Code == 1010){
                             that.$message.error(json.Memo);

+ 1153 - 1136
pc/src/views/Member.vue

@@ -1,1183 +1,1200 @@
 <template>
-  <div class="context">
-    <div class="panel">
-      <h5>会员管理</h5>
-      <div class="panel-body">
-        <div class="panel_control">
-          <el-row :gutter="20">
-            <el-col :span="4">
-              <em>姓名:</em>
-              <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
-            </el-col>
-            <el-col :span="4">
-              <em>手机号:</em>
-              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number" ></el-input>
-            </el-col>
-            <el-col :span="4">
-              <em>会员类型:</em>
-              <el-select v-model="panel.vipType">
-                <el-option
-                    v-for="item in panel.vipOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-col>
-            <el-col :span="4">
-              <em>到期日:</em>
-              <el-select v-model="panel.expDay">
-                <el-option
-                    v-for="item in panel.endTypeOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
-                </el-option>
-              </el-select>
-            </el-col>
-            <el-col :span="4">
-              <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
-            </el-col>
-          </el-row>
+    <div class="context">
+        <div class="panel">
+            <h5>会员管理</h5>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-col :span="4">
+                            <em>姓名:</em>
+                            <el-input v-model="panel.name" placeholder="请输入姓名"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>手机号:</em>
+                            <el-input v-model="panel.phone" placeholder="请输入手机号" type="number"></el-input>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>会员类型:</em>
+                            <el-select v-model="panel.vipType">
+                                <el-option
+                                        v-for="item in panel.vipOptions"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="4">
+                            <em>到期日:</em>
+                            <el-select v-model="panel.expDay">
+                                <el-option
+                                        v-for="item in panel.endTypeOptions"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-col>
+                        <el-col :span="4">
+                            <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询
+                            </el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
         </div>
-      </div>
-    </div>
-    <div class="change">
-      <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增会员</el-button>
-      <el-button @click="delList" v-if="userLevel != 4">删除会员</el-button>
-      <el-button @click="lessonChange" v-if="userLevel != 4">课时调整</el-button>
-      <el-button @click="giftChange" v-if="userLevel != 4">赠送课时调整</el-button>
-      <el-button @click="ExpTimeChange" v-if="userLevel != 4">有效期调整</el-button>
-      <el-button @click="lessonStudenChange" v-if="userLevel != 4">增删会员可预约课程</el-button>
-      <!--            <el-button class="pull-right" icon="el-icon-position">导出</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="UserInfo.Name"
-            label="会员名"
-            width="90"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.Phone"
-            label="手机号"
-            width="110"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.VipType"
-            label="类型"
-            align="center"
-            width="80px"
-            sortable
-        >
-          <template slot-scope="scope">
-            <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
-            <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.ExpTime"
-            label="会员有效期"
-            width="155"
-            :formatter="filterFmtDate"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.RemainNormalhour"
-            label="剩余课时"
-            width="105"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.RemainGifthour"
-            label="剩余赠送"
-            width="105"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.ConsumeNormalhour"
-            label="消费课时"
-            width="105"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.ConsumeGifthour"
-            label="消费赠送"
-            width="105"
-            sortable
-        >
-        </el-table-column>
-        <el-table-column
-            prop="ClassInfo"
-            label="会员课程"
-            width="220px"
-        >
-          <template slot-scope="scope">
+        <div class="change">
+            <el-button @click="addMember" v-if="userLevel != 4" type="primary">新增会员</el-button>
+            <el-button @click="delList" v-if="userLevel != 4">删除会员</el-button>
+            <el-button @click="lessonChange" v-if="userLevel != 4">课时调整</el-button>
+            <el-button @click="giftChange" v-if="userLevel != 4">赠送课时调整</el-button>
+            <el-button @click="ExpTimeChange" v-if="userLevel != 4">有效期调整</el-button>
+            <el-button @click="lessonStudenChange" v-if="userLevel != 4">增删会员可预约课程</el-button>
+            <!--            <el-button class="pull-right" icon="el-icon-position">导出</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="UserInfo.head"
+                        label="头像"
+                        width="90"
+                >
+
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Name"
+                        label="会员名"
+                        width="90"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Phone"
+                        label="手机号"
+                        width="110"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.VipType"
+                        label="类型"
+                        align="center"
+                        width="80px"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.UserInfo.VipType == 1">年费</span>
+                        <span v-if="scope.row.UserInfo.VipType == 2">充值</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.ExpTime"
+                        label="会员有效期"
+                        width="155"
+                        :formatter="filterFmtDate"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.RemainNormalhour"
+                        label="剩余课时"
+                        width="105"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.RemainGifthour"
+                        label="剩余赠送"
+                        width="105"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.ConsumeNormalhour"
+                        label="消费课时"
+                        width="105"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.ConsumeGifthour"
+                        label="消费赠送"
+                        width="105"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="ClassInfo"
+                        label="会员课程"
+                        width="220px"
+                >
+                    <template slot-scope="scope">
                         <span class="lessonSpan" :style="{background:lesson.ClassColor}"
                               v-for="lesson in scope.row.ClassInfo">{{ lesson.ClassName }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="TakeId"
-            label="Take绑定"
-            width="105"
-            sortable
-        >
-          <template slot-scope="scope">
-            <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
-            <span v-else>已绑定</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.Memo"
-            label="备注">
-          <template slot-scope="scope">
-            <el-popover
-                placement="top"
-                title=""
-                width="200"
-                trigger="hover"
-                :content="scope.row.UserInfo.Memo">
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="TakeId"
+                        label="Take绑定"
+                        width="105"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.UserInfo.TakeId == 0" class="red">未绑定</span>
+                        <span v-else>已绑定</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Memo"
+                        label="备注">
+                    <template slot-scope="scope">
+                        <el-popover
+                                placement="top"
+                                title=""
+                                width="200"
+                                trigger="hover"
+                                :content="scope.row.UserInfo.Memo">
                             <span slot="reference"
                                   v-if="scope.row.UserInfo.Memo.length > 6">{{ scope.row.UserInfo.Memo.substr(0, 6) }} ....</span>
-            </el-popover>
-            <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="UserInfo.Status"
-            label="操作"
-            width="160px"
-        >
-          <template slot-scope="scope">
-            <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)">编辑</el-button>
-            <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
-                       @click="pauseRow(scope.row)">
-              禁用
-            </el-button>
-            <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
-                       @click="runRow(scope.row)">
-              启用
-            </el-button>
-            <el-button class="btn" type="primary" size="mini"
-                       @click="addTake(scope.row)">Take绑定
-            </el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
-    </div>
-
-    <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" :width="form.btnType == 1 ?'650px':'1200px'">
-      <div class="dialogContent">
-        <div :class="['pull-left',{'tabwild':form.btnType == 1},]">
-          <el-form ref="form" :model="form" label-width="160px">
-            <el-form-item label="手机号" :required="true">
-              <el-input v-model="form.phone"></el-input>
-            </el-form-item>
-            <el-form-item label="会员名" :required="true">
-              <el-input v-model="form.name"></el-input>
-            </el-form-item>
-            <el-form-item label="会员类型" v-if="form.btnType == 0">
-              <el-select v-model="form.vipType" placeholder="请选择所属门店">
-                <el-option
-                    v-for="item in memberTypes"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                ></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="课时" v-if="form.btnType == 0">
-              <el-input-number v-model="form.normalhour " :min="0" :max="99999"
-                               label="(天)"></el-input-number>
-            </el-form-item>
-            <el-form-item label="赠送课时" v-if="form.btnType == 0">
-              <el-input-number v-model="form.gifthour " :min="0" :max="99999"
-                               label="(天)"></el-input-number>
-            </el-form-item>
-            <el-form-item label="备注">
-              <el-input v-model="form.memo"></el-input>
-            </el-form-item>
-          </el-form>
+                        </el-popover>
+                        <span v-if="scope.row.UserInfo.Memo.length <= 6">{{ scope.row.UserInfo.Memo }}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="UserInfo.Status"
+                        label="操作"
+                        width="160px"
+                >
+                    <template slot-scope="scope">
+                        <el-button class="btn" type="default" size="mini" @click="editMember(scope.row)">编辑</el-button>
+                        <el-button class="btn" type="danger" v-if="scope.row.UserInfo.Status == 1" size="mini"
+                                   @click="pauseRow(scope.row)">
+                            禁用
+                        </el-button>
+                        <el-button class="btn" type="success" v-if="scope.row.UserInfo.Status == 8" size="mini"
+                                   @click="runRow(scope.row)">
+                            启用
+                        </el-button>
+                        <el-button class="btn" type="primary" size="mini"
+                                   @click="addTake(scope.row)">Take绑定
+                        </el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
         </div>
-        <div class="pull-right" v-if="form.btnType == 0">
-          <el-form ref="form" :model="form" label-width="160px">
-            <el-form-item label="会员课程">
-              <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
-                           :titles="['全部课程','已选课程']"></el-transfer>
-            </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-dialog :visible.sync="dialogVisible" width="650px">
-      <div class="dialogTitle">
-        <h5>
-          用户:
-          <em class="blue">【 {{ form.rowName }}】</em>
-          <br>
-          <br>
-          <span v-if="dialogLesson">当前课时 {{ form.normalhour }}</span>
-          <span v-if="dialogGift">赠送课时 {{ form.gifthour }}</span>
-          <span v-if="dialogExpTime">当前到期时间</span>
-          <span v-if="dialogLessonTable">增删会员可预约课程</span>
-        </h5>
-      </div>
-      <div v-if="dialogLesson">
-        <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
-      </div>
-      <div v-if="dialogGift">
-        <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
-      </div>
-      <div v-if="dialogExpTime">
-        <el-date-picker
-            v-model="form.expTime"
-            type="date"
-            placeholder="选择日期">
-        </el-date-picker>
-      </div>
-      <div v-if="dialogLessonTable">
-        <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
-                     :titles="['全部课程','已选课程']"></el-transfer>
-      </div>
-      <div class="dialogFooter">
-        <!--课时调整-->
-        <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
-        <!--赠送课时调整-->
-        <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
-        <!--                有效期调整-->
-        <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
-        <!--                课程增删-->
-        <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
-        </el-button>
-        <el-button size="small" @click="dialogVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible"
+                   :width="form.btnType == 1 ?'650px':'1200px'">
+            <div class="dialogContent">
+                <div :class="['pull-left',{'tabwild':form.btnType == 1},]">
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="手机号" :required="true">
+                            <el-input v-model="form.phone"></el-input>
+                        </el-form-item>
+                        <el-form-item label="会员名" :required="true">
+                            <el-input v-model="form.name"></el-input>
+                        </el-form-item>
+                        <el-form-item label="会员类型" v-if="form.btnType == 0">
+                            <el-select v-model="form.vipType" placeholder="请选择所属门店">
+                                <el-option
+                                        v-for="item in memberTypes"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value"
+                                ></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="课时" v-if="form.btnType == 0">
+                            <el-input-number v-model="form.normalhour " :min="0" :max="99999"
+                                             label="(天)"></el-input-number>
+                        </el-form-item>
+                        <el-form-item label="赠送课时" v-if="form.btnType == 0">
+                            <el-input-number v-model="form.gifthour " :min="0" :max="99999"
+                                             label="(天)"></el-input-number>
+                        </el-form-item>
+                        <el-form-item label="备注">
+                            <el-input v-model="form.memo"></el-input>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <div class="pull-right" v-if="form.btnType == 0">
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="会员课程">
+                            <el-transfer filterable v-model="form.classlist" :data="form.dialogdata"
+                                         :titles="['全部课程','已选课程']"></el-transfer>
+                        </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-dialog :visible.sync="dialogVisible" width="650px">
+            <div class="dialogTitle">
+                <h5>
+                    用户:
+                    <em class="blue">【 {{ form.rowName }}】</em>
+                    <br>
+                    <br>
+                    <span v-if="dialogLesson">当前课时 {{ form.normalhour }}</span>
+                    <span v-if="dialogGift">赠送课时 {{ form.gifthour }}</span>
+                    <span v-if="dialogExpTime">当前到期时间</span>
+                    <span v-if="dialogLessonTable">增删会员可预约课程</span>
+                </h5>
+            </div>
+            <div v-if="dialogLesson">
+                <el-input-number v-model="form.newnormalhour" :min="-9999" :max="9999" label="课时调整"></el-input-number>
+            </div>
+            <div v-if="dialogGift">
+                <el-input-number v-model="form.newgifthour" :min="-9999" :max="9999" label="赠送课时调整"></el-input-number>
+            </div>
+            <div v-if="dialogExpTime">
+                <el-date-picker
+                        v-model="form.expTime"
+                        type="date"
+                        placeholder="选择日期">
+                </el-date-picker>
+            </div>
+            <div v-if="dialogLessonTable">
+                <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"
+                             :titles="['全部课程','已选课程']"></el-transfer>
+            </div>
+            <div class="dialogFooter">
+                <!--课时调整-->
+                <el-button type="primary" size="small" @click="confirmLesson" v-if="dialogLesson">确定</el-button>
+                <!--赠送课时调整-->
+                <el-button type="primary" size="small" @click="confirmGift" v-if="dialogGift">确定</el-button>
+                <!--                有效期调整-->
+                <el-button type="primary" size="small" @click="confirmExpTime" v-if="dialogExpTime">确定</el-button>
+                <!--                课程增删-->
+                <el-button type="primary" size="small" @click="confirmLessonTable" v-if="dialogLessonTable">确定
+                </el-button>
+                <el-button size="small" @click="dialogVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
 
-    <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
-      <div>
-        <el-select v-model="Takevalue" placeholder="请选择">
-          <el-option
-              v-for="item in Takeoptions"
-              :key="item.Id"
-              :label="item.Name + item.PhoneNo"
-              :value="item.Id">
-          </el-option>
-        </el-select>
-      </div>
-      <div class="dialogFooter">
-        <!--take绑定调整-->
-        <el-button type="primary" size="small" @click="confirmTake">确定</el-button>
-        <el-button size="small" @click="TakeVisible = false">取消</el-button>
-      </div>
-    </el-dialog>
-  </div>
+        <el-dialog title="Take绑定" :visible.sync="TakeVisible" width="650px">
+            <div>
+                <el-select v-model="Takevalue" placeholder="请选择">
+                    <el-option
+                            v-for="item in Takeoptions"
+                            :key="item.Id"
+                            :label="item.Name + item.PhoneNo"
+                            :value="item.Id">
+                    </el-option>
+                </el-select>
+            </div>
+            <div class="dialogFooter">
+                <!--take绑定调整-->
+                <el-button type="primary" size="small" @click="confirmTake">确定</el-button>
+                <el-button size="small" @click="TakeVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  VipUserListQuery,
-  ClassListQuery,
-  VipUserAdd,
-  VipUserStatusEdit,
-  VipUserEdit,
-  VipUserHourEdit,
-  VipUserExpEdit,
-  VipUserClassEdit,
-  QueryTakeCustomerByName,
-  BindTakeCustomer,
-  testTable,
-  testSelect
-} from "../api/getApiRes";
+    import Global from '../Global.js'
+    import {
+        VipUserListQuery,
+        ClassListQuery,
+        VipUserAdd,
+        VipUserStatusEdit,
+        VipUserEdit,
+        VipUserHourEdit,
+        VipUserExpEdit,
+        VipUserClassEdit,
+        QueryTakeCustomerByName,
+        BindTakeCustomer,
+        testTable,
+        testSelect
+    } from "../api/getApiRes";
 
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      dialogVisible: false,//其他dialog
-      TakeVisible: false,//take dialog
-      dialogMemberVisible: false,//新增会员dialog
-      dialogLesson: false,//课时调整
-      dialogGift: false,//赠送课时调整
-      dialogExpTime: false,//有效期调整
-      dialogLessonTable: false,//会员课程
-      dialogTitle: '新增会员',
-      dialogValue: [],
-      Takevalue: 0,
-      Takeoptions: [],
-      TakeHid: 0,
-      // 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: '',
-        expDay: '',
-        vipOptions: vipOptions(0),
-        endTypeOptions: endTypeOptions(),
-        time1: globalBt(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 20,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        phone: '',
-        name: '',
-        userCode: '',
-        shopId: '',
-        Id: '',
-        userId: '',
-        vipType: 1,
-        normalhour: 0,
-        newnormalhour: 0,
-        gifthour: 0,
-        newgifthour: 0,
-        btnType: 0,//0新建,1编辑编辑
-        memo: '',
-        expTime: '',
-        classlist: [],
-        dialogdata: [],//穿梭待选
-        dialogValue: [],//穿梭已选
-      },
-      memberTypes: vipOptions(1),
-      tableData: [],
-      tableRadio: [],
-      userLevel: localStorage.userLevel,
-      serachBtnStatus: false
-    }
-  },
-  mounted() {
-    // 加载课程选项
-    this.panelSelect();
-    // 读取列表
-    this.getTableQuery();
-  },
-  methods: {
-    // 打开take绑定和拉取take数据
-    addTake(row) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        userId: row.UserInfo.Id,
-      };
-      this.TakeHid = row.UserInfo.HId;
-      let postdata = qs.stringify(param);
-      QueryTakeCustomerByName(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs != '') {
-            that.Takeoptions = json.Rs;
-            that.Takevalue = json.Rs[0].Id;
-            // 有值才能打开
-            this.TakeVisible = true;
-          } else {
-            that.$message.error('当前用户没有可用的Take账号');
-            this.TakeVisible = false;
-            console.log('null');
-          }
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 绑定take
-    confirmTake() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        hId: this.TakeHid,
-        customerId: this.Takevalue,
-        memo: '后台管理手动绑定',
-      };
-      let postdata = qs.stringify(param);
-      BindTakeCustomer(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: 'Take绑定成功!',
-            type: 'success'
-          });
-          this.TakeVisible = false;
-          // 读取列表
-          this.getTableQuery();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//其他dialog
+                TakeVisible: false,//take dialog
+                dialogMemberVisible: false,//新增会员dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '新增会员',
+                dialogValue: [],
+                Takevalue: 0,
+                Takeoptions: [],
+                TakeHid: 0,
+                // 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: '',
+                    expDay: '',
+                    vipOptions: vipOptions(0),
+                    endTypeOptions: endTypeOptions(),
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 20,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    phone: '',
+                    name: '',
+                    userCode: '',
+                    shopId: '',
+                    Id: '',
+                    userId: '',
+                    vipType: 1,
+                    normalhour: 0,
+                    newnormalhour: 0,
+                    gifthour: 0,
+                    newgifthour: 0,
+                    btnType: 0,//0新建,1编辑编辑
+                    memo: '',
+                    expTime: '',
+                    classlist: [],
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                },
+                memberTypes: vipOptions(1),
+                tableData: [],
+                tableRadio: [],
+                userLevel: localStorage.userLevel,
+                serachBtnStatus: false
+            }
+        },
+        mounted() {
+            // 加载课程选项
+            this.panelSelect();
+            // 读取列表
+            this.getTableQuery();
+        },
+        methods: {
+            // 打开take绑定和拉取take数据
+            addTake(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    userId: row.UserInfo.Id,
+                };
+                this.TakeHid = row.UserInfo.HId;
+                let postdata = qs.stringify(param);
+                QueryTakeCustomerByName(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        if (json.Rs != '') {
+                            that.Takeoptions = json.Rs;
+                            that.Takevalue = json.Rs[0].Id;
+                            // 有值才能打开
+                            this.TakeVisible = true;
+                        } else {
+                            that.$message.error('当前用户没有可用的Take账号');
+                            this.TakeVisible = false;
+                            console.log('null');
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 绑定take
+            confirmTake() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    hId: this.TakeHid,
+                    customerId: this.Takevalue,
+                    memo: '后台管理手动绑定',
+                };
+                let postdata = qs.stringify(param);
+                BindTakeCustomer(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: 'Take绑定成功!',
+                            type: 'success'
+                        });
+                        this.TakeVisible = false;
+                        // 读取列表
+                        this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
 
-    clickChange(item) {
-      this.tableRadio = item
-    },
-    // 编辑
-    editMember(row) {
-      let that = this;
-      this.clearForm();
-      this.form.phone = row.UserInfo.Phone;
-      this.form.name = row.UserInfo.Name;
-      this.form.memo = row.UserInfo.Memo;
-      this.form.btnType = 1;
+            clickChange(item) {
+                this.tableRadio = item
+            },
+            // 编辑
+            editMember(row) {
+                let that = this;
+                this.clearForm();
+                this.form.phone = row.UserInfo.Phone;
+                this.form.name = row.UserInfo.Name;
+                this.form.memo = row.UserInfo.Memo;
+                this.form.btnType = 1;
 
-      this.form.shopId = row.UserInfo.ShopId;
-      this.form.Id = row.UserInfo.Id;
-      this.dialogMemberVisible = true
-      this.dialogTitle = '编辑会员'
+                this.form.shopId = row.UserInfo.ShopId;
+                this.form.Id = row.UserInfo.Id;
+                this.dialogMemberVisible = true
+                this.dialogTitle = '编辑会员'
 
-    },
-    // 禁用
-    pauseRow(row) {
-      let that = this;
-      this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          userId: row.UserInfo.Id,
-          status: 8,//状态 8:禁用 1:启用 9:删除
-        };
-        let postdata = qs.stringify(param);
-        VipUserStatusEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.UserInfo.Name + '禁用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消禁用'
-        });
-      });
-    },
-    // 启用
-    runRow(row) {
-      let that = this;
-      this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          userId: row.UserInfo.Id,
-          status: 1,//状态 8:禁用 1:启用 9:删除
-        };
-        let postdata = qs.stringify(param);
-        VipUserStatusEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.UserInfo.Name + '启用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消启用'
-        });
-      });
-    },
-    // 关闭所有
-    allDialogClose() {
-      this.dialogVisible = false;
-      this.dialogGift = false;
-      this.dialogLesson = false;
-      this.dialogExpTime = false;
-      this.dialogLessonTable = false;
-    },
-    // 有效期调整
-    ExpTimeChange() {
-      // 仅针对年费用户,使用日期格式
-      this.allDialogClose();
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      if (parseInt(row.UserInfo.VipType) == 2) {
-        this.$message({
-          showClose: true,
-          message: '错了哦,充值会员不能调整有效期',
-          type: 'error'
-        });
-        return false
-      }
-      this.form.rowName = row.UserInfo.Name;
-      this.form.userId = row.UserInfo.Id;
-      this.form.expTime = row.UserInfo.ExpTime
-      this.dialogVisible = true;
-      this.dialogExpTime = true;
-    },
-    // 课时调整
-    lessonChange() {
-      this.allDialogClose();
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.normalhour = row.UserInfo.RemainNormalhour;
-      this.form.newnormalhour = 0;
-      this.form.rowName = row.UserInfo.Name;
-      this.form.userId = row.UserInfo.Id;
-      this.dialogVisible = true;
-      this.dialogLesson = true;
+            },
+            // 禁用
+            pauseRow(row) {
+                let that = this;
+                this.$confirm('是否禁用用户' + row.UserInfo.Name + '?', '禁用操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        userId: row.UserInfo.Id,
+                        status: 8,//状态 8:禁用 1:启用 9:删除
+                    };
+                    let postdata = qs.stringify(param);
+                    VipUserStatusEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.UserInfo.Name + '禁用成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消禁用'
+                    });
+                });
+            },
+            // 启用
+            runRow(row) {
+                let that = this;
+                this.$confirm('是否启用用户' + row.UserInfo.Name + '?', '启用操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    let param = {
+                        token: localStorage.token,
+                        userId: row.UserInfo.Id,
+                        status: 1,//状态 8:禁用 1:启用 9:删除
+                    };
+                    let postdata = qs.stringify(param);
+                    VipUserStatusEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: row.UserInfo.Name + '启用成功!',
+                                type: 'success'
+                            });
+                            // table 重载
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消启用'
+                    });
+                });
+            },
+            // 关闭所有
+            allDialogClose() {
+                this.dialogVisible = false;
+                this.dialogGift = false;
+                this.dialogLesson = false;
+                this.dialogExpTime = false;
+                this.dialogLessonTable = false;
+            },
+            // 有效期调整
+            ExpTimeChange() {
+                // 仅针对年费用户,使用日期格式
+                this.allDialogClose();
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let row = this.tableRadio;
+                if (parseInt(row.UserInfo.VipType) == 2) {
+                    this.$message({
+                        showClose: true,
+                        message: '错了哦,充值会员不能调整有效期',
+                        type: 'error'
+                    });
+                    return false
+                }
+                this.form.rowName = row.UserInfo.Name;
+                this.form.userId = row.UserInfo.Id;
+                this.form.expTime = row.UserInfo.ExpTime
+                this.dialogVisible = true;
+                this.dialogExpTime = true;
+            },
+            // 课时调整
+            lessonChange() {
+                this.allDialogClose();
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.normalhour = row.UserInfo.RemainNormalhour;
+                this.form.newnormalhour = 0;
+                this.form.rowName = row.UserInfo.Name;
+                this.form.userId = row.UserInfo.Id;
+                this.dialogVisible = true;
+                this.dialogLesson = true;
 
-    },
-    // 赠送调整
-    giftChange() {
-      this.allDialogClose();
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.gifthour = row.UserInfo.RemainGifthour;
-      this.form.newgifthour = 0;
-      this.form.rowName = row.UserInfo.Name;
-      this.form.userId = row.UserInfo.Id;
-      this.dialogVisible = true;
-      this.dialogGift = true;
+            },
+            // 赠送调整
+            giftChange() {
+                this.allDialogClose();
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.gifthour = row.UserInfo.RemainGifthour;
+                this.form.newgifthour = 0;
+                this.form.rowName = row.UserInfo.Name;
+                this.form.userId = row.UserInfo.Id;
+                this.dialogVisible = true;
+                this.dialogGift = true;
 
-    },
-    // 增删会员课程
-    lessonStudenChange() {
-      let that = this;
-      this.allDialogClose();
-      // 重载课程列表选项
-      this.panelSelect();
-      if (this.tableRadio.length == 0) {
-        that.$message.error("请先选中一条记录");
-        return false
-      }
-      let row = this.tableRadio;
-      this.form.rowName = row.UserInfo.Name;
-      this.form.userId = row.UserInfo.Id;
-      if (row.ClassInfo) {
-        row.ClassInfo.map(function (item) {
-          that.form.dialogValue.push(item.ClassId)
-        })
-      }
-      console.log(that.form.classlist);
-      this.dialogVisible = true;
-      this.dialogLessonTable = true;
-    },
-    // 确认提交新增会员
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,会员名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,会员名字数超过8个字');
-        return false
-      }
-      if (that.form.memo) {
-        if (that.form.memo.length > 200) {
-          this.$message.error('错了哦,备注字数超过200个字');
-          return false
-        }
-      }
-      // 课程添加使用字符串形式
-      let curClasslist = '';
-      if (that.form.classlist) {
-        curClasslist = that.form.classlist.toString();
-      }
+            },
+            // 增删会员课程
+            lessonStudenChange() {
+                let that = this;
+                this.allDialogClose();
+                // 重载课程列表选项
+                this.panelSelect();
+                if (this.tableRadio.length == 0) {
+                    that.$message.error("请先选中一条记录");
+                    return false
+                }
+                let row = this.tableRadio;
+                this.form.rowName = row.UserInfo.Name;
+                this.form.userId = row.UserInfo.Id;
+                if (row.ClassInfo) {
+                    row.ClassInfo.map(function (item) {
+                        that.form.dialogValue.push(item.ClassId)
+                    })
+                }
+                console.log(that.form.classlist);
+                this.dialogVisible = true;
+                this.dialogLessonTable = true;
+            },
+            // 确认提交新增会员
+            confirmMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.phone) {
+                    this.$message.error('错了哦,手机号不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.phone)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (!that.form.name) {
+                    this.$message.error('错了哦,会员名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 8) {
+                    this.$message.error('错了哦,会员名字数超过8个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+                // 课程添加使用字符串形式
+                let curClasslist = '';
+                if (that.form.classlist) {
+                    curClasslist = that.form.classlist.toString();
+                }
 
-      let param = {
-        token: localStorage.token,
-        shopId: localStorage.shopId,
-        phone: that.form.phone,
-        name: that.form.name,
-        vipType: that.form.vipType,
-        normalhour: that.form.normalhour,
-        gifthour: that.form.gifthour,
-        classlist: curClasslist,
-        memo: that.form.memo,
-      };
-      let postdata = qs.stringify(param);
-      VipUserAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '会员添加成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    confirmEditMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,会员名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,会员名字数超过8个字');
-        return false
-      }
-      if (that.form.memo) {
-        if (that.form.memo.length > 200) {
-          this.$message.error('错了哦,备注字数超过200个字');
-          return false
-        }
-      }
-      let param = {
-        token: localStorage.token,
-        userId: that.form.Id,
-        phone: that.form.phone,
-        name: that.form.name,
-        memo: that.form.memo,
-      };
-      let postdata = qs.stringify(param);
-      VipUserEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '会员信息编辑成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交课时
-    confirmLesson() {
-      let that = this;
-      // checkNum
-      let param = {
-        token: localStorage.token,
-        userId: that.form.userId,
-        chgHour: that.form.newnormalhour,
-        chgType: 1,//课时类型 1:普通课时 2:赠送课时
-      };
-      let postdata = qs.stringify(param);
-      VipUserHourEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交赠送
-    confirmGift() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        userId: that.form.userId,
-        chgHour: that.form.newgifthour,
-        chgType: 2,//课时类型 1:普通课时 2:赠送课时
-      };
-      let postdata = qs.stringify(param);
-      VipUserHourEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '赠送课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交有效期
-    confirmExpTime() {
-      let that = this;
-      // checkNum
+                let param = {
+                    token: localStorage.token,
+                    shopId: localStorage.shopId,
+                    phone: that.form.phone,
+                    name: that.form.name,
+                    vipType: that.form.vipType,
+                    normalhour: that.form.normalhour,
+                    gifthour: that.form.gifthour,
+                    classlist: curClasslist,
+                    memo: that.form.memo,
+                };
+                let postdata = qs.stringify(param);
+                VipUserAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员添加成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.phone) {
+                    this.$message.error('错了哦,手机号不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.phone)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (!that.form.name) {
+                    this.$message.error('错了哦,会员名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 8) {
+                    this.$message.error('错了哦,会员名字数超过8个字');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+                let param = {
+                    token: localStorage.token,
+                    userId: that.form.Id,
+                    phone: that.form.phone,
+                    name: that.form.name,
+                    memo: that.form.memo,
+                };
+                let postdata = qs.stringify(param);
+                VipUserEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '会员信息编辑成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交课时
+            confirmLesson() {
+                let that = this;
+                // checkNum
+                let param = {
+                    token: localStorage.token,
+                    userId: that.form.userId,
+                    chgHour: that.form.newnormalhour,
+                    chgType: 1,//课时类型 1:普通课时 2:赠送课时
+                };
+                let postdata = qs.stringify(param);
+                VipUserHourEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交赠送
+            confirmGift() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    userId: that.form.userId,
+                    chgHour: that.form.newgifthour,
+                    chgType: 2,//课时类型 1:普通课时 2:赠送课时
+                };
+                let postdata = qs.stringify(param);
+                VipUserHourEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '赠送课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交有效期
+            confirmExpTime() {
+                let that = this;
+                // checkNum
 
-      let param = {
-        token: localStorage.token,
-        userId: that.form.userId,
-        expTime: nonTfmtDate(that.form.expTime, 16),
-      };
-      let postdata = qs.stringify(param);
-      VipUserExpEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '赠送课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交会员课程
-    confirmLessonTable() {
-      let that = this;
-      // checkNum
-      let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
+                let param = {
+                    token: localStorage.token,
+                    userId: that.form.userId,
+                    expTime: nonTfmtDate(that.form.expTime, 16),
+                };
+                let postdata = qs.stringify(param);
+                VipUserExpEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '赠送课时调整成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交会员课程
+            confirmLessonTable() {
+                let that = this;
+                // checkNum
+                let classList = that.form.dialogValue ? that.form.dialogValue.toString() : '';
 
-      let param = {
-        token: localStorage.token,
-        userId: that.form.userId,
-        classList: classList,
-      };
-      let postdata = qs.stringify(param);
-      VipUserClassEdit(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);
-        }
-      })
-    },
-    // 加载课程列表选项
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        vipType: '',
-        classType: 1,//不显示 午饭类 课程
-        start: 1,
-        expDay: 0,
-        tableMax: 9999,
-      };
-      let postdata = qs.stringify(param);
-      ClassListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          if (json.Rs == null) return false
-          that.form.dialogdata = turnClassResToOption(json.Rs);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 新增会员
-    addMember() {
-      this.clearForm();
-      this.panelSelect();
-      this.dialogMemberVisible = true
-      this.btnType = 0;
-      this.form.btnType = 0;
-      this.dialogTitle = '新增会员'
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        that.$message.error("请先选中一条记录");
-        return false
-      }
-      let detectorid = this.tableRadio.UserInfo.Id;
+                let param = {
+                    token: localStorage.token,
+                    userId: that.form.userId,
+                    classList: classList,
+                };
+                let postdata = qs.stringify(param);
+                VipUserClassEdit(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);
+                    }
+                })
+            },
+            // 加载课程列表选项
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    vipType: '',
+                    classType: 1,//不显示 午饭类 课程
+                    start: 1,
+                    expDay: 0,
+                    tableMax: 9999,
+                };
+                let postdata = qs.stringify(param);
+                ClassListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        if (json.Rs == null) return false
+                        that.form.dialogdata = turnClassResToOption(json.Rs);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 新增会员
+            addMember() {
+                this.clearForm();
+                this.panelSelect();
+                this.dialogMemberVisible = true
+                this.btnType = 0;
+                this.form.btnType = 0;
+                this.dialogTitle = '新增会员'
+            },
+            // 删除
+            delList() {
+                let that = this;
+                if (this.tableRadio.length == 0) {
+                    that.$message.error("请先选中一条记录");
+                    return false
+                }
+                let detectorid = this.tableRadio.UserInfo.Id;
 
-      let param = {
-        token: localStorage.token,
-        userId: detectorid,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
+                let param = {
+                    token: localStorage.token,
+                    userId: detectorid,
+                    status: 9,//0禁用1启用9删除
+                };
+                let postdata = qs.stringify(param);
 
-      this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        VipUserStatusEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的会员已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      let that = this;
-      that.serachBtnStatus = true;
-      that.getTableQuery();
-      that.$message.success('查询完毕');
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
-    },
-    clearForm() {
-      // clear
-      this.form.name = '';
-      this.form.phone = '';
-      this.form.memo = '';
-      this.form.normalhour = 0;
-      this.form.gifthour = 0;
-      this.form.userCode = '';
-      this.form.shopId = '';
-      this.form.classlist = [];
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        vipType: that.panel.vipType,//
-        phone: that.panel.phone,//
-        name: that.panel.name,//
-        expDay: that.panel.expDay,//
-        start: 1,//
-        tableMax: 9999,//
-      };
-      let postdata = qs.stringify(param);
-      VipUserListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
+                this.$confirm('此操作将永久删除该会员, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    VipUserStatusEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的会员已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                let that = this;
+                that.serachBtnStatus = true;
+                that.getTableQuery();
+                that.$message.success('查询完毕');
+                let totalTime = 2
+                let clock = window.setInterval(() => {
+                    totalTime--
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000)
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.phone = '';
+                this.form.memo = '';
+                this.form.normalhour = 0;
+                this.form.gifthour = 0;
+                this.form.userCode = '';
+                this.form.shopId = '';
+                this.form.classlist = [];
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    vipType: that.panel.vipType,//
+                    phone: that.panel.phone,//
+                    name: that.panel.name,//
+                    expDay: that.panel.expDay,//
+                    start: 1,//
+                    tableMax: 9999,//
+                };
+                let postdata = qs.stringify(param);
+                VipUserListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
 
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      // that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                // that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                // that.getTableQuery();
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
+                    return '无有效期';
+                } else {
+                    return nonTfmtDate(column, 11);
+                }
+            },
+        }
+        ,
+        watch: {
+            $route(to) {
+                if (to.name == 'Member') {
+                    // 加载课程选项
+                    this.panelSelect();
+                    // 读取列表
+                    this.getTableQuery();
+                }
+            }
+            ,
         }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      if (column == "0001-01-01T08:05:43+08:05" || column == "0001-01-01T00:00:00Z") {
-        return '无有效期';
-      } else {
-        return nonTfmtDate(column, 11);
-      }
-    },
-  }
-  ,
-  watch: {
-    $route(to) {
-      if (to.name == 'Member') {
-        // 加载课程选项
-        this.panelSelect();
-        // 读取列表
-        this.getTableQuery();
-      }
+        ,
     }
-    ,
-  }
-  ,
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+    @import "../assets/css/panel.css";
 
-.context {
-  border-radius: 12px;
-  height: 770px;
-  overflow-y: scroll;
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 30px;
-}
+    .context {
+        border-radius: 12px;
+        height: 770px;
+        overflow-y: scroll;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+        padding-bottom: 30px;
+    }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
 
-.change button {
-  float: left;
-}
+    .change button {
+        float: left;
+    }
 
-.change button.pull-right {
-  float: right;
-}
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
 
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
 
-.dialogContent {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
 
-.dialogContent .pull-left {
-  width: 30%;
-  float: left;
-}
+    .tabwild {
+        width: 100% !important;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-.dialogContent .pull-right {
-  width: 70%;
-  float: right;
-}
+    .lessonSpan {
+        width: 78px;
+        height: 22px;
+        border-radius: 11px;
+        margin-right: 5px;
+        float: left;
+        margin-bottom: 3px;
+        text-align: center;
+        color: #000;
+        font-size: 12px;
+    }
 
-.tabwild {
-  width: 100% !important;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+    .btn {
+        float: left !important;
+        margin-right: 5px;
+    }
 
-.lessonSpan {
-  width: 78px;
-  height: 22px;
-  border-radius: 11px;
-  margin-right: 5px;
-  float: left;
-  margin-bottom: 3px;
-  text-align: center;
-  color: #000;
-  font-size: 12px;
-}
+    /deep/ table .el-button + .el-button {
+        margin-left: 0;
+        margin-right: 3px;
+        /*float: left;*/
+        padding: 7px 6px;
+    }
 
-.btn {
-  float: left !important;
-  margin-right: 5px;
-}
+    table {
+        width: 100%;
+        display: block;
+        margin: 0 auto;
+        overflow: scroll;
 
-/deep/ table .el-button + .el-button {
-  margin-left: 0;
-  margin-right: 3px;
-  /*float: left;*/
-  padding: 7px 6px;
-}
+    }
 </style>

+ 585 - 443
pc/src/views/heartLog.vue

@@ -1,471 +1,613 @@
 <template>
-  <div class="context">
-    <div class="panel">
-      <h5>所属设备 -- {{regionName}}</h5>
-    </div>
-    <div class="change">
-      <el-button @click="addMember" type="primary">新增区域设备</el-button>
-      <el-button @click="editList">编辑区域设备</el-button>
-      <el-button @click="delList" type="danger">删除区域设备</el-button>
-    </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=""
-      >
-        <el-table-column
-            type="index"
-            label="序号"
-            align="center"
-            width="50">
-        </el-table-column>
-        <el-table-column
-            prop="name"
-            label="序列号"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="name"
-            label="类型"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="date"
-            label="创建日期"
-            width="180"
-            :formatter="filterFmtDate"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="State"
-            label="状态"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="address"
-            label="操作">
-          <template slot-scope="scope">
-            <el-button type="success" @click="run(scope.row.id)" v-if="scope.row.State != 0">开启</el-button>
-            <el-button type="danger" @click="pause(scope.row.id)">暂停</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
-    </div>
-    <el-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="编号">
-              <el-input v-model="form.phone"></el-input>
-            </el-form-item>
-            <el-form-item label="实体序列号">
-              <el-input v-model="form.name"></el-input>
-            </el-form-item>
-          </el-form>
+    <div class="context">
+        <el-page-header @back="goBack" content="所属设备"></el-page-header>
+        <div class="panel">
+            <br>
+            <h5> {{regionName}}</h5>
         </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>
+        <div class="change">
+            <el-button @click="addMember" type="primary">新增区域设备</el-button>
+            <el-button @click="editList">编辑区域设备</el-button>
+            <el-button @click="delList" type="danger">删除区域设备</el-button>
+        </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="EqSn"
+                        label="序列号"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="Version"
+                        label="版本"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="EquipType"
+                        label="类型"
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.EquipType == 1">TVBox</span>
+                        <span v-if="scope.row.EquipType == 2">BLEHub</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="状态"
+                >
+                    <!--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>
+                    </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>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+            <div class="dialogContent">
+                <div class="">
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="设备序列号">
+                            <el-input v-model="form.eqSn "></el-input>
+                        </el-form-item>
+                        <el-form-item label="版本号">
+                            <el-input v-model="form.version"></el-input>
+                        </el-form-item>
+                        <el-form-item label="设备类型">
+                            <el-select v-model="form.equipType " placeholder="请选择">
+                                <el-option
+                                        v-for="item in options"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" v-if="form.btnType == 0" @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 {
-  OptLogListQuery,
-  testTable,
-  testSelect, ShopManagerListQuery, ShopListQuery, ShopManagerStatusEdit
-} from "../api/getApiRes";
+    import Global from '../Global.js'
+    import {
+        testTable,
+        ShopManagerStatusEdit,
+        QueryVenueEquip,
+        AddShopVenueEquip,
+        EditShopVenueEquip,
+        ShopVenueEquipEditStatus
+    } from "../api/getApiRes";
 
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      regionName: this.$route.query.regionName,
-      dialogVisible: false,
-      dialogMemberVisible: false,
-      dialogTitle: '新增区域设备',
-      // panel 配置项目
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        name: '',
-        userCode: '',
-        shopId: '',
-        btnType: 0,
-      },
-      shops: [],
-      tableData: [],
-      serachBtnStatus: false,
-    }
-  },
-  mounted() {
-    this.getTableQuery();
-  },
-  methods: {
-    clearForm() {
-      // clear
-      this.form.name = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 新增心率设备
-    addMember() {
-      this.clearForm();
-      this.dialogMemberVisible = true
-      this.btnType = 0;
-      this.dialogTitle = '新增心率设备'
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let userId = this.tableRadio.Id;
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                regionName: '',
+                dialogVisible: false,
+                dialogMemberVisible: false,
+                dialogTitle: '新增区域设备',
+                // panel 配置项目
+                multipleSelection: [],
+                tableRadio: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    eqId: '',
+                    eqSn: '',
+                    name: '',
+                    version: '',
+                    userCode: '',
+                    shopId: '',
+                    btnType: 0,
+                    equipType: 1,
+                },
+                options: [
+                    {value: 1, label: 'TVBox'},
+                    {value: 2, label: 'BLEHub'},
+                ],
+                shops: [],
+                tableData: [],
+                serachBtnStatus: false,
+            }
+        },
+        mounted() {
+            this.regionName = this.$route.query.name;
+            this.getTableQuery();
+        },
+        methods: {
+            goBack() {
+                this.$router.push({
+                    path: '/region', query: {}
+                });
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+                this.form.eqSn = '';
+                this.form.version = '';
+                this.form.equipType = 1;
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 新增心率设备
+            addMember() {
+                this.clearForm();
+                this.dialogMemberVisible = true;
+                this.btnType = 0;
+                this.dialogTitle = '新增心率设备'
+            },
+            clickChange(item) {
+                this.tableRadio = item
+            },
+            // 删除
+            delList() {
+                let that = this;
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let userId = this.tableRadio.Id;
 
-      let param = {
-        token: localStorage.token,
-        userId: userId,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: this.$route.query.svId,
+                    eqId: this.tableRadio.EqId,
+                    status: 9,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
 
-      this.$confirm('此操作将永久删除该心率设备, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        ShopManagerStatusEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的心率设备已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
-    // 编辑
-    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.phone = row.Phone;
-      this.form.memo = row.Memo;
-      this.form.adminType = row.AdminType;
-      this.dialogVisible = true;
-      this.dialogTitle = '编辑心率设备'
-      this.form.btnState = 1;
-      this.dialogMemberVisible = true
-    },
-    // 确认提交新增心率设备
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,编号不能为空');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,实体序列号不能为空');
-        return false
-      }
+                this.$confirm('此操作将永久删除该心率设备, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    ShopVenueEquipEditStatus(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的心率设备已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            // 编辑
+            editList() {
+                let that = this;
+                this.clearForm();
+                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.phone = row.Phone;
+                this.form.eqId = row.EqId;
+                this.form.eqSn = row.EqSn;
+                this.form.version = row.Version;
+                this.form.equipType = row.EquipType;
+                this.form.memo = row.Memo;
+                this.form.adminType = row.AdminType;
+                this.dialogVisible = true;
+                this.dialogTitle = '编辑心率设备';
+                this.form.btnType = 1;
+                this.dialogMemberVisible = true
+            },
+            // 确认提交新增心率设备
+            confirmMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.eqSn) {
+                    this.$message.error('错了哦,设备序列号不能为空');
+                    return false
+                }
+                if (that.form.version.length > 10) {
+                    this.$message.error('错了哦,版本号字符不能超过10位');
+                    return false
+                }
 
-      let param = {
-        token: localStorage.token,
-        shopId: localStorage.shopId,
-        name: that.form.name,
-        phone: that.form.phone,
-      };
-      let postdata = qs.stringify(param);
-      TeacherAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '心率设备添加成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    confirmEditMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,心率设备名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,心率设备名字数超过8个字');
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        shopId: localStorage.shopId,
-        teacherId: that.form.teacherId,
-        name: that.form.name,
-        phone: that.form.phone,
-      };
-      let postdata = qs.stringify(param);
-      TeacherEdit(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);
-        }
-      })
-    },
-    // 查询按钮
-    query() {
-      // 按钮倒计时
-      let that = this;
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: this.$route.query.svId,
+                    eqSn: this.form.eqSn,
+                    version: this.form.version,
+                    equipType: this.form.equipType,
+                };
+                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'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditMember() {
+                let that = this;
+                console.log(that.form.version.length);
+                // checkNum
+                if (!that.form.eqSn) {
+                    this.$message.error('错了哦,设备序列号不能为空');
+                    return false
+                }
+                if (that.form.version.length > 10) {
+                    this.$message.error('错了哦,版本号字符不能超过10位');
+                    return false
+                }
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: this.$route.query.svId,
+                    eqId: this.form.eqId,
+                    eqSn: this.form.eqSn,
+                    version: this.form.version,
+                    equipType: this.form.equipType,
+                };
+                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'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 查询按钮
+            query() {
+                // 按钮倒计时
+                let that = this;
+                that.serachBtnStatus = true;
+                let totalTime = 2;
+                let clock = window.setInterval(() => {
+                    totalTime--;
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000);
 
-      this.getTableQuery();
-      this.$message.success('查询完毕');
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      // this.getGetChildRegionSelect(0, 1);
-      that.loading = true;
-      // 查询检测设备。上级区域id,区域id必传。regionid传0,查询supregionid对应所有子区域的检测设备。 如果supregionid,regionid都传0,默认查询企业ID下所有检测设备
-      let param = {
-        token: localStorage.token,
-        start: 1,//
-        tableMax: 9999,//
-        id:this.$route.query.id,
-      };
-      let postdata = qs.stringify(param);
-      testTable(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.loading = false;
-          if (json.Rs) {
-            that.allTableData = json.Rs;
-            that.recordsTotal = json.Rs.length;
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
-        }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-    // 过滤时间
-    filterFmtDate(value, row, column) {
-      let that = this;
-      return nonTfmtDate(column, 11);
-    },
-  },
-}
+                this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: this.$route.query.svId,
+                };
+                let postdata = qs.stringify(param);
+                QueryVenueEquip(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
+                // 默认分页
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+            },
+            // 每页显示数量
+            handleSizeChange() {
+                let that = this;
+                that.tableData = that.allTableData.filter((item, index) => {
+                    return index < that.pageination.pageItem;
+                });
+                that.draw = that.pageination.pageItem;
+                that.getTableQuery();
+            },
+            // 翻页
+            pageChange(pageIndex) {
+                let that = this;
+                // 获取当前页
+                let index = that.pageination.pageItem * (pageIndex - 1);
+                // 数据总数
+                let nums = that.pageination.pageItem * pageIndex;
+                // 容器
+                let tables = [];
+                for (var i = index; i < nums; i++) {
+                    if (that.allTableData[i]) {
+                        tables.push(that.allTableData[i])
+                    }
+                    this.tableData = tables;
+                }
+                that.start = index * that.draw;
+                // that.getTableQuery();
+            },
+            // 自动排序
+            sortChange(params) {
+                console.log(params)
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return nonTfmtDate(column, 11);
+            },
+            // 暂停
+            pause(row) {
+                let that = this;
+                console.log(row);
+                this.$confirm('是否暂停设备' + row.EqSn + '?', '暂停操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+
+                    let param = {
+                        key: localStorage.ServiceKey,
+                        shopId: localStorage.ServiceId,
+                        svId: this.$route.query.svId,
+                        eqId: row.EqId,
+                        status: 8,//1:启用 8:暂停 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();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消暂停'
+                    });
+                });
+            },
+            // 开启
+            run(row) {
+                let that = this;
+                this.$confirm('是否开启设备' + row.EqSn + '?', '开启操作', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+
+                    let param = {
+                        key: localStorage.ServiceKey,
+                        shopId: localStorage.ServiceId,
+                        svId: this.$route.query.svId,
+                        eqId: row.EqId,
+                        status: 1,//1:启用 8:暂停 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();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    })
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消开启'
+                    });
+                });
+            },
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'heartLog') {
+                    this.regionName = this.$route.query.name;
+                    this.getTableQuery();
+                }
+            },
+        },
+    }
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+    @import "../assets/css/panel.css";
 
-.context {
-  height: 770px;
-  overflow-y: scroll;
+    .context {
+        height: 770px;
+        overflow-y: scroll;
 
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-  padding-bottom: 60px;
-}
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+        padding-bottom: 60px;
+    }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
 
-.change button {
-  float: left;
-}
+    .change button {
+        float: left;
+    }
 
-.change button.pull-right {
-  float: right;
-}
+    .change button.pull-right {
+        float: right;
+    }
 
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .el-date-editor .el-range__icon {
+        line-height: 22px;
+    }
+
+    .panel /deep/ .el-date-editor .el-range-separator {
+        line-height: 22px;
+    }
 
-/deep/ .el-date-editor .el-range__icon {
-  line-height: 22px;
-}
+    /deep/ .el-select {
+        width: 100%;
+    }
 
-.panel /deep/ .el-date-editor .el-range-separator {
-  line-height: 22px;
-}
-/*ipad only*/
-@media only screen and (max-width: 1366px) {
-  .panel /deep/ .el-date-editor--daterange {
-    width: 100%;
-  }
-}
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .panel /deep/ .el-date-editor--daterange {
+            width: 100%;
+        }
+    }
 
 </style>

+ 648 - 646
pc/src/views/region.vue

@@ -1,676 +1,678 @@
 <template>
-  <div class="context">
-    <div class="panel">
-      <h5>区域管理</h5>
-    </div>
-    <div class="change">
-      <el-button @click="addMember" type="primary">新增区域</el-button>
-      <el-button @click="editList">编辑区域</el-button>
-      <el-button @click="delList" type="danger">删除区域</el-button>
-    </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="name"
-            label="区域名称"
-            width="180">
-        </el-table-column>
-        <el-table-column
-            prop="create"
-            label="创建日期"
-            width="180">
-        </el-table-column>
-        <el-table-column
-            prop="id"
-            label="操作"
-        >
-          <template slot-scope="scope">
-            <el-button type="text" @click="goPage(scope.row)">所属设备</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <br>
-      <el-pagination
-          background
-          :total="pageination.total"
-          :page-size="pageination.pageItem"
-          @current-change="pageChange"
-      ></el-pagination>
-    </div>
-
-    <el-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="区域名称">
-              <el-input v-model="form.name"></el-input>
-            </el-form-item>
-          </el-form>
+    <div class="context">
+        <div class="panel">
+            <h5>区域管理</h5>
+        </div>
+        <div class="change">
+            <el-button @click="addMember" type="primary">新增区域</el-button>
+            <el-button @click="editList">编辑区域</el-button>
+            <el-button @click="delList" type="danger">删除区域</el-button>
+        </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="Name"
+                        label="区域名称"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        prop="Base.CreatedAt"
+                        label="创建日期"
+                        :formatter="filterFmtDate"
+                        width="180">
+                </el-table-column>
+                <el-table-column
+                        prop="id"
+                        label="操作"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" @click="goPage(scope.row)">所属设备</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
         </div>
-      </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>
+
+        <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="区域名称">
+                            <el-input v-model="form.name"></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,
-} from "../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      dialogVisible: false,//其他dialog
-      dialogMemberVisible: false,//新增区域dialog
-      dialogLesson: false,//课时调整
-      dialogGift: false,//赠送课时调整
-      dialogExpTime: false,//有效期调整
-      dialogLessonTable: false,//区域课程
-      dialogTitle: '新增区域',
-      dialogValue: [],
-      tableRadio: [],
-      // panel 配置项目
-      panel: {
-        name: '',
-        phone: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        endType: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
-        tableData: [],
-        allTableData: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        fileList: [],
-        multipleSelection: [],
-        detectedmac: '',
-        options: [
-          {value: 99, label: '全部'},
-          {value: 1, label: '进行中'},
-          {value: 2, label: '已完成'},
-        ],
-        endTypeOptions: [
-          {value: 99, label: '全部'},
-          {value: 30, label: '近一个月'},
-          {value: 7, label: '近一周'},
-          {value: 1, label: '当日'},
-        ],
-        time1: globalBt(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      form: {
-        name: '',
-        userCode: '',
-        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: {
-    // 设备回收
-    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);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '回收成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消回收'
-        });
-      });
-    },
-    goPage(row) {
-      this.$router.push({path: '/heartLog', query: {
-        id: row.id,
-        regionName:row.name
-      }});
-    },
-    // 编辑
-    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.phone = row.Phone;
-      this.form.memo = row.Memo;
-      this.form.adminType = row.AdminType;
-      this.dialogVisible = true;
-      this.dialogTitle = '编辑区域'
-      this.form.btnState = 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);
-        }
-      })
-    },
-    // 编辑
-    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) {
-      let that = this;
-      this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 0,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '禁用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消禁用'
-        });
-      });
-    },
-    // 启用
-    runRow(row) {
-      let that = this;
-      this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        let param = {
-          token: localStorage.token,
-          Id: row.Id,
-          status: 1,
-        };
-        let postdata = qs.stringify(param);
-        testTable(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: row.name + '启用成功!',
-              type: 'success'
-            });
-            // table 重载
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        })
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消启用'
-        });
-      });
-    },
-    // 关闭所有
-    allDialogClose() {
-      this.dialogVisible = false;
-      this.dialogGift = false;
-      this.dialogLesson = false;
-      this.dialogExpTime = false;
-      this.dialogLessonTable = false;
-    },
-    // 确认提交新增区域
-    confirmMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,编号不能为空');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,实体序列号不能为空');
-        return false
-      }
+    import Global from '../Global.js'
+    import {
+        testTable,
+        testSelect,
+        QueryShopVenue,
+        AddShopVenue,
+        EditShopVenue,
+        ShopVenueStatusEdit,
+    } from "../api/getApiRes";
 
-      let param = {
-        token: localStorage.token,
-        shopId: localStorage.shopId,
-        name: that.form.name,
-        phone: that.form.phone,
-      };
-      let postdata = qs.stringify(param);
-      TeacherAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '区域添加成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    confirmEditMember() {
-      let that = this;
-      // checkNum
-      if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
-        return false
-      }
-      if (!that.form.name) {
-        this.$message.error('错了哦,区域名不能为空');
-        return false
-      }
-      if (that.form.name.length > 8) {
-        this.$message.error('错了哦,区域名字数超过8个字');
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        shopId: localStorage.shopId,
-        teacherId: that.form.teacherId,
-        name: that.form.name,
-        phone: that.form.phone,
-      };
-      let postdata = qs.stringify(param);
-      TeacherEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogMemberVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '区域信息编辑成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 确认提交课时
-    confirmLesson() {
-      let that = this;
-      // checkNum
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogVisible: false,//其他dialog
+                dialogMemberVisible: false,//新增区域dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//区域课程
+                dialogTitle: '新增区域',
+                dialogValue: [],
+                tableRadio: [],
+                // panel 配置项目
+                panel: {
+                    name: '',
+                    phone: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    endType: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [
+                        {value: 99, label: '全部'},
+                        {value: 1, label: '进行中'},
+                        {value: 2, label: '已完成'},
+                    ],
+                    endTypeOptions: [
+                        {value: 99, label: '全部'},
+                        {value: 30, label: '近一个月'},
+                        {value: 7, label: '近一周'},
+                        {value: 1, label: '当日'},
+                    ],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    userCode: '',
+                    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: {
+            // 设备回收
+            // 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);
+            //         testTable(postdata).then(res => {
+            //             let json = res;
+            //             if (json.Code == 0) {
+            //                 that.$message({
+            //                     showClose: true,
+            //                     message: row.name + '回收成功!',
+            //                     type: 'success'
+            //                 });
+            //                 // table 重载
+            //                 that.getTableQuery();
+            //             } else {
+            //                 that.$message.error(json.Memo);
+            //             }
+            //         })
+            //     }).catch(() => {
+            //         this.$message({
+            //             type: 'info',
+            //             message: '已取消回收'
+            //         });
+            //     });
+            // },
+            goPage(row) {
+                this.$router.push({
+                    path: '/heartLog', query: {
+                        name: row.Name,
+                        svId : row.SvId
+                    }
+                });
+            },
+            // 编辑
+            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.phone = row.Phone;
+                this.form.memo = row.Memo;
+                this.form.svId = row.SvId;
+                this.form.adminType = row.AdminType;
+                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);
+                    }
+                })
+            },
+            // 编辑
+            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) {
+            //     let that = this;
+            //     this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
+            //         confirmButtonText: '确定',
+            //         cancelButtonText: '取消',
+            //         type: 'warning'
+            //     }).then(() => {
+            //         let param = {
+            //             token: localStorage.token,
+            //             Id: row.Id,
+            //             status: 0,
+            //         };
+            //         let postdata = qs.stringify(param);
+            //         testTable(postdata).then(res => {
+            //             let json = res;
+            //             if (json.Code == 0) {
+            //                 that.$message({
+            //                     showClose: true,
+            //                     message: row.name + '禁用成功!',
+            //                     type: 'success'
+            //                 });
+            //                 // table 重载
+            //                 that.getTableQuery();
+            //             } else {
+            //                 that.$message.error(json.Memo);
+            //             }
+            //         })
+            //     }).catch(() => {
+            //         this.$message({
+            //             type: 'info',
+            //             message: '已取消禁用'
+            //         });
+            //     });
+            // },
+            // 启用
+            // runRow(row) {
+            //     let that = this;
+            //     this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
+            //         confirmButtonText: '确定',
+            //         cancelButtonText: '取消',
+            //         type: 'warning'
+            //     }).then(() => {
+            //         let param = {
+            //             token: localStorage.token,
+            //             Id: row.Id,
+            //             status: 1,
+            //         };
+            //         let postdata = qs.stringify(param);
+            //         testTable(postdata).then(res => {
+            //             let json = res;
+            //             if (json.Code == 0) {
+            //                 that.$message({
+            //                     showClose: true,
+            //                     message: row.name + '启用成功!',
+            //                     type: 'success'
+            //                 });
+            //                 // table 重载
+            //                 that.getTableQuery();
+            //             } else {
+            //                 that.$message.error(json.Memo);
+            //             }
+            //         })
+            //     }).catch(() => {
+            //         this.$message({
+            //             type: 'info',
+            //             message: '已取消启用'
+            //         });
+            //     });
+            // },
+            // 关闭所有
+            allDialogClose() {
+                this.dialogVisible = false;
+                this.dialogGift = false;
+                this.dialogLesson = false;
+                this.dialogExpTime = false;
+                this.dialogLessonTable = false;
+            },
+            // 确认提交新增区域
+            confirmMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.name) {
+                    this.$message.error('错了哦,区域名称不能为空');
+                    return false
+                }
+                if (that.form.name.length > 16) {
+                    this.$message.error('错了哦,区域名称不能超过16个字符');
+                    return false
+                }
 
-      let param = {
-        token: localStorage.token,
-        userCode: that.form.userCode,
-        lesson: that.form.lesson,
-      };
-      let postdata = qs.stringify(param);
-      testSelect(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // 关闭弹窗
-          that.dialogVisible = false;
-          // 重载列表
-          that.getTableQuery();
-          that.$message({
-            showClose: true,
-            message: '课时调整成功!',
-            type: 'success'
-          });
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 新增区域
-    addMember() {
-      this.clearForm();
-      this.dialogMemberVisible = true
-      this.btnType = 0;
-      this.dialogTitle = '新增区域'
-    },
-    // 删除
-    delList() {
-      let that = this;
-      if (this.tableRadio.length == 0) {
-        this.$message.error("请先选中一条记录");
-        return false
-      }
-      let userId = this.tableRadio.Id;
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    name:this.form.name
+                };
+                let postdata = qs.stringify(param);
+                AddShopVenue(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '区域添加成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditMember() {
+                let that = this;
+                // checkNum
+                if (!that.form.name) {
+                    this.$message.error('错了哦,区域名不能为空');
+                    return false
+                }
+                if (that.form.name.length > 16) {
+                    this.$message.error('错了哦,区域名字数超过16个字');
+                    return false
+                }
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId:this.form.svId,
+                    name:this.form.name,
+                };
+                let postdata = qs.stringify(param);
+                EditShopVenue(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 关闭弹窗
+                        that.dialogMemberVisible = false;
+                        // 重载列表
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '区域信息编辑成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 确认提交课时
+            confirmLesson() {
+                let that = this;
+                // checkNum
 
-      let param = {
-        token: localStorage.token,
-        userId: userId,
-        status: 9,//0禁用1启用9删除
-      };
-      let postdata = qs.stringify(param);
+                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);
+                    }
+                })
+            },
+            // 新增区域
+            addMember() {
+                this.clearForm();
+                this.dialogMemberVisible = true;
+                this.btnType = 0;
+                this.dialogTitle = '新增区域'
+            },
+            // 删除
+            delList() {
+                let that = this;
+                if (this.tableRadio.length == 0) {
+                    this.$message.error("请先选中一条记录");
+                    return false
+                }
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId:this.tableRadio.SvId,
+                    status: 9,// 1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
 
-      this.$confirm('此操作将永久删除该区域, 是否继续?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      }).then(() => {
-        ShopManagerStatusEdit(postdata).then(res => {
-          let json = res;
-          if (json.Code == 0) {
-            that.$message({
-              showClose: true,
-              message: '选中的区域已删除!',
-              type: 'success'
-            });
-            // 重载列表
-            that.getTableQuery();
-          } else {
-            that.$message.error(json.Memo);
-          }
-        });
-      }).catch(() => {
-        this.$message({
-          type: 'info',
-          message: '已取消删除'
-        });
-      });
-    },
+                this.$confirm('此操作将永久删除该区域, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    ShopVenueStatusEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的区域已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
 
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 查询按钮
-    query() {
-      this.getTableQuery();
-      this.$message.success('查询完毕');
-    },
-    clearForm() {
-      // clear
-      this.form.name = '';
-      this.form.phone = '';
-      this.form.userCode = '';
-      this.form.shopId = '';
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        name: this.panel.name,//
-        phone: this.panel.phone,//
-      };
-      let postdata = qs.stringify(param);
-      testTable(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;
-          }
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.svId = '';
+                this.form.phone = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                };
+                let postdata = qs.stringify(param);
+                QueryShopVenue(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        if (json.Rs) {
+                            that.allTableData = json.Rs;
+                            that.recordsTotal = json.Rs.length;
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
 
-          // 设置分页数据
-          that.setPaginations();
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 设置分页数据
-    setPaginations() {
-      // 分页属性
-      let that = this;
-      that.pageination.total = that.recordsTotal;
+                        // 设置分页数据
+                        that.setPaginations();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 设置分页数据
+            setPaginations() {
+                // 分页属性
+                let that = this;
+                that.pageination.total = that.recordsTotal;
 
-      // 默认分页
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-    },
-    // 每页显示数量
-    handleSizeChange() {
-      let that = this;
-      that.tableData = that.allTableData.filter((item, index) => {
-        return index < that.pageination.pageItem;
-      });
-      that.draw = that.pageination.pageItem;
-      // that.getTableQuery();
-    },
-    // 翻页
-    pageChange(pageIndex) {
-      let that = this;
-      // 获取当前页
-      let index = that.pageination.pageItem * (pageIndex - 1);
-      // 数据总数
-      let nums = that.pageination.pageItem * pageIndex;
-      // 容器
-      let tables = [];
-      for (var i = index; i < nums; i++) {
-        if (that.allTableData[i]) {
-          tables.push(that.allTableData[i])
-        }
-        this.tableData = tables;
-      }
-      that.start = index * that.draw;
-      // that.getTableQuery();
-    },
-    // 自动排序
-    sortChange(params) {
-      console.log(params)
-    },
-  },
-}
+                // 默认分页
+                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;
+                return nonTfmtDate(column, 11);
+            },
+        },
+    }
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
+    @import "../assets/css/panel.css";
 
-.context {
-  height: 770px;
-  overflow-y: scroll;
+    .context {
+        height: 770px;
+        overflow-y: scroll;
 
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-}
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
 
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
 
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
 
-.change button {
-  float: left;
-}
+    .change button {
+        float: left;
+    }
 
-.change button.pull-right {
-  float: right;
-}
+    .change button.pull-right {
+        float: right;
+    }
 
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
 
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
 
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
 
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
 
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
 
-.dialogContent {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-}
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
 
-.dialogContent .pull-left {
-  width: 30%;
-  float: left;
-}
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
 
-.dialogContent .pull-right {
-  width: 70%;
-  float: right;
-}
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
 </style>

+ 7 - 0
pc/vue.config.js

@@ -8,6 +8,13 @@ module.exports = {
                 pathRewrite: {
                     '^/api': '',
                 }
+            },
+            '/bpi': {
+                target: 'http://192.168.0.3:19096/',
+                changeOrigin: true,
+                pathRewrite: {
+                    '^/bpi': '',
+                }
             }
         }
     },

+ 42 - 55
tv/.idea/workspace.xml

@@ -23,22 +23,19 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
-      <change afterPath="$PROJECT_DIR$/src/api/test.js" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/assets/css/bg.css" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/static/img/rank/king1.svg" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/static/img/rank/king2.svg" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/static/img/rank/king3.svg" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/static/img/rank/recordIcon.svg" afterDir="false" />
-      <change afterPath="$PROJECT_DIR$/src/views/Wait.vue" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../pc/src/views/courses.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/Global.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/api/Navs.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/Navs.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/components/Headside.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/components/Headside.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/router/index.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Main.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/Member.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Member.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/region.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/region.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/vue.config.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/vue.config.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/Global.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/api/getApiRes.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/api/getApiRes.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/router/index.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/static/img/rank/boy.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/static/img/wait/boy.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/static/img/rank/girl.png" beforeDir="false" afterPath="$PROJECT_DIR$/src/static/img/wait/girl.png" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Main.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/views/Rank.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Rank.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/views/pk.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/pk.vue" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -51,11 +48,11 @@
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file pinned="false" current-in-tab="false">
+      <file pinned="false" current-in-tab="true">
         <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="2147">
-              <caret line="320" column="8" selection-start-line="320" selection-start-column="8" selection-end-line="320" selection-end-column="8" />
+            <state relative-caret-position="504">
+              <caret line="24" column="34" selection-start-line="24" selection-start-column="34" selection-end-line="24" selection-end-column="34" />
               <folding>
                 <element signature="e#2820#2864#0" expanded="true" />
               </folding>
@@ -63,24 +60,6 @@
           </provider>
         </entry>
       </file>
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="653">
-              <caret line="328" column="58" selection-start-line="328" selection-start-column="58" selection-end-line="328" selection-end-column="58" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/api/test.js">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="336">
-              <caret line="357" selection-start-line="357" selection-end-line="359" selection-end-column="5" />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -163,8 +142,8 @@
         <option value="$PROJECT_DIR$/src/views/pk.vue" />
         <option value="$PROJECT_DIR$/src/assets/css/bg.css" />
         <option value="$PROJECT_DIR$/src/views/Main.vue" />
-        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
         <option value="$PROJECT_DIR$/src/views/Wait.vue" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
       </list>
     </option>
   </component>
@@ -174,7 +153,7 @@
     <other-services-enabled>true</other-services-enabled>
     <auto-save>true</auto-save>
   </component>
-  <component name="ProjectFrameBounds" extendedState="6">
+  <component name="ProjectFrameBounds" extendedState="1">
     <option name="x" value="-2568" />
     <option name="y" value="-8" />
     <option name="width" value="1296" />
@@ -325,7 +304,7 @@
       <workItem from="1605406240238" duration="51039000" />
       <workItem from="1605668164423" duration="15041000" />
       <workItem from="1605747566783" duration="13000" />
-      <workItem from="1605775278675" duration="13563000" />
+      <workItem from="1605775278675" duration="14902000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -390,17 +369,24 @@
       <option name="project" value="LOCAL" />
       <updated>1605696168373</updated>
     </task>
-    <option name="localTasksCounter" value="10" />
+    <task id="LOCAL-00010" summary="1.原来的排名页面改为等待页面&#10;2.等待页面按照开课类型跳转不同的课程页面&#10;3.团课结束后跳转专属的排名页面&#10;4.排名页面的渲染和1分钟后跳入等待页面">
+      <created>1605855418790</created>
+      <option name="number" value="00010" />
+      <option name="presentableId" value="LOCAL-00010" />
+      <option name="project" value="LOCAL" />
+      <updated>1605855418790</updated>
+    </task>
+    <option name="localTasksCounter" value="11" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="243655000" />
+    <option name="totallyTimeSpent" value="244994000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-2568" y="-8" width="2576" height="1395" extended-state="6" />
+    <frame x="-2568" y="-8" width="1296" height="1395" extended-state="1" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.015151516" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.030944625" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.24973656" />
       <window_info id="Favorites" order="2" side_tool="true" weight="0.32982087" />
       <window_info id="npm" order="3" side_tool="true" />
@@ -474,7 +460,8 @@
     <MESSAGE value="api by corss" />
     <MESSAGE value="del unuse" />
     <MESSAGE value="auto upload" />
-    <option name="LAST_COMMIT_MESSAGE" value="auto upload" />
+    <MESSAGE value="1.原来的排名页面改为等待页面&#10;2.等待页面按照开课类型跳转不同的课程页面&#10;3.团课结束后跳转专属的排名页面&#10;4.排名页面的渲染和1分钟后跳入等待页面" />
+    <option name="LAST_COMMIT_MESSAGE" value="1.原来的排名页面改为等待页面&#10;2.等待页面按照开课类型跳转不同的课程页面&#10;3.团课结束后跳转专属的排名页面&#10;4.排名页面的渲染和1分钟后跳入等待页面" />
   </component>
   <component name="WindowStateProjectService">
     <state x="-1830" y="274" width="1099" height="859" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1604022799787">
@@ -722,16 +709,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="2147">
-          <caret line="320" column="8" selection-start-line="320" selection-start-column="8" selection-end-line="320" selection-end-column="8" />
-          <folding>
-            <element signature="e#2820#2864#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/api/test.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="336">
@@ -741,8 +718,18 @@
     </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="653">
-          <caret line="328" column="58" selection-start-line="328" selection-start-column="58" selection-end-line="328" selection-end-column="58" />
+        <state relative-caret-position="800">
+          <caret line="335" column="35" lean-forward="true" selection-start-line="335" selection-start-column="35" selection-end-line="335" selection-end-column="35" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="504">
+          <caret line="24" column="34" selection-start-line="24" selection-start-column="34" selection-end-line="24" selection-end-column="34" />
+          <folding>
+            <element signature="e#2820#2864#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

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

@@ -20,7 +20,8 @@
                                 {{s.Ck|fmtFloat}}
                             </div>
                             <div class="record">
-                                <img src="../static/img/rank/recordIcon.svg" class="king" alt="" v-if="true">
+                                <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
+                                     v-if="s.IsNewUser ==0 && s.IsBreaking == 1">
                             </div>
                         </div>
                     </li>
@@ -42,7 +43,8 @@
                                 {{s.Cle|fmtInt}}
                             </div>
                             <div class="record">
-                                <img src="../static/img/rank/recordIcon.svg" class="king" alt="" v-if="true">
+                                <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
+                                     v-if="s.IsNewUser ==0 && s.IsBreaking == 1">
                             </div>
                         </div>
                     </li>