skyline 2 rokov pred
rodič
commit
4bd9c62ef8
2 zmenil súbory, kde vykonal 163 pridanie a 110 odobranie
  1. 3 3
      admin-web/index.html
  2. 160 107
      admin-web/src/views/admin/index.vue

+ 3 - 3
admin-web/index.html

@@ -5,9 +5,9 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
     <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
     <meta name="keywords" content="vue-next-admin"/>
-    <meta name="description" content="充电小程序管理后台"/>
-    <link rel="icon" href="/favicon.ico"/>
-    <title>充电小程序管理后台</title>
+    <meta name="description" content="快与慢运营管理平台"/>
+    <link rel="icon" href="/favicon.png"/>
+    <title>快与慢运营管理平台</title>
 
 </head>
 <body>

+ 160 - 107
admin-web/src/views/admin/index.vue

@@ -37,31 +37,31 @@
         </div>
       </el-col>
     </el-row>
-    <el-row :gutter="15" class="home-card-three">
-      <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8">
-        <div class="home-card-item">
-          <div class="home-card-item-title">快捷导航工具</div>
-          <div class="home-monitor">
-            <div class="flex-warp">
-              <div class="flex-warp-item" v-for="(v, k) in state.homeThree" :key="k">
-                <div class="flex-warp-item-box" :class="`home-animation${k}`">
-                  <div class="flex-margin">
-                    <i :class="v.icon" :style="{ color: v.iconColor }"></i>
-                    <span class="pl5">{{ v.label }}</span>
-                    <div class="mt10">{{ v.value }}</div>
-                  </div>
-                </div>
-              </div>
-            </div>
-          </div>
-        </div>
-      </el-col>
-      <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16" class="home-media">
-        <div class="home-card-item">
-          <div style="height: 100%" ref="homeBarRef"></div>
-        </div>
-      </el-col>
-    </el-row>
+<!--    <el-row :gutter="15" class="home-card-three">-->
+<!--      <el-col :xs="24" :sm="10" :md="10" :lg="8" :xl="8">-->
+<!--        <div class="home-card-item">-->
+<!--          <div class="home-card-item-title">快捷导航工具</div>-->
+<!--          <div class="home-monitor">-->
+<!--            <div class="flex-warp">-->
+<!--              <div class="flex-warp-item" v-for="(v, k) in state.homeThree" :key="k">-->
+<!--                <div class="flex-warp-item-box" :class="`home-animation${k}`">-->
+<!--                  <div class="flex-margin">-->
+<!--                    <i :class="v.icon" :style="{ color: v.iconColor }"></i>-->
+<!--                    <span class="pl5">{{ v.label }}</span>-->
+<!--                    <div class="mt10">{{ v.value }}</div>-->
+<!--                  </div>-->
+<!--                </div>-->
+<!--              </div>-->
+<!--            </div>-->
+<!--          </div>-->
+<!--        </div>-->
+<!--      </el-col>-->
+<!--      <el-col :xs="24" :sm="14" :md="14" :lg="16" :xl="16" class="home-media">-->
+<!--        <div class="home-card-item">-->
+<!--          <div style="height: 100%" ref="homeBarRef"></div>-->
+<!--        </div>-->
+<!--      </el-col>-->
+<!--    </el-row>-->
   </div>
 </template>
 
@@ -69,11 +69,11 @@
 import NProgress from 'nprogress';
 import 'nprogress/nprogress.css';
 
-import { reactive, onMounted, ref, watch, nextTick, onActivated, markRaw } from 'vue';
+import {markRaw, nextTick, onActivated, onMounted, reactive, ref, watch} from 'vue';
 import * as echarts from 'echarts';
-import { storeToRefs } from 'pinia';
-import { useThemeConfig } from '/@/stores/themeConfig';
-import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes';
+import {storeToRefs} from 'pinia';
+import {useThemeConfig} from '/@/stores/themeConfig';
+import {useTagsViewRoutes} from '/@/stores/tagsViewRoutes';
 
 // 定义变量内容
 const homeLineRef = ref();
@@ -81,8 +81,8 @@ const homePieRef = ref();
 const homeBarRef = ref();
 const storesTagsViewRoutes = useTagsViewRoutes();
 const storesThemeConfig = useThemeConfig();
-const { themeConfig } = storeToRefs(storesThemeConfig);
-const { isTagsViewCurrenFull } = storeToRefs(storesTagsViewRoutes);
+const {themeConfig} = storeToRefs(storesThemeConfig);
+const {isTagsViewCurrenFull} = storeToRefs(storesTagsViewRoutes);
 const state = reactive({
   global: {
     homeChartOne: null,
@@ -94,7 +94,7 @@ const state = reactive({
     {
       num1: '125,12',
       num2: '-12.32',
-      num3: '订单统计信息',
+      num3: '今日充电量(kwh)',
       num4: 'fa fa-meetup',
       color1: '#FF6462',
       color2: '--next-color-primary-lighter',
@@ -103,7 +103,7 @@ const state = reactive({
     {
       num1: '653,33',
       num2: '+42.32',
-      num3: '月度计划信息',
+      num3: '今日充电总金额(元)',
       num4: 'iconfont icon-ditu',
       color1: '#6690F9',
       color2: '--next-color-success-lighter',
@@ -112,7 +112,7 @@ const state = reactive({
     {
       num1: '125,65',
       num2: '+17.32',
-      num3: '年度计划信息',
+      num3: '今日总电费(元)',
       num4: 'iconfont icon-zaosheng',
       color1: '#6690F9',
       color2: '--next-color-warning-lighter',
@@ -121,7 +121,16 @@ const state = reactive({
     {
       num1: '520,43',
       num2: '-10.01',
-      num3: '访问统计信息',
+      num3: '今日总服务费(元)',
+      num4: 'fa fa-github-alt',
+      color1: '#FF6462',
+      color2: '--next-color-danger-lighter',
+      color3: '--el-color-danger',
+    },
+    {
+      num1: '520,43',
+      num2: '-10.01',
+      num3: '今日充电订单数(笔)',
       num4: 'fa fa-github-alt',
       color1: '#FF6462',
       color2: '--next-color-danger-lighter',
@@ -199,13 +208,13 @@ const initLineChart = () => {
   const option = {
     backgroundColor: state.charts.bgColor,
     title: {
-      text: '政策补贴额度',
+      text: '充电数据走势图',
       x: 'left',
-      textStyle: { fontSize: '15', color: state.charts.color },
+      textStyle: {fontSize: '15', color: state.charts.color},
     },
-    grid: { top: 70, right: 20, bottom: 30, left: 30 },
-    tooltip: { trigger: 'axis' },
-    legend: { data: ['预购队列', '最新成交价'], right: 0 },
+    grid: {top: 70, right: 20, bottom: 30, left: 30},
+    tooltip: {trigger: 'axis'},
+    legend: {data: ['充电量', '总金额','电费','服务费',], right: 0},
     xAxis: {
       data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
     },
@@ -213,39 +222,71 @@ const initLineChart = () => {
       {
         type: 'value',
         name: '价格',
-        splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
+        splitLine: {show: true, lineStyle: {type: 'dashed', color: '#f5f5f5'}},
       },
     ],
     series: [
       {
-        name: '预购队列',
+        name: '充电量',
         type: 'line',
         symbolSize: 6,
         symbol: 'circle',
         smooth: true,
         data: [0, 41.1, 30.4, 65.1, 53.3, 53.3, 53.3, 41.1, 30.4, 65.1, 53.3, 10],
-        lineStyle: { color: '#fe9a8b' },
-        itemStyle: { color: '#fe9a8b', borderColor: '#fe9a8b' },
+        lineStyle: {color: '#25b8d2'},
+        itemStyle: {color: '#25b8d2', borderColor: '#25b8d2'},
         areaStyle: {
           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-            { offset: 0, color: '#fe9a8bb3' },
-            { offset: 1, color: '#fe9a8b03' },
+            {offset: 0, color: '#25b8d2'},
+            {offset: 1, color: '#fe9a8b03'},
           ]),
         },
       },
       {
-        name: '最新成交价',
+        name: '总金额',
+        type: 'line',
+        symbolSize: 6,
+        symbol: 'circle',
+        smooth: true,
+        data: [0, 31.1, 32.4, 45.1, 43.3, 43.3, 43.3, 31.1, 20.4, 45.1, 73.3, 40],
+        lineStyle: {color: '#fe9a8b'},
+        itemStyle: {color: '#fe9a8b', borderColor: '#fe9a8b'},
+        areaStyle: {
+          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+            {offset: 0, color: '#fe9a8bb3'},
+            {offset: 1, color: '#fe9a8b03'},
+          ]),
+        },
+      },
+      {
+        name: '电费',
+        type: 'line',
+        symbolSize: 6,
+        symbol: 'circle',
+        smooth: true,
+        data: [0, 21.1, 30.4, 35.1, 53.3, 33.3, 53.3, 41.1, 20.4, 55.1, 43.3, 40],
+        lineStyle: {color: '#b5fe8b'},
+        itemStyle: {color: '#b5fe8b', borderColor: '#b5fe8b'},
+        areaStyle: {
+          color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+            {offset: 0, color: '#b5fe8b'},
+            {offset: 1, color: '#fe9a8b03'},
+          ]),
+        },
+      },
+      {
+        name: '服务费',
         type: 'line',
         symbolSize: 6,
         symbol: 'circle',
         smooth: true,
         data: [0, 24.1, 7.2, 15.5, 42.4, 42.4, 42.4, 24.1, 7.2, 15.5, 42.4, 0],
-        lineStyle: { color: '#9E87FF' },
-        itemStyle: { color: '#9E87FF', borderColor: '#9E87FF' },
+        lineStyle: {color: '#9E87FF'},
+        itemStyle: {color: '#9E87FF', borderColor: '#9E87FF'},
         areaStyle: {
           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-            { offset: 0, color: '#9E87FFb3' },
-            { offset: 1, color: '#9E87FF03' },
+            {offset: 0, color: '#9E87FFb3'},
+            {offset: 1, color: '#9E87FF03'},
           ]),
         },
         emphasis: {
@@ -256,12 +297,12 @@ const initLineChart = () => {
               y: 0.5,
               r: 0.5,
               colorStops: [
-                { offset: 0, color: '#9E87FF' },
-                { offset: 0.4, color: '#9E87FF' },
-                { offset: 0.5, color: '#fff' },
-                { offset: 0.7, color: '#fff' },
-                { offset: 0.8, color: '#fff' },
-                { offset: 1, color: '#fff' },
+                {offset: 0, color: '#9E87FF'},
+                {offset: 0.4, color: '#9E87FF'},
+                {offset: 0.5, color: '#fff'},
+                {offset: 0.7, color: '#fff'},
+                {offset: 0.8, color: '#fff'},
+                {offset: 1, color: '#fff'},
               ],
             },
             borderColor: '#9E87FF',
@@ -278,21 +319,21 @@ const initLineChart = () => {
 const initPieChart = () => {
   if (!state.global.dispose.some((b: any) => b === state.global.homeChartTwo)) state.global.homeChartTwo.dispose();
   state.global.homeChartTwo = markRaw(echarts.init(homePieRef.value, state.charts.theme));
-  var getname = ['房屋及结构物', '专用设备', '通用设备', '文物和陈列品', '图书、档案'];
-  var getvalue = [34.2, 38.87, 17.88, 9.05, 2.05];
+  var getname = ['空闲', '已连接', '充电中'];
+  var getvalue = [34.2, 38.87, 17.88];
   var data = [];
   for (var i = 0; i < getname.length; i++) {
-    data.push({ name: getname[i], value: getvalue[i] });
+    data.push({name: getname[i], value: getvalue[i]});
   }
   const colorList = ['#51A3FC', '#36C78B', '#FEC279', '#968AF5', '#E790E8'];
   const option = {
     backgroundColor: state.charts.bgColor,
     title: {
-      text: '房屋建筑工程',
+      text: '充电站电桩状态',
       x: 'left',
-      textStyle: { fontSize: '15', color: state.charts.color },
+      textStyle: {fontSize: '15', color: state.charts.color},
     },
-    tooltip: { trigger: 'item', formatter: '{b} <br/> {c}%' },
+    tooltip: {trigger: 'item', formatter: '{b} <br/> {c}%'},
     graphic: {
       elements: [
         {
@@ -350,8 +391,8 @@ const initPieChart = () => {
             return colorList[params.dataIndex];
           },
         },
-        label: { show: false },
-        labelLine: { show: false },
+        label: {show: false},
+        labelLine: {show: false},
         data: data,
       },
     ],
@@ -368,37 +409,37 @@ const initBarChart = () => {
     title: {
       text: '地热开发利用',
       x: 'left',
-      textStyle: { fontSize: '15', color: state.charts.color },
+      textStyle: {fontSize: '15', color: state.charts.color},
     },
-    tooltip: { trigger: 'axis' },
-    legend: { data: ['供温', '回温', '压力值(Mpa)'], right: 0 },
-    grid: { top: 70, right: 80, bottom: 30, left: 80 },
+    tooltip: {trigger: 'axis'},
+    legend: {data: ['供温', '回温', '压力值(Mpa)'], right: 0},
+    grid: {top: 70, right: 80, bottom: 30, left: 80},
     xAxis: [
       {
         type: 'category',
         data: ['1km', '2km', '3km', '4km', '5km', '6km'],
         boundaryGap: true,
-        axisTick: { show: false },
+        axisTick: {show: false},
       },
     ],
     yAxis: [
       {
         name: '供回温度(℃)',
         nameLocation: 'middle',
-        nameTextStyle: { padding: [3, 4, 50, 6] },
-        splitLine: { show: true, lineStyle: { type: 'dashed', color: '#f5f5f5' } },
-        axisLine: { show: false },
-        axisTick: { show: false },
-        axisLabel: { color: state.charts.color, formatter: '{value} ' },
+        nameTextStyle: {padding: [3, 4, 50, 6]},
+        splitLine: {show: true, lineStyle: {type: 'dashed', color: '#f5f5f5'}},
+        axisLine: {show: false},
+        axisTick: {show: false},
+        axisLabel: {color: state.charts.color, formatter: '{value} '},
       },
       {
         name: '压力值(Mpa)',
         nameLocation: 'middle',
-        nameTextStyle: { padding: [50, 4, 5, 6] },
-        splitLine: { show: false },
-        axisLine: { show: false },
-        axisTick: { show: false },
-        axisLabel: { color: state.charts.color, formatter: '{value} ' },
+        nameTextStyle: {padding: [50, 4, 5, 6]},
+        splitLine: {show: false},
+        axisLine: {show: false},
+        axisTick: {show: false},
+        axisLabel: {color: state.charts.color, formatter: '{value} '},
       },
     ],
     series: [
@@ -413,21 +454,21 @@ const initBarChart = () => {
         yAxisIndex: 0,
         areaStyle: {
           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-            { offset: 0, color: 'rgba(250,180,101,0.3)' },
-            { offset: 1, color: 'rgba(250,180,101,0)' },
+            {offset: 0, color: 'rgba(250,180,101,0.3)'},
+            {offset: 1, color: 'rgba(250,180,101,0)'},
           ]),
           shadowColor: 'rgba(250,180,101,0.2)',
           shadowBlur: 20,
         },
-        itemStyle: { color: '#FF8000' },
+        itemStyle: {color: '#FF8000'},
         // data中可以使用对象,value代表相应的值,另外可加入自定义的属性
         data: [
-          { value: 1, stationName: 's1' },
-          { value: 3, stationName: 's2' },
-          { value: 4, stationName: 's3' },
-          { value: 9, stationName: 's4' },
-          { value: 3, stationName: 's5' },
-          { value: 2, stationName: 's6' },
+          {value: 1, stationName: 's1'},
+          {value: 3, stationName: 's2'},
+          {value: 4, stationName: 's3'},
+          {value: 9, stationName: 's4'},
+          {value: 3, stationName: 's5'},
+          {value: 2, stationName: 's6'},
         ],
       },
       {
@@ -445,8 +486,8 @@ const initBarChart = () => {
               0,
               1,
               [
-                { offset: 0, color: 'rgba(199, 237, 250,0.5)' },
-                { offset: 1, color: 'rgba(199, 237, 250,0.2)' },
+                {offset: 0, color: 'rgba(199, 237, 250,0.5)'},
+                {offset: 1, color: 'rgba(199, 237, 250,0.2)'},
               ],
               false
           ),
@@ -455,12 +496,12 @@ const initBarChart = () => {
           color: '#3bbc86',
         },
         data: [
-          { value: 31, stationName: 's1' },
-          { value: 36, stationName: 's2' },
-          { value: 54, stationName: 's3' },
-          { value: 24, stationName: 's4' },
-          { value: 73, stationName: 's5' },
-          { value: 22, stationName: 's6' },
+          {value: 31, stationName: 's1'},
+          {value: 36, stationName: 's2'},
+          {value: 54, stationName: 's3'},
+          {value: 24, stationName: 's4'},
+          {value: 73, stationName: 's5'},
+          {value: 22, stationName: 's6'},
         ],
       },
       {
@@ -470,19 +511,19 @@ const initBarChart = () => {
         yAxisIndex: 1,
         itemStyle: {
           color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
-            { offset: 0, color: 'rgba(108,80,243,0.3)' },
-            { offset: 1, color: 'rgba(108,80,243,0)' },
+            {offset: 0, color: 'rgba(108,80,243,0.3)'},
+            {offset: 1, color: 'rgba(108,80,243,0)'},
           ]),
           //柱状图圆角
           borderRadius: [30, 30, 0, 0],
         },
         data: [
-          { value: 11, stationName: 's1' },
-          { value: 34, stationName: 's2' },
-          { value: 54, stationName: 's3' },
-          { value: 39, stationName: 's4' },
-          { value: 63, stationName: 's5' },
-          { value: 24, stationName: 's6' },
+          {value: 11, stationName: 's1'},
+          {value: 34, stationName: 's2'},
+          {value: 54, stationName: 's3'},
+          {value: 39, stationName: 's4'},
+          {value: 63, stationName: 's5'},
+          {value: 24, stationName: 's6'},
         ],
       },
     ],
@@ -551,12 +592,13 @@ watch(
 $homeNavLengh: 8;
 .home-container {
   overflow: hidden;
+
   .home-card-one,
   .home-card-two,
   .home-card-three {
     .home-card-item {
       width: 100%;
-      height: 130px;
+      height: 180px;
       border-radius: 4px;
       transition: all ease 0.3s;
       padding: 20px;
@@ -564,19 +606,23 @@ $homeNavLengh: 8;
       background: var(--el-color-white);
       color: var(--el-text-color-primary);
       border: 1px solid var(--next-border-color-light);
+
       &:hover {
         box-shadow: 0 2px 12px var(--next-color-dark-hover);
         transition: all ease 0.3s;
       }
+
       &-icon {
         width: 70px;
         height: 70px;
         border-radius: 100%;
         flex-shrink: 1;
+
         i {
           color: var(--el-text-color-placeholder);
         }
       }
+
       &-title {
         font-size: 15px;
         font-weight: bold;
@@ -584,6 +630,7 @@ $homeNavLengh: 8;
       }
     }
   }
+
   .home-card-one {
     @for $i from 0 through 3 {
       .home-one-animation#{$i} {
@@ -595,18 +642,22 @@ $homeNavLengh: 8;
       }
     }
   }
+
   .home-card-two,
   .home-card-three {
     .home-card-item {
-      height: 400px;
+      height: 580px;
       width: 100%;
       overflow: hidden;
+
       .home-monitor {
         height: 100%;
+
         .flex-warp-item {
           width: 25%;
           height: 111px;
           display: flex;
+
           .flex-warp-item-box {
             margin: auto;
             text-align: center;
@@ -616,11 +667,13 @@ $homeNavLengh: 8;
             background: var(--next-bg-color);
             cursor: pointer;
             transition: all 0.3s ease;
+
             &:hover {
               background: var(--el-color-primary-light-9);
               transition: all 0.3s ease;
             }
           }
+
           @for $i from 0 through $homeNavLengh {
             .home-animation#{$i} {
               opacity: 0;