|
@@ -37,7 +37,7 @@
|
|
</el-image>
|
|
</el-image>
|
|
</div>
|
|
</div>
|
|
<div class="one_card_txt">
|
|
<div class="one_card_txt">
|
|
- <span>{{item.type}}</span>
|
|
|
|
|
|
+ <span>{{converType(item.type)}}</span>
|
|
<div class="bottom clearfix">
|
|
<div class="bottom clearfix">
|
|
<time class="time">{{item.time}}</time>
|
|
<time class="time">{{item.time}}</time>
|
|
</div>
|
|
</div>
|
|
@@ -79,7 +79,7 @@ export default {
|
|
this.uTime = res.data.date;
|
|
this.uTime = res.data.date;
|
|
this.timeList = res.data.timeDistribution;
|
|
this.timeList = res.data.timeDistribution;
|
|
//注意目前仅第0项即行为代码为0被计入正常工作 后续可能需要修改
|
|
//注意目前仅第0项即行为代码为0被计入正常工作 后续可能需要修改
|
|
- this.uHours = this.timeList[0];
|
|
|
|
|
|
+ this.uHours = res.data.total;
|
|
this.setEcharts();
|
|
this.setEcharts();
|
|
//之后顺便再获取一下截图
|
|
//之后顺便再获取一下截图
|
|
this.getScreenshot();
|
|
this.getScreenshot();
|
|
@@ -183,15 +183,17 @@ export default {
|
|
radius: [30, 110],
|
|
radius: [30, 110],
|
|
roseType: "area",
|
|
roseType: "area",
|
|
data: [
|
|
data: [
|
|
- { value: this.timeList[0], name: "编程" },
|
|
|
|
- { value: this.timeList[1], name: "查资料" },
|
|
|
|
- { value: this.timeList[2], name: "看文档" },
|
|
|
|
- { value: this.timeList[3], name: "做设计" },
|
|
|
|
- { value: this.timeList[4], name: "美工" },
|
|
|
|
- { value: this.timeList[5], name: "运营" },
|
|
|
|
- { value: this.timeList[6], name: "看小说" },
|
|
|
|
- { value: this.timeList[7], name: "打游戏" },
|
|
|
|
- { value: this.timeList[8], name: "听音乐" }
|
|
|
|
|
|
+ { value: this.timeList[0], name: "其他" },
|
|
|
|
+ { value: this.timeList[1], name: "编程" },
|
|
|
|
+ { value: this.timeList[2], name: "上网" },
|
|
|
|
+ { value: this.timeList[3], name: "文档" },
|
|
|
|
+ { value: this.timeList[4], name: "设计" },
|
|
|
|
+ { value: this.timeList[5], name: "美工" },
|
|
|
|
+ { value: this.timeList[6], name: "运营" },
|
|
|
|
+ { value: this.timeList[7], name: "看小说" },
|
|
|
|
+ { value: this.timeList[8], name: "影视娱乐" },
|
|
|
|
+ { value: this.timeList[8], name: "听音乐" },
|
|
|
|
+ { value: this.timeList[9], name: "未知" }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
]
|
|
]
|
|
@@ -201,6 +203,34 @@ export default {
|
|
|
|
|
|
getSrcList(index) {
|
|
getSrcList(index) {
|
|
return this.srcList.slice(index).concat(this.srcList.slice(0, index));
|
|
return this.srcList.slice(index).concat(this.srcList.slice(0, index));
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ //类型枚举转换
|
|
|
|
+ converType(type) {
|
|
|
|
+ switch (type) {
|
|
|
|
+ case 0:
|
|
|
|
+ return "其他";
|
|
|
|
+ case 1:
|
|
|
|
+ return "编程";
|
|
|
|
+ case 2:
|
|
|
|
+ return "上网";
|
|
|
|
+ case 3:
|
|
|
|
+ return "文档";
|
|
|
|
+ case 4:
|
|
|
|
+ return "设计";
|
|
|
|
+ case 5:
|
|
|
|
+ return "美工";
|
|
|
|
+ case 6:
|
|
|
|
+ return "运营";
|
|
|
|
+ case 7:
|
|
|
|
+ return "看小说";
|
|
|
|
+ case 8:
|
|
|
|
+ return "影视娱乐";
|
|
|
|
+ case 9:
|
|
|
|
+ return "听音乐";
|
|
|
|
+ default:
|
|
|
|
+ return "未知";
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|