@@ -178,7 +178,7 @@ export default {
components: {
STable
},
- data() {
+ data () {
return {
dateRange2: [initStart, initEnd],
dateRange3L: [initStart, initEnd],
@@ -261,7 +261,7 @@ export default {
loadData: []
}
},
- mounted() {
+ mounted () {
this.adminStats()//第一行工单统计
this.repairCount2()//第二行 工单统计
this.repairCount3L()//三行 工单完成情况
@@ -273,47 +273,53 @@ export default {
},
methods: {
// 跳转工单
- dispatchCase(status) {
+ dispatchCase (status) {
this.$router.push({ name: 'repair', query: { status } })
},
// 跳转通知
- jumpInfo(tabKey) {
+ jumpInfo (tabKey) {
this.$router.push({ name: 'messageNotice', query: { tabKey } })
},
- onChange2() {
+ dispatchEval (evalService) {
+ this.$router.push({ name: 'repair', query: { evalService } })
+ },
+ dispatchTimeOut (timeout) {
+ this.$router.push({ name: 'repair', query: { timeout } })
+ },
+ onChange2 () {
this.repairCount2()
},
- onChange3L() {
+ onChange3L () {
this.repairCount3L()
},
- onChange3R() {
+ onChange3R () {
this.repairCount3R()
},
- onChange4L() {
+ onChange4L () {
this.floorStats()
},
- onChange4R1() {
+ onChange4R1 () {
this.deviceStats()
},
- onChange4R2() {
+ onChange4R2 () {
this.failureStats()
},
- onChange5() {
+ onChange5 () {
this.deviceTypeStats()
},
- adminStats() {
+ adminStats () {
repairAdminStats().then(res => {
this.adminStatsCount = res.repairAdminStats
})
},
- repairCount2() {
+ repairCount2 () {
const startDate = this.dateRange2[0].format('YYYY-MM-DD')
const endDate = this.dateRange2[1].format('YYYY-MM-DD')
repairStats({ startDate: startDate, endDate: endDate, type: 'repair' }).then(res => {
this.repairStatsCount = res.data.stats
})
},
- repairCount3L() {
+ repairCount3L () {
const startDate = this.dateRange3L[0].format('YYYY-MM-DD')
const endDate = this.dateRange3L[1].format('YYYY-MM-DD')
repairStats({ startDate: startDate, endDate: endDate, type: 'end' }).then(res => {
@@ -331,7 +337,7 @@ export default {
}, ['#ef6567', '#fc8251', '#f9c956', '#91cd77'], this.timeout)
})
},
- repairCount3R() {
+ repairCount3R () {
const startDate = this.dateRange3R[0].format('YYYY-MM-DD')
const endDate = this.dateRange3R[1].format('YYYY-MM-DD')
repairStats({ startDate: startDate, endDate: endDate, type: 'eval' }).then(res => {
@@ -344,7 +350,7 @@ export default {
})
},
// 楼层负责人情况
- floorStats() {
+ floorStats () {
const startDate = this.dateRange4L[0].format('YYYY-MM-DD')
const endDate = this.dateRange4L[1].format('YYYY-MM-DD')
floorStats({ startDate: startDate, endDate: endDate }).then(res => {
@@ -352,7 +358,7 @@ export default {
})
},
//故障统计
- deviceStats() {
+ deviceStats () {
const startDate = this.dateRange4R1[0].format('YYYY-MM-DD')
const endDate = this.dateRange4R1[1].format('YYYY-MM-DD')
deviceStats({ startDate: startDate, endDate: endDate }).then(res => {
@@ -361,7 +367,7 @@ export default {
})
},
//第四行 右下 故障类型统计
- failureStats() {
+ failureStats () {
const startDate = this.dateRange4R2[0].format('YYYY-MM-DD')
const endDate = this.dateRange4R2[1].format('YYYY-MM-DD')
failureStats({ startDate: startDate, endDate: endDate }).then(res => {
@@ -374,7 +380,7 @@ export default {
})
},
//第五行 设备、品牌、评价 统计
- deviceTypeStats() {
+ deviceTypeStats () {
const startDate = this.dateRange5[0].format('YYYY-MM-DD')
const endDate = this.dateRange5[1].format('YYYY-MM-DD')
deviceTypeStats({ startDate: startDate, endDate: endDate }).then(res => {
@@ -382,7 +388,7 @@ export default {
})
},
- createEchartCake(id, legend, colors, data) {
+ createEchartCake (id, legend, colors, data) {
//console.log(data)
// 基于准备好的dom,初始化echarts实例
let myChart = echarts.init(document.getElementById(id))
@@ -427,7 +433,7 @@ export default {
myChart.setOption(option)
}
,
- createEchartLine(id, data) {
+ createEchartLine (id, data) {
// 基于准备好的dom,初始化echarts实例
let myChart = echarts.init(document.getElementById(id))
let option = {
@@ -472,7 +478,7 @@ export default {
myChart.setOption(option)
}
,
- createColumnEcharrt(id, data) {
+ createColumnEcharrt (id, data) {
data.x = data.x.map(item => {
if (item && item.length > 4) {
item = item.substring(0, 4) + '..'