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
f527157896
commit
3cd3275236
@ -70,6 +70,14 @@ export function selectDeviceStats (parameter) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function selectFailureStats (parameter) {
|
||||||
|
return axios({
|
||||||
|
url: api.repairStats + '/failureStats',
|
||||||
|
method: 'get',
|
||||||
|
params: parameter
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function deviceTypeStats (parameter) {
|
export function deviceTypeStats (parameter) {
|
||||||
return axios({
|
return axios({
|
||||||
url: api.repairStats + '/deviceTypeStats',
|
url: api.repairStats + '/deviceTypeStats',
|
||||||
|
@ -149,11 +149,23 @@
|
|||||||
<div class="headView">
|
<div class="headView">
|
||||||
<div class="titleView">故障类型</div>
|
<div class="titleView">故障类型</div>
|
||||||
<div class="conditionView">
|
<div class="conditionView">
|
||||||
<a-select default-value="week" style="width: 120px;margin-right: 10px">
|
<a-select :value="faultType.type" @select="selectFaultType" style="width: 120px;margin-right: 10px">
|
||||||
<a-select-option value="month">按月</a-select-option>
|
<a-select-option value="month">按月</a-select-option>
|
||||||
<a-select-option value="year">按年</a-select-option>
|
<a-select-option value="year">按年</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-date-picker placeholder="请选择时间" />
|
<a-date-picker
|
||||||
|
v-if="faultType.type == 'year' || faultType.type == ''"
|
||||||
|
format="YYYY"
|
||||||
|
mode="year"
|
||||||
|
:value="faultType.time"
|
||||||
|
placeholder="选择年份"
|
||||||
|
:open="faultType.open"
|
||||||
|
@openChange="openFaultTypeChange"
|
||||||
|
@panelChange="panelFaultTypeChange"
|
||||||
|
>
|
||||||
|
</a-date-picker>
|
||||||
|
<a-month-picker v-if='faultType.type =="month"' @change="clickFaultType" :value="faultType.time"
|
||||||
|
placeholder="请选择月" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="contentView">
|
<div class="contentView">
|
||||||
@ -209,7 +221,8 @@ import {
|
|||||||
repairStats,
|
repairStats,
|
||||||
floorStats,
|
floorStats,
|
||||||
deviceTypeStats,
|
deviceTypeStats,
|
||||||
selectDeviceStats
|
selectDeviceStats,
|
||||||
|
selectFailureStats
|
||||||
} from '@/api/admin/repair/repairStats'
|
} from '@/api/admin/repair/repairStats'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -229,6 +242,7 @@ export default {
|
|||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
faultStatsCount: [],
|
faultStatsCount: [],
|
||||||
|
selectFaultStatsCount: [],
|
||||||
deviceType: {
|
deviceType: {
|
||||||
type: '',
|
type: '',
|
||||||
time: '',
|
time: '',
|
||||||
@ -246,6 +260,11 @@ export default {
|
|||||||
time: '',
|
time: '',
|
||||||
open: false
|
open: false
|
||||||
},
|
},
|
||||||
|
faultType: {
|
||||||
|
type: '',
|
||||||
|
time: '',
|
||||||
|
open: false
|
||||||
|
},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -291,23 +310,8 @@ export default {
|
|||||||
this.getfloorStats()
|
this.getfloorStats()
|
||||||
this.deviceStats()
|
this.deviceStats()
|
||||||
this.faultStats()
|
this.faultStats()
|
||||||
|
this.selectFailureStats()
|
||||||
|
|
||||||
// this.createEchartCake('echart2', {
|
|
||||||
// bottom: 10,
|
|
||||||
// left: 'right',
|
|
||||||
// orient: 'vertical'
|
|
||||||
// })
|
|
||||||
// this.createEchartCake('echart3', {
|
|
||||||
// bottom: 10,
|
|
||||||
// left: 'right',
|
|
||||||
// orient: 'vertical'
|
|
||||||
// })
|
|
||||||
|
|
||||||
this.createEchartCake('echart6', {
|
|
||||||
bottom: 'center',
|
|
||||||
right: '10%',
|
|
||||||
orient: 'vertical'
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 使用openChange事件控制日期下拉面板显示与收起
|
// 使用openChange事件控制日期下拉面板显示与收起
|
||||||
@ -345,6 +349,10 @@ export default {
|
|||||||
// 接收panelChange返回的值
|
// 接收panelChange返回的值
|
||||||
this.fault.time = value
|
this.fault.time = value
|
||||||
const date1 = new Date(this.fault.time).getFullYear()
|
const date1 = new Date(this.fault.time).getFullYear()
|
||||||
|
selectDeviceStats({ date: date1 }).then(res => {
|
||||||
|
this.faultStatsCount = res.data
|
||||||
|
this.createColumnEcharrt('echart5', res.data)
|
||||||
|
})
|
||||||
this.fault.open = false
|
this.fault.open = false
|
||||||
},
|
},
|
||||||
// 选择-楼层负责人情况
|
// 选择-楼层负责人情况
|
||||||
@ -353,9 +361,51 @@ export default {
|
|||||||
},
|
},
|
||||||
clickFault (a, c) {
|
clickFault (a, c) {
|
||||||
this.fault.time = c
|
this.fault.time = c
|
||||||
console.log(c)
|
selectDeviceStats({ date: c }).then(res => {
|
||||||
|
this.faultStatsCount = res.data
|
||||||
|
this.createColumnEcharrt('echart5', res.data)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 故障类型 使用openChange事件控制日期下拉面板显示与收起
|
||||||
|
openFaultTypeChange (open) {
|
||||||
|
this.faultType.open = open
|
||||||
|
},
|
||||||
|
// 使用panelChange事件控制选中年份的方法
|
||||||
|
panelFaultTypeChange (value) {
|
||||||
|
// 接收panelChange返回的值
|
||||||
|
this.faultType.time = value
|
||||||
|
const date1 = new Date(this.faultType.time).getFullYear()
|
||||||
|
selectFailureStats({ date: date1 }).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.selectFaultStatsCount = res.data
|
||||||
|
this.createEchartCake('echart6', {
|
||||||
|
bottom: 10,
|
||||||
|
left: 'right',
|
||||||
|
orient: 'vertical'
|
||||||
|
}, this.selectFaultStatsCount)
|
||||||
|
})
|
||||||
|
this.faultType.open = false
|
||||||
|
|
||||||
|
},
|
||||||
|
// 选择-楼层负责人情况
|
||||||
|
selectFaultType (value, option) {
|
||||||
|
this.faultType.type = value
|
||||||
|
},
|
||||||
|
clickFaultType (a, c) {
|
||||||
|
this.faultType.time = c
|
||||||
|
selectFailureStats({ date: c }).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.selectFaultStatsCount = res.data
|
||||||
|
this.createEchartCake('echart6', {
|
||||||
|
bottom: 10,
|
||||||
|
left: 'right',
|
||||||
|
orient: 'vertical'
|
||||||
|
}, this.selectFaultStatsCount)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 使用openChange事件控制日期下拉面板显示与收起
|
// 使用openChange事件控制日期下拉面板显示与收起
|
||||||
openDeviceTypeChange (open) {
|
openDeviceTypeChange (open) {
|
||||||
this.deviceType.open = open
|
this.deviceType.open = open
|
||||||
@ -394,12 +444,26 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
faultStats () {
|
faultStats () {
|
||||||
selectDeviceStats({ date: '2024-08' }).then(res => {
|
let date = this.formatDate()
|
||||||
|
|
||||||
|
selectDeviceStats({ date: date }).then(res => {
|
||||||
this.faultStatsCount = res.data
|
this.faultStatsCount = res.data
|
||||||
this.createColumnEcharrt('echart5', res.data)
|
this.createColumnEcharrt('echart5', res.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
selectFailureStats () {
|
||||||
|
let date = this.formatDate()
|
||||||
|
|
||||||
|
selectFailureStats({ date: date }).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
this.selectFaultStatsCount = res.data
|
||||||
|
this.createEchartCake('echart6', {
|
||||||
|
bottom: 10,
|
||||||
|
left: 'right',
|
||||||
|
orient: 'vertical'
|
||||||
|
}, this.selectFaultStatsCount)
|
||||||
|
})
|
||||||
|
},
|
||||||
getYearCount () {
|
getYearCount () {
|
||||||
this.type = 'year'
|
this.type = 'year'
|
||||||
repairStats().then(res => {
|
repairStats().then(res => {
|
||||||
@ -620,8 +684,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user