|
@@ -28,7 +28,10 @@
|
|
|
<div class="title">工具使用</div>
|
|
|
</div>
|
|
|
<div class="dataBox">
|
|
|
- <ToolUse style="height: calc(100% - 40px)"></ToolUse>
|
|
|
+ <ToolUse
|
|
|
+ style="height: calc(100% - 40px)"
|
|
|
+ :toolArray="toolList"
|
|
|
+ ></ToolUse>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -54,7 +57,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<CateRank
|
|
|
- style="height: calc(100% - 72px); margin-top: 10px"
|
|
|
+ style="
|
|
|
+ height: calc(100% - 72px);
|
|
|
+ margin-top: 10px;
|
|
|
+ overflow: auto;
|
|
|
+ "
|
|
|
></CateRank>
|
|
|
</div>
|
|
|
<div class="halfBox middleBox" style="align-items: flex-start">
|
|
@@ -131,6 +138,7 @@ export default {
|
|
|
wCount: 0,
|
|
|
cCount: 0,
|
|
|
groupedArrayByMonth: [],
|
|
|
+ toolList: [],
|
|
|
reInc: 0,
|
|
|
};
|
|
|
},
|
|
@@ -152,7 +160,8 @@ export default {
|
|
|
this.wCount = res.data[0].length;
|
|
|
this.cCount = res.data[1].length;
|
|
|
var workArray = res.data[0];
|
|
|
- let workList = [];
|
|
|
+ var courseList = res.data[1];
|
|
|
+ var cList = [];
|
|
|
//将数据根据time里面的月份分成多个数组
|
|
|
var groupedArrayByMonth = [];
|
|
|
const date = new Date();
|
|
@@ -189,12 +198,68 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.reInc = (
|
|
|
- (groupedArrayByMonth[groupedArrayByMonth.length - 1].course /
|
|
|
- groupedArrayByMonth[groupedArrayByMonth.length - 2].course) *
|
|
|
- 100
|
|
|
- ).toFixed(1);
|
|
|
+ if (
|
|
|
+ groupedArrayByMonth[groupedArrayByMonth.length - 1].course == 0 ||
|
|
|
+ groupedArrayByMonth[groupedArrayByMonth.length - 2].course == 0
|
|
|
+ ) {
|
|
|
+ this.reInc = 0;
|
|
|
+ } else {
|
|
|
+ this.reInc = (
|
|
|
+ (groupedArrayByMonth[groupedArrayByMonth.length - 1].course /
|
|
|
+ groupedArrayByMonth[groupedArrayByMonth.length - 2].course) *
|
|
|
+ 100
|
|
|
+ ).toFixed(1);
|
|
|
+ }
|
|
|
this.groupedArrayByMonth = groupedArrayByMonth;
|
|
|
+ for (var i = 0; i < courseList.length; i++) {
|
|
|
+ cList.push(JSON.parse(courseList[i].chapters));
|
|
|
+ }
|
|
|
+ var toolList = [
|
|
|
+ [10, 65], //互动类
|
|
|
+ [7, 1, 52, 3, 48], //思维类
|
|
|
+ [49], //协作类
|
|
|
+ [4, 45, 15, 16, 50, 41, 47], //测评类
|
|
|
+ [40], //评价类
|
|
|
+ [18, 21, 22, 23, 24, 32, 57, 63], //编程类
|
|
|
+ [28, 31, 39, 66, 67, 68], //学科类
|
|
|
+ ];
|
|
|
+ var toolAllArray = [
|
|
|
+ { name: "互动类", value: 0 },
|
|
|
+ { name: "思维类", value: 0 },
|
|
|
+ { name: "协作类", value: 0 },
|
|
|
+ { name: "测评类", value: 0 },
|
|
|
+ { name: "评价类", value: 0 },
|
|
|
+ { name: "编程类", value: 0 },
|
|
|
+ { name: "学科类", value: 0 },
|
|
|
+ ];
|
|
|
+ for (var p = 0; p < toolList.length; p++) {
|
|
|
+ for (var i = 0; i < cList.length; i++) {
|
|
|
+ for (var j = 0; j < cList[i].length; j++) {
|
|
|
+ for (
|
|
|
+ var k = 0;
|
|
|
+ k < cList[i][j].chapterInfo[0].taskJson.length;
|
|
|
+ k++
|
|
|
+ ) {
|
|
|
+ for (
|
|
|
+ var q = 0;
|
|
|
+ q <
|
|
|
+ cList[i][j].chapterInfo[0].taskJson[k].toolChoose.length;
|
|
|
+ q++
|
|
|
+ ) {
|
|
|
+ if (
|
|
|
+ toolList[p].indexOf(
|
|
|
+ cList[i][j].chapterInfo[0].taskJson[k].toolChoose[q]
|
|
|
+ .tool[0]
|
|
|
+ ) != -1
|
|
|
+ ) {
|
|
|
+ toolAllArray[p].value++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.toolList = toolAllArray;
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
this.isLoading = false;
|