|
@@ -15,22 +15,37 @@
|
|
</view>
|
|
</view>
|
|
<view class="operation-main">
|
|
<view class="operation-main">
|
|
<template v-if="currentType.value === 1">
|
|
<template v-if="currentType.value === 1">
|
|
- <RevenueAnalysis :type="currentType.type" :chartData="currentType.data" :title="title"/>
|
|
|
|
|
|
+ <RevenueAnalysis ref="revenueAnalysis" :type="currentType.type" :title="title"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 2">
|
|
<template v-else-if="currentType.value === 2">
|
|
- <RevenueAnalysis :type="currentType.type" :chartData="currentType.data" :title="title"/>
|
|
|
|
|
|
+ <RevenueAnalysis ref="revenueAnalysis" :type="currentType.type" :title="title"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 3">
|
|
<template v-else-if="currentType.value === 3">
|
|
- <RevenueRanking :tableTh="currentType.tableTh" :tableData="currentType.tableData" :title="title"/>
|
|
|
|
|
|
+ <RevenueRanking ref="revenueRanking" :title="title"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 4">
|
|
<template v-else-if="currentType.value === 4">
|
|
- <TrafficFlow :chartData="currentType.data" :title="title"/>
|
|
|
|
|
|
+ <TrafficFlow ref="trafficFlow" :title="title"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 5">
|
|
<template v-else-if="currentType.value === 5">
|
|
- <TollCollectorPerformance type="table" :tableTh="currentType.tableTh" :tableData="currentType.tableData" :title="title"/>
|
|
|
|
|
|
+ <TollCollectorPerformance ref="tollCollectorPerformance" type="table" :title="title"/>
|
|
</template>
|
|
</template>
|
|
<template v-else-if="currentType.value === 6">
|
|
<template v-else-if="currentType.value === 6">
|
|
- <TollCollectorPerformance type="line" :chartData="currentType.data" :title="title"/>
|
|
|
|
|
|
+ <TollCollectorPerformance ref="tollCollectorPerformance" type="line" :title="title"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="currentType.value === 7">
|
|
|
|
+ <SectionAnalysis ref="sectionAnalysis" :title="title"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="currentType.value === 8">
|
|
|
|
+ <ArrearsAnalysis :chartData="currentType.data" :title="title"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="currentType.value === 9">
|
|
|
|
+ <IncomeAnalysis :chartData="currentType.data" :title="title"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="currentType.value === 10">
|
|
|
|
+ <PaymentMethod :chartData="currentType.data" :title="title"/>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else-if="currentType.value === 11">
|
|
|
|
+ <SourceOfPayment :chartData="currentType.data" :title="title"/>
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
<!-- 分析类型 -->
|
|
<!-- 分析类型 -->
|
|
@@ -52,29 +67,44 @@
|
|
import RevenueRanking from './components/revenueRanking.vue'
|
|
import RevenueRanking from './components/revenueRanking.vue'
|
|
import TrafficFlow from './components/trafficFlow.vue'
|
|
import TrafficFlow from './components/trafficFlow.vue'
|
|
import TollCollectorPerformance from './components/tollCollectorPerformance.vue'
|
|
import TollCollectorPerformance from './components/tollCollectorPerformance.vue'
|
|
|
|
+ import SectionAnalysis from './components/sectionAnalysis.vue'
|
|
|
|
+ import ArrearsAnalysis from './components/arrearsAnalysis.vue'
|
|
|
|
+ import IncomeAnalysis from './components/incomeAnalysis.vue'
|
|
|
|
+ import SourceOfPayment from './components/sourceOfPayment.vue'
|
|
|
|
+ import PaymentMethod from './components/paymentMethod.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
RevenueAnalysis,
|
|
RevenueAnalysis,
|
|
RevenueRanking,
|
|
RevenueRanking,
|
|
TrafficFlow,
|
|
TrafficFlow,
|
|
- TollCollectorPerformance
|
|
|
|
|
|
+ TollCollectorPerformance,
|
|
|
|
+ SectionAnalysis,
|
|
|
|
+ ArrearsAnalysis,
|
|
|
|
+ IncomeAnalysis,
|
|
|
|
+ SourceOfPayment,
|
|
|
|
+ PaymentMethod
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
tabList: [{
|
|
tabList: [{
|
|
label: '年',
|
|
label: '年',
|
|
- value: 1
|
|
|
|
|
|
+ value: 2
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '月',
|
|
label: '月',
|
|
- value: 2
|
|
|
|
|
|
+ value: 1
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: '日',
|
|
label: '日',
|
|
- value: 3
|
|
|
|
|
|
+ value: 0
|
|
}
|
|
}
|
|
],
|
|
],
|
|
- tabCur: 1,
|
|
|
|
|
|
+ tabCur: 2,
|
|
|
|
+ // 参数
|
|
|
|
+ params: {
|
|
|
|
+ reportType: 2,
|
|
|
|
+ queryDate: ''
|
|
|
|
+ },
|
|
// 类型
|
|
// 类型
|
|
typePicker: false,
|
|
typePicker: false,
|
|
currentType: {},
|
|
currentType: {},
|
|
@@ -83,79 +113,42 @@
|
|
text: '营收分析(折线)',
|
|
text: '营收分析(折线)',
|
|
value: 1,
|
|
value: 1,
|
|
type: 'line',
|
|
type: 'line',
|
|
- data: {
|
|
|
|
- categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
- series: [{
|
|
|
|
- name: '',
|
|
|
|
- data: [10, 10, 20, 30, 40, 0, 0, 0, 0, 0, 0, 0]
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
|
|
+ key: 'revenueAnalysis'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '营收分析(柱状)',
|
|
text: '营收分析(柱状)',
|
|
value: 2,
|
|
value: 2,
|
|
type: 'column',
|
|
type: 'column',
|
|
- data: {
|
|
|
|
- categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
- series: [{
|
|
|
|
- name: '',
|
|
|
|
- data: [10, 10, 20, 30, 40, 0, 0, 0, 0, 0, 0, 0]
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
|
|
+ key: 'revenueAnalysis'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '路段/停车场营收排行',
|
|
text: '路段/停车场营收排行',
|
|
value: 3,
|
|
value: 3,
|
|
- tableTh: [
|
|
|
|
- { width: 100, field: '路段编号', key: 'roadNum' },
|
|
|
|
- { width: 100, field: '路段名称', key: 'roadName' },
|
|
|
|
- { width: 100, field: '收益(元)', key: 'income' },
|
|
|
|
- ],
|
|
|
|
- tableData: {
|
|
|
|
- current: 1,
|
|
|
|
- total: 10,
|
|
|
|
- list: [
|
|
|
|
- { roadNum: 'RN00000009', roadName: '可处路1', income: 100.36 },
|
|
|
|
- { roadNum: 'RN00000010', roadName: '可处路2', income: 101.03 },
|
|
|
|
- { roadNum: 'RN00000011', roadName: '可处路3', income: 102.01 },
|
|
|
|
- { roadNum: 'RN00000012', roadName: '可处路4', income: 103.02 }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
|
|
+ key: 'revenueRanking'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '车流量分析',
|
|
text: '车流量分析',
|
|
value: 4,
|
|
value: 4,
|
|
- data: {
|
|
|
|
- categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
- series: [{
|
|
|
|
- name: '',
|
|
|
|
- data: [10, 10, 20, 30, 40, 0, 0, 0, 0, 0, 0, 0]
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
|
|
+ key: 'trafficFlow'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '收费员业绩排行',
|
|
text: '收费员业绩排行',
|
|
value: 5,
|
|
value: 5,
|
|
- tableTh: [
|
|
|
|
- { width: 100, field: '工号', key: 'workNum' },
|
|
|
|
- { width: 100, field: '姓名', key: 'name' },
|
|
|
|
- { width: 100, field: '收益(元)', key: 'income' },
|
|
|
|
- ],
|
|
|
|
- tableData: {
|
|
|
|
- current: 1,
|
|
|
|
- total: 10,
|
|
|
|
- list: [
|
|
|
|
- { workNum: '5001', name: '李四', income: 100.36 },
|
|
|
|
- { workNum: '5001', name: '张三', income: 100.36 },
|
|
|
|
- { workNum: '5001', name: '王五', income: 100.36 },
|
|
|
|
- { workNum: '5001', name: '刘刘', income: 100.36 },
|
|
|
|
- { workNum: '5001', name: '李四', income: 100.36 }
|
|
|
|
- ]
|
|
|
|
- }
|
|
|
|
|
|
+ key: 'tollCollectorPerformance'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '收费员业绩分析',
|
|
text: '收费员业绩分析',
|
|
value: 6,
|
|
value: 6,
|
|
|
|
+ key: 'tollCollectorPerformance'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '路段分析',
|
|
|
|
+ value: 7,
|
|
|
|
+ key: 'sectionAnalysis'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '欠费分析',
|
|
|
|
+ value: 8,
|
|
data: {
|
|
data: {
|
|
categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
series: [{
|
|
series: [{
|
|
@@ -164,47 +157,94 @@
|
|
}]
|
|
}]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- text: '路段分析',
|
|
|
|
- value: 7
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- text: '欠费分析',
|
|
|
|
- value: 8
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
text: '收入分析',
|
|
text: '收入分析',
|
|
- value: 9
|
|
|
|
|
|
+ value: 9,
|
|
|
|
+ data: {
|
|
|
|
+ categories: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
|
|
|
+ series: [{
|
|
|
|
+ name: '',
|
|
|
|
+ data: [10, 10, 20, 30, 40, 0, 0, 0, 0, 0, 0, 0]
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '支付方式占比',
|
|
text: '支付方式占比',
|
|
- value: 10
|
|
|
|
|
|
+ value: 10,
|
|
|
|
+ data: {
|
|
|
|
+ series: [{
|
|
|
|
+ data: [{
|
|
|
|
+ "name": "一班",
|
|
|
|
+ "value": 50
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "二班",
|
|
|
|
+ "value": 30
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "三班",
|
|
|
|
+ "value": 20
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "四班",
|
|
|
|
+ "value": 18
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "name": "五班",
|
|
|
|
+ "value": 8
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
text: '支付来源分析',
|
|
text: '支付来源分析',
|
|
- value: 11
|
|
|
|
|
|
+ value: 11,
|
|
|
|
+ data: {
|
|
|
|
+ categories: [1, 2, 3, 4, 5],
|
|
|
|
+ series: [{
|
|
|
|
+ name: '',
|
|
|
|
+ data: [10, 10, 20, 30, 40]
|
|
|
|
+ }]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
]
|
|
]
|
|
],
|
|
],
|
|
|
|
+ title: '',
|
|
// 年
|
|
// 年
|
|
yearPicker: false,
|
|
yearPicker: false,
|
|
yearList: this.getYearList(),
|
|
yearList: this.getYearList(),
|
|
defaultYear: [4],
|
|
defaultYear: [4],
|
|
- title: '2022年',
|
|
|
|
|
|
+ currentYear: '',
|
|
|
|
+ yearObj: {},
|
|
// 月
|
|
// 月
|
|
monthPicker: false,
|
|
monthPicker: false,
|
|
monthList: this.getMonthList(),
|
|
monthList: this.getMonthList(),
|
|
defaultMonth: [],
|
|
defaultMonth: [],
|
|
|
|
+ currentMonth: '01',
|
|
|
|
+ monthObj: {},
|
|
// 日
|
|
// 日
|
|
dayPicker: false,
|
|
dayPicker: false,
|
|
dayList: this.getDayList(),
|
|
dayList: this.getDayList(),
|
|
- defaultDay: []
|
|
|
|
|
|
+ defaultDay: [],
|
|
|
|
+ currentDay: '01',
|
|
|
|
+ dayObj: {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.currentType = this.typeList[0][0]
|
|
|
|
|
|
+ this.currentType = this.typeList[0][6]
|
|
|
|
+ this.defaultSetVal();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ defaultSetVal() {
|
|
|
|
+ this.currentYear = this.yearList[0][4].value
|
|
|
|
+ this.title = this.yearList[0][4].text
|
|
|
|
+ this.yearObj = this.yearList[0][4]
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
|
|
+ }, 500)
|
|
|
|
+ },
|
|
getYearList() {
|
|
getYearList() {
|
|
const date = new Date()
|
|
const date = new Date()
|
|
const year = date.getFullYear();
|
|
const year = date.getFullYear();
|
|
@@ -213,8 +253,8 @@
|
|
]
|
|
]
|
|
for (let i = year - 4; i < year + 1; i++) {
|
|
for (let i = year - 4; i < year + 1; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '年',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
@@ -228,8 +268,12 @@
|
|
]
|
|
]
|
|
for (let i = 1; i < 13; i++) {
|
|
for (let i = 1; i < 13; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '月',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
|
|
+ }
|
|
|
|
+ if (i < 10) {
|
|
|
|
+ obj.text = '0' + i
|
|
|
|
+ obj.value = '0' + i
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
@@ -249,8 +293,12 @@
|
|
]
|
|
]
|
|
for (let i = 1; i < dayLen + 1; i++) {
|
|
for (let i = 1; i < dayLen + 1; i++) {
|
|
const obj = {
|
|
const obj = {
|
|
- text: i + '日',
|
|
|
|
- value: i
|
|
|
|
|
|
+ text: String(i),
|
|
|
|
+ value: String(i)
|
|
|
|
+ }
|
|
|
|
+ if (i < 10) {
|
|
|
|
+ obj.text = '0' + i
|
|
|
|
+ obj.value = '0' + i
|
|
}
|
|
}
|
|
list[0].push(obj)
|
|
list[0].push(obj)
|
|
}
|
|
}
|
|
@@ -266,16 +314,17 @@
|
|
tabClick(item) {
|
|
tabClick(item) {
|
|
this.tabCur = item.value
|
|
this.tabCur = item.value
|
|
switch (item.value) {
|
|
switch (item.value) {
|
|
- case 1:
|
|
|
|
- this.yearPicker = true
|
|
|
|
|
|
+ case 0:
|
|
|
|
+ this.dayPicker = true
|
|
break
|
|
break
|
|
- case 2:
|
|
|
|
|
|
+ case 1:
|
|
this.monthPicker = true
|
|
this.monthPicker = true
|
|
break
|
|
break
|
|
- case 3:
|
|
|
|
- this.dayPicker = true
|
|
|
|
|
|
+ case 2:
|
|
|
|
+ this.yearPicker = true
|
|
break
|
|
break
|
|
}
|
|
}
|
|
|
|
+ this.params.reportType = this.tabCur
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* 选择器确认
|
|
* 选择器确认
|
|
@@ -288,16 +337,29 @@
|
|
yearConfirm(e) {
|
|
yearConfirm(e) {
|
|
this.defaultYear = [e.indexs[0]]
|
|
this.defaultYear = [e.indexs[0]]
|
|
this.title = e.value[0].text
|
|
this.title = e.value[0].text
|
|
|
|
+ this.currentYear = e.value[0].value
|
|
|
|
+ this.yearObj = e.value[0]
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.yearPicker = false
|
|
this.yearPicker = false
|
|
},
|
|
},
|
|
monthConfirm(e) {
|
|
monthConfirm(e) {
|
|
this.defaultMonth = [e.indexs[0]]
|
|
this.defaultMonth = [e.indexs[0]]
|
|
- this.title = e.value[0].text
|
|
|
|
|
|
+ this.currentMonth = e.value[0].value
|
|
|
|
+ this.monthObj = e.value[0]
|
|
|
|
+ this.title = `${this.yearObj.text}-${this.monthObj.text}`
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.monthPicker = false
|
|
this.monthPicker = false
|
|
},
|
|
},
|
|
dayConfirm(e) {
|
|
dayConfirm(e) {
|
|
this.defaultDay = [e.indexs[0]]
|
|
this.defaultDay = [e.indexs[0]]
|
|
this.title = e.value[0].text
|
|
this.title = e.value[0].text
|
|
|
|
+ this.currentDay = e.value[0].value
|
|
|
|
+ this.dayObj = e.value[0]
|
|
|
|
+ this.title = `${this.yearObj.text}-${this.monthObj.text}-${this.dayObj.text}`
|
|
|
|
+ this.params.queryDate = `${this.currentYear}-${this.currentMonth}-${this.currentDay}`
|
|
|
|
+ this.$refs[this.currentType.key].getData(this.params)
|
|
this.dayPicker = false
|
|
this.dayPicker = false
|
|
}
|
|
}
|
|
}
|
|
}
|