|
@@ -44,19 +44,10 @@
|
|
|
:height="455"
|
|
:height="455"
|
|
|
:name="item.name"
|
|
:name="item.name"
|
|
|
>
|
|
>
|
|
|
- <div
|
|
|
|
|
|
|
+ <SelectDate
|
|
|
v-if="index === 0"
|
|
v-if="index === 0"
|
|
|
- class="dateChange"
|
|
|
|
|
- >
|
|
|
|
|
- <div
|
|
|
|
|
- v-for="(itm, index) in item.btns"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :class="{ active: index === item.checkId }"
|
|
|
|
|
- @click="changeFn(index, item)"
|
|
|
|
|
- >
|
|
|
|
|
- {{ itm }}
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ @date-change="selectDatechange"
|
|
|
|
|
+ />
|
|
|
<Echart :option="item.option" />
|
|
<Echart :option="item.option" />
|
|
|
</Box>
|
|
</Box>
|
|
|
</template>
|
|
</template>
|
|
@@ -292,6 +283,8 @@
|
|
|
import Layout from '@/components/layout.vue'
|
|
import Layout from '@/components/layout.vue'
|
|
|
import { onMounted, ref } from 'vue'
|
|
import { onMounted, ref } from 'vue'
|
|
|
import Box from '@/components/box.vue'
|
|
import Box from '@/components/box.vue'
|
|
|
|
|
+import SelectDate from '@/components/selectDate.vue'
|
|
|
|
|
+
|
|
|
import { Vue3Marquee } from 'vue3-marquee'
|
|
import { Vue3Marquee } from 'vue3-marquee'
|
|
|
import { graphic } from 'echarts'
|
|
import { graphic } from 'echarts'
|
|
|
import Echart from '@/components/chart.vue'
|
|
import Echart from '@/components/chart.vue'
|
|
@@ -951,7 +944,6 @@ const rightContent = ref([
|
|
|
function changeFn(id: number, item: any) {
|
|
function changeFn(id: number, item: any) {
|
|
|
item.checkId = id
|
|
item.checkId = id
|
|
|
}
|
|
}
|
|
|
-const type = 1
|
|
|
|
|
|
|
|
|
|
async function getBusSummaryInfo() {
|
|
async function getBusSummaryInfo() {
|
|
|
const res = await homeService.getBusSummaryInfo()
|
|
const res = await homeService.getBusSummaryInfo()
|
|
@@ -965,7 +957,7 @@ async function getBusSummaryInfo() {
|
|
|
}
|
|
}
|
|
|
getBusSummaryInfo()
|
|
getBusSummaryInfo()
|
|
|
|
|
|
|
|
-async function getBusTrafficVolume() {
|
|
|
|
|
|
|
+async function getBusTrafficVolume(type: number) {
|
|
|
const res = await homeService.getBusTrafficVolume(type)
|
|
const res = await homeService.getBusTrafficVolume(type)
|
|
|
const xData = res.map((item: any) => item.time)
|
|
const xData = res.map((item: any) => item.time)
|
|
|
const trafficVolumeData = res.map((item: any) => item.trafficVolume)
|
|
const trafficVolumeData = res.map((item: any) => item.trafficVolume)
|
|
@@ -1009,8 +1001,12 @@ async function getBusWarning() {
|
|
|
}
|
|
}
|
|
|
getBusWarning()
|
|
getBusWarning()
|
|
|
|
|
|
|
|
|
|
+function selectDatechange(type: any) {
|
|
|
|
|
+ getBusTrafficVolume(type)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
- getBusTrafficVolume()
|
|
|
|
|
|
|
+ selectDatechange(1)
|
|
|
getBusStatistics()
|
|
getBusStatistics()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|
|
@@ -1071,35 +1067,6 @@ onMounted(() => {
|
|
|
|
|
|
|
|
:deep(.box-content) {
|
|
:deep(.box-content) {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
-
|
|
|
|
|
- .dateChange {
|
|
|
|
|
- position: absolute;
|
|
|
|
|
- height: 30px;
|
|
|
|
|
- border-radius: 30px;
|
|
|
|
|
- border: solid 1px #2185E8;
|
|
|
|
|
- left: 50%;
|
|
|
|
|
- transform: translate(-50%, 0);
|
|
|
|
|
- top: 10px;
|
|
|
|
|
- z-index: 2;
|
|
|
|
|
- display: flex;
|
|
|
|
|
-
|
|
|
|
|
- &>div {
|
|
|
|
|
- width: 90px;
|
|
|
|
|
- color: white;
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- line-height: 30px;
|
|
|
|
|
-
|
|
|
|
|
- &:not(:first-child) {
|
|
|
|
|
- border-left: solid 1px #2185E8;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- .active {
|
|
|
|
|
- background: #2185e860;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|