Browse Source

样式修改

bls-dan 2 years ago
parent
commit
10321f3afc

+ 8 - 8
src/pages/views/home/components/FacilityManagement.vue

@@ -217,35 +217,35 @@ const facilityStatistics = ref({
       {
       {
         name: '车辆',
         name: '车辆',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         stack: 'total',
         stack: 'total',
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
       },
       },
       {
       {
         name: '电子站牌',
         name: '电子站牌',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         stack: 'total',
         stack: 'total',
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
       },
       },
       {
       {
         name: '洗车机',
         name: '洗车机',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         stack: 'total',
         stack: 'total',
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
       },
       },
       {
       {
         name: '充电桩',
         name: '充电桩',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         stack: 'total',
         stack: 'total',
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
       },
       },
       {
       {
         name: '车载部件',
         name: '车载部件',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         stack: 'total',
         stack: 'total',
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
         data: [ 10, 52, 200, 334, 390, 330, 220 ]
       }
       }
@@ -363,7 +363,7 @@ const carVehicle = ref({
       {
       {
         name: '数量',
         name: '数量',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         itemStyle: {
         itemStyle: {
           color: {
           color: {
             type: 'linear',
             type: 'linear',
@@ -488,7 +488,7 @@ const facilityStation = ref({
       {
       {
         name: '数量',
         name: '数量',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         itemStyle: {
         itemStyle: {
           color: {
           color: {
             type: 'linear',
             type: 'linear',
@@ -784,7 +784,7 @@ const vehicleComponents = ref({
       {
       {
         name: '数量',
         name: '数量',
         type: 'bar',
         type: 'bar',
-        barWidth: '40',
+        barMaxWidth: '40',
         itemStyle: {
         itemStyle: {
           color: {
           color: {
             type: 'linear',
             type: 'linear',

+ 37 - 32
src/pages/views/home/components/LineAnalysis.vue

@@ -67,38 +67,13 @@
                 />
                 />
                 <div>线路调整详情</div>
                 <div>线路调整详情</div>
               </div>
               </div>
-              <n-table
+              <n-data-table
+                :columns="lineAdjustData.columns"
+                :data="lineAdjustData.tableData"
+                max-height="470"
                 striped
                 striped
-                size="large"
-                :bordered="false"
-                single-column
-                :bottom-bordered="false"
                 class="table"
                 class="table"
-              >
-                <thead>
-                  <tr>
-                    <th> 序号 </th>
-                    <th> 措施 </th>
-                    <th> 区域 </th>
-                    <th> 线路 </th>
-                    <th> 线路类型 </th>
-                    <th> 时间 </th>
-                  </tr>
-                </thead>
-                <tbody>
-                  <tr
-                    v-for="item,index in lineAdjustData.tableData"
-                    :key="item"
-                  >
-                    <td>  {{ index+1 }} </td>
-                    <td>  {{ lineAdjustData.map[item.measure] }} </td>
-                    <td>  {{ item.region }}  </td>
-                    <td>  {{ item.lineName }} </td>
-                    <td>  {{ item.lineType }} </td>
-                    <td>   {{ item.time }}</td>
-                  </tr>
-                </tbody>
-              </n-table>
+              />
             </div>
             </div>
           </div>
           </div>
         </Box>
         </Box>
@@ -166,7 +141,9 @@ import Box from '@/components/box.vue'
 import Echart from '@/components/chart.vue'
 import Echart from '@/components/chart.vue'
 import SelectDate from '@/components/selectDate.vue'
 import SelectDate from '@/components/selectDate.vue'
 
 
-import { Ref, ref, watch } from 'vue'
+import {
+  Ref, h, ref, watch
+} from 'vue'
 import { graphic } from 'echarts'
 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'
@@ -760,8 +737,35 @@ getAnalysisRegionFlow()
 
 
 const lineAdjustData = ref({
 const lineAdjustData = ref({
   range: [ subDays(Date.now(), 7), Date.now() ],
   range: [ subDays(Date.now(), 7), Date.now() ],
-  type: 1,
+  type: 4,
   tableData: [] as any[],
   tableData: [] as any[],
+  columns: [
+    {
+      title: '序号',
+      render: (_: any, rowIndex: number) => h('span', rowIndex + 1)
+    },
+    {
+      title: '措施',
+      key: 'measure',
+      render: (_: any) => h('span', lineAdjustData.value.map[_.measure])
+    },
+    {
+      title: '区域',
+      key: 'region'
+    },
+    {
+      title: '线路',
+      key: 'lineName'
+    },
+    {
+      title: '线路类型',
+      key: 'lineType'
+    },
+    {
+      title: '时间',
+      key: 'time'
+    }
+  ],
   overview: {
   overview: {
     // 新辟
     // 新辟
     1: 0,
     1: 0,
@@ -998,6 +1002,7 @@ function groupBy(array: any[], id: string) {
       .table{
       .table{
           margin-top: 30px;
           margin-top: 30px;
           text-align: center;
           text-align: center;
+          font-size: 16px;
           th{
           th{
             border: 0;
             border: 0;
           }
           }

+ 6 - 6
src/pages/views/home/components/StationManagement.vue

@@ -292,10 +292,10 @@ const leftTitle: Ref<any[]> = ref([ {
         fontSize: 14
         fontSize: 14
       },
       },
       data: [
       data: [
-        { value: 1048, name: '<=500m' },
-        { value: 735, name: '500~2000' },
-        { value: 580, name: '2000~5000' },
-        { value: 580, name: '5000~10000' }
+        { value: 1048, name: '<=500' },
+        { value: 735, name: '500~2000' },
+        { value: 580, name: '2000~5000' },
+        { value: 580, name: '5000~10000' }
       ]
       ]
     }
     }
   }
   }
@@ -385,7 +385,7 @@ const leftTitle: Ref<any[]> = ref([ {
     series: {
     series: {
       name: '数量',
       name: '数量',
       type: 'bar',
       type: 'bar',
-      barWidth: '40',
+      barMaxWidth: '40',
       itemStyle: {
       itemStyle: {
         color: {
         color: {
           type: 'linear',
           type: 'linear',
@@ -457,7 +457,7 @@ const region = ref({
     series: {
     series: {
       name: '数量',
       name: '数量',
       type: 'bar',
       type: 'bar',
-      barWidth: '40',
+      barMaxWidth: '40',
       itemStyle: {
       itemStyle: {
         color: 'rgb(86,137,239)',
         color: 'rgb(86,137,239)',
         barBorderRadius: [ 0, 20, 20, 0 ]
         barBorderRadius: [ 0, 20, 20, 0 ]