|
|
|
@ -104,9 +104,10 @@ |
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:row;"> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold;"> 事件类型统计 </h1> |
|
|
|
</div> |
|
|
|
<el-table |
|
|
|
<!-- <el-table |
|
|
|
:data="tableList" |
|
|
|
style="width: 100%;" |
|
|
|
height="300" |
|
|
|
row-key="id" |
|
|
|
border |
|
|
|
default-expand-all |
|
|
|
@ -114,45 +115,63 @@ |
|
|
|
<el-table-column |
|
|
|
prop="level1" |
|
|
|
label="一级分类" |
|
|
|
sortable |
|
|
|
width="150"> |
|
|
|
|
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="level2" |
|
|
|
label="二级分类" |
|
|
|
sortable |
|
|
|
width="150"> |
|
|
|
|
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="level3" |
|
|
|
label="三级分类" |
|
|
|
sortable |
|
|
|
width="150"> |
|
|
|
|
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="level4" |
|
|
|
label="四级分类" |
|
|
|
sortable |
|
|
|
width="150"> |
|
|
|
|
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="eventCount" |
|
|
|
label="事件数量" |
|
|
|
sortable |
|
|
|
width="150"> |
|
|
|
|
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="proportion" |
|
|
|
label="同级占比" |
|
|
|
sortable |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.proportion }}% |
|
|
|
</template> |
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
</el-table> --> |
|
|
|
<el-table |
|
|
|
:data="tableList" |
|
|
|
style="width: 100%;margin-bottom: 20px;" |
|
|
|
row-key="id" |
|
|
|
border |
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
|
|
|
<el-table-column |
|
|
|
prop="categoryName" |
|
|
|
label="事件类型"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="eventCount" |
|
|
|
label="事件数量"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="proportion" |
|
|
|
label="同级占比" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:row; height:500px"> |
|
|
|
<div style="display: flex;width: 49%; flex-direction:column;"> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold; margin: 20px 0;"> 部门科室工单量统计 </h1> |
|
|
|
@ -871,7 +890,8 @@ export default { |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, param); |
|
|
|
if (code === 0) { |
|
|
|
this.tableList=this.flattenTree(data); |
|
|
|
this.tableList=data |
|
|
|
// this.tableList=this.flattenTree(data); |
|
|
|
console.log(this.tableList); |
|
|
|
console.log(this.tableList,"lksdjfklj s"); |
|
|
|
} else { |
|
|
|
@ -894,15 +914,14 @@ export default { |
|
|
|
//获取前一个月的日期 |
|
|
|
getLastMonthRange() { |
|
|
|
const now = new Date(); |
|
|
|
const firstDayOfCurrentMonth = new Date(now.getFullYear(), now.getMonth(), 1); |
|
|
|
const lastDayOfLastMonth = new Date(firstDayOfCurrentMonth - 1); |
|
|
|
const firstDayOfLastMonth = new Date(lastDayOfLastMonth.getFullYear(), lastDayOfLastMonth.getMonth(), 1); |
|
|
|
const startOfYear = new Date(now.getFullYear(), 0, 1); // 当前年份的1月1日 |
|
|
|
const endOfYear = new Date(now.getFullYear(), 11, 31); // 当前年份的12月31日 |
|
|
|
|
|
|
|
firstDayOfLastMonth.setHours(0, 0, 0, 0); |
|
|
|
lastDayOfLastMonth.setHours(23, 59, 59, 999); |
|
|
|
startOfYear.setHours(0, 0, 0, 0); |
|
|
|
endOfYear.setHours(23, 59, 59, 999); |
|
|
|
|
|
|
|
this.formData.queryDateStart =this.formatDate1(firstDayOfLastMonth), |
|
|
|
this.formData.queryDateEnd=this.formatDate1(lastDayOfLastMonth) |
|
|
|
this.formData.queryDateStart =this.formatDate1(startOfYear), |
|
|
|
this.formData.queryDateEnd=this.formatDate1(endOfYear) |
|
|
|
console.log(this.formData.queryDateEnd); |
|
|
|
}, |
|
|
|
//对部门进行统计 |
|
|
|
|