فهرست منبع

添加新会员,上课时间单位为秒

Changpeng Duan 5 سال پیش
والد
کامیت
9271e22147

+ 5 - 1
pc/README.md

@@ -20,6 +20,10 @@ http://192.168.0.3:19095/v1/docs/index.html
 
 基于 https://panjiachen.github.io/vue-element-admin-site/zh/guide/ 的版本, 只保留常用功能和修改部分UI效果  
 
+## uuid 
+电视 28354  盒子 9e13c 网页309c2 段手机 8e501
+
+
 ##安装:  
 
 ###克隆项目  
@@ -176,4 +180,4 @@ order
 ========
 常用键值
 
-wxVisible 0不可见1可见
+wxVisible 0不可见1可见

+ 32 - 2
pc/src/api/Navs.js

@@ -1,3 +1,4 @@
+// 1 会员 2 系统 3 店铺 4 教练
 let navs = [
     {
         "clmid": "1",
@@ -210,7 +211,7 @@ let navs = [
         "show": 4,
         "grouplist": "2,5",
         "icon": "el-icon-bank-card",
-    },{
+    }, {
         "clmid": "11",
         "clmcode": "finish",
         "clmname": "下课管理",
@@ -229,7 +230,18 @@ let navs = [
         "show": 4,
         "grouplist": "2,5",
         "icon": "el-icon-setting",
-    }, {
+    },
+    {
+        "clmid": "21",
+        "clmcode": "courses",
+        "clmname": "课程管理",
+        "clmurl": "/courses",
+        "prname": "",
+        "show": 4,
+        "grouplist": "2,5",
+        "icon": "el-icon-bank-card",
+    },
+    {
         "clmid": "16",
         "clmcode": "heartEquip",
         "clmname": "心率设备",
@@ -247,6 +259,24 @@ let navs = [
         "show": 3,//2
         "grouplist": "2,5",
         "icon": "el-icon-map-location",
+    }, {
+        "clmid": "16",
+        "clmcode": "heartEquip",
+        "clmname": "心率设备",
+        "clmurl": "/heartEquip",
+        "prname": "",
+        "show": 4,//2
+        "grouplist": "2,5",
+        "icon": "el-icon-cpu",
+    }, {
+        "clmid": "17",
+        "clmcode": "region",
+        "clmname": "区域管理",
+        "clmurl": "/region",
+        "prname": "",
+        "show": 4,//2
+        "grouplist": "2,5",
+        "icon": "el-icon-map-location",
     },
 ];
 

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

@@ -687,3 +687,15 @@ export function ClassDetailAndSnAdd(postdata) {
 }
 
 
+export function ClassStartConfirm(postdata) {
+    let url = headapi + 'v1/SchoolTimeTable/ClassStartConfirm ';
+    return getApiBasic(url, postdata);
+}
+
+// 修改心率系统区域和课程类型
+export function DispPlanInfoEdit(postdata) {
+    let url = headapi + 'v1/SchoolTimeTable/DispPlanInfoEdit ';
+    return getApiBasic(url, postdata);
+}
+
+

+ 2 - 3
pc/src/assets/css/panel.css

@@ -308,10 +308,9 @@
     margin-right: 0;
 }
 
-.el-transfer-panel__item.el-checkbox .el-checkbox__label {
+.el-transfer-panel__item.el-checkbox .el-checkbox__label span{
+    /*width: 50%;*/
     text-align: left;
-    float: left;
-    text-indent: 20px;
 }
 
 .el-transfer__buttons button {

+ 11 - 13
pc/src/views/Main.vue

@@ -123,7 +123,8 @@
                     <!--                    TodayVipOrder-->
                     <li v-for="as in appointList" @click="goAppointDetail(as.UserName)">
                         <div class="asTitle">
-                            <img src="../assets/img/main/Oval.png" alt="">
+                            <img :src="as.Head" alt="" v-if="as.Head" width="25px" height="25px">
+                            <img src="../assets/img/nav/head.png" alt="" v-else width="25px" height="25px">
                             <span>
                                 {{ as.UserName }}
                                 {{ as.Phone }}  &nbsp; &nbsp; &nbsp;
@@ -301,19 +302,16 @@
             },
             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);
+                // courseEdit
+                this.$router.push({
+                    path: '/courseEdit', query: {
+                        StdId: row.StdId,
+                        ClassName: row.ClassName,
+                        BeginStr: row.BeginStr,
+                        EndStr: row.EndStr,
+                        FinishClass: row.FinishClass,
                     }
-                })
+                });
             },
             goFinish(row) {
                 this.$router.push({

+ 6 - 3
pc/src/views/courses.vue

@@ -186,6 +186,7 @@
         ClassDetailQuery,
         QueryShopVenue,
         ClassStartPrepare,
+        DispPlanInfoEdit,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -297,7 +298,6 @@
                 this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
                 this.form.StdId = row.StdId;
                 this.getQueryShopVenue();
-                console.log( row.SvId);
                 this.form.svId = row.SvId;
                 this.form.classType = row.ClassType;
                 this.form.pkNum = row.PkNum;
@@ -334,6 +334,7 @@
                                 ClassName:  that.form.ClassName,
                                 BeginStr:  that.form.BeginStr,
                                 EndStr:  that.form.EndStr,
+                                FinishClass:3,
                             }
                         });
                     } else {
@@ -360,7 +361,7 @@
                     pkNum: uppkNum,
                 };
                 let postdata = qs.stringify(param);
-                ClassStartPrepare(postdata).then(res => {
+                DispPlanInfoEdit(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
                         // NewId: 0
@@ -388,6 +389,7 @@
                         ClassName: row.ClassName,
                         BeginStr: row.BeginStr,
                         EndStr: row.EndStr,
+                        FinishClass: row.FinishClass,
                     }
                 });
             },
@@ -452,6 +454,7 @@
                 this.form.ClassName= row.ClassName;
                 this.form.BeginStr= row.BeginStr;
                 this.form.EndStr= row.EndStr;
+                this.form.EndStr= row.FinishClass;
 
                 this.className = row.ClassName + ' ' + row.BeginStr + ' - ' + row.EndStr;
                 this.form.StdId = row.StdId;
@@ -580,7 +583,7 @@
         },
         watch: {
             $route(to) {
-                if (to.name == 'finish') {
+                if (to.name == 'courses') {
                     this.getTableQuery();
                 }
             },

+ 5 - 4
pc/src/views/finishDetail.vue

@@ -475,12 +475,13 @@
             },
             // 确认下课
             addFinish() {
+                let that = this;
                 this.clearForm();
                 // 重新获得教练名单
-                this.getCoachOption();
-                this.dialogFinishVisible = true
-                this.btnType = 0;
-                this.dialogTitle = '确认下课'
+                that.getCoachOption();
+                that.dialogFinishVisible = true;
+                that.btnType = 0;
+                that.dialogTitle = '确认下课'
             },
             // 添加下课会员
             addFinishMember() {

+ 84 - 48
pc/src/views/heartEquip.vue

@@ -49,22 +49,22 @@
                         <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
                     </template>
                 </el-table-column>
-                <el-table-column
-                        type="index"
-                        label="序号"
-                        align="center"
+                <!--<el-table-column-->
+                <!--type="index"-->
+                <!--label="序号"-->
+                <!--align="center"-->
 
-                        width="50">
-                </el-table-column>
+                <!--width="50">-->
+                <!--</el-table-column>-->
                 <el-table-column
-                        prop="Sn"
-                        label="序列号"
+                        prop="InVenueNo"
+                        label="馆内编号"
                         align="center"
                 >
                 </el-table-column>
                 <el-table-column
                         prop="Sn"
-                        label="实体编号"
+                        label="序列号"
                         align="InVenueNo"
                 >
                 </el-table-column>
@@ -97,7 +97,7 @@
                     <template slot-scope="scope">
                         <!--1:启用  8:暂停  9:删除-->
                         <span v-if="scope.row.Status == 1" style="color: #67c23a">已启用</span>
-                        <span v-if="scope.row.Status == 8" style="color: yellow">已暂停</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>
@@ -106,6 +106,15 @@
                         label="操作"
                 >
                     <template slot-scope="scope">
+                        <el-button type="success" v-if="scope.row.Status == 8" size="mini"
+                                   @click="pauseRow(scope.row,1)">
+                            启用
+                        </el-button>
+                        <el-button type="warning" v-if="scope.row.Status == 1" size="mini"
+                                   @click="pauseRow(scope.row,8)">
+                            暂停
+                        </el-button>
+
                         <el-button type="text" @click="goPage(scope.row)">记录</el-button>
                     </template>
                 </el-table-column>
@@ -123,12 +132,12 @@
             <div class="dialogContent">
                 <div class="">
                     <el-form ref="form" :model="form" label-width="160px">
-                        <el-form-item label="编号" :required="true">
-                            <el-input v-model="form.sn"></el-input>
-                        </el-form-item>
-                        <el-form-item label="实体编号">
+                        <el-form-item label="馆内编号" :required="true">
                             <el-input v-model="form.venueNo"></el-input>
                         </el-form-item>
+                        <el-form-item label="序列号" :required="true">
+                            <el-input v-model="form.sn"></el-input>
+                        </el-form-item>
                     </el-form>
                 </div>
             </div>
@@ -154,6 +163,7 @@
         HrSensorsStatusEdit,
         EditHrSensors,
         UnBindHrSensorsToUser,
+        ShopVenueEquipEditStatus,
     } from "../api/getApiRes";
 
     let qs = require('qs');
@@ -178,7 +188,7 @@
                     USERCODE: '',
                     endType: '',
                     taskstatus: 99,
-                    status: 1,
+                    status: "",
                     draw: 1,
                     start: 0,
                     recordsTotal: 0,
@@ -191,6 +201,7 @@
                     multipleSelection: [],
                     detectedmac: '',
                     statusOptions: [
+                        {value: "", label: '全部'},
                         {value: 1, label: '启用'},
                         {value: 8, label: '暂停'},
                         {value: 9, label: '删除'},
@@ -338,44 +349,67 @@
                 this.dialogTitle = '编辑心率设备'
             },
             // 禁用
-            pauseRow(row) {
+            pauseRow(row, status) {
                 let that = this;
-                this.$confirm('是否禁用用户' + row.name + '?', '禁用操作', {
-                    confirmButtonText: '确定',
-                    cancelButtonText: '取消',
-                    type: 'warning'
-                }).then(() => {
-                    let param = {
-                        token: localStorage.token,
-                        Id: row.Id,
-                        status: 0,
-                    };
-                    let postdata = qs.stringify(param);
-                    testTable(postdata).then(res => {
-                        let json = res;
-                        if (json.Code == 0) {
-                            that.$message({
-                                showClose: true,
-                                message: row.name + '禁用成功!',
-                                type: 'success'
-                            });
-                            // table 重载
-                            that.getTableQuery();
-                        } else {
-                            that.$message.error(json.Memo);
-                        }
-                    })
-                }).catch(() => {
-                    this.$message({
-                        type: 'info',
-                        message: '已取消禁用'
-                    });
-                });
+                let param = {
+                    token: localStorage.token,
+                    hrId: row.HrId,
+                    status: status,//1:启用 8:暂停 9:删除
+                };
+                let postdata = qs.stringify(param);
+                HrSensorsStatusEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '执行成功!',
+                            type: 'success'
+                        });
+                        // table 重载
+                        that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
             },
+            // pauseRow(row) {
+            //     let that = this;
+            //     this.$confirm('是否禁用心率设备' + row.Sn + '?', '禁用操作', {
+            //         confirmButtonText: '确定',
+            //         cancelButtonText: '取消',
+            //         type: 'warning'
+            //     }).then(() => {
+            //         let param = {
+            //             token: localStorage.token,
+            //             shopId : localStorage.token,
+            //             status: 8,
+            //         };
+            //         let postdata = qs.stringify(param);
+            //         ShopVenueEquipEditStatus(postdata).then(res => {
+            //             let json = res;
+            //             if (json.Code == 0) {
+            //                 that.$message({
+            //                     showClose: true,
+            //                     message: row.name + '禁用成功!',
+            //                     type: 'success'
+            //                 });
+            //                 // table 重载
+            //                 that.getTableQuery();
+            //             } else {
+            //                 that.$message.error(json.Memo);
+            //             }
+            //         })
+            //     }).catch(() => {
+            //         this.$message({
+            //             type: 'info',
+            //             message: '已取消禁用'
+            //         });
+            //     });
+            // },
             // 启用
             runRow(row) {
                 let that = this;
-                this.$confirm('是否启用用户' + row.name + '?', '启用操作', {
+                this.$confirm('是否启用心率设备' + row.Sn + '?', '启用操作', {
                     confirmButtonText: '确定',
                     cancelButtonText: '取消',
                     type: 'warning'
@@ -594,6 +628,8 @@
             clearForm() {
                 // clear
                 this.form.name = '';
+                this.form.sn = '';
+                this.form.venueNo = '';
                 this.form.phone = '';
                 this.form.userCode = '';
                 this.form.shopId = '';

+ 52 - 6
pc/src/views/region.vue

@@ -33,7 +33,7 @@
                 <el-table-column
                         prop="Name"
                         label="区域名称"
-                        width="180">
+                        width="240">
                 </el-table-column>
                 <el-table-column
                         prop="Base.CreatedAt"
@@ -41,11 +41,32 @@
                         :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: greenyellow">已启用</span>
+                        <span v-if="scope.row.Status == 8" style="color: #E6A23C">已暂停</span>
+                        <span v-if="scope.row.Status == 9" style="color: red">已删除</span>
+                    </template>
+
+                </el-table-column>
                 <el-table-column
                         prop="id"
                         label="操作"
                 >
                     <template slot-scope="scope">
+                        <el-button type="success" v-if="scope.row.Status == 8" size="mini"
+                                   @click="pauseRow(scope.row,1)">
+                            启用
+                        </el-button>
+                        <el-button type="warning" v-if="scope.row.Status == 1" size="mini"
+                                   @click="pauseRow(scope.row,8)">
+                            暂停
+                        </el-button>
+
                         <el-button type="text" @click="goPage(scope.row)">所属设备</el-button>
                     </template>
                 </el-table-column>
@@ -204,11 +225,36 @@
             //         });
             //     });
             // },
+            // 禁用
+            pauseRow(row, status) {
+                let that = this;
+                let param = {
+                    key : localStorage.ServiceKey,
+                    shopId: localStorage.ServiceId,
+                    svId: row.SvId,
+                    status: status,
+                };
+                let postdata = qs.stringify(param);
+                ShopVenueStatusEdit(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.$message({
+                            showClose: true,
+                            message: '执行成功!',
+                            type: 'success'
+                        });
+                        // table 重载
+                        that.getTableQuery();
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
             goPage(row) {
                 this.$router.push({
                     path: '/heartLog', query: {
                         name: row.Name,
-                        svId : row.SvId
+                        svId: row.SvId
                     }
                 });
             },
@@ -363,7 +409,7 @@
                 let param = {
                     key: localStorage.ServiceKey,
                     shopId: localStorage.ServiceId,
-                    name:this.form.name
+                    name: this.form.name
                 };
                 let postdata = qs.stringify(param);
                 AddShopVenue(postdata).then(res => {
@@ -397,8 +443,8 @@
                 let param = {
                     key: localStorage.ServiceKey,
                     shopId: localStorage.ServiceId,
-                    svId:this.form.svId,
-                    name:this.form.name,
+                    svId: this.form.svId,
+                    name: this.form.name,
                 };
                 let postdata = qs.stringify(param);
                 EditShopVenue(postdata).then(res => {
@@ -463,7 +509,7 @@
                 let param = {
                     key: localStorage.ServiceKey,
                     shopId: localStorage.ServiceId,
-                    svId:this.tableRadio.SvId,
+                    svId: this.tableRadio.SvId,
                     status: 9,// 1:启用 8:暂停 9:删除
                 };
                 let postdata = qs.stringify(param);

+ 84 - 103
tv/.idea/workspace.xml

@@ -23,12 +23,23 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="c813a37b-038b-4bb1-a925-c03a432a7638" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/../pc/src/components/upHead.vue" afterDir="false" />
+      <change afterPath="$PROJECT_DIR$/src/components/upimg.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/README.md" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/Global.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/Global.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/api/Navs.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/Navs.js" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/api/getApiRes.js" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/assets/css/panel.css" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/assets/css/panel.css" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/Main.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Main.vue" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/../pc/src/views/Member.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/Member.vue" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/../pc/src/views/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/finishDetail.vue" beforeDir="false" afterPath="$PROJECT_DIR$/../pc/src/views/finishDetail.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/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/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" />
     </list>
     <ignored path="$PROJECT_DIR$/.tmp/" />
@@ -43,53 +54,19 @@
   <component name="FileEditorManager">
     <leaf>
       <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/vue.config.js">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="378">
-              <caret line="18" column="18" selection-start-line="18" selection-start-column="18" selection-end-line="18" selection-end-column="18" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/api/getApiRes.js">
+        <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="359">
-              <caret line="46" column="39" selection-start-line="46" selection-start-column="25" selection-end-line="46" selection-end-column="39" />
-              <folding>
-                <element signature="e#0#26#0" expanded="true" />
-              </folding>
+            <state relative-caret-position="660">
+              <caret line="347" column="29" lean-forward="true" selection-start-line="334" selection-start-column="26" selection-end-line="347" selection-end-column="29" />
             </state>
           </provider>
         </entry>
       </file>
       <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="531">
-              <caret line="63" column="53" selection-start-line="63" selection-start-column="39" selection-end-line="63" selection-end-column="53" />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file pinned="false" current-in-tab="false">
-        <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="18" selection-start-line="14" selection-start-column="14" selection-end-line="14" selection-end-column="18" />
-              <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/Main.vue">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="485">
-              <caret line="299" column="36" selection-start-line="299" selection-start-column="29" selection-end-line="299" selection-end-column="36" />
+            <state relative-caret-position="357">
+              <caret line="259" column="18" selection-start-line="259" selection-start-column="4" selection-end-line="259" selection-end-column="18" />
               <folding>
                 <element signature="e#5168#5212#0" expanded="true" />
               </folding>
@@ -97,27 +74,6 @@
           </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="569">
-              <caret line="142" column="28" lean-forward="true" selection-start-line="142" selection-start-column="28" selection-end-line="142" selection-end-column="28" />
-              <folding>
-                <element signature="e#2820#2864#0" expanded="true" />
-              </folding>
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <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="1052">
-              <caret line="347" column="14" lean-forward="true" selection-start-line="314" selection-start-column="9" selection-end-line="347" selection-end-column="14" />
-            </state>
-          </provider>
-        </entry>
-      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -125,20 +81,13 @@
       <list>
         <option value="HTML File" />
         <option value="JavaScript File" />
-        <option value="Vue Single File Component" />
         <option value="CSS File" />
+        <option value="Vue Single File Component" />
       </list>
     </option>
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>bottomLi</find>
-      <find>.bottomLi img</find>
-      <find>bottomLi .step</find>
-      <find>.bottomLi span</find>
-      <find>two</find>
-      <find>getUserListInfo</find>
-      <find>param</find>
       <find>ClassStat</find>
       <find>UserListInfo</find>
       <find>pageStyle</find>
@@ -159,16 +108,26 @@
       <find>JSON.stringify(e).uuid</find>
       <find>ClassUserRank</find>
       <find>ClassStatQuery</find>
-      <find>curgetClassStat</find>
       <find>999</find>
+      <find>push</find>
+      <find>.push</find>
+      <find>json.dp</find>
+      <find>curgetClassStat</find>
+      <find>wait</find>
+      <find>timer2</find>
       <find>OpenEgg</find>
+      <find>createEgg</find>
+      <find>timer</find>
     </findStrings>
     <replaceStrings>
       <replace>0.2rem</replace>
       <replace>parseInt(res.length)</replace>
       <replace>font-family: vista;</replace>
-      <replace>JSON.stringify(e.uuid)</replace>
       <replace>eqSn</replace>
+      <replace>JSON.stringify(e.uuid)</replace>
+      <replace>rankTimer</replace>
+      <replace>mainTimer</replace>
+      <replace>waitTimer</replace>
     </replaceStrings>
   </component>
   <component name="Git.Settings">
@@ -199,10 +158,11 @@
         <option value="$PROJECT_DIR$/src/views/pk.vue" />
         <option value="$PROJECT_DIR$/src/assets/css/bg.css" />
         <option value="$PROJECT_DIR$/vue.config.js" />
-        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
-        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
         <option value="$PROJECT_DIR$/src/views/Index.vue" />
+        <option value="$PROJECT_DIR$/src/views/Wait.vue" />
+        <option value="$PROJECT_DIR$/src/views/Rank.vue" />
         <option value="$PROJECT_DIR$/src/views/Main.vue" />
+        <option value="$PROJECT_DIR$/src/components/upimg.vue" />
       </list>
     </option>
   </component>
@@ -213,10 +173,9 @@
     <auto-save>true</auto-save>
   </component>
   <component name="ProjectFrameBounds" extendedState="1">
-    <option name="x" value="-2568" />
-    <option name="y" value="-8" />
-    <option name="width" value="1296" />
-    <option name="height" value="1395" />
+    <option name="x" value="-1287" />
+    <option name="width" value="1294" />
+    <option name="height" value="1386" />
   </component>
   <component name="ProjectId" id="1jXXjXdwK5v7WohMBoZDModntXR" />
   <component name="ProjectLevelVcsManager" settingsEditedManually="true">
@@ -241,6 +200,12 @@
               <item name="tv" type="462c0819:PsiDirectoryNode" />
               <item name="src" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="tv" type="b2602c69:ProjectViewProjectNode" />
+              <item name="tv" type="462c0819:PsiDirectoryNode" />
+              <item name="src" type="462c0819:PsiDirectoryNode" />
+              <item name="components" type="462c0819:PsiDirectoryNode" />
+            </path>
             <path>
               <item name="tv" type="b2602c69:ProjectViewProjectNode" />
               <item name="tv" type="462c0819:PsiDirectoryNode" />
@@ -287,6 +252,7 @@
     <property name="nodejs_package_manager_path" value="npm" />
     <property name="restartRequiresConfirmation" value="false" />
     <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
+    <property name="ts.external.directory.path" value="D:\Program Files\JetBrains\PhpStorm 2018.3.3\plugins\JavaScriptLanguage\jsLanguageServicesImpl\external" />
     <property name="vue.rearranger.settings.migration" value="true" />
   </component>
   <component name="RecentsManager">
@@ -363,7 +329,7 @@
       <workItem from="1605406240238" duration="51039000" />
       <workItem from="1605668164423" duration="15041000" />
       <workItem from="1605747566783" duration="13000" />
-      <workItem from="1605775278675" duration="27378000" />
+      <workItem from="1605775278675" duration="35561000" />
     </task>
     <task id="LOCAL-00001" summary="test web">
       <created>1605431368250</created>
@@ -460,27 +426,28 @@
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="257470000" />
+    <option name="totallyTimeSpent" value="265653000" />
   </component>
   <component name="ToolWindowManager">
-    <frame x="-2568" y="-8" width="1296" height="1395" extended-state="1" />
+    <frame x="-1287" y="0" width="1294" height="1386" extended-state="1" />
     <editor active="true" />
     <layout>
       <window_info content_ui="combo" id="Project" order="0" weight="0.29641694" />
       <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="TypeScript" />
       <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" weight="0.31086773" />
+      <window_info anchor="bottom" id="Run" order="2" sideWeight="0.49920255" weight="0.31086773" />
       <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" side_tool="true" weight="0.32940185" />
+      <window_info anchor="bottom" id="Event Log" order="8" sideWeight="0.50079745" side_tool="true" weight="0.3319185" />
       <window_info anchor="bottom" id="Version Control" order="9" weight="0.3285594" />
-      <window_info anchor="bottom" id="Terminal" order="10" weight="0.17354676" />
+      <window_info anchor="bottom" id="Terminal" order="10" visible="true" weight="0.17487267" />
       <window_info anchor="bottom" id="Database Changes" order="11" />
       <window_info anchor="right" id="Commander" order="0" weight="0.4" />
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@@ -774,44 +741,58 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Rank.vue">
+    <entry file="file://$PROJECT_DIR$/vue.config.js">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="569">
-          <caret line="142" column="28" lean-forward="true" selection-start-line="142" selection-start-column="28" selection-end-line="142" selection-end-column="28" />
-          <folding>
-            <element signature="e#2820#2864#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="378">
+          <caret line="18" column="18" selection-start-line="18" selection-start-column="18" selection-end-line="18" selection-end-column="18" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/vue.config.js">
+    <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="378">
-          <caret line="18" column="18" selection-start-line="18" selection-start-column="18" selection-end-line="18" selection-end-column="18" />
+        <state relative-caret-position="594">
+          <caret line="63" column="53" selection-start-line="63" selection-start-column="39" selection-end-line="63" selection-end-column="53" />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/views/Wait.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="1052">
-          <caret line="347" column="14" lean-forward="true" selection-start-line="314" selection-start-column="9" selection-end-line="347" selection-end-column="14" />
+        <state relative-caret-position="660">
+          <caret line="347" column="29" lean-forward="true" selection-start-line="334" selection-start-column="26" selection-end-line="347" selection-end-column="29" />
         </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="485">
-          <caret line="299" column="36" selection-start-line="299" selection-start-column="29" selection-end-line="299" selection-end-column="36" />
-          <folding>
-            <element signature="e#5168#5212#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="177">
+          <caret line="55" lean-forward="true" selection-start-line="55" selection-end-line="55" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/views/Index.vue">
+    <entry file="file://$PROJECT_DIR$/src/components/upimg.vue">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="531">
-          <caret line="63" column="53" selection-start-line="63" selection-start-column="39" selection-end-line="63" selection-end-column="53" />
+        <state relative-caret-position="399">
+          <caret line="19" column="8" lean-forward="true" selection-end-line="20" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$USER_HOME$/AppData/Local/Temp/360zip$Temp/360$0/index.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-252" />
+      </provider>
+    </entry>
+    <entry file="file://$USER_HOME$/AppData/Local/Temp/360zip$Temp/360$1/image.ts">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="-3276" />
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/views/Main.vue">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="357">
+          <caret line="259" column="18" selection-start-line="259" selection-start-column="4" selection-end-line="259" selection-end-column="18" />
+          <folding>
+            <element signature="e#5168#5212#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 20 - 0
tv/src/components/upimg.vue

@@ -0,0 +1,20 @@
+<template>
+    <div>
+        <h5>upimg</h5>
+
+
+    </div>
+</template>
+
+<script>
+    const qiniu = require('qiniu-js');
+    // or
+    import * as qiniu from 'qiniu-js';
+    export default {
+
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 21 - 15
tv/src/views/Main.vue

@@ -128,7 +128,7 @@
     {
         getHello,
         getRecordBreak,
-        // getClassStat
+        getClassStat
     } from '@/api/getApiRes'
     import newRecord from '@/components/newRecord'
     import '../libs/rem';
@@ -216,7 +216,7 @@
         },
         mounted() {
             if (this.trueDate) {
-                this.timer = setInterval(() => {
+                this.mainTimer = setInterval(() => {
                     this.GetgetUserList();
                     this.curgetClassStat();
                 }, 1000);
@@ -229,7 +229,7 @@
             } else {
                 // 彩蛋
                 // this.OpenEgg(this.fakeEgg);
-                this.timer = setInterval(() => {
+                this.mainTimer = setInterval(() => {
                     this.students = this.fakeNews();
                     this.giveClassName(this.students);
                 }, 1000);
@@ -287,7 +287,7 @@
                 alert(info);
             },
             // 启动一个成就彩蛋
-            createEgg(msg) {
+            createEgg() {
                 let that = this;
                 let param = {
                     token: localStorage.token,
@@ -297,11 +297,12 @@
                 getRecordBreak(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
+                        console.log(json);
                         this.OpenEgg(json);
                     } else {
                         // 并没有人破记录
                         if (json.Code == 999) return false;
-                        if (json.Code != 999) that.$message.error(json.Memo+'[egg]');
+                        if (json.Code != 999) that.$message.error(json.Memo + '[egg]');
                     }
                 })
             },
@@ -323,7 +324,7 @@
                 let that = this;
                 let param = {
                     token: localStorage.token,
-                    eqSn:localStorage.eqSn
+                    eqSn: localStorage.eqSn
                 };
                 let postdata = qs.stringify(param);
 
@@ -355,12 +356,11 @@
                         // this.createEgg(that.students[4]);
                     } else {
                         // 已下课
-                        console.log(json.Code);
                         if (json.Code == '999') {
                             // 没人不做处理
-                        //     that.$router.push({path: '/rank'});
+                            //     that.$router.push({path: '/rank'});
                         } else {
-                        //     // 已出错
+                            //     // 已出错
                             that.$message.error(json.Memo);
                         }
                     }
@@ -377,13 +377,16 @@
                     let json = res;
                     if (json.Code == 0) {
                         // 没开课
-                        if (json.ClassOn == false) return false;
-                        if  (json.ClassOn){
-                            // 上课了
+                        console.log("ClassOn:" + json.ClassOn);
+                        if  (json.ClassOn== 0){
+                            console.log("xiakele ");
                             // 1:团课
                             // 2:竞技课PK
                             // 3:私教课
                             switch (parseInt(json.dp)) {
+                                case 0:
+                                    that.$router.push({path: '/rank'});
+                                    break;
                                 case 1:
                                     that.$router.push({path: '/'});
                                     break;
@@ -499,18 +502,21 @@
             '$route': function (val) {
                 if (val.path == '/') {
                     if (this.trueDate) {
-                        this.timer = setInterval(() => {
+                        this.mainTimer = setInterval(() => {
                             this.GetgetUserList();
-                            // this.curgetClassStat();
+                            this.curgetClassStat();
                         }, 1000);
                         this.GetgetUserList();
+                        this.timer2 = setInterval(() => {
+                            this.createEgg();
+                        }, 6000);
                     } else {
                         this.students = this.fakeNews();
                         this.giveClassName(this.students);
                         // this.createEgg(this.students[5]);
                     }
                 } else {
-                    clearInterval(this.timer);
+                    clearInterval(this.mainTimer);
                     clearInterval(this.timer2);
                 }
             }

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

@@ -78,12 +78,12 @@
         mounted() {
             if (this.trueDate) {
                 this.getClassUserRank();
-                this.timer = setInterval(() => {
+                this.rankTimer  = setInterval(() => {
                     this.getClassUserRank();
                 }, 5000);
 
             } else {
-                this.timer = setInterval(() => {
+                this.rankTimer  = setInterval(() => {
                     this.students.CkSort = this.fakeNews();
                     this.students.CalSort = this.fakeNews();
                 }, 5000);
@@ -102,7 +102,6 @@
                     }
                 }, 1000)
             }
-
         },
         methods: {
             fakeNews() {
@@ -139,7 +138,8 @@
                 ClassUserRank(postdata).then(res => {
                     let json = res;
                     if (json.Code == 0) {
-
+                        this.students.CkSort = json.Rs.CkSort;
+                        this.students.CalSort = json.Rs.CalSort;
                     } else {
                         if (json.Code == '999') {
                             that.$router.push({path: '/wait'});
@@ -176,6 +176,41 @@
                 }
             },
         },
+        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.CkSort = this.fakeNews();
+                            this.students.CalSort = 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
         }

+ 14 - 8
tv/src/views/Wait.vue

@@ -116,7 +116,7 @@
         },
         mounted() {
             if (this.trueDate) {
-                this.timer = setInterval(() => {
+                this.waitTimer = setInterval(() => {
                     // this.GetgetUserList();
                     this.curgetClassStat();
                     this.GetHerosRankingQuery();
@@ -313,6 +313,7 @@
                 })
             },
             curgetClassStat() {
+                console.log(123);
                 let that = this;
                 let param = {
                     token: localStorage.token,
@@ -321,15 +322,20 @@
                 let postdata = qs.stringify(param);
                 getClassStat(postdata).then(res => {
                     let json = res;
+                    console.log(json);
                     if (json.Code == 0) {
-                        // 没开课
-                        if (json.ClassOn == false) return false;
-                        if  (json.ClassOn){
-                            // 上课了
+                        // alert(JSON.stringify(json.ClassOn));
+                        // alert("alert:"+json.ClassOn);
+                        // 上课了
+                        if  (json.ClassOn== 1){
                             // 1:团课
                             // 2:竞技课PK
                             // 3:私教课
+                            // alert("alert:"+json.ClassOn);
                             switch (parseInt(json.dp)) {
+                                case 0:
+                                    that.$router.push({path: '/rank'});
+                                    break;
                                 case 1:
                                     that.$router.push({path: '/'});
                                     break;
@@ -349,9 +355,9 @@
         },
         watch: {
             '$route': function (val) {
-                if (val.path == '/rank') {
+                if (val.path == '/wait') {
                     if (this.trueDate) {
-                        this.timer = setInterval(() => {
+                        this.waitTimer = setInterval(() => {
                             this.curgetClassStat();
                             this.GetHerosRankingQuery();
                             this.GetCalorieStatsQuery();
@@ -362,7 +368,7 @@
                         this.topMsg = this.students[0];
                     }
                 } else {
-                    clearInterval(this.timer);
+                    clearInterval(this.waitTimer);
                 }
             }
         },