工单统计
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
<div class="statistics">
|
||||
<AiTopFixed>
|
||||
<div class="select-gird">
|
||||
<AiPagePicker type="gird" v-model="selectGird" valueObj nodeKey="id" formType="2" class="right-span">
|
||||
<AiMore v-model="selectGird.girdName"/>
|
||||
<AiPagePicker type="dept" v-model="selectDept" valueObj nodeKey="fullId" formType="2" class="right-span" @change="changeDept">
|
||||
<AiMore v-model="selectDept.fullName"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
</AiTopFixed>
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="info-content">
|
||||
<div class="title">概况总览</div>
|
||||
<div class="el-row">
|
||||
<div class="item" v-for="(item, index) in todayList" :key="index">
|
||||
<div class="item" v-for="(item, index) in todayList" :key="index" v-if="item.label != '累计办结'">
|
||||
<h2>{{item.value}}</h2>
|
||||
<p>{{item.label}}</p>
|
||||
</div>
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
todayList: [],
|
||||
selectGird: {girdId: '', girdName: ''},
|
||||
selectDept: {fullId: '', fullName: ''},
|
||||
finishChart: null,
|
||||
trendChart: null,
|
||||
typeChart: null,
|
||||
@@ -76,9 +76,13 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
changeDept(e) {
|
||||
this.selectDept = e[0]
|
||||
this.getStatistics()
|
||||
},
|
||||
getStatistics() {
|
||||
this.todayList = [], this.finishData = [], this.trendDataX = [], this.trendData = [], this.typeData = []
|
||||
this.$http.post(`/app/apppatrolreportinfo/countByGirdId?girdId=${this.selectGird.girdId}&eventStatus=${this.statusInfo.eventStatus}`).then((res) => {
|
||||
this.$http.post(`/app/appsessionarchivereportinfo/countByDeptId?deptFullId=${this.selectDept.fullId}&eventStatus=${this.statusInfo.eventStatus}`).then((res) => {
|
||||
if (res.code == 0) {
|
||||
this.$nextTick(() => {
|
||||
this.chartInit()
|
||||
@@ -92,19 +96,20 @@ export default {
|
||||
this.todayList.push(info)
|
||||
})
|
||||
|
||||
Object.keys(res.data.finishCountMap).forEach((key) => {
|
||||
var info = {
|
||||
name: key,
|
||||
value: res.data.finishCountMap[key]
|
||||
Object.keys(res.data.allCountMap).forEach((key) => {
|
||||
if(key == '累计上报' || key == '累计办结') {
|
||||
var info = {
|
||||
name: key,
|
||||
value: res.data.allCountMap[key]
|
||||
}
|
||||
this.finishData.push(info)
|
||||
}
|
||||
this.finishData.push(info)
|
||||
})
|
||||
|
||||
var total = Number(res.data.finishCountMap['累计事件上报'])+Number(res.data.finishCountMap['累计事件办结'])
|
||||
var num = res.data.finishCountMap['累计事件办结']/total
|
||||
var num = Number(res.data.allCountMap['累计办结'])/Number(res.data.allCountMap['累计上报'])
|
||||
this.finshNum = Number(num*100).toFixed(2)
|
||||
|
||||
res.data.dateCountList.map((item) => {
|
||||
res.data.trend.map((item) => {
|
||||
this.trendData.push(item.ecount)
|
||||
this.trendDataX.push(item.ymd)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user