123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410 |
- <template>
- <div class="dashboard">
- <div class="dashboard-scrollbar">
- <div class="dashboard-wrapper">
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">当日进港航班数</div>
- <div class="dashboard-card-content">
- <CountBox
- :count-number="arrivalFlightCount"
- :count-length="9"
- />
- </div>
- </div>
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">当日出港航班数</div>
- <div class="dashboard-card-content">
- <CountBox
- :count-number="departureFlightCount"
- :count-length="9"
- />
- </div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">航司行李量排行</div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">
- <span class="title-text">航站选择</span>
- <el-select
- v-model="currentAirport"
- placeholder="请选择航站"
- filterable
- >
- <el-option
- v-for="option in aiportOptions"
- :key="option.value"
- :label="option.label"
- :value="option.value"
- />
- </el-select>
- </div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">当日行李量统计</div>
- <div class="dashboard-card-content">
- <div
- v-for="item in baggageCountItems"
- :key="item.title"
- class="baggage-count-item"
- >
- <div class="baggage-count-num">{{ item.num }}</div>
- <div class="baggage-count-title">{{ item.title }}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">当日行李目的地分布图</div>
- </div>
- <div class="dashboard-card-content">
- <MapCharts
- id="box-map"
- :option="boxMap"
- />
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">每日小时行李处理量 - 进港</div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">每日小时行李处理量 - 出港</div>
- </div>
- </div>
- <div class="dashboard-card">
- <div class="dashboard-card-wrapper">
- <div class="dashboard-card-title">每日小时行李处理量 - 中转</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import CountBox from '@/components/CountBox/index.vue'
- import BarCharts from '@/layout/components/Echarts/commonChartsBar.vue'
- import MapCharts from '@/layout/components/Echarts/commonChartsChinaMap.vue'
- import vueSeamlessScroll from 'vue-seamless-scroll'
- import { Query } from '@/api/webApi'
- const defaultDate = '2023-05-09'
- export default {
- name: 'Dashboard',
- components: {
- CountBox,
- BarCharts,
- MapCharts,
- vueSeamlessScroll,
- },
- data() {
- return {
- arrivalFlightCount: 0,
- departureFlightCount: 0,
- currentAirport: 'CTU',
- aiportOptions: [
- {
- label: '成都双流机场',
- value: 'CTU',
- },
- ],
- baggageCountItems: [
- {
- title: '行李总数',
- num: 223124,
- },
- {
- title: '进港行李数',
- num: 223124,
- },
- {
- title: '出港行李数',
- num: 223124,
- },
- {
- title: '中转行李数',
- num: 223124,
- },
- ],
- boxMap: {
- tooltip: {
- trigger: 'item',
- formatter: function (item) {
- if (item.data && item.data.index) {
- const html = `<div>
- <div>TOP ${item.data.index}</div>
- <div>${item.data.name} ${item.data.value}</div>
- </div>`
- return html
- } else {
- return '<div>暂无数据</div>'
- }
- },
- },
- legend: {
- show: false,
- },
- grid: {
- left: 0,
- right: 0,
- top: 0,
- bottom: 0,
- },
- visualMap: {
- type: 'continuous',
- text: ['高', '低'],
- min: 0,
- max: 20000,
- seriesIndex: [0, 2],
- dimension: 0,
- realtime: false,
- left: 0,
- bottom: '30%',
- itemWidth: 8,
- itemHeight: 93,
- calculable: true,
- inRange: {
- color: ['#869CBC', 'yellow'],
- symbolSize: [100, 100],
- },
- textStyle: {
- color: '#fff',
- },
- outOfRange: {
- color: ['orange'],
- symbolSize: [100, 100],
- },
- },
- toolbox: {
- show: false,
- },
- xAxis: {
- show: false,
- },
- yAxis: {
- show: false,
- },
- series: [
- {
- name: '行李数',
- type: 'map',
- mapType: 'china',
- // left: '100',
- // width: '40%',
- roam: 'move',
- mapValueCalculation: 'sum',
- zoom: 1,
- selectedMode: false,
- showLegendSymbol: false,
- left: '10%',
- top: '10%',
- width: '80%',
- label: {
- normal: {
- textStyle: {
- color: '#666666',
- },
- },
- emphasis: {
- textStyle: {
- color: '#234EA5',
- },
- },
- },
- itemStyle: {
- normal: {
- areaColor: '#fff',
- borderColor: '#666666',
- },
- emphasis: {
- areaColor: '#E5F39B',
- },
- },
- data: [],
- },
- ],
- },
- }
- },
- mounted() {
- this.getMap()
- },
- methods: {
- // 当日行李分布
- async getMap() {
- const { code, returnData: listValues } = await Query({
- serviceId: SERVICE_ID.dashboardMap,
- dataContent: [
- {
- airport: this.currentAirport,
- fd1: defaultDate,
- fd2: defaultDate,
- },
- ],
- })
- if (code == 0) {
- listValues.sort((a, b) => b.bags - a.bags)
- listValues.map((item, index) => {
- item.name = item.in_province
- item.value = item.bags
- item.index = index + 1
- })
- this.boxMap.series[0].data = listValues
- }
- },
- },
- }
- </script>
- <style lang="scss" scoped>
- .dashboard {
- width: 100%;
- height: calc(100vh - 48px - 32px);
- padding: 16px 20px;
- background-color: #081821;
- color: #fff;
- &-scrollbar {
- margin-right: -20px;
- width: calc(100% + 20px);
- height: 100%;
- overflow-x: hidden;
- overflow-y: auto;
- }
- &-wrapper {
- width: 100%;
- height: 968px;
- display: flex;
- flex-direction: column;
- flex-wrap: wrap;
- justify-content: space-between;
- }
- &-card {
- width: calc((100% - 16px * 2) / 3);
- height: calc((100% - 16px * 2) / 3);
- padding: 25px;
- display: flex;
- flex-direction: column;
- border: 1px solid #3a4456;
- background: linear-gradient(270deg, rgba(118, 142, 184, 0.25), transparent);
- position: relative;
- &::before {
- content: '';
- display: block;
- width: 0;
- height: 0;
- position: absolute;
- top: 0;
- left: 0;
- border: 12px solid #6d7d98;
- border-right-color: transparent;
- border-bottom-color: transparent;
- }
- &-wrapper {
- height: 0;
- flex: 1;
- &:not(:first-child) {
- margin-top: 25px;
- }
- }
- &-title {
- height: 40px;
- line-height: 16px;
- font-size: 16px;
- font-family: Helvetica, Microsoft YaHei;
- font-weight: bold;
- }
- &-content {
- height: calc(100% - 40px);
- }
- &:nth-child(1) {
- .dashboard-card-content {
- max-height: 64px;
- }
- }
- &:nth-child(3) {
- height: 40px;
- padding: 0 25px;
- &::before {
- display: none;
- }
- .dashboard-card-title {
- height: 38px;
- display: flex;
- justify-content: space-between;
- line-height: 38px;
- .el-select {
- width: 160px;
- ::v-deep .el-input__inner {
- border: none;
- background-color: transparent;
- font-size: 16px;
- font-family: Helvetica, Microsoft YaHei;
- font-weight: bold;
- color: #ffffff;
- }
- }
- }
- }
- &:nth-child(4) {
- height: calc((100% - 16px * 2) / 3 - 40px - 16px);
- }
- &:nth-child(2),
- &:nth-child(5) {
- height: calc((100% - 16px * 2) / 3 * 2 + 16px);
- }
- &:nth-child(4) {
- .dashboard-card-content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- .baggage-count-item {
- height: 50%;
- padding-left: 96px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- position: relative;
- font-family: Helvetica, Microsoft YaHei;
- font-weight: bold;
- .baggage-count-num {
- font-size: 36px;
- color: #f7c15a;
- }
- .baggage-count-title {
- font-size: 14px;
- }
- &::before {
- content: url('../../assets/analysis/ic.png');
- display: block;
- width: 72px;
- height: 72px;
- position: absolute;
- top: 50%;
- left: 0;
- transform: translate(0, -50%);
- }
- }
- }
- }
- &:nth-child(5) {
- background: transparent;
- border: none;
- &::before {
- display: none;
- }
- }
- }
- }
- </style>
|