|
|
@@ -469,75 +469,75 @@
|
|
|
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);
|
|
|
+ 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
|
|
|
+ });
|
|
|
|
|
|
- // 获取人数 计算人均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);
|
|
|
+ // 当为0时均分
|
|
|
+ if (sumMax == 0) {
|
|
|
+ that.pkVal = '33.33%';
|
|
|
+ that.yellowVal = '33.33%';
|
|
|
} else {
|
|
|
- that.yellowSum = 0
|
|
|
+ // 限制最大
|
|
|
+ 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) + '%';
|
|
|
}
|
|
|
|
|
|
- // // 进度条 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;
|
|
|
+ // 获取人数 计算人均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 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 + '%';
|
|
|
// }
|
|
|
-
|
|
|
- let sumMax = parseFloat(that.redSum) + parseFloat(that.blueSum) + parseFloat(that.yellowSum);
|
|
|
- // 当为0时均分
|
|
|
- if (sumMax == 0) {
|
|
|
- that.pkVal = '50%';
|
|
|
- that.yellowVal = '33.33%';
|
|
|
- } else {
|
|
|
- // 限制最大
|
|
|
- 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 + '%';
|
|
|
- }
|
|
|
},
|
|
|
// 获取上课学生信息
|
|
|
GetgetUserList() {
|