浏览代码

样式调整

duwendi 1 年之前
父节点
当前提交
06d2c83ff5

+ 19 - 37
src/components/barChart.vue

@@ -4,32 +4,13 @@
4
 
4
 
5
 <script>
5
 <script>
6
 import * as echarts from 'echarts'
6
 import * as echarts from 'echarts'
7
-const colors = [
8
-  new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
9
-    offset: 0,
10
-    color: '#1EBFFF'
11
-    },
12
-    {
13
-    offset: 1,
14
-    color: '#975BFF'
15
-    }
16
-  ]),
17
-  new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
18
-    offset: 0,
19
-    color: '#FF6E2F'
20
-    },
21
-    {
22
-    offset: 1,
23
-    color: '#FFCA02'
24
-    }
25
-  ])
26
-]
7
+const colors = [ '#5470c6','#91cc75' ]
27
 export default {
8
 export default {
28
   props: {
9
   props: {
29
     id: {type: String, required: true},
10
     id: {type: String, required: true},
30
     dataset: {type: Array, required: true},
11
     dataset: {type: Array, required: true},
31
     encode: {type: Array, required: true},
12
     encode: {type: Array, required: true},
32
-    barWidth:{type: Number, default: 15},
13
+    barWidth:{type: Number, default: 30},
33
     yAxisName: {type: String},
14
     yAxisName: {type: String},
34
     xlabelFormat: {type: Function},
15
     xlabelFormat: {type: Function},
35
     showLegend: {type: Boolean, default: true},
16
     showLegend: {type: Boolean, default: true},
@@ -53,14 +34,11 @@ export default {
53
           left: 70,
34
           left: 70,
54
           right: 20
35
           right: 20
55
         },
36
         },
56
-        legend: {right: 20, top: 0, icon: this.legendIcon, textStyle: {color: '#ffffff', fontSize: this.isBig ? 18 : 12}},
37
+        legend: {right: 20, top: 0, icon: this.legendIcon, textStyle: {color: '#333', fontSize: this.isBig ? 18 : 12}},
57
         tooltip: {
38
         tooltip: {
58
           trigger: 'axis',
39
           trigger: 'axis',
59
           confine: true,
40
           confine: true,
60
           backgroundColor: 't',
41
           backgroundColor: 't',
61
-          axisPointer: {
62
-            lineStyle: { color: "#0081AC", type: "dashed" },
63
-          },
64
           show: this.tooltip,
42
           show: this.tooltip,
65
           formatter: this.tooltip,
43
           formatter: this.tooltip,
66
           position: function(point, params, dom,rect,size) {
44
           position: function(point, params, dom,rect,size) {
@@ -73,40 +51,35 @@ export default {
73
           type: 'category',
51
           type: 'category',
74
           axisLabel: {
52
           axisLabel: {
75
             interval: 0,
53
             interval: 0,
76
-            color: '#59BEED',
54
+            color: '#333',
77
             fontSize: this.labelSize
55
             fontSize: this.labelSize
78
           },
56
           },
79
            axisLine: {
57
            axisLine: {
80
-            lineStyle: {
81
-              color: '#1977C6'
82
-            }
58
+            show: false,
83
           },
59
           },
84
           splitLine: {
60
           splitLine: {
85
             lineStyle: {
61
             lineStyle: {
86
-              color: '#082E81',
87
-              type: 'dashed'
88
             }
62
             }
89
           },
63
           },
90
           axisTick: false
64
           axisTick: false
91
         },
65
         },
92
         yAxis: {
66
         yAxis: {
93
           axisLabel: {
67
           axisLabel: {
94
-            color: '#59BEED',
68
+            color: '#333',
95
             fontSize: this.labelSize
69
             fontSize: this.labelSize
96
           },
70
           },
97
           nameTextStyle: {
71
           nameTextStyle: {
98
-            color: '#59BEED',
72
+            color: '#333',
99
             fontSize: this.labelSize
73
             fontSize: this.labelSize
100
           },
74
           },
101
           axisLine: {
75
           axisLine: {
76
+            show: false,
102
             lineStyle: {
77
             lineStyle: {
103
-              color: '#1977C6'
78
+              // color: '#1977C6'
104
             }
79
             }
105
           },
80
           },
106
           splitLine: {
81
           splitLine: {
107
             lineStyle: {
82
             lineStyle: {
108
-              color: '#082E81',
109
-              type: 'dashed'
110
             }
83
             }
111
           },
84
           },
112
           axisTick: false,
85
           axisTick: false,
@@ -150,7 +123,16 @@ export default {
150
         itemStyle: {
123
         itemStyle: {
151
           barBorderRadius: this.legendIcon === 'circle' ? [5, 5, 0, 0] : 0,
124
           barBorderRadius: this.legendIcon === 'circle' ? [5, 5, 0, 0] : 0,
152
           color: isNaN(this.colorIdx) ? this.colorArr[idx] : colors[this.colorIdx]
125
           color: isNaN(this.colorIdx) ? this.colorArr[idx] : colors[this.colorIdx]
153
-        }
126
+        },
127
+        label: { //柱体上显示数值
128
+          show: true,//开启显示
129
+          position: 'top',//在上方显示
130
+          textStyle: {//数值样式
131
+            fontSize: '7px',
132
+            color: '#333'
133
+          },
134
+          // formatter: '{c}',
135
+        },
154
       })
136
       })
155
     })
137
     })
156
     option.dataset.source = this.dataset
138
     option.dataset.source = this.dataset

+ 3 - 3
src/components/pieChart.vue

@@ -3,7 +3,7 @@
3
 </template>
3
 </template>
4
 
4
 
5
 <script>
5
 <script>
6
-const colors = ["#db6749", "#f8cd55", "#3c97d6", "#989bf8"];
6
+const colors = ["#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc"];
7
 import * as echarts from 'echarts'
7
 import * as echarts from 'echarts'
8
 export default {
8
 export default {
9
   props: {
9
   props: {
@@ -42,7 +42,7 @@ export default {
42
           icon: "circle",
42
           icon: "circle",
43
           show: this.legend,
43
           show: this.legend,
44
           textStyle: {
44
           textStyle: {
45
-            color: "#8BDFFD",
45
+            color: "#333",
46
             fontSize: this.isBig ? 18 : 12,
46
             fontSize: this.isBig ? 18 : 12,
47
           },
47
           },
48
           ...this.legend,
48
           ...this.legend,
@@ -87,7 +87,7 @@ export default {
87
                   padding: [3, 3, 0, -12],
87
                   padding: [3, 3, 0, -12],
88
                 },
88
                 },
89
                 name: {
89
                 name: {
90
-                  color: "#8BDFFD",
90
+                  color: "#333",
91
                   align: "center",
91
                   align: "center",
92
                   lineHeight: this.labelSize,
92
                   lineHeight: this.labelSize,
93
                   padding: this.isBig ? [-20, 10, -40, 10] : [-20, 10, -30, 10],
93
                   padding: this.isBig ? [-20, 10, -40, 10] : [-20, 10, -30, 10],

+ 8 - 0
src/pages/index/components/lead_system.vue

@@ -30,7 +30,9 @@
30
 <!--            </el-col>-->
30
 <!--            </el-col>-->
31
 <!--          </el-row>-->
31
 <!--          </el-row>-->
32
 <!--        </el-form>-->
32
 <!--        </el-form>-->
33
+        <br>
33
         <h4>停车场数量和分布</h4>
34
         <h4>停车场数量和分布</h4>
35
+        <br>
34
         <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
36
         <el-table border :row-class-name="rowClassName" :data="tableData1" v-loading="loading1">
35
           <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
37
           <el-table-column v-for="(item, index) in columns1" :key="index" :label="item.label" :prop="item.key">
36
           </el-table-column>
38
           </el-table-column>
@@ -40,17 +42,23 @@
40
 <!--                         :current-page.sync="pageNum1" :page-size.sync="pageSize1">-->
42
 <!--                         :current-page.sync="pageNum1" :page-size.sync="pageSize1">-->
41
 <!--          </el-pagination>-->
43
 <!--          </el-pagination>-->
42
 <!--        </div>-->
44
 <!--        </div>-->
45
+        <br>
43
         <h4>停车位利用率</h4>
46
         <h4>停车位利用率</h4>
47
+        <br>
44
         <el-table border :row-class-name="rowClassName" :data="tableData2" height="300px" v-loading="loading2">
48
         <el-table border :row-class-name="rowClassName" :data="tableData2" height="300px" v-loading="loading2">
45
           <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
49
           <el-table-column v-for="(item, index) in columns2" :key="index" :label="item.label" :prop="item.key">
46
           </el-table-column>
50
           </el-table-column>
47
         </el-table>
51
         </el-table>
52
+        <br>
48
         <h4>停车时长分布</h4>
53
         <h4>停车时长分布</h4>
54
+        <br>
49
         <el-table border :row-class-name="rowClassName" :data="tableData3" height="300px" v-loading="loading3">
55
         <el-table border :row-class-name="rowClassName" :data="tableData3" height="300px" v-loading="loading3">
50
           <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
56
           <el-table-column v-for="(item, index) in columns3" :key="index" :label="item.label" :prop="item.key">
51
           </el-table-column>
57
           </el-table-column>
52
         </el-table>
58
         </el-table>
59
+        <br>
53
         <h4>停车场运营效率</h4>
60
         <h4>停车场运营效率</h4>
61
+        <br>
54
         <el-table border :row-class-name="rowClassName" :data="tableData4" height="300px" v-loading="loading4">
62
         <el-table border :row-class-name="rowClassName" :data="tableData4" height="300px" v-loading="loading4">
55
           <el-table-column v-for="(item, index) in columns4" :key="index" :label="item.label" :prop="item.key">
63
           <el-table-column v-for="(item, index) in columns4" :key="index" :label="item.label" :prop="item.key">
56
           </el-table-column>
64
           </el-table-column>

+ 13 - 16
src/pages/index/components/parking_index.vue

@@ -1,33 +1,32 @@
1
 <template xmlns:piechart="http://www.w3.org/1999/html">
1
 <template xmlns:piechart="http://www.w3.org/1999/html">
2
   <div class="body-wrapper">
2
   <div class="body-wrapper">
3
     <div style="display: flex; justify-content: space-between;">
3
     <div style="display: flex; justify-content: space-between;">
4
-      <div class="body-box" style="width: 43%;height:400px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;color: #525252;">
5
-        <h2>概览</h2>
6
-        <div class="box-item" style="border: 2px dotted #a1a1a1;border-radius: 5px;padding: 20px 20px 40px 20px;margin-top: 15px">
4
+      <div class="body-box" style="width: 43%;height:300px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;color: #525252;">
5
+        <h3>概览</h3>
6
+        <div class="box-item" style="border: 2px dotted #a1a1a1;border-radius: 5px;padding: 10px 20px;margin-top: 15px; display: flex;justify-content: space-between;">
7
           <h4 style="float: left">停车场总数</h4>
7
           <h4 style="float: left">停车场总数</h4>
8
           <span style="float: right;color: red">{{viewData.totalPark}}</span>
8
           <span style="float: right;color: red">{{viewData.totalPark}}</span>
9
         </div>
9
         </div>
10
-        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 20px 20px 40px 20px;margin-top: 15px">
10
+        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 10px 20px;margin-top: 15px;display: flex;justify-content: space-between;">
11
           <h4 style="float: left">今日停车记录数</h4>
11
           <h4 style="float: left">今日停车记录数</h4>
12
           <span style="float: right;color: red">{{viewData.totalRecord}}</span>
12
           <span style="float: right;color: red">{{viewData.totalRecord}}</span>
13
         </div>
13
         </div>
14
-        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 20px 20px 40px 20px;margin-top: 15px">
14
+        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 10px 20px;margin-top: 15px;display: flex;justify-content: space-between;">
15
           <h4 style="float: left">今日实收总额</h4>
15
           <h4 style="float: left">今日实收总额</h4>
16
           <span style="float: right;color: red">{{viewData.totalFee || 0}}</span>
16
           <span style="float: right;color: red">{{viewData.totalFee || 0}}</span>
17
         </div>
17
         </div>
18
-        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 20px 20px 40px 20px;margin-top: 15px">
18
+        <div class="box-item" style="border: 2px dotted #757575;border-radius: 5px;padding: 10px 20px;margin-top: 15px;display: flex;justify-content: space-between;">
19
           <h4 style="float: left">日均时长泊位利用率</h4>
19
           <h4 style="float: left">日均时长泊位利用率</h4>
20
           <span style="float: right;color: red">{{viewData.dayBerthRate}}%</span>
20
           <span style="float: right;color: red">{{viewData.dayBerthRate}}%</span>
21
         </div>
21
         </div>
22
       </div>
22
       </div>
23
-      <div class="body-box" style="width: 48%;height:400px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;color: #525252;">
24
-        <h1>停车收入概览</h1>
23
+      <div class="body-box" style="width: 48%;height:300px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;color: #525252;">
24
+        <h3>停车收入概览</h3>
25
         <piechart
25
         <piechart
26
           class="model-pie-body"
26
           class="model-pie-body"
27
           id="chart1"
27
           id="chart1"
28
           :roseType="false"
28
           :roseType="false"
29
           :radiusArr="['30%', '70%']"
29
           :radiusArr="['30%', '70%']"
30
-          :colorArr="modelPieColor"
31
           :labelFormat="['{name|{b}}', '{sub|{d}%}', '{hr|}']"
30
           :labelFormat="['{name|{b}}', '{sub|{d}%}', '{hr|}']"
32
           :dataset="modelData"
31
           :dataset="modelData"
33
           :encode="{ itemName: 'name', value: 'value' }"
32
           :encode="{ itemName: 'name', value: 'value' }"
@@ -35,18 +34,16 @@
35
       </div>
34
       </div>
36
     </div>
35
     </div>
37
     <div style="display: flex; justify-content: space-between;">
36
     <div style="display: flex; justify-content: space-between;">
38
-      <div class="body-box" style="width:98%;height:400px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;margin-top: 20px;color: #525252;">
37
+      <div class="body-box" style="width:98%;height:300px;border-radius: 5px;background-color: #f6f5f5;padding: 20px;margin-top: 20px;color: #525252;">
39
         <h1>停车收入概览</h1>
38
         <h1>停车收入概览</h1>
40
         <barchart
39
         <barchart
41
           class="side-chart"
40
           class="side-chart"
42
           :autoStop="false"
41
           :autoStop="false"
43
-          :colorArr="['#ffd201', '#00eacb', '#01b4ff', '#5d78ff']"
44
           legendIcon="react"
42
           legendIcon="react"
45
-          :bottom="30"
46
-          :xlabelFormat="xLabelFormat"
47
-          :top="60"
43
+          :bottom="50"
44
+          :top="40"
48
           yAxisName="(辆)"
45
           yAxisName="(辆)"
49
-          :tooltip="tooltipFormat"
46
+          :tooltip="false"
50
           :dataset="bardata"
47
           :dataset="bardata"
51
           :encode="[
48
           :encode="[
52
             {x: 'mouth', y: 'hs', seriesName: '停车数量'}]"
49
             {x: 'mouth', y: 'hs', seriesName: '停车数量'}]"
@@ -75,7 +72,6 @@ export default {
75
         totalFee:0,
72
         totalFee:0,
76
         dayBerthRate:0
73
         dayBerthRate:0
77
       },
74
       },
78
-      modelPieColor: ["#4382f6", "#81f878", "#f2ff90", "#FF9800", "#9C27B0"],
79
       modelData: [],
75
       modelData: [],
80
       bardata: [],
76
       bardata: [],
81
     }
77
     }
@@ -124,6 +120,7 @@ export default {
124
 </script>
120
 </script>
125
 <style  lang="scss" scoped>
121
 <style  lang="scss" scoped>
126
 .body-wrapper {
122
 .body-wrapper {
123
+  background: transparent;
127
   .form-wrapper {
124
   .form-wrapper {
128
     .el-form-item {
125
     .el-form-item {
129
       margin-bottom: 0px;
126
       margin-bottom: 0px;