|
|
|
@ -148,13 +148,11 @@ |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:row;"> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold;"> 部门科室工单量统计 </h1> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold; margin-right: 600px;"> 社区工单量统计 </h1> |
|
|
|
</div> |
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:row;"> |
|
|
|
|
|
|
|
<el-table :data="departmentList" height="250" border class="m-table-item" style="width: 100%"> |
|
|
|
|
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:row; height:500px"> |
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:column;"> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold;"> 部门科室工单量统计 </h1> |
|
|
|
<el-table :data="departmentList" height="250" border class="m-table-item" style="width: 100%"> |
|
|
|
<!-- <el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> --> |
|
|
|
<!-- <el-table-column prop="address" align="center" label="地点" :show-overflow-tooltip="true"></el-table-column> --> |
|
|
|
<el-table-column prop="assignOrgName" align="center" label="部门科室" |
|
|
|
@ -169,8 +167,11 @@ |
|
|
|
<el-table-column prop="illegalConnectRate" align="center" label="联系当事人超期数" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
<el-table-column prop="cillegalResolveRateontent" align="center" label="办理超期数" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-table :data="communityList" height="250" border class="m-table-item" style="margin-left: 50px; "> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="display: flex;justify-content: space-between;flex-direction:column;"> |
|
|
|
<h1 style="font-size: 24px; font-weight: bold; margin-right: 600px;"> 社区工单量统计 </h1> |
|
|
|
<el-table :data="communityList" height="300" border class="m-table-item" style="width: 100%"> |
|
|
|
<!-- <el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> --> |
|
|
|
<!-- <el-table-column prop="address" align="center" label="地点" :show-overflow-tooltip="true"></el-table-column> --> |
|
|
|
<el-table-column prop="assignOrgName" align="center" label="社区" |
|
|
|
@ -186,6 +187,8 @@ |
|
|
|
<el-table-column prop="cillegalResolveRateontent" align="center" label="办理超期数" :show-overflow-tooltip="true"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
@ -212,7 +215,6 @@ |
|
|
|
<h2 style="font-size: 20px; font-weight: bold;"> ➤ 同一人员重复投诉</h2> |
|
|
|
</div> |
|
|
|
|
|
|
|
<el-table :data="mobileData" border class="m-table-item" style="width: 100%"> |
|
|
|
<el-table-column label="序号" fixed="left" type="index" align="center" width="50" /> |
|
|
|
<el-table-column prop="mobile" align="center" label="联系方式" :show-overflow-tooltip="true"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
@ -331,6 +333,8 @@ export default { |
|
|
|
components: {TableRow}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
starttime:"", |
|
|
|
endtime:"", |
|
|
|
level:1, |
|
|
|
tableList:[], |
|
|
|
communityList:[], |
|
|
|
@ -670,6 +674,9 @@ export default { |
|
|
|
this.agencyLevel = localStorage.getItem("level", this.orgData.level); |
|
|
|
await this.getTableData(); |
|
|
|
await this.initEcharts(); |
|
|
|
await this.EventCategoryAnalysis(); |
|
|
|
await this.EventCate(); |
|
|
|
await this.getCategoryTree() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
calculateRowspan(item) { |
|
|
|
@ -824,148 +831,181 @@ export default { |
|
|
|
console.log(this.formData); |
|
|
|
// 清空数据 |
|
|
|
this.cleanReportData(); |
|
|
|
// await this.getTableData(); |
|
|
|
// await this.initEcharts(); |
|
|
|
// await this.EventCategoryAnalysis(); |
|
|
|
// await this.EventCate(); |
|
|
|
await this.getTableData(); |
|
|
|
await this.initEcharts(); |
|
|
|
await this.EventCategoryAnalysis(); |
|
|
|
await this.EventCate(); |
|
|
|
await this.getCategoryTree() |
|
|
|
}, |
|
|
|
//事件类型统计 |
|
|
|
async getCategoryTree(){ |
|
|
|
if(this.formData.queryDateStart&&this.formData.queryDateEnd){ |
|
|
|
this.starttime=this.formData.queryDateStart, |
|
|
|
this.endtime=this.formData.queryDateEnd |
|
|
|
}else{{ |
|
|
|
this.getLastMonthRange() |
|
|
|
} |
|
|
|
} |
|
|
|
const url = "/governance/icEvent/getCategoryTree"; |
|
|
|
// 对社区,部门进行更改 |
|
|
|
let param = { |
|
|
|
startDate:this.formData.queryDateStart, |
|
|
|
endDate:this.formData.queryDateEnd, |
|
|
|
let param = { |
|
|
|
startDate:this.starttime, |
|
|
|
endDate:this.endtime, |
|
|
|
usableFlag:true |
|
|
|
} |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, param); |
|
|
|
if (code === 0) { |
|
|
|
this.tableList=[ |
|
|
|
{ |
|
|
|
"id": "1", |
|
|
|
"pid": "0", |
|
|
|
"customerId": null, |
|
|
|
"pids": "0", |
|
|
|
"pidList": null, |
|
|
|
"parentCategoryCode": null, |
|
|
|
"categoryName": "城市综合", |
|
|
|
"categoryCode": "A1", |
|
|
|
"categoryType": "0", |
|
|
|
"sort": 0, |
|
|
|
"color": null, |
|
|
|
"isDisable": 1, |
|
|
|
"infoCode": "A", |
|
|
|
"eventCount": 4, |
|
|
|
"proportion": 100, |
|
|
|
"level1": "城市综合", |
|
|
|
"level2": null, |
|
|
|
"level3": null, |
|
|
|
"level4": null, |
|
|
|
"level5": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "11", |
|
|
|
"pid": "1", |
|
|
|
"customerId": null, |
|
|
|
"pids": "1", |
|
|
|
"pidList": null, |
|
|
|
"parentCategoryCode": null, |
|
|
|
"categoryName": "城市管理", |
|
|
|
"categoryCode": "A102", |
|
|
|
"categoryType": "1", |
|
|
|
"sort": 0, |
|
|
|
"color": null, |
|
|
|
"isDisable": 1, |
|
|
|
"infoCode": "A", |
|
|
|
"eventCount": 2, |
|
|
|
"proportion": 50, |
|
|
|
"level1": null, |
|
|
|
"level2": "城市综合", |
|
|
|
"level3": null, |
|
|
|
"level4": null, |
|
|
|
"level5": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "98", |
|
|
|
"pid": "11", |
|
|
|
"customerId": null, |
|
|
|
"pids": "1,11", |
|
|
|
"pidList": null, |
|
|
|
"parentCategoryCode": null, |
|
|
|
"categoryName": "市容环境", |
|
|
|
"categoryCode": "A10201", |
|
|
|
"categoryType": "2", |
|
|
|
"sort": 0, |
|
|
|
"color": null, |
|
|
|
"isDisable": 1, |
|
|
|
"infoCode": "A", |
|
|
|
"eventCount": 2, |
|
|
|
"proportion": 100, |
|
|
|
"level1":null , |
|
|
|
"level2": null, |
|
|
|
"level3": "城市综合", |
|
|
|
"level4": null, |
|
|
|
"level5": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "14", |
|
|
|
"pid": "1", |
|
|
|
"customerId": null, |
|
|
|
"pids": "1", |
|
|
|
"pidList": null, |
|
|
|
"parentCategoryCode": null, |
|
|
|
"categoryName": "居民生活", |
|
|
|
"categoryCode": "A105", |
|
|
|
"categoryType": "1", |
|
|
|
"sort": 0, |
|
|
|
"color": null, |
|
|
|
"isDisable": 1, |
|
|
|
"infoCode": "A", |
|
|
|
"eventCount": 2, |
|
|
|
"proportion": 50, |
|
|
|
"level1": null, |
|
|
|
"level2": null, |
|
|
|
"level3": null, |
|
|
|
"level4":"城市综合" , |
|
|
|
"level5": null |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "125", |
|
|
|
"pid": "14", |
|
|
|
"customerId": null, |
|
|
|
"pids": "1,14", |
|
|
|
"pidList": null, |
|
|
|
"parentCategoryCode": null, |
|
|
|
"categoryName": "污水", |
|
|
|
"categoryCode": "A10507", |
|
|
|
"categoryType": "2", |
|
|
|
"sort": 0, |
|
|
|
"color": null, |
|
|
|
"isDisable": 1, |
|
|
|
"infoCode": "A", |
|
|
|
"eventCount": 2, |
|
|
|
"proportion": 100, |
|
|
|
"level1": null, |
|
|
|
"level2": null, |
|
|
|
"level3": null, |
|
|
|
"level4": null, |
|
|
|
"level5": "城市综合" |
|
|
|
} |
|
|
|
] |
|
|
|
this.tableList=this.flattenTree(data); |
|
|
|
console.log(this.tableList); |
|
|
|
// // { |
|
|
|
// // "id": "1", |
|
|
|
// // "pid": "0", |
|
|
|
// // "customerId": null, |
|
|
|
// // "pids": "0", |
|
|
|
// // "pidList": null, |
|
|
|
// // "parentCategoryCode": null, |
|
|
|
// // "categoryName": "城市综合", |
|
|
|
// // "categoryCode": "A1", |
|
|
|
// // "categoryType": "0", |
|
|
|
// // "sort": 0, |
|
|
|
// // "color": null, |
|
|
|
// // "isDisable": 1, |
|
|
|
// // "infoCode": "A", |
|
|
|
// // "eventCount": 4, |
|
|
|
// // "proportion": 100, |
|
|
|
// // "level1": "城市综合", |
|
|
|
// // "level2": null, |
|
|
|
// // "level3": null, |
|
|
|
// // "level4": null, |
|
|
|
// // "level5": null |
|
|
|
// // }, |
|
|
|
// // { |
|
|
|
// // "id": "11", |
|
|
|
// // "pid": "1", |
|
|
|
// // "customerId": null, |
|
|
|
// // "pids": "1", |
|
|
|
// // "pidList": null, |
|
|
|
// // "parentCategoryCode": null, |
|
|
|
// // "categoryName": "城市管理", |
|
|
|
// // "categoryCode": "A102", |
|
|
|
// // "categoryType": "1", |
|
|
|
// // "sort": 0, |
|
|
|
// // "color": null, |
|
|
|
// // "isDisable": 1, |
|
|
|
// // "infoCode": "A", |
|
|
|
// // "eventCount": 2, |
|
|
|
// // "proportion": 50, |
|
|
|
// // "level1": null, |
|
|
|
// // "level2": "城市综合", |
|
|
|
// // "level3": null, |
|
|
|
// // "level4": null, |
|
|
|
// // "level5": null |
|
|
|
// // }, |
|
|
|
// // { |
|
|
|
// // "id": "98", |
|
|
|
// // "pid": "11", |
|
|
|
// // "customerId": null, |
|
|
|
// // "pids": "1,11", |
|
|
|
// // "pidList": null, |
|
|
|
// // "parentCategoryCode": null, |
|
|
|
// // "categoryName": "市容环境", |
|
|
|
// // "categoryCode": "A10201", |
|
|
|
// // "categoryType": "2", |
|
|
|
// // "sort": 0, |
|
|
|
// // "color": null, |
|
|
|
// // "isDisable": 1, |
|
|
|
// // "infoCode": "A", |
|
|
|
// // "eventCount": 2, |
|
|
|
// // "proportion": 100, |
|
|
|
// // "level1":null , |
|
|
|
// // "level2": null, |
|
|
|
// // "level3": "城市综合", |
|
|
|
// // "level4": null, |
|
|
|
// // "level5": null |
|
|
|
// // }, |
|
|
|
// // { |
|
|
|
// // "id": "14", |
|
|
|
// // "pid": "1", |
|
|
|
// // "customerId": null, |
|
|
|
// // "pids": "1", |
|
|
|
// // "pidList": null, |
|
|
|
// // "parentCategoryCode": null, |
|
|
|
// // "categoryName": "居民生活", |
|
|
|
// // "categoryCode": "A105", |
|
|
|
// // "categoryType": "1", |
|
|
|
// // "sort": 0, |
|
|
|
// // "color": null, |
|
|
|
// // "isDisable": 1, |
|
|
|
// // "infoCode": "A", |
|
|
|
// // "eventCount": 2, |
|
|
|
// // "proportion": 50, |
|
|
|
// // "level1": null, |
|
|
|
// // "level2": null, |
|
|
|
// // "level3": null, |
|
|
|
// // "level4":"城市综合" , |
|
|
|
// // "level5": null |
|
|
|
// // }, |
|
|
|
// // { |
|
|
|
// // "id": "125", |
|
|
|
// // "pid": "14", |
|
|
|
// // "customerId": null, |
|
|
|
// // "pids": "1,14", |
|
|
|
// // "pidList": null, |
|
|
|
// // "parentCategoryCode": null, |
|
|
|
// // "categoryName": "污水", |
|
|
|
// // "categoryCode": "A10507", |
|
|
|
// // "categoryType": "2", |
|
|
|
// // "sort": 0, |
|
|
|
// // "color": null, |
|
|
|
// // "isDisable": 1, |
|
|
|
// // "infoCode": "A", |
|
|
|
// // "eventCount": 2, |
|
|
|
// // "proportion": 100, |
|
|
|
// // "level1": null, |
|
|
|
// // "level2": null, |
|
|
|
// // "level3": null, |
|
|
|
// // "level4": null, |
|
|
|
// // "level5": "城市综合" |
|
|
|
// // } |
|
|
|
// ] |
|
|
|
console.log(this.tableList,"lksdjfklj s"); |
|
|
|
} else { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
formatDate1(date) { |
|
|
|
// 获取年份、月份和日期 |
|
|
|
const year = date.getFullYear(); |
|
|
|
const month = date.getMonth() + 1; // 月份从0开始 |
|
|
|
const day = date.getDate(); |
|
|
|
|
|
|
|
// 返回格式化的字符串 |
|
|
|
return `${year}-${month}-${day} 00:00:00`; |
|
|
|
}, |
|
|
|
//获取前一个月的日期 |
|
|
|
getLastMonthRange() { |
|
|
|
const now = new Date(); |
|
|
|
const firstDayOfCurrentMonth = new Date(Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), 1)); |
|
|
|
const lastDayOfLastMonth = new Date(firstDayOfCurrentMonth - 1); |
|
|
|
const firstDayOfLastMonth = new Date(Date.UTC(lastDayOfLastMonth.getUTCFullYear(), lastDayOfLastMonth.getUTCMonth(), 1)); |
|
|
|
firstDayOfLastMonth.setUTCHours(0, 0, 0, 0); |
|
|
|
lastDayOfLastMonth.setUTCHours(0, 0, 0, 0); |
|
|
|
this.starttime=this.formatDate1(firstDayOfLastMonth), |
|
|
|
this.endtime=this.formatDate1(lastDayOfLastMonth) |
|
|
|
}, |
|
|
|
//对部门进行统计 |
|
|
|
async EventCate(){ |
|
|
|
const url = "/governance/icEvent/EventCategoryAnalysis"; |
|
|
|
// 对社区,部门进行更改 |
|
|
|
if(this.formData.queryDateStart&&this.formData.queryDateEnd){ |
|
|
|
this.starttime=this.formData.queryDateStart, |
|
|
|
this.endtime=this.formData.queryDateEnd |
|
|
|
}else{{ |
|
|
|
this.getLastMonthRange() |
|
|
|
} |
|
|
|
} |
|
|
|
let param = { |
|
|
|
startDate:this.formData.queryDateStart, |
|
|
|
endDate:this.formData.queryDateEnd, |
|
|
|
startDate: this.starttime, |
|
|
|
endDate:this.endtime, |
|
|
|
usableFlag:true |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, param); |
|
|
|
@ -984,30 +1024,24 @@ export default { |
|
|
|
this.$message.error(msg); |
|
|
|
} |
|
|
|
}, |
|
|
|
flattenTree(tree, levelKeys = []) { |
|
|
|
flattenTree(tree, levelKeys = []) { |
|
|
|
let result = []; |
|
|
|
|
|
|
|
console.log(tree,"tree"); |
|
|
|
tree.forEach(node => { |
|
|
|
console.log(levelKeys); |
|
|
|
let newLevelKeys = [...levelKeys]; |
|
|
|
newLevelKeys.push(node.categoryName); |
|
|
|
|
|
|
|
console.log(newLevelKeys,"newLevelKeys"); |
|
|
|
let level1 = newLevelKeys[0] || null; |
|
|
|
let level2 = newLevelKeys[1] || null; |
|
|
|
let level3 = newLevelKeys[2] || null; |
|
|
|
let level4 = newLevelKeys[3] || null; |
|
|
|
let level5 = newLevelKeys[4] || null; |
|
|
|
|
|
|
|
if (level1) { |
|
|
|
level2 = level3 = level4 = level5 = null; |
|
|
|
} else if (level2) { |
|
|
|
level1 = level3 = level4 = level5 = null; |
|
|
|
} else if (level3) { |
|
|
|
level1 = level2 = level4 = level5 = null; |
|
|
|
} else if (level4) { |
|
|
|
level1 = level2 = level3 = level5 = null; |
|
|
|
} else if (level5) { |
|
|
|
level1 = level2 = level3 = level4 = null; |
|
|
|
} |
|
|
|
if (level2) level1 = null; |
|
|
|
if (level3) level2 = null; |
|
|
|
if (level4) level3 = null; |
|
|
|
if (level5) level4 = null; |
|
|
|
|
|
|
|
let flattenedNode = { |
|
|
|
...node, |
|
|
|
@ -1022,19 +1056,27 @@ export default { |
|
|
|
result.push(flattenedNode); |
|
|
|
|
|
|
|
if (node.children && node.children.length > 0) { |
|
|
|
result = result.concat(flattenTree(node.children, newLevelKeys)); |
|
|
|
console.log(node,"node"); |
|
|
|
result = result.concat(this.flattenTree(node.children, newLevelKeys)); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
console.log( result); |
|
|
|
return result; |
|
|
|
}, |
|
|
|
// 对总数做出统计 |
|
|
|
async EventCategoryAnalysis(){ |
|
|
|
const url = "/governance/icEvent/EventCategoryAnalysis"; |
|
|
|
let params = { |
|
|
|
startDate:this.formData.queryDateStart, |
|
|
|
endDate:this.formData.queryDateEnd, |
|
|
|
usableFlag:false |
|
|
|
if(this.formData.queryDateStart&&this.formData.queryDateEnd){ |
|
|
|
this.starttime=this.formData.queryDateStart, |
|
|
|
this.endtime=this.formData.queryDateEnd |
|
|
|
}else{{ |
|
|
|
this.getLastMonthRange() |
|
|
|
} |
|
|
|
} |
|
|
|
let params = { |
|
|
|
startDate: this.starttime, |
|
|
|
endDate:this.endtime, |
|
|
|
usableFlag:true |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, params); |
|
|
|
if (code === 0) { |
|
|
|
|