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