|
@@ -17,7 +17,7 @@
|
|
|
style="margin-right: 20px;"
|
|
style="margin-right: 20px;"
|
|
|
/>
|
|
/>
|
|
|
<div class="name bold">
|
|
<div class="name bold">
|
|
|
- 1
|
|
|
|
|
|
|
+ {{ store.currentLineCode }}
|
|
|
</div>
|
|
</div>
|
|
|
<div class="road">
|
|
<div class="road">
|
|
|
路
|
|
路
|
|
@@ -499,10 +499,13 @@
|
|
|
import Layout from '@/components/layout.vue'
|
|
import Layout from '@/components/layout.vue'
|
|
|
import Box from '@/components/box.vue'
|
|
import Box from '@/components/box.vue'
|
|
|
import Echart from '@/components/chart.vue'
|
|
import Echart from '@/components/chart.vue'
|
|
|
-import { computed, ref } from 'vue'
|
|
|
|
|
|
|
+
|
|
|
|
|
+import { computed, ref, watch } from 'vue'
|
|
|
import { graphic } from 'echarts'
|
|
import { graphic } from 'echarts'
|
|
|
import CehicleOperationService from '../services/cehicleOperation.service'
|
|
import CehicleOperationService from '../services/cehicleOperation.service'
|
|
|
|
|
+import useStore from '@/pages/store'
|
|
|
|
|
|
|
|
|
|
+const store = useStore()
|
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
const cehicleOperationService = new CehicleOperationService()
|
|
|
const typeMap :any = {
|
|
const typeMap :any = {
|
|
|
0: '干线公交',
|
|
0: '干线公交',
|
|
@@ -922,7 +925,7 @@ const rightContent = ref({
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
-const lineID = '2168405945795840107'
|
|
|
|
|
|
|
+const currentLineId = computed(() => store.currentLineId)
|
|
|
|
|
|
|
|
const busLineData = ref({
|
|
const busLineData = ref({
|
|
|
type: '0', // 线路类型
|
|
type: '0', // 线路类型
|
|
@@ -944,11 +947,11 @@ const busLineData = ref({
|
|
|
const driverTotal = ref(0)
|
|
const driverTotal = ref(0)
|
|
|
const carTotal = ref(0)
|
|
const carTotal = ref(0)
|
|
|
async function getBusLineDetail() {
|
|
async function getBusLineDetail() {
|
|
|
- busLineData.value = await cehicleOperationService.getBusLineDetail(lineID)
|
|
|
|
|
|
|
+ busLineData.value = await cehicleOperationService.getBusLineDetail(currentLineId.value)
|
|
|
}
|
|
}
|
|
|
getBusLineDetail()
|
|
getBusLineDetail()
|
|
|
async function getBusLineDriver() {
|
|
async function getBusLineDriver() {
|
|
|
- const driverArr = await cehicleOperationService.getBusLineDriver(lineID)
|
|
|
|
|
|
|
+ const driverArr = await cehicleOperationService.getBusLineDriver(currentLineId.value)
|
|
|
let total = 0
|
|
let total = 0
|
|
|
driverArr.forEach((item: { total: string | number; starType: number }) => {
|
|
driverArr.forEach((item: { total: string | number; starType: number }) => {
|
|
|
total += +item.total
|
|
total += +item.total
|
|
@@ -958,7 +961,7 @@ async function getBusLineDriver() {
|
|
|
}
|
|
}
|
|
|
getBusLineDriver()
|
|
getBusLineDriver()
|
|
|
async function getBusLineCar() {
|
|
async function getBusLineCar() {
|
|
|
- const carArr = await cehicleOperationService.getBusLineCar(lineID)
|
|
|
|
|
|
|
+ const carArr = await cehicleOperationService.getBusLineCar(currentLineId.value)
|
|
|
let total = 0
|
|
let total = 0
|
|
|
carArr.forEach((item: { total: string | number; starType: number }) => {
|
|
carArr.forEach((item: { total: string | number; starType: number }) => {
|
|
|
total += +item.total
|
|
total += +item.total
|
|
@@ -971,13 +974,20 @@ async function getBusLineCar() {
|
|
|
getBusLineCar()
|
|
getBusLineCar()
|
|
|
|
|
|
|
|
async function getBusLineOperate() {
|
|
async function getBusLineOperate() {
|
|
|
- const carArr = await cehicleOperationService.getBusLineOperate(lineID)
|
|
|
|
|
|
|
+ const carArr = await cehicleOperationService.getBusLineOperate(currentLineId.value)
|
|
|
upBusLineOperate.value = carArr.filter((item: { direction: number }) => item.direction === 1)
|
|
upBusLineOperate.value = carArr.filter((item: { direction: number }) => item.direction === 1)
|
|
|
downBusLineOperate.value = carArr.filter((item: { direction: number }) => item.direction === 2)
|
|
downBusLineOperate.value = carArr.filter((item: { direction: number }) => item.direction === 2)
|
|
|
console.log(carArr, 'carArr')
|
|
console.log(carArr, 'carArr')
|
|
|
}
|
|
}
|
|
|
getBusLineOperate()
|
|
getBusLineOperate()
|
|
|
|
|
|
|
|
|
|
+watch(() => store.currentLineId, () => {
|
|
|
|
|
+ getBusLineOperate()
|
|
|
|
|
+ getBusLineCar()
|
|
|
|
|
+ getBusLineDriver()
|
|
|
|
|
+ getBusLineDetail()
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const nameMap:any = {
|
|
const nameMap:any = {
|
|
|
1: '老年卡',
|
|
1: '老年卡',
|
|
|
2: '学生卡',
|
|
2: '学生卡',
|
|
@@ -1062,7 +1072,7 @@ getVehicleStatusService()
|
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
|
|
|
|
|
|
.name {
|
|
.name {
|
|
|
- width: 63px;
|
|
|
|
|
|
|
+ width: 78px;
|
|
|
height: 74px;
|
|
height: 74px;
|
|
|
line-height: 74px;
|
|
line-height: 74px;
|
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -1502,4 +1512,9 @@ getVehicleStatusService()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+.changeLine{
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ top: -100px;
|
|
|
|
|
+ z-index: 9999;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|