Browse Source

Merge branch 'master' of bls-dan/busRoute into master

Caner 2 years ago
parent
commit
4449daf0b6

+ 5 - 0
src/assets/global-style.scss

@@ -43,7 +43,12 @@
     }
     }
   }
   }
 }
 }
+.n-date-panel{
+  border: solid 1px #2185E8;
+
+}
 .n-date-picker{
 .n-date-picker{
+  
   .n-input{
   .n-input{
     background: none !important;
     background: none !important;
     border: solid 1px #2185E8;
     border: solid 1px #2185E8;

+ 12 - 10
src/assets/naive-theme.ts

@@ -40,19 +40,21 @@ const themeOverrides: GlobalThemeOverrides = {
     fontSizeHuge: '16px'
     fontSizeHuge: '16px'
   },
   },
   DatePicker: {
   DatePicker: {
-    panelColor: 'rgba(3,20,26,0.95)',
-    panelTextColor: 'rgba(255,255,255,0.8)',
-    calendarDaysTextColor: 'rgba(255,255,255,0.8)',
-    calendarTitleTextColor: 'rgba(255,255,255,0.8)',
+    panelColor: 'rgba(20,44,83)',
+    panelTextColor: '#fff',
+    calendarDaysTextColor: '#fff',
+    itemTextColor: '#fff',
+    calendarTitleTextColor: '#fff',
     calendarTitleColorHover: '#183742',
     calendarTitleColorHover: '#183742',
-    panelHeaderDividerColor: '#164352',
-    calendarDaysDividerColor: '#164352',
-    panelActionDividerColor: '#164352',
-    itemColorActive: '#1AB99B',
-    itemColorHover: '#146371'
+    panelHeaderDividerColor: '#1891FF',
+    calendarDaysDividerColor: '#1891FF',
+    panelActionDividerColor: '#1891FF',
+    calendarDividerColor: '#1891FF',
+    itemColorActive: '#1891FF',
+    itemColorHover: '#0d4e89'
   },
   },
   TimePicker: {
   TimePicker: {
-    panelColor: 'rgba(3, 20, 26, 0.95)',
+    panelColor: '#1891FF',
     panelDividerColor: 'rgb(239, 239, 245)',
     panelDividerColor: 'rgb(239, 239, 245)',
     itemTextColor: 'rgba(255, 255, 255, 0.8)',
     itemTextColor: 'rgba(255, 255, 255, 0.8)',
     itemTextColorActive: '#1AB99B',
     itemTextColorActive: '#1AB99B',

+ 1 - 1
src/components/changeLine.vue

@@ -67,7 +67,7 @@ function changeLine(item: any) {
 }
 }
 async function getLine() {
 async function getLine() {
   const res = await netService.get('/busLine/getList?hasModel=0')
   const res = await netService.get('/busLine/getList?hasModel=0')
-  if (res.success) {
+  if (res.success && res.data.length > 0) {
     originLineList.value = res.data
     originLineList.value = res.data
     // eslint-disable-next-line prefer-destructuring
     // eslint-disable-next-line prefer-destructuring
     curLine.value = res.data[0]
     curLine.value = res.data[0]

+ 11 - 2
src/components/selectDate.vue

@@ -3,7 +3,7 @@
     <div
     <div
       v-for="(itm) in btns"
       v-for="(itm) in btns"
       :key="itm.val"
       :key="itm.val"
-      :class="{ active: itm.val === checkId ,disabled:itm.disabled}"
+      :class="{ active: itm.val === checkId, disabled: itm.disabled }"
       @click="changeFn(itm.val)"
       @click="changeFn(itm.val)"
     >
     >
       {{ itm.label }}
       {{ itm.label }}
@@ -54,12 +54,21 @@ function changeFn(id: number) {
       border-left: solid 1px #2185E8;
       border-left: solid 1px #2185E8;
     }
     }
 
 
-    &.disabled{
+    &.disabled {
       cursor: not-allowed;
       cursor: not-allowed;
       pointer-events: none;
       pointer-events: none;
       // background: #ccc;
       // background: #ccc;
     }
     }
+
+    &:first-child {
+      border-radius: 30px 0 0 30px;
+    }
+
+    &:last-child {
+      border-radius: 0 30px 30px 0;
+    }
   }
   }
+
   .active {
   .active {
     background: #2185e860;
     background: #2185e860;
   }
   }

+ 2 - 2
src/pages/views/home/components/CehicleOperation.vue

@@ -245,7 +245,7 @@
                 <div class="info">
                 <div class="info">
                   <div>
                   <div>
                     <div class="bold">
                     <div class="bold">
-                      1路
+                      {{ item.lineName }}
                     </div>
                     </div>
                     <div class="busNum">
                     <div class="busNum">
                       {{ item.licensePlate }}
                       {{ item.licensePlate }}
@@ -317,7 +317,7 @@
                 <div class="info">
                 <div class="info">
                   <div>
                   <div>
                     <div class="bold">
                     <div class="bold">
-                      1路
+                      {{ item.lineName }}
                     </div>
                     </div>
                     <div class="busNum">
                     <div class="busNum">
                       {{ item.licensePlate }}
                       {{ item.licensePlate }}

+ 25 - 15
src/pages/views/home/components/FacilityManagement.vue

@@ -196,7 +196,7 @@ const facilityStatistics = ref({
       {
       {
         name: '设备数量',
         name: '设备数量',
         nameLocation: 'center',
         nameLocation: 'center',
-        nameGap: 40,
+        nameGap: 35,
         nameTextStyle: {
         nameTextStyle: {
           color: '#fff',
           color: '#fff',
           fontSize: 14
           fontSize: 14
@@ -342,14 +342,15 @@ const carVehicle = ref({
         type: 'value',
         type: 'value',
         name: '数量/辆',
         name: '数量/辆',
         nameLocation: 'center',
         nameLocation: 'center',
-        nameGap: 40,
+        nameGap: 60,
         nameTextStyle: {
         nameTextStyle: {
           color: '#fff',
           color: '#fff',
           fontSize: 14
           fontSize: 14
         },
         },
         location: 'center',
         location: 'center',
         axisLabel: {
         axisLabel: {
-          color: '#fff'
+          color: '#fff',
+          formatter: '{value} 辆'
         },
         },
         splitLine: {
         splitLine: {
           show: true,
           show: true,
@@ -473,8 +474,17 @@ const facilityStation = ref({
     xAxis: [
     xAxis: [
       {
       {
         type: 'value',
         type: 'value',
+        name: '数量/座',
+        nameLocation: 'center',
+        nameGap: 40,
+        nameTextStyle: {
+          color: '#fff',
+          fontSize: 16
+        },
         axisLabel: {
         axisLabel: {
-          color: '#fff'
+          color: '#fff',
+          formatter: '{value} 座',
+          fontSize: 16
         },
         },
         splitLine: {
         splitLine: {
           show: true,
           show: true,
@@ -560,27 +570,27 @@ const carWasher = ref({
   good: 50,
   good: 50,
   allTotal: '000550',
   allTotal: '000550',
   bar: {
   bar: {
-    color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)' ],
     tooltip: {
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 , 占比: {d}%'
     },
     },
     legend: {
     legend: {
       orient: 'horizontal',
       orient: 'horizontal',
       bottom: '0',
       bottom: '0',
       icon: 'circle',
       icon: 'circle',
       textStyle: {
       textStyle: {
-        color: '#fff'
+        color: '#fff',
+        fontSize: 16
       }
       }
     },
     },
     series: [
     series: [
       {
       {
         type: 'pie',
         type: 'pie',
-        radius: '70%',
+        radius: '50%',
         label: {
         label: {
           show: true,
           show: true,
           color: '#fff',
           color: '#fff',
           formatter: '{b}: {c}个',
           formatter: '{b}: {c}个',
-          fontSize: 14
+          fontSize: 16
         },
         },
         data: [
         data: [
           { value: 1048, name: '0-5年' },
           { value: 1048, name: '0-5年' },
@@ -641,33 +651,32 @@ const chargingStation = ref({
   good: 50,
   good: 50,
   allTotal: '000550',
   allTotal: '000550',
   bar: {
   bar: {
-    color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)' ],
     tooltip: {
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 , 占比: {d}%'
     },
     },
     legend: {
     legend: {
       orient: 'horizontal',
       orient: 'horizontal',
       bottom: '0',
       bottom: '0',
       icon: 'circle',
       icon: 'circle',
       textStyle: {
       textStyle: {
-        color: '#fff'
+        color: '#fff',
+        fontSize: 16
       }
       }
     },
     },
     series: [
     series: [
       {
       {
         type: 'pie',
         type: 'pie',
-        radius: '70%',
+        radius: '50%',
         label: {
         label: {
           show: true,
           show: true,
           color: '#fff',
           color: '#fff',
           formatter: '{b}: {c}个',
           formatter: '{b}: {c}个',
-          fontSize: 14
+          fontSize: 16
         },
         },
         data: [
         data: [
           { value: 1048, name: '0-5年' },
           { value: 1048, name: '0-5年' },
           { value: 735, name: '6-10年' },
           { value: 735, name: '6-10年' },
           { value: 580, name: '11-15年' }
           { value: 580, name: '11-15年' }
-
         ]
         ]
 
 
       }
       }
@@ -1159,6 +1168,7 @@ getFacilityVehicleComponents()
     .value {
     .value {
       text-align: center;
       text-align: center;
       color: #80FFFF;
       color: #80FFFF;
+      font-size: 20px;
       margin-top: 32px;
       margin-top: 32px;
     }
     }
 
 

+ 2 - 0
src/pages/views/home/components/HomePage.vue

@@ -1482,6 +1482,8 @@ onUnmounted(() => {
 
 
       &-body {
       &-body {
         color: #81D3F8;
         color: #81D3F8;
+        height: 150px;
+        overflow-y: scroll;
 
 
         &>div {
         &>div {
           display: flex;
           display: flex;

+ 153 - 140
src/pages/views/home/components/LineAnalysis.vue

@@ -21,9 +21,7 @@
         >
         >
           <div class="content">
           <div class="content">
             <div class="control">
             <div class="control">
-              <SelectDate
-                @date-change="selectDatechange"
-              />
+              <SelectDate @date-change="selectDatechange" />
               <n-date-picker
               <n-date-picker
                 v-model:value="lineAdjustData.range"
                 v-model:value="lineAdjustData.range"
                 :bordered="false"
                 :bordered="false"
@@ -41,7 +39,7 @@
               </div>
               </div>
               <div class="overview">
               <div class="overview">
                 <div
                 <div
-                  v-for="item,key in lineAdjustData.overview"
+                  v-for="item, key in lineAdjustData.overview"
                   :key="key"
                   :key="key"
                   class="item"
                   class="item"
                 >
                 >
@@ -100,12 +98,11 @@
         >
         >
           <Echart :option="rightContent.center" />
           <Echart :option="rightContent.center" />
           <div class="control">
           <div class="control">
-            <SelectDate
-              @date-change="rankDatechange"
-            />
+            <SelectDate @date-change="rankDatechange" />
             <n-date-picker
             <n-date-picker
               v-model:value="rankRange"
               v-model:value="rankRange"
               :bordered="false"
               :bordered="false"
+              :separator="'至'"
               type="daterange"
               type="daterange"
               style="width: 260px;"
               style="width: 260px;"
             />
             />
@@ -119,11 +116,10 @@
         >
         >
           <Echart :option="rightContent.bottom" />
           <Echart :option="rightContent.bottom" />
           <div class="control">
           <div class="control">
-            <SelectDate
-              @date-change="stationRankchange"
-            />
+            <SelectDate @date-change="stationRankchange" />
             <n-date-picker
             <n-date-picker
               v-model:value="stationRankRange"
               v-model:value="stationRankRange"
+              :separator="'至'"
               :bordered="false"
               :bordered="false"
               type="daterange"
               type="daterange"
               style="width: 260px;"
               style="width: 260px;"
@@ -148,7 +144,7 @@ import { graphic } from 'echarts'
 import LineAnalysisService from '../services/lineAnalysis.service'
 import LineAnalysisService from '../services/lineAnalysis.service'
 import { format, subDays } from 'date-fns'
 import { format, subDays } from 'date-fns'
 
 
-const leftContent:Ref<any> = ref({
+const leftContent: Ref<any> = ref({
   tCharts: [
   tCharts: [
     {
     {
       name: '线路类型',
       name: '线路类型',
@@ -156,6 +152,10 @@ const leftContent:Ref<any> = ref({
         grid: {
         grid: {
           containLabel: true
           containLabel: true
         },
         },
+        tooltip: {
+          show: true,
+          formatter: '{b}: {c}条 ,占比: {d}%'
+        },
         // 图表图例
         // 图表图例
         legend: {
         legend: {
           show: true,
           show: true,
@@ -205,9 +205,9 @@ const leftContent:Ref<any> = ref({
         },
         },
         grid: {
         grid: {
           top: 20,
           top: 20,
-          left: 20,
+          left: '5%',
           bottom: 20,
           bottom: 20,
-          right: 20,
+          right: '10%',
           containLabel: true
           containLabel: true
         },
         },
         xAxis: {
         xAxis: {
@@ -244,8 +244,8 @@ const leftContent:Ref<any> = ref({
             rich: {
             rich: {
               a1: {
               a1: {
                 backgroundColor: '#FFFF0050',
                 backgroundColor: '#FFFF0050',
-                width: 30,
-                height: 28,
+                width: 25,
+                height: 23,
                 align: 'center',
                 align: 'center',
                 borderRadius: 15,
                 borderRadius: 15,
                 fontSize: 18,
                 fontSize: 18,
@@ -256,8 +256,8 @@ const leftContent:Ref<any> = ref({
               },
               },
               a2: {
               a2: {
                 backgroundColor: '#F2F2F250',
                 backgroundColor: '#F2F2F250',
-                width: 30,
-                height: 28,
+                width: 25,
+                height: 23,
                 align: 'center',
                 align: 'center',
                 borderRadius: 15,
                 borderRadius: 15,
                 fontSize: 18,
                 fontSize: 18,
@@ -268,8 +268,8 @@ const leftContent:Ref<any> = ref({
               },
               },
               a3: {
               a3: {
                 backgroundColor: '#FAAD0E50',
                 backgroundColor: '#FAAD0E50',
-                width: 30,
-                height: 28,
+                width: 25,
+                height: 23,
                 align: 'center',
                 align: 'center',
                 borderRadius: 15,
                 borderRadius: 15,
                 fontSize: 18,
                 fontSize: 18,
@@ -280,8 +280,8 @@ const leftContent:Ref<any> = ref({
               },
               },
               b: {
               b: {
                 backgroundColor: '#00FFFF50',
                 backgroundColor: '#00FFFF50',
-                width: 30,
-                height: 28,
+                width: 25,
+                height: 23,
                 align: 'center',
                 align: 'center',
                 borderRadius: 15,
                 borderRadius: 15,
                 fontSize: 18,
                 fontSize: 18,
@@ -289,21 +289,25 @@ const leftContent:Ref<any> = ref({
                 borderType: 'solid',
                 borderType: 'solid',
                 borderWidth: 1,
                 borderWidth: 1,
                 padding: [ 2, 0, 0, 0 ]
                 padding: [ 2, 0, 0, 0 ]
+              },
+              c: {
+                width: 100,
+                fontSize: 18
               }
               }
             },
             },
             formatter: (params: string, _id: number) => {
             formatter: (params: string, _id: number) => {
               const id = _id + 1
               const id = _id + 1
               if (_id < 3) {
               if (_id < 3) {
-                return `{a${id}|${id}}  ${params}`
+                return `{a${id}|${id}}  {c|${params}}`
               }
               }
-              return `{b|${id}}  ${params}`
+              return `{b|${id}}  {c|${params}}`
             }
             }
           }
           }
         },
         },
         series: [
         series: [
           {
           {
             z: 2,
             z: 2,
-            name: 'value',
+            name: '客流量',
             type: 'bar',
             type: 'bar',
             barWidth: 25,
             barWidth: 25,
             zlevel: 1,
             zlevel: 1,
@@ -332,7 +336,7 @@ const leftContent:Ref<any> = ref({
     }
     }
   ]
   ]
 })
 })
-const rightContent:Ref<any> = ref({
+const rightContent: Ref<any> = ref({
   tCharts: [
   tCharts: [
     {
     {
       name: '线路长度分布',
       name: '线路长度分布',
@@ -357,6 +361,10 @@ const rightContent:Ref<any> = ref({
         grid: {
         grid: {
           containLabel: true
           containLabel: true
         },
         },
+        tooltip: {
+          show: true,
+          formatter: '{b}: {c}条 ,占比: {d}%'
+        },
         // 图表图例
         // 图表图例
         legend: {
         legend: {
           show: true,
           show: true,
@@ -420,6 +428,10 @@ const rightContent:Ref<any> = ref({
         grid: {
         grid: {
           containLabel: true
           containLabel: true
         },
         },
+        tooltip: {
+          show: true,
+          formatter: '{b}: {c}个 ,占比: {d}%'
+        },
         // 图表图例
         // 图表图例
         legend: {
         legend: {
           show: true,
           show: true,
@@ -463,11 +475,12 @@ const rightContent:Ref<any> = ref({
   center: {
   center: {
     grid: {
     grid: {
       containLabel: true,
       containLabel: true,
-      right: 30,
-      left: 50,
+      right: '3%',
+      left: '2%',
       bottom: '25%',
       bottom: '25%',
       top: '20%'
       top: '20%'
     },
     },
+    tooltip: { trigger: 'axis', show: true },
     legend: {
     legend: {
       show: true,
       show: true,
       left: 'center',
       left: 'center',
@@ -475,7 +488,7 @@ const rightContent:Ref<any> = ref({
       itemWidth: 15,
       itemWidth: 15,
       itemHeight: 10,
       itemHeight: 10,
       textStyle: {
       textStyle: {
-        color: '#646464',
+        color: '#fff',
         fontSize: 18
         fontSize: 18
       }
       }
     },
     },
@@ -500,7 +513,7 @@ const rightContent:Ref<any> = ref({
     yAxis: [ {
     yAxis: [ {
       name: 'km/h',
       name: 'km/h',
       nameLocation: 'center',
       nameLocation: 'center',
-      nameGap: 50,
+      nameGap: 70,
       nameTextStyle: {
       nameTextStyle: {
         color: '#fff',
         color: '#fff',
         fontSize: 18
         fontSize: 18
@@ -519,11 +532,10 @@ const rightContent:Ref<any> = ref({
       },
       },
       axisLabel: {
       axisLabel: {
         show: true,
         show: true,
+        formatter: '{value} km',
         margin: 10,
         margin: 10,
-        textStyle: {
-          color: '#fff'
-
-        }
+        color: '#fff',
+        fontSize: 18
       },
       },
       axisTick: {
       axisTick: {
         show: false
         show: false
@@ -535,14 +547,9 @@ const rightContent:Ref<any> = ref({
       type: 'line',
       type: 'line',
       smooth: true,
       smooth: true,
       symbolSize: 0,
       symbolSize: 0,
-      itemStyle: {
-        normal: {
-          // color: '#4293FD',
-          lineStyle: {
-            // color: '#4293FD',
-            width: 2
-          }
-        }
+      lineStyle: {
+        // color: '#4293FD',
+        width: 2
       },
       },
       data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
       data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
     },
     },
@@ -552,12 +559,9 @@ const rightContent:Ref<any> = ref({
       smooth: true,
       smooth: true,
       symbolSize: 0,
       symbolSize: 0,
       itemStyle: {
       itemStyle: {
-        normal: {
+        lineStyle: {
           // color: '#23D0C4',
           // color: '#23D0C4',
-          lineStyle: {
-            // color: '#23D0C4',
-            width: 2
-          }
+          width: 2
         }
         }
       },
       },
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
@@ -568,12 +572,9 @@ const rightContent:Ref<any> = ref({
       smooth: true,
       smooth: true,
       symbolSize: 0,
       symbolSize: 0,
       itemStyle: {
       itemStyle: {
-        normal: {
+        lineStyle: {
           // color: '#23D0C4',
           // color: '#23D0C4',
-          lineStyle: {
-            // color: '#23D0C4',
-            width: 2
-          }
+          width: 2
         }
         }
       },
       },
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
       data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
@@ -585,8 +586,8 @@ const rightContent:Ref<any> = ref({
     grid: {
     grid: {
       containLabel: true,
       containLabel: true,
       top: '35%',
       top: '35%',
-      right: 30,
-      left: 50,
+      right: '3%',
+      left: '2%',
       bottom: 0
       bottom: 0
     },
     },
     tooltip: {
     tooltip: {
@@ -603,7 +604,7 @@ const rightContent:Ref<any> = ref({
       itemGap: 30,
       itemGap: 30,
       textStyle: {
       textStyle: {
         fontSize: 18,
         fontSize: 18,
-        color: '#C9D2FA'
+        color: '#fff'
       }
       }
     },
     },
     xAxis: {
     xAxis: {
@@ -627,7 +628,7 @@ const rightContent:Ref<any> = ref({
         interval: 0,
         interval: 0,
         show: true,
         show: true,
         fontSize: 18,
         fontSize: 18,
-        color: '#C9D2FA'
+        color: '#fff'
       },
       },
       axisLine: {
       axisLine: {
         show: false,
         show: false,
@@ -646,7 +647,7 @@ const rightContent:Ref<any> = ref({
       {
       {
         name: '人数',
         name: '人数',
         nameLocation: 'center',
         nameLocation: 'center',
-        nameGap: 50,
+        nameGap: 80,
         nameTextStyle: {
         nameTextStyle: {
           color: '#fff',
           color: '#fff',
           fontSize: 18
           fontSize: 18
@@ -654,8 +655,9 @@ const rightContent:Ref<any> = ref({
         splitNumber: 2,
         splitNumber: 2,
         axisLabel: {
         axisLabel: {
           show: true,
           show: true,
+          formatter: '{value} 人',
           fontSize: 18,
           fontSize: 18,
-          color: '#C9D2FA'
+          color: '#fff'
         },
         },
         axisLine: {
         axisLine: {
           show: false
           show: false
@@ -676,31 +678,27 @@ const rightContent:Ref<any> = ref({
         name: '客流量',
         name: '客流量',
         type: 'bar',
         type: 'bar',
         silent: true,
         silent: true,
-        itemStyle: {
-          normal: {
-            color: new graphic.LinearGradient(
-              0,
-              0,
-              0,
-              1,
-              [
-                {
-                  offset: 0,
-                  color: '#FFD35D'// 0% 处的颜色
-                },
-                {
-                  offset: 0.5,
-                  color: '#7ec2f382'// 0% 处的颜色
-                },
-                {
-                  offset: 1,
-                  color: '#1890ff21' // 100% 处的颜色
-                }
-              ],
-              false
-            )
-          }
-        },
+        color: new graphic.LinearGradient(
+          0,
+          0,
+          0,
+          1,
+          [
+            {
+              offset: 0,
+              color: '#FFD35D'// 0% 处的颜色
+            },
+            {
+              offset: 0.5,
+              color: '#7ec2f382'// 0% 处的颜色
+            },
+            {
+              offset: 1,
+              color: '#1890ff21' // 100% 处的颜色
+            }
+          ],
+          false
+        ),
         barWidth: 30,
         barWidth: 30,
         data: [ 200, 108, 200, 40, 210, 100, 200, 108, 200, 40, 210, 100 ]
         data: [ 200, 108, 200, 40, 210, 100, 200, 108, 200, 40, 210, 100 ]
       }
       }
@@ -712,7 +710,7 @@ const lineAnalysisService = new LineAnalysisService()
 
 
 async function getAnalysisLineType() {
 async function getAnalysisLineType() {
   const res = await lineAnalysisService.getAnalysisLineType()
   const res = await lineAnalysisService.getAnalysisLineType()
-  leftContent.value.tCharts[0].option.series[0].data = res.map((item:any) => ({
+  leftContent.value.tCharts[0].option.series[0].data = res.map((item: any) => ({
     name: item.type,
     name: item.type,
     value: item.number
     value: item.number
   }))
   }))
@@ -730,8 +728,8 @@ async function getAnalysisRegionFlow() {
     seriesData.push(item.flow)
     seriesData.push(item.flow)
   }
   }
 
 
-  leftContent.value.tCharts[1].option.yAxis.data = yData
-  leftContent.value.tCharts[1].option.series[0].data = seriesData
+  leftContent.value.tCharts[1].option.yAxis.data = yData.slice(0, 9)
+  leftContent.value.tCharts[1].option.series[0].data = seriesData.slice(0, 9)
 }
 }
 getAnalysisRegionFlow()
 getAnalysisRegionFlow()
 
 
@@ -778,9 +776,9 @@ const lineAdjustData = ref({
     1: '新辟',
     1: '新辟',
     2: '撤销',
     2: '撤销',
     3: '调整'
     3: '调整'
-  }as any
+  } as any
 })
 })
-async function getAnalysisLineAdjust(params:any) {
+async function getAnalysisLineAdjust(params: any) {
   const res = await lineAnalysisService.getAnalysisLineAdjust(params)
   const res = await lineAnalysisService.getAnalysisLineAdjust(params)
   let total1 = 0
   let total1 = 0
   let total2 = 0
   let total2 = 0
@@ -856,7 +854,7 @@ async function getAnalysisLineDistance() {
 getAnalysisLineDistance()
 getAnalysisLineDistance()
 
 
 const rankRange = ref([ subDays(Date.now(), 7), Date.now() ])
 const rankRange = ref([ subDays(Date.now(), 7), Date.now() ])
-async function getAnalysisLineOperate(params:any) {
+async function getAnalysisLineOperate(params: any) {
   const res = await lineAnalysisService.getAnalysisLineOperate(params)
   const res = await lineAnalysisService.getAnalysisLineOperate(params)
 
 
   const xAxisData = []
   const xAxisData = []
@@ -893,7 +891,7 @@ watch(() => rankRange.value, () => {
 }, { immediate: true })
 }, { immediate: true })
 
 
 const stationRankRange = ref([ subDays(Date.now(), 7), Date.now() ])
 const stationRankRange = ref([ subDays(Date.now(), 7), Date.now() ])
-async function getAnalysisStationRank(params:any) {
+async function getAnalysisStationRank(params: any) {
   const res = await lineAnalysisService.getAnalysisStationRank(params)
   const res = await lineAnalysisService.getAnalysisStationRank(params)
   const groupData = groupBy(res, 'stationName')
   const groupData = groupBy(res, 'stationName')
   console.log(groupData, 'groupData')
   console.log(groupData, 'groupData')
@@ -929,7 +927,7 @@ watch(() => stationRankRange.value, () => {
 }, { immediate: true })
 }, { immediate: true })
 
 
 function groupBy(array: any[], id: string) {
 function groupBy(array: any[], id: string) {
-  const groups:any = {}
+  const groups: any = {}
   array.forEach((o) => {
   array.forEach((o) => {
     let group = JSON.stringify(o[id])
     let group = JSON.stringify(o[id])
     if (typeof o[id] === 'string') {
     if (typeof o[id] === 'string') {
@@ -969,74 +967,89 @@ function groupBy(array: any[], id: string) {
           background: #000;
           background: #000;
         }
         }
       }
       }
+
       .overview {
       .overview {
-          display: flex;
-          padding: 34px;
-          justify-content: space-between;
+        display: flex;
+        padding: 34px;
+        justify-content: space-between;
 
 
-          .item {
-            width: 375px;
-            height: 65px;
-            background: rgba(27, 175, 255, 0.298);
-            border: 1px solid #00FFFF;
-            display: flex;
-            align-items: center;
-            justify-content: center;
-            color: #FFFFFF;
-            font-size: 20px;
-            gap: 10px;
+        .item {
+          width: 375px;
+          height: 65px;
+          background: rgba(27, 175, 255, 0.298);
+          border: 1px solid #00FFFF;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          color: #FFFFFF;
+          font-size: 20px;
+          gap: 10px;
 
 
-            .icon {
-              width: 30px;
-              height: 30px;
-              background: #000;
-            }
+          .icon {
+            width: 30px;
+            height: 30px;
+            background: #000;
+          }
 
 
-            .num {
-              color: #00FFFF;
-              font-size: 30px;
-              font-family: Impact Normal;
-            }
+          .num {
+            color: #00FFFF;
+            font-size: 30px;
+            font-family: Impact Normal;
           }
           }
         }
         }
-      .table{
-          margin-top: 30px;
-          text-align: center;
-          font-size: 16px;
-          th{
-            border: 0;
-          }
+      }
+
+      .table {
+        margin-top: 30px;
+        text-align: center;
+        font-size: 16px;
+
+        th {
+          border: 0;
         }
         }
+      }
 
 
-        .control{
-          position: absolute;
-          top: 30px;
-          right: 125px;
-          .selectDate{
-            top: 0px;
-            left: -300px;
-          }
+      .control {
+        position: absolute;
+        top: 30px;
+        right: 125px;
+
+        .selectDate {
+          top: 0px;
+          left: -300px;
         }
         }
+      }
     }
     }
 
 
   }
   }
 }
 }
-.right{
+
+.right {
   &-top {
   &-top {
     display: flex;
     display: flex;
     justify-content: space-between;
     justify-content: space-between;
   }
   }
-  &-center,&-bottom {
+
+  &-center,
+  &-bottom {
     position: relative;
     position: relative;
-    .control{
-          position: absolute;
-          top: 60px;
-          right: 110px;
-          .selectDate{
-            top: 0px;
-            left: -300px;
-          }
-        }
+
+    .control {
+      position: absolute;
+      top: 60px;
+      right: 110px;
+
+      .selectDate {
+        top: 0px;
+        left: -300px;
+      }
+
+      :deep(.n-input__separator) {
+        padding: 0 5px;
+        color: #fff;
+        border: 1px solid #2185E8;
+      }
+    }
   }
   }
 }
 }
 </style>
 </style>

+ 27 - 10
src/pages/views/home/components/MaintenanceDynamics.vue

@@ -300,6 +300,9 @@ const leftContent:Ref<any> = ref({
         grid: {
         grid: {
           containLabel: true
           containLabel: true
         },
         },
+        tooltip: {
+          formatter: '{b}: {c}辆 ,占比: {d}%'
+        },
         // 图表图例
         // 图表图例
         legend: {
         legend: {
           type: 'scroll',
           type: 'scroll',
@@ -312,7 +315,7 @@ const leftContent:Ref<any> = ref({
           bottom: 0, // 图例垂直居中
           bottom: 0, // 图例垂直居中
           textStyle: {
           textStyle: {
             color: 'white', // 图例文字颜色
             color: 'white', // 图例文字颜色
-            fontSize: 20
+            fontSize: 18
           }
           }
         },
         },
         series: [
         series: [
@@ -322,8 +325,9 @@ const leftContent:Ref<any> = ref({
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
             showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
             showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
             label: {
             label: {
-              formatter: '{b}\n{d}%',
-              color: 'white'
+              formatter: '{b} {d}%',
+              color: 'white',
+              fontSize: 18
             },
             },
             data: [
             data: [
               { name: '运营中', value: 30619 },
               { name: '运营中', value: 30619 },
@@ -351,6 +355,9 @@ const leftContent:Ref<any> = ref({
         grid: {
         grid: {
           containLabel: true
           containLabel: true
         },
         },
+        tooltip: {
+          formatter: '{b}: {c}辆 ,占比: {d}%'
+        },
         // 图表图例
         // 图表图例
         legend: {
         legend: {
           type: 'scroll',
           type: 'scroll',
@@ -363,7 +370,7 @@ const leftContent:Ref<any> = ref({
           bottom: 0, // 图例垂直居中
           bottom: 0, // 图例垂直居中
           textStyle: {
           textStyle: {
             color: 'white', // 图例文字颜色
             color: 'white', // 图例文字颜色
-            fontSize: 20
+            fontSize: 18
           }
           }
         },
         },
         series: [
         series: [
@@ -373,8 +380,9 @@ const leftContent:Ref<any> = ref({
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
             avoidLabelOverlap: true, // 是否启用防止标签重叠策略
             showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
             showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
             label: {
             label: {
-              formatter: '{b}\n{d}%',
-              color: 'white'
+              formatter: '{b} {d}%',
+              color: 'white',
+              fontSize: 18
             },
             },
             data: [
             data: [
               { name: '隔日留交车辆', value: 30619 },
               { name: '隔日留交车辆', value: 30619 },
@@ -446,7 +454,9 @@ const rightContent = ref({
             fontSize: 18
             fontSize: 18
           }
           }
         },
         },
-        // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
+        tooltip: {
+          formatter: '{b}: {c}个 , {d}%'
+        },
         series: {
         series: {
           bottom: 50,
           bottom: 50,
           type: 'pie', // 图表类型为饼图
           type: 'pie', // 图表类型为饼图
@@ -485,7 +495,9 @@ const rightContent = ref({
             fontSize: 18
             fontSize: 18
           }
           }
         },
         },
-        // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
+        tooltip: {
+          formatter: '{b}: {c}个 , {d}%'
+        },
         series: {
         series: {
           bottom: 50,
           bottom: 50,
           type: 'pie', // 图表类型为饼图
           type: 'pie', // 图表类型为饼图
@@ -525,7 +537,9 @@ const rightContent = ref({
             fontSize: 18
             fontSize: 18
           }
           }
         },
         },
-        // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
+        tooltip: {
+          formatter: '{b}: {c}个 , {d}%'
+        },
         series: {
         series: {
           bottom: 50,
           bottom: 50,
           type: 'pie', // 图表类型为饼图
           type: 'pie', // 图表类型为饼图
@@ -566,6 +580,9 @@ const rightContent = ref({
           fontWeight: 'normal'
           fontWeight: 'normal'
         }
         }
       },
       },
+      tooltip: {
+        formatter: '{b}: {c}辆 ,占比: {d}%'
+      },
       grid: {
       grid: {
         containLabel: true,
         containLabel: true,
         top: 0,
         top: 0,
@@ -594,7 +611,7 @@ const rightContent = ref({
         showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
         showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
         label: {
         label: {
           show: true,
           show: true,
-          formatter: '{b}: {d}',
+          formatter: '{b}: {d}',
           color: 'white',
           color: 'white',
           fontSize: 18
           fontSize: 18
         },
         },

+ 23 - 14
src/pages/views/home/components/StationManagement.vue

@@ -172,7 +172,7 @@
                 </div>
                 </div>
                 <n-progress
                 <n-progress
                   type="line"
                   type="line"
-                  :percentage="(chargingStatistics.chargingNum / chargingStatistics.totalChargingNum * 100).toFixed(2)"
+                  :percentage="+(chargingStatistics.chargingNum / chargingStatistics.totalChargingNum * 100).toFixed(2)"
                   :show-indicator="false"
                   :show-indicator="false"
                   :indicator-placement="'inside'"
                   :indicator-placement="'inside'"
                   processing
                   processing
@@ -188,7 +188,7 @@
                 </div>
                 </div>
                 <n-progress
                 <n-progress
                   type="line"
                   type="line"
-                  :percentage="(chargingStatistics.electricityNum / chargingStatistics.totalElectricityNum * 100).toFixed(2)"
+                  :percentage="+(chargingStatistics.electricityNum / chargingStatistics.totalElectricityNum * 100).toFixed(2)"
                   :show-indicator="false"
                   :show-indicator="false"
                   :indicator-placement="'inside'"
                   :indicator-placement="'inside'"
                   processing
                   processing
@@ -235,9 +235,9 @@ import StationManagementService from '../services/stationManagement.service'
 const leftTitle: Ref<any[]> = ref([ {
 const leftTitle: Ref<any[]> = ref([ {
   name: '类型分布',
   name: '类型分布',
   option: {
   option: {
-    color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
+
     tooltip: {
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     },
     legend: {
     legend: {
       orient: 'horizontal',
       orient: 'horizontal',
@@ -269,9 +269,9 @@ const leftTitle: Ref<any[]> = ref([ {
 {
 {
   name: '面积分布',
   name: '面积分布',
   option: {
   option: {
-    color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
+
     tooltip: {
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     },
     legend: {
     legend: {
       orient: 'horizontal',
       orient: 'horizontal',
@@ -303,9 +303,8 @@ const leftTitle: Ref<any[]> = ref([ {
 {
 {
   name: '场站权属情况',
   name: '场站权属情况',
   option: {
   option: {
-    color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
     tooltip: {
     tooltip: {
-      trigger: 'item'
+      formatter: '{b}: {c}个 ,占比: {d}%'
     },
     },
     legend: {
     legend: {
       orient: 'horizontal',
       orient: 'horizontal',
@@ -339,6 +338,7 @@ const leftTitle: Ref<any[]> = ref([ {
   option: {
   option: {
     tooltip: {
     tooltip: {
       trigger: 'axis',
       trigger: 'axis',
+      formatter: '{b} <br/>数量: {c}个',
       axisPointer: {
       axisPointer: {
         type: 'shadow'
         type: 'shadow'
       }
       }
@@ -455,12 +455,12 @@ const region = ref({
       }
       }
     },
     },
     series: {
     series: {
-      name: '量',
+      name: '客流量',
       type: 'bar',
       type: 'bar',
       barMaxWidth: '40',
       barMaxWidth: '40',
       itemStyle: {
       itemStyle: {
         color: 'rgb(86,137,239)',
         color: 'rgb(86,137,239)',
-        barBorderRadius: [ 0, 20, 20, 0 ]
+        borderRadius: [ 0, 20, 20, 0 ]
       },
       },
       label: {
       label: {
         show: true,
         show: true,
@@ -473,8 +473,15 @@ const region = ref({
 })
 })
 
 
 const powerChart = ref({
 const powerChart = ref({
+  grid: {
+    left: '3%',
+    right: '6%',
+    bottom: '20%',
+    containLabel: true
+  },
   tooltip: {
   tooltip: {
-    trigger: 'axis'
+    trigger: 'axis',
+    formatter: '今日{b} <br/>充电量: {c}kw·h'
   },
   },
   xAxis: {
   xAxis: {
     type: 'category',
     type: 'category',
@@ -495,7 +502,7 @@ const powerChart = ref({
     },
     },
     axisLabel: {
     axisLabel: {
       color: '#fff',
       color: '#fff',
-
+      formatter: '{value} kw·h',
       fontSize: 16
       fontSize: 16
     }
     }
   },
   },
@@ -526,9 +533,11 @@ const powerChart = ref({
   }
   }
 })
 })
 const airportChart = ref({
 const airportChart = ref({
-  color: [ 'rgb(86,137,239)', 'rgb(85,206,160)', 'rgb(88,107,141)', 'rgb(234,181,23)' ],
+
   tooltip: {
   tooltip: {
-    trigger: 'item'
+    trigger: 'item',
+    formatter: '{b}: {c}个 ,占比: {d}%'
+
   },
   },
   legend: {
   legend: {
     orient: 'horizontal',
     orient: 'horizontal',

+ 1 - 1
src/services/socket.service.ts

@@ -21,7 +21,7 @@ export default class SocketService extends Service {
    *  连接
    *  连接
    */
    */
   private _connect() {
   private _connect() {
-    const { token } = this._store
+    const token = this._store.token || `${sessionStorage.getItem('token')}`
     if (!token) return null
     if (!token) return null
     const url = `${import.meta.env.VITE_SOCKET_API}/${token}`
     const url = `${import.meta.env.VITE_SOCKET_API}/${token}`
     const socket = new WebSocket(url)
     const socket = new WebSocket(url)