mirror of
https://gitee.com/elegant_wings/dbd-meeting-html.git
synced 2025-06-21 13:49:37 +08:00
修改了对应统计页面
This commit is contained in:
parent
80fbcaf0fd
commit
fa918ad9c0
@ -12,6 +12,14 @@ export function getWorkerList (parameter) {
|
||||
})
|
||||
}
|
||||
|
||||
export function oneWorkerList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/oneWorkerList',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function getFloorList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/floorList',
|
||||
@ -19,3 +27,37 @@ export function getFloorList (parameter) {
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function oneFloorList (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/oneFloorList',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
// 第一行 管理员 工单与 通知统计
|
||||
export function repairAdminStats (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/repairAdminStats',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
// 第二、三行 工单统计、工单完成情况、评价情况
|
||||
export function repairStats (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/repairStats',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
||||
export function floorStats (parameter) {
|
||||
return axios({
|
||||
url: api.repairStats + '/floorStats',
|
||||
method: 'get',
|
||||
params: parameter
|
||||
})
|
||||
}
|
||||
|
@ -43,6 +43,7 @@
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getRepairList, complete } from '@/api/admin/repair'
|
||||
import { oneWorkerList, oneFloorList } from '@/api/admin/repair/repairStats'
|
||||
import RepairModal from './modules/RepairModal.vue'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
|
||||
@ -142,23 +143,26 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getRepairList () {
|
||||
let datas = {}
|
||||
if (this.$route.query.repairUserId) {
|
||||
datas = {
|
||||
'menu': 5,
|
||||
'type': 'all',
|
||||
'workerId': this.$route.query.repairUserId
|
||||
}
|
||||
if (this.$route.query.repairUserId != null) {
|
||||
console.log(1111)
|
||||
oneWorkerList({ workerId: this.$route.query.repairUserId }).then(res =>{
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else if (this.$route.query.floorId !=null) {
|
||||
console.log(222)
|
||||
oneFloorList({ floorId: this.$route.query.floorId }).then(res =>{
|
||||
this.loadData = res.rows
|
||||
})
|
||||
} else {
|
||||
datas = {
|
||||
let datas = {
|
||||
'menu': 7,
|
||||
'type': 'all'
|
||||
}
|
||||
getRepairList(datas).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
}
|
||||
|
||||
getRepairList(datas).then(res => {
|
||||
this.loadData = res.rows
|
||||
})
|
||||
},
|
||||
handleAdd () {
|
||||
this.$refs.modal.add()
|
||||
|
@ -47,7 +47,7 @@
|
||||
{{ text | statusFilter }}
|
||||
</span>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a v-if="editEnabel" @click="handleView(record.id)">详情</a>
|
||||
<a v-if="editEnabel" @click="handleFloorView(record.id)">详情</a>
|
||||
<!-- <a v-if="editEnabel" @click="handleEdit(record)">指派</a>-->
|
||||
<!-- <a-divider type="vertical" />-->
|
||||
</span>
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
<script>
|
||||
import { STable } from '@/components'
|
||||
import { getWorkerList,getFloorList } from '@/api/admin/repair/repairStats'
|
||||
import { getWorkerList, getFloorList } from '@/api/admin/repair/repairStats'
|
||||
import { checkPermission } from '@/utils/permissions'
|
||||
|
||||
export default {
|
||||
@ -224,6 +224,11 @@ export default {
|
||||
handleView (workerId) {
|
||||
this.$router.push({ name: 'repair', query: { repairUserId: workerId } })
|
||||
},
|
||||
handleFloorView( floorId ){
|
||||
console.log(floorId)
|
||||
this.$router.push({ name: 'repair', query: { floorId: floorId } })
|
||||
|
||||
},
|
||||
handleEdit (record) {
|
||||
this.$refs.modal.edit(record)
|
||||
},
|
||||
|
@ -1,128 +1,158 @@
|
||||
<template>
|
||||
<div class='container'>
|
||||
<div class="container">
|
||||
|
||||
<div class='topHeadView'>
|
||||
<div class='itemView' v-for='item in 4'>
|
||||
<div class='imgView'></div>
|
||||
<div class='label'>待派单</div>
|
||||
<div class='num'>10</div>
|
||||
<div class="topHeadView">
|
||||
<div class="itemView">
|
||||
<div class="imgView"></div>
|
||||
<div class="label">待派单</div>
|
||||
<div class="num">{{ adminStatsCount.wait }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="imgView"></div>
|
||||
<div class="label">重派单</div>
|
||||
<div class="num">{{ adminStatsCount.anew }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="imgView"></div>
|
||||
<div class="label">未查看通知</div>
|
||||
<div class="num">{{ adminStatsCount.newnotice }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="imgView"></div>
|
||||
<div class="label">已查看通知</div>
|
||||
<div class="num">{{ adminStatsCount.oldnotice }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='caseStatisticsView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>工单统计</div>
|
||||
<div class='typeView'>
|
||||
<div class='type activity'>本周</div>
|
||||
<div class='type'>本月</div>
|
||||
<div class='type'>本年</div>
|
||||
<div class="caseStatisticsView">
|
||||
<div class="headView">
|
||||
<div class="titleView">工单统计</div>
|
||||
<div class="typeView">
|
||||
<div :class="type=='month' ? 'activity' : ''" class="type " @click="repairCount">本月</div>
|
||||
<div :class="type=='year' ? 'activity' : ''" class="type" @click="getYearCount">本年</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='contentView'>
|
||||
<div class='itemView' v-for='item in 6'>
|
||||
<div class='label'>维修工单</div>
|
||||
<div class='value'>100</div>
|
||||
<div class="contentView">
|
||||
<div class="itemView">
|
||||
<div class="label">维修工单</div>
|
||||
<div class="value">{{ repairStatsCount.zs }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="label">待维修工单</div>
|
||||
<div class="value">{{ repairStatsCount.wait }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="label">超时量</div>
|
||||
<div class="value">{{ repairStatsCount.timeout }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="label">差评量</div>
|
||||
<div class="value">{{ repairStatsCount.l }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="label">中评量</div>
|
||||
<div class="value">{{ repairStatsCount.m }}</div>
|
||||
</div>
|
||||
<div class="itemView">
|
||||
<div class="label">好评量</div>
|
||||
<div class="value">{{ repairStatsCount.h }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='statusView'>
|
||||
<div class='caseStatusView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>工单完成情况</div>
|
||||
<div class='typeView'>
|
||||
<div class='type activity'>本周</div>
|
||||
<div class='type'>本年</div>
|
||||
</div>
|
||||
<div class="statusView">
|
||||
<div class="caseStatusView">
|
||||
<div class="headView">
|
||||
<div class="titleView">工单完成情况</div>
|
||||
<!-- <div class="typeView">-->
|
||||
<!-- <div class="type activity">本周</div>-->
|
||||
<!-- <div class="type">本年</div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div class='circularView'>
|
||||
<div id='echart1' style='width: 400px; height: 300px'></div>
|
||||
<div class="contentView">
|
||||
<div class="circularView">
|
||||
<div id="echart1" style="width: 400px; height: 300px"></div>
|
||||
</div>
|
||||
<div class='centerLine'></div>
|
||||
<div class='circularView'>
|
||||
<div id='echart2' style='width: 400px; height: 300px'></div>
|
||||
<div class="centerLine"></div>
|
||||
<div class="circularView">
|
||||
<div id="echart2" style="width: 400px; height: 300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='evaluateView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>评价情况</div>
|
||||
<div class="evaluateView">
|
||||
<div class="headView">
|
||||
<div class="titleView">评价情况</div>
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div id='echart3' style='width: 400px; height: 300px'></div>
|
||||
<div class="contentView">
|
||||
<div id="echart3" style="width: 400px; height: 300px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='faultView'>
|
||||
<div class='floorView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>楼层负责人情况</div>
|
||||
<div class='conditionView'>
|
||||
<a-select default-value='week' style='width: 120px;margin-right: 10px'>
|
||||
<a-select-option value='week'>按周</a-select-option>
|
||||
<a-select-option value='month'>按月</a-select-option>
|
||||
<a-select-option value='year'>按年</a-select-option>
|
||||
<div class="faultView">
|
||||
<div class="floorView">
|
||||
<div class="headView">
|
||||
<div class="titleView">楼层负责人情况</div>
|
||||
<div class="conditionView">
|
||||
<a-select default-value="week" style="width: 120px;margin-right: 10px">
|
||||
<a-select-option value="month" >按月</a-select-option>
|
||||
<a-select-option value="year">按年</a-select-option>
|
||||
</a-select>
|
||||
<a-date-picker placeholder='请选择时间' />
|
||||
<a-month-picker placeholder="请选择时间" />
|
||||
<a-year-picker placeholder="请选择时间" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div id='echart4' style='width: 550px; height: 600px'></div>
|
||||
<div class="contentView">
|
||||
<div id="echart4" style="width: 550px; height: 600px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='rightView'>
|
||||
<div class='blockView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>故障统计</div>
|
||||
<div class='conditionView'>
|
||||
<a-select default-value='week' style='width: 120px;margin-right: 10px'>
|
||||
<a-select-option value='week'>按周</a-select-option>
|
||||
<a-select-option value='month'>按月</a-select-option>
|
||||
<a-select-option value='year'>按年</a-select-option>
|
||||
<div class="rightView">
|
||||
<div class="blockView">
|
||||
<div class="headView">
|
||||
<div class="titleView">故障统计</div>
|
||||
<div class="conditionView">
|
||||
<a-select default-value="week" style="width: 120px;margin-right: 10px">
|
||||
<a-select-option value="month">按月</a-select-option>
|
||||
<a-select-option value="year">按年</a-select-option>
|
||||
</a-select>
|
||||
<a-date-picker placeholder='请选择时间' />
|
||||
<a-date-picker placeholder="请选择时间" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div id='echart5' style='width: 700px; height: 327px'></div>
|
||||
<div class="contentView">
|
||||
<div id="echart5" style="width: 700px; height: 327px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='blockView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>故障类型</div>
|
||||
<div class='conditionView'>
|
||||
<a-select default-value='week' style='width: 120px;margin-right: 10px'>
|
||||
<a-select-option value='week'>按周</a-select-option>
|
||||
<a-select-option value='month'>按月</a-select-option>
|
||||
<a-select-option value='year'>按年</a-select-option>
|
||||
<div class="blockView">
|
||||
<div class="headView">
|
||||
<div class="titleView">故障类型</div>
|
||||
<div class="conditionView">
|
||||
<a-select default-value="week" style="width: 120px;margin-right: 10px">
|
||||
<a-select-option value="month">按月</a-select-option>
|
||||
<a-select-option value="year">按年</a-select-option>
|
||||
</a-select>
|
||||
<a-date-picker placeholder='请选择时间' />
|
||||
<a-date-picker placeholder="请选择时间" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div id='echart6' style='width: 700px; height: 327px'></div>
|
||||
<div class="contentView">
|
||||
<div id="echart6" style="width: 700px; height: 327px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='tableView'>
|
||||
<div class='headView'>
|
||||
<div class='titleView'>故障统计</div>
|
||||
<div class='conditionView'>
|
||||
<a-select default-value='week' style='width: 120px;margin-right: 10px'>
|
||||
<a-select-option value='week'>按周</a-select-option>
|
||||
<a-select-option value='month'>按月</a-select-option>
|
||||
<a-select-option value='year'>按年</a-select-option>
|
||||
<div class="tableView">
|
||||
<div class="headView">
|
||||
<div class="titleView">故障统计</div>
|
||||
<div class="conditionView">
|
||||
<a-select default-value="week" style="width: 120px;margin-right: 10px">
|
||||
<a-select-option value="week">按周</a-select-option>
|
||||
<a-select-option value="month">按月</a-select-option>
|
||||
<a-select-option value="year">按年</a-select-option>
|
||||
</a-select>
|
||||
<a-date-picker placeholder='请选择时间' />
|
||||
<a-date-picker placeholder="请选择时间" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='contentView'>
|
||||
<div class="contentView">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="loadData"
|
||||
@ -139,11 +169,19 @@
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import { repairAdminStats, repairStats, floorStats } from '@/api/admin/repair/repairStats'
|
||||
|
||||
export default {
|
||||
name: 'RepairStatistics',
|
||||
data () {
|
||||
return {
|
||||
type: '',
|
||||
adminStatsCount: [],
|
||||
repairStatsCount: [],
|
||||
finishCount: [],
|
||||
timeout: [],
|
||||
pj: [],
|
||||
floorStatsCount: [],
|
||||
// 查询参数
|
||||
queryParam: {},
|
||||
selectedRowKeys: [],
|
||||
@ -154,19 +192,19 @@ export default {
|
||||
title: 'Name',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
scopedSlots: { customRender: 'name' },
|
||||
scopedSlots: { customRender: 'name' }
|
||||
},
|
||||
{
|
||||
title: 'Age',
|
||||
dataIndex: 'age',
|
||||
key: 'age',
|
||||
width: 80,
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: 'Address',
|
||||
dataIndex: 'address',
|
||||
key: 'address 1',
|
||||
ellipsis: true,
|
||||
ellipsis: true
|
||||
}
|
||||
],
|
||||
// 加载数据方法 必须为 Promise 对象
|
||||
@ -176,41 +214,40 @@ export default {
|
||||
name: 'John Brown',
|
||||
age: 32,
|
||||
address: 'New York No. 1 Lake Park, New York No. 1 Lake Park',
|
||||
tags: ['nice', 'developer'],
|
||||
tags: ['nice', 'developer']
|
||||
},
|
||||
{
|
||||
key: '2',
|
||||
name: 'Jim Green',
|
||||
age: 42,
|
||||
address: 'London No. 2 Lake Park, London No. 2 Lake Park',
|
||||
tags: ['loser'],
|
||||
tags: ['loser']
|
||||
},
|
||||
{
|
||||
key: '3',
|
||||
name: 'Joe Black',
|
||||
age: 32,
|
||||
address: 'Sidney No. 1 Lake Park, Sidney No. 1 Lake Park',
|
||||
tags: ['cool', 'teacher'],
|
||||
},
|
||||
],
|
||||
tags: ['cool', 'teacher']
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.createEchartCake('echart1', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
})
|
||||
this.createEchartCake('echart2', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
})
|
||||
this.createEchartCake('echart3', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
})
|
||||
mounted () {
|
||||
this.adminStats()
|
||||
this.repairCount()
|
||||
this.getfloorStats()
|
||||
|
||||
// this.createEchartCake('echart2', {
|
||||
// bottom: 10,
|
||||
// left: 'right',
|
||||
// orient: 'vertical'
|
||||
// })
|
||||
// this.createEchartCake('echart3', {
|
||||
// bottom: 10,
|
||||
// left: 'right',
|
||||
// orient: 'vertical'
|
||||
// })
|
||||
this.createEchartLine('echart4')
|
||||
this.createColumnEcharrt('echart5')
|
||||
this.createEchartCake('echart6', {
|
||||
@ -220,11 +257,74 @@ export default {
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
adminStats () {
|
||||
repairAdminStats().then(res => {
|
||||
this.adminStatsCount = res.repairAdminStats
|
||||
})
|
||||
},
|
||||
getYearCount () {
|
||||
this.type = 'year'
|
||||
repairStats().then(res => {
|
||||
this.repairStatsCount = res.currentYear.stats
|
||||
this.finishCount = res.currentYear.wc
|
||||
this.timeout = res.currentYear.timeout
|
||||
this.pj = res.currentYear.pj
|
||||
this.createEchartCake('echart1', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.finishCount)
|
||||
this.createEchartCake('echart2', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.timeout)
|
||||
this.createEchartCake('echart3', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.pj)
|
||||
})
|
||||
},
|
||||
repairCount () {
|
||||
repairStats().then(res => {
|
||||
this.type = 'month'
|
||||
|
||||
console.log(res.currentMonth.wc)
|
||||
this.repairStatsCount = res.currentMonth.stats
|
||||
this.finishCount = res.currentMonth.wc
|
||||
this.timeout = res.currentMonth.timeout
|
||||
this.pj = res.currentMonth.pj
|
||||
this.createEchartCake('echart1', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.finishCount)
|
||||
this.createEchartCake('echart2', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.timeout)
|
||||
this.createEchartCake('echart3', {
|
||||
bottom: 10,
|
||||
left: 'right',
|
||||
orient: 'vertical'
|
||||
}, this.pj)
|
||||
})
|
||||
},
|
||||
// 楼层负责人情况
|
||||
getfloorStats () {
|
||||
floorStats().then(res => {
|
||||
console.log(res)
|
||||
})
|
||||
},
|
||||
|
||||
onSelectChange (selectedRowKeys, selectedRows) {
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectedRows = selectedRows
|
||||
},
|
||||
createEchartCake(id, legend) {
|
||||
createEchartCake (id, legend, data) {
|
||||
console.log(data)
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
let myChart = echarts.init(document.getElementById(id))
|
||||
// 指定图表的配置项和数据
|
||||
@ -235,7 +335,7 @@ export default {
|
||||
legend: legend,
|
||||
series: [
|
||||
{
|
||||
name: 'Access From',
|
||||
name: '完成率',
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
avoidLabelOverlap: false,
|
||||
@ -258,20 +358,14 @@ export default {
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: 'Search ' },
|
||||
{ value: 735, name: 'Direct' },
|
||||
{ value: 580, name: 'Email' },
|
||||
{ value: 484, name: 'Union ' },
|
||||
{ value: 300, name: 'Video ' }
|
||||
]
|
||||
data: data
|
||||
}
|
||||
]
|
||||
}
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
},
|
||||
createEchartLine(id) {
|
||||
createEchartLine (id) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
let myChart = echarts.init(document.getElementById(id))
|
||||
let option = {
|
||||
@ -315,7 +409,7 @@ export default {
|
||||
// 使用刚指定的配置项和数据显示图表。
|
||||
myChart.setOption(option)
|
||||
},
|
||||
createColumnEcharrt(id) {
|
||||
createColumnEcharrt (id) {
|
||||
// 基于准备好的dom,初始化echarts实例
|
||||
let myChart = echarts.init(document.getElementById(id))
|
||||
// There should not be negative values in rawData
|
||||
|
Loading…
x
Reference in New Issue
Block a user