yuhao пре 2 година
родитељ
комит
8490b13224

+ 1 - 1
src/views/index.vue

@@ -89,7 +89,7 @@
89 89
       <cardExpend v-if="listData" :listData="listData"></cardExpend>
90 90
     </div>
91 91
     <div class="echarts">
92
-      <productData v-if="listData" :listData="listData"></productData>
92
+      <productData v-if="listData" :listData="listData" style="overflow-y: scroll"></productData>
93 93
     </div>
94 94
     <div class="echarts">
95 95
       <productRatio

+ 11 - 5
src/views/manage/manage.vue

@@ -22,8 +22,8 @@ export default {
22 22
       //   经营数据
23 23
       const option = {
24 24
         grid: {
25
-    left:40
26
-},
25
+          left: 60,
26
+        },
27 27
         title: {
28 28
           text: "经营数据金额",
29 29
           left: "center",
@@ -33,7 +33,13 @@ export default {
33 33
         },
34 34
         xAxis: {
35 35
           type: "category",
36
-          data: ["收入金额", "项目付费金额", "次卡付费金额", "美妆收入金额", "充值收入金额"],
36
+          data: [
37
+            "收入金额",
38
+            "项目付费金额",
39
+            "次卡付费金额",
40
+            "美妆收入金额",
41
+            "充值收入金额",
42
+          ],
37 43
           axisLabel: { interval: 0, rotate: 30 },
38 44
         },
39 45
         yAxis: {
@@ -67,12 +73,12 @@ export default {
67 73
       };
68 74
       //数据绑定到表格
69 75
       myChart.setOption(option);
70
-            window.addEventListener("resize", function () {
76
+      window.addEventListener("resize", function () {
71 77
         myChart.resize(); //myChart指自己定义的echartsDom对象
72 78
       });
73 79
     },
74 80
   },
75
-    // 监听父组件传过来的值的变化
81
+  // 监听父组件传过来的值的变化
76 82
   watch: {
77 83
     listData: {
78 84
       handler(val) {

+ 17 - 41
src/views/productData/productData.vue

@@ -17,8 +17,7 @@ export default {
17 17
       const myChart = this.$echarts.init(this.$refs.MapMountNode);
18 18
       //设置图表属性
19 19
       //   经营数据
20
-      const option = {
21
-        color: ["#91cc75"],
20
+            const option = {
22 21
         title: {
23 22
           text: "产品数据",
24 23
           left: "center",
@@ -26,45 +25,31 @@ export default {
26 25
           //   color: "#6d767e",
27 26
           // },
28 27
         },
29
-        tooltip: {
30
-          trigger: "axis",
31
-          axisPointer: {
32
-            type: "shadow",
33
-          },
34
-        },
28
+
35 29
         grid: {
36
-          left: "3%",
37
-          right: "4%",
38
-          bottom: "3%",
39
-          containLabel: true,
30
+          left: 60,
31
+        },
32
+        xAxis: {
33
+          type: "category",
34
+ data: ["购买订单数", "购买人数", "购买金额"],
35
+          axisLabel: { interval: 0, rotate: 30 },
36
+        },
37
+        yAxis: {
38
+          type: "value",
40 39
         },
41
-        xAxis: [
42
-          {
43
-            type: "value",
44
-          },
45
-        ],
46
-        yAxis: [
47
-          {
48
-            type: "category",
49
-            axisTick: {
50
-              show: false,
51
-            },
52
-            data: ["购买订单数", "购买人数", "购买金额"],
53
-          },
54
-        ],
55 40
         series: [
56 41
           {
57
-            name: "数量",
42
+            data: [
43
+              this.listData.product_data.order,
44
+              this.listData.product_data.people,
45
+              this.listData.product_data.money,
46
+            ],
58 47
             type: "bar",
59
-            label: {
60
-              show: true,
61
-              position: "inside",
62
-            },
63 48
             itemStyle: {
64 49
               normal: {
65 50
                 label: {
66 51
                   show: true, //开启显示数值
67
-                  position: "right", //数值在上方显示
52
+                  position: "top", //数值在上方显示
68 53
                   textStyle: {
69 54
                     //数值样式
70 55
                     color: "#9b9ca2", //字体颜色
@@ -73,18 +58,9 @@ export default {
73 58
                 },
74 59
               },
75 60
             },
76
-            emphasis: {
77
-              focus: "series",
78
-            },
79
-            data: [
80
-              this.listData.product_data.order,
81
-              this.listData.product_data.people,
82
-              this.listData.product_data.money,
83
-            ],
84 61
           },
85 62
         ],
86 63
       };
87
-
88 64
       //数据绑定到表格
89 65
       myChart.setOption(option);
90 66
       window.addEventListener("resize", function () {

+ 1 - 1
src/views/projectData/projectData.vue

@@ -27,7 +27,7 @@ export default {
27 27
         },
28 28
 
29 29
         grid: {
30
-          left: 40,
30
+          left: 60,
31 31
         },
32 32
         xAxis: {
33 33
           type: "category",