|
@@ -490,7 +490,7 @@ export default {
|
|
|
CourseNum,
|
|
|
ToolChart,
|
|
|
Subjuect,
|
|
|
- loading
|
|
|
+ loading,
|
|
|
},
|
|
|
props: {
|
|
|
oid: {
|
|
@@ -676,37 +676,52 @@ export default {
|
|
|
let courseWorksCountYearArray = {};
|
|
|
let timeArray = [];
|
|
|
for (var i = 0; i < this.courseTList.length; i++) {
|
|
|
- timeArray.push(this.courseTList[i].time);
|
|
|
+ timeArray.push({
|
|
|
+ vtime: this.courseTList[i].time,
|
|
|
+ time: this.courseTList[i].text,
|
|
|
+ });
|
|
|
}
|
|
|
for (var i = 0; i < this.courseTList.length; i++) {
|
|
|
let _type = this.courseTList[i].type
|
|
|
? this.courseTList[i].type.split(",")
|
|
|
: [];
|
|
|
if (this.lType1 == "all") {
|
|
|
- timeArray.forEach((item) => {
|
|
|
- courseWorksCountYearArray[item] =
|
|
|
- courseWorksCountYearArray[item] + 1 || 1;
|
|
|
- });
|
|
|
- } else if (this.lType1 == "grade") {
|
|
|
- if (this.hasCommonValue(this.gradeList, _type)) {
|
|
|
+ if (this.courseTList[i].text) {
|
|
|
timeArray.forEach((item) => {
|
|
|
- courseWorksCountYearArray[item] =
|
|
|
- courseWorksCountYearArray[item] + 1 || 1;
|
|
|
+ courseWorksCountYearArray[item.vtime] = parseInt(
|
|
|
+ (item.time / 60 / 60).toFixed(0)
|
|
|
+ );
|
|
|
});
|
|
|
}
|
|
|
+ } else if (this.lType1 == "grade") {
|
|
|
+ if (this.hasCommonValue(this.gradeList, _type)) {
|
|
|
+ if (this.courseTList[i].text) {
|
|
|
+ timeArray.forEach((item) => {
|
|
|
+ courseWorksCountYearArray[item.vtime] = parseInt(
|
|
|
+ (item.time / 60 / 60).toFixed(0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
} else if (this.lType1 == "subject") {
|
|
|
if (this.hasCommonValue(this.subjectList2, _type)) {
|
|
|
- timeArray.forEach((item) => {
|
|
|
- courseWorksCountYearArray[item] =
|
|
|
- courseWorksCountYearArray[item] + 1 || 1;
|
|
|
- });
|
|
|
+ if (this.courseTList[i].text) {
|
|
|
+ timeArray.forEach((item) => {
|
|
|
+ courseWorksCountYearArray[item.vtime] = parseInt(
|
|
|
+ (item.time / 60 / 60).toFixed(0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
if (this.hasCommonValue(this.thList, _type)) {
|
|
|
- timeArray.forEach((item) => {
|
|
|
- courseWorksCountYearArray[item] =
|
|
|
- courseWorksCountYearArray[item] + 1 || 1;
|
|
|
- });
|
|
|
+ if (this.courseTList[i].text) {
|
|
|
+ timeArray.forEach((item) => {
|
|
|
+ courseWorksCountYearArray[item.vtime] = parseInt(
|
|
|
+ (item.time / 60 / 60).toFixed(0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|