Переглянути джерело

Merge branch 'master' of git.beswell.com:duanchangpeng/flyLong

duanchangpeng 5 роки тому
батько
коміт
34228a0746
63 змінених файлів з 949 додано та 1899 видалено
  1. 3 3
      app/src/components/alert.vue
  2. 8 8
      app/src/page/appoint.vue
  3. 10 27
      pc/src/api/Navs.js
  4. 7 0
      pc/src/api/getApiRes.js
  5. 3 3
      pc/src/components/Headside.vue
  6. 3 3
      pc/src/components/Navside.vue
  7. 1 1
      pc/src/router/index.js
  8. 5 5
      pc/src/views/AcrossVip.vue
  9. 10 8
      pc/src/views/AdminManage.vue
  10. 1 1
      pc/src/views/AdminSetting.vue
  11. 1 1
      pc/src/views/Basic.vue
  12. 6 6
      pc/src/views/EditLessonManage.vue
  13. 6 6
      pc/src/views/EditLessonTable.vue
  14. 1 1
      pc/src/views/EditLessonTable2.vue
  15. 10 10
      pc/src/views/Equip.vue
  16. 8 8
      pc/src/views/Lesson.vue
  17. 36 27
      pc/src/views/LessonTable.vue
  18. 3 3
      pc/src/views/Log.vue
  19. 2 2
      pc/src/views/Login.vue
  20. 84 26
      pc/src/views/Main.vue
  21. 15 17
      pc/src/views/Member.vue
  22. 2 2
      pc/src/views/Pwd.vue
  23. 18 18
      pc/src/views/ShopManage.vue
  24. 19 19
      pc/src/views/appoint.vue
  25. 1 1
      pc/src/views/bindRecord.vue
  26. 1 1
      pc/src/views/classInfoDetail.vue
  27. 7 7
      pc/src/views/coach.vue
  28. 14 14
      pc/src/views/cost.vue
  29. 17 16
      pc/src/views/courseEdit.vue
  30. 6 6
      pc/src/views/courses.vue
  31. 6 6
      pc/src/views/coursesHistory.vue
  32. 2 2
      pc/src/views/finish.vue
  33. 9 9
      pc/src/views/finishDetail.vue
  34. 23 23
      pc/src/views/heartEquip.vue
  35. 25 24
      pc/src/views/heartEquipPerson.vue
  36. 7 7
      pc/src/views/heartLog.vue
  37. 8 8
      pc/src/views/lessonManage.vue
  38. 2 2
      pc/src/views/record.vue
  39. 30 26
      pc/src/views/region.vue
  40. 2 2
      pc/src/views/region2.vue
  41. 3 3
      pc/src/views/regionEquip.vue
  42. 7 7
      pc/src/views/relevancePhone.vue
  43. 2 2
      pc/src/views/setting.vue
  44. 6 4
      tv/README.md
  45. 2 0
      tv/package.json
  46. 57 2
      tv/src/Global.js
  47. BIN
      tv/src/api/wifi.png
  48. 58 11
      tv/src/components/Headside.vue
  49. 2 1
      tv/src/main.js
  50. 3 27
      tv/src/router/index.js
  51. 55 77
      tv/src/views/2pkRank.vue
  52. 62 81
      tv/src/views/3pkRank.vue
  53. 0 5
      tv/src/views/About.vue
  54. 0 21
      tv/src/views/Chart.vue
  55. 44 149
      tv/src/views/Main.vue
  56. 37 37
      tv/src/views/Rank.vue
  57. 37 26
      tv/src/views/Wait.vue
  58. 0 841
      tv/src/views/Wait2.vue
  59. 0 15
      tv/src/views/gropePk.vue
  60. 62 59
      tv/src/views/pk.vue
  61. 0 85
      tv/src/views/test.vue
  62. 89 86
      tv/src/views/threepk.vue
  63. 1 1
      tv/vue.config.js

+ 3 - 3
app/src/components/alert.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <mu-dialog title="警告" width="360" :open.sync="openSimple">
+    <mu-dialog title="通知" width="360" :open.sync="openSimple">
        {{text}}
       <mu-button slot="actions" flat color="primary" @click="closeSimpleDialog">关闭</mu-button>
     </mu-dialog>
@@ -12,7 +12,7 @@ export default {
   data() {
     return {
       openSimple: false,
-      text:'1111'
+      text:''
     };
   },
   methods: {
@@ -29,4 +29,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 8 - 8
app/src/page/appoint.vue

@@ -179,25 +179,25 @@ export default {
     numberToWeek(val) {
       switch (parseInt(val)) {
         case 1:
-          return '星期一'
+          return '星期一';
           break;
         case 2:
-          return '星期二'
+          return '星期二';
           break;
         case 3:
-          return '星期三'
+          return '星期三';
           break;
         case 4:
-          return '星期四'
+          return '星期四';
           break;
         case 5:
-          return '星期五'
+          return '星期五';
           break;
         case 6:
-          return '星期六'
+          return '星期六';
           break;
         case 0:
-          return '星期天'
+          return '星期天';
           break;
       }
     },
@@ -712,4 +712,4 @@ li .title span.lessons {
     top: 21%;
   }
 }
-</style>
+</style>

+ 10 - 27
pc/src/api/Navs.js

@@ -170,7 +170,7 @@ let navs = [
         "grouplist": "2,5",
         "icon": "el-icon-s-claim",
     },  {
-        "clmid": "15",
+        "clmid": "22",
         "clmcode": "setting",
         "clmname": "系统设置",
         "clmurl": "/adminSetting",
@@ -242,26 +242,8 @@ let navs = [
         "show": 4,
         "grouplist": "2,5",
         "icon": "el-icon-bank-card",
-    }, {
-        "clmid": "11",
-        "clmcode": "finish",
-        "clmname": "下课管理",
-        "clmurl": "/finish",
-        "prname": "",
-        "show": 4,
-        "grouplist": "2,5",
-        "icon": "el-icon-bell",
-    },
-    {
-        "clmid": "15",
-        "clmcode": "setting",
-        "clmname": "系统设置",
-        "clmurl": "/adminSetting",
-        "prname": "",
-        "show": 4,
-        "grouplist": "2,5",
-        "icon": "el-icon-setting",
     },
+
     {
         "clmid": "21",
         "clmcode": "courses",
@@ -281,15 +263,16 @@ let navs = [
         "show": 4,//2
         "grouplist": "2,5",
         "icon": "el-icon-cpu",
-    }, {
-        "clmid": "17",
-        "clmcode": "region",
-        "clmname": "区域管理",
-        "clmurl": "/region",
+    },
+    {
+        "clmid": "22",
+        "clmcode": "setting",
+        "clmname": "系统设置",
+        "clmurl": "/adminSetting",
         "prname": "",
-        "show": 4,//2
+        "show": 4,
         "grouplist": "2,5",
-        "icon": "el-icon-map-location",
+        "icon": "el-icon-setting",
     },
 ];
 

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

@@ -782,3 +782,10 @@ export function ShopGroupQuery(postdata) {
     let url = headapi + 'v1/Shop/ShopGroupQuery ';
     return getApiBasic(url, postdata);
 }
+
+//
+// 剩余课时统计
+export function ClassHourStatistics(postdata) {
+    let url = headapi + 'v1/SchoolTimeTable/ClassHourStatistics ';
+    return getApiBasic(url, postdata);
+}

+ 3 - 3
pc/src/components/Headside.vue

@@ -92,11 +92,11 @@
                         localStorage.ServiceKey = json.Rs.Shop.ServiceKey;
                     } else {
                         if(json.Code == 1010){
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                             that.$router.push({path: '/login', query: {status: 1}});
                             return false
                         }else{
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     }
                 })
@@ -150,7 +150,7 @@
                                 type: 'success'
                             });
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {

+ 3 - 3
pc/src/components/Navside.vue

@@ -99,11 +99,11 @@
                         this.panelSelect(json.Rs.ShopId);
                     } else {
                         if (json.Code == 1010) {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                             that.$router.push({path: '/login', query: {status: 1}});
                             return false
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     }
                 })
@@ -124,7 +124,7 @@
                             }
                         })
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
pc/src/router/index.js

@@ -98,7 +98,7 @@ const routes = [
                 component: () => import('@/views/AdminSetting.vue'),
                 meta: {
                     title: "系统设置",
-                    clmid: "17",
+                    clmid: "22",
                 }
             }, {
                 path: '/lessonManage',

+ 5 - 5
pc/src/views/AcrossVip.vue

@@ -271,7 +271,7 @@
                     if (json.Code == 0) {
                         that.form.vipList = turnResToOptionBySimViper(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -286,7 +286,7 @@
                     if (json.Code == 0) {
                         that.form.groupList = turnResToOptionByGroup(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -335,7 +335,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -382,7 +382,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -439,7 +439,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 10 - 8
pc/src/views/AdminManage.vue

@@ -84,11 +84,13 @@
         <el-table-column
             prop="Phone"
             label="手机号"
+            sortable
         >
         </el-table-column>
         <el-table-column
-            prop="AdminType "
+            prop="AdminType"
             label="角色"
+            sortable
         >
           <template slot-scope="scope">
             <!--                        // 1 会员 2 系统 3 店铺 4 教练-->
@@ -297,7 +299,7 @@ export default {
           that.panel.options = turnShopResToOption(json.Rs);
           that.panel.options.unshift({value: '', label: "全部"});
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -376,7 +378,7 @@ export default {
           // 重载列表
           that.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -452,7 +454,7 @@ export default {
           // 重载列表
           that.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -475,7 +477,7 @@ export default {
           that.form.shopId = json.Rs[0].ShopID;
           that.panel.options.unshift({value: '', label: "全部"});
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -511,7 +513,7 @@ export default {
             // 重载列表
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         });
       }).catch(() => {
@@ -540,7 +542,7 @@ export default {
           // 重载列表
           that.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -633,7 +635,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 1 - 1
pc/src/views/AdminSetting.vue

@@ -115,7 +115,7 @@
                         // 重载列表
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
pc/src/views/Basic.vue

@@ -74,7 +74,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 6 - 6
pc/src/views/EditLessonManage.vue

@@ -324,7 +324,7 @@
                         that.panel.options = turnClassResToOption(json.Rs)
                         console.log(that.panel.options);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -345,7 +345,7 @@
                         // row.WxOrder = json.Rs.WxOrder; //不支持联动
                         row.WxVisible = json.Rs.WxVisible;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -379,7 +379,7 @@
                         let curIndex = parseInt(this.activeName) - 1;
                         this.tabs[curIndex].tableData.splice(delIndex, 1)
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -427,7 +427,7 @@
                         // 提交课程内容
                         that.EditLessonTable(json.Id);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -489,7 +489,7 @@
                         });
                         // 提交后清掉内存里的课表
                         this.clearTableRAM();
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -631,7 +631,7 @@
                             that.recordsTotal = 0;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 6 - 6
pc/src/views/EditLessonTable.vue

@@ -276,7 +276,7 @@
                         if (json.Rs == null) return false
                         that.panel.options = turnClassResToOption(json.Rs)
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -295,7 +295,7 @@
                         row.TopLimit = json.Rs.TopLimit;
                         row.ConsumeHour = json.Rs.ConsumeHour;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -341,7 +341,7 @@
                         // 提交课程内容
                         that.EditLessonTable(id);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -381,7 +381,7 @@
                         // 提交课程内容
                         that.EditLessonTable(json.Id);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -463,7 +463,7 @@
                         // });
                         // 提交后清掉内存里的课表
                         // this.clearTableRAM();
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -599,7 +599,7 @@
                             that.recordsTotal = 0;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
pc/src/views/EditLessonTable2.vue

@@ -220,7 +220,7 @@
                         that.setPaginations();
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 10 - 10
pc/src/views/Equip.vue

@@ -372,7 +372,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -393,7 +393,7 @@
                         that.panel.regionidOptions = json.Rs;
                         that.panel.regionidOptions.unshift({Id: 0, Name: "全部", DisplayName: "全部"});
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -410,7 +410,7 @@
                         that.dialog.regionlevelOneIdOptions = json.Rs;
                         that.dialog.regionId = json.Rs[0].Id;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -439,7 +439,7 @@
                             }
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -572,7 +572,7 @@
                             that.getTableQuery();
                             that.dialog_state = false;
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -640,7 +640,7 @@
                             that.dialog.CoordsId = 0;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -745,7 +745,7 @@
                         that.dialog_state = false;
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 });
             },
@@ -809,7 +809,7 @@
                         that.dialog_state = false;
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 });
             },
@@ -833,7 +833,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -868,7 +868,7 @@
                     if (json.Code == 0) {
                         that.dialog.plateImgSrc = json.EncodeString;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 8 - 8
pc/src/views/Lesson.vue

@@ -380,7 +380,7 @@
                         that.dialogVisible = false;
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -433,7 +433,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -485,7 +485,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -524,7 +524,7 @@
                         // 重载列表
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -559,7 +559,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -587,7 +587,7 @@
                         // that.dialogdata = json.Rs;
                         that.form.dialogdata = turnResToOption(json.Rs)
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -612,7 +612,7 @@
                         // 重载列表
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -715,7 +715,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 36 - 27
pc/src/views/LessonTable.vue

@@ -50,22 +50,22 @@
                         sortable
                 >
                 </el-table-column>
-                <!--<el-table-column-->
-                        <!--prop="ShopId"-->
-                        <!--label="是否通用"-->
-                <!--&gt;-->
-                    <!--<template slot-scope="scope">-->
-                        <!--<el-switch-->
-                                <!--v-model="scope.row.allUse"-->
-                                <!--:active-value="1"-->
-                                <!--:inactive-value="0"-->
-                                <!--active-color="#409EFF"-->
-                                <!--inactive-color="#D9D9D9"-->
-                                <!--@change=changeShopId($event,scope.row)-->
-                        <!--&gt;-->
-                        <!--</el-switch>-->
-                    <!--</template>-->
-                <!--</el-table-column>-->
+                <el-table-column
+                        prop="ShopId"
+                        label="是否跨店"
+                >
+                    <template slot-scope="scope">
+                        <el-switch
+                                v-model="scope.row.allUse"
+                                :active-value="0"
+                                :inactive-value="switchTurn"
+                                active-color="#409EFF"
+                                inactive-color="#D9D9D9"
+                                @change=changeShopId($event,scope.row)
+                        >
+                        </el-switch>
+                    </template>
+                </el-table-column>
                 <el-table-column
                         prop="Status"
                         label="状态"
@@ -177,6 +177,7 @@
         data() {
             return {
                 previewShow: false,
+                switchTurn:localStorage.shopId,
                 previewDate: {},
                 BigTitle: '',
                 smallTitle: '',
@@ -233,18 +234,26 @@
                         that.previewDate.SttPlanPreviewClassList.sort((a, b) => a.ClassIndex - b.ClassIndex);//升序
                         that.previewShow = true;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
-            // 通用修改
+            // 跨店修改
             changeShopId(e, row) {
                 let that = this;
-                let shopId = !e ? 0 : 1;
+                let shopId = 0;
+                if(e != 0){
+                    shopId =  localStorage.shopId;
+                    row.allUse =  localStorage.shopId;
+                }else{
+                    shopId = 0;
+                    row.allUse =  0
+                }
+
                 let param = {
                     token: localStorage.token,
                     planId: row.PlanId,//
-                    shopId: shopId,//跨店课程,通用 >0: 本店特有课程,不通用
+                    shopId: shopId,//跨店课程,跨店 >0: 本店特有课程,不跨店
                 };
                 let postdata = qs.stringify(param);
                 SttPlanBasicShopEdit(postdata).then(res => {
@@ -256,9 +265,9 @@
                             type: 'success'
                         });
                         // 重载列表
-                        that.getTableQuery();
+                        // that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -301,7 +310,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -359,7 +368,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 // }).catch(() => {
@@ -407,7 +416,7 @@
                         that.getTableQuery();
                         this.dialogVisible = false;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 });
             },
@@ -431,7 +440,7 @@
                         // 重载列表
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 });
             },
@@ -473,7 +482,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 3 - 3
pc/src/views/Log.vue

@@ -211,7 +211,7 @@ export default {
           that.panel.shopOptions = turnShopResToOption(json.Rs);
           that.panel.shopOptions.unshift({value: '', label: "全部"});
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -231,7 +231,7 @@ export default {
           that.panel.options.unshift({value: '', label: "全部"});
           console.log(that.panel.options);
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -304,7 +304,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 2 - 2
pc/src/views/Login.vue

@@ -151,11 +151,11 @@ export default {
           }
         } else {
           if (json.Code == 1010) {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
             that.$router.push({path: '/login', query: {status: 1}});
             return false
           }
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 84 - 26
pc/src/views/Main.vue

@@ -37,11 +37,12 @@
                             </em>
                         </div>
                     </li>
-                    <li @click="goPage('lesson')">
+                    <li @click="goPage('lesson')" v-if="userLevel != 3">
                         <img src="../assets/img/main/lesson.png" height="54" width="54"/>
                         <div class="liRight">
                             <h5>课程数量</h5>
-                            <span>{{ ClassNum }}</span>
+                            <span>{{ ClassNum }}
+                            </span>
                         </div>
                         <div class="btLine">
                             <em class="emlt">
@@ -50,6 +51,24 @@
                             </em>
                         </div>
                     </li>
+                    <li @click="goPage('lesson')" v-if="userLevel == 3">
+                        <img src="../assets/img/main/lesson.png" height="54" width="54"/>
+                        <div class="liRight">
+                            <h5>剩余课时</h5>
+                            <span>{{ TotalRemainNormalhour +  TotalRemainGifthour}}
+                            </span>
+                        </div>
+                        <div class="btLine">
+                            <em class="emlt">
+                                <i class="el-icon-caret-top"></i>
+                                正常课时 {{ TotalRemainNormalhour }}
+                            </em>
+                            <em class="emlt">
+                                <i class="el-icon-caret-top"></i>
+                                赠送课时 {{ TotalRemainGifthour }}
+                            </em>
+                        </div>
+                    </li>
                 </ul>
             </div>
 
@@ -72,9 +91,13 @@
                             <em>
 
                             </em>
-                            <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 0">上课</el-button>
-                            <el-button type="primary" plain @click="checkClassOverPrepare(c)" v-if="c.FinishClass == 2">管理</el-button>
-                            <el-button type="primary" plain @click="goFinish(c)"  v-if="c.FinishClass == 3">编辑</el-button>
+                            <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 0">上课
+                            </el-button>
+                            <el-button type="primary" plain @click="checkClassOverPrepare(c)" v-if="c.FinishClass == 2">
+                                管理
+                            </el-button>
+                            <el-button type="primary" plain @click="goFinish(c)" v-if="c.FinishClass == 3">编辑
+                            </el-button>
                         </div>
                     </li>
                     <span class="tips" v-if="PreFinishList == 0">
@@ -166,6 +189,7 @@
         ClassStatistics,
         ClassOverPrepare,
         VipUserOrderQuery,
+        ClassHourStatistics,
         LastOrderQuery,
     } from "../api/getApiRes";
 
@@ -189,15 +213,18 @@
                 TodayOrderNum: 0,
                 ClassNum: 0,
                 TodayOrderSttNum: 0,
+                TotalRemainNormalhour: 0,
+                TotalRemainGifthour: 0,
+                userLevel: localStorage.userLevel,
             }
         },
         mounted() {
             let that = this;
-
             // 下课管理
             this.getVipUserStatistics();
             this.getClassStatistics();
             this.ClassQuery();
+            this.getClassHourStatistics();
             this.getVipUserOrderQuery();
             // 预约统计
             this.getOrderStatistics();
@@ -211,6 +238,21 @@
                 this.getWaitingBeginClassList();
             }, 10000);
         },
+        watch: {
+            $route(to) {
+                if (to.name == 'Main') {
+                    this.getVipUserStatistics();
+                    this.getClassStatistics();
+                    this.ClassQuery();
+                    this.getClassHourStatistics();
+                    this.getVipUserOrderQuery();
+                    this.getOrderStatistics();
+                    this.getWaitingBeginClassList();
+                } else {
+                    clearInterval(this.timer);//页面销毁时清除定时器
+                }
+            },
+        },
         destroyed() {
             clearInterval(this.timer);//页面销毁时清除定时器
         },
@@ -253,11 +295,11 @@
                         that.CountAdd = json.Rs.CountAdd;
                     } else {
                         if (json.Code == 1010) {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                             that.$router.push({path: '/login', query: {status: 1}});
                             return false
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     }
                 })
@@ -275,7 +317,7 @@
                         that.ClassNum = json.Rs.ClassNum;
                         that.TodayOrderSttNum = json.Rs.TodayOrderSttNum;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -296,7 +338,7 @@
                             that.YestodayOrderNum = json.Rs.YestodayOrderNum;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -336,7 +378,7 @@
                         that.loading = false;
                         that.classList = json.Rs;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -355,6 +397,22 @@
                         if (json.Rs) {
                             that.PreFinishList = json.Rs;
                         }
+                    } else {
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
+                    }
+                })
+            },
+            getClassHourStatistics() {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                };
+                let postdata = qs.stringify(param);
+                ClassHourStatistics(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        that.TotalRemainNormalhour = json.Rs.TotalRemainNormalhour;
+                        that.TotalRemainGifthour = json.Rs.TotalRemainGifthour;
                     } else {
                         that.$message.error(json.Memo);
                     }
@@ -380,7 +438,7 @@
                             that.appointList = json.Rs;
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             }
@@ -395,20 +453,6 @@
                 }
             },
         },
-        watch: {
-            $route(to) {
-                if (to.name == 'Main') {
-                    this.getVipUserStatistics();
-                    this.getClassStatistics();
-                    this.ClassQuery();
-                    this.getVipUserOrderQuery();
-                    this.getOrderStatistics();
-                    this.getWaitingBeginClassList();
-                } else {
-                    clearInterval(this.timer);//页面销毁时清除定时器
-                }
-            },
-        },
     }
 </script>
 
@@ -500,6 +544,11 @@
         margin-bottom: 20px;
     }
 
+    .liRight em {
+        font-size: 14px;
+        text-align: right;
+    }
+
     .btLine {
         width: 84%;
         overflow: hidden;
@@ -601,11 +650,13 @@
         border-top-right-radius: 7px;
         color: #000;
     }
+
     li .finListTitle em {
         float: left;
         color: #fff;
         padding-left: 5%;
     }
+
     li .finListTitle s {
         float: right;
         text-decoration: none;
@@ -635,6 +686,7 @@
         line-height: 30px;
         color: #BDBDBD;
     }
+
     .context button {
         height: 30px;
         line-height: 30px;
@@ -965,6 +1017,12 @@
         margin-top: 180px;
     }
 
+    .esmall {
+        float: right;
+        font-size: 14px;
+        text-align: right;
+    }
+
     /*ipad only*/
     @media only screen and (max-width: 1366px) {
         .container {

+ 15 - 17
pc/src/views/Member.vue

@@ -59,7 +59,6 @@
                     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"
             >
                 >
@@ -565,7 +564,7 @@
                             console.log('null');
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -591,7 +590,7 @@
                         // 读取列表
                         this.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -645,7 +644,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -680,7 +679,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -855,7 +854,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -930,7 +929,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -958,7 +957,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -985,7 +984,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1013,7 +1012,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1042,7 +1041,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1064,7 +1063,7 @@
                         if (json.Rs == null) return false
                         that.form.dialogdata = turnClassResToOption(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1109,7 +1108,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -1165,7 +1164,7 @@
                     phone: that.panel.phone,//
                     name: that.panel.name,//
                     expDay: that.panel.expDay,//
-                    start: 1,//
+                    start: 0,//
                     tableMax: 9999,//
                 };
                 let postdata = qs.stringify(param);
@@ -1183,7 +1182,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1234,8 +1233,7 @@
                     return nonTfmtDatetoLength(column, 10);
                 }
             },
-        }
-        ,
+        },
         watch: {
             $route(to) {
                 if (to.name == 'Member') {

+ 2 - 2
pc/src/views/Pwd.vue

@@ -111,7 +111,7 @@
                         that.again = '';
                         that.logoutPage();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 });
             },
@@ -129,7 +129,7 @@
                             }
                         })
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             }

+ 18 - 18
pc/src/views/ShopManage.vue

@@ -14,8 +14,8 @@
               <el-input v-model="panel.contacts" placeholder="请输入负责人"></el-input>
             </el-col>
             <el-col :span="4">
-              <em>手机号:</em>
-              <el-input v-model="panel.phone" placeholder="请输入手机号" type="number" ></el-input>
+              <em>联系电话:</em>
+              <el-input v-model="panel.phone" placeholder="请输入联系电话" type="number" ></el-input>
             </el-col>
             <el-col :span="4">
               <el-button size="" type="primary" @click="query" plain :disabled="serachBtnStatus">查询</el-button>
@@ -73,7 +73,7 @@
         </el-table-column>
         <el-table-column
             prop="Phone"
-            label="手机号"
+            label="联系电话"
         >
         </el-table-column>
       </el-table>
@@ -98,7 +98,7 @@
           <el-form-item label="负责人">
             <el-input v-model="form.contacts"></el-input>
           </el-form-item>
-          <el-form-item label="手机号">
+          <el-form-item label="联系电话">
             <el-input v-model="form.phone"></el-input>
           </el-form-item>
         </el-form>
@@ -211,13 +211,13 @@ export default {
         return false
       }
       if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
+        this.$message.error('错了哦,联系电话不能为空');
         return false
       }
+      // if (!globalCheckPhone(that.form.phone)) {
+      //   this.$message.error('错了哦,联系电话格式不正确');
+      //   return false
+      // }
       let param = {
         token: localStorage.token,
         shopName: that.form.shopName,
@@ -240,7 +240,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -273,13 +273,13 @@ export default {
         return false
       }
       if (!that.form.phone) {
-        this.$message.error('错了哦,手机号不能为空');
-        return false
-      }
-      if (!globalCheckPhone(that.form.phone)) {
-        this.$message.error('错了哦,手机号格式不正确');
+        this.$message.error('错了哦,联系电话不能为空');
         return false
       }
+      // if (!globalCheckPhone(that.form.phone)) {
+      //   this.$message.error('错了哦,联系电话格式不正确');
+      //   return false
+      // }
       let param = {
         token: localStorage.token,
         shopName: that.form.shopName,
@@ -303,7 +303,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -339,7 +339,7 @@ export default {
             // 重载列表
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         });
       }).catch(() => {
@@ -432,7 +432,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 19 - 19
pc/src/views/appoint.vue

@@ -462,7 +462,7 @@
                         } else {
                             // 状态返回
                             appoint.WxOrder = e == 0 ? 1 : 0;
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -486,7 +486,7 @@
                         that.panel.classOptions = turnClassResToOption(json.Rs);
                         that.panel.classOptions.unshift({value: '0', label: '全部'})
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -508,7 +508,7 @@
                                 that.form.userId = '';
                                 that.form.userList = turnResToOptionBySimViper(json.Rs);
                             } else {
-                                that.$message.error(json.Memo);
+                                that.$message.error(json.Memo + '错误码:' + json.Code);
                             }
                         })
                     }
@@ -536,7 +536,7 @@
                     if (json.Code == 0) {
                         that.form.stdList = turnStdToOption(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
 
@@ -560,7 +560,7 @@
                         this.getTableQuery2();
                         that.dialogMemberVisible = false;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -592,7 +592,7 @@
                         this.gridData = json.Rs;
                         console.log(123);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -623,7 +623,7 @@
                             // table 重载
                             that.getTableQuery2();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -658,7 +658,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -693,7 +693,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -875,7 +875,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -929,7 +929,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -957,7 +957,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -985,7 +985,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1013,7 +1013,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1041,7 +1041,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1070,7 +1070,7 @@
                     if (json.Code == 0) {
                         that.form.stdList = turnStdToOption(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1120,7 +1120,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -1183,7 +1183,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -1214,7 +1214,7 @@
                         // 设置分页数据
                         that.setPaginations2();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
pc/src/views/bindRecord.vue

@@ -275,7 +275,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 1 - 1
pc/src/views/classInfoDetail.vue

@@ -185,7 +185,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 7 - 7
pc/src/views/coach.vue

@@ -225,7 +225,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -260,7 +260,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -319,7 +319,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -363,7 +363,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -391,7 +391,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -448,7 +448,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -499,7 +499,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 14 - 14
pc/src/views/cost.vue

@@ -53,8 +53,6 @@
           :summary-method="getSummaries"
           @selection-change="handleSelectionChange"
       >
-
-        >
         <el-table-column
             type="index"
             label="序号"
@@ -354,7 +352,7 @@ export default {
             // table 重载
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         })
       }).catch(() => {
@@ -389,7 +387,7 @@ export default {
             // table 重载
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         })
       }).catch(() => {
@@ -409,7 +407,9 @@ export default {
           return;
         }
         const values = data.map(item => Number(item[column.property]));
-        if (!values.every(value => isNaN(value)) && index != 0 && index != 1 && index != 2) {
+        if (!values.every(value => isNaN(value)) && index != 0 && index != 1 && index != 2 && index != 5 && index != 6
+            && index != 8   && index != 9
+        ) {
           sums[index] = values.reduce((prev, curr) => {
             const value = Number(curr);
             if (!isNaN(value)) {
@@ -598,7 +598,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -653,7 +653,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -681,7 +681,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -709,7 +709,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -737,7 +737,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -765,7 +765,7 @@ export default {
             type: 'success'
           });
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -784,7 +784,7 @@ export default {
           that.panel.options = turnClassResToOption(json.Rs);
           that.panel.options.unshift({label: "全部", value: ''})
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -841,7 +841,7 @@ export default {
             // 重载列表
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         });
       }).catch(() => {
@@ -909,7 +909,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 17 - 16
pc/src/views/courseEdit.vue

@@ -406,7 +406,7 @@
                         // 重置心率带可选列表
                         // that.getSelectHrSensors();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -445,7 +445,7 @@
                             // 重置心率带可选列表
                             // that.getSelectHrSensors();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -482,7 +482,7 @@
                     if (json.Code == 0) {
                         that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -514,7 +514,7 @@
                         // that.$router.push({path: '/finish'});
                         this.$router.go(-1);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -598,7 +598,7 @@
                         // that.FinishClass = 2;
                         // that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -640,7 +640,7 @@
                         that.form.dialogdata = turnResToOptionBySimViper(json.Rs);
                         console.log(that.form.dialogdata);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -669,7 +669,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -693,7 +693,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -721,7 +721,7 @@
                             });
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -768,7 +768,7 @@
                         that.loading = false;
                         if (json.Rs) {
                             // 分队处理
-                            // 未上课的分,已上课的旧的不处理,新人需要处理
+                            // 未上课的分,已上课的旧的不处理,新人需要处理
                             if (that.FinishClass == 3) {
                                 if (that.ClassType == 2) {
                                     that.TurnUnit(json.Rs);
@@ -781,9 +781,10 @@
                                 // 已上课的状态
                                 json.Rs.map(function (item, i) {
                                     if (that.ClassType == 2) {
-                                        if (item.group_no == 0) {
-                                            item.group_no = i % that.PkNum;
-                                            console.log(i % that.PkNum);
+                                        if (item.GroupNo == 0) {
+                                            item.group_no = i % that.PkNum + 1;
+                                        } else {
+                                            item.group_no = item.GroupNo;
                                         }
                                     } else {
                                         item.group_no = item.GroupNo;
@@ -799,7 +800,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -852,7 +853,7 @@
                             that.panel.bindList = [];
                         }
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -944,7 +945,7 @@
                         });
                         this.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             }

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

@@ -370,7 +370,7 @@
                         this.getTableQuery();
 
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -400,7 +400,7 @@
                         that.dialogMemberVisible = false;
                         this.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -449,7 +449,7 @@
                     if (json.Code == 0) {
                         that.form.svList = json.Rs;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -470,7 +470,7 @@
                                 that.form.userId = '';
                                 that.form.userList = turnResToOptionBySimViper(json.Rs);
                             } else {
-                                that.$message.error(json.Memo);
+                                that.$message.error(json.Memo + '错误码:' + json.Code);
                             }
                         })
                     }
@@ -510,7 +510,7 @@
                     if (json.Code == 0) {
                         that.goFinish(row);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -570,7 +570,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 6 - 6
pc/src/views/coursesHistory.vue

@@ -368,7 +368,7 @@
                             }
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -398,7 +398,7 @@
                         that.dialogMemberVisible = false;
                         this.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -445,7 +445,7 @@
                     if (json.Code == 0) {
                         that.form.svList = json.Rs;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -466,7 +466,7 @@
                                 that.form.userId = '';
                                 that.form.userList = turnResToOptionBySimViper(json.Rs);
                             } else {
-                                that.$message.error(json.Memo);
+                                that.$message.error(json.Memo + '错误码:' + json.Code);
                             }
                         })
                     }
@@ -504,7 +504,7 @@
                     if (json.Code == 0) {
                         that.goFinish(row);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -564,7 +564,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 2 - 2
pc/src/views/finish.vue

@@ -172,7 +172,7 @@
                     if (json.Code == 0) {
                         that.goFinish(row);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -214,7 +214,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 9 - 9
pc/src/views/finishDetail.vue

@@ -275,7 +275,7 @@
                     if (json.Code == 0) {
                         that.form.dialogCoachdata = turnResToOptionByUsers(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -295,7 +295,7 @@
                         that.form.dialogdata = turnResToOptionBySimViper(json.Rs);
                         console.log(that.form.dialogdata);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -323,7 +323,7 @@
                             });
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -372,7 +372,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -410,7 +410,7 @@
                         });
                         that.getTableQuery()
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -442,7 +442,7 @@
                         // that.$router.push({path: '/finish'});
                         this.$router.go(-1);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -469,7 +469,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -544,7 +544,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -610,7 +610,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 23 - 23
pc/src/views/heartEquip.vue

@@ -13,18 +13,18 @@
                             <em>心率设备:</em>
                             <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
                         </el-col>
-                        <el-col :span="4">
-                            <em>设备状态:</em>
-                            <!--status-->
-                            <el-select v-model="panel.status" placeholder="请选择">
-                                <el-option
-                                        v-for="item in panel.statusOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
+                        <!--<el-col :span="4">-->
+                            <!--<em>设备状态:</em>-->
+                            <!--&lt;!&ndash;status&ndash;&gt;-->
+                            <!--<el-select v-model="panel.status" placeholder="请选择">-->
+                                <!--<el-option-->
+                                        <!--v-for="item in panel.statusOptions"-->
+                                        <!--:key="item.value"-->
+                                        <!--:label="item.label"-->
+                                        <!--:value="item.value">-->
+                                <!--</el-option>-->
+                            <!--</el-select>-->
+                        <!--</el-col>-->
                         <el-col :span="4">
                             <el-button size="" type="primary" @click="query" plain>查询</el-button>
                         </el-col>
@@ -301,7 +301,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -359,7 +359,7 @@
                         row.TopLimit = json.Rs.TopLimit;
                         row.ConsumeHour = json.Rs.ConsumeHour;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -394,7 +394,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -422,7 +422,7 @@
             //                 // table 重载
             //                 that.getTableQuery();
             //             } else {
-            //                 that.$message.error(json.Memo);
+            //                 that.$message.error(json.Memo + '错误码:' + json.Code);
             //             }
             //         })
             //     }).catch(() => {
@@ -457,7 +457,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -493,7 +493,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -552,7 +552,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -597,7 +597,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -625,7 +625,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -668,7 +668,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -722,7 +722,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 25 - 24
pc/src/views/heartEquipPerson.vue

@@ -13,18 +13,18 @@
                             <em>心率设备:</em>
                             <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
                         </el-col>
-                        <el-col :span="5">
-                            <em>设备状态:</em>
-                            <!--status-->
-                            <el-select v-model="panel.status" placeholder="请选择">
-                                <el-option
-                                        v-for="item in panel.statusOptions"
-                                        :key="item.value"
-                                        :label="item.label"
-                                        :value="item.value">
-                                </el-option>
-                            </el-select>
-                        </el-col>
+                        <!--<el-col :span="5">-->
+                            <!--<em>设备状态:</em>-->
+                            <!--&lt;!&ndash;status&ndash;&gt;-->
+                            <!--<el-select v-model="panel.status" placeholder="请选择">-->
+                                <!--<el-option-->
+                                        <!--v-for="item in panel.statusOptions"-->
+                                        <!--:key="item.value"-->
+                                        <!--:label="item.label"-->
+                                        <!--:value="item.value">-->
+                                <!--</el-option>-->
+                            <!--</el-select>-->
+                        <!--</el-col>-->
                         <el-col :span="4">
                             <el-button size="" type="primary" @click="query" plain>查询</el-button>
                         </el-col>
@@ -278,7 +278,7 @@
                         that.form.userId = '';
                         that.form.userList = turnResToOptionBySimViper(json.Rs);
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -318,7 +318,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -376,7 +376,7 @@
                         row.TopLimit = json.Rs.TopLimit;
                         row.ConsumeHour = json.Rs.ConsumeHour;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -412,7 +412,7 @@
                         that.getTableQuery();
                         that.vipSelect();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -440,7 +440,7 @@
             //                 // table 重载
             //                 that.getTableQuery();
             //             } else {
-            //                 that.$message.error(json.Memo);
+            //                 that.$message.error(json.Memo + '错误码:' + json.Code);
             //             }
             //         })
             //     }).catch(() => {
@@ -475,7 +475,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -511,7 +511,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -561,7 +561,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -598,7 +598,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -626,7 +626,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -669,7 +669,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -696,6 +696,7 @@
                 this.form.phone = '';
                 this.form.userCode = '';
                 this.form.shopId = '';
+                this.form.userId = '';
             },
             // 页面数据查询
             getTableQuery() {
@@ -723,7 +724,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },

+ 7 - 7
pc/src/views/heartLog.vue

@@ -200,7 +200,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -266,7 +266,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -337,7 +337,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -376,7 +376,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -421,7 +421,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -501,7 +501,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -540,7 +540,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {

+ 8 - 8
pc/src/views/lessonManage.vue

@@ -281,7 +281,7 @@ export default {
           that.previewDate.SttPreviewClassList.sort((a, b) => a.ClassIndex - b.ClassIndex);//升序
           that.previewShow = true;
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -333,7 +333,7 @@ export default {
             // 重载列表
             that.getTableQuery();
           } else {
-            that.$message.error(json.Memo);
+            that.$message.error(json.Memo + '错误码:' + json.Code);
           }
         });
       }).catch(() => {
@@ -375,7 +375,7 @@ export default {
           this.getTableQuery();
           this.dialogNameVisible = false;
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -404,7 +404,7 @@ export default {
           this.dialogCopyVisible = false;
           this.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -456,7 +456,7 @@ export default {
           that.getTableQuery();
           this.dialogVisible = false;
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       });
     },
@@ -480,7 +480,7 @@ export default {
           // 重载列表
           that.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       });
     },
@@ -537,7 +537,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -613,7 +613,7 @@ export default {
           // 重载列表
           that.getTableQuery();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
           row.Online = 0;
         }
       })

+ 2 - 2
pc/src/views/record.vue

@@ -248,7 +248,7 @@ export default {
           that.panel.classOptions = turnClassResToOption(json.Rs);
           that.panel.classOptions.unshift({value: '', label: '全部'})
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -307,7 +307,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 30 - 26
pc/src/views/region.vue

@@ -42,15 +42,15 @@
                         width="180">
                 </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>-->
+                <!--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"
@@ -58,14 +58,14 @@
                 >
                     <template slot-scope="scope">
                         <!--<el-button type="success" v-if="scope.row.Status == 8" size="mini"-->
-                                   <!--@click="pauseRow(scope.row,1)">-->
-                            <!--启用-->
+                        <!--@click="pauseRow(scope.row,1)">-->
+                        <!--启用-->
                         <!--</el-button>-->
                         <!--<el-button type="warning" v-if="scope.row.Status == 1" size="mini"-->
-                                   <!--@click="pauseRow(scope.row,8)">-->
-                            <!--暂停-->
+                        <!--@click="pauseRow(scope.row,8)">-->
+                        <!--暂停-->
                         <!--</el-button>-->
-                        <el-button type="danger"  size="mini"
+                        <el-button type="danger" size="mini"
                                    @click="pauseRowDel(scope.row)">
                             删除
                         </el-button>
@@ -217,7 +217,7 @@
             //                 // table 重载
             //                 that.getTableQuery();
             //             } else {
-            //                 that.$message.error(json.Memo);
+            //                 that.$message.error(json.Memo + '错误码:' + json.Code);
             //             }
             //         })
             //     }).catch(() => {
@@ -253,7 +253,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -267,7 +267,7 @@
             pauseRow(row, status) {
                 let that = this;
                 let param = {
-                    key : localStorage.ServiceKey,
+                    key: localStorage.ServiceKey,
                     shopId: localStorage.ServiceId,
                     svId: row.SvId,
                     status: status,
@@ -284,7 +284,7 @@
                         // table 重载
                         that.getTableQuery();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -338,7 +338,7 @@
                         row.TopLimit = json.Rs.TopLimit;
                         row.ConsumeHour = json.Rs.ConsumeHour;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -378,7 +378,7 @@
             //                 // table 重载
             //                 that.getTableQuery();
             //             } else {
-            //                 that.$message.error(json.Memo);
+            //                 that.$message.error(json.Memo + '错误码:' + json.Code);
             //             }
             //         })
             //     }).catch(() => {
@@ -413,7 +413,7 @@
             //                 // table 重载
             //                 that.getTableQuery();
             //             } else {
-            //                 that.$message.error(json.Memo);
+            //                 that.$message.error(json.Memo + '错误码:' + json.Code);
             //             }
             //         })
             //     }).catch(() => {
@@ -463,7 +463,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -498,7 +498,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -526,7 +526,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -568,7 +568,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -619,7 +619,11 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        if (!localStorage.ServiceKey) {
+                            that.$message.error('还未与心率系统对接,请联系管理员');
+                        } else {
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
+                        }
                     }
                 })
             },

+ 2 - 2
pc/src/views/region2.vue

@@ -109,7 +109,7 @@ export default {
             that.tableData = [];
           }
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -152,4 +152,4 @@ ul {
 #queryBtn {
   float: right;
 }
-</style>
+</style>

+ 3 - 3
pc/src/views/regionEquip.vue

@@ -131,7 +131,7 @@ export default {
           that.panel.shopOptions = turnShopResToOption(json.Rs);
           that.panel.shopOptions.unshift({value: '', label: "全部"});
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -151,7 +151,7 @@ export default {
           that.panel.options.unshift({value: '', label: "全部"});
           console.log(that.panel.options);
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },
@@ -224,7 +224,7 @@ export default {
           // 设置分页数据
           that.setPaginations();
         } else {
-          that.$message.error(json.Memo);
+          that.$message.error(json.Memo + '错误码:' + json.Code);
         }
       })
     },

+ 7 - 7
pc/src/views/relevancePhone.vue

@@ -181,7 +181,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -250,7 +250,7 @@
                             // 重载列表
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     });
                 }).catch(() => {
@@ -324,7 +324,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -368,7 +368,7 @@
                             type: 'success'
                         });
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -412,7 +412,7 @@
                         // 设置分页数据
                         that.setPaginations();
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -492,7 +492,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {
@@ -531,7 +531,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {

+ 2 - 2
pc/src/views/setting.vue

@@ -128,7 +128,7 @@
                     if (json.Code == 0) {
                         this.appoint = json.Rs.WxStatus;
                     } else {
-                        that.$message.error(json.Memo);
+                        that.$message.error(json.Memo + '错误码:' + json.Code);
                     }
                 })
             },
@@ -158,7 +158,7 @@
                             // table 重载
                             that.getTableQuery();
                         } else {
-                            that.$message.error(json.Memo);
+                            that.$message.error(json.Memo + '错误码:' + json.Code);
                         }
                     })
                 }).catch(() => {

+ 6 - 4
tv/README.md

@@ -18,10 +18,12 @@
 
 部署步骤
 
-1.获取设备的UUID
-    安装mefisto.getUUID app 写入区域列表
-
-2.
+前端篇
+1) 将中间件的IP地址和端口号填入 main.js 中
+2) 打开打包软件,hbuild,校验版本号
+3) 打包APP (注意打包为正式版
+4) 打开APP后,点击小飞龙logo获取uuid,在管理端添加当前区域
+5) 重启APP(非必须
 
 
 

+ 2 - 0
tv/package.json

@@ -8,6 +8,7 @@
   },
   "dependencies": {
     "core-js": "^3.6.5",
+    "default-passive-events": "^2.0.0",
     "echarts": "^4.8.0",
     "element-ui": "^2.13.2",
     "mockjs": "^1.1.0",
@@ -15,6 +16,7 @@
     "nprogress": "^0.2.0",
     "postcss-loader": "^4.0.4",
     "postcss-pxtorem": "^5.1.1",
+    "qrcodejs2": "^0.0.2",
     "qs": "^6.9.4",
     "v-charts": "^1.19.0",
     "vue": "^2.6.11",

+ 57 - 2
tv/src/Global.js

@@ -389,7 +389,62 @@ numberToWeekdays = function (val) {
 
 // 随机背景
 RandomBg = function () {
-    let bgClassNum = parseInt(Math.random() * 3)+1;
-    return 'bgStyle' + bgClassNum + '  pages' ;
+    let bgClassNum = parseInt(Math.random() * 3) + 1;
+    return 'bgStyle' + bgClassNum + '  pages';
 };
 
+// 运动强度
+sportLevel = function (val) {
+    let colorClass = '';
+    let per = parseInt(val);
+    switch (true) {
+        case per >= 90:
+            colorClass = 'red';
+            break;
+        case per <= 89 && per > 79:
+            colorClass = 'brown';
+            break;
+        case per <= 79 && per > 70:
+            colorClass = 'yellow';
+            break;
+        case per <= 70 && per > 54:
+            colorClass = 'green';
+            break;
+        case per <= 54 && per > 39:
+            colorClass = 'violet';
+            break;
+        case per <= 39:
+            colorClass = 'blue';
+            break
+    }
+    return colorClass
+};
+
+// 假数据生成器
+fakeNews = function (num, team) {
+    let item = [];
+    let nums = Math.random() * 100 + 1;
+    let teamNum = team == 3 ? 3 : 2;
+    for (var i = 0; i < num; i++) {
+        item.push(
+            {
+                "SvId": 1,
+                "UserId": 1,
+                "Cle": i * 14,
+                "realHr1": parseInt(Math.random() * 100 + 50),
+                "realHr": 30,
+                "activePercent": parseInt(Math.random() * 100 + 50),
+                "heartRate": 90,
+                "PureCalorieNoVo2": 999,
+                "Name": "测试人",
+                "name": "测试人",
+                "updateTime": 1604568915582,
+                "Ck": nums + i * 2.2,
+                "formatCk":parseInt(Math.random() * 100 + 50),
+                "Head": "http://192.168.0.2/zw.png",
+                "GroupNo": i % teamNum + 1
+            }
+        )
+    }
+    return item;
+};

BIN
tv/src/api/wifi.png


+ 58 - 11
tv/src/components/Headside.vue

@@ -1,25 +1,45 @@
 <template>
-    <div class="headerContainer">
+    <div class="headerContainer dv1">
         <div class="lt">
             <em> {{ nowWeeks }}</em> <span>  {{ nowDay }}</span>
         </div>
         <div class="rt">
             {{ nowTime }}
-            <span>版本:{{version}}</span>
-            <img src="../static/img/blue.svg" />
-            <img src="../static/img/wifi.svg" />
+
+            <span @click="showUuid()">版本:{{version}}</span>
+            <img src="../static/img/blue.svg"/>
+            <img src="../static/img/wifi.svg"/>
         </div>
 
+
+        <el-dialog
+                title=""
+                :visible.sync="dialogVisible"
+                width="60%"
+        >
+            <span class="eqSnText">当前设备uuid</span>
+            <br>
+            <span class="eqSnText">{{eqSn}}</span>
+            <div id='qrcode' class="qrcode" ref="qrCodeUrl">
+
+            </div>
+            <span slot="footer" class="dialog-footer">
+            <el-button @click="dialogVisible = false">了解</el-button>
+  </span>
+        </el-dialog>
     </div>
 </template>
 
 <script>
     import global from '../Global'
     import '../libs/rem';
+    import QRCode from 'qrcodejs2'
 
     export default {
         data() {
             return {
+                dialogVisible: false,
+                eqSn: localStorage.eqSn,
                 nowWeeks: '',
                 nowDay: '',
                 nowTime: '',
@@ -32,7 +52,7 @@
                 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.nowTime =  h + m + s;
+                this.nowTime = h + m + s;
                 this.nowDayFunc();
             }, 1000);
             this.getCurVersion();
@@ -49,13 +69,30 @@
                 let wd = numberToWeekdays(days);
                 this.nowWeeks = wd;
                 this.nowDay = globalcurrent();
-            },
-            nowTimeFunc() {
-
             },
             // 获取当前版本
             getCurVersion() {
                 // console.log(version)
+            },
+            qrcode(code) {
+                this.$refs.qrCodeUrl.innerHTML="";
+                let qrcode = new QRCode(this.$refs.qrCodeUrl, {
+                    width: 200,
+                    height: 200, // 高度
+                    text: code, // 二维码内容
+                    image: '',
+                    render: 'canvas',// 设置渲染方式(有两种方式 table和canvas,默认是canvas)
+                    background: '#f0f',
+                    foreground: '#ff0',
+                });
+            },
+            showUuid() {
+                this.dialogVisible = true;
+                this.$nextTick(function () {
+                    setTimeout(() => {
+                        this.qrcode(localStorage.eqSn);
+                    }, 500);
+                })
             }
         }
     }
@@ -68,7 +105,6 @@
         display: block;
         margin: 0 auto;
         margin-top: 1%;
-        padding: 0;
         padding: 2%;
         background: url("../static/img/logo.svg");
         background-position: top center;
@@ -106,7 +142,7 @@
     .rt img {
         position: absolute;
         top: 4%;
-        right:  9%;
+        right: 9%;
         padding: 0;
         margin: 0;
         float: right;
@@ -123,6 +159,7 @@
         font-style: normal;
         margin-right: 0.5rem;
     }
+
     .rt span {
         position: absolute;
         top: 4%;
@@ -131,10 +168,20 @@
         color: #fff;
         font-size: 0.2rem;
         text-align: center;
-        background: rgba(0,0,0,0.35);
+        background: rgba(0, 0, 0, 0.35);
         width: 1.2rem;
         height: 0.4rem;
         line-height: 0.4rem;
+        cursor: pointer;
+    }
 
+    #qrcode {
+        width: 1rem;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+    .eqSnText {
+        font-size: 0.4rem;
     }
 </style>

+ 2 - 1
tv/src/main.js

@@ -2,6 +2,7 @@ import Vue from 'vue'
 import './plugins/axios'
 import App from './App.vue'
 import router from './router'
+import 'default-passive-events'
 // import store from './store'
 import ElementUI from 'element-ui';
 import 'element-ui/lib/theme-chalk/index.css';
@@ -10,7 +11,7 @@ import axios from 'axios'
 import VConsole from 'vconsole/dist/vconsole.min.js' //import vconsole
 
 if(process.env.NODE_ENV === 'development'){
-    let vConsole = new VConsole() // 初始化
+    // let vConsole = new VConsole() // 初始化
 }else{
 
 }

+ 3 - 27
tv/src/router/index.js

@@ -22,7 +22,7 @@ const routes = [
         children: [
             {
                 path: '/',
-                name: 'Main',
+                name: 'Wait',
                 component: () => import('@/views/Wait.vue'),
                 meta: {
                     title: "等待",
@@ -44,14 +44,6 @@ const routes = [
                     title: "排名",
                     clmid: "2",
                 }
-            },{
-                path: '/wait',
-                name: 'Wait',
-                component: () => import('@/views/Wait.vue'),
-                meta: {
-                    title: "等待",
-                    clmid: "2",
-                }
             },{
                 path: '/pk',
                 name: 'pk',
@@ -60,14 +52,6 @@ const routes = [
                     title: "pk",
                     clmid: "3",
                 }
-            },{
-                path: '/gropePk',
-                name: 'gropePk',
-                component: () => import('@/views/gropePk.vue'),
-                meta: {
-                    title: "gropePk",
-                    clmid: "4",
-                }
             },{
                 path: '/2pkRank',
                 name: '2pkRank',
@@ -86,20 +70,12 @@ const routes = [
                 }
             },{
                 path: '/3pkRank',
-                name: 'threepk',
+                name: '3pkRank',
                 component: () => import('@/views/3pkRank.vue'),
                 meta: {
                     title: "3pkRank",
                     clmid: "6",
                 }
-            },{
-                path: '/test',
-                name: 'test',
-                component: () => import('@/views/test.vue'),
-                meta: {
-                    title: "test",
-                    clmid: "999",
-                }
             },
         ]
     }, {
@@ -107,7 +83,7 @@ const routes = [
         name: '404',
         component: () => import( '../views/404.vue')
     },
-]
+];
 
 const originalPush = VueRouter.prototype.push;
 VueRouter.prototype.push = function push(location) {

+ 55 - 77
tv/src/views/2pkRank.vue

@@ -118,25 +118,63 @@
                 this.rankTimer = setInterval(() => {
                     this.getClassUserRank();
                 }, 5000);
+                if (this.autoJump) {
+                    // 倒计时60秒自动关闭
+                    let that = this;
+                    this.totalTime = 60;
+                    let clock = window.setInterval(() => {
+                        this.totalTime--;
+                        console.log(this.totalTime);
+                        if (parseInt(this.totalTime) < 0) {
+                            // 前往等待页面
+                            that.$router.push({path: '/'});
+                            // 计时器回收
+                            clearInterval(clock);
+                        }
+                    }, 1000)
+                }
 
             } else {
-                let Rs = this.fakeNews(18);
+                let Rs = fakeNews(18,2);
                 that.UniteBreak(Rs);
             }
-            if (this.autoJump) {
-                // 倒计时60秒自动关闭
-                let that = this;
-                this.totalTime = 60;
-                let clock = window.setInterval(() => {
-                    this.totalTime--;
-                    console.log(this.totalTime);
-                    if (parseInt(this.totalTime) < 0) {
-                        // 前往等待页面
-                        that.$router.push({path: '/wait'});
-                        // 计时器回收
-                        clearInterval(clock);
+
+        },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/2pkRank') {
+                    if (this.trueDate) {
+                        this.getClassUserRank();
+                        this.rankTimer = setInterval(() => {
+                            this.getClassUserRank();
+                        }, 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: '/'});
+                                    // 计时器回收
+                                    clearInterval(clock);
+                                }
+                            }, 1000)
+                        }
+
+                    } else {
+                        this.rankTimer = setInterval(() => {
+                            this.students.redUnite = fakeNews(6,2);
+                            this.students.blueUnite = fakeNews(6,2);
+                        }, 5000);
                     }
-                }, 1000)
+
+                } else {
+                    clearInterval(this.autoJump);
+                    clearInterval(this.rankTimer);
+                }
             }
         },
         beforeDestroy() {
@@ -144,38 +182,11 @@
             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;
                 that.students.redUnite = [];
                 that.students.blueUnite = [];
-                console.log(!Rs);
-
                 Rs.map(function (item, t) {
                     if (item.GroupNo == 1) {
                         that.students.redUnite.push(item);
@@ -227,7 +238,7 @@
                         this.students.CkSort = [];
                         this.students.CalSort = [];
                         if (json.Code == '999') {
-                            // that.$router.push({path: '/wait'});
+                            // that.$router.push({path: '/'});
                         } else {
                             // 已出错
                             that.$message.error(json.Memo);
@@ -261,41 +272,6 @@
                 }
             },
         },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/2pkRank') {
-                    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
         }
@@ -517,6 +493,7 @@
         font-size: 0.6rem;
         margin-left: 5%;
         line-height: 0.8rem;
+        text-align: left;
     }
 
     li .CLEscore em {
@@ -529,6 +506,7 @@
         font-size: 0.6rem;
         margin-left: 5%;
         line-height: 0.8rem;
+        text-align: left;
     }
 
     li .CKscore em {

+ 62 - 81
tv/src/views/3pkRank.vue

@@ -65,11 +65,11 @@
                                 {{s.Name}}
                             </div>
                             <div class="CLEscore">
-                                <em>CAL</em>
+                                <em>cal</em>
                                 {{s.Cle|fmtInt}}
                             </div>
                             <div class="CKscore">
-                                <em>cal</em>
+                                <em>ck</em>
                                 {{s.Ck|fmtFloat}}
                             </div>
                             <div class="record">
@@ -181,25 +181,65 @@
                 this.rankTimer = setInterval(() => {
                     this.getClassUserRank();
                 }, 5000);
-
+                if (this.autoJump) {
+                    // 倒计时60秒自动关闭
+                    let that = this;
+                    this.totalTime = 60;
+                    let clock = window.setInterval(() => {
+                        this.totalTime--;
+                        console.log(this.totalTime);
+                        if (parseInt(this.totalTime) < 0) {
+                            // 前往等待页面
+                            that.$router.push({path: '/'});
+                            // 计时器回收
+                            clearInterval(clock);
+                        }
+                    }, 1000)
+                }
             } else {
-                let Rs = this.fakeNews(18);
-                that.UniteBreak(Rs);
+                this.rankTimer = setInterval(() => {
+                    let Rs = fakeNews(18,3);
+                    that.UniteBreak(Rs);
+                }, 1000);
             }
-            if (this.autoJump) {
-                // 倒计时60秒自动关闭
-                let that = this;
-                this.totalTime = 60;
-                let clock = window.setInterval(() => {
-                    this.totalTime--;
-                    console.log(this.totalTime);
-                    if (parseInt(this.totalTime) < 0) {
-                        // 前往等待页面
-                        that.$router.push({path: '/wait'});
-                        // 计时器回收
-                        clearInterval(clock);
+
+        },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/3pkRank') {
+                    if (this.trueDate) {
+                        this.getClassUserRank();
+                        this.rankTimer = setInterval(() => {
+                            this.getClassUserRank();
+                        }, 5000);
+
+                        if (this.autoJump) {
+                            // 倒计时60秒自动关闭
+                            let that = this;
+                            this.totalTime = 60;
+                            let clock = window.setInterval(() => {
+                                this.totalTime--;
+                                console.log(this.totalTime);
+                                if (parseInt(this.totalTime) < 0) {
+                                    // 前往等待页面
+                                    that.$router.push({path: '/'});
+                                    // 计时器回收
+                                    clearInterval(clock);
+                                }
+                            }, 1000)
+                        }
+
+                    } else {
+                        this.rankTimer = setInterval(() => {
+                            let Rs = fakeNews(18,3);
+                            that.UniteBreak(Rs);
+                        }, 1000);
                     }
-                }, 1000)
+
+                } else {
+                    clearInterval(this.autoJump);
+                    clearInterval(this.rankTimer);
+                }
             }
         },
         beforeDestroy() {
@@ -207,31 +247,6 @@
             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;
@@ -321,7 +336,7 @@
                         // this.students.CalSort = json.Rs.CalSort;
                     } else {
                         if (json.Code == '999') {
-                            // that.$router.push({path: '/wait'});
+                            // that.$router.push({path: '/'});
                         } else {
                             // 已出错
                             that.$message.error(json.Memo);
@@ -355,42 +370,6 @@
                 }
             },
         },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/3pkRank') {
-                    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--;
-                            console.log(this.totalTime);
-                            if (parseInt(this.totalTime) < 0) {
-                                // 前往等待页面
-                                that.$router.push({path: '/wait'});
-                                // 计时器回收
-                                clearInterval(clock);
-                            }
-                        }, 1000)
-                    }
-                } else {
-                    clearInterval(this.autoJump);
-                    clearInterval(this.rankTimer);
-                }
-            }
-        },
         components: {
             Headside
         }
@@ -656,6 +635,7 @@
         font-size: 0.4rem;
         margin-left: 1%;
         line-height: 0.8rem;
+        text-align: left;
     }
 
     li .CLEscore em {
@@ -666,8 +646,9 @@
         width: 1.6rem;
         float: left;
         font-size: 0.4rem;
-        margin-left: 1%;
+        margin-left: 2%;
         line-height: 0.8rem;
+        text-align: left;
     }
 
     li .CKscore em {

+ 0 - 5
tv/src/views/About.vue

@@ -1,5 +0,0 @@
-<template>
-  <div class="about">
-    <h1>This is an about page</h1>
-  </div>
-</template>

+ 0 - 21
tv/src/views/Chart.vue

@@ -1,21 +0,0 @@
-<template>
-    <Ring></Ring>
-</template>
-
-<script>
-    import Ring from '@/components/Ring.vue'
-    export default {
-        data() {
-            return {
-                editableTabsValue: '1'
-            }
-        },
-        components: {
-            Ring
-        }
-    }
-</script>
-
-<style scoped>
-
-</style>

+ 44 - 149
tv/src/views/Main.vue

@@ -35,9 +35,8 @@
                                         <span class="fastJump" v-if="s.realHr != 0"
                                               v-show="parseInt(s.activePercent) > 90">{{ s.realHr }}</span>
                                         <span class="normalJump" v-if="s.realHr != 0"
-                                              v-show="parseInt(s.activePercent) <= 90 && parseInt(s.activePercent) > 30">{{
-                        s.realHr
-                      }}</span>
+                                              v-show="parseInt(s.activePercent) <= 90 && parseInt(s.activePercent) > 30">
+                                            {{s.realHr}}</span>
                                         <span class="slowJump" v-if="s.realHr != 0"
                                               v-show="parseInt(s.activePercent) <= 30">{{ s.realHr }}</span>
 
@@ -158,46 +157,6 @@
                     dialogVisible: false,
                     toper: {},
                 },
-                // 本地绑定名字和头像路径
-                headImg: [
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                    {name: 'flyhead.png'},
-                ],
-                nameList: [
-                    {name: '杨东艳'},
-                    {name: '隋小飞'},
-                    {name: '刘晓蕾'},
-                    {name: '刘海生'},
-                    {name: '贾雨琦'},
-                    {name: '李延海'},
-                    {name: '宋凌晨'},
-                    {name: '段长鹏'},
-                    {name: '郑伟'},
-                    {name: '周睿'},
-                    {name: '贾奕'},
-                    {name: '王正祥'},
-                    {name: '高超'},
-                    {name: '武发鲁'},
-                    {name: '赵晋洪'},
-                    {name: '张岩'},
-                    {name: '郑伟'},
-                    {name: '郑伟'},
-                ],
                 fakeEgg: {
                     Rs: {
                         "DuId": 37,
@@ -235,32 +194,38 @@
                 this.createEgg();
             } else {
                 // 彩蛋
-                this.OpenEgg(this.fakeEgg);
-                this.mainTimer = setInterval(() => {
-                    this.students = this.fakeNews();
-                    this.giveClassName(this.students);
-                }, 1000);
+                // this.OpenEgg(this.fakeEgg);
+                let Rs = fakeNews(21);
+                this.giveClassName(Rs);
+                this.students = Rs;
+                // this.mainTimer = setInterval(() => {
+                //     this.students = fakeNews(2);
+                //     this.giveClassName(this.students);
+                // }, 10000);
+            }
+        },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/main') {
+                    if (this.trueDate) {
+                        this.mainTimer = setInterval(() => {
+                            this.GetgetUserList();
+                            this.curgetClassStat();
+                        }, 1000);
+                        this.GetgetUserList();
+                        this.timer2 = setInterval(() => {
+                            this.createEgg();
+                        }, 6000);
+                    } else {
+                        this.students = fakeNews(2);
+                        this.giveClassName(this.students);
+                        // this.createEgg(this.students[5]);
+                    }
+                } else {
+                    clearInterval(this.mainTimer);
+                    clearInterval(this.timer2);
+                }
             }
-
-
-            // this.alertInfo(document.body.clientWidth);
-            // this.alertInfo(window.screen.height);
-
-            // 倒计时
-            let that = this;
-            // that.serachBtnStatus = true;
-            // let totalTime = 3
-            // let clock = window.setInterval(() => {
-            //       totalTime--
-            //       if (totalTime < 0) {
-            //         totalTime = 3;
-            //         that.serachBtnStatus = false;
-
-            //       }
-            //     }
-            //     ,
-            //     1000
-            // )
         },
         beforeDestroy() {
             clearInterval(this.mainTimer);
@@ -269,31 +234,6 @@
             this.timer2 = null;
         },
         methods: {
-            fakeNews() {
-                let item = [];
-                // 1 2 3 5 9 11 13 16 21 30
-                let fakeNums = 2;
-                for (var i = 0; i < fakeNums; i++) {
-                    item.push(
-                        {
-                            "SvId": 1,
-                            "UserId": 1,
-                            "Cle": 999,
-                            "realHr1": parseInt(Math.random() * 100 + 50),
-                            "realHr": 60,
-                            "activePercent": 30,
-                            "heartRate": 90,
-                            "Steps": 9999,
-                            "PureCalorieNoVo2": 999,
-                            "Name": "东南西北中",
-                            "updateTime": 1604568915582,
-                            "Ck": 99.9,
-                            "Head": '',
-                        }
-                    )
-                }
-                return item;
-            },
             alertInfo(info) {
                 alert(info);
             },
@@ -342,37 +282,14 @@
                     let json = res;
                     if (json.Code == 0) {
                         that.students = json.Rs;
-                        // // 返回空值不处理
-                        // if (that.times == 1) {
-                        //     that.students = json.Rs;
-                        //     if (!json.Rs) return false;
-                        //     // // 添加头像 和 姓名 ..
-                        //     that.times++
-                        // } else {
-                        //     if (localStorage.result != JSON.stringify(json.Rs)) {
-                        //         that.students = json.Rs;
-                        //         // this.createEgg(this.students[1]);
-                        //         if (!json.Rs) return false;
-                        //         // // 添加头像 和 姓名
-                        //         // that.students.map(function (i, v) {
-                        //         //     i.head = that.headImg[v].name;
-                        //         //     i.userNmae = that.nameList[v].name
-                        //         // });
-                        //     }
-                        //     localStorage.res = JSON.stringify(json.Rs);
-                        // }
 
                         that.giveClassName(json.Rs);
-                        // test 启动一个成就彩蛋
-                        // this.createEgg(that.students[4]);
                     } else {
                         // 已下课
                         if (json.Code == '999') {
                             that.students = ""
-                            // 没人不做处理
-                            //     that.$router.push({path: '/rank'});
                         } else {
-                            //     // 已出错
+                            // 已出错
                             that.$message.error(json.Memo);
                         }
                     }
@@ -482,6 +399,7 @@
                             colorClass = 'blue';
                             break
                     }
+
                     that.studentsClassName[i] = {
                         name: numberClass + ' ' + colorClass,
                     }
@@ -514,29 +432,6 @@
                 }
             },
         },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/') {
-                    if (this.trueDate) {
-                        this.mainTimer = setInterval(() => {
-                            this.GetgetUserList();
-                            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.mainTimer);
-                    clearInterval(this.timer2);
-                }
-            }
-        },
         components: {
             Headside, newRecord
         }
@@ -1139,7 +1034,7 @@
     }
 
     .two .centerLi {
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
     }
 
     .two:nth-child(2) {
@@ -1257,7 +1152,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1375,7 +1270,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1502,7 +1397,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1620,7 +1515,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1740,7 +1635,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1863,7 +1758,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -1983,7 +1878,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         float: none;
     }
 
@@ -2096,7 +1991,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        border: 1px solid #fff;
+        /*border: 1px solid #fff;*/
         /*border: 0.03rem solid rgba(255,255,255,0.1);*/
         /*box-shadow:inset 0 0 6px rgba(0,0,0,0.4);*/
         float: none;

+ 37 - 37
tv/src/views/Rank.vue

@@ -99,13 +99,48 @@
                     this.totalTime--;
                     if (parseInt(this.totalTime) < 0) {
                         // 前往等待页面
-                        that.$router.push({path: '/wait'});
+                        that.$router.push({path: '/'});
                         // 计时器回收
                         clearInterval(clock);
                     }
                 }, 1000)
             }
         },
+        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: '/'});
+                                // 计时器回收
+                                clearInterval(clock);
+                            }
+                        }, 1000)
+                    }
+                } else {
+                    clearInterval(this.autoJump);
+                    clearInterval(this.rankTimer);
+                }
+            }
+        },
         beforeDestroy() {
             clearInterval(this.rankTimer);
             this.rankTimer = null;
@@ -161,7 +196,7 @@
                         this.students.CkSort = [];
                         this.students.CalSort = [];
                         if (json.Code == '999') {
-                            that.$router.push({path: '/wait'});
+                            that.$router.push({path: '/'});
                         } else {
                             // 已出错
                             that.$message.error(json.Memo);
@@ -195,41 +230,6 @@
                 }
             },
         },
-        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
         }

+ 37 - 26
tv/src/views/Wait.vue

@@ -4,7 +4,7 @@
         <div class="rankContainer">
             <div class="lt">
                 <div class="recordMain">
-                    <el-carousel :interval="30000" height="370px">
+                    <el-carousel :interval="30000" height="100%">
                         <el-carousel-item v-for="rs in recordMain">
                             <div>
                                 <h5 v-html="rs.Title"></h5>
@@ -20,7 +20,7 @@
                     </el-carousel>
                 </div>
                 <div class="bottom">
-                    <el-carousel :interval="15000" height="280px">
+                    <el-carousel :interval="15000" height="100%">
                         <el-carousel-item v-for="Rs in bottom">
                             <div class="topOne" v-if="Rs.Style == 'tops'">
                                 <h5>{{Rs.Title}}</h5>
@@ -71,7 +71,7 @@
                 </div>
             </div>
             <div class="rt">
-                <el-carousel :interval="15000" height="610px">
+                <el-carousel :interval="15000" height="100%">
                     <el-carousel-item v-for="Rs in rt">
                         <h5>{{Rs.Title}}</h5>
                         <ul>
@@ -220,6 +220,26 @@
                 ]
             }
         },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/') {
+                    this.autoplayStatus = false;
+                    if (this.trueDate) {
+                        this.waitTimer = setInterval(() => {
+                            this.curgetClassStat();
+                            this.GetHerosRankingQuery();
+                            this.GetCalorieStatsQuery();
+                            this.GetUserRankingQuery();
+                        }, 1000);
+                    } else {
+                        this.students = this.fakeNews();
+                        this.topMsg = this.students[0];
+                    }
+                } else {
+                    clearInterval(this.waitTimer);
+                }
+            }
+        },
         beforeDestroy() {
             clearInterval(this.waitTimer);
             this.waitTimer = null;
@@ -286,7 +306,9 @@
                         that.students = json.Rs;
                         that.$message.error(json.Memo);
                     }
-                })
+                }).catch(function(err){
+                        console.log(err);
+                    });
             },
             GetHerosRankingQuery() {
                 let that = this;
@@ -384,26 +406,7 @@
                 })
             },
         },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/wait') {
-                    this.autoplayStatus = false;
-                    if (this.trueDate) {
-                        this.waitTimer = setInterval(() => {
-                            this.curgetClassStat();
-                            this.GetHerosRankingQuery();
-                            this.GetCalorieStatsQuery();
-                            this.GetUserRankingQuery();
-                        }, 1000);
-                    } else {
-                        this.students = this.fakeNews();
-                        this.topMsg = this.students[0];
-                    }
-                } else {
-                    clearInterval(this.waitTimer);
-                }
-            }
-        },
+
         components: {
             Headside
         }
@@ -458,11 +461,13 @@
 
     .rankContainer .rt {
         width: 40%;
+        height: 100%;
         float: right;
     }
 
     .recordMain {
         /*height: 6rem;*/
+        height: 100%;
         overflow: hidden;
     }
 
@@ -533,7 +538,7 @@
 
     .sumContainer {
         width: 100%;
-        height: 4rem;
+        /*height: 4rem;*/
         overflow: hidden;
         display: block;
         margin: 0 auto;
@@ -836,6 +841,12 @@
     }
 
     /deep/ .el-carousel__indicators--horizontal {
-        display: none;
+        /*display: none;*/
+    }
+    /deep/ .el-carousel {
+        height: 100%;
+    }
+    /deep/ .el-carousel__container {
+
     }
 </style>

+ 0 - 841
tv/src/views/Wait2.vue

@@ -1,841 +0,0 @@
-<template>
-    <div :class="pageStyle">
-        <Headside></Headside>
-        <div class="rankContainer">
-            <div class="lt">
-                <div class="recordMain">
-                    <el-carousel :interval="30000" height="370px">
-                        <el-carousel-item v-for="rs in recordMain">
-                            <div>
-                                <h5 v-html="rs.Title"></h5>
-                                <div class="sumContainer">
-                                    <div class="sum">
-                                        <s>{{rs.Result[0].Unite}}</s>
-                                        <em>{{rs.Result[0].Values}}</em>
-                                    </div>
-                                    <span class="sumBg"></span>
-                                </div>
-                            </div>
-                        </el-carousel-item>
-                    </el-carousel>
-                </div>
-                <div class="bottom">
-                    <el-carousel :interval="15000" height="280px">
-                        <el-carousel-item v-for="Rs in bottom">
-                            <div class="topOne" v-if="Rs.Style == 'tops'">
-                                <h5>{{Rs.Title}}</h5>
-                                <ul>
-                                    <li v-for="(tops,i) in Rs.Result">
-                                        <div class="dgCenter">
-                                            <div class="dghead">
-                                                <img :id="'circle_'+i"
-                                                     v-bind:src="tops.Head" alt="" v-if="tops.Head">
-                                                <img :id="'circle_'+i"
-                                                     v-bind:src="require('../static/img/people/flyhead.png')" alt=""
-                                                     v-if="!tops.Head">
-                                                <s>{{ tops.UserName }}</s>
-                                            </div>
-                                            <div class="score">
-                                                <em>{{ tops.Values}}</em>
-                                                <span>
-                                                    {{tops.Message}}
-                                                </span>
-                                            </div>
-                                        </div>
-                                    </li>
-                                </ul>
-                            </div>
-                            <div class="heros" v-if="Rs.Style == 'heros'">
-                                <h5>{{Rs.Title}}</h5>
-                                <ul>
-                                    <li v-for="(hero,i) in Rs.Result">
-                                        <img :id="'circle_'+i"
-                                             v-bind:src="hero.Head" alt="" v-if="hero.Head">
-                                        <img :id="'circle_'+i"
-                                             v-bind:src="require('../static/img/people/flyhead.png')"
-                                             alt="" v-if="!hero.Head">
-                                        <img src="../static/img/wait/boy.png" class="sex" v-if="hero.Sex == 1"/>
-                                        <img src="../static/img/wait/girl.png" class="sex" v-if="hero.Sex == 2"/>
-                                        <div>
-                                            <em :id="'red_'+i">No.{{i+1}}</em> {{ hero.UserName }}
-                                        </div>
-                                        <span>{{ hero.Values }} {{hero.Unite}}</span>
-                                    </li>
-                                    <li v-if="!Rs.Result">
-                                        <h5>还没有人突破记录哟~</h5>
-                                    </li>
-                                </ul>
-                            </div>
-                        </el-carousel-item>
-                    </el-carousel>
-                </div>
-            </div>
-            <div class="rt">
-                <el-carousel :interval="15000" height="610px">
-                    <el-carousel-item v-for="Rs in rt">
-                        <h5>{{Rs.Title}}</h5>
-                        <ul>
-                            <li v-for="s in Rs.Result">
-                                <img :src="s.Head" alt="" v-if="s.Head">
-                                <img v-bind:src="require('../static/img/people/flyhead.png')" alt="" v-if="!s.Head">
-                                <em>{{s.UserName}}</em>
-                                <s>{{s.Values}}</s>
-                            </li>
-                        </ul>
-                    </el-carousel-item>
-                </el-carousel>
-            </div>
-        </div>
-    </div>
-</template>
-
-<script>
-    import Headside from '@/components/Headside'
-    import {
-        getHello,
-        getClassStat,
-        HerosRankingQuery,
-        CalorieStatsQuery,
-        UserRankingQuery
-    } from '@/api/getApiRes'
-    import '../libs/rem';
-    import '../Global'
-
-    // 测试模式 localStorage.eqSn = "8e501b0bde9ce600"
-
-    let qs = require('qs');
-    export default {
-        data() {
-            return {
-                eqSn: '30:9C:23:0C:8B:1E',
-                pageStyle: RandomBg(),
-                trueDate: true,//真实数据 true false
-                autoplayStatus: false,// false
-                fakeNums: 8,//
-                unite: '卡路里',
-                topMsg: '',
-                students: [],
-                studentsLimit: [],
-                showType: 2,//1 单人
-                curIndex: false,//1 单人
-                waitTimer: null,//null
-                test:
-                    {
-                        Title: '本<s style="font-size: 0.7rem;color: red">周</s>场馆卡路里总消耗',
-                        Title2: '本<s style="font-size: 0.7rem;color: red">月</s>场馆卡路里总消耗',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    },
-                recordMain: [],
-                bottom: {},
-                rt: [],
-            }
-        },
-        mounted() {
-            // this.$router.push({path: '/2pkRank'});
-            if (this.trueDate) {
-                this.waitTimer = setInterval(() => {
-                    // this.GetgetUserList();
-                    this.curgetClassStat();
-                    this.GetHerosRankingQuery();
-                    this.GetCalorieStatsQuery();
-                    this.GetUserRankingQuery();
-                }, 1000);
-            } else {
-                this.students = this.fakeNews();
-                this.studentsLimit = this.fakeNewsLimit();
-                this.topMsg = this.students[0];
-                this.bottom = [
-                    {
-                        "Title": "本周消耗卡路里英雄榜",
-                        "Style": "heros",
-                        "Result": [
-                            {
-                                "UserName": "段长鹏",
-                                "Sex": 1,
-                                "Head": "",
-                                "Values": "4744",
-                                "Unite": "千卡",
-                                "Message": ""
-                            },
-                            {
-                                "UserName": "贾雨奇",
-                                "Sex": 1,
-                                "Head": "http://192.168.0.2/flyhead.png",
-                                "Values": "4034",
-                                "Unite": "千卡",
-                                "Message": ""
-                            },
-                            {
-                                "UserName": "郑伟",
-                                "Sex": 1,
-                                "Head": "http://192.168.0.2/flyhead.png",
-                                "Values": "2290",
-                                "Unite": "千卡",
-                                "Message": ""
-                            }
-                        ]
-                    },
-                    {
-                        "Title": "单次CK值(新个人记录)",
-                        "Style": "tops",
-                        "Result": [
-                            {
-                                "UserName": "郑伟",
-                                "Sex": 1,
-                                "Head": "",
-                                "Values": "1022",
-                                "Unite": "",
-                                "Message": "打破了历史记录100000"
-                            },
-                            {
-                                "UserName": "郑伟",
-                                "Sex": 1,
-                                "Head": "http://192.168.0.2/flyhead.png",
-                                "Values": "1020",
-                                "Unite": "",
-                                "Message": "打破了历史记录100000"
-                            }
-                        ]
-                    }
-                ];
-                this.rt = [
-                    {
-                        Title: '月度CK值排行',
-                        Result: this.fakeNews(),
-                    },
-                    {
-                        Title: '月度卡路里值排行',
-                        Result: this.fakeNews(),
-                    }
-                ];
-                this.recordMain = [
-                    {
-                        Title: '本<s>周</s>场馆卡路里总消耗',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    },
-                    {
-                        Title: '本<s>周</s>场馆卡路里总消耗',
-                        Result: [{'Values': 0, Unite: '千卡'}],
-                    }
-                ]
-            }
-        },
-        beforeDestroy() {
-            clearInterval(this.waitTimer);
-            this.waitTimer = null;
-        },
-        methods: {
-            fakeNews() {
-                let item = [];
-                for (var i = 0; i < 7; i++) {
-                    item.push(
-                        {
-                            "hubId": 0,
-                            "deviceId": 22756,
-                            "calorie": 96.5,
-                            "Values ": 96.5,
-                            "heartRate": i * 5,
-                            "step": i * 40,
-                            "userName": "杨东艳",
-                            "userNmae": "杨东艳",
-                            "UserName": "杨东艳",
-                            "name": "杨东艳",
-                            "updateTime": 1604568915582,
-                            "activePercent": i * 5,
-                            "ck": 115.9 - i,
-                            "head": 'flyhead.png'
-                        }
-                    )
-                }
-                return item;
-            },
-            fakeNewsLimit() {
-                let item = [];
-                for (var i = 0; i < 3; i++) {
-                    item.push(
-                        {
-                            "hubId": 0,
-                            "deviceId": 22756,
-                            "calorie": 999.5,
-                            "heartRate": i * 5,
-                            "step": i * 40,
-                            "userName": "杨东艳",
-                            "userNmae": "杨东艳",
-                            "name": "杨东艳",
-                            "updateTime": 1604568915582,
-                            "activePercent": i * 5,
-                            "ck": i + 115.1,
-                            "sex": 1,
-                            "head": 'flyhead.png'
-                        }
-                    )
-                }
-                return item;
-            },
-            GetgetUserList() {
-                let that = this;
-                let param = {
-                    eqSn: localStorage.eqSn,
-                    token: localStorage.token,
-                };
-                let postdata = qs.stringify(param);
-                getHello(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.topMsg = json.Rs[0];
-                        that.students = json.Rs;
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            GetHerosRankingQuery() {
-                let that = this;
-                let param = {
-                    eqSn: localStorage.eqSn,
-                    dispNum: 3
-                };
-                let postdata = qs.stringify(param);
-                HerosRankingQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.bottom = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            GetUserRankingQuery() {
-                let that = this;
-                let param = {
-                    eqSn: localStorage.eqSn,
-                    dispNum: 7
-                };
-                let postdata = qs.stringify(param);
-                UserRankingQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.rt = json.Rs;
-                    } else {
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            GetCalorieStatsQuery() {
-                let that = this;
-                let param = {
-                    eqSn: localStorage.eqSn,
-                };
-                let postdata = qs.stringify(param);
-                CalorieStatsQuery(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.recordMain = json.Rs;
-                    } else {
-                        that.recordMain = [
-                            {
-                                Title: '',
-                                Result: [{'Values': '', Unite: ''}],
-                            },
-                            {
-                                Title: '',
-                                Result: [{'Values': '', Unite: ''}],
-                            }
-                        ];
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-            curgetClassStat() {
-                let that = this;
-                let param = {
-                    token: localStorage.token,
-                    eqSn: localStorage.eqSn
-                };
-                let postdata = qs.stringify(param);
-                getClassStat(postdata).then(res => {
-                    let json = res;
-                    if (json.Code == 0) {
-                        // alert(JSON.stringify(json.ClassOn));
-                        // alert("alert:"+json.ClassOn);
-                        // 上课了
-                        if (json.ClassOn == 1) {
-                            // 0: 下课 团课/私教 排名
-                            // 1:团课/私教 todo
-                            // 2:竞技课2PK
-                            // 3:竞技课threepk
-                            switch (parseInt(json.dp)) {
-                                case 0:
-                                    that.$router.push({path: '/rank'});
-                                    break;
-                                case 1:
-                                    that.$router.push({path: '/main'});
-                                    break;
-                                case 2:
-                                    that.$router.push({path: '/pk'});
-                                    break;
-                                case 3:
-                                    that.$router.push({path: '/threepk'});
-                                    break;
-                            }
-                        }
-                    } else {
-                        // that.$message.error(json.Memo);
-                    }
-                })
-            },
-        },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/wait') {
-                    this.autoplayStatus = false;
-                    if (this.trueDate) {
-                        this.waitTimer = setInterval(() => {
-                            this.curgetClassStat();
-                            this.GetHerosRankingQuery();
-                            this.GetCalorieStatsQuery();
-                            this.GetUserRankingQuery();
-                        }, 1000);
-                    } else {
-                        this.students = this.fakeNews();
-                        this.topMsg = this.students[0];
-                    }
-                } else {
-                    clearInterval(this.waitTimer);
-                }
-            }
-        },
-        components: {
-            Headside
-        }
-    }
-</script>
-
-<style scoped>
-    @import "../assets/css/bg.css";
-
-    .pages {
-        position: absolute;
-        top: 0;
-        left: 0;
-        right: 0;
-        bottom: 0;
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        /*transform: scale(1,5);*/
-        /*-ms-transform: scale(1,5); !* IE 9 *!*/
-        /*-webkit-transform: scale(0.8,0.8); !* Safari and Chrome *!*/
-    }
-
-    /*/deep/ .el-carousel__item--card {*/
-    /*width: auto !important;*/
-    /*}*/
-    /*/deep/ .el-carousel__item {*/
-    /*width: auto !important;*/
-    /*}*/
-    /*/deep/ .el-carousel__item--card.is-active {*/
-    /*z-index: 2;*/
-    /*position: absolute;*/
-    /*left: 50%;*/
-    /*transform: translate(-50%, 0px) !important;*/
-    /*}*/
-
-
-    .rankContainer {
-        width: 90%;
-        height: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .rankContainer .lt {
-        width: 60%;
-        height: 100%;
-        float: left;
-    }
-
-    .rankContainer .rt {
-        width: 40%;
-        float: right;
-    }
-
-    .recordMain {
-        /*height: 6rem;*/
-        overflow: hidden;
-    }
-
-    .rankContainer .lt .recordMain h5 {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.6rem;
-        text-align: left;
-        color: #fff;
-        margin: 5% auto;
-    }
-
-    .recordMain h5 s {
-        font-size: 0.8rem;
-    }
-
-    .rankContainer .sum {
-        position: relative;
-        top: 0.4rem;
-        width: 100%;
-        height: 35%;
-        overflow: visible;
-        display: block;
-        margin: 0 auto;
-        text-align: center;
-        z-index: 666;
-    }
-
-    .sumBg {
-        position: relative;
-        bottom: 0.8rem;
-        width: 100%;
-        height: 2rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        background: url("../static/img/pingtai.png") bottom center;
-        background-size: 100% 100%;
-        background-repeat: no-repeat;
-    }
-
-    .sum em {
-        width: 7.2rem;
-        float: right;
-        font-weight: 900;
-        font-family: vista;
-        font-weight: 900;
-        font-size: 2rem;
-        text-align: center;
-        color: #fff;
-        font-style: normal;
-        text-shadow: #E85297 5px 0 0, #E85297 0 5px 0, #E85297 -5px 0 0, #E85297 0 -5px 0;
-    }
-
-    .sum s {
-        position: relative;
-        bottom: -2rem;
-        width: 2rem;
-        float: right;
-        font-style: normal;
-        font-family: vista;
-        font-weight: normal;
-        font-size: 44px;
-        text-align: center;
-        color: #fff;
-        text-decoration: none;
-    }
-
-    .sumContainer {
-        width: 100%;
-        height: 4rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .topOne {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .topOne h5 {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.4rem;
-        text-align: left;
-        color: #fff;
-        margin: 1% 0;
-    }
-
-    ul, li {
-        list-style: none;
-        margin: 0;
-        padding: 0;
-    }
-
-    .topOne ul {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-left: 2px;
-        padding-top: 0.1rem;
-        padding-bottom: 0.1rem;
-    }
-
-    .topOne li {
-        width: 33.3%;
-        float: left;
-    }
-
-    .topOne .dgCenter {
-        width: 93%;
-        overflow: hidden;
-        float: left;
-        border-radius: 5px;
-        background: rgba(0.0 .0 .0 .1);
-        box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
-        padding-top: 0.1rem;
-        padding-bottom: 0.1rem;
-    }
-
-    .dgCenter .dghead {
-        width: 40%;
-        float: left;
-    }
-
-    .dghead img {
-        width: 1rem;
-        height: 1rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding: 0;
-        border-radius: 250px;
-        border: 2px solid #fff;
-    }
-
-    .dghead s {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        font-weight: normal;
-        font-size: 0.3rem;
-        text-align: center;
-        color: #fff;
-        font-style: normal;
-        text-decoration: none;
-        margin-top: 0.2rem;
-    }
-
-    .score {
-        width: 60%;
-        float: right;
-    }
-
-    .score em {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        font-family: vista;
-        font-weight: bold;
-        font-size: 0.7rem;
-        text-align: center;
-        color: #fff;
-        font-style: normal;
-        height: 1.4rem;
-        line-height: 1.4rem;
-    }
-
-    .score span {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.2rem;
-        color: #fff;
-        text-align: center;
-    }
-
-    .rt {
-        padding-top: 0.6rem;
-    }
-
-    .rt h5 {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 36px;
-        text-align: center;
-        color: #fff;
-        margin: 0;
-        margin-bottom: 0.6rem;
-        text-indent: 0.2rem;
-    }
-
-    .rt ul {
-        width: 80%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-top: 3px;
-        padding-bottom: 3px;
-    }
-
-    .rt li {
-        width: 80%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 0.24rem;
-        padding: 0.1rem 4%;
-        background: rgba(0, 0, 0, 0.1);
-        border-radius: 5px;
-        box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
-    }
-
-    .rt li img {
-        width: 0.6rem;
-        height: 0.6rem;
-        filter: drop-shadow(0px 0px 6px #bf00ff);
-        border: 2px solid #fff;
-        float: left;
-        border-radius: 250px;
-        margin-right: 3%;
-    }
-
-    .rt li em {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.35rem;
-        text-align: center;
-        color: #fff;
-        font-style: normal;
-        float: left;
-        height: 0.6rem;
-        line-height: 0.6rem;
-    }
-
-    .rt li s {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.35rem;
-        text-align: right;
-        color: #fff;
-        text-decoration: none;
-        height: 0.6rem;
-        line-height: 0.6rem;
-        float: right;
-    }
-
-    .heros > h5 {
-        font-family: vista;
-        font-weight: normal;
-        font-size: 0.35rem;
-        text-align: left;
-        color: #fff;
-        margin: 1% 0;
-    }
-
-    .heros ul {
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        padding-left: 3px;
-        padding-top: 6px;
-        padding-bottom: 6px;
-    }
-
-    .heros li {
-        width: 2.5rem;
-        height: 2.35rem;
-        float: left;
-        border-radius: 5px;
-        background: rgba(0.0 .0 .0 .1);
-        box-shadow: 0px 0px 6px rgba(255, 255, 255, 0.3);
-        padding-top: 0.2rem;
-        padding-bottom: 0.2rem;
-        color: #fff;
-        font-size: 0.3rem;
-        text-align: center;
-        margin-right: 5%;
-    }
-
-    .heros li > img {
-        width: 1.2rem;
-        height: 1.2rem;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        margin-bottom: 0.2rem;
-        border-radius: 100%;
-        border: 2px solid #fff;
-    }
-
-    .heros li > img.sex {
-        position: relative;
-        top: -1.5rem;
-        right: 0.55rem;
-        width: 0.4rem;
-        height: 0.4rem;
-        overflow: hidden;
-        float: right;
-        border: none;
-
-    }
-
-    .heros li em {
-        font-family: vista;
-        font-weight: bold;
-        font-size: 30px;
-        text-align: center;
-        font-style: normal;
-    }
-
-    .heros li em#red_0 {
-        color: #FA5114;
-    }
-
-    .heros li em#red_1 {
-        color: #FA981F;
-    }
-
-    .heros li em#red_2 {
-        color: #FFE13C;
-    }
-
-    .heros li #circle_0 {
-        border: 2px solid #FA5114;
-    }
-
-    .heros li #circle_1 {
-        border: 2px solid #FA981F;
-
-    }
-
-    .heros li #circle_2 {
-        border: 2px solid #FFE13C;
-
-    }
-
-    .heros li div {
-        position: relative;
-        top: -0.7rem;
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-        text-align: center;
-    }
-
-    .heros li span {
-        position: relative;
-        top: -0.67rem;
-        width: 100%;
-        overflow: hidden;
-        display: block;
-        margin: 0 auto;
-    }
-
-    .bottom {
-        position: relative;
-        width: 100%;
-        padding-top: 0.1rem;
-        bottom: 0.2rem;
-    }
-
-    /deep/ .el-carousel__indicators--horizontal {
-        display: none;
-    }
-</style>

+ 0 - 15
tv/src/views/gropePk.vue

@@ -1,15 +0,0 @@
-<template>
-    <h5>
-        多组团队竞技
-    </h5>
-</template>
-
-<script>
-    export default {
-        name: "gropePk"
-    }
-</script>
-
-<style scoped>
-
-</style>

+ 62 - 59
tv/src/views/pk.vue

@@ -32,8 +32,9 @@
                                 </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">
+                                        <img :class="s.sportLevel" :src="s.Head" alt="" v-if="s.Head">
+                                        <img :class="s.sportLevel" src="../static/img/people/flyhead.png" alt=""
+                                             v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -121,8 +122,9 @@
                                 </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">
+                                        <img :class="s.sportLevel" :src="s.Head" alt="" v-if="s.Head">
+                                        <img :class="s.sportLevel" src="../static/img/people/flyhead.png" alt=""
+                                             v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -197,7 +199,6 @@
             if (this.trueDate) {
                 this.PkTimer = setInterval(() => {
                     this.GetgetUserList();
-
                     this.curgetClassStat();
                 }, 1000);
                 this.GetgetUserList();
@@ -227,7 +228,7 @@
                 let Dp = json.Dp;
                 that.ReadLessonInfo(Dp);
                 // 载入学生信息
-                let Rs = this.fakeNews(16);
+                let Rs = fakeNews(16, 2);
                 that.UniteBreak(Rs);
 
                 // 人口总数
@@ -235,6 +236,33 @@
                 this.ClacClassTime();
             }
         },
+        watch: {
+            '$route': function (val) {
+                let that = this;
+                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 = fakeNews(16);
+                        that.UniteBreak(Rs);
+
+                    }
+                } else {
+                    clearInterval(this.PkTimer);
+                    clearInterval(this.PkEgg);
+                }
+            }
+        },
         beforeDestroy() {
             clearInterval(this.PkTimer);
             clearInterval(this.PkEgg);
@@ -242,32 +270,6 @@
             this.PkEgg = null;
         },
         methods: {
-            fakeNews(num) {
-                let item = [];
-                let nums = Math.random() * 100 + 1;
-                this.fakeNums = num;
-                for (var i = 0; i < this.fakeNums; i++) {
-                    item.push(
-                        {
-                            "SvId": 1,
-                            "UserId": 1,
-                            "Cle": i * 14,
-                            "realHr1": parseInt(Math.random() * 100 + 50),
-                            "realHr": 60,
-                            "activePercent": 30,
-                            "heartRate": 90,
-                            "PureCalorieNoVo2": 9999,
-                            "PureCalorieNoVo2": 999,
-                            "Name": "刘宇宁",
-                            "updateTime": 1604568915582,
-                            "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;
@@ -283,6 +285,7 @@
                     that.students.blueUnite = [];
                 } else {
                     Rs.map(function (item, t) {
+                        item.sportLevel = sportLevel(item.activePercent);
                         if (item.GroupNo == 1) {
                             that.students.redUnite.push(item);
                         }
@@ -324,6 +327,7 @@
 
                 // pkVal
                 let sumMax = redFmtSum + blueFmtSum;
+                console.log(redFmtSum);
 
                 // 当为0时均分
                 if (sumMax == 0) {
@@ -332,7 +336,6 @@
                     // 限制最大
                     let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
                     that.pkVal = pkval + '%';
-                    console.log(pkval);
                 }
             },
             // 获取上课学生信息
@@ -480,32 +483,6 @@
                 }
             }
         },
-        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
         }
@@ -921,6 +898,7 @@
     }
 
     .partInfo .title img {
+        width: 0.4rem;
         float: left;
         margin-right: 0.2rem;
     }
@@ -1361,4 +1339,29 @@
     .pk_container .rt li {
         float: right;
     }
+
+    /*color*/
+    .user .umd img.blue {
+        border-color: #028FE1;
+    }
+
+    .user .umd img.violet {
+        border-color: #6D26FA;
+    }
+
+    .user .umd img.green {
+        border-color: #0AB105;
+    }
+
+    .user .umd img.yellow {
+        border-color: #BACC01;
+    }
+
+    .user .umd img.brown {
+        border-color: #EA8813;
+    }
+
+    .user .umd img.red {
+        border-color: #CF1122;
+    }
 </style>

+ 0 - 85
tv/src/views/test.vue

@@ -1,85 +0,0 @@
-<template>
-    <div class="block">
-        <el-carousel height="150px" :interval="300">
-            <el-carousel-item v-for="rs in recordMain">
-                <h3 class="small" v-html="rs.Title"></h3>
-            </el-carousel-item>
-        </el-carousel>
-    </div>
-</template>
-
-<script>
-    let qs = require('qs');
-    import {
-        getHello,
-        getClassStat,
-        HerosRankingQuery,
-        CalorieStatsQuery,
-        UserRankingQuery
-    } from '@/api/getApiRes'
-    import '../libs/rem';
-    import '../Global'
-    export default {
-        data(){
-            return {
-                recordMain: [],
-            }
-        },
-        mounted() {
-            this.waitTimer = setInterval(() => {
-                // this.GetgetUserList();
-                this.GetCalorieStatsQuery();
-            }, 1000);
-        },
-        beforeDestroy() {
-            clearInterval(this.getcurIndex);
-            this.getcurIndex = null;
-        },
-        methods:{
-            GetCalorieStatsQuery() {
-                let that = this;
-                let param = {
-                    eqSn: localStorage.eqSn,
-                };
-                let postdata = qs.stringify(param);
-                CalorieStatsQuery(postdata).then(res => {
-                    that.recordMain = [];
-                    let json = res;
-                    if (json.Code == 0) {
-                        that.recordMain = json.Rs;
-                    } else {
-                        that.recordMain = [
-                            {
-                                Title: '*******',
-                                Result: [{'Values': 0, Unite: '千卡'}],
-                            },
-                            {
-                                Title: '*******',
-                                Result: [{'Values': 0, Unite: '千卡'}],
-                            }
-                        ];
-                        that.$message.error(json.Memo);
-                    }
-                })
-            },
-        }
-    }
-</script>
-
-<style scoped>
-
-    .carcontent {
-        width: 100%;
-        overflow: hidden;
-        /*display: block;*/
-        /*margin: 0 auto;*/
-        height: 400px;
-        background: #409EFF;
-    }
- .cubes {
-     height: 400px;
-     /*overflow: hidden;*/
-     /*display: block;*/
-     margin: 0 auto;
- }
-</style>

+ 89 - 86
tv/src/views/threepk.vue

@@ -69,8 +69,8 @@
                                 </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">
+                                        <img :class="s.sportLevel" :src="s.Head" alt="" v-if="s.Head">
+                                        <img :class="s.sportLevel" src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -119,8 +119,8 @@
                                 </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">
+                                        <img :class="s.sportLevel" :src="s.Head" alt="" v-if="s.Head">
+                                        <img :class="s.sportLevel" src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -169,8 +169,8 @@
                                 </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">
+                                        <img :class="s.sportLevel" :src="s.Head" alt="" v-if="s.Head">
+                                        <img :class="s.sportLevel" src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -259,32 +259,61 @@
                 // }, 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
+                this.PkTimer = setInterval(() => {
+                    // 虚假的数据
+                    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 = fakeNews(14,3);
+                    that.UniteBreak(Rs);
+
+                    // 人口总数
+                    that.num = Rs ? Rs.length + 1 : 0;
+                    this.ClacClassTime();
+                    // this.calcSumCK(Rs);
+                }, 1000);
+            }
+        },
+        watch: {
+            '$route': function (val) {
+                if (val.path == '/threepk') {
+                    if (this.trueDate) {
+                        this.PkTimer = setInterval(() => {
+                            this.GetgetUserList();
+                            this.ClacClassTime();
+                            this.curgetClassStat();
+                        }, 1000);
+                        this.GetgetUserList();
+
+                        // this.PkEgg = setInterval(() => {
+                        //     this.createEgg();
+                        // }, 6000);
+
+                    } else {
+                        let Rs = fakeNews(16,3);
+                        that.UniteBreak(Rs);
+
                     }
-                };
-                // 载入课程信息
-                let Dp = json.Dp;
-                that.ReadLessonInfo(Dp);
-                // 载入学生信息
-                let Rs = this.fakeNews(14);
-                that.UniteBreak(Rs);
-
-                // 人口总数
-                that.num = Rs ? Rs.length + 1 : 0;
-                this.ClacClassTime();
+                } else {
+                    clearInterval(this.PkTimer);
+                    clearInterval(this.PkEgg);
+                }
             }
         },
         beforeDestroy() {
@@ -294,32 +323,6 @@
             this.PkEgg = null;
         },
         methods: {
-            fakeNews(num) {
-                let item = [];
-                let nums = Math.random() * 100 + 1;
-                this.fakeNums = num;
-                for (var i = 0; i < this.fakeNums; i++) {
-                    item.push(
-                        {
-                            "SvId": 1,
-                            "UserId": 1,
-                            "Cle": i * 14,
-                            "realHr1": parseInt(Math.random() * 100 + 50),
-                            "realHr": 60,
-                            "activePercent": 30,
-                            "heartRate": 90,
-                            "PureCalorieNoVo2": 9999,
-                            "PureCalorieNoVo2": 999,
-                            "Name": "刘宇宁",
-                            "updateTime": 1604568915582,
-                            "Ck": nums + i * 2.2,
-                            "Head": "http://192.168.0.2/zw.png",
-                            "GroupNo": i % 3 + 1
-                        }
-                    )
-                }
-                return item;
-            },
             // 载入课程信息
             ReadLessonInfo(Dp) {
                 this.PlanName = Dp.PlanName;
@@ -337,6 +340,7 @@
                     that.students.yellowUnite = [];
                 } else {
                     Rs.map(function (item, t) {
+                        item.sportLevel = sportLevel(item.activePercent);
                         if (item.GroupNo == 1) {
                             that.students.redUnite.push(item);
                         }
@@ -375,7 +379,6 @@
                 that.yellowSum = yellowSum.toFixed(1);
 
 
-
                 // 进度条 formatCk
                 let redFmtSum = 0;
                 let blueFmtSum = 0;
@@ -391,7 +394,7 @@
                 });
 
                 // pkVal
-                let sumMax =redFmtSum+ blueFmtSum + yellowFmtSum;
+                let sumMax = redFmtSum + blueFmtSum + yellowFmtSum;
 
                 // 当为0时均分
                 if (sumMax == 0) {
@@ -401,7 +404,7 @@
                     // 限制最大
                     let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
                     let yellowVal = parseInt((yellowFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((yellowFmtSum / sumMax) * 100);
-                    console.log('that.pkVal:'+that.pkVal);
+                    console.log('that.pkVal:' + that.pkVal);
                     that.pkVal = pkval.toFixed(1) + '%';
                     that.yellowVal = yellowVal.toFixed(1) + '%';
                 }
@@ -511,7 +514,7 @@
                     if (json.Code == 0) {
                         // 没开课
                         if (json.ClassOn == 0) {
-                            console.log("xiakele ");
+                            console.log("已下课");
                             // 0: 下课 团课/私教 排名
                             // 1:团课/私教 todo
                             // 2:竞技课2PK
@@ -556,32 +559,7 @@
                 }
             }
         },
-        watch: {
-            '$route': function (val) {
-                if (val.path == '/threepk') {
-                    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
         }
@@ -1530,4 +1508,29 @@
         height: 0.85rem;
         overflow: hidden;
     }
+
+    /*color*/
+    .user .umd img.blue {
+        border-color: #028FE1;
+    }
+
+    .user .umd img.violet {
+        border-color: #6D26FA;
+    }
+
+    .user .umd img.green {
+        border-color: #0AB105;
+    }
+
+    .user .umd img.yellow {
+        border-color: #BACC01;
+    }
+
+    .user .umd img.brown {
+        border-color: #EA8813;
+    }
+
+    .user .umd img.red {
+        border-color: #CF1122;
+    }
 </style>

+ 1 - 1
tv/vue.config.js

@@ -23,7 +23,7 @@ module.exports = {
                 // 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.245:8080',//郑伟机器的2
+                target: 'http://192.168.0.74:8080',//郑伟机器的2
                 // target: 'http://192.168.0.243:9000/',//刘海生机器的
                 // target: ' http://192.168.0.222:9000/',//redmi的
                 changeOrigin: true,