Changpeng Duan 5 yıl önce
ebeveyn
işleme
1b4878d64d

+ 27 - 0
pc/src/api/getApiRes.js

@@ -721,3 +721,30 @@ export function QueryPvtHrSensors(postdata) {
     let url = headapi + 'v1/HrSensors/QueryPvtHrSensors ';
     return getApiBasic(url, postdata);
 }
+
+
+// 12/2 关联手机号
+
+// 会员关联手机添加
+export function VipUserAssociatedPhoneAdd(postdata) {
+    let url = headapi + 'v1/User/VipUserAssociatedPhoneAdd ';
+    return getApiBasic(url, postdata);
+}
+
+// 会员关联手机修改
+export function VipUserAssociatedPhoneEdit(postdata) {
+    let url = headapi + 'v1/User/VipUserAssociatedPhoneEdit ';
+    return getApiBasic(url, postdata);
+}
+
+// 会员关联手机号简单查询
+export function VipUserAssociatedPhoneSimpleQuery(postdata) {
+    let url = headapi + 'v1/User/VipUserAssociatedPhoneSimpleQuery ';
+    return getApiBasic(url, postdata);
+}
+
+// 会员关联手机状态修改
+export function VipUserAssociatedPhoneStatusEdit(postdata) {
+    let url = headapi + 'v1/User/VipUserAssociatedPhoneStatusEdit ';
+    return getApiBasic(url, postdata);
+}

+ 16 - 0
pc/src/router/index.js

@@ -172,6 +172,14 @@ const routes = [
                     title: "课程管理",
                     clmid: "10",
                 }
+            },{
+                path: '/coursesHistory',
+                name: 'coursesHistory',
+                component: () => import('@/views/coursesHistory.vue'),
+                meta: {
+                    title: "课程管理 历史记录",
+                    clmid: "10",
+                }
             }, {
                 path: '/classPrepare',
                 name: 'classPrepare',
@@ -252,6 +260,14 @@ const routes = [
                     title: "区域设备",
                     clmid: "10",
                 }
+            }, {
+                path: '/relevancePhone',
+                name: 'relevancePhone',
+                component: () => import('@/views/relevancePhone.vue'),
+                meta: {
+                    title: "关联手机",
+                    clmid: "11",
+                }
             },
         ]
     }, {

+ 792 - 789
pc/src/views/EditLessonManage.vue

@@ -1,805 +1,808 @@
 <template>
-  <div class="context">
-    <div class="panel">
-      <h5>{{ pageTitle }}</h5>
-    </div>
-    <div class="panel-body">
-      <div class="panel_control">
-        <el-row :gutter="20">
-          <el-col :span="5">
-            <em><span style="color: red">*</span> 课程表名称:</em>
-            <el-input v-model="panel.name" placeholder="请输入课程表名称" :disabled="panel.inputState"></el-input>
-          </el-col>
-          <el-col :span="5" v-if="!panel.inputState">
-            <em><span style="color: red">*</span> 课程表时间:</em>
-            <el-date-picker
-                v-model="panel.week"
-                type="week"
-                :picker-options="{'firstDayOfWeek': 1}"
-                format="yyyy 第 WW 周"
-                placeholder="选择周">
-            </el-date-picker>
-          </el-col>
-          <!--        todo-->
-          <!--        <el-button class="seeTemp">预览课程表</el-button>-->
-          <el-button type="default" class="seeTemp" @click="$router.push('/lessonManage')">返回课程表</el-button>
-        </el-row>
-      </div>
-    </div>
-    <br>
-    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-      <el-tab-pane label="星期一" name="1"></el-tab-pane>
-      <el-tab-pane label="星期二" name="2"></el-tab-pane>
-      <el-tab-pane label="星期三" name="3"></el-tab-pane>
-      <el-tab-pane label="星期四" name="4"></el-tab-pane>
-      <el-tab-pane label="星期五" name="5"></el-tab-pane>
-      <el-tab-pane label="星期六" name="6"></el-tab-pane>
-      <el-tab-pane label="星期天" name="7"></el-tab-pane>
-    </el-tabs>
-
-
-    <!--        todo 读取后台保存状态,新保存后不跳走-->
-    <div class="table">
-      <el-table
-          v-for="tab in tabs"
-          :data="tab.tableData"
-          v-if="tab.days == activeName"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-          @selection-change="handleSelectionChange"
-      >
-        >
-        <el-table-column
-            prop="timeScope"
-            label="时间"
-            width="260px"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-time-picker
-                is-range
-                v-model="scope.row.timeLong"
-                range-separator="至"
-                start-placeholder="开始时间"
-                end-placeholder="结束时间"
-                placeholder="选择时间范围"
-                :readonly="scope.row.Locking == 1"
-            >
-            </el-time-picker>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="ClassId"
-            label="课程"
-            align="center"
-        >
-          <!--                    locking是1的不可编辑课程和时间-->
-          <template slot-scope="scope">
-            <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)" :disabled="scope.row.Locking == 1">
-              <el-option
-                  v-for="item in panel.options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-              </el-option>
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="OrderToplimit"
-            label="预约名额"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-input-number v-model="scope.row.OrderToplimit" :min="1" :max="9999"
-                             label=""></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="ConsumeHour"
-            label="消耗课时"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
-                             label=""></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="WxVisible"
-            label="微信可见"
-        >
-          <template slot-scope="scope">
-            <el-switch
-                v-model="scope.row.WxVisible"
-                :active-value="1"
-                :inactive-value="0"
-                active-color="#409EFF"
-                inactive-color="#D9D9D9"
-                @change=changeWechat($event,scope.row)
-            >
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="WxOrder"
-            label="微信可预约"
-        >
-          <template slot-scope="scope">
-            <el-switch
-                v-model="scope.row.WxOrder"
-                :active-value="1"
-                :inactive-value="0"
-                active-color="#409EFF"
-                inactive-color="#D9D9D9"
-                @change=changeWechatOrder($event,scope.row.ClassSelf)
+    <div class="context">
+        <div class="panel">
+            <h5>{{ pageTitle }}</h5>
+        </div>
+        <div class="panel-body">
+            <div class="panel_control">
+                <el-row :gutter="20">
+                    <el-col :span="5">
+                        <em><span style="color: red">*</span> 课程表名称:</em>
+                        <el-input v-model="panel.name" placeholder="请输入课程表名称" :disabled="panel.inputState"></el-input>
+                    </el-col>
+                    <el-col :span="5" v-if="!panel.inputState">
+                        <em><span style="color: red">*</span> 课程表时间:</em>
+                        <el-date-picker
+                                v-model="panel.week"
+                                type="week"
+                                :picker-options="{'firstDayOfWeek': 1}"
+                                format="yyyy 第 WW 周"
+                                placeholder="选择周">
+                        </el-date-picker>
+                    </el-col>
+                    <!--        todo-->
+                    <!--        <el-button class="seeTemp">预览课程表</el-button>-->
+                    <el-button type="default" class="seeTemp" @click="$router.push('/lessonManage')">返回课程表</el-button>
+                </el-row>
+            </div>
+        </div>
+        <br>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="星期一" name="1"></el-tab-pane>
+            <el-tab-pane label="星期二" name="2"></el-tab-pane>
+            <el-tab-pane label="星期三" name="3"></el-tab-pane>
+            <el-tab-pane label="星期四" name="4"></el-tab-pane>
+            <el-tab-pane label="星期五" name="5"></el-tab-pane>
+            <el-tab-pane label="星期六" name="6"></el-tab-pane>
+            <el-tab-pane label="星期天" name="7"></el-tab-pane>
+        </el-tabs>
+
+
+        <!--        todo 读取后台保存状态,新保存后不跳走-->
+        <div class="table">
+            <el-table
+                    v-for="tab in tabs"
+                    :data="tab.tableData"
+                    v-if="tab.days == activeName"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
             >
-            </el-switch>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="Status"
-            label="操作"
-            width="100px"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-button type="text" class="red" @click="delRow(scope)" v-if="scope.row.Locking != 1">删除</el-button>
-            <el-button type="text" class="gary" @click="delRow(scope)" v-if="scope.row.Locking == 1">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="rowBottom">
-        <el-button type="default" @click="$router.push('/lessonManage')">返回课程表</el-button>
-        <!--                ID为0是新建,不为0是修改-->
-        <el-button type="primary" class="pull-right" @click="confirmLessonTable"
-                   v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
-        </el-button>
-        <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
-                   v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
-        </el-button>
-        <el-button type="primary" class="pull-right" @click="addRow">新增课表</el-button>
-      </div>
-      <div>
+                >
+                <el-table-column
+                        prop="timeScope"
+                        label="时间"
+                        width="260px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-time-picker
+                                is-range
+                                v-model="scope.row.timeLong"
+                                range-separator="至"
+                                start-placeholder="开始时间"
+                                end-placeholder="结束时间"
+                                placeholder="选择时间范围"
+                                :readonly="scope.row.Locking == 1"
+                        >
+                        </el-time-picker>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ClassId"
+                        label="课程"
+                        align="center"
+                >
+                    <!--                    locking是1的不可编辑课程和时间-->
+                    <template slot-scope="scope">
+                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)"
+                                   :disabled="scope.row.Locking == 1">
+                            <el-option
+                                    v-for="item in panel.options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="OrderToplimit"
+                        label="预约名额"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.OrderToplimit" :min="1" :max="9999"
+                                         label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ConsumeHour"
+                        label="消耗课时"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
+                                         label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="WxVisible"
+                        label="微信可见"
+                >
+                    <template slot-scope="scope">
+                        <el-switch
+                                v-model="scope.row.WxVisible"
+                                :active-value="1"
+                                :inactive-value="0"
+                                active-color="#409EFF"
+                                inactive-color="#D9D9D9"
+                                @change=changeWechat($event,scope.row)
+                        >
+                        </el-switch>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="WxOrder"
+                        label="微信可预约"
+                >
+                    <template slot-scope="scope">
+                        <el-switch
+                                v-model="scope.row.WxOrder"
+                                :active-value="1"
+                                :inactive-value="0"
+                                active-color="#409EFF"
+                                inactive-color="#D9D9D9"
+                                @change=changeWechatOrder($event,scope.row.ClassSelf)
+                        >
+                        </el-switch>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                        width="100px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" class="red" @click="delRow(scope)" v-if="scope.row.Locking != 1">删除
+                        </el-button>
+                        <el-button type="text" class="gary" @click="delRow(scope)" v-if="scope.row.Locking == 1">删除
+                        </el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="rowBottom">
+                <el-button type="default" @click="$router.push('/lessonManage')">返回课程表</el-button>
+                <!--                ID为0是新建,不为0是修改-->
+                <el-button type="primary" class="pull-right" @click="confirmLessonTable"
+                           v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
+                           v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="addRow">新增课表</el-button>
+            </div>
+            <div>
+                <br>
+                <em class="red wrning">
+                    *所有操作提交后生效
+                </em>
+            </div>
+        </div>
         <br>
-        <em class="red wrning">
-          *所有操作提交后生效
-        </em>
-      </div>
+        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+            <div class="dialogTitle">
+                <span>基础功能</span>
+            </div>
+            <div>
+                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small">确定</el-button>
+                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
     </div>
-    <br>
-    <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
-      <div class="dialogTitle">
-        <span>基础功能</span>
-      </div>
-      <div>
-        <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small">确定</el-button>
-        <el-button @click="dialogVisible = false" size="small">取消</el-button>
-      </div>
-    </el-dialog>
-  </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import {
-  SttPlanBasicAdd,
-  SttPlanDetailListQuery,
-  SttPlanDetailBatchSave,
-  STTBasicAdd,
-  SttPlanBasicEdit,
-  STTDetailListQuery,
-  STTDetailBatchSave,
-  STTBasicEdit,
-  testTable,
-  testTableLong,
-  testSelect,
-  ClassListQuery,
-  STTDetailAllowDelCheck,
-  ClassDetailOne
-} from "../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      pageTitle: '新增课程表',
-      dialogVisible: false,
-      dialogdata: [],
-      dialogValue: [],
-      temId: '',
-      activeName: '1',
-      tableData: [],
-      // panel 配置项目
-      panel: {
-        inputState: false,
-        name: '',
-        usercode: '',
-        username: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        week: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
-        tableData: [],
-        allTableData: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        fileList: [],
-        multipleSelection: [],
-        detectedmac: '',
-        options: [],
-        time1: globalBt(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      testRow: {
-        timeLong: [new Date(2016, 9, 10, 8, 1), new Date(2016, 9, 10, 9, 2)],
-        BeginStr: '08:30',
-        EndStr: '09:30',
-        ClassId: '',
-        OrderToplimit: 1,
-        ConsumeHour: 1,
-        WxOrder: 1,
-        WxVisible: 0,
-      },
-      tabs: [
-        {
-          tableData: [], days: '1'
+    import Global from '../Global.js'
+    import {
+        SttPlanBasicAdd,
+        SttPlanDetailListQuery,
+        SttPlanDetailBatchSave,
+        STTBasicAdd,
+        SttPlanBasicEdit,
+        STTDetailListQuery,
+        STTDetailBatchSave,
+        STTBasicEdit,
+        testTable,
+        testTableLong,
+        testSelect,
+        ClassListQuery,
+        STTDetailAllowDelCheck,
+        ClassDetailOne
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                pageTitle: '新增课程表',
+                dialogVisible: false,
+                dialogdata: [],
+                dialogValue: [],
+                temId: '',
+                activeName: '1',
+                tableData: [],
+                // panel 配置项目
+                panel: {
+                    inputState: false,
+                    name: '',
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    week: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                testRow: {
+                    timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 23, 59)],
+                    BeginStr: '08:30',
+                    EndStr: '23:59',
+                    ClassId: '',
+                    OrderToplimit: 1,
+                    ConsumeHour: 1,
+                    WxOrder: 1,
+                    WxVisible: 0,
+                },
+                tabs: [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ],
+                serachBtnStatus: false,
+            }
         },
-        {
-          tableData: [], days: '2'
+        mounted() {
+            // 加载课程选项
+            this.panelSelect();
+            if (parseInt(this.$route.query.id) == 0) {
+                //  深拷贝赋初始值
+                this.pageTitle = '新增课程表'
+                this.deepValue();
+                this.panel.name = '';
+                this.panel.week = '';
+                this.panel.inputState = false
+            } else {
+                // 读取赋值
+                this.pageTitle = '编辑课程表'
+                this.getTableQuery();
+                this.panel.inputState = true
+            }
         },
-        {
-          tableData: [], days: '3'
-        },
-        {
-          tableData: [], days: '4'
-        },
-        {
-          tableData: [], days: '5'
-        },
-        {
-          tableData: [], days: '6'
+        methods: {
+            // 加载选项
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    vipType: '',
+                    start: 1,
+                    expDay: 0,
+                    tableMax: 9999,
+                };
+                let postdata = qs.stringify(param);
+                ClassListQuery(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // that.dialogdata = json.Rs;
+                        if (json.Rs == null) return false
+                        that.panel.options = turnClassResToOption(json.Rs)
+                        console.log(that.panel.options);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 选择课程后,获取当前课程的建议上课人数和课时消耗
+            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.OrderToplimit = json.Rs.TopLimit;
+                        row.ConsumeHour = json.Rs.ConsumeHour;
+                        // row.WxOrder = json.Rs.WxOrder; //不支持联动
+                        row.WxVisible = json.Rs.WxVisible;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            confirmEditLessonTable() {
+                let id = this.$route.query.id
+                // 提交课程内容,不再修改课程名称和时间的信息
+                this.EditLessonTable(id);
+            },
+            // 删除
+            delRow(scope) {
+                if (!scope.row.StdId) {
+                    let delIndex = parseInt(scope.$index)
+                    let curIndex = parseInt(this.activeName) - 1;
+                    this.tabs[curIndex].tableData.splice(delIndex, 1)
+                } else {
+                    this.checkCannotDel(scope)
+                }
+            },
+            // 检测课表中课程可否删除
+            checkCannotDel(scope) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: scope.row.StdId,
+                };
+                let postdata = qs.stringify(param);
+                STTDetailAllowDelCheck(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        let delIndex = parseInt(scope.$index)
+                        let curIndex = parseInt(this.activeName) - 1;
+                        this.tabs[curIndex].tableData.splice(delIndex, 1)
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 提交课程
+            confirmLessonTable() {
+                if (!this.panel.name) {
+                    this.$message.error('名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('名称不能大于20个字符');
+                    return false
+                }
+                if (!this.checkData()) {
+                    return false
+                }
+
+                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 = {
+                    token: localStorage.token,
+                    name: this.panel.name,
+                    incomingDate: nonTfmtDatetoLength(this.panel.week, 10),//对应日期 字符串 年-月-日 格式,
+                };
+                let postdata = qs.stringify(param);
+                STTBasicAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.panel.tabId = json.Id;
+                        // 提交课程内容
+                        that.EditLessonTable(json.Id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 保存课程
+            EditLessonTable(planId) {
+                let that = this;
+                // 校验提交的数据
+                if (!this.checkData()) {
+                    return false
+                }
+                // 提交数据
+                let planRs = [];
+                let thisRow = {};
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        thisRow = this.tabs[i].tableData[j];
+                        thisRow.LessonIndex = parseInt(j + 1);
+                        if (planId) {
+                            thisRow.StbId = parseInt(planId);
+                        } else {
+                            thisRow.StbId = parseInt(this.$route.query.id);
+                        }
+                        thisRow.WeekDay = parseInt(i + 1);
+                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        thisRow.StdId = thisRow.StdId ? thisRow.StdId : 0;
+                        this.$delete(thisRow, 'Base');
+                        this.$delete(thisRow, 'SpdId');
+                        planRs.push(thisRow);
+                    }
+                }
+
+                let res = JSON.stringify(planRs);
+                // 如果传入0就用url里的,如果非0就用传入的
+                // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
+                let param = {
+                    token: localStorage.token,
+                    stbId: planId,
+                    stbRs: res,
+                };
+                let postdata = qs.stringify(param);
+                STTDetailBatchSave(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程已上传成功!',
+                            type: 'success'
+                        });
+                        this.$router.push({
+                            path: '/lessonManage'
+                        });
+                        // 提交后清掉内存里的课表
+                        this.clearTableRAM();
+                        // this.getTableQuery();
+                    } else {
+                        this.$router.push({
+                            path: '/lessonManage'
+                        });
+                        // 提交后清掉内存里的课表
+                        this.clearTableRAM();
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            clearTableRAM() {
+                this.tabs = [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ];
+
+            },
+            checkData() {
+                let res = true
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        if (!this.tabs[i].tableData[j].ClassId) {
+                            let days = numberToWeekdays(i + 1);
+                            let lessonIndex = j + 1;
+                            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交')
+                            res = false
+                            break;
+                        }
+                    }
+                }
+                return res
+            },
+            // 检查数据
+            checkData2() {
+                // todo
+                let tableDate = this.tabs;
+                tableDate.map(function (item) {
+                    console.log(item);
+                })
+            },
+            // 新增一行
+            addRow() {
+                // 读取当前周几
+                let index = parseInt(this.activeName) - 1;
+                let rows = this.testRow;
+                let res = this.deepClone(rows);
+                this.tabs[index].tableData.push(res);
+            },
+            //  深拷贝赋初始值
+            deepValue() {
+                let that = this;
+                let valus = [
+                    this.testRow
+                ];
+                this.tabs.map(function (item) {
+                    let res = that.deepClone(valus);
+                    item.tableData = res;
+                })
+            },
+            deepClone(obj) {
+                let _obj = JSON.stringify(obj),
+                    objClone = JSON.parse(_obj);
+                return objClone
+            },
+            handleClick() {
+            },
+            changeWechat(e, row) {
+                // if(parseInt(e) == 0){
+                //     this.$message.success('当前课程微信已不可见');
+                // }else{
+                //     this.$message.success('当前课程微信不可见');
+                // }
+            },
+            changeWechatOrder(e, row) {
+                // if(parseInt(e) == 0){
+                //     this.$message.success('当前课程微信已不可预约');
+                // }else{
+                //     this.$message.success('当前课程微信可预约');
+                // }
+            },
+            // 增删会员课程
+            lessonStudenChange() {
+                this.dialogVisible = true
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    stbId: this.$route.query.id,//
+                };
+                // 只能读取,不能修改
+                this.panel.name = this.$route.query.name;
+
+
+                let postdata = qs.stringify(param);
+                STTDetailListQuery(postdata).then(res => {
+                    let json = res;
+                    let Rs = json.Rs
+                    let bt = '';
+                    let et = '';
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        // 清掉上次的记录
+                        for (let i = 0; i < that.tabs.length; i++) {
+                            that.tabs[i].tableData = []
+                        }
+                        if (Rs) {
+                            // 遍历分配
+                            Rs.map(function (item) {
+                                for (let i = 0; i < 7; i++) {
+                                    if (item.WeekDay == i + 1) {
+                                        bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
+                                        et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
+                                        item.timeLong = [bt, et];
+                                        that.tabs[i].tableData.push(item);
+
+                                    }
+                                }
+                            })
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
         },
-        {
-          tableData: [], days: '7'
+        watch: {
+            $route(to) {
+                if (to.name == 'EditLessonManage') {
+                    this.temId = this.$route.query.id;
+                    this.panelSelect();
+                    if (parseInt(this.temId) == 0) {
+                        this.pageTitle = '新增课程表'
+                        this.deepValue();
+                        this.panel.name = '';
+                        this.panel.week = '';
+                        this.panel.inputState = false
+                    } else {
+                        this.pageTitle = '编辑课程表'
+                        this.getTableQuery();
+                        this.panel.inputState = true
+                    }
+                }
+            },
         },
-      ],
-      serachBtnStatus: false,
     }
-  },
-  mounted() {
-    // 加载课程选项
-    this.panelSelect();
-    if (parseInt(this.$route.query.id) == 0) {
-      //  深拷贝赋初始值
-      this.pageTitle = '新增课程表'
-      this.deepValue();
-      this.panel.name = '';
-      this.panel.week = '';
-      this.panel.inputState = false
-    } else {
-      // 读取赋值
-      this.pageTitle = '编辑课程表'
-      this.getTableQuery();
-      this.panel.inputState = true
-    }
-  },
-  methods: {
-    // 加载选项
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        vipType: '',
-        start: 1,
-        expDay: 0,
-        tableMax: 9999,
-      };
-      let postdata = qs.stringify(param);
-      ClassListQuery(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          // that.dialogdata = json.Rs;
-          if (json.Rs == null) return false
-          that.panel.options = turnClassResToOption(json.Rs)
-          console.log(that.panel.options);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 选择课程后,获取当前课程的建议上课人数和课时消耗
-    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.OrderToplimit = json.Rs.TopLimit;
-          row.ConsumeHour = json.Rs.ConsumeHour;
-          // row.WxOrder = json.Rs.WxOrder; //不支持联动
-          row.WxVisible = json.Rs.WxVisible;
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    confirmEditLessonTable() {
-      let id = this.$route.query.id
-      // 提交课程内容,不再修改课程名称和时间的信息
-      this.EditLessonTable(id);
-    },
-    // 删除
-    delRow(scope) {
-      if (!scope.row.StdId) {
-        let delIndex = parseInt(scope.$index)
-        let curIndex = parseInt(this.activeName) - 1;
-        this.tabs[curIndex].tableData.splice(delIndex, 1)
-      } else {
-        this.checkCannotDel(scope)
-      }
-    },
-    // 检测课表中课程可否删除
-    checkCannotDel(scope) {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        stdId: scope.row.StdId,
-      };
-      let postdata = qs.stringify(param);
-      STTDetailAllowDelCheck(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          let delIndex = parseInt(scope.$index)
-          let curIndex = parseInt(this.activeName) - 1;
-          this.tabs[curIndex].tableData.splice(delIndex, 1)
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 提交课程
-    confirmLessonTable() {
-      if (!this.panel.name) {
-        this.$message.error('名称不能为空');
-        return false
-      }
-      if (this.panel.name.length < 3) {
-        this.$message.error('名称不能小于3个字符');
-        return false
-      }
-      if (this.panel.name.length > 20) {
-        this.$message.error('名称不能大于20个字符');
-        return false
-      }
-      if (!this.checkData()) {
-        return false
-      }
-
-      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 = {
-        token: localStorage.token,
-        name: this.panel.name,
-        incomingDate: nonTfmtDatetoLength(this.panel.week, 10),//对应日期 字符串 年-月-日 格式,
-      };
-      let postdata = qs.stringify(param);
-      STTBasicAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.panel.tabId = json.Id;
-          // 提交课程内容
-          that.EditLessonTable(json.Id);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 保存课程
-    EditLessonTable(planId) {
-      let that = this;
-      // 校验提交的数据
-      if (!this.checkData()) {
-        return false
-      }
-      // 提交数据
-      let planRs = [];
-      let thisRow = {};
-      for (let i = 0; i < this.tabs.length; i++) {
-        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-          thisRow = this.tabs[i].tableData[j];
-          thisRow.LessonIndex = parseInt(j + 1);
-          if (planId) {
-            thisRow.StbId = parseInt(planId);
-          } else {
-            thisRow.StbId = parseInt(this.$route.query.id);
-          }
-          thisRow.WeekDay = parseInt(i + 1);
-          thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
-          thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
-          thisRow.StdId = thisRow.StdId ? thisRow.StdId : 0;
-          this.$delete(thisRow, 'Base');
-          this.$delete(thisRow, 'SpdId');
-          planRs.push(thisRow);
-        }
-      }
-
-      let res = JSON.stringify(planRs);
-      // 如果传入0就用url里的,如果非0就用传入的
-      // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
-      let param = {
-        token: localStorage.token,
-        stbId: planId,
-        stbRs: res,
-      };
-      let postdata = qs.stringify(param);
-      STTDetailBatchSave(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '课程已上传成功!',
-            type: 'success'
-          });
-          this.$router.push({
-            path: '/lessonManage'
-          });
-          // 提交后清掉内存里的课表
-          this.clearTableRAM();
-          // this.getTableQuery();
-        } else {
-          this.$router.push({
-            path: '/lessonManage'
-          });
-          // 提交后清掉内存里的课表
-          this.clearTableRAM();
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    clearTableRAM(){
-      this.tabs = [
-        {
-          tableData: [], days: '1'
-        },
-        {
-          tableData: [], days: '2'
-        },
-        {
-          tableData: [], days: '3'
-        },
-        {
-          tableData: [], days: '4'
-        },
-        {
-          tableData: [], days: '5'
-        },
-        {
-          tableData: [], days: '6'
-        },
-        {
-          tableData: [], days: '7'
-        },
-      ];
-
-    },
-    checkData() {
-      let res = true
-      for (let i = 0; i < this.tabs.length; i++) {
-        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-          if (!this.tabs[i].tableData[j].ClassId) {
-            let days = numberToWeekdays(i+1);
-            let lessonIndex = j + 1;
-            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交')
-            res =  false
-            break;
-          }
-        }
-      }
-      return res
-    },
-    // 检查数据
-    checkData2() {
-      // todo
-      let tableDate = this.tabs;
-      tableDate.map(function (item) {
-        console.log(item);
-      })
-    },
-    // 新增一行
-    addRow() {
-      // 读取当前周几
-      let index = parseInt(this.activeName) - 1;
-      let rows = this.testRow;
-      let res = this.deepClone(rows);
-      this.tabs[index].tableData.push(res);
-    },
-    //  深拷贝赋初始值
-    deepValue() {
-      let that = this;
-      let valus = [
-        this.testRow
-      ];
-      this.tabs.map(function (item) {
-        let res = that.deepClone(valus);
-        item.tableData = res;
-      })
-    },
-    deepClone(obj) {
-      let _obj = JSON.stringify(obj),
-          objClone = JSON.parse(_obj);
-      return objClone
-    },
-    handleClick() {
-    },
-    changeWechat(e, row) {
-      // if(parseInt(e) == 0){
-      //     this.$message.success('当前课程微信已不可见');
-      // }else{
-      //     this.$message.success('当前课程微信不可见');
-      // }
-    },
-    changeWechatOrder(e, row) {
-      // if(parseInt(e) == 0){
-      //     this.$message.success('当前课程微信已不可预约');
-      // }else{
-      //     this.$message.success('当前课程微信可预约');
-      // }
-    },
-    // 增删会员课程
-    lessonStudenChange() {
-      this.dialogVisible = true
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        stbId: this.$route.query.id,//
-      };
-      // 只能读取,不能修改
-      this.panel.name = this.$route.query.name;
-
-
-      let postdata = qs.stringify(param);
-      STTDetailListQuery(postdata).then(res => {
-        let json = res;
-        let Rs = json.Rs
-        let bt = '';
-        let et = '';
-        if (json.Code == 0) {
-          that.loading = false;
-          // 清掉上次的记录
-          for (let i = 0; i < that.tabs.length; i++) {
-            that.tabs[i].tableData = []
-          }
-          if (Rs) {
-            // 遍历分配
-            Rs.map(function (item) {
-              for (let i = 0; i < 7; i++) {
-                if (item.WeekDay == i + 1) {
-                  bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
-                  et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
-                  item.timeLong = [bt, et];
-                  that.tabs[i].tableData.push(item);
-
-                }
-              }
-            })
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'EditLessonManage') {
-        this.temId = this.$route.query.id;
-        this.panelSelect();
-        if (parseInt(this.temId) == 0) {
-          this.pageTitle = '新增课程表'
-          this.deepValue();
-          this.panel.name = '';
-          this.panel.week = '';
-          this.panel.inputState = false
-        } else {
-          this.pageTitle = '编辑课程表'
-          this.getTableQuery();
-          this.panel.inputState = true
-        }
-      }
-    },
-  },
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
-
-em {
-  font-style: normal;
-}
-
-.context {
-  overflow: hidden;
-  height: 770px;
-
-  overflow-y: scroll;
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  min-height: 100%;
-  padding: 30px;
-  padding-bottom: 10px;
-}
-
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
-
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-
-.change button {
-  float: left;
-}
-
-.change button.pull-right {
-  float: right;
-}
-
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
-
-.dialogTitle span {
-  width: 169px;
-  height: 40px;
-  line-height: 40px;
-  text-align: center;
-  color: #fff;
-  background: #3799FF;
-  border-radius: 250px;
-  font-size: 18px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 30px;
-}
-
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
-
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
-
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
-
-/deep/ .panel_control .el-input {
-  width: 200px;
-  float: left;
-}
-
-.panel_control em {
-  float: left;
-  font-size: 14px;
-  color: #545454;
-  line-height: 45px;
-  margin-right: 10px;
-}
-
-.seeTemp {
-  /*position: relative;*/
-  float: right;
-  bottom: 0px;
-  z-index: 222;
-}
-
-.table {
-  position: relative;
-  /*top: -50px;*/
-  top: 0px;
-}
-
-.el-range-editor.el-input__inner {
-  width: 220px;
-  padding: 3px 6px;
-}
-
-.rowBottom {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.rowBottom button {
-  float: left;
-  margin-right: 10px;
-}
-
-.wrning {
-  float: right;
-  font-size: 12px;
-}
-
-.rowBottom button.pull-right {
-  float: right;
-}
-
-.gary {
-  color: #8c939d;
-}
+    @import "../assets/css/panel.css";
+
+    em {
+        font-style: normal;
+    }
+
+    .context {
+        overflow: hidden;
+        height: 770px;
+
+        overflow-y: scroll;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        min-height: 100%;
+        padding: 30px;
+        padding-bottom: 10px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle span {
+        width: 169px;
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        color: #fff;
+        background: #3799FF;
+        border-radius: 250px;
+        font-size: 18px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 30px;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .panel_control .el-input {
+        width: 200px;
+        float: left;
+    }
+
+    .panel_control em {
+        float: left;
+        font-size: 14px;
+        color: #545454;
+        line-height: 45px;
+        margin-right: 10px;
+    }
+
+    .seeTemp {
+        /*position: relative;*/
+        float: right;
+        bottom: 0px;
+        z-index: 222;
+    }
+
+    .table {
+        position: relative;
+        /*top: -50px;*/
+        top: 0px;
+    }
+
+    .el-range-editor.el-input__inner {
+        width: 220px;
+        padding: 3px 6px;
+    }
+
+    .rowBottom {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .rowBottom button {
+        float: left;
+        margin-right: 10px;
+    }
+
+    .wrning {
+        float: right;
+        font-size: 12px;
+    }
+
+    .rowBottom button.pull-right {
+        float: right;
+    }
+
+    .gary {
+        color: #8c939d;
+    }
 </style>

+ 764 - 763
pc/src/views/EditLessonTable.vue

@@ -1,779 +1,780 @@
 <template>
-  <div class="context">
-    <div class="panel">
-      <h5>{{ pageTitle }}</h5>
-    </div>
-    <div class="panel-body">
-      <div class="panel_control">
-        <el-row :gutter="20">
-          <el-col :span="9">
-            <em> <span style="color: red">*</span>课程表模板名称:</em>
-            <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
-          </el-col>
-          <!--                    默认不通用-->
-          <!--        todo-->
-          <!--        <el-button class="seeTemp" @click.native="seeWeekTemp">预览模板</el-button>-->
-          <el-button type="default" class="seeTemp" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
-        </el-row>
-      </div>
-    </div>
-    <br>
-    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
-      <el-tab-pane label="星期一" name="1"></el-tab-pane>
-      <el-tab-pane label="星期二" name="2"></el-tab-pane>
-      <el-tab-pane label="星期三" name="3"></el-tab-pane>
-      <el-tab-pane label="星期四" name="4"></el-tab-pane>
-      <el-tab-pane label="星期五" name="5"></el-tab-pane>
-      <el-tab-pane label="星期六" name="6"></el-tab-pane>
-      <el-tab-pane label="星期天" name="7"></el-tab-pane>
-    </el-tabs>
-
-    <div class="table">
-      <el-table
-          v-for="tab in tabs"
-          :data="tab.tableData"
-          v-if="tab.days == activeName"
-          border
-          is-horizontal-resize
-          :default-sort="{prop: 'date', order: 'descending'}"
-          element-loading-background="rgba(0, 0, 0, 0.8)"
-          class=""
-          @selection-change="handleSelectionChange"
-      >
-        >
-        <el-table-column
-            prop="timeScope"
-            label="时间"
-            width="260px"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-time-picker
-                is-range
-                v-model="scope.row.timeLong"
-                range-separator="至"
-                start-placeholder="开始时间"
-                end-placeholder="结束时间"
-                placeholder="选择时间范围">
-            </el-time-picker>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="ClassId"
-            label="课程"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)">
-              <el-option
-                  v-for="item in panel.options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-              </el-option>
-            </el-select>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="TopLimit"
-            label="预约名额"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-input-number v-model="scope.row.TopLimit" :min="1" :max="9999" label=""></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="ConsumeHour"
-            label="消耗课时"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
-                             label=""></el-input-number>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="Status"
-            label="操作"
-            width="100px"
-            align="center"
-        >
-          <template slot-scope="scope">
-            <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <div class="rowBottom">
-        <el-button type="default" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
-
-        <!--                ID为0是新建,不为0是修改-->
-        <el-button type="primary" class="pull-right" @click="confirmLessonTable"
-                   v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
-        </el-button>
-        <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
-                   v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
-        </el-button>
-        <el-button type="primary" class="pull-right" @click="addRow">新增课程</el-button>
-      </div>
-      <div>
+    <div class="context">
+        <div class="panel">
+            <h5>{{ pageTitle }}</h5>
+        </div>
+        <div class="panel-body">
+            <div class="panel_control">
+                <el-row :gutter="20">
+                    <el-col :span="9">
+                        <em> <span style="color: red">*</span>课程表模板名称:</em>
+                        <el-input v-model="panel.name" placeholder="请输入课程表模板名称"></el-input>
+                    </el-col>
+                    <!--                    默认不通用-->
+                    <!--        todo-->
+                    <!--        <el-button class="seeTemp" @click.native="seeWeekTemp">预览模板</el-button>-->
+                    <el-button type="default" class="seeTemp" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
+                </el-row>
+            </div>
+        </div>
+        <br>
+        <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
+            <el-tab-pane label="星期一" name="1"></el-tab-pane>
+            <el-tab-pane label="星期二" name="2"></el-tab-pane>
+            <el-tab-pane label="星期三" name="3"></el-tab-pane>
+            <el-tab-pane label="星期四" name="4"></el-tab-pane>
+            <el-tab-pane label="星期五" name="5"></el-tab-pane>
+            <el-tab-pane label="星期六" name="6"></el-tab-pane>
+            <el-tab-pane label="星期天" name="7"></el-tab-pane>
+        </el-tabs>
+
+        <div class="table">
+            <el-table
+                    v-for="tab in tabs"
+                    :data="tab.tableData"
+                    v-if="tab.days == activeName"
+                    border
+                    is-horizontal-resize
+                    :default-sort="{prop: 'date', order: 'descending'}"
+                    element-loading-background="rgba(0, 0, 0, 0.8)"
+                    class=""
+                    @selection-change="handleSelectionChange"
+            >
+                >
+                <el-table-column
+                        prop="timeScope"
+                        label="时间1"
+                        width="260px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-time-picker
+                                is-range
+                                v-model="scope.row.timeLong"
+                                range-separator="至"
+                                start-placeholder="开始时间"
+                                end-placeholder="结束时间"
+                                placeholder="选择时间范围"
+                        >
+                        </el-time-picker>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ClassId"
+                        label="课程"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-select v-model="scope.row.ClassId" @change="getRowTop(scope.row)">
+                            <el-option
+                                    v-for="item in panel.options"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="TopLimit"
+                        label="预约名额"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.TopLimit" :min="1" :max="9999" label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ConsumeHour"
+                        label="消耗课时"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-input-number v-model="scope.row.ConsumeHour" :min="0" :max="9999"
+                                         label=""></el-input-number>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                        width="100px"
+                        align="center"
+                >
+                    <template slot-scope="scope">
+                        <el-button type="text" class="red" @click="delRow(scope)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+            <div class="rowBottom">
+                <el-button type="default" @click="$router.push('/lessonTable')">返回课程表模板</el-button>
+
+                <!--                ID为0是新建,不为0是修改-->
+                <el-button type="primary" class="pull-right" @click="confirmLessonTable"
+                           v-if="this.$route.query.id == 0" :disabled="serachBtnStatus">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="confirmEditLessonTable"
+                           v-if="this.$route.query.id != 0" :disabled="serachBtnStatus">提交
+                </el-button>
+                <el-button type="primary" class="pull-right" @click="addRow">新增课程</el-button>
+            </div>
+            <div>
+                <br>
+                <em class="red wrning">
+                    *所有操作提交后生效
+                </em>
+            </div>
+        </div>
         <br>
-        <em class="red wrning">
-          *所有操作提交后生效
-        </em>
-      </div>
+
+
+        <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
+            <div class="dialogTitle">
+                <span>基础功能</span>
+            </div>
+            <div>
+                <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small">确定</el-button>
+                <el-button @click="dialogVisible = false" size="small">取消</el-button>
+            </div>
+        </el-dialog>
+
+        <el-dialog title="预览" :visible.sync="previewShow" width="1200px">
+            <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
+            <div class="dialogFooter">
+                <el-button @click="previewShow = false" size="small">关闭</el-button>
+            </div>
+        </el-dialog>
     </div>
-    <br>
-
-
-    <el-dialog title="增删课程会员" :visible.sync="dialogVisible">
-      <div class="dialogTitle">
-        <span>基础功能</span>
-      </div>
-      <div>
-        <el-transfer filterable v-model="dialogValue" :data="dialogdata"></el-transfer>
-      </div>
-      <div class="dialogFooter">
-        <el-button type="primary" size="small">确定</el-button>
-        <el-button @click="dialogVisible = false" size="small">取消</el-button>
-      </div>
-    </el-dialog>
-
-    <el-dialog title="预览" :visible.sync="previewShow" width="1200px">
-      <preview :preview-date="previewDate" :big-title="BigTitle" :small-title="smallTitle"></preview>
-      <div class="dialogFooter">
-        <el-button @click="previewShow = false" size="small">关闭</el-button>
-      </div>
-    </el-dialog>
-  </div>
 </template>
 
 <script>
-import Global from '../Global.js'
-import preview from '@/components/preview.vue'
-
-import {
-  SttPlanBasicAdd,
-  SttPlanDetailListQuery,
-  SttPlanDetailBatchSave,
-  SttPlanBasicEdit,
-  ClassDetailOne,
-  testTable,
-  testTableLong,
-  testSelect, ClassListQuery, SttPlanPreview
-} from "../api/getApiRes";
-
-let qs = require('qs');
-export default {
-  data() {
-    return {
-      previewShow: false,
-      previewDate: {},
-      BigTitle: '',
-      smallTitle: '',
-      pageTitle: '新增课程表模板',
-      dialogVisible: false,
-      dialogdata: [],
-      dialogValue: [],
-      temId: '',
-      activeName: '1',
-      tableData: [],
-      // panel 配置项目
-      panel: {
-        name: '',
-        usercode: '',
-        username: '',
-        compname: '',
-        keyword: '',
-        USERCODE: '',
-        taskstatus: 99,
-        draw: 1,
-        start: 0,
-        recordsTotal: 0,
-        tableData: [],
-        allTableData: [],
-        limit: '10',
-        multipleSort: false,
-        loading: false,
-        fileList: [],
-        multipleSelection: [],
-        detectedmac: '',
-        options: [],
-        time1: globalBt(),
-      },
-      multipleSelection: [],
-      pageination: {
-        pageItem: 100,
-        pageoptions: pageOptions(),
-        total: 100,
-        pageIndex: 1,
-      },
-      testRow: {
-        timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 9, 40)],
-        BeginStr: '08:30',
-        EndStr: '09:30',
-        ClassId: '',
-        TopLimit: 1,
-        ConsumeHour: 0,
-      },
-      tabs: [
-        {
-          tableData: [], days: '1'
-        },
-        {
-          tableData: [], days: '2'
-        },
-        {
-          tableData: [], days: '3'
-        },
-        {
-          tableData: [], days: '4'
-        },
-        {
-          tableData: [], days: '5'
-        },
-        {
-          tableData: [], days: '6'
-        },
-        {
-          tableData: [], days: '7'
-        },
-      ],
-      DataAssemblyRs: [],
-      serachBtnStatus: false,
-    }
-  },
-  mounted() {
-    // 加载课程选项
-    this.panelSelect();
-    if (this.$route.query.id == 0) {
-      this.pageTitle = '新增课程表模板'
-      //  深拷贝赋初始值
-      this.deepValue();
-      this.panel.name = '';
-    } else {
-      this.pageTitle = '编辑课程表模板'
-      // 读取赋值
-      this.getTableQuery();
-    }
-  },
-  methods: {
-    // 加载选项
-    panelSelect() {
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        vipType: '',
-        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.panel.options = turnClassResToOption(json.Rs)
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 选择课程后,获取当前课程的建议上课人数和课时消耗
-    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);
-        }
-      })
-    },
-    confirmEditLessonTable() {
-      let that = this;
-
-      // 按钮倒计时
-      that.serachBtnStatus = true;
-      let totalTime = 2
-      let clock = window.setInterval(() => {
-        totalTime--
-        if (totalTime < 0) {
-          totalTime = 2;
-          that.serachBtnStatus = false;
-        }
-      }, 1000)
-
-      if (!this.panel.name) {
-        this.$message.error('模板名称不能为空');
-        return false
-      }
-      if (this.panel.name.length < 3) {
-        this.$message.error('模板名称不能小于3个字符');
-        return false
-      }
-      if (this.panel.name.length > 20) {
-        this.$message.error('模板名称不能大于20个字符');
-        return false
-      }
-      if (!this.checkData()) {
-        return false
-      }
-      let param = {
-        token: localStorage.token,
-        planId: this.$route.query.id,
-        planName: this.panel.name
-      };
-      let postdata = qs.stringify(param);
-      SttPlanBasicEdit(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          let id = that.$route.query.id
-          // 提交课程内容
-          that.EditLessonTable(id);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 删除
-    delRow(scope) {
-      let delIndex = parseInt(scope.$index)
-      let curIndex = parseInt(this.activeName) - 1;
-      this.tabs[curIndex].tableData.splice(delIndex, 1)
-    },
-    // 提交课程模板
-    confirmLessonTable() {
-      if (!this.panel.name) {
-        this.$message.error('模板名称不能为空');
-        return false
-      }
-      if (this.panel.name.length < 3) {
-        this.$message.error('模板名称不能小于3个字符');
-        return false
-      }
-      if (this.panel.name.length > 20) {
-        this.$message.error('模板名称不能大于20个字符');
-        return false
-      }
-      if (!this.checkData()) {
-        return false
-      }
-      let that = this;
-      let param = {
-        token: localStorage.token,
-        planName: this.panel.name,
-      };
-      let postdata = qs.stringify(param);
-      SttPlanBasicAdd(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.panel.tabId = json.Id;
-          // 提交课程内容
-          that.EditLessonTable(json.Id);
-        } else {
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    // 数据组装
-    DataAssembly() {
-      let thisRow = {};
-      for (let i = 0; i < this.tabs.length; i++) {
-        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-          thisRow = this.tabs[i].tableData[j];
-          thisRow.lessonIndex = parseInt(j);
-          if (planId) {
-            thisRow.PlanId = parseInt(planId);
-          } else {
-            thisRow.PlanId = parseInt(this.$route.query.id);
-          }
-          thisRow.WeekDay = parseInt(i + 1);
-          thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
-          thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
-          this.$delete(thisRow, 'Base');
-          this.$delete(thisRow, 'SpdId');
-          this.DataAssemblyRs.push(thisRow)
-        }
-      }
-    },
-    // 修改课程模板
-    EditLessonTable(planId) {
-      let that = this;
-      // 提交数据
-
-      let planRs = [];
-      let thisRow = {};
-      for (let i = 0; i < this.tabs.length; i++) {
-        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-          thisRow = this.tabs[i].tableData[j];
-          thisRow.lessonIndex = parseInt(j);
-          if (planId) {
-            thisRow.PlanId = parseInt(planId);
-          } else {
-            thisRow.PlanId = parseInt(this.$route.query.id);
-          }
-          thisRow.WeekDay = parseInt(i + 1);
-          thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
-          thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
-          this.$delete(thisRow, 'Base');
-          this.$delete(thisRow, 'SpdId');
-          planRs.push(thisRow)
-        }
-      }
-
-      let res = JSON.stringify(planRs);
-      // 如果传入0就用url里的,如果非0就用传入的
-      // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
-      let param = {
-        token: localStorage.token,
-        // planId: this.$route.query.id,
-        planId: planId,
-        planRs: res,
-      };
-      let postdata = qs.stringify(param);
-      // 得等数组装完才能校验
-      SttPlanDetailBatchSave(postdata).then(res => {
-        let json = res;
-        if (json.Code == 0) {
-          that.$message({
-            showClose: true,
-            message: '课程模板已上传成功!',
-            type: 'success'
-          });
-          this.$router.push({
-            path: '/lessonTable'
-          });
-          // 提交后清掉内存里的课表
-          this.clearTableRAM();
-
-          // this.getTableQuery();
-        } else {
-          // this.$router.push({
-          //   path: '/lessonTable'
-          // });
-          // 提交后清掉内存里的课表
-          // this.clearTableRAM();
-          that.$message.error(json.Memo);
-        }
-      })
-    },
-    clearTableRAM() {
-      this.tabs = [
-        {
-          tableData: [], days: '1'
+    import Global from '../Global.js'
+    import preview from '@/components/preview.vue'
+
+    import {
+        SttPlanBasicAdd,
+        SttPlanDetailListQuery,
+        SttPlanDetailBatchSave,
+        SttPlanBasicEdit,
+        ClassDetailOne,
+        testTable,
+        testTableLong,
+        testSelect, ClassListQuery, SttPlanPreview
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                previewShow: false,
+                previewDate: {},
+                BigTitle: '',
+                smallTitle: '',
+                pageTitle: '新增课程表模板',
+                dialogVisible: false,
+                dialogdata: [],
+                dialogValue: [],
+                temId: '',
+                activeName: '1',
+                tableData: [],
+                // panel 配置项目
+                panel: {
+                    name: '',
+                    usercode: '',
+                    username: '',
+                    compname: '',
+                    keyword: '',
+                    USERCODE: '',
+                    taskstatus: 99,
+                    draw: 1,
+                    start: 0,
+                    recordsTotal: 0,
+                    tableData: [],
+                    allTableData: [],
+                    limit: '10',
+                    multipleSort: false,
+                    loading: false,
+                    fileList: [],
+                    multipleSelection: [],
+                    detectedmac: '',
+                    options: [],
+                    time1: globalBt(),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                testRow: {
+                    timeLong: [new Date(2016, 9, 10, 8, 40), new Date(2016, 9, 10, 23, 59)],
+                    BeginStr: '08:30',
+                    EndStr: '23:59',
+                    ClassId: '',
+                    TopLimit: 1,
+                    ConsumeHour: 0,
+                },
+                tabs: [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ],
+                DataAssemblyRs: [],
+                serachBtnStatus: false,
+            }
         },
-        {
-          tableData: [], days: '2'
+        mounted() {
+            // 加载课程选项
+            this.panelSelect();
+            if (this.$route.query.id == 0) {
+                this.pageTitle = '新增课程表模板'
+                //  深拷贝赋初始值
+                this.deepValue();
+                this.panel.name = '';
+            } else {
+                this.pageTitle = '编辑课程表模板'
+                // 读取赋值
+                this.getTableQuery();
+            }
         },
-        {
-          tableData: [], days: '3'
-        },
-        {
-          tableData: [], days: '4'
-        },
-        {
-          tableData: [], days: '5'
-        },
-        {
-          tableData: [], days: '6'
-        },
-        {
-          tableData: [], days: '7'
-        },
-      ];
-
-    },
-    // 检查数据
-    checkData() {
-      let res = true
-      for (let i = 0; i < this.tabs.length; i++) {
-        for (let j = 0; j < this.tabs[i].tableData.length; j++) {
-          if (!this.tabs[i].tableData[j].ClassId) {
-            let days = numberToWeekdays(i+1);
-            let lessonIndex = j + 1;
-            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交')
-            res =  false
-            break;
-          }
-        }
-      }
-      return res
-    },
-    checkData2() {
-      // 目前报错规则:StbId  WeekDay ClassId 不能为空为 0 BeginStr EndStr 必须是5位数字符串
-      let that = this;
-      this.DataAssembly();
-      let tableDate = this.DataAssemblyRs;
-      console.log(123);
-      tableDate.map(function (item) {
-        if (!item.ClassId) {
-          let days = numberToWeekdays(item.WeekDay);
-          let lessonIndex = parseInt(item.lessonIndex + 1);
-          that.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
-          return false
-        } else {
-          return true
-        }
-      })
-    },
-    // 新增一行
-    addRow() {
-      // 读取当前周几
-      let index = parseInt(this.activeName) - 1;
-      let rows = this.testRow;
-      let res = this.deepClone(rows);
-      this.tabs[index].tableData.push(res);
-    },
-    //  深拷贝赋初始值
-    deepValue() {
-      let that = this;
-      let valus = [
-        this.testRow
-        // {BeginStr: '08:30', EndStr: '09:30', ClassId: 0, TopLimit: 0, ConsumeHour: 0},
-      ];
-      this.tabs.map(function (item) {
-        let res = that.deepClone(valus);
-        item.tableData = res;
-      })
-    },
-    deepClone(obj) {
-      let _obj = JSON.stringify(obj),
-          objClone = JSON.parse(_obj);
-      return objClone
-    },
-    handleClick() {
-    },
-    // 增删会员课程
-    lessonStudenChange() {
-      this.dialogVisible = true
-    },
-    handleSelectionChange(val) {
-      this.multipleSelection = val;
-    },
-    // 页面数据查询
-    getTableQuery() {
-      let that = this;
-      that.loading = true;
-      let param = {
-        token: localStorage.token,
-        planId: this.$route.query.id,//
-      };
-      this.panel.name = this.$route.query.name;
-      let postdata = qs.stringify(param);
-      SttPlanDetailListQuery(postdata).then(res => {
-        let json = res;
-        let Rs = json.Rs
-        let bt = '';
-        let et = '';
-        if (json.Code == 0) {
-          that.loading = false;
-          // 清掉上次的记录
-          for (let i = 0; i < that.tabs.length; i++) {
-            that.tabs[i].tableData = []
-          }
-          if (Rs) {
-            // 遍历分配
-            Rs.map(function (item) {
-              for (let i = 0; i < 7; i++) {
-                if (item.WeekDay == i + 1) {
-                  bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
-                  et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
-                  item.timeLong = [bt, et];
-                  that.tabs[i].tableData.push(item);
+        methods: {
+            // 加载选项
+            panelSelect() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    vipType: '',
+                    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.panel.options = turnClassResToOption(json.Rs)
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 选择课程后,获取当前课程的建议上课人数和课时消耗
+            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);
+                    }
+                })
+            },
+            confirmEditLessonTable() {
+                let that = this;
+
+                // 按钮倒计时
+                that.serachBtnStatus = true;
+                let totalTime = 2;
+                let clock = window.setInterval(() => {
+                    totalTime--;
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000);
+
+                if (!this.panel.name) {
+                    this.$message.error('模板名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('模板名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('模板名称不能大于20个字符');
+                    return false
+                }
+                if (!this.checkData()) {
+                    return false
+                }
+                let param = {
+                    token: localStorage.token,
+                    planId: this.$route.query.id,
+                    planName: this.panel.name
+                };
+                let postdata = qs.stringify(param);
+                SttPlanBasicEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        let id = that.$route.query.id;
+                        // 提交课程内容
+                        that.EditLessonTable(id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 删除
+            delRow(scope) {
+                let delIndex = parseInt(scope.$index)
+                let curIndex = parseInt(this.activeName) - 1;
+                this.tabs[curIndex].tableData.splice(delIndex, 1)
+            },
+            // 提交课程模板
+            confirmLessonTable() {
+                if (!this.panel.name) {
+                    this.$message.error('模板名称不能为空');
+                    return false
+                }
+                if (this.panel.name.length < 3) {
+                    this.$message.error('模板名称不能小于3个字符');
+                    return false
+                }
+                if (this.panel.name.length > 20) {
+                    this.$message.error('模板名称不能大于20个字符');
+                    return false
+                }
+                if (!this.checkData()) {
+                    return false
+                }
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    planName: this.panel.name,
+                };
+                let postdata = qs.stringify(param);
+                SttPlanBasicAdd(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.panel.tabId = json.Id;
+                        // 提交课程内容
+                        that.EditLessonTable(json.Id);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 数据组装
+            DataAssembly() {
+                let thisRow = {};
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        thisRow = this.tabs[i].tableData[j];
+                        thisRow.lessonIndex = parseInt(j);
+                        if (planId) {
+                            thisRow.PlanId = parseInt(planId);
+                        } else {
+                            thisRow.PlanId = parseInt(this.$route.query.id);
+                        }
+                        thisRow.WeekDay = parseInt(i + 1);
+                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        this.$delete(thisRow, 'Base');
+                        this.$delete(thisRow, 'SpdId');
+                        this.DataAssemblyRs.push(thisRow)
+                    }
+                }
+            },
+            // 修改课程模板
+            EditLessonTable(planId) {
+                let that = this;
+                // 提交数据
+
+                let planRs = [];
+                let thisRow = {};
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        thisRow = this.tabs[i].tableData[j];
+                        thisRow.lessonIndex = parseInt(j);
+                        if (planId) {
+                            thisRow.PlanId = parseInt(planId);
+                        } else {
+                            thisRow.PlanId = parseInt(this.$route.query.id);
+                        }
+                        thisRow.WeekDay = parseInt(i + 1);
+                        thisRow.BeginStr = getHoursAndMin(thisRow.timeLong[0]);
+                        thisRow.EndStr = getHoursAndMin(thisRow.timeLong[1]);
+                        this.$delete(thisRow, 'Base');
+                        this.$delete(thisRow, 'SpdId');
+                        planRs.push(thisRow)
+                    }
+                }
 
+                let res = JSON.stringify(planRs);
+                // 如果传入0就用url里的,如果非0就用传入的
+                // let uploadPlanId = planId == 0 ? this.$route.query.id : planId;
+                let param = {
+                    token: localStorage.token,
+                    // planId: this.$route.query.id,
+                    planId: planId,
+                    planRs: res,
+                };
+                let postdata = qs.stringify(param);
+                // 得等数组装完才能校验
+                SttPlanDetailBatchSave(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '课程模板已上传成功!',
+                            type: 'success'
+                        });
+                        this.$router.push({
+                            path: '/lessonTable'
+                        });
+                        // 提交后清掉内存里的课表
+                        this.clearTableRAM();
+
+                        // this.getTableQuery();
+                    } else {
+                        // this.$router.push({
+                        //   path: '/lessonTable'
+                        // });
+                        // 提交后清掉内存里的课表
+                        // this.clearTableRAM();
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            clearTableRAM() {
+                this.tabs = [
+                    {
+                        tableData: [], days: '1'
+                    },
+                    {
+                        tableData: [], days: '2'
+                    },
+                    {
+                        tableData: [], days: '3'
+                    },
+                    {
+                        tableData: [], days: '4'
+                    },
+                    {
+                        tableData: [], days: '5'
+                    },
+                    {
+                        tableData: [], days: '6'
+                    },
+                    {
+                        tableData: [], days: '7'
+                    },
+                ];
+
+            },
+            // 检查数据
+            checkData() {
+                let res = true;
+                for (let i = 0; i < this.tabs.length; i++) {
+                    for (let j = 0; j < this.tabs[i].tableData.length; j++) {
+                        if (!this.tabs[i].tableData[j].ClassId) {
+                            let days = numberToWeekdays(i + 1);
+                            let lessonIndex = j + 1;
+                            this.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
+                            res = false;
+                            break;
+                        }
+                    }
                 }
-              }
-            })
-          } else {
-            that.allTableData = [];
-            that.recordsTotal = 0;
-          }
-        } else {
-          that.$message.error(json.Memo);
+                return res
+            },
+            checkData2() {
+                // 目前报错规则:StbId  WeekDay ClassId 不能为空为 0 BeginStr EndStr 必须是5位数字符串
+                let that = this;
+                this.DataAssembly();
+                let tableDate = this.DataAssemblyRs;
+                console.log(123);
+                tableDate.map(function (item) {
+                    if (!item.ClassId) {
+                        let days = numberToWeekdays(item.WeekDay);
+                        let lessonIndex = parseInt(item.lessonIndex + 1);
+                        that.$message.error(days + '第' + lessonIndex + '节课有课程未选择,请选择后再提交');
+                        return false
+                    } else {
+                        return true
+                    }
+                })
+            },
+            // 新增一行
+            addRow() {
+                // 读取当前周几
+                let index = parseInt(this.activeName) - 1;
+                let rows = this.testRow;
+                let res = this.deepClone(rows);
+                this.tabs[index].tableData.push(res);
+            },
+            //  深拷贝赋初始值
+            deepValue() {
+                let that = this;
+                let valus = [
+                    this.testRow
+                    // {BeginStr: '08:30', EndStr: '09:30', ClassId: 0, TopLimit: 0, ConsumeHour: 0},
+                ];
+                this.tabs.map(function (item) {
+                    let res = that.deepClone(valus);
+                    item.tableData = res;
+                })
+            },
+            deepClone(obj) {
+                let _obj = JSON.stringify(obj),
+                    objClone = JSON.parse(_obj);
+                return objClone
+            },
+            handleClick() {
+            },
+            // 增删会员课程
+            lessonStudenChange() {
+                this.dialogVisible = true
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    planId: this.$route.query.id,//
+                };
+                this.panel.name = this.$route.query.name;
+                let postdata = qs.stringify(param);
+                SttPlanDetailListQuery(postdata).then(res => {
+                    let json = res;
+                    let Rs = json.Rs
+                    let bt = '';
+                    let et = '';
+                    if (json.Code == 0) {
+                        that.loading = false;
+                        // 清掉上次的记录
+                        for (let i = 0; i < that.tabs.length; i++) {
+                            that.tabs[i].tableData = []
+                        }
+                        if (Rs) {
+                            // 遍历分配
+                            Rs.map(function (item) {
+                                for (let i = 0; i < 7; i++) {
+                                    if (item.WeekDay == i + 1) {
+                                        bt = new Date(2016, 9, 10, item.BeginStr.substr(0, 2), item.BeginStr.substr(3, 2));
+                                        et = new Date(2016, 9, 10, item.EndStr.substr(0, 2), item.EndStr.substr(3, 2));
+                                        item.timeLong = [bt, et];
+                                        that.tabs[i].tableData.push(item);
+
+                                    }
+                                }
+                            })
+                        } else {
+                            that.allTableData = [];
+                            that.recordsTotal = 0;
+                        }
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            seeWeekTemp() {
+                // 只看保存过的
+            },
+            // 去重
+            unique(arr) {
+                const res = new Map();
+                return arr.filter((arr) => !res.has(arr.EndStr) && res.set(arr.EndStr, 1))
+            }
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'EditLessonTable') {
+                    this.temId = this.$route.query.id;
+                    this.panelSelect();
+                    if (parseInt(this.temId) == 0) {
+                        this.pageTitle = '新增课程表模板';
+                        this.deepValue();
+                        this.panel.name = '';
+                    } else {
+                        this.pageTitle = '编辑课程表模板';
+                        this.getTableQuery();
+                        console.log(123);
+                    }
+                }
+            },
+        },
+        components: {
+            preview
         }
-      })
-    },
-    seeWeekTemp() {
-      // 只看保存过的
-    },
-    // 去重
-    unique(arr) {
-      const res = new Map();
-      return arr.filter((arr) => !res.has(arr.EndStr) && res.set(arr.EndStr, 1))
     }
-  },
-  watch: {
-    $route(to) {
-      if (to.name == 'EditLessonTable') {
-        this.temId = this.$route.query.id;
-        this.panelSelect();
-        if (parseInt(this.temId) == 0) {
-          this.pageTitle = '新增课程表模板'
-          this.deepValue();
-          this.panel.name = '';
-        } else {
-          this.pageTitle = '编辑课程表模板'
-          this.getTableQuery();
-          console.log(123);
-        }
-      }
-    },
-  },
-  components: {
-    preview
-  }
-}
 </script>
 
 <style scoped>
-@import "../assets/css/panel.css";
-
-em {
-  font-style: normal;
-}
-
-.context {
-  height: 770px;
-
-  overflow-y: scroll;
-
-  display: block;
-  margin: 0 auto;
-  background-color: #fff !important;
-  padding: 30px;
-}
-
-.panel-body {
-  padding: 20px;
-  background: #F0F2F5;
-}
-
-.change {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  padding-top: 10px;
-  padding-bottom: 10px;
-}
-
-.change button {
-  float: left;
-}
-
-.change button.pull-right {
-  float: right;
-}
-
-.dialogTitle {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  color: #000000;
-  font-size: 18px;
-  text-align: center;
-}
-
-.dialogTitle span {
-  width: 169px;
-  height: 40px;
-  line-height: 40px;
-  text-align: center;
-  color: #fff;
-  background: #3799FF;
-  border-radius: 250px;
-  font-size: 18px;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-bottom: 30px;
-}
-
-.dialogTitle em {
-  float: none;
-  font-style: normal;
-  color: #3799FF;
-  margin: 0;
-}
-
-/deep/ .el-transfer-panel__item .el-checkbox__input {
-  left: 40px;
-}
-
-.dialogFooter {
-  width: 90%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.dialogFooter button {
-  float: right;
-  margin-left: 10px;
-}
-
-/deep/ .panel_control .el-input {
-  width: 200px;
-  float: left;
-}
-
-.panel_control em {
-  float: left;
-  font-size: 14px;
-  color: #545454;
-  line-height: 45px;
-  margin-right: 10px;
-}
-
-.seeTemp {
-  /*position: relative;*/
-  float: right;
-  bottom: 0px;
-  z-index: 22;
-  margin-left: 10px;
-}
-
-.table {
-  position: relative;
-  /*top: -50px;*/
-  top: 0px;
-}
-
-.el-range-editor.el-input__inner {
-  width: 220px;
-  padding: 3px 6px;
-}
-
-.rowBottom {
-  width: 100%;
-  overflow: hidden;
-  display: block;
-  margin: 0 auto;
-  margin-top: 10px;
-}
-
-.rowBottom button {
-  float: left;
-  margin-right: 10px;
-}
-
-.wrning {
-  float: right;
-  font-size: 12px;
-}
-
-.rowBottom button.pull-right {
-  float: right;
-}
+    @import "../assets/css/panel.css";
+
+    em {
+        font-style: normal;
+    }
+
+    .context {
+        height: 770px;
+
+        overflow-y: scroll;
+
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle span {
+        width: 169px;
+        height: 40px;
+        line-height: 40px;
+        text-align: center;
+        color: #fff;
+        background: #3799FF;
+        border-radius: 250px;
+        font-size: 18px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-bottom: 30px;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .panel_control .el-input {
+        width: 200px;
+        float: left;
+    }
+
+    .panel_control em {
+        float: left;
+        font-size: 14px;
+        color: #545454;
+        line-height: 45px;
+        margin-right: 10px;
+    }
+
+    .seeTemp {
+        /*position: relative;*/
+        float: right;
+        bottom: 0px;
+        z-index: 22;
+        margin-left: 10px;
+    }
+
+    .table {
+        position: relative;
+        /*top: -50px;*/
+        top: 0px;
+    }
+
+    .el-range-editor.el-input__inner {
+        width: 220px;
+        padding: 3px 6px;
+    }
+
+    .rowBottom {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .rowBottom button {
+        float: left;
+        margin-right: 10px;
+    }
+
+    .wrning {
+        float: right;
+        font-size: 12px;
+    }
+
+    .rowBottom button.pull-right {
+        float: right;
+    }
 </style>

+ 28 - 16
pc/src/views/Member.vue

@@ -209,6 +209,9 @@
                         <el-button class="btn" type="primary" size="mini"
                                    @click="addTake(scope.row)">Take绑定
                         </el-button>
+                        <el-button class="btn relevance" type="default" size="mini"
+                                   @click="goRelevance(scope.row)">关联手机号
+                        </el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -260,9 +263,9 @@
                         <el-form-item label="体重" :required="true">
                             <el-input v-model="form.weight" placeholder="kg" type="number"></el-input>
                         </el-form-item>
-                        <el-form-item label="静态心率" :required="true">
-                            <el-input v-model="form.staticHr " placeholder="请输入" type="number"></el-input>
-                        </el-form-item>
+                        <!--<el-form-item label="静态心率" :required="true">-->
+                        <!--<el-input v-model="form.staticHr " placeholder="请输入" type="number"></el-input>-->
+                        <!--</el-form-item>-->
                         <el-form-item label="性别" :required="true">
                             <el-select v-model="form.sex " placeholder="">
                                 <el-option
@@ -492,6 +495,10 @@
             this.getTableQuery();
         },
         methods: {
+            // 关联手机号跳转
+            goRelevance(row) {
+                this.$router.push({path: '/relevancePhone', query: {userId: row.UserInfo.Id}});
+            },
             // 上传文件到七牛云
             upqiniu(req) {
                 let that = this;
@@ -511,7 +518,7 @@
                     token: localStorage.token,
                 };
                 let postdata = qs.stringify(param);
-                this.axios.post( headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
+                this.axios.post(headapi + 'v1/QiNiu/GetSimpleQiNiuToken', postdata).then(res => {
                     const formdata = new FormData();
                     formdata.append('file', req.file);
                     formdata.append('token', res.data.QiNinToken);
@@ -519,7 +526,7 @@
                     // 获取到凭证之后再将文件上传到七牛云空间
                     this.axios.post(this.domain, formdata, config).then(res => {
                         this.imageUrl = 'http://' + this.qiniuaddr + '/' + res.data.key;
-                        this.form.head =  'http://' + this.qiniuaddr + '/' + keyname;
+                        this.form.head = 'http://' + this.qiniuaddr + '/' + keyname;
                     })
                 })
             },
@@ -602,7 +609,7 @@
                 this.imageUrl = row.UserInfo.Head;
                 this.form.height = row.UserInfo.Height;
                 this.form.weight = parseInt(row.UserInfo.Weight) / 10;
-                this.form.staticHr = row.UserInfo.StaticHr;
+                // this.form.staticHr = row.UserInfo.StaticHr;
                 this.form.sex = row.UserInfo.Sex;
                 this.form.birthday = row.UserInfo.Birthday;
                 this.form.ubId = row.UserInfo.UbId;
@@ -802,10 +809,10 @@
                     this.$message.error('错了哦,体重不能为空');
                     return false
                 }
-                if (!that.form.staticHr) {
-                    this.$message.error('错了哦,静态心率不能为空');
-                    return false
-                }
+                // if (!that.form.staticHr) {
+                //     this.$message.error('错了哦,静态心率不能为空');
+                //     return false
+                // }
                 if (!that.form.birthday) {
                     this.$message.error('错了哦,出生年份不能为空');
                     return false
@@ -829,7 +836,7 @@
                     memo: that.form.memo,
                     height: that.form.height,
                     weight: that.form.weight,
-                    staticHr: that.form.staticHr,
+                    // staticHr: that.form.staticHr,
                     sex: that.form.sex,
                     head: that.form.head,
                     birthday: nonTfmtDatetoLength(that.form.birthday, 10),
@@ -886,10 +893,10 @@
                     this.$message.error('错了哦,体重不能为空');
                     return false
                 }
-                if (!that.form.staticHr) {
-                    this.$message.error('错了哦,静态心率不能为空');
-                    return false
-                }
+                // if (!that.form.staticHr) {
+                //     this.$message.error('错了哦,静态心率不能为空');
+                //     return false
+                // }
                 if (!that.form.birthday) {
                     this.$message.error('错了哦,出生年份不能为空');
                     return false
@@ -903,7 +910,7 @@
                     head: that.form.head,
                     height: that.form.height,
                     weight: that.form.weight,
-                    staticHr: that.form.staticHr,
+                    // staticHr: that.form.staticHr,
                     sex: that.form.sex,
                     birthday: nonTfmtDatetoLength(that.form.birthday, 10),
                     ubId: that.form.ubId
@@ -1405,9 +1412,14 @@
         display: block;
         margin: 0 auto;
     }
+
     /deep/ .el-upload img {
         width: 70px;
         height: 70px;
         float: left;
     }
+
+    .relevance {
+        margin-top: 10px;
+    }
 </style>

+ 13 - 0
pc/src/views/classInfoDetail.vue

@@ -54,6 +54,7 @@
                         sortable
                 >
                 </el-table-column>
+
                 <el-table-column
                         prop="Cle"
                         label="卡路里"
@@ -103,6 +104,18 @@
                         <span v-if="scope.row.Sex == 2">女</span>
                     </template>
                 </el-table-column>
+                <el-table-column
+                        prop="GroupNo"
+                        label="队伍"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.GroupNo == 0">不分组</span>
+                        <span v-if="scope.row.GroupNo == 1" style="color: red">红队</span>
+                        <span v-if="scope.row.GroupNo == 2" style="color: blue">蓝队</span>
+                        <span v-if="scope.row.GroupNo == 3" style="color: goldenrod">黄队</span>
+                    </template>
+                </el-table-column>
             </el-table>
             <br>
             <el-pagination

+ 69 - 9
pc/src/views/courseEdit.vue

@@ -111,6 +111,27 @@
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="group_no"
+                        label="队伍"
+                        width="140"
+                        v-if="ClassType == 2"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <el-select v-model="scope.row.group_no"
+                                   filterable
+                                   :disabled="FinishClass == 2 && scope.row.DpId != 0"
+                                   placeholder="请选团队">
+                            <el-option
+                                    v-for="item in panel.groupList"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value">
+                            </el-option>
+                        </el-select>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="BindId"
                         label="心率带"
@@ -124,7 +145,7 @@
                                    v-if="!scope.row.BindId" placeholder="请选心率带">
                             <el-option
                                     v-for="item in panel.bindList"
-                                    :key="item.HrId"
+                                    :key="item.index"
                                     :label="item.label"
                                     :value="item.HrId">
                             </el-option>
@@ -243,6 +264,8 @@
                 serachBtnStatus: false,
                 tableData: [],
                 title: '',
+                ClassType: 0,
+                PkNum: 0,
                 ClassStateText: '',
                 FinishClass: 0,//当前上课状态 1已下课 2已上课 3准备上课 FinishClass
                 dialogVisible: false,//添加下课会员
@@ -282,9 +305,15 @@
                             value: 0,
                             HrId: 0,
                             label: "请选择心率带",
-                            InVenueNo: 0
+                            InVenueNo: 0,
+                            index: 0
                         }
                     ],
+                    groupList: [
+                        {label: '红队', value: 1},
+                        {label: '蓝队', value: 2},
+                        {label: '黄队', value: 3}
+                    ],
                     multipleSelection: [],
                     detectedmac: '',
                     BeginTime: '',
@@ -333,6 +362,9 @@
         mounted() {
             this.getTableQuery();
             // this.getSelectHrSensors();
+            this.ClassType = this.$route.query.ClassType;
+            this.PkNum = this.$route.query.PkNum;
+
             this.FinishClass = this.$route.query.FinishClass;
             this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
         },
@@ -518,15 +550,13 @@
                     }
                 });
 
-                console.log(curPeolle);
-
                 // 拼装上课人员信息
                 for (var i = 0; i < curPeolle.length; i++) {
                     row = curPeolle[i];
                     // 过滤预约未到
                     duRs[i] = {
                         sn: row.Sn,
-                        group_no: 0,//0不分队 1蓝队 2红队 3黄队
+                        group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
                         begin_time: begin_time,
                         name: row.Name,
                         head: row.Head,
@@ -536,6 +566,7 @@
                         age: row.Age,
                         user_id: row.UserId,
                         weight: row.Weight,
+                        user_md5: row.UserMd5,
                     }
                 }
                 // 确认上课
@@ -736,6 +767,15 @@
                     if (json.Code == 0) {
                         that.loading = false;
                         if (json.Rs) {
+                            console.log(json.Rs);
+                            // 分队处理
+                            if (that.ClassType == 2) {
+                                that.TurnUnit(json.Rs);
+                            } else {
+                                json.Rs.map(function (item) {
+                                    item.group_no = 0;
+                                })
+                            }
                             that.allTableData = json.Rs;
                             that.recordsTotal = json.Rs.length;
                         } else {
@@ -749,6 +789,23 @@
                     }
                 })
             },
+            // 分队
+            TurnUnit(Rs) {
+                let that = this;
+                // 分拆2队
+                if (that.PkNum == 2) {
+                    Rs.map(function (item, t) {
+                        item.group_no = t % 2 + 1;
+                    })
+                }
+
+                // 分拆3队
+                if (that.PkNum == 3) {
+                    Rs.map(function (item, t) {
+                        item.group_no = t % 3 + 1;
+                    })
+                }
+            },
             // 获取心率带下拉菜单
             getSelectHrSensors(row) {
                 let that = this;
@@ -765,12 +822,11 @@
                         that.loading = false;
                         if (json.Rs) {
                             that.panel.bindList = json.Rs;
-                            console.log(json.Rs);
                             let HrTypeText = "";
                             json.Rs.map(function (item, i) {
-                                console.log(123);
                                 HrTypeText = item.HrType == 1 ? "(私有)" : "";
-                                item.label =  "Sn:" + item.Sn + HrTypeText;
+                                item.label = "Sn:" + item.Sn + HrTypeText;
+                                item.index = i + 1;
                             });
                             that.panel.bindList.push({
                                 value: 0,
@@ -844,7 +900,7 @@
                 // 拼装上课人员信息
                 duRs[0] = {
                     sn: row.Sn,
-                    group_no: 0,//0不分队 1蓝队 2红队 3黄队
+                    group_no: row.group_no,//0不分队 1蓝队 2红队 3黄队
                     begin_time: begin_time,
                     name: row.Name,
                     head: row.Head,
@@ -854,6 +910,7 @@
                     age: row.Age,
                     user_id: row.UserId,
                     weight: row.Weight,
+                    user_md5: row.UserMd5,
                 };
                 duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
                 let that = this;
@@ -883,6 +940,9 @@
                 if (to.name == 'courseEdit') {
                     this.getTableQuery();
                     this.FinishClass = this.$route.query.FinishClass;
+                    this.ClassType = this.$route.query.ClassType;
+                    this.PkNum = this.$route.query.PkNum;
+
                     this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
                 }
             },

+ 60 - 13
pc/src/views/courses.vue

@@ -3,6 +3,10 @@
         <div class="panel">
             <h5>课程管理
             </h5>
+            <div class="likeTab">
+                <el-button type="primary" @click="goType('courses')">当前课程</el-button>
+                <el-button type="" @click="goType('coursesHistory')">历史记录</el-button>
+            </div>
             <div class="panel-body">
                 <div class="panel_control">
                     <el-row :gutter="20">
@@ -79,11 +83,23 @@
                         sortable
                 >
                 </el-table-column>
+                <el-table-column
+                        prop="ClassType"
+                        label="课程类型"
+                        width="110"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.ClassType == 1">团课</span>
+                        <span v-if="scope.row.ClassType == 3">私教</span>
+                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
+                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="FinishClass"
                         label="当前状态"
                         width="110"
-
                         sortable
                 >
                     <template slot-scope="scope">
@@ -121,7 +137,8 @@
                             编辑
                         </el-button>
                         <!--已完成才能看详情-->
-                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
+                        <el-button type="primary" round plain size="mini"
+                                   v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
                                    @click="seeDetail(scope.row)"
                         >
                             详情
@@ -280,7 +297,7 @@
                     dialogValue: [],//穿梭已选
                     ClassTypeOptions: [
                         {value: 1, label: '团课'},
-                        // {value: 2, label: '竞技PK'},
+                        {value: 2, label: '竞技PK'},
                         {value: 3, label: '私教'},
                     ],
                     PKTypeOptions: [
@@ -299,6 +316,9 @@
             this.getTableQuery();
         },
         methods: {
+            goType(url) {
+                this.$router.push({path: '/' + url});
+            },
             // 更改上课区域
             changeShopVenue(row) {
                 this.dialogMemberVisible = true;
@@ -340,11 +360,13 @@
                         this.$router.push({
                             path: '/courseEdit',
                             query: {
-                                StdId:  that.form.StdId,
-                                ClassName:  that.form.ClassName,
-                                BeginStr:  that.form.BeginStr,
-                                EndStr:  that.form.EndStr,
-                                FinishClass:3,
+                                StdId: that.form.StdId,
+                                ClassName: that.form.ClassName,
+                                BeginStr: that.form.BeginStr,
+                                EndStr: that.form.EndStr,
+                                FinishClass: 3,
+                                ClassType: that.form.ClassType,
+                                PkNum: that.form.pkNum,
                             }
                         });
                     } else {
@@ -400,6 +422,8 @@
                         BeginStr: row.BeginStr,
                         EndStr: row.EndStr,
                         FinishClass: row.FinishClass,
+                        ClassType: row.ClassType,
+                        PkNum: row.PkNum,
                     }
                 });
             },
@@ -458,13 +482,15 @@
                 // clear
                 this.form.svList = "";
                 this.form.classType = 1;
-                this.form.pkNum = "";
+                this.form.pkNum = 2;
 
                 this.form.StdId = row.StdId;
-                this.form.ClassName= row.ClassName;
-                this.form.BeginStr= row.BeginStr;
-                this.form.EndStr= row.EndStr;
-                this.form.FinishClass= row.FinishClass;
+                this.form.ClassName = row.ClassName;
+                this.form.BeginStr = row.BeginStr;
+                this.form.EndStr = row.EndStr;
+                this.form.FinishClass = row.FinishClass;
+                this.form.ClassType = row.ClassType;
+                this.form.PkNum = row.PkNum;
 
                 this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
                 this.form.StdId = row.StdId;
@@ -525,6 +551,7 @@
                     tagname: that.panel.tagname,//标签名
                     bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
                     et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
+                    fcStatus: '0,3,2',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
                     start: 1,//
                     tableMax: 9999,//
                 };
@@ -743,4 +770,24 @@
     /deep/ .el-date-editor .el-range-separator {
         line-height: 25px;
     }
+
+    .likeTab {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 0;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 10px;
+    }
+
+    .likeTab button {
+        float: left;
+        border-radius: 0;
+    }
+
+    .likeTab button.pull-right {
+        float: right;
+    }
 </style>

+ 786 - 0
pc/src/views/coursesHistory.vue

@@ -0,0 +1,786 @@
+<template>
+    <div class="context">
+        <div class="panel">
+            <h5>课程管理
+            </h5>
+            <div class="likeTab">
+                <el-button type="" @click="goType('courses')">当前课程</el-button>
+                <el-button type="primary" @click="goType('coursesHistory')">历史记录</el-button>
+            </div>
+            <div class="panel-body">
+                <div class="panel_control">
+                    <el-row :gutter="20">
+                        <el-date-picker
+                                v-model="panel.timeScope"
+                                type="daterange"
+                                range-separator="至"
+                                start-placeholder="开始日期"
+                                end-placeholder="结束日期">
+                        </el-date-picker>
+
+                        <el-col :span="4">
+                            <el-button size="" type="primary" @click="query" :disabled="serachBtnStatus" plain>查询
+                            </el-button>
+                        </el-col>
+                    </el-row>
+                </div>
+            </div>
+        </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"
+            >
+                >
+                <el-table-column
+                        type="index"
+                        label="序号"
+                        align="center"
+
+                        width="50">
+                </el-table-column>
+                <el-table-column
+                        prop="BeginTime"
+                        label="上课时间"
+                        :formatter="filterFmtDate"
+                        width="180"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="ClassName"
+                        label="课程"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span class="lessonSpan"
+                              :style="{background:scope.row.ClassColor}">{{scope.row.ClassName}}</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="ConsumeHour"
+                        label="消耗课时"
+                        width="110"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="OrderNum"
+                        label="实际预约人数"
+                        width="130"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="SvName"
+                        label="区域"
+                        width="110"
+                        sortable
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="ClassType"
+                        label="课程类型"
+                        width="110"
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.ClassType == 1">团课</span>
+                        <span v-if="scope.row.ClassType == 3">私教</span>
+                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 2">两队PK</span>
+                        <span v-if="scope.row.ClassType == 2 && scope.row.PkNum == 3">三队PK</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="FinishClass"
+                        label="当前状态"
+                        width="110"
+
+                        sortable
+                >
+                    <template slot-scope="scope">
+                        <span v-if="scope.row.FinishClass == 0" style="color: red">未上课</span>
+                        <span v-if="scope.row.FinishClass == 1">已下课</span>
+                        <span v-if="scope.row.FinishClass == 2" style="color: yellowgreen">已上课</span>
+                        <span v-if="scope.row.FinishClass == 3">准备上课</span>
+                        <span v-if="scope.row.FinishClass == 4">已完成</span>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                        prop="Status"
+                        label="操作"
+                        width="160"
+
+                >
+                    <template slot-scope="scope">
+                        <!--<el-button type="primary" round size="mini" @click="checkClassOverPrepare(scope.row)">-->
+                        <!--下课-->
+                        <!--</el-button>-->
+                        <el-button type="primary" round size="mini" v-if="scope.row.FinishClass == 0"
+                                   @click="showDialogMemberVisible(scope.row)">
+                            上课
+                        </el-button>
+                        <el-button type="primary" round size="mini"
+                                   v-if="scope.row.FinishClass == 3 || scope.row.FinishClass == 2"
+                                   @click="seeEdit(scope.row)"
+                        >
+                            管理
+                        </el-button>
+                        <!--修改区域 todo-->
+                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 3"
+                                   @click="changeShopVenue(scope.row)"
+                        >
+                            编辑
+                        </el-button>
+                        <!--已完成才能看详情-->
+                        <el-button type="primary" round plain size="mini" v-if="scope.row.FinishClass == 1 || scope.row.FinishClass == 4"
+                                   @click="seeDetail(scope.row)"
+                        >
+                            详情
+                        </el-button>
+
+                    </template>
+                </el-table-column>
+            </el-table>
+            <br>
+            <el-pagination
+                    background
+                    :total="pageination.total"
+                    :page-size="pageination.pageItem"
+                    @current-change="pageChange"
+            ></el-pagination>
+        </div>
+        <el-dialog :title="dialogTitle" :visible.sync="dialogMemberVisible" width="650px">
+            <div class="dialogContent">
+                <h5 class="classNames">{{className}}</h5>
+                <div class="">
+                    <el-form ref="form" :model="form" label-width="160px">
+                        <el-form-item label="区域" :required="true">
+                            <el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
+                                <el-option
+                                        v-for="item in form.svList"
+                                        :key="item.SvId"
+                                        :label="item.Name"
+                                        :value="item.SvId">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="类型" :required="true">
+                            <el-select v-model="form.classType" filterable placeholder="请选择">
+                                <el-option
+                                        v-for="item in form.ClassTypeOptions"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item label="组队方式" v-if="form.classType == 2">
+                            <el-select v-model="form.pkNum" filterable placeholder="请选择">
+                                <el-option
+                                        v-for="item in form.PKTypeOptions"
+                                        :key="item.value"
+                                        :label="item.label"
+                                        :value="item.value">
+                                </el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-form>
+                </div>
+            </div>
+            <div class="dialogFooter">
+                <el-button type="primary" size="small" v-if="form.btnType == 0" @click="getClassStartPrepare()">确定
+                </el-button>
+                <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
+                    确定
+                </el-button>
+                <el-button size="small" @click="dialogMemberVisible = false">取消</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import Global from '../Global.js'
+    import {
+        ClassPreFinishListQuery,
+        ClassOverPrepare,
+        ClassDetailQuery,
+        QueryShopVenue,
+        ClassStartPrepare,
+        DispPlanInfoEdit,
+    } from "../api/getApiRes";
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                dialogMemberVisible: false,
+                serachBtnStatus: false,
+                dialogVisible: false,//其他dialog
+                dialogFinishVisible: false,//确认下课dialog
+                dialogLesson: false,//课时调整
+                dialogGift: false,//赠送课时调整
+                dialogExpTime: false,//有效期调整
+                dialogLessonTable: false,//会员课程
+                dialogTitle: '上课准备',
+                className: '',
+                current: getNowDate(),
+                dialogValue: [],
+                // 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: '',
+                    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(),
+                    timeScope: globalBt2(0),
+                },
+                multipleSelection: [],
+                pageination: {
+                    pageItem: 100,
+                    pageoptions: pageOptions(),
+                    total: 100,
+                    pageIndex: 1,
+                },
+                form: {
+                    name: '',
+                    svId: '',
+                    svName: '',
+                    classType: 1,
+                    userCode: '',
+                    coach: '',
+                    coachOptions: [],
+                    shopId: '',
+                    memberType: 1,
+                    lesson: 1,
+                    gift: 1,
+                    pktype: 1,
+                    pkNum: 2,
+                    btnType: 0,//0新建,1编辑
+                    memo: '',
+                    expTime: '',
+                    StdId: '',
+                    svList: [],//区域列表
+                    dialogdata: [],//穿梭待选
+                    dialogValue: [],//穿梭已选
+                    ClassTypeOptions: [
+                        {value: 1, label: '团课'},
+                        // {value: 2, label: '竞技PK'},
+                        {value: 3, label: '私教'},
+                    ],
+                    PKTypeOptions: [
+                        {value: 2, label: '2队PK'},
+                        {value: 3, label: '3队PK'},
+                    ],
+                },
+                memberTypes: [
+                    {value: 1, label: '年会员'},
+                    {value: 2, label: '充值会员'},
+                ],
+                tableData: []
+            }
+        },
+        mounted() {
+            this.getTableQuery();
+        },
+        methods: {
+            goType(url) {
+                this.$router.push({path: '/' + url});
+            },
+            // 更改上课区域
+            changeShopVenue(row) {
+                this.dialogMemberVisible = true;
+                this.form.btnType = 1;//0新建,1编辑
+                // 读取本行信息
+                this.dialogMemberVisible = true;
+                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+                this.form.StdId = row.StdId;
+                this.getQueryShopVenue();
+                this.form.svId = row.SvId;
+                this.form.classType = row.ClassType;
+                this.form.pkNum = row.PkNum;
+            },
+            // 准备上课
+            getClassStartPrepare() {
+                let that = this;
+                if (!that.form.svId) {
+                    that.$message.error('上课区域不能为空');
+                    return false
+                }
+                // 不是竞技pk的时候为0
+                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+
+                let param = {
+                    token: localStorage.token,
+                    stdId: that.form.StdId,
+                    svId: that.form.svId,
+                    svName: that.form.svName,
+                    classType: that.form.classType,
+                    pkNum: uppkNum,
+                };
+                let postdata = qs.stringify(param);
+                ClassStartPrepare(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // NewId: 0
+                        that.dialogMemberVisible = false;
+                        this.getTableQuery();
+                        this.$router.push({
+                            path: '/courseEdit',
+                            query: {
+                                StdId:  that.form.StdId,
+                                ClassName:  that.form.ClassName,
+                                BeginStr:  that.form.BeginStr,
+                                EndStr:  that.form.EndStr,
+                                FinishClass:3,
+                            }
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            // 编辑
+            getClassStartPrepareForEdit() {
+                let that = this;
+                if (!that.form.svId) {
+                    that.$message.error('上课区域不能为空');
+                    return false
+                }
+                // 不是竞技pk的时候为0
+                let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
+
+                let param = {
+                    token: localStorage.token,
+                    stdId: that.form.StdId,
+                    svId: that.form.svId,
+                    svName: that.form.svName,
+                    classType: that.form.classType,
+                    pkNum: uppkNum,
+                };
+                let postdata = qs.stringify(param);
+                DispPlanInfoEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // NewId: 0
+                        that.dialogMemberVisible = false;
+                        this.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            seeDetail(row) {
+                this.$router.push({
+                    path: '/classInfoDetail', query: {
+                        StdId: row.StdId,
+                        ClassName: row.ClassName,
+                        BeginStr: row.BeginStr,
+                        EndStr: row.EndStr,
+                    }
+                });
+            },
+            seeEdit(row) {
+                this.$router.push({
+                    path: '/courseEdit', query: {
+                        StdId: row.StdId,
+                        ClassName: row.ClassName,
+                        BeginStr: row.BeginStr,
+                        EndStr: row.EndStr,
+                        FinishClass: row.FinishClass,
+                    }
+                });
+            },
+            // 获取select的label
+            changeLocationValue(val) {
+                //locations是v-for里面的也是datas里面的值
+                let obj = {};
+                obj = this.form.svList.find((item) => {
+                    return item.SvId === val;
+                });
+                this.form.svName = obj.Name;
+            },
+            // 获取区域列表
+            getQueryShopVenue() {
+                let that = this;
+                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.form.svList = json.Rs;
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            vipSelect(stdId) {
+                let that = this;
+                // 筛选相同的stdid的classId
+                that.form.stdList.map(function (item) {
+                    if (item.value == stdId) {
+                        let param = {
+                            token: localStorage.token,
+                            // classId: item.classId
+                        };
+                        let postdata = qs.stringify(param);
+                        // VipUserListQuery
+                        VipUserSimpleQuery(postdata).then(res => {
+                            let json = res;
+                            if (json.Code == 0) {
+                                that.form.userId = '';
+                                that.form.userList = turnResToOptionBySimViper(json.Rs);
+                            } else {
+                                that.$message.error(json.Memo);
+                            }
+                        })
+                    }
+                })
+            },
+            showDialogMemberVisible(row) {
+                this.dialogMemberVisible = true;
+                this.form.btnType = 0;//0新建,1编辑编辑
+                // clear
+                this.form.svList = "";
+                this.form.classType = 1;
+                this.form.pkNum = "";
+
+                this.form.StdId = row.StdId;
+                this.form.ClassName= row.ClassName;
+                this.form.BeginStr= row.BeginStr;
+                this.form.EndStr= row.EndStr;
+                this.form.FinishClass= row.FinishClass;
+
+                this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
+                this.form.StdId = row.StdId;
+                this.getQueryShopVenue();
+            },
+            // 检测当前课是否处于可改变状态
+            // 固定下当前已预约人数列表
+            checkClassOverPrepare(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    stdId: row.StdId,
+                };
+                let postdata = qs.stringify(param);
+                ClassOverPrepare(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.goFinish(row);
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            goFinish(row) {
+                this.$router.push({
+                    path: '/finishDetail', query: {
+                        id: row.StdId,
+                        classId: row.ClassId,
+                        ClassName: row.ClassName,
+                        BeginTime: row.BeginTime,
+                    }
+                });
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 查询按钮
+            query() {
+                let that = this;
+                that.serachBtnStatus = true;
+                let totalTime = 2;
+                let clock = window.setInterval(() => {
+                    totalTime--;
+                    if (totalTime < 0) {
+                        totalTime = 2;
+                        that.serachBtnStatus = false;
+                    }
+                }, 1000);
+                this.getTableQuery();
+                this.$message.success('查询完毕');
+            },
+            // 页面数据查询
+            getTableQuery() {
+                let that = this;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    tagname: that.panel.tagname,//标签名
+                    bt: nonTfmtDatetoLength(that.panel.timeScope[0], 10) + " 00:00:00",
+                    et: nonTfmtDatetoLength(that.panel.timeScope[1], 10) + " 23:59:59",
+                    fcStatus: '1,4',//状态字符串,空是全部 或 0,3,2 是待上课 或 1,4 已下课
+                    start: 1,//
+                    tableMax: 9999,//
+                };
+                let postdata = qs.stringify(param);
+                ClassDetailQuery(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();
+            },
+            // 过滤时间
+            filterFmtDate(value, row, column) {
+                let that = this;
+                return nonTfmtDate(column, 11);
+            },
+        },
+        watch: {
+            $route(to) {
+                if (to.name == 'courses') {
+                    this.getTableQuery();
+                }
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        height: 770px;
+        overflow-y: scroll;
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    .dialogContent {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .dialogContent .pull-left {
+        width: 30%;
+        float: left;
+    }
+
+    .dialogContent .pull-right {
+        width: 70%;
+        float: right;
+    }
+
+    .blueTitle {
+        width: 200px;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+        margin-bottom: 40px;
+        background: #F0F2F5;
+        border-radius: 19px;
+        text-align: center;
+        color: #3799FF;
+        font-size: 16px;
+        padding: 5px 24px;
+    }
+
+    .current {
+        width: 158px;
+        height: 23px;
+        /*float: left;*/
+        border-radius: 250px;
+        text-align: center;
+        background: #F0F2F5;
+        color: #545454;
+        font-size: 14px;
+        padding: 3px 10px;
+        margin-left: 20px;
+    }
+
+    .lessonSpan {
+        width: 78px;
+        height: 22px;
+        border-radius: 11px;
+        margin-right: 5px;
+        float: left;
+        margin-bottom: 3px;
+        text-align: center;
+        color: #000;
+        font-size: 12px;
+    }
+
+    .classNames {
+        width: 211px;
+        height: 25px;
+        background: #f0f2f5;
+        font-family: "Source Han Sans CN";
+        font-weight: normal;
+        font-size: 16px;
+        color: #3799ff;
+        border-radius: 250px;
+        text-align: center;
+        margin: 0 auto;
+        margin-bottom: 10px;
+    }
+
+    /deep/ .el-date-editor .el-range-separator {
+        line-height: 25px;
+    }
+    .likeTab {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 0;
+        border-bottom: 1px solid #ccc;
+        margin-bottom: 10px;
+    }
+
+    .likeTab button {
+        float: left;
+        border-radius: 0;
+    }
+
+    .likeTab button.pull-right {
+        float: right;
+    }
+</style>

+ 60 - 22
pc/src/views/region.vue

@@ -6,7 +6,7 @@
         <div class="change">
             <el-button @click="addMember" type="primary">新增区域</el-button>
             <el-button @click="editList">编辑区域</el-button>
-            <el-button @click="delList" type="danger">删除区域</el-button>
+            <!--<el-button @click="delList" type="danger">删除区域</el-button>-->
         </div>
         <div class="table">
             <el-table
@@ -41,33 +41,35 @@
                         :formatter="filterFmtDate"
                         width="180">
                 </el-table-column>
-                <el-table-column
-                        prop="Status"
-                        label="状态"
-                        width="180">
-                    <!--1:启用,8:暂停,9:删除-->
-                    <template slot-scope="scope">
-                        <span v-if="scope.row.Status == 1" style="color: rgb(103, 194, 58)">已启用</span>
-                        <span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>
-                        <span v-if="scope.row.Status == 9" style="color: red">已删除</span>
-                    </template>
-
-                </el-table-column>
+                <!--<el-table-column-->
+                        <!--prop="Status"-->
+                        <!--label="状态"-->
+                        <!--width="180">-->
+                    <!--&lt;!&ndash;1:启用,8:暂停,9:删除&ndash;&gt;-->
+                    <!--<template slot-scope="scope">-->
+                        <!--<span v-if="scope.row.Status == 1" style="color: rgb(103, 194, 58)">已启用</span>-->
+                        <!--<span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>-->
+                        <!--<span v-if="scope.row.Status == 9" style="color: red">已删除</span>-->
+                    <!--</template>-->
+                <!--</el-table-column>-->
                 <el-table-column
                         prop="id"
                         label="操作"
                 >
                     <template slot-scope="scope">
-                        <el-button type="success" v-if="scope.row.Status == 8" size="mini"
-                                   @click="pauseRow(scope.row,1)">
-                            启用
+                        <!--<el-button type="success" v-if="scope.row.Status == 8" size="mini"-->
+                                   <!--@click="pauseRow(scope.row,1)">-->
+                            <!--启用-->
+                        <!--</el-button>-->
+                        <!--<el-button type="warning" v-if="scope.row.Status == 1" size="mini"-->
+                                   <!--@click="pauseRow(scope.row,8)">-->
+                            <!--暂停-->
+                        <!--</el-button>-->
+                        <el-button type="danger"  size="mini"
+                                   @click="pauseRowDel(scope.row)">
+                            删除
                         </el-button>
-                        <el-button type="warning" v-if="scope.row.Status == 1" size="mini"
-                                   @click="pauseRow(scope.row,8)">
-                            暂停
-                        </el-button>
-
-                        <el-button type="text" @click="goPage(scope.row)">所属设备</el-button>
+                        <el-button type="text" @click="goPage(scope.row)">设备管理</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -225,6 +227,42 @@
             //         });
             //     });
             // },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+                let param = {
+                    key: localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: row.SvId,
+                    status: 9,// 1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+                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: '已取消删除'
+                    });
+                });
+            },
             // 禁用
             pauseRow(row, status) {
                 let that = this;

+ 648 - 0
pc/src/views/relevancePhone.vue

@@ -0,0 +1,648 @@
+<template>
+    <div class="context">
+        <el-page-header @back="goBack" content="关联手机号"></el-page-header>
+        <div class="panel">
+            <br>
+            <h5> {{regionName}}</h5>
+        </div>
+        <div class="change">
+            <el-button @click="addMember" type="primary">新增手机号</el-button>
+            <el-button @click="editList">编辑手机号</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="UserPhone"
+                        label="手机号"
+                >
+                </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="Memo"
+                        label="备注"
+                >
+                </el-table-column>
+                <el-table-column
+                        prop="UserPhone"
+                        label="操作">
+                    <template slot-scope="scope">
+                        <el-button type="danger" size="mini"
+                                   @click="pauseRowDel(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.phone"></el-input>
+                        </el-form-item>
+                        <el-form-item label="备注">
+                            <el-input v-model="form.memo"></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,
+        ShopManagerStatusEdit,
+        VipUserAssociatedPhoneSimpleQuery,
+        VipUserAssociatedPhoneAdd,
+        EditShopVenueEquip,
+        VipUserAssociatedPhoneEdit,
+        VipUserAssociatedPhoneStatusEdit
+    } from "../api/getApiRes";
+
+    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: {
+                    phone: '',
+                    memo: '',
+                    eqId: '',
+                    eqSn: '',
+                    name: '',
+                    version: '',
+                    userCode: '',
+                    shopId: '',
+                    pId: '',
+                    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: '/member', query: {}
+                });
+            },
+            // 删除
+            pauseRowDel(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    userId: this.$route.query.userId,
+                    pId: row.PId,
+                    status: 9,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+                this.$confirm('此操作将永久删除该手机号, 是否继续?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    VipUserAssociatedPhoneStatusEdit(postdata).then(res => {
+                        let json = res;
+                        if (json.Code == 0) {
+                            that.$message({
+                                showClose: true,
+                                message: '选中的手机号已删除!',
+                                type: 'success'
+                            });
+                            // 重载列表
+                            that.getTableQuery();
+                        } else {
+                            that.$message.error(json.Memo);
+                        }
+                    });
+                }).catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: '已取消删除'
+                    });
+                });
+            },
+            clearForm() {
+                // clear
+                this.form.name = '';
+                this.form.phone = '';
+                this.form.memo = '';
+                this.form.userCode = '';
+                this.form.shopId = '';
+                this.form.eqSn = '';
+                this.form.version = '';
+                this.form.pId = '';
+                this.form.equipType = 1;
+            },
+            handleSelectionChange(val) {
+                this.multipleSelection = val;
+            },
+            // 新增手机号
+            addMember() {
+                this.clearForm();
+                this.dialogMemberVisible = true;
+                this.form.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 = {
+                    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(() => {
+                    VipUserAssociatedPhoneStatusEdit(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.phone = row.UserPhone;
+                this.form.userCode = row.Usercode;
+                this.form.pId = row.PId;
+                this.form.password = '';
+                this.form.eqId = row.EqId;
+                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;
+
+                if (!that.form.phone) {
+                    this.$message.error('错了哦,手机号码不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.phone)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+
+                let param = {
+                    token: localStorage.token,
+                    userId: this.$route.query.userId,
+                    phone: this.form.phone,
+                    memo: this.form.memo,
+                };
+                let postdata = qs.stringify(param);
+                VipUserAssociatedPhoneAdd(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.phone) {
+                    this.$message.error('错了哦,手机号码不能为空');
+                    return false
+                }
+                if (!globalCheckPhone(that.form.phone)) {
+                    this.$message.error('错了哦,手机号格式不正确');
+                    return false
+                }
+                if (that.form.memo) {
+                    if (that.form.memo.length > 200) {
+                        this.$message.error('错了哦,备注字数超过200个字');
+                        return false
+                    }
+                }
+                let param = {
+                    token: localStorage.token,
+                    userId: this.$route.query.userId,
+                    phone: this.form.phone,
+                    memo: this.form.memo,
+                    pId: this.form.pId,
+                };
+                let postdata = qs.stringify(param);
+                VipUserAssociatedPhoneEdit(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;
+                that.loading = true;
+                let param = {
+                    token: localStorage.token,
+                    userId: this.$route.query.userId,
+                };
+                let postdata = qs.stringify(param);
+                VipUserAssociatedPhoneSimpleQuery(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);
+                    VipUserAssociatedPhoneStatusEdit(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);
+                    VipUserAssociatedPhoneStatusEdit(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 == 'relevancePhone') {
+                    this.getTableQuery();
+                }
+            },
+        },
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/panel.css";
+
+    .context {
+        height: 770px;
+        overflow-y: scroll;
+
+        display: block;
+        margin: 0 auto;
+        background-color: #fff !important;
+        padding: 30px;
+        padding-bottom: 60px;
+    }
+
+    .panel-body {
+        padding: 20px;
+        background: #F0F2F5;
+    }
+
+    .change {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        padding-top: 10px;
+        padding-bottom: 10px;
+    }
+
+    .change button {
+        float: left;
+    }
+
+    .change button.pull-right {
+        float: right;
+    }
+
+    .dialogTitle {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        color: #000000;
+        font-size: 18px;
+        text-align: center;
+    }
+
+    .dialogTitle em {
+        float: none;
+        font-style: normal;
+        color: #3799FF;
+        margin: 0;
+    }
+
+    /deep/ .el-transfer-panel__item .el-checkbox__input {
+        left: 40px;
+    }
+
+    .dialogFooter {
+        width: 90%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 10px;
+    }
+
+    .dialogFooter button {
+        float: right;
+        margin-left: 10px;
+    }
+
+    /deep/ .el-date-editor .el-range__icon {
+        line-height: 22px;
+    }
+
+    .panel /deep/ .el-date-editor .el-range-separator {
+        line-height: 22px;
+    }
+
+    /deep/ .el-select {
+        width: 100%;
+    }
+
+    .panel h5 {
+        font-size: 24px;
+    }
+
+    /*ipad only*/
+    @media only screen and (max-width: 1366px) {
+        .panel /deep/ .el-date-editor--daterange {
+            width: 100%;
+        }
+    }
+
+</style>

+ 260 - 237
tv/.idea/workspace.xml

@@ -22,20 +22,38 @@
     <select />
   </component>
   <component name="ChangeListManager">
-    <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="测试翻页问题">
-      <change beforePath="$PROJECT_DIR$/../pc/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/Global.js" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/views/appoint.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/appoint.vue" afterDir="false" />
+    <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/../pc/src/views/coursesHistory.vue" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/../pc/src/views/relevancePhone.vue" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/2pkRank/2pkTitle.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/2pkRank/blueMvp.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/2pkRank/flag.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/2pkRank/king.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/2pkRank/redMvp.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/pk/blueFlag.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/pk/blueGood.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/pk/redFlag.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/pk/redGood.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/img/pk/vs.svg" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/assets/pk.png" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/views/2pkRank.vue" 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/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/router/index.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/EditLessonManage.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/EditLessonManage.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/EditLessonTable.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/EditLessonTable.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/classInfoDetail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/classInfoDetail.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courseEdit.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/courses.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/courses.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartEquip.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartEquipPerson.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartEquipPerson.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/heartLog.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/region.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/region.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/main.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/main.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/router/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/src/router/index.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/Index.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Index.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Main.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/views/Rank.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Rank.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/src/views/Wait.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/Wait.vue" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/src/views/test.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/test.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/src/views/pk.vue" beforeDir="false" afterPath="$PROJECT_DIR$/src/views/pk.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/vue.config.js" beforeDir="false" afterPath="$PROJECT_DIR$/vue.config.js" afterDir="false" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
     <ignored path="$PROJECT_DIR$/temp/" />
@@ -48,97 +66,50 @@
     <option name="LAST_RESOLUTION" value="IGNORE" />
   </component>
   <component name="FileEditorManager">
-    <splitter split-orientation="horizontal" split-proportion="0.689334">
-      <split-first>
-        <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
-          <file pinned="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="374">
-                  <caret line="397" selection-start-line="397" selection-end-line="397" />
-                  <folding>
-                    <element signature="e#5086#5130#0" expanded="true" />
-                    <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
-                    <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
-                  </folding>
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file pinned="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="105">
-                  <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
-                  <folding>
-                    <element signature="n#li#0;n#el-col#1;n#el-row#0;n#div#0;n#div#0;n#template#0;n#!!top" />
-                  </folding>
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file pinned="false" current-in-tab="true">
-            <entry file="file://$PROJECT_DIR$/src/main.js">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="294">
-                  <caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
-                  <folding>
-                    <element signature="e#0#21#0" expanded="true" />
-                    <element signature="e#136#171#0" expanded="true" />
-                  </folding>
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file pinned="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="294">
-                  <caret line="54" lean-forward="true" selection-start-line="54" selection-end-line="54" />
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file pinned="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/Global.js">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="231">
-                  <caret line="11" column="12" lean-forward="true" selection-start-line="11" selection-start-column="12" selection-end-line="11" selection-end-column="12" />
-                </state>
-              </provider>
-            </entry>
-          </file>
-          <file pinned="false" current-in-tab="false">
-            <entry file="file://$PROJECT_DIR$/src/views/test.vue">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="84">
-                  <caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
-                  <folding>
-                    <element signature="e#307#463#0" expanded="true" />
-                  </folding>
-                </state>
-              </provider>
-            </entry>
-          </file>
-        </leaf>
-      </split-first>
-      <split-second>
-        <leaf>
-          <file pinned="false" current-in-tab="true">
-            <entry file="file://$PROJECT_DIR$/src/views/test.vue">
-              <provider selected="true" editor-type-id="text-editor">
-                <state relative-caret-position="84">
-                  <caret line="4" column="52" selection-start-line="4" selection-start-column="52" selection-end-line="4" selection-end-column="52" />
-                  <folding>
-                    <element signature="e#303#459#0" expanded="true" />
-                  </folding>
-                </state>
-              </provider>
-            </entry>
-          </file>
-        </leaf>
-      </split-second>
-    </splitter>
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="-3150">
+              <caret line="18" selection-start-line="18" selection-end-line="18" />
+              <folding>
+                <element signature="e#5267#5311#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/views/pk.vue">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="462">
+              <caret line="369" column="30" lean-forward="true" selection-start-line="369" selection-start-column="30" selection-end-line="369" selection-end-column="30" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/router/index.js">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="282">
+              <caret line="73" column="49" selection-start-line="73" selection-start-column="49" selection-end-line="73" selection-end-column="49" />
+              <folding>
+                <element signature="e#0#21#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="-714">
+              <caret line="5" selection-start-line="5" selection-end-line="5" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
     <option name="RECENT_TEMPLATES">
@@ -152,36 +123,36 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>bottom</find>
-      <find>fmtNum</find>
-      <find>console.log(&quot;ClassOn:&quot; + json.ClassOn);</find>
-      <find>el-fade-in-linear</find>
-      <find>.title</find>
-      <find>recordMain h5</find>
-      <find>loca</find>
-      <find>getClassUserRank</find>
-      <find>千卡</find>
+      <find>record</find>
+      <find>head</find>
+      <find>redUnite</find>
+      <find>blueUnite</find>
+      <find>fakeNews</find>
+      <find>lp_icon</find>
+      <find>redSum</find>
+      <find>Bluestudents</find>
+      <find>two</find>
+      <find>RedstudentsClassName</find>
+      <find>giveClassName</find>
+      <find>four</find>
+      <find>creat</find>
+      <find>watc</find>
       <find>ClassStatQuery</find>
-      <find>curgetClassStat</find>
-      <find>xiakele</find>
-      <find>centerLi</find>
-      <find>.three .topLi</find>
-      <find>.max</find>
-      <find>egg</find>
-      <find>/bpi</find>
-      <find>110</find>
-      <find>createEgg</find>
-      <find>http://192.168.0.3:19096</find>
+      <find>CalcTeamCk</find>
+      <find>pksum</find>
+      <find>pkVal</find>
+      <find>PkTimer</find>
+      <find>ClacClassTime</find>
+      <find>cur</find>
+      <find>2pkRank</find>
       <find>xiakele</find>
+      <find>curgetClassStat</find>
+      <find>trueDate</find>
+      <find>getClassStat</find>
+      <find>that.redSum</find>
       <find>GetgetUserList</find>
-      <find>autoplayStatus</find>
-      <find>test</find>
-      <find>recordMain</find>
-      <find>:autoplay=&quot;autoplayStatus&quot;</find>
-      <find>ClassOn</find>
-      <find>headImg</find>
-      <find>GetCalorieStatsQuery</find>
-      <find>getcurIndex</find>
+      <find>createEgg</find>
+      <find>flyhead</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
@@ -194,6 +165,7 @@
       <replace>rankTimer</replace>
       <replace>el-zoom-in-top</replace>
       <replace>http://cal.beswell.com:85/</replace>
+      <replace>eight</replace>
     </replaceStrings>
     <dirStrings>
       <dir>D:\wwwroot\flyLong\tv\src</dir>
@@ -223,17 +195,18 @@
         <option value="$PROJECT_DIR$/src/components/upimg.vue" />
         <option value="$PROJECT_DIR$/src/api/Navs.js" />
         <option value="$PROJECT_DIR$/src/components/Headside.vue" />
-        <option value="$PROJECT_DIR$/src/views/pk.vue" />
-        <option value="$PROJECT_DIR$/vue.config.js" />
         <option value="$PROJECT_DIR$/src/Global.js" />
         <option value="$PROJECT_DIR$/README.md" />
-        <option value="$PROJECT_DIR$/src/router/index.js" />
-        <option value="$PROJECT_DIR$/src/views/Index.vue" />
-        <option value="$PROJECT_DIR$/src/views/Main.vue" />
         <option value="$PROJECT_DIR$/src/views/test.vue" />
-        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
-        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
         <option value="$PROJECT_DIR$/src/main.js" />
+        <option value="$PROJECT_DIR$/src/views/Index.vue" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
+        <option value="$PROJECT_DIR$/src/views/2pkRank.vue" />
+        <option value="$PROJECT_DIR$/vue.config.js" />
+        <option value="$PROJECT_DIR$/src/router/index.js" />
+        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
+        <option value="$PROJECT_DIR$/src/views/Main.vue" />
+        <option value="$PROJECT_DIR$/src/views/pk.vue" />
       </list>
     </option>
   </component>
@@ -243,10 +216,10 @@
     <other-services-enabled>true</other-services-enabled>
     <auto-save>true</auto-save>
   </component>
-  <component name="ProjectFrameBounds" extendedState="6">
+  <component name="ProjectFrameBounds">
     <option name="x" value="-2568" />
     <option name="y" value="-8" />
-    <option name="width" value="2576" />
+    <option name="width" value="1296" />
     <option name="height" value="1395" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
@@ -259,7 +232,6 @@
       <foldersAlwaysOnTop value="true" />
     </navigator>
     <panes>
-      <pane id="ProjectPane" />
       <pane id="Scope">
         <subPane subId="Scope 'Project Files'; set:Project Files; class com.intellij.psi.search.scope.ProjectFilesScope">
           <expand>
@@ -272,6 +244,33 @@
               <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
               <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
             </path>
+            <path>
+              <item name="tv" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
+              <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="assets" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+            </path>
+            <path>
+              <item name="tv" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
+              <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="assets" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="img" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+            </path>
+            <path>
+              <item name="tv" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
+              <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="assets" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="img" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="pk" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+            </path>
+            <path>
+              <item name="tv" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
+              <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
+              <item name="src" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+              <item name="router" type="9f88c78c:ScopeViewTreeModel$FileNode" />
+            </path>
             <path>
               <item name="tv" type="3d21c010:ScopeViewTreeModel$ProjectNode" />
               <item name="" type="442cc68d:ScopeViewTreeModel$RootNode" />
@@ -282,6 +281,7 @@
           <select />
         </subPane>
       </pane>
+      <pane id="ProjectPane" />
     </panes>
   </component>
   <component name="ProjectViewState">
@@ -310,11 +310,11 @@
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\wwwroot\flyLong\tv\src\assets\img\pk" />
+      <recent name="D:\wwwroot\flyLong\tv\src\assets\img\2pkRank" />
+      <recent name="D:\wwwroot\flyLong\tv\src\views" />
+      <recent name="D:\wwwroot\flyLong\tv\src\assets" />
       <recent name="D:\wwwroot\flyLong\tv\src\static\img\ranks" />
-      <recent name="D:\wwwroot\flyLong\tv\src\api" />
-      <recent name="D:\wwwroot\flyLong\tv\src\static\img\bg" />
-      <recent name="D:\wwwroot\flyLong\tv\src\static\img\people" />
-      <recent name="D:\wwwroot\flyLong\tv\src\static\img\newRecord" />
     </key>
     <key name="MoveFile.RECENT_KEYS">
       <recent name="D:\wwwroot\flyLong\tv\src\static\img\bg" />
@@ -383,7 +383,10 @@
       <workItem from="1605668164423" duration="15041000" />
       <workItem from="1605747566783" duration="13000" />
       <workItem from="1605775278675" duration="48765000" />
-      <workItem from="1606196990553" duration="24154000" />
+      <workItem from="1606196990553" duration="30160000" />
+      <workItem from="1606548245045" duration="12000" />
+      <workItem from="1606548419929" duration="30000" />
+      <workItem from="1606700588181" duration="31851000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -504,31 +507,38 @@
       <option name="project" value="LOCAL" />
       <updated>1606295611593</updated>
     </task>
-    <option name="localTasksCounter" value="18" />
+    <task id="LOCAL-00018" summary="pc part">
+      <created>1606371274632</created>
+      <option name="number" value="00018" />
+      <option name="presentableId" value="LOCAL-00018" />
+      <option name="project" value="LOCAL" />
+      <updated>1606371274632</updated>
+    </task>
+    <option name="localTasksCounter" value="19" />
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="303011000" />
+    <option name="totallyTimeSpent" value="340910000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-2568" y="-8" width="2576" height="1395" extended-state="7" />
+    <frame x="-2568" y="-8" width="1296" height="1395" extended-state="0" />
     <editor active="true" />
     <layout>
-      <window_info content_ui="combo" id="Project" order="0" weight="0.14393939" />
+      <window_info content_ui="combo" id="Project" order="0" weight="0.21498372" />
       <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" />
       <window_info anchor="bottom" id="Message" order="0" />
       <window_info anchor="bottom" id="Find" order="1" weight="0.32687446" />
-      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49920255" weight="0.31508005" />
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49920255" weight="0.2274642" />
       <window_info anchor="bottom" id="Debug" order="3" weight="0.21468298" />
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
       <window_info anchor="bottom" id="TODO" order="6" />
       <window_info anchor="bottom" id="PHP-CGI Server" order="7" />
-      <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.50079745" side_tool="true" weight="0.3319185" />
+      <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.50079745" side_tool="true" weight="0.33108678" />
       <window_info anchor="bottom" id="Version Control" order="9" weight="0.3285594" />
-      <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.17438921" />
+      <window_info anchor="bottom" id="Terminal" order="10" weight="0.17438921" />
       <window_info anchor="bottom" id="Database Changes" order="11" />
       <window_info anchor="bottom" id="TypeScript" order="12" weight="0.3293718" />
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
@@ -597,7 +607,8 @@
     <MESSAGE value="test" />
     <MESSAGE value="升级链接使用正式版" />
     <MESSAGE value="测试翻页问题" />
-    <option name="LAST_COMMIT_MESSAGE" value="测试翻页问题" />
+    <MESSAGE value="pc part" />
+    <option name="LAST_COMMIT_MESSAGE" value="pc part" />
   </component>
   <component name="WindowStateProjectService">
     <state x="-1830" y="274" width="1099" height="859" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1604022799787">
@@ -642,45 +653,6 @@
     <state x="-2342" y="308" width="840" height="1034" key="search.everywhere.popup/0.0.1920.1019/-2560.0.2560.1379@-2560.0.2560.1379" timestamp="1604114774442" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/assets/css/mainBk.css">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1076">
-          <caret line="1196" column="1" selection-start-line="1196" selection-start-column="1" selection-end-line="1196" selection-end-column="1" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/assets/css/mainBk2.css">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="443">
-          <caret line="1286" column="19" lean-forward="true" selection-start-line="1285" selection-start-column="1" selection-end-line="1286" selection-end-column="19" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/babel.config.js">
-      <provider selected="true" editor-type-id="text-editor" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/package.json">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="495">
-          <caret line="25" column="38" lean-forward="true" selection-start-line="25" selection-start-column="38" selection-end-line="25" selection-end-column="38" />
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/fire.png">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/s2.svg">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/s1.svg">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/heart.svg">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/static/img/t6.svg">
-      <provider selected="true" editor-type-id="images" />
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/static/img/blue.svg">
       <provider selected="true" editor-type-id="images" />
     </entry>
@@ -736,13 +708,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/test.html">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="546">
-          <caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/assets/css/main.css">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-630" />
@@ -788,13 +753,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/pk.vue">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="530">
-          <caret line="151" column="10" lean-forward="true" selection-start-line="151" selection-start-column="10" selection-end-line="151" selection-end-column="10" />
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="432">
@@ -815,84 +773,149 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/vue.config.js">
+    <entry file="file://$PROJECT_DIR$/src/main.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="420">
-          <caret line="20" column="17" selection-start-line="20" selection-start-column="13" selection-end-line="20" selection-end-column="17" />
+        <state relative-caret-position="294">
+          <caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
+          <folding>
+            <element signature="e#0#21#0" expanded="true" />
+            <element signature="e#136#171#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/router/index.js">
+    <entry file="file://$PROJECT_DIR$/src/views/test.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1407">
-          <caret line="68" column="31" selection-start-line="68" selection-start-column="31" selection-end-line="68" selection-end-column="31" />
+        <state relative-caret-position="105">
+          <caret line="5" column="31" lean-forward="true" selection-start-line="5" selection-start-column="31" selection-end-line="5" selection-end-column="31" />
           <folding>
-            <element signature="e#0#21#0" expanded="true" />
+            <element signature="e#303#459#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="290">
-          <caret line="387" column="40" selection-start-line="387" selection-start-column="33" selection-end-line="387" selection-end-column="40" />
+        <state relative-caret-position="3129">
+          <caret line="152" column="59" selection-start-line="152" selection-start-column="55" selection-end-line="152" selection-end-column="59" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/Global.js">
+    <entry file="file://$PROJECT_DIR$/test.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="231">
-          <caret line="11" column="12" lean-forward="true" selection-start-line="11" selection-start-column="12" selection-end-line="11" selection-end-column="12" />
+        <state relative-caret-position="546">
+          <caret line="26" column="7" lean-forward="true" selection-start-line="26" selection-start-column="7" selection-end-line="26" selection-end-column="7" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/test.vue">
+    <entry file="file://$PROJECT_DIR$/src/assets/img/2pkRank/flag.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/2pkRank/2pkTitle.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/2pkRank/blueMvp.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/2pkRank/king.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/main/Oval.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/main/member.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/main/lesson.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/main/empty.jpg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/main/appoint.png">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/static/img/s1.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/vue.config.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="84">
-          <caret line="4" column="20" selection-start-line="4" selection-start-column="20" selection-end-line="4" selection-end-column="20" />
-          <folding>
-            <element signature="e#307#463#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="546">
+          <caret line="26" column="59" selection-start-line="26" selection-start-column="59" selection-end-line="26" selection-end-column="59" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/pk/blueFlag.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/pk/redGood.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/pk/redFlag.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/pk/blueGood.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/assets/img/pk/vs.svg">
+      <provider selected="true" editor-type-id="images" />
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/2pkRank.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="380">
+          <caret line="109" column="27" lean-forward="true" selection-start-line="108" selection-start-column="14" selection-end-line="109" selection-end-column="27" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/Global.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="98">
+          <caret line="95" column="13" selection-start-line="95" selection-end-line="95" selection-end-column="13" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="294">
-          <caret line="54" lean-forward="true" selection-start-line="54" selection-end-line="54" />
+        <state relative-caret-position="-714">
+          <caret line="5" selection-start-line="5" selection-end-line="5" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/router/index.js">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="282">
+          <caret line="73" column="49" selection-start-line="73" selection-start-column="49" selection-end-line="73" selection-end-column="49" />
+          <folding>
+            <element signature="e#0#21#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="374">
-          <caret line="397" selection-start-line="397" selection-end-line="397" />
+        <state relative-caret-position="191">
+          <caret line="134" selection-start-line="134" selection-end-line="134" />
           <folding>
-            <element signature="e#5086#5130#0" expanded="true" />
             <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
             <element signature="n#style#0;n#s#0;n#!!top" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="105">
-          <caret line="5" column="14" selection-start-line="5" selection-start-column="14" selection-end-line="5" selection-end-column="14" />
+        <state relative-caret-position="-3150">
+          <caret line="18" selection-start-line="18" selection-end-line="18" />
           <folding>
-            <element signature="n#li#0;n#el-col#1;n#el-row#0;n#div#0;n#div#0;n#template#0;n#!!top" />
+            <element signature="e#5267#5311#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main.js">
+    <entry file="file://$PROJECT_DIR$/src/views/pk.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="294">
-          <caret line="14" column="6" lean-forward="true" selection-start-line="14" selection-start-column="6" selection-end-line="14" selection-end-column="6" />
-          <folding>
-            <element signature="e#0#21#0" expanded="true" />
-            <element signature="e#136#171#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="462">
+          <caret line="369" column="30" lean-forward="true" selection-start-line="369" selection-start-column="30" selection-end-line="369" selection-end-column="30" />
         </state>
       </provider>
     </entry>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 62 - 0
tv/src/assets/img/2pkRank/2pkTitle.svg


Dosya farkı çok büyük olduğundan ihmal edildi
+ 46 - 0
tv/src/assets/img/2pkRank/blueMvp.svg


Dosya farkı çok büyük olduğundan ihmal edildi
+ 3 - 0
tv/src/assets/img/2pkRank/flag.svg


+ 3 - 0
tv/src/assets/img/2pkRank/king.svg

@@ -0,0 +1,3 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="59.917" height="52.921" viewBox="0 0 59.917 52.921">
+  <path id="路径_140" data-name="路径 140" d="M49.127,6.647a2.062,2.062,0,0,1,1.2.331,1.119,1.119,0,0,1,.529.856v.029a.288.288,0,0,1-.013.114L46.866,27.643A1.754,1.754,0,0,1,46.9,27.2a4.212,4.212,0,0,1-3.258,2.985,2.164,2.164,0,0,1,.431-.08c-3.709,1.006-10.9,1.68-19.178,1.644-8.21-.035-15.34-.746-18.946-1.78a2.766,2.766,0,0,1,.451.1,4.1,4.1,0,0,1-3.145-3.028l.015.226L.013,7.4A.423.423,0,0,1,0,7.267a1.128,1.128,0,0,1,.552-.853A2.074,2.074,0,0,1,1.77,6.1a1.8,1.8,0,0,1,.828.166l11.555,7.84L23.484.9A2.608,2.608,0,0,1,25.61,0,2.666,2.666,0,0,1,27.5.7L36.474,14.35l11.47-7.363L48,6.948a1.885,1.885,0,0,1,1.119-.3Z" transform="translate(0 25.429) rotate(-30)" fill="#fed530"/>
+</svg>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 46 - 0
tv/src/assets/img/2pkRank/redMvp.svg


+ 21 - 0
tv/src/assets/img/pk/blueFlag.svg

@@ -0,0 +1,21 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.804" height="33.138" viewBox="0 0 32.804 33.138">
+  <defs>
+    <clipPath id="clip-path">
+      <path id="路径_97" data-name="路径 97" d="M0-783.862H32.8V-817H0Z" transform="translate(0 817.001)" fill="none" clip-rule="evenodd"/>
+    </clipPath>
+  </defs>
+  <g id="组_165" data-name="组 165" transform="translate(0 817.001)">
+    <g id="组_163" data-name="组 163" transform="translate(0 -817.001)" clip-path="url(#clip-path)">
+      <path id="路径_87" data-name="路径 87" d="M121.637-747.553l.105.007a4.247,4.247,0,0,1,1.719.493,2.083,2.083,0,0,0,1.242.3,3.725,3.725,0,0,1,1.639.285,11.576,11.576,0,0,1,1.13.509c.294.146.6.295.909.421a2.372,2.372,0,0,1,.256.13,1.883,1.883,0,0,0,.243.123c.5.191.938.337,1.386.467a3.6,3.6,0,0,0,.9.087,5.933,5.933,0,0,1,.867.062,2.033,2.033,0,0,0,.378.013,2.792,2.792,0,0,1,.406.01,13.386,13.386,0,0,1,1.959.415,7.282,7.282,0,0,1,2.144.914c.122.084.24.175.355.269a7.519,7.519,0,0,1,1.094,1.244,6.544,6.544,0,0,0,.839.975l.032.029a13.317,13.317,0,0,0,1.168.924,5.075,5.075,0,0,0,2.794.962.133.133,0,0,1,.077-.062l.061-.016.051.036a.14.14,0,0,1,.045.182c0,.01-.013.029-.022.055-.026.058-.045.1-.061.146-.067.156-.1.227-.176.434-.013.039-.029.075-.042.113-.032.084-.061.165-.09.246-.413,1.183.173,2.735.739,4.233.611,1.614,1.187,3.144.608,4.275-.851,1.659-.141,4.91.6,6.582l.1.217-.234-.023a47.1,47.1,0,0,1-7.361-1.481,5.937,5.937,0,0,1-1.2-.7c-.272-.188-.566-.4-.851-.6s-.582-.415-.858-.606a5.994,5.994,0,0,0-1.255-.719,6.754,6.754,0,0,1-1.447-.846l-.179-.123a6.17,6.17,0,0,0-2.109-1.112c-.259-.032-.522-.055-.784-.071s-.5-.016-.752-.019a6.7,6.7,0,0,1-1.175-.071,14.6,14.6,0,0,1-1.479-.363c-.41-.126-.835-.272-1.325-.457a1.07,1.07,0,0,0-.253-.045,1.193,1.193,0,0,1-.323-.065,6.378,6.378,0,0,1-.887-.463,5.871,5.871,0,0,0-1-.5c-.358-.126-.694-.237-1.027-.327a13.891,13.891,0,0,0-3.424-.638l-.173-.007Z" transform="translate(-112.319 750.366)"/>
+      <path id="路径_88" data-name="路径 88" d="M.072-783.869a.189.189,0,0,1-.064-.207l8.824-30.176-.07-.023a.529.529,0,0,1-.154-.075.461.461,0,0,1-.2-.5.416.416,0,0,1,.182-.237c0-.006,0-.01,0-.016a.4.4,0,0,1,.218-.243.472.472,0,0,1,.326-.019l.016,0,.016-.058a.8.8,0,0,1-.246-.83.8.8,0,0,1,.374-.47.779.779,0,0,1,.6-.065.79.79,0,0,1,.218.1.8.8,0,0,1,.31.882.79.79,0,0,1-.541.538l-.032.11a.511.511,0,0,1,.134.065.411.411,0,0,1,.179.454c0,.007,0,.01-.006.016a.421.421,0,0,1,.026.3.432.432,0,0,1-.24.269.523.523,0,0,1-.365.019l-.051-.016L.837-784.326c-.154.525-.173.548-.237.583a.129.129,0,0,1-.109.01l-.381-.117A.108.108,0,0,1,.072-783.869Z" transform="translate(0 816.822)" fill="#231715"/>
+      <path id="路径_89" data-name="路径 89" d="M13.046-807.979l.384.117c.016,0,.022.029.15-.408l-9.39,32.117c-.144.49-.163.509-.179.5l-.387-.113c-.016,0-.022-.029-.013-.055L13-807.937C13.011-807.966,13.03-807.986,13.046-807.979Z" transform="translate(-3.462 808.625)" fill="#fff"/>
+      <path id="路径_90" data-name="路径 90" d="M226.536-811.742a.646.646,0,0,0,.8-.441A.662.662,0,0,0,226.9-813a.647.647,0,0,0-.8.441A.656.656,0,0,0,226.536-811.742Z" transform="translate(-217.029 813.188)" fill="#c3af00"/>
+      <path id="路径_91" data-name="路径 91" d="M251.958-784.637C251.968-784.585,251.939-784.715,251.958-784.637Z" transform="translate(-241.872 785.973)" fill="#fff"/>
+      <path id="路径_92" data-name="路径 92" d="M231.111-808.915a.251.251,0,0,0,.246.026.225.225,0,0,0,.131-.2.258.258,0,0,0-.115-.224.25.25,0,0,0-.246-.026.226.226,0,0,0-.131.2A.265.265,0,0,0,231.111-808.915Z" transform="translate(-221.755 809.667)" fill="#ece738"/>
+      <path id="路径_93" data-name="路径 93" d="M218.515-777.774l.707.214a.3.3,0,0,1,.227.35.293.293,0,0,1-.378.169l-.707-.214a.3.3,0,0,1-.227-.35A.292.292,0,0,1,218.515-777.774Z" transform="translate(-209.401 779.379)" fill="#c3af00"/>
+      <path id="路径_94" data-name="路径 94" d="M213.927-772.222l.819.246a.351.351,0,0,1,.266.405.34.34,0,0,1-.438.194l-.819-.246a.351.351,0,0,1-.266-.405A.338.338,0,0,1,213.927-772.222Z" transform="translate(-204.939 774.053)" fill="#c3af00"/>
+      <path id="路径_95" data-name="路径 95" d="M216.425-775.532a2.349,2.349,0,0,0,.461.107c.1.006.109-.023.022-.075a2.329,2.329,0,0,0-.438-.178,2.361,2.361,0,0,0-.461-.107c-.1-.006-.109.023-.023.075A2.324,2.324,0,0,0,216.425-775.532Zm.157-.373a1.778,1.778,0,0,0,.323.078c.07.006.074-.01.013-.042a1.877,1.877,0,0,0-.31-.12,1.761,1.761,0,0,0-.323-.078c-.07-.006-.074.01-.013.042A1.865,1.865,0,0,0,216.582-775.9Z" transform="translate(-207.289 777.726)" fill="#ece738"/>
+      <path id="路径_96" data-name="路径 96" d="M126.7-738.674l.105.007a4.221,4.221,0,0,1,1.687.5,2.1,2.1,0,0,0,1.219.311,3.755,3.755,0,0,1,1.607.3c.381.146.755.327,1.111.506.291.146.6.3.893.418a2.7,2.7,0,0,1,.253.13,2.052,2.052,0,0,0,.237.123c.49.191.922.34,1.36.47a3.788,3.788,0,0,0,.883.1,5.664,5.664,0,0,1,.848.071,1.9,1.9,0,0,0,.368.016,2.327,2.327,0,0,1,.4.016,13.511,13.511,0,0,1,1.924.428,7.37,7.37,0,0,1,2.109.914c.118.081.237.172.349.266a7.872,7.872,0,0,1,1.088,1.218,6.613,6.613,0,0,0,.835.956l.032.026c.362.3.736.622,1.155.911a5.152,5.152,0,0,0,2.743.969.11.11,0,0,1,.077-.058l.057-.016.051.036a.137.137,0,0,1,.045.175c0,.01-.013.029-.023.052l-.057.139c-.064.149-.09.217-.166.415-.013.036-.026.075-.038.11-.029.081-.058.159-.083.237-.39,1.141.2,2.648.778,4.106.618,1.572,1.2,3.056.653,4.142-.81,1.594-.074,4.748.675,6.375l.1.211-.227-.026a47.676,47.676,0,0,1-7.22-1.53,6.055,6.055,0,0,1-1.187-.694c-.269-.185-.557-.389-.839-.593s-.573-.412-.848-.6a6.156,6.156,0,0,0-1.235-.713,6.789,6.789,0,0,1-1.424-.836l-.179-.123a6.318,6.318,0,0,0-2.077-1.105c-.256-.032-.512-.061-.768-.081s-.493-.023-.736-.029a6.4,6.4,0,0,1-1.152-.088,14.44,14.44,0,0,1-1.453-.373c-.4-.126-.819-.276-1.3-.46a1.234,1.234,0,0,0-.246-.049,1.178,1.178,0,0,1-.317-.068,7.063,7.063,0,0,1-.877-.46,5.727,5.727,0,0,0-.983-.5c-.352-.13-.682-.237-1.008-.331a13.967,13.967,0,0,0-3.357-.664l-.17-.01Z" transform="translate(-117.464 741.847)" fill="#11d8ff"/>
+    </g>
+  </g>
+</svg>

+ 12 - 0
tv/src/assets/img/pk/blueGood.svg

@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
+  <g id="赞" transform="translate(-15 -140)">
+    <g id="椭圆_23" data-name="椭圆 23" transform="translate(15 140)" fill="#4566f7" stroke="#fff" stroke-width="4">
+      <circle cx="32" cy="32" r="32" stroke="none"/>
+      <circle cx="32" cy="32" r="30" fill="none"/>
+    </g>
+    <g id="组_143" data-name="组 143" transform="translate(31 156)">
+      <path id="路径_79" data-name="路径 79" d="M204.667-656.951h8.716c-3.377-12.474,2.327-13.111,2.327-13.111,2.418,0,1.916,1.912,2.1,2.231,0,6.1,6.479,10.88,6.479,10.88v17.3c0,1.708-2.327,2.323-3.24,2.323h-13.1c-1.232,0-2.236-3.232-2.236-3.232-3.24-11.017-3.24-14.3-3.24-14.3A1.977,1.977,0,0,1,204.667-656.951Z" transform="translate(-202.477 670.062)" fill="#fff"/>
+      <path id="路径_80" data-name="路径 80" d="M1.327-401.558H6.546A1.062,1.062,0,0,1,7.64-400.5L6.562-383.052a1.089,1.089,0,0,1-1.112,1.11H.933c-.941,0-.933-.734-.933-.734v-17.559a1.284,1.284,0,0,1,1.327-1.323Z" transform="translate(24.063 414.675)" fill="#fff"/>
+    </g>
+  </g>
+</svg>

+ 21 - 0
tv/src/assets/img/pk/redFlag.svg

@@ -0,0 +1,21 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.804" height="33.138" viewBox="0 0 32.804 33.138">
+  <defs>
+    <clipPath id="clip-path">
+      <path id="路径_97" data-name="路径 97" d="M0-783.862H32.8V-817H0Z" transform="translate(0 817.001)" fill="none" clip-rule="evenodd"/>
+    </clipPath>
+  </defs>
+  <g id="组_164" data-name="组 164" transform="translate(0 817.001)">
+    <g id="组_163" data-name="组 163" transform="translate(0 -817.001)" clip-path="url(#clip-path)">
+      <path id="路径_87" data-name="路径 87" d="M121.637-747.553l.105.007a4.247,4.247,0,0,1,1.719.493,2.083,2.083,0,0,0,1.242.3,3.725,3.725,0,0,1,1.639.285,11.576,11.576,0,0,1,1.13.509c.294.146.6.295.909.421a2.372,2.372,0,0,1,.256.13,1.883,1.883,0,0,0,.243.123c.5.191.938.337,1.386.467a3.6,3.6,0,0,0,.9.087,5.933,5.933,0,0,1,.867.062,2.033,2.033,0,0,0,.378.013,2.792,2.792,0,0,1,.406.01,13.386,13.386,0,0,1,1.959.415,7.282,7.282,0,0,1,2.144.914c.122.084.24.175.355.269a7.519,7.519,0,0,1,1.094,1.244,6.544,6.544,0,0,0,.839.975l.032.029a13.317,13.317,0,0,0,1.168.924,5.075,5.075,0,0,0,2.794.962.133.133,0,0,1,.077-.062l.061-.016.051.036a.14.14,0,0,1,.045.182c0,.01-.013.029-.022.055-.026.058-.045.1-.061.146-.067.156-.1.227-.176.434-.013.039-.029.075-.042.113-.032.084-.061.165-.09.246-.413,1.183.173,2.735.739,4.233.611,1.614,1.187,3.144.608,4.275-.851,1.659-.141,4.91.6,6.582l.1.217-.234-.023a47.1,47.1,0,0,1-7.361-1.481,5.937,5.937,0,0,1-1.2-.7c-.272-.188-.566-.4-.851-.6s-.582-.415-.858-.606a5.994,5.994,0,0,0-1.255-.719,6.754,6.754,0,0,1-1.447-.846l-.179-.123a6.17,6.17,0,0,0-2.109-1.112c-.259-.032-.522-.055-.784-.071s-.5-.016-.752-.019a6.7,6.7,0,0,1-1.175-.071,14.6,14.6,0,0,1-1.479-.363c-.41-.126-.835-.272-1.325-.457a1.07,1.07,0,0,0-.253-.045,1.193,1.193,0,0,1-.323-.065,6.378,6.378,0,0,1-.887-.463,5.871,5.871,0,0,0-1-.5c-.358-.126-.694-.237-1.027-.327a13.891,13.891,0,0,0-3.424-.638l-.173-.007Z" transform="translate(-112.319 750.366)"/>
+      <path id="路径_88" data-name="路径 88" d="M.072-783.869a.189.189,0,0,1-.064-.207l8.824-30.176-.07-.023a.529.529,0,0,1-.154-.075.461.461,0,0,1-.2-.5.416.416,0,0,1,.182-.237c0-.006,0-.01,0-.016a.4.4,0,0,1,.218-.243.472.472,0,0,1,.326-.019l.016,0,.016-.058a.8.8,0,0,1-.246-.83.8.8,0,0,1,.374-.47.779.779,0,0,1,.6-.065.79.79,0,0,1,.218.1.8.8,0,0,1,.31.882.79.79,0,0,1-.541.538l-.032.11a.511.511,0,0,1,.134.065.411.411,0,0,1,.179.454c0,.007,0,.01-.006.016a.421.421,0,0,1,.026.3.432.432,0,0,1-.24.269.523.523,0,0,1-.365.019l-.051-.016L.837-784.326c-.154.525-.173.548-.237.583a.129.129,0,0,1-.109.01l-.381-.117A.108.108,0,0,1,.072-783.869Z" transform="translate(0 816.822)" fill="#231715"/>
+      <path id="路径_89" data-name="路径 89" d="M13.046-807.979l.384.117c.016,0,.022.029.15-.408l-9.39,32.117c-.144.49-.163.509-.179.5l-.387-.113c-.016,0-.022-.029-.013-.055L13-807.937C13.011-807.966,13.03-807.986,13.046-807.979Z" transform="translate(-3.462 808.625)" fill="#fff"/>
+      <path id="路径_90" data-name="路径 90" d="M226.536-811.742a.646.646,0,0,0,.8-.441A.662.662,0,0,0,226.9-813a.647.647,0,0,0-.8.441A.656.656,0,0,0,226.536-811.742Z" transform="translate(-217.029 813.188)" fill="#c3af00"/>
+      <path id="路径_91" data-name="路径 91" d="M251.958-784.637C251.968-784.585,251.939-784.715,251.958-784.637Z" transform="translate(-241.872 785.973)" fill="#fff"/>
+      <path id="路径_92" data-name="路径 92" d="M231.111-808.915a.251.251,0,0,0,.246.026.225.225,0,0,0,.131-.2.258.258,0,0,0-.115-.224.25.25,0,0,0-.246-.026.226.226,0,0,0-.131.2A.265.265,0,0,0,231.111-808.915Z" transform="translate(-221.755 809.667)" fill="#ece738"/>
+      <path id="路径_93" data-name="路径 93" d="M218.515-777.774l.707.214a.3.3,0,0,1,.227.35.293.293,0,0,1-.378.169l-.707-.214a.3.3,0,0,1-.227-.35A.292.292,0,0,1,218.515-777.774Z" transform="translate(-209.401 779.379)" fill="#c3af00"/>
+      <path id="路径_94" data-name="路径 94" d="M213.927-772.222l.819.246a.351.351,0,0,1,.266.405.34.34,0,0,1-.438.194l-.819-.246a.351.351,0,0,1-.266-.405A.338.338,0,0,1,213.927-772.222Z" transform="translate(-204.939 774.053)" fill="#c3af00"/>
+      <path id="路径_95" data-name="路径 95" d="M216.425-775.532a2.349,2.349,0,0,0,.461.107c.1.006.109-.023.022-.075a2.329,2.329,0,0,0-.438-.178,2.361,2.361,0,0,0-.461-.107c-.1-.006-.109.023-.023.075A2.324,2.324,0,0,0,216.425-775.532Zm.157-.373a1.778,1.778,0,0,0,.323.078c.07.006.074-.01.013-.042a1.877,1.877,0,0,0-.31-.12,1.761,1.761,0,0,0-.323-.078c-.07-.006-.074.01-.013.042A1.865,1.865,0,0,0,216.582-775.9Z" transform="translate(-207.289 777.726)" fill="#ece738"/>
+      <path id="路径_96" data-name="路径 96" d="M126.7-738.674l.105.007a4.221,4.221,0,0,1,1.687.5,2.1,2.1,0,0,0,1.219.311,3.755,3.755,0,0,1,1.607.3c.381.146.755.327,1.111.506.291.146.6.3.893.418a2.7,2.7,0,0,1,.253.13,2.052,2.052,0,0,0,.237.123c.49.191.922.34,1.36.47a3.788,3.788,0,0,0,.883.1,5.664,5.664,0,0,1,.848.071,1.9,1.9,0,0,0,.368.016,2.327,2.327,0,0,1,.4.016,13.511,13.511,0,0,1,1.924.428,7.37,7.37,0,0,1,2.109.914c.118.081.237.172.349.266a7.872,7.872,0,0,1,1.088,1.218,6.613,6.613,0,0,0,.835.956l.032.026c.362.3.736.622,1.155.911a5.152,5.152,0,0,0,2.743.969.11.11,0,0,1,.077-.058l.057-.016.051.036a.137.137,0,0,1,.045.175c0,.01-.013.029-.023.052l-.057.139c-.064.149-.09.217-.166.415-.013.036-.026.075-.038.11-.029.081-.058.159-.083.237-.39,1.141.2,2.648.778,4.106.618,1.572,1.2,3.056.653,4.142-.81,1.594-.074,4.748.675,6.375l.1.211-.227-.026a47.676,47.676,0,0,1-7.22-1.53,6.055,6.055,0,0,1-1.187-.694c-.269-.185-.557-.389-.839-.593s-.573-.412-.848-.6a6.156,6.156,0,0,0-1.235-.713,6.789,6.789,0,0,1-1.424-.836l-.179-.123a6.318,6.318,0,0,0-2.077-1.105c-.256-.032-.512-.061-.768-.081s-.493-.023-.736-.029a6.4,6.4,0,0,1-1.152-.088,14.44,14.44,0,0,1-1.453-.373c-.4-.126-.819-.276-1.3-.46a1.234,1.234,0,0,0-.246-.049,1.178,1.178,0,0,1-.317-.068,7.063,7.063,0,0,1-.877-.46,5.727,5.727,0,0,0-.983-.5c-.352-.13-.682-.237-1.008-.331a13.967,13.967,0,0,0-3.357-.664l-.17-.01Z" transform="translate(-117.464 741.847)" fill="#fd3f37"/>
+    </g>
+  </g>
+</svg>

+ 12 - 0
tv/src/assets/img/pk/redGood.svg

@@ -0,0 +1,12 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
+  <g id="赞" transform="translate(-15 -140)">
+    <g id="椭圆_23" data-name="椭圆 23" transform="translate(15 140)" fill="#e6302b" stroke="#fff" stroke-width="4">
+      <circle cx="32" cy="32" r="32" stroke="none"/>
+      <circle cx="32" cy="32" r="30" fill="none"/>
+    </g>
+    <g id="组_143" data-name="组 143" transform="translate(31 826.062)">
+      <path id="路径_79" data-name="路径 79" d="M222.1-656.951h-8.716c3.377-12.474-2.327-13.111-2.327-13.111-2.418,0-1.916,1.912-2.1,2.231,0,6.1-6.479,10.88-6.479,10.88v17.3c0,1.708,2.327,2.323,3.24,2.323h13.1c1.232,0,2.236-3.232,2.236-3.232,3.24-11.017,3.24-14.3,3.24-14.3A1.977,1.977,0,0,0,222.1-656.951Z" transform="translate(-192.586)" fill="#fff"/>
+      <path id="路径_80" data-name="路径 80" d="M6.314-401.558H1.095A1.062,1.062,0,0,0,0-400.5l1.078,17.447a1.089,1.089,0,0,0,1.112,1.11H6.708c.941,0,.933-.734.933-.734v-17.559a1.284,1.284,0,0,0-1.327-1.323Z" transform="translate(0 -255.387)" fill="#fff"/>
+    </g>
+  </g>
+</svg>

Dosya farkı çok büyük olduğundan ihmal edildi
+ 11 - 0
tv/src/assets/img/pk/vs.svg


BIN
tv/src/assets/pk.png


+ 17 - 1
tv/src/router/index.js

@@ -23,9 +23,17 @@ const routes = [
             {
                 path: '/',
                 name: 'Main',
+                component: () => import('@/views/Wait.vue'),
+                meta: {
+                    title: "等待",
+                    clmid: "1",
+                }
+            },{
+                path: '/main',
+                name: 'Main',
                 component: () => import('@/views/Main.vue'),
                 meta: {
-                    title: "首页",
+                    title: "团课",
                     clmid: "1",
                 }
             },{
@@ -60,6 +68,14 @@ const routes = [
                     title: "gropePk",
                     clmid: "4",
                 }
+            },{
+                path: '/2pkRank',
+                name: '2pkRank',
+                component: () => import('@/views/2pkRank.vue'),
+                meta: {
+                    title: "2pkRank",
+                    clmid: "5",
+                }
             },{
                 path: '/test',
                 name: 'test',

+ 584 - 0
tv/src/views/2pkRank.vue

@@ -0,0 +1,584 @@
+<template>
+    <div :class="pageStyle">
+        <Headside></Headside>
+        <div class="rankContainer">
+            <div class="sumScore">
+                <div class="sumlt">
+                    <span class="sumCK">
+                        <em>{{redSum}}</em><i>ck</i>
+                    </span>
+                    <span class="flagContainer">
+                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum >= blueSum">
+                    </span>
+                    <span class="mineUniteName">
+                        红队
+                    </span>
+                </div>
+                <div class="summd"></div>
+                <div class="sumrt">
+                    <span class="mineUniteName">
+                        蓝队
+                    </span>
+                    <span class="flagContainer">
+                        <img src="../assets/img/2pkRank/flag.svg" alt="" v-if="redSum <= blueSum">
+                    </span>
+                    <span class="sumCK">
+                        <em>{{blueSum}}</em><i>ck</i>
+                    </span>
+                </div>
+            </div>
+            <el-row :gutter="20">
+                <el-col :span="12">
+                    <li v-for="(s,i) in students.redUnite" :class="[{'redUnite':true},{'mvpli':i == 0}]">
+                        <div>
+                            <div class="head">
+                                <img :src="s.Head"
+                                     class="headImg" alt="">
+                                <img src="../assets/img/2pkRank/king.svg" class="king" alt="" v-if="redSum >= blueSum">
+                            </div>
+                            <div class="name">
+                                {{s.Name}}
+                            </div>
+                            <div class="CLEscore">
+                                <em>CLE</em>
+                                {{s.Cle|fmtInt}}
+                            </div>
+                            <div class="CKscore">
+                                <em>ck</em>
+                                {{s.Cle|fmtInt}}
+                            </div>
+                            <div class="record">
+                                <img src="../assets/img/2pkRank/redMvp.svg" class="mvpImg" alt=""
+                                     v-if="i == 0">
+                            </div>
+                        </div>
+                    </li>
+                </el-col>
+                <!--CK-->
+                <el-col :span="12">
+                    <li v-for="(s,i) in students.blueUnite"
+                        :class="[{'blueUnite':true},{'mvpli':i == 0}]"
+                    >
+                        <div>
+                            <div class="head">
+                                <img :src="s.Head" class="headImg" alt="">
+                                <img src="../assets/img/2pkRank/king.svg" class="king" alt="" v-if="redSum <= blueSum">
+                            </div>
+                            <div class="name">
+                                {{s.Name}}
+                            </div>
+                            <div class="CLEscore">
+                                <em>CLE</em>
+                                {{s.Cle|fmtInt}}
+                            </div>
+                            <div class="CKscore">
+                                <em>ck</em>
+                                {{s.Cle|fmtInt}}
+                            </div>
+                            <div class="record">
+                                <img src="../assets/img/2pkRank/blueMvp.svg" class="mvpImg" alt=""
+                                     v-if="i == 0">
+                            </div>
+                        </div>
+                    </li>
+                </el-col>
+            </el-row>
+        </div>
+    </div>
+</template>
+
+<script>
+    import Headside from '@/components/Headside'
+    import '../libs/rem';
+    import '../Global';
+    import {ClassUserRank} from '@/api/getApiRes'
+
+    let qs = require('qs');
+    export default {
+        data() {
+            return {
+                eqSn: '30:9C:23:0C:8B:1E',
+                pageStyle: RandomBg(),
+                trueDate: false,//真实数据 true false
+                autoJump: true,//开启自动跳走
+                students: {
+                    redUnite: [],
+                    blueUnite: [],
+                },
+                rankTimer: null,
+                redSum: 0,
+                blueSum: 0,
+            }
+        },
+        mounted() {
+            let that = this;
+            if (this.trueDate) {
+                this.getClassUserRank();
+                this.rankTimer = setInterval(() => {
+                    this.getClassUserRank();
+                }, 5000);
+
+            } else {
+                let Rs = this.fakeNews(18);
+                that.UniteBreak(Rs);
+            }
+            if (this.autoJump) {
+                // 倒计时60秒自动关闭
+                let that = this;
+                this.totalTime = 60;
+                let clock = window.setInterval(() => {
+                    this.totalTime--;
+                    if (parseInt(this.totalTime) < 0) {
+                        // 前往等待页面
+                        // that.$router.push({path: '/wait'});
+                        // 计时器回收
+                        clearInterval(clock);
+                    }
+                }, 1000)
+            }
+        },
+        beforeDestroy() {
+            clearInterval(this.rankTimer);
+            this.rankTimer = null;
+        },
+        methods: {
+            fakeNews(fakeNums) {
+                let item = [];
+                // 1 2 3 5 9 11 13 16 21 30
+                for (var i = 0; i < fakeNums; i++) {
+                    item.push(
+                        {
+                            "SvId": 1,
+                            "UserId": 1,
+                            "Cle": i * 14,
+                            "realHr1": parseInt(Math.random() * 100 + 50),
+                            "realHr": 60,
+                            "activePercent": 30,
+                            "heartRate": 90,
+                            "Steps": 9999,
+                            "PureCalorieNoVo2": 999,
+                            "Name": "刘宇宁",
+                            "updateTime": 1604568915582,
+                            "Ck": i * 9.9,
+                            "Head": "http://192.168.0.2/zw.png",
+                            "GroupNo": i % 2 + 1
+                        }
+                    )
+                }
+                return item;
+            },
+            // 分队展示
+            UniteBreak(Rs) {
+                let that = this;
+                console.log(Rs);
+                if (!Rs) {
+                    that.students.redUnite = [];
+                    that.students.blueUnite = [];
+                } else {
+                    Rs.map(function (item, t) {
+                        if (item.GroupNo == 1) {
+                            that.students.redUnite.push(item);
+                        }
+                        if (item.GroupNo == 2) {
+                            that.students.blueUnite.push(item);
+                        }
+                    })
+
+                }
+                // 排序
+                that.students.redUnite = that.students.redUnite.sort(function (a, b) {
+                    return b.Cle - a.Cle;
+                });
+                that.students.blueUnite = that.students.blueUnite.sort(function (a, b) {
+                    return b.Cle - a.Cle;
+                });
+
+                that.calcSumCK(that.students);
+
+            },
+            // 计算各队总分
+            calcSumCK(Rs) {
+                let that = this;
+                // that.redSum
+                Rs.redUnite.map(function (item, t) {
+                    that.redSum += item.Ck
+                });
+                Rs.blueUnite.map(function (item, t) {
+                    that.blueSum += item.Ck
+                });
+            },
+            getClassUserRank() {
+                let that = this;
+                let param = {
+                    eqSn: localStorage.eqSn
+                };
+                let postdata = qs.stringify(param);
+                ClassUserRank(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        this.students.CkSort = json.Rs.CkSort;
+                        this.students.CalSort = json.Rs.CalSort;
+                    } else {
+                        this.students.CkSort = [];
+                        this.students.CalSort = [];
+                        if (json.Code == '999') {
+                            // that.$router.push({path: '/wait'});
+                        } else {
+                            // 已出错
+                            that.$message.error(json.Memo);
+                        }
+                    }
+                })
+            }
+        },
+        filters: {
+            fmtNum(val) {
+                if (val == 0) {
+                    return '--'
+                } else {
+                    if (parseInt(val) < 0) return 0;
+                    if (parseInt(val) > 0) return val
+                }
+            },
+            fmtFloat(val) {
+                if (val == 0) {
+                    return '0'
+                } else {
+                    return parseFloat(val).toFixed(1);
+                }
+            },
+            fmtInt(val) {
+                if (val == 0) {
+                    return '0'
+                } else {
+                    return parseInt(val);
+                    // return parseFloat(val).toFixed(3);
+                }
+            },
+        },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/rank') {
+                    if (this.trueDate) {
+                        this.getClassUserRank();
+                        this.rankTimer = setInterval(() => {
+                            this.getClassUserRank();
+                        }, 5000);
+
+                    } else {
+                        this.rankTimer = setInterval(() => {
+                            this.students.redUnite = this.fakeNews();
+                            this.students.blueUnite = this.fakeNews();
+                        }, 5000);
+                    }
+                    if (this.autoJump) {
+                        // 倒计时60秒自动关闭
+                        let that = this;
+                        this.totalTime = 60;
+                        let clock = window.setInterval(() => {
+                            this.totalTime--;
+                            if (parseInt(this.totalTime) < 0) {
+                                // 前往等待页面
+                                // that.$router.push({path: '/wait'});
+                                // 计时器回收
+                                clearInterval(clock);
+                            }
+                        }, 1000)
+                    }
+                } else {
+                    clearInterval(this.autoJump);
+                    clearInterval(this.rankTimer);
+                }
+            }
+        },
+        components: {
+            Headside
+        }
+    }
+</script>
+
+<style scoped>
+    @import "../assets/css/bg.css";
+
+    @font-face {
+        font-family: vista;
+        src: url('../assets/font/vista.otf');
+    }
+
+    * {
+        font-family: vista;
+    }
+
+
+    .pages {
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        font-family: vista;
+    }
+
+    .rankContainer {
+        width: 96%;
+        overflow: visible;
+        display: block;
+        margin: 0 auto;
+        padding-top: 0.2rem;
+    }
+
+    .sumScore {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        height: 1.4rem;
+        background: url("../assets/img/2pkRank/2pkTitle.svg");
+        background-size: 100%;
+        background-position: top center;
+        background-repeat: no-repeat;
+    }
+
+    li {
+        width: 100%;
+        height: 0.8rem;
+        display: block;
+        margin: 0 auto;
+        overflow: hidden;
+        margin-bottom: 0.06rem;
+    }
+
+    li .rows {
+        width: 100%;
+        height: 0.8rem;
+        /*background: #ee191d;*/
+        border-radius: 250rem;
+        overflow: visible;
+        display: block;
+        margin: 0 auto;
+        margin-top: 0.15rem;
+    }
+
+    li .head {
+        width: 0.6rem;
+        height: 0.7rem;
+        float: left;
+        margin-left: 0.1rem;
+        margin-top: 0.07rem;
+        overflow: visible;
+    }
+
+    li .head .headImg {
+        width: 100%;
+        height: 0.6rem;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        border: 0.04rem solid #fff;
+        border-radius: 250px;
+    }
+
+
+    li .name {
+        width: 2rem;
+        font-weight: normal;
+        font-size: 0.4rem;
+        text-align: left;
+        color: #fff;
+        float: left;
+        margin-left: 0.2rem;
+        line-height: 0.8rem;
+    }
+
+    li .record {
+        position: relative;
+        top: -0.2rem;
+        float: right;
+        margin-right: 2%;
+        /*line-height: 0.8rem;*/
+    }
+
+    li .score {
+        font-weight: normal;
+        font-size: 0.4rem;
+        color: #fff;
+        float: right;
+        margin-right: 0.2rem;
+        line-height: 1rem;
+        text-align: right;
+        line-height: 0.8rem;
+    }
+
+    li .score em {
+        font-size: 0.2rem;
+    }
+
+    .sumlt {
+        width: 45%;
+        float: left;
+        color: #E4FF00;
+    }
+
+    .sumrt {
+        width: 45%;
+        float: right;
+        color: #fff;
+    }
+
+    .summd {
+        width: 10%;
+        float: left;
+        height: 1rem;
+    }
+
+    .sumlt .sumCK {
+        width: 30%;
+        float: left;
+        margin-left: 30%;
+    }
+
+    .sumCK em {
+        font-size: 0.6rem;
+    }
+
+    .sumCK i {
+        font-size: 0.24rem;
+    }
+
+    .sumlt .flagContainer {
+        width: 10%;
+        float: left;
+        margin-left: 5%;
+    }
+
+    .flagContainer img {
+        width: 1rem;
+        height: 1rem;
+    }
+
+    .sumlt .mineUniteName {
+        width: 20%;
+        float: right;
+        text-align: left;
+        font-size: 0.5rem;
+        line-height: 1.4rem;
+    }
+
+
+    .sumrt .sumCK {
+        width: 30%;
+        float: left;
+        margin-left: 0%;
+    }
+
+    .sumrt em {
+        font-size: 0.6rem;
+    }
+
+    .sumrt i {
+        font-size: 0.24rem;
+    }
+
+    .sumrt .flagContainer {
+        width: 10%;
+        float: left;
+        margin-right: 5%;
+    }
+
+    .sumrt .mineUniteName {
+        width: 18%;
+        float: left;
+        text-align: left;
+        font-size: 0.5rem;
+        line-height: 1.4rem;
+        margin-left: 8%;
+    }
+
+    li.redUnite {
+        width: 100%;
+        float: left;
+        background: rgba(232, 32, 62, 0.75);
+        color: #fff;
+
+    }
+
+    li .CLEscore {
+        width: 2rem;
+        float: left;
+        font-size: 0.6rem;
+        margin-left: 5%;
+        line-height: 0.8rem;
+    }
+
+    li .CLEscore em {
+        font-size: 0.3rem;
+    }
+
+    li .CKscore {
+        width: 2rem;
+        float: left;
+        font-size: 0.6rem;
+        margin-left: 5%;
+        line-height: 0.8rem;
+    }
+
+    li .CKscore em {
+        font-size: 0.3rem;
+    }
+
+    li .record img {
+        width: 0.7rem;
+        float: left;
+    }
+
+    li.blueUnite {
+        width: 99%;
+        float: left;
+        background: rgba(24, 15, 170, 0.75);
+        color: #fff;
+    }
+
+    li.mvpli {
+        padding-top: 0.15rem;
+        padding-bottom: 0.15rem;
+    }
+
+    li.mvpli .CLEscore {
+        font-size: 0.7rem;
+    }
+
+    li.mvpli .CKscore {
+        font-size: 0.7rem;
+    }
+
+    li.mvpli .head {
+        width: 0.7rem;
+        height: 0.8rem;
+    }
+
+    li.mvpli .head img {
+        height: 0.7rem;
+        margin-top: -0.05rem;
+    }
+
+    li.mvpli .name {
+        font-size: 0.5rem;
+    }
+
+    li .king {
+        width: 0.4rem;
+        height: 0.2rem;
+        float: left;
+        position: relative;
+        top: -0.7rem;
+        left: -0.1rem;
+    }
+
+    li.mvpli .head img.king {
+        top: -1rem;
+    }
+</style>

+ 1 - 3
tv/src/views/Index.vue

@@ -1,7 +1,5 @@
 <template>
     <div class="IndexContainer">
-
-        <!--<img src="../api/wifi.png" height="100%" width="100%"/>-->
         <keep-alive>
             <router-view></router-view>
         </keep-alive>
@@ -45,7 +43,7 @@
             // 获取当前版本号
             getCurVersion() {
                 let that = this;
-                localStorage.eqSn = '30:9C:23:0C:8B:1E';//
+                localStorage.eqSn = '30:9C:23:0C:8B:1E';//浏览器默认
                 function plusReady() {
                     if(typeof plus == 'undefined') return false;
                     // 获取本地应用资源版本号

+ 17 - 9
tv/src/views/Main.vue

@@ -14,7 +14,8 @@
                                 <!--<img v-bind:src="require('../static/img/people/' + s.head)" alt="">-->
                                 <!--<img :src="s.Head" alt="" v-if="s.Head">-->
                                 <img :src="s.Head" alt="" v-if="s.Head">
-                                <img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">
+                                <!--<img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">-->
+                                <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                             </div>
                             <div class="cla">
                                 <!--<em v-if="s.activePercent != 0">{{  s.activePercent |fmtNum }}</em>-->
@@ -213,11 +214,14 @@
                         "CkUnit": "CK值"
                     }
                 },
-                mainTimer:null,
-                timer2:null,
+                mainTimer: null,
+                timer2: null,
             }
         },
         mounted() {
+            // this.$router.push({path: '/2pkRank'});
+            // return false
+
             if (this.trueDate) {
                 this.mainTimer = setInterval(() => {
                     this.GetgetUserList();
@@ -251,7 +255,7 @@
             //       if (totalTime < 0) {
             //         totalTime = 3;
             //         that.serachBtnStatus = false;
-            //         that.$router.push({path: '/rank'});
+
             //       }
             //     }
             //     ,
@@ -385,12 +389,13 @@
                     let json = res;
                     if (json.Code == 0) {
                         // 没开课
+                        console.log(json.ClassOn);
                         if (json.ClassOn == 0) {
                             console.log("xiakele ");
-                            // return false;
-                            // 1:团课
-                            // 2:竞技课PK
-                            // 3:私教课
+                            // 0: 下课 团课/私教 排名
+                            // 1:团课/私教 todo
+                            // 2:竞技课2PK
+                            // 3:竞技课3PK
                             switch (parseInt(json.dp)) {
                                 case 0:
                                     that.$router.push({path: '/rank'});
@@ -399,14 +404,17 @@
                                     that.$router.push({path: '/'});
                                     break;
                                 case 2:
+                                    console.log(123);
                                     that.$router.push({path: '/pk'});
                                     break;
                                 case 3:
-                                    that.$router.push({path: '/'});
+                                    that.$router.push({path: '/3pk'});
                                     break;
                             }
                         }
                     } else {
+                        console.log("已上课");
+
                         // that.$message.error(json.Memo);
                     }
                 })

+ 7 - 1
tv/src/views/Rank.vue

@@ -3,6 +3,7 @@
         <Headside></Headside>
         <div class="rankContainer">
             <el-row :gutter="20">
+                <!--卡路里-->
                 <el-col :span="12">
                     <li v-for="(s,i) in students.CalSort">
                         <div :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
@@ -15,9 +16,9 @@
                             <div class="name">
                                 NO.{{i+1}} {{s.Name}}
                             </div>
-
                             <div class="score">
                                 {{s.Cle|fmtInt}}
+                                <em>千卡</em>
                             </div>
                             <div class="record">
                                 <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
@@ -26,6 +27,7 @@
                         </div>
                     </li>
                 </el-col>
+                <!--CK-->
                 <el-col :span="12">
                     <li v-for="(s,i) in students.CkSort">
                         <div :class="['rows',{'row_0':i == 0},{'row_1':i == 1},{'row_2':i == 2},{'row_3':i == 3},{'row_4':i == 4},{'row_5':i == 5},{'row_6':i == 6},{'row_7':i == 7}]">
@@ -41,6 +43,7 @@
 
                             <div class="score">
                                 {{s.Ck|fmtFloat}}
+                                <em>CK值</em>
                             </div>
                             <div class="record">
                                 <img src="../static/img/rank/recordIcon.svg" class="king" alt=""
@@ -332,6 +335,9 @@
         line-height: 1rem;
         text-align: right;
     }
+    li .score em {
+        font-size: 0.2rem;
+    }
 
     .row_0 {
         background: rgba(238, 25, 29, 0.75);

+ 10 - 10
tv/src/views/Wait.vue

@@ -131,8 +131,8 @@
             }
         },
         mounted() {
+            // this.$router.push({path: '/2pkRank'});
             if (this.trueDate) {
-
                 this.waitTimer = setInterval(() => {
                     // this.GetgetUserList();
                     this.curgetClassStat();
@@ -333,12 +333,12 @@
                     } else {
                         that.recordMain = [
                             {
-                                Title: '*******',
-                                Result: [{'Values': 0, Unite: '千卡'}],
+                                Title: '',
+                                Result: [{'Values': '', Unite: ''}],
                             },
                             {
-                                Title: '*******',
-                                Result: [{'Values': 0, Unite: '千卡'}],
+                                Title: '',
+                                Result: [{'Values': '', Unite: ''}],
                             }
                         ];
                         that.$message.error(json.Memo);
@@ -359,10 +359,10 @@
                         // alert("alert:"+json.ClassOn);
                         // 上课了
                         if (json.ClassOn == 1) {
-                            // 1:团课
-                            // 2:竞技课PK
-                            // 3:私教课
-                            // alert("alert:"+json.ClassOn);
+                            // 0: 下课 团课/私教 排名
+                            // 1:团课/私教 todo
+                            // 2:竞技课2PK
+                            // 3:竞技课3PK
                             switch (parseInt(json.dp)) {
                                 case 0:
                                     that.$router.push({path: '/rank'});
@@ -374,7 +374,7 @@
                                     that.$router.push({path: '/pk'});
                                     break;
                                 case 3:
-                                    that.$router.push({path: '/'});
+                                    that.$router.push({path: '/3pk'});
                                     break;
                             }
                         }

+ 323 - 129
tv/src/views/pk.vue

@@ -3,19 +3,19 @@
         <Headside></Headside>
 
         <div class="pk-detail-con">
-            <img src="../static/img/pk/left_power.png" class="lp_icon"/>
+            <img src="../assets/img/pk/redGood.svg" class="lp_icon"/>
             <div class="progress">
-                <div class="progress-bar" :style="{width: classInfo.pkVal}">
+                <div class="progress-bar" :style="{width: pkVal}">
                     <i class="lightning"></i>
                 </div>
             </div>
-            <img src="../static/img/pk/right_power.png" class="rp_icon"/>
+            <img src="../assets/img/pk/blueGood.svg" class="rp_icon"/>
         </div>
 
         <div class="pk_container">
             <div class="lt">
                 <ul>
-                    <li :class="RedstudentsClassName" v-for="(s,i) in Redstudents">
+                    <li :class="RedstudentsClassName" v-for="(s,i) in students.redUnite">
                         <div class="bg">
                             <h5>{{ s.Name }}</h5>
                             <div class="user">
@@ -32,7 +32,8 @@
                                 </div>
                                 <div class="umd">
                                     <div class="circle">
-                                        <img src="../static/img/people/flyhead.png"/>
+                                        <img :src="s.Head" alt="" v-if="s.Head">
+                                        <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -65,12 +66,12 @@
             <div class="md">
                 <div class="partInfo">
                         <span class="title rtitle">
-                        <img src="../static/img/pk/rfight.png"/>
+                        <img src="../assets/img/pk/redFlag.svg"/>
                         ck值
                         </span>
 
                     <span class="title btitle">
-                        <img src="../static/img/pk/bfight.png"/>
+                        <img src="../assets/img/pk/blueFlag.svg"/>
                         ck值
                         </span>
                 </div>
@@ -78,23 +79,23 @@
                     <div class="cubes rcube">
                         <em>红队</em>
                     </div>
-                    <img class="vs" src="../static/img/pk/vs.png"/>
+                    <img class="vs" src="../assets/img/pk/vs.svg"/>
                     <div class="cubes bcube">
                         <em>蓝队</em>
                     </div>
                 </div>
                 <div class="teamScore">
-                    <div class="lt">{{classInfo.redSum}}</div>
-                    <div class="rt">{{classInfo.blueSum}}</div>
+                    <div class="lt">{{redSum}}</div>
+                    <div class="rt">{{blueSum}}</div>
                 </div>
 
                 <div class="bottomInfo">
                     <span class="names">
-                        {{classInfo.name}}
+                        {{PlanName}}
                     </span>
                     <div class="teacher">
-                        <span>教练:{{classInfo.teacher}}</span>
-                        <span>人数:{{classInfo.num}}</span>
+                        <br>
+                        <span>人数:{{num}}</span>
                     </div>
                     <div class="classTime">
                         {{classInfo.endTime}}
@@ -103,7 +104,51 @@
             </div>
             <div class="rt">
                 <ul>
-                    <li :class="BluestudentsClassName" v-for="(s,i) in Bluestudents">
+                    <li :class="BluestudentsClassName" v-for="(s,i) in students.blueUnite">
+                        <div class="bg">
+                            <h5>{{ s.Name }}</h5>
+                            <div class="user">
+                                <div class="ult">
+                                    <em>
+                                        <div v-if="s.activePercent != 0">
+                                            {{ s.activePercent}}
+                                        </div>
+                                        <div class="plus" v-if="s.activePercent == 0">
+                                            ---
+                                        </div>
+                                        <s>%</s>
+                                    </em>
+                                </div>
+                                <div class="umd">
+                                    <div class="circle">
+                                        <img :src="s.Head" alt="" v-if="s.Head">
+                                        <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
+                                    </div>
+                                </div>
+                                <div class="urt">
+                                    <em class="fastJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) > 100">{{
+                                        s.realHr }}</em>
+                                    <em class="slowJump" v-if="s.realHr != 0" v-show="parseInt(s.realHr) <= 100">{{
+                                        s.realHr }}</em>
+                                    <em class="plus" v-if="s.realHr == 0"> --- </em>
+                                    <img src="../static/img/heart.svg" class=""/>
+                                </div>
+                            </div>
+                            <div class="bottomLi">
+                                <div class="btcla">
+                                    <img src="../static/img/s1.svg"/>
+                                    <span>{{ s.Cle |fmtFloat }}</span>
+                                </div>
+                                <div class="btck">
+                                    <img src="../static/img/s2.svg"/>
+                                    <span>{{ s.Steps }}</span>
+                                </div>
+                                <div class="step">
+                                    <img src="../static/img/ck.svg"/>
+                                    <span>{{ s.Ck  |fmtFloat}}</span>
+                                </div>
+                            </div>
+                        </div>
                     </li>
                 </ul>
             </div>
@@ -114,7 +159,10 @@
 <script>
     import '../libs/rem';
     import Headside from '@/components/Headside'
-    import {getHello} from '@/api/getApiRes'
+    import {
+        getHello,
+        getClassStat
+    } from '@/api/getApiRes'
     import '../libs/rem';
 
     let qs = require('qs');
@@ -123,101 +171,176 @@
             return {
                 trueDate: true,//真实数据 true false
                 studentsClassName: [],
+                students: {
+                    redUnite: [],
+                    blueUnite: [],
+                },
+                redSum: 0,
+                blueSum: 0,
+                pkVal: '50%',
                 RedstudentsClassName: '',
                 BluestudentsClassName: '',
-                Redstudents: [],
-                Bluestudents: [],
+                PlanName: '',
+                num: 0,
                 classInfo: {
                     name: '竞技课程',
-                    teacher: '凯瑞根',
                     num: '0',
                     btTime: '2020-11-13 09:00:00',//时间戳
                     endTime: '00:00:00',
                     redSum: 0,
                     blueSum: 0,
-                    pkVal: '50%'
                 }
             }
         },
         mounted() {
-            // this.timer = setInterval(() => {
-            //     this.GetgetUserList();
-            //     this.ClacClassTime();
-            // }, 1000);
-            this.GetgetUserList();
+            let that = this;
+            if (this.trueDate) {
+                this.PkTimer = setInterval(() => {
+                    this.GetgetUserList();
+
+                    this.curgetClassStat();
+                }, 1000);
+                this.GetgetUserList();
+
+                // this.PkEgg = setInterval(() => {
+                //     this.createEgg();
+                // }, 6000);
+
+            } else {
+                // 虚假的数据
+                let json = {
+                    "Code": "0",
+                    "Memo": "Success",
+                    "Dp": {
+                        "PlanId": 182,
+                        "ShopId": 1,
+                        "SvId": 1,
+                        "PlanName": "齐源大厦浏览器显示2020-12-02日08:40开始的竞技游戏",
+                        "Status": 2,
+                        "BeginTime": "17:15:18",
+                        "EndTime": 0,
+                        "ClassType": 2,
+                        "PkNum": 2
+                    }
+                };
+                // 载入课程信息
+                let Dp = json.Dp;
+                that.ReadLessonInfo(Dp);
+                // 载入学生信息
+                let Rs = this.fakeNews(16);
+                that.UniteBreak(Rs);
+
+                // 人口总数
+                that.num = json.Rs ? json.Rs.length : 0;
+                this.ClacClassTime();
+
+            }
+
         },
         beforeDestroy() {
-            // clearInterval(this.timer);
-            // this.timer = null;
+            clearInterval(this.PkTimer);
+            clearInterval(this.PkEgg);
+            this.PkTimer = null;
+            this.PkEgg = null;
         },
         methods: {
-            fakeNews() {
+            fakeNews(num) {
                 let item = [];
                 let nums = Math.random() * 100 + 1;
-                this.fakeNums = 3;
+                this.fakeNums = num;
                 for (var i = 0; i < this.fakeNums; i++) {
                     item.push(
                         {
                             "SvId": 1,
                             "UserId": 1,
-                            "Cle": 999,
-                            "realHr": 112,
-                            "activePercent": 100,
+                            "Cle": i * 14,
+                            "realHr1": parseInt(Math.random() * 100 + 50),
+                            "realHr": 60,
+                            "activePercent": 30,
+                            "heartRate": 90,
                             "Steps": 9999,
-                            "Name": "东南西北",
+                            "PureCalorieNoVo2": 999,
+                            "Name": "刘宇宁",
                             "updateTime": 1604568915582,
-                            "Ck": nums,
-                            "head": 'flyhead.png'
+                            "Ck": nums + i * 2.2,
+                            "Head": "http://192.168.0.2/zw.png",
+                            "GroupNo": i % 2 + 1
                         }
                     )
                 }
                 return item;
             },
+            // 载入课程信息
+            ReadLessonInfo(Dp) {
+                this.PlanName = Dp.PlanName;
+                this.BeginTime = Dp.BeginTime;
+            },
+            // 分队展示
+            UniteBreak(Rs) {
+                let that = this;
+                that.students.redUnite = [];
+                that.students.blueUnite = [];
+                if (!Rs) {
+                    that.students.redUnite = [];
+                    that.students.blueUnite = [];
+                } else {
+                    Rs.map(function (item, t) {
+                        if (item.GroupNo == 1) {
+                            that.students.redUnite.push(item);
+                        }
+                        if (item.GroupNo == 2) {
+                            that.students.blueUnite.push(item);
+                        }
+                    })
+
+                }
+                that.giveClassName(that.students.redUnite, 1);
+                that.giveClassName(that.students.blueUnite, 2);
+                that.calcSumCK(that.students);
+            },
+            // 计算各队总分
+            calcSumCK(Rs) {
+                let that = this;
+                let redSum = 0;
+                let blueSum = 0;
+                // that.redSum
+                Rs.redUnite.map(function (item, t) {
+                    redSum += parseFloat(item.Ck)
+                });
+                Rs.blueUnite.map(function (item, t) {
+                    blueSum += parseFloat(item.Ck)
+                });
+                that.redSum = redSum.toFixed(1);
+                that.blueSum = blueSum.toFixed(1);
+
+                // pkVal
+                let sumMax = parseFloat(redSum) + parseFloat(blueSum);
+                that.pkVal = (redSum / sumMax) * 100 + '%';
+            },
+            // 获取上课学生信息
             GetgetUserList() {
                 let that = this;
                 let param = {
                     token: localStorage.token,
+                    eqSn: localStorage.eqSn
                 };
-
-                this.giveClassName(this.fakeNews(), 1);
-                this.Redstudents = this.fakeNews();
-                this.giveClassName(this.fakeNews(), 2);
-                this.Bluestudents = this.fakeNews();
-
-                // 总人数
-                this.classInfo.num = parseInt(this.Redstudents.length) + parseInt(this.Bluestudents.length);
-
                 // this.giveClassName(this.Bluestudents,2);
-                this.CalcTeamCk();
-                return false
                 let postdata = qs.stringify(param);
                 getHello(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-                        // 返回空值不处理
-
-                        if (that.times == 1) {
-                            that.students = json.Rs;
-                            if (!json.Rs) return false;
-                            that.times++;
-                            that.giveClassName(json.Rs);
-                        } else {
-                            if (localStorage.result != JSON.stringify(json.Rs)) {
-                                that.students = json.Rs;
-                                if (!json.Rs) return false
-                            }
-                            localStorage.res = JSON.stringify(json.Rs);
-                            that.giveClassName(json.Rs);
-                        }
 
+                        that.ReadLessonInfo(json.Dp);
+                        that.UniteBreak(json.Rs);
 
-                        // test 启动一个成就彩蛋
-                        // this.createEgg(that.students[4]);
+                        // 人口总数
+                        that.num = json.Rs.length ? json.Rs.length : 0;
+                        this.ClacClassTime();
                     } else {
                         // 已下课
                         console.log(json.Code);
                         if (json.Code == '999') {
-                            that.$router.push({path: '/rank'});
+                            that.$router.push({path: '/2pkRank'});
                         } else {
                             // 已出错
                             that.$message.error(json.Memo);
@@ -225,6 +348,7 @@
                     }
                 })
             },
+            // 动态计算排版
             giveClassName(res, type) {
                 let that = this;
                 let numberClass = '';
@@ -253,50 +377,75 @@
             },
             // 计算团队竞技课持续时间
             ClacClassTime() {
-                let endtime = new Date(this.classInfo.btTime);//结束时间
-                let today = new Date();//当前时间
-                let delta_T = today.getTime() - endtime.getTime();//时间间隔
-                if (delta_T < 0) {
-                    //clearInterval(auto);
-                    //show_time.innerHTML = "倒计时已经结束";
-                }
-                let total_days = delta_T / (24 * 60 * 60 * 1000);//总天数
-                let total_show = Math.floor(total_days);//实际显示的天数
-                let total_hours = (total_days - total_show) * 24;//剩余小时
-                let hours_show = Math.floor(total_hours);//实际显示的小时数
-                let total_minutes = (total_hours - hours_show) * 60;//剩余的分钟数
-                let minutes_show = Math.floor(total_minutes);//实际显示的分钟数
-                let total_seconds = (total_minutes - minutes_show) * 60;//剩余的分钟数
-                let seconds_show = Math.floor(total_seconds);//实际显示的秒数
-
-                hours_show = hours_show < 9 ? "0" + hours_show : hours_show;
-                minutes_show = minutes_show < 9 ? "0" + minutes_show : minutes_show;
-                seconds_show = seconds_show < 9 ? "0" + seconds_show : seconds_show;
-                let str = hours_show + ":" + minutes_show + ":" + seconds_show;
-                this.classInfo.endTime = str;
+                let BeginTime = new Date(globalcurrent() + ' ' + this.BeginTime);//结束时间
+                let nowDate = new Date();
+                let date = new Date(nowDate - BeginTime);
+
+                let h = date.getHours() < 10 ? '0' + date.getHours() + ':' : date.getHours() + ':';
+                let m = date.getMinutes() < 10 ? '0' + date.getMinutes() + ':' : date.getMinutes() + ':';
+                let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
+                this.classInfo.endTime = h + m + s;
             },
-            // 计算双方对抗强度加总
-            CalcTeamCk() {
+            // // 计算双方对抗强度加总
+            // CalcTeamCk() {
+            //     let that = this;
+            //     let Redsum = 0;
+            //     let Bluesum = 0;
+            //     let sumMax = 0;
+            //     if (that.Redstudents) {
+            //         that.Redstudents.map(function (i) {
+            //             Redsum = parseFloat(Redsum) + parseFloat(i.Ck)
+            //         });
+            //     }
+            //     if (that.Bluestudents) {
+            //         that.Bluestudents.map(function (i) {
+            //             Bluesum = parseFloat(Bluesum) + parseFloat(i.Ck)
+            //         });
+            //     }
+            //     that.classInfo.redSum = parseFloat(Redsum).toFixed(1);
+            //     that.classInfo.blueSum = parseFloat(Bluesum).toFixed(1);
+            //
+            //     sumMax = parseFloat(Redsum) + parseFloat(Bluesum);
+            //     that.classInfo.pkVal = (that.classInfo.redSum / sumMax) * 100 + '%';
+            // },
+            // 当前课程状态
+            curgetClassStat() {
                 let that = this;
-                let Redsum = 0;
-                let Bluesum = 0;
-                let sumMax = 0;
-                if (that.Redstudents) {
-                    that.Redstudents.map(function (i) {
-                        Redsum = parseFloat(Redsum) + parseFloat(i.Ck)
-                    });
-                }
-                if (that.Bluestudents) {
-                    that.Bluestudents.map(function (i) {
-                        Bluesum = parseFloat(Bluesum) + parseFloat(i.Ck)
-                    });
-                }
-                that.classInfo.redSum = parseFloat(Redsum).toFixed(1);
-                that.classInfo.blueSum = parseFloat(Bluesum).toFixed(1);
-
-                sumMax = parseFloat(Redsum) + parseFloat(Bluesum);
-                that.classInfo.pkVal = (that.classInfo.redSum / sumMax) * 100 + '%';
-            }
+                let param = {
+                    token: localStorage.token,
+                    eqSn: localStorage.eqSn
+                };
+                let postdata = qs.stringify(param);
+                getClassStat(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // 没开课
+                        if (json.ClassOn == 0) {
+                            console.log("xiakele ");
+                            // 0: 下课 团课/私教 排名
+                            // 1:团课/私教 todo
+                            // 2:竞技课2PK
+                            // 3:竞技课3PK
+                            switch (parseInt(json.dp)) {
+                                case 0:
+                                    that.$router.push({path: '/2pkRank'});
+                                    break;
+                                case 1:
+                                    that.$router.push({path: '/'});
+                                    break;
+                                case 2:
+                                    that.$router.push({path: '/pk'});
+                                    break;
+                                case 3:
+                                    that.$router.push({path: '/3pk'});
+                                    break;
+                            }
+                        }
+                    } else {
+                        // that.$message.error(json.Memo);
+                    }
+                })
+            },
         },
         filters: {
             fmtNum(val) {
@@ -315,6 +464,32 @@
                 }
             }
         },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/pk') {
+                    if (this.trueDate) {
+                        this.PkTimer = setInterval(() => {
+                            this.GetgetUserList();
+                            this.ClacClassTime();
+                            this.curgetClassStat();
+                        }, 1000);
+                        this.GetgetUserList();
+
+                        // this.PkEgg = setInterval(() => {
+                        //     this.createEgg();
+                        // }, 6000);
+
+                    } else {
+                        let Rs = this.fakeNews(16);
+                        that.UniteBreak(Rs);
+
+                    }
+                } else {
+                    clearInterval(this.PkTimer);
+                    clearInterval(this.PkEgg);
+                }
+            }
+        },
         components: {
             Headside
         }
@@ -323,6 +498,7 @@
 
 <style scoped>
     @import "../assets/css/bg.css";
+
     .pages {
         position: absolute;
         top: 0;
@@ -369,7 +545,7 @@
         width: 100%;
         height: 0.3rem;
         overflow: visible;
-        background-color: #60B7FF;
+        background-color: #04A6EE;
         border-radius: 19px;
         background-image: url("../static/img/pk/blue.png");
         /*background-image: linear-gradient(45deg, #60b7ff 25%, #0a84e9 0, #0a84e9 50%, #60b7ff 0, #60b7ff 75%, #0a84e9 0);*/
@@ -379,7 +555,7 @@
     .progress-bar {
         height: 0.3rem;
         text-align: left;
-        background-color: #FF9960;
+        background-color: #F75E07;
         -moz-transition: width .6s ease;
         -webkit-transition: width .6s ease;
         transition: width .6s ease;
@@ -411,7 +587,7 @@
     .lp_icon {
         position: absolute;
         left: -0.1rem;
-        top: -0.2rem;
+        top: -0.3rem;
         width: 0.8rem;
         height: 0.8rem;
         float: left;
@@ -420,7 +596,7 @@
     .rp_icon {
         position: absolute;
         right: 0;
-        top: -0.2rem;
+        top: -0.3rem;
         width: 0.8rem;
         height: 0.8rem;
         float: right;
@@ -471,13 +647,13 @@
     }
 
     .pk_container .lt .bg {
-        border: 2px solid rgba(255, 255, 255, 0.3);
-        background: rgba(233, 53, 18, 0.67);
+        border: 2px solid rgba(255, 143, 122, 0.5);
+        background: rgba(194, 36, 6, 0.5);
     }
 
     .pk_container .rt .bg {
-        border: 2px solid rgba(255, 255, 255, 0.3);
-        background: rgba(7, 43, 188, 0.67);
+        border: 2px solid rgba(80, 115, 255, 0.5);
+        background: rgba(0, 30, 152, 0.5);
     }
 
 
@@ -957,12 +1133,15 @@
         height: 1.2rem;
         overflow: hidden;
     }
+
     .three .ult em div {
         line-height: 1.2rem;
     }
+
     .three .urt em {
         line-height: 1.2rem;
     }
+
     .three .bottomLi img {
         width: 0.4rem;
         height: 0.4rem;
@@ -1035,10 +1214,12 @@
         width: 90%;
         margin-right: 0.05rem;
         font-size: 0.5rem;
+        line-height: 1rem;
     }
 
     .four .user .ult s {
         font-size: 0.1rem;
+        line-height: 1rem;
     }
 
     .four .circle {
@@ -1054,11 +1235,12 @@
     .four .urt img {
         width: 0.2rem;
         height: 0.2rem;
+        top: -0.8rem;
     }
 
     .four .urt em {
         font-size: 0.4rem;
-        line-height: 0.7rem;
+        line-height: 1rem;
     }
 
     .four .bottomLi {
@@ -1076,6 +1258,10 @@
         width: 60%;
     }
 
+    .four .user {
+        height: 1.2rem;
+        overflow: hidden;
+    }
 
     /*six*/
 
@@ -1094,46 +1280,46 @@
     }
 
     .pk_container li.eight .bg > h5 {
-        font-size: 0.15rem;
-        margin-top: 0.05rem;
-        margin-bottom: 0.05rem;
+        font-size: 0.25rem;
+        margin: 0.01rem 0;
     }
 
     .eight .user .ult span {
-        font-size: 0.1rem;
+        font-size: 0.2rem;
 
     }
 
     .eight .user .ult em div {
         width: 90%;
-        margin-right: 0.15rem;
-        font-size: 0.4rem;
+        margin-right: 0.05rem;
+        font-size: 0.5rem;
+        line-height: 1rem;
     }
 
     .eight .user .ult s {
         font-size: 0.1rem;
-        top: -0.5rem;
-        right: 0.02rem;
+        line-height: 1rem;
     }
 
     .eight .circle {
-        width: 0.8rem;
-        height: 0.8rem;
+        width: 1rem;
+        height: 1rem;
     }
 
     .eight .user .umd img {
-        width: 0.6rem;
-        height: 0.6rem;
+        width: 0.8rem;
+        height: 0.8rem;
     }
 
     .eight .urt img {
-        width: 0.1rem;
-        height: 0.1rem;
+        width: 0.2rem;
+        height: 0.2rem;
+        top: -0.8rem;
     }
 
     .eight .urt em {
         font-size: 0.4rem;
-        line-height: 0.7rem;
+        line-height: 1rem;
     }
 
     .eight .bottomLi {
@@ -1151,4 +1337,12 @@
         width: 60%;
     }
 
+    .eight .user {
+        height: 1.2rem;
+        overflow: hidden;
+    }
+
+    .pk_container .rt li {
+        float: right;
+    }
 </style>

+ 3 - 2
tv/vue.config.js

@@ -22,8 +22,9 @@ module.exports = {
                 // target: 'http://192.168.0.105:8080/',//小飞龙的
                 // target: 'http://192.168.0.162:9000/',//PC的
                 // target: 'http://192.168.0.110:8080',//公司公用的
-                target: 'http://192.168.0.196:8080',//树莓派
-                // target: 'http://192.168.0.243:9000/',//郑伟机器的
+                // target: 'http://192.168.0.196:8080',//树莓派
+                target: 'http://192.168.0.245:8080',//郑伟机器的2
+                // target: 'http://192.168.0.243:9000/',//刘海生机器的
                 // target: ' http://192.168.0.222:9000/',//redmi的
                 changeOrigin: true,
                 pathRewrite: {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor