Changpeng Duan 5 tahun lalu
induk
melakukan
f2522b5d16
4 mengubah file dengan 65 tambahan dan 35 penghapusan
  1. 2 0
      pc/src/views/courseEdit.vue
  2. 26 13
      tv/src/views/pk.vue
  3. 35 22
      tv/src/views/threepk.vue
  4. 2 0
      tv/需求修改和debug.md

+ 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;

+ 26 - 13
tv/src/views/pk.vue

@@ -487,24 +487,37 @@
                 // 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 + '%';
                 }
             },

+ 35 - 22
tv/src/views/threepk.vue

@@ -497,33 +497,46 @@
                     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;
-
+                // // 进度条 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 + '%';
                 }
             },
             // 获取上课学生信息

+ 2 - 0
tv/需求修改和debug.md

@@ -161,6 +161,8 @@ TODO 欢迎私有心率带同学来上课
 2.  TV私有心率带标识在上课时显示(PK课试试能不能放得下√ 
 11. PK使用人均PK比较√ 
 
+a1f2d679c1624d3a
+
 
 
 5.  TV 数字火的样式