فهرست منبع

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

 Conflicts:
	tv/需求修改和debug.md
duanchangpeng 5 سال پیش
والد
کامیت
701b441125

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

@@ -845,3 +845,8 @@ export function BindHrSensorsToTempUser(postdata) {
     let url = headapi + 'v1/HrSensors/BindHrSensorsToTempUser ';
     return getApiBasic(url, postdata);
 }
+// 获取心率带电量
+export function GetHrSensorsPowerPercent(postdata) {
+    let url = headapi + 'v1/HrSensors/GetHrSensorsPowerPercent ';
+    return getApiBasic(url, postdata);
+}

+ 2 - 0
pc/src/views/courseEdit.vue

@@ -761,6 +761,7 @@
                         user_md5: row.UserMd5,
                         birthday: row.Birthday,
                         is_tmp_user: row.IsTmpUser,
+                        is_private: row.IsPrivate,
                     }
                 }
                 // 确认上课
@@ -1248,6 +1249,7 @@
                     user_md5: row.UserMd5,
                     birthday: row.Birthday,
                     is_tmp_user: row.IsTmpUser,
+                    is_private: row.IsPrivate,
                 };
                 duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
                 let that = this;

+ 68 - 11
pc/src/views/heartEquip.vue

@@ -14,16 +14,16 @@
                             <el-input v-model="panel.str" placeholder="请输入编号" type="number"></el-input>
                         </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>-->
+                        <!--<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>
@@ -35,6 +35,7 @@
         <div class="change">
             <el-button @click="addMember" type="primary">新增心率设备</el-button>
             <el-button @click="editList">编辑心率设备</el-button>
+            <el-button type="success" @click="getAllPower" :loading="BtnGetAllPower" >全部设备电量</el-button>
             <!--<el-button @click="delList" type="danger">删除心率设备</el-button>-->
         </div>
         <div class="table">
@@ -94,6 +95,13 @@
                         <!--<el-button @click="takeBack(scope.row)" type="danger" v-if="!scope.row.BindUserId">{{scope.row.UserName}} 设备收回</el-button>-->
                     </template>
                 </el-table-column>
+                <el-table-column
+                        prop="PowerPercent"
+                        label="电量"
+                        align="center"
+                >
+                </el-table-column>
+
                 <!--<el-table-column-->
                 <!--prop="Status"-->
                 <!--label="状态"-->
@@ -122,12 +130,13 @@
                         <!--禁用-->
                         <!--</el-button>-->
 
-                        <el-button type="danger"  size="mini"
+                        <el-button type="danger" size="mini"
                                    @click="pauseRowDel(scope.row)">
                             删除
                         </el-button>
 
                         <el-button type="text" @click="goPage(scope.row)">记录</el-button>
+                        <el-button type="success" size="mini" @click="getPower(scope.row)">获取电量</el-button>
                     </template>
                 </el-table-column>
             </el-table>
@@ -174,6 +183,7 @@
         HrSensorsStatusEdit,
         EditHrSensors,
         UnBindHrSensorsToUser,
+        GetHrSensorsPowerPercent,
         ShopVenueEquipEditStatus,
     } from "../api/getApiRes";
 
@@ -183,6 +193,7 @@
             return {
                 activeName: 'comm',
                 dialogVisible: false,//其他dialog
+                BtnGetAllPower: false,//
                 dialogMemberVisible: false,//新增心率设备dialog
                 dialogLesson: false,//课时调整
                 dialogGift: false,//赠送课时调整
@@ -467,6 +478,52 @@
                     });
                 });
             },
+            // 获取电量
+            getPower(row) {
+                let that = this;
+                let param = {
+                    token: localStorage.token,
+                    shopId: row.ShopId,
+                };
+                let postdata = qs.stringify(param);
+                GetHrSensorsPowerPercent(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        console.log(json);
+                        that.$message({
+                            showClose: true,
+                            message: '电量获取成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                })
+            },
+            getAllPower(){
+                let that = this;
+                that.BtnGetAllPower = true;
+                let param = {
+                    token: localStorage.token,
+                    shopId: localStorage.ShopId,
+                };
+                let postdata = qs.stringify(param);
+                GetHrSensorsPowerPercent(postdata).then(res => {
+                    let json = res;
+                    if (json.Code == 0) {
+                        // table 重载
+                        that.getTableQuery();
+                        that.$message({
+                            showClose: true,
+                            message: '电量获取成功!',
+                            type: 'success'
+                        });
+                    } else {
+                        that.$message.error(json.Memo);
+                    }
+                    that.BtnGetAllPower = false;
+                })
+            },
             // 删除
             pauseRowDel(row) {
                 let that = this;

+ 34 - 20
tv/src/Mock/index.js

@@ -9,7 +9,8 @@ let worldDetail = function () {
     for (var i = 0; i < 30; i++) {
         item.push({
             "id": "@guid",
-            "name": "@region",
+            // "name": "@region",
+            Name: "西门吹雪",
             "Confirmed": "@integer(36844, 368449)",
             "Deaths": "@integer(1099, 10993)",
             "Recovered": "@integer(1986, 19865)",
@@ -116,9 +117,13 @@ let getUserList = function () {
 };
 
 
-let testStudent = function (num, team) {
+let testStudent = function (num, team, mustbeTeamOne) {
     let item = [];
     let group = team == 2 ? "@integer(1, 2)" : "@integer(1, 3)";
+    // group = 1;
+    if (mustbeTeamOne) {
+        group = mustbeTeamOne;
+    }
     for (var i = 0; i < num; i++) {
         item.push({
             Age: 13,
@@ -136,8 +141,10 @@ let testStudent = function (num, team) {
             IsBreaking: 0,
             IsNewUser: 0,
             MaxHr: 80,
-            PowerPercent: "@integer(1, 100)",
-            Name: "@cname",
+            // PowerPercent: "@integer(1, 100)",
+            PowerPercent: "100",
+            // Name: "@cname",
+            Name: "西门吹雪",
             PkSucessnum: '1',//胜场数
             PkTotalnum: '1',//总场数
             PlanId: 60,
@@ -157,7 +164,7 @@ let testStudent = function (num, team) {
             isAlive: true,
             isFinish: false,
             isOver: false,
-            IsPrivate: 0,
+            IsPrivate: 1,
             lastPushDataTime: 1608188947175,
             lastUpdateTime: 1608188945184,
             queuePushData: [],
@@ -248,13 +255,15 @@ let UserRankingQuery = function (num) {
     let item2 = [];
     for (var i = 0; i < num; i++) {
         item1.push({
-            "UserName": "@cname",
+            // "UserName": "@cname",
+            UserName: "西门吹雪",
             "Values": "@integer(1, 9999)",
         })
     }
     for (var i = 0; i < num; i++) {
         item2.push({
-            "UserName": "@cname",
+            // "UserName": "@cname",
+            UserName: "西门吹雪",
             "Values": "@float(1,9999,0,1)",
         })
     }
@@ -263,13 +272,13 @@ let UserRankingQuery = function (num) {
             Title: '月度卡路里排行榜',
             Result: item1,
         }, {
-            Title: '月度CK排行榜',
+            Title: '月度CK排行榜',
             Result: item2,
         }, {
-            Title: '日卡路里排行榜',
-            Result: '',
+            Title: '日卡路里排行榜',
+            Result: item1,
         }, {
-            Title: '本日CK值排行榜',
+            Title: '今日CK排行榜',
             Result: item2,
         }
     ];
@@ -288,7 +297,8 @@ let testHerosRankingQuery = function (num) {
             "Style": "heros",
             "Result": [
                 {
-                    "UserName": "@cname",
+                    // "UserName": "@cname",
+                    UserName: "西门吹雪",
                     "Sex": 1,
                     "Head": "",
                     "Values": "4744",
@@ -296,7 +306,8 @@ let testHerosRankingQuery = function (num) {
                     "Message": ""
                 },
                 {
-                    "UserName": "@cname",
+                    // "UserName": "@cname",
+                    UserName: "西门吹雪",
                     "Sex": 1,
                     "Head": "",
                     "Values": "4034",
@@ -304,7 +315,8 @@ let testHerosRankingQuery = function (num) {
                     "Message": ""
                 },
                 {
-                    "UserName": "@cname",
+                    // "UserName": "@cname",
+                    UserName: "西门吹雪",
                     "Sex": 1,
                     "Head": "",
                     "Values": "2290",
@@ -318,7 +330,8 @@ let testHerosRankingQuery = function (num) {
             "Style": "tops",
             "Result": [
                 {
-                    "UserName": "郑伟",
+                    // "UserName": "@cname",
+                    UserName: "西门吹雪",
                     "Sex": 1,
                     "Head": "",
                     "Values": "1022",
@@ -326,7 +339,8 @@ let testHerosRankingQuery = function (num) {
                     "Message": "打破了历史记录100000"
                 },
                 {
-                    "UserName": "郑伟",
+                    // "UserName": "@cname",
+                    UserName: "西门吹雪",
                     "Sex": 1,
                     "Head": "",
                     "Values": "1020",
@@ -377,15 +391,15 @@ if (t == 0) {
     if (LessonClass == 1) {
         // 上团课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 1));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(21, 1));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(31, 1));
     } else if (LessonClass == 2) {
         // 上2队PK课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 2));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(12, 2));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(3, 2,));
     } else if (LessonClass == 3) {
         // 上3队PK课
         Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(1, 3));
-        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(12, 3));
+        Mock.mock(curheadapi + 'UserListInfo', 'post', testStudent(6, 3,));
     } else if (LessonClass == 0) {
         // 下课
         if (LessonDp == 0) {
@@ -400,7 +414,7 @@ if (t == 0) {
         } else if (LessonDp == 3) {
             Mock.mock(curheadapi + 'ClassStatQuery', 'post', getClassStat(0, 3));
             // 下课排名
-            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(1, 3));
+            Mock.mock(curheadapi + 'ClassUserRank', 'post', testStudent(6, 3));
         }
     }
 

BIN
tv/src/static/img/privateSign.png


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 4 - 0
tv/src/static/img/privateSign.svg


+ 19 - 2
tv/src/views/2pkRank.vue

@@ -204,8 +204,25 @@
                     blueSum += parseFloat(item.Ck.toFixed(1));
                     // that.successCalc(item);
                 });
-                that.redSum = redSum.toFixed(1);
-                that.blueSum = blueSum.toFixed(1);
+                // that.redSum = redSum.toFixed(1);
+                // that.blueSum = blueSum.toFixed(1);
+
+                // 获取人数 计算人均CK
+                let redHuman = 0;
+                let blueHuman = 0;
+                if (Rs.redUnite != '') {
+                    redHuman = Rs.redUnite.length;
+                    that.redSum = parseFloat(redSum / redHuman).toFixed(1);
+                } else {
+                    that.redSum = 0
+                }
+                if (Rs.blueUnite != '') {
+                    blueHuman = Rs.blueUnite.length;
+                    that.blueSum = parseFloat(blueSum / blueHuman).toFixed(1);
+                } else {
+                    that.blueSum = 0
+                }
+
                 // 上报胜率结果
                 let groupNo = redSum >= blueSum ? 1 : 2;
                 that.PostAddPkInfo(PlanId, groupNo);

+ 28 - 3
tv/src/views/3pkRank.vue

@@ -295,9 +295,34 @@
                     yellowSum += parseFloat(item.Ck);
                     that.successCalc(item);
                 });
-                that.redSum = redSum.toFixed(1);
-                that.blueSum = blueSum.toFixed(1);
-                that.yellowSum = yellowSum.toFixed(1);
+                // that.redSum = redSum.toFixed(1);
+                // that.blueSum = blueSum.toFixed(1);
+                // that.yellowSum = yellowSum.toFixed(1);
+
+                // 获取人数 计算人均CK
+                let redHuman = 0;
+                let blueHuman = 0;
+                let yellowHuman = 0;
+                if (Rs.redUnite != '') {
+                    redHuman = Rs.redUnite.length;
+                    that.redSum = parseFloat(redSum / redHuman).toFixed(1);
+                } else {
+                    that.redSum = 0
+                }
+
+                if (Rs.blueUnite != '') {
+                    blueHuman = Rs.blueUnite.length;
+                    that.blueSum = parseFloat(blueSum / blueHuman).toFixed(1);
+                } else {
+                    that.blueSum = 0
+                }
+                if (Rs.yellowUnite != '') {
+                    yellowHuman = Rs.yellowUnite.length;
+                    that.yellowSum = parseFloat(yellowSum / yellowHuman).toFixed(1);
+                } else {
+                    that.yellowSum = 0
+                }
+
                 let res = [
                     {name: "red", val: that.redSum},
                     {name: "blue", val: that.blueSum},

+ 107 - 6
tv/src/views/Main.vue

@@ -23,11 +23,16 @@
                                 <div class="head">
                                     <img :src="s.Head" alt="" v-if="s.Head">
                                     <img src="../static/img/people/flyhead.png" alt="" v-if="!s.Head">
+
                                     <!-- 生日快乐 -->
                                     <div class="birth" v-if="s.IsBirthday == 1">
                                         <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                         <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                     </div>
+                                    <!--私有心率带-->
+                                    <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                        <i></i>
+                                    </div>
                                 </div>
                             </div>
                             <div class="cla">
@@ -288,10 +293,10 @@
                 that.studentInfo.dialogVisible = true;
                 this.studentInfo.percent = 0;
                 // 倒计时5秒自动关闭
-                this.studentTime = 6;
+                this.studentTime = 15;
                 let clock = window.setInterval(() => {
                     this.studentTime--;
-                    let num = (6 - this.studentTime) / 6 * 100;
+                    let num = (15 - this.studentTime) / 15 * 100;
                     this.studentInfo.percent = parseInt(num) > 100 ? 100 : num;
                     console.log('num' + num);
                     if (parseInt(this.studentTime) <= 0) {
@@ -397,11 +402,10 @@
                         case parseInt(res.length) <= 30 && parseInt(res.length) > 24:
                             numberClass = 'twentyFour';
                             break;
-                        case parseInt(res.length) > 31:
+                        case parseInt(res.length) >= 31:
                             numberClass = 'twentyFour';
                             break;
                     }
-
                     let per = parseInt(res[i].ActivePercent);
                     switch (true) {
                         case per >= 90:
@@ -463,7 +467,7 @@
             }
         },
         components: {
-            Headside, levelIcon, newRecord, newStudent,power
+            Headside, levelIcon, newRecord, newStudent, power
         }
     }
 </script>
@@ -512,7 +516,7 @@
     }
 
     .yellow .centerLi {
-        background: #DFB200 ;
+        background: #DFB200;
     }
 
     .brown .centerLi {
@@ -2123,4 +2127,101 @@
         height: 0.3rem;
     }
 
+    /*isPrivate*/
+    .isPrivate {
+        position: relative;
+        float: right;
+        top: -3.3rem;
+        width: 75%;
+        height: 1px;
+        display: block;
+        margin: 0 auto;
+        overflow: visible;
+    }
+
+    .isPrivate i {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 0.1rem;
+        width: 1rem !important;
+        height: 1rem !important;
+        border: none !important;
+        background: url("../static/img/privateSign.svg");
+        background-size: 100% 100%;
+        background-position: top center;
+    }
+
+    .two .isPrivate {
+        top: -3.1rem;
+    }
+
+    .three .isPrivate {
+        top: -2.4rem;
+    }
+
+    .six .isPrivate {
+        top: -1.9rem;
+    }
+
+    .six .isPrivate i {
+        width: 0.8rem !important;
+        height: 0.8rem !important;
+    }
+
+    .nine .isPrivate {
+        top: -1.4rem;
+    }
+
+    .nine .isPrivate i {
+        width: 0.6rem !important;
+        height: 0.6rem !important;
+    }
+
+    .ten .isPrivate {
+        top: -1.4rem;
+    }
+
+    .ten .isPrivate i {
+        width: 0.6rem !important;
+        height: 0.6rem !important;
+    }
+
+    .twelve .isPrivate {
+        top: -1.2rem;
+    }
+
+    .twelve .isPrivate i {
+        width: 0.6rem !important;
+        height: 0.6rem !important;
+    }
+
+    .sixteen .isPrivate {
+        top: -1rem;
+    }
+
+    .sixteen .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+    .twenty .isPrivate {
+        top: -1rem;
+    }
+
+    .twenty .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+    .twentyFour .isPrivate {
+        top: -0.9rem;
+    }
+
+    .twentyFour .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+
 </style>

+ 17 - 2
tv/src/views/Wait.vue

@@ -33,6 +33,8 @@
                                                 <img :id="'circle_'+i"
                                                      v-bind:src="require('../static/img/people/flyhead.png')" alt=""
                                                      v-if="!tops.Head">
+                                                <img src="../static/img/wait/boy.png" class="sex" v-if="tops.Sex == 1"/>
+                                                <img src="../static/img/wait/girl.png" class="sex" v-if="tops.Sex == 2"/>
                                                 <s>{{ tops.UserName }}</s>
                                             </div>
                                             <div class="score">
@@ -503,7 +505,8 @@
         font-size: 0.6rem;
         text-align: left;
         color: #fff;
-        margin: 5% auto;
+        margin: 0 auto;
+        margin-top: 5%;
     }
 
     .recordMain h5 s {
@@ -765,7 +768,7 @@
         overflow: hidden;
         display: block;
         margin: 0 auto;
-        padding-left: 3px;
+        padding-left: 0px;
         padding-top: 6px;
         padding-bottom: 6px;
     }
@@ -783,6 +786,7 @@
         font-size: 0.3rem;
         text-align: center;
         margin-right: 5%;
+        margin-left: 0.05rem;
     }
 
     .heros li > img {
@@ -806,6 +810,17 @@
         float: right;
         border: none;
 
+    }
+    .topOne li .dghead img.sex {
+        position: relative;
+        top: -1.05rem;
+        right: 0;
+        width: 0.4rem;
+        height: 0.4rem;
+        overflow: hidden;
+        float: right;
+        border: none;
+
     }
 
     .heros li em {

+ 140 - 50
tv/src/views/pk.vue

@@ -46,6 +46,10 @@
                                         <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                         <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                     </div>
+                                    <!--私有心率带-->
+                                    <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                        <i></i>
+                                    </div>
                                 </div>
                                 <div class="urt">
                                     <em class="fastJump" v-if="s.RealHr != 0" v-show="parseInt(s.ActivePercent) > 90">{{
@@ -150,6 +154,10 @@
                                             <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                             <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                         </div>
+                                        <!--私有心率带-->
+                                        <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                            <i></i>
+                                        </div>
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -313,7 +321,7 @@
             this.timer3 = null;
         },
         methods: {
-            init(){
+            init() {
                 this.GetgetUserList();
                 this.createEgg();
                 this.createNewStudent();
@@ -347,7 +355,7 @@
                         if (that.studentInfo.dialogVisible == true) {
                             console.log('正在显示新学生');
                             return false
-                        }else{
+                        } else {
                             this.OpenEgg(json);
                         }
                     } else {
@@ -373,7 +381,7 @@
                         if (that.toperInfo.dialogVisible == true) {
                             console.log('正在显示彩蛋');
                             return false
-                        }else{
+                        } else {
                             that.OpenStudent(json.Rs);
                         }
                     } else {
@@ -403,10 +411,10 @@
                 that.studentInfo.dialogVisible = true;
                 this.studentInfo.percent = 0;
                 // 倒计时5秒自动关闭
-                this.studentTime = 6;
+                this.studentTime = 15;
                 let clock = window.setInterval(() => {
                     this.studentTime--;
-                    let num = (6 - this.studentTime) / 6 * 100;
+                    let num = (15 - this.studentTime) / 15 * 100;
                     this.studentInfo.percent = parseInt(num) > 100 ? 100 : num;
                     console.log('num' + num);
                     if (parseInt(this.studentTime) <= 0) {
@@ -449,6 +457,7 @@
                 let that = this;
                 let redSum = 0;
                 let blueSum = 0;
+
                 // that.redSum
                 Rs.redUnite.map(function (item, t) {
                     redSum += parseFloat(item.Ck.toFixed(1));
@@ -456,31 +465,59 @@
                 Rs.blueUnite.map(function (item, t) {
                     blueSum += parseFloat(item.Ck.toFixed(1));
                 });
-                that.redSum = redSum.toFixed(1);
-                that.blueSum = blueSum.toFixed(1);
-
+                // that.redSum = redSum.toFixed(1);
+                // that.blueSum = blueSum.toFixed(1);
+
+                // 获取人数 计算人均CK
+                let redHuman = 0;
+                let blueHuman = 0;
+                if (Rs.redUnite != '') {
+                    redHuman = Rs.redUnite.length;
+                    that.redSum = parseFloat(redSum / redHuman).toFixed(1);
+                } else {
+                    that.redSum = 0
+                }
+                if (Rs.blueUnite != '') {
+                    blueHuman = Rs.blueUnite.length;
+                    that.blueSum = parseFloat(blueSum / blueHuman).toFixed(1);
+                } else {
+                    that.blueSum = 0
+                }
                 // that.redSum = redSum;
                 // that.blueSum = blueSum;
 
                 // 进度条 FormatCk
-                let redFmtSum = 0;
-                let blueFmtSum = 0;
-                Rs.redUnite.map(function (item, t) {
-                    redFmtSum += item.FormatCk
-                });
-                Rs.blueUnite.map(function (item, t) {
-                    blueFmtSum += item.FormatCk
-                });
-
-                // pkVal
-                let sumMax = redFmtSum + blueFmtSum;
-
+                // let redFmtSum = 0;
+                // let blueFmtSum = 0;
+                // Rs.redUnite.map(function (item, t) {
+                //     redFmtSum += parseFloat(item.FormatCk);
+                // });
+                // Rs.blueUnite.map(function (item, t) {
+                //     blueFmtSum +=  parseFloat(item.FormatCk);
+                // });
+                //
+                // // pkVal
+                // let sumMax = parseFloat(redFmtSum) + parseFloat(blueFmtSum);
+                //
+                // // 当为0时均分
+                // if (sumMax == 0) {
+                //     that.pkVal = '50%';
+                // } else {
+                //     // 限制最大
+                //     let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
+                //     console.log(pkval);
+                //     that.pkVal = pkval + '%';
+                // }
+
+
+                // pkVal ***进度条对比按照人均显示
+                let sumMax = parseFloat(that.redSum) + parseFloat(that.blueSum);
                 // 当为0时均分
                 if (sumMax == 0) {
                     that.pkVal = '50%';
                 } else {
                     // 限制最大
-                    let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
+                    let pkval = parseInt((that.redSum / sumMax) * 100) > 100 ? 100 : parseInt((that.redSum / sumMax) * 100);
                     that.pkVal = pkval + '%';
                 }
             },
@@ -556,28 +593,6 @@
                 let s = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds();
                 this.classInfo.endTime = h + m + s;
             },
-            // // 计算双方对抗强度加总
-            // CalcTeamCk() {
-            //     let that = this;
-            //     let Redsum = 0;
-            //     let Bluesum = 0;
-            //     let sumMax = 0;
-            //     if (that.Redstudents) {
-            //         that.Redstudents.map(function (i) {
-            //             Redsum = parseFloat(Redsum) + parseFloat(i.Ck)
-            //         });
-            //     }
-            //     if (that.Bluestudents) {
-            //         that.Bluestudents.map(function (i) {
-            //             Bluesum = parseFloat(Bluesum) + parseFloat(i.Ck)
-            //         });
-            //     }
-            //     that.classInfo.redSum = parseFloat(Redsum).toFixed(1);
-            //     that.classInfo.blueSum = parseFloat(Bluesum).toFixed(1);
-            //
-            //     sumMax = parseFloat(Redsum) + parseFloat(Bluesum);
-            //     that.classInfo.pkVal = (that.classInfo.redSum / sumMax) * 100 + '%';
-            // },
             // 当前课程状态
             curgetClassStat() {
                 let that = this;
@@ -641,7 +656,7 @@
             }
         },
         components: {
-            Headside, newRecord,newStudent,power
+            Headside, newRecord, newStudent, power
         }
     }
 </script>
@@ -894,7 +909,7 @@
         text-align: right;
         padding-right: 0.3rem;
         font-size: 0.8rem;
-        line-height: 1.6rem;
+        line-height: 1.8rem;
     }
 
     .user .ult s {
@@ -912,7 +927,7 @@
     .circle {
         width: 1.7rem;
         height: 1.7rem;
-        overflow: hidden;
+        overflow: visible;
         display: block;
         margin: 0 auto;
         border-radius: 33rem;
@@ -950,7 +965,7 @@
         letter-spacing: -0.05em;
         text-align: right;
         font-style: normal;
-        line-height: 1.5rem;
+        line-height: 1.8rem;
         padding-right: 25%;
     }
 
@@ -1313,9 +1328,11 @@
     .three .urt em {
         line-height: 1.2rem;
     }
+
     .three .user .urt {
         height: 1rem;
     }
+
     .three .bottomLi img {
         width: 0.4rem;
         height: 0.4rem;
@@ -1364,7 +1381,7 @@
 
 
     /*four*/
-    .pk_container  .four {
+    .pk_container .four {
         width: 49%;
         float: left;
         /*margin-top: 0.4rem;*/
@@ -1389,7 +1406,7 @@
     .four .user .ult em div {
         width: 90%;
         font-size: 0.5rem;
-        line-height: 1rem;
+        line-height: 1.1rem;
         padding-right: 0.2rem;
     }
 
@@ -1422,7 +1439,7 @@
 
     .four .urt em {
         font-size: 0.4rem;
-        line-height: 1rem;
+        line-height: 1.1rem;
     }
 
     .four .bottomLi {
@@ -1508,6 +1525,7 @@
     .eight .user .ult em {
         height: 1.1rem;
     }
+
     .eight .bottomLi {
         width: 100%;
         text-indent: 0.1rem;
@@ -1528,6 +1546,17 @@
         overflow: hidden;
     }
 
+    .eight .bg h5 {
+        width: 100%;
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+    }
+
+    .eight .nameMd {
+        font-size: 0.22rem;
+    }
+
     .pk_container .rt li {
         float: right;
     }
@@ -1615,6 +1644,7 @@
         width: 1rem;
         height: 0.4rem;
     }
+
     .eight .birth {
         width: 1rem;
     }
@@ -1631,4 +1661,64 @@
         height: 0.4rem;
     }
 
+    /*isPrivate*/
+    .isPrivate {
+        position: relative;
+        float: right;
+        right: -0.3rem;
+        width: 55%;
+        height: 1px;
+        display: block;
+        margin: 0 auto;
+        overflow: visible;
+    }
+
+    .isPrivate i {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 0.2rem;
+        width: 1rem !important;
+        height: 1rem !important;
+        border: none !important;
+        background: url("../static/img/privateSign.svg");
+        background-size: 100% 100%;
+        background-position: top center;
+    }
+
+    .two .isPrivate {
+        top: -2rem;
+    }
+
+    .three .isPrivate {
+        top: -1.4rem;
+        right: -0.1rem;
+    }
+
+    .three .isPrivate i {
+        width: 0.6rem !important;
+        height: 0.6rem !important;
+    }
+
+    .four .isPrivate {
+        top: -1.1rem;
+        right: -0.2rem;
+    }
+
+    .four .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+    .eight .isPrivate {
+        top: -1.1rem;
+        right: -0.2rem;
+    }
+
+    .eight .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+
 </style>

+ 143 - 29
tv/src/views/threepk.vue

@@ -88,6 +88,10 @@
                                             <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                             <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                         </div>
+                                        <!--私有心率带-->
+                                        <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                            <i></i>
+                                        </div>
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -154,6 +158,10 @@
                                             <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                             <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                         </div>
+                                        <!--私有心率带-->
+                                        <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                            <i></i>
+                                        </div>
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -221,6 +229,10 @@
                                             <img src="../assets/img/birth/birthCrow.png" class="birthCrow"/>
                                             <img src="../assets/img/birth/birthText.png" class="birthText"/>
                                         </div>
+                                        <!--私有心率带-->
+                                        <div class="isPrivate" v-if="s.IsPrivate == 1">
+                                            <i></i>
+                                        </div>
                                     </div>
                                 </div>
                                 <div class="urt">
@@ -457,38 +469,74 @@
                 Rs.yellowUnite.map(function (item, t) {
                     yellowSum += parseFloat(item.Ck.toFixed(1))
                 });
-                that.redSum = redSum.toFixed(1);
-                that.blueSum = blueSum.toFixed(1);
-                that.yellowSum = yellowSum.toFixed(1);
-
-
-                // 进度条 FormatCk
-                let redFmtSum = 0;
-                let blueFmtSum = 0;
-                let yellowFmtSum = 0;
-                Rs.redUnite.map(function (item, t) {
-                    redFmtSum += item.FormatCk
-                });
-                Rs.blueUnite.map(function (item, t) {
-                    blueFmtSum += item.FormatCk
-                });
-                Rs.yellowUnite.map(function (item, t) {
-                    yellowFmtSum += item.FormatCk
-                });
+                // that.redSum = redSum.toFixed(1);
+                // that.blueSum = blueSum.toFixed(1);
+                // that.yellowSum = yellowSum.toFixed(1);
+
+                // 获取人数 计算人均CK
+                let redHuman = 0;
+                let blueHuman = 0;
+                let yellowHuman = 0;
+                if (Rs.redUnite != '') {
+                    redHuman = Rs.redUnite.length;
+                    that.redSum = parseFloat(redSum / redHuman).toFixed(1);
+                } else {
+                    that.redSum = 0
+                }
 
-                // pkVal
-                let sumMax = redFmtSum + blueFmtSum + yellowFmtSum;
+                if (Rs.blueUnite != '') {
+                    blueHuman = Rs.blueUnite.length;
+                    that.blueSum = parseFloat(blueSum / blueHuman).toFixed(1);
+                } else {
+                    that.blueSum = 0
+                }
+                if (Rs.yellowUnite != '') {
+                    yellowHuman = Rs.yellowUnite.length;
+                    that.yellowSum = parseFloat(yellowSum / yellowHuman).toFixed(1);
+                } else {
+                    that.yellowSum = 0
+                }
 
+                // // 进度条 FormatCk
+                // let redFmtSum = 0;
+                // let blueFmtSum = 0;
+                // let yellowFmtSum = 0;
+                // Rs.redUnite.map(function (item, t) {
+                //     redFmtSum += item.FormatCk
+                // });
+                // Rs.blueUnite.map(function (item, t) {
+                //     blueFmtSum += item.FormatCk
+                // });
+                // Rs.yellowUnite.map(function (item, t) {
+                //     yellowFmtSum += item.FormatCk
+                // });
+                //
+                // // pkVal
+                // let sumMax = redFmtSum + blueFmtSum + yellowFmtSum;
+                //
+                // // 当为0时均分
+                // if (sumMax == 0) {
+                //     that.pkVal = '33.33%';
+                //     that.yellowVal = '33.33%';
+                // } else {
+                //     // 限制最大
+                //     let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
+                //     let yellowVal = parseInt((yellowFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((yellowFmtSum / sumMax) * 100);
+                //     that.pkVal = pkval.toFixed(1) + '%';
+                //     that.yellowVal = yellowVal.toFixed(1) + '%';
+                // }
+
+                let sumMax = parseFloat(that.redSum) + parseFloat(that.blueSum) + parseFloat(that.yellowSum);
                 // 当为0时均分
                 if (sumMax == 0) {
-                    that.pkVal = '33.33%';
+                    that.pkVal = '50%';
                     that.yellowVal = '33.33%';
                 } else {
                     // 限制最大
-                    let pkval = parseInt((redFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((redFmtSum / sumMax) * 100);
-                    let yellowVal = parseInt((yellowFmtSum / sumMax) * 100) > 100 ? 100 : parseInt((yellowFmtSum / sumMax) * 100);
-                    that.pkVal = pkval.toFixed(1) + '%';
-                    that.yellowVal = yellowVal.toFixed(1) + '%';
+                    let pkval = parseInt((that.redSum / sumMax) * 100) > 100 ? 100 : parseInt((that.redSum / sumMax) * 100);
+                    let yellowVal = parseInt((that.yellowSum / sumMax) * 100) > 100 ? 100 : parseInt((that.yellowSum / sumMax) * 100);
+                    that.pkVal = pkval + '%';
+                    that.yellowVal = yellowVal + '%';
                 }
             },
             // 获取上课学生信息
@@ -658,10 +706,10 @@
                 that.studentInfo.dialogVisible = true;
                 this.studentInfo.percent = 0;
                 // 倒计时5秒自动关闭
-                this.studentTime = 6;
+                this.studentTime = 15;
                 let clock = window.setInterval(() => {
                     this.studentTime--;
-                    let num = (6 - this.studentTime) / 6 * 100;
+                    let num = (15 - this.studentTime) / 15 * 100;
                     this.studentInfo.percent = parseInt(num) > 100 ? 100 : num;
                     console.log('num' + num);
                     if (parseInt(this.studentTime) <= 0) {
@@ -1130,7 +1178,7 @@
     .pk_container .user .umd {
         width: 33.333%;
         float: left;
-        overflow: hidden;
+        overflow: visible;
         flex-direction: column
     }
 
@@ -1194,7 +1242,7 @@
     .circle {
         width: 1.73rem;
         height: 1.73rem;
-        overflow: hidden;
+        overflow: visible;
         display: block;
         margin: 0 auto;
         border-radius: 33rem;
@@ -1621,6 +1669,9 @@
         height: 1.2rem;
         overflow: hidden;
     }
+    .four  .nameMd {
+        font-size: 0.2rem;
+    }
 
     /*six*/
 
@@ -1703,6 +1754,9 @@
         height: 0.85rem;
         overflow: hidden;
     }
+    .eight  .nameMd {
+        font-size: 0.2rem;
+    }
 
     /*color*/
     .user .umd img.blue {
@@ -1802,4 +1856,64 @@
         width: 0.7rem;
         height: 0.3rem;
     }
+
+    /*isPrivate*/
+    .isPrivate {
+        position: relative;
+        float: right;
+        right: -0.3rem;
+        width: 55%;
+        height: 1px;
+        display: block;
+        margin: 0 auto;
+        overflow: visible;
+    }
+
+    .isPrivate i {
+        overflow: hidden;
+        display: block;
+        margin: 0 auto;
+        margin-top: 0.2rem;
+        width: 1rem !important;
+        height: 1rem !important;
+        border: none !important;
+        background: url("../static/img/privateSign.svg");
+        background-size: 100% 100%;
+        background-position: top center;
+    }
+
+    .two .isPrivate {
+        top: -2rem;
+    }
+
+    .three .isPrivate {
+        top: -1.4rem;
+        right: -0.1rem;
+    }
+
+    .three .isPrivate i {
+        width: 0.6rem !important;
+        height: 0.6rem !important;
+    }
+
+    .four .isPrivate {
+        top: -1.2rem;
+        right: -0.2rem;
+    }
+
+    .four .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
+    .eight .isPrivate {
+        top: -1rem;
+        right: -0.1rem;
+    }
+
+    .eight .isPrivate i {
+        width: 0.4rem !important;
+        height: 0.4rem !important;
+    }
+
 </style>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است