瀏覽代碼

Merge branch 'master' of http://172.16.90.201:3000/castgroup_forest/castgroup_bigscreen

wangcc 2 年之前
父節點
當前提交
05ea720ef9

+ 2 - 2
src/assets/scss/common.scss

@@ -117,7 +117,7 @@ body {
         position: relative;
         margin-left: auto;
         background-color: rgba(1,33,35,.7);
-        width: 20vw;
+        width: 380px;
         // border-radius: 8px;
         overflow: hidden;
         padding-top: 15px;
@@ -163,7 +163,7 @@ body {
 }
 .xiaoban{
     margin: 20px 0;
-    width: 20vw;
+    width: 380px;
     margin-left: auto;
     color: var(--main-color);
      .el-input .el-input__inner{

+ 2 - 2
src/components/header.vue

@@ -3,7 +3,7 @@
  * @Author: wangcc
  * @Date: 2022-06-14 18:11:54
  * @LastEditors: gcz
- * @LastEditTime: 2022-06-30 09:24:07
+ * @LastEditTime: 2022-07-01 09:45:10
  * @FilePath: \castgroup_bigscreen\src\components\header.vue
  * @Copyright: Copyright (c) 2016~2022 by wangcc, All Rights Reserved. 
 -->
@@ -119,7 +119,7 @@ import timeFormat from '@/utils/timeFormat'
     top: 20px;
     text-align: center;
     letter-spacing: 1px;
-    font-size: 40px;
+    font-size: 35px;
     text-indent: -0.8em;
     text-shadow: 0 2px #04213b;
   }

+ 13 - 4
src/dataSchema/page2Char2Schema.js

@@ -5,7 +5,7 @@
 import themeColor from "./color"
 let page2Char2Schema = {
     title: {
-        text: '树种分布统计',
+        text: '树种蓄积统计',
         textStyle: {
             color: themeColor.mainColor,
         },
@@ -92,7 +92,10 @@ let page2Char2Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [1, 1, 1, 2, 2, 1, 0]
+            data: [1, 1, 1, 2, 2, 1, 0],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(2, 238, 255)" },
+            }
         },
         {
             name: '马尾松',
@@ -104,7 +107,10 @@ let page2Char2Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [1, 8, 8, 2, 6, 9, 9]
+            data: [1, 8, 8, 2, 6, 9, 9],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(94, 229, 116)" },
+            }
         },
         {
             name: '杉树',
@@ -116,7 +122,10 @@ let page2Char2Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [8, 1, 1, 6, 2, 0, 1]
+            data: [8, 1, 1, 6, 2, 0, 1],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(255, 255, 0)" },
+            }
         }
     ]
 

+ 13 - 4
src/dataSchema/page2Char3Schema.js

@@ -5,7 +5,7 @@
 import themeColor from "./color"
 let page6Char1Schema = {
     title: {
-        text: '树种株数统计',
+        text: '树种株数统计(株)',
         textStyle: {
             color: themeColor.mainColor,
         },
@@ -93,7 +93,10 @@ let page6Char1Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [1, 1, 1, 2, 2, 1, 0]
+            data: [1, 1, 1, 2, 2, 1, 0],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(2, 238, 255)" },
+            }
         },
         {
             name: '乱砍乱伐',
@@ -105,7 +108,10 @@ let page6Char1Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [1, 8, 8, 2, 6, 9, 9]
+            data: [1, 8, 8, 2, 6, 9, 9],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(94, 229, 116)" },
+            }
         },
         {
             name: '火灾',
@@ -117,7 +123,10 @@ let page6Char1Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [8, 1, 1, 6, 2, 0, 1]
+            data: [8, 1, 1, 6, 2, 0, 1],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(255, 255, 0)" },
+            }
         }
     ]
 

+ 11 - 5
src/dataSchema/page6Char1Schema.js

@@ -93,9 +93,9 @@ let page6Char1Schema = {
                 focus: 'series'
             },
             data: [1, 1, 1, 2, 2, 1, 0],
-            // itemStyle: {//自定义颜色
-            //     normal: { color: "rgb(2, 238, 255)" },
-            // }
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(2, 238, 255)" },
+            }
         },
         {
             name: '乱砍乱伐',
@@ -107,7 +107,10 @@ let page6Char1Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [1, 8, 8, 2, 6, 9, 9]
+            data: [1, 8, 8, 2, 6, 9, 9],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(94, 229, 116)" },
+            }
         },
         {
             name: '火灾',
@@ -119,7 +122,10 @@ let page6Char1Schema = {
             emphasis: {
                 focus: 'series'
             },
-            data: [8, 1, 1, 6, 2, 0, 1]
+            data: [8, 1, 1, 6, 2, 0, 1],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(255, 255, 0)" },
+            }
         }
     ]
 

+ 12 - 3
src/dataSchema/page6Char2Schema.js

@@ -57,19 +57,28 @@ let page6Char2Schema = {
             name: '病虫害',
             type: 'line',
             stack: 'Total',
-            data: [120, 132, 101, 134, 90, 230, 210, 132, 101, 134, 90, 230]
+            data: [120, 132, 101, 134, 90, 230, 210, 132, 101, 134, 90, 230],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(2, 238, 255)" },
+            }
         },
         {
             name: '火灾',
             type: 'line',
             stack: 'Total',
-            data: [220, 182, 191, 234, 290, 330, 310, 132, 101, 134, 90, 230]
+            data: [220, 182, 191, 234, 290, 330, 310, 132, 101, 134, 90, 230],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(94, 229, 116)" },
+            }
         },
         {
             name: '乱砍滥伐',
             type: 'line',
             stack: 'Total',
-            data: [150, 232, 201, 154, 190, 330, 410, 132, 101, 134, 90, 230]
+            data: [150, 232, 201, 154, 190, 330, 410, 132, 101, 134, 90, 230],
+            itemStyle: {//自定义颜色
+                normal: { color: "rgb(255, 255, 0)" },
+            }
         }
     ]
 }

+ 15 - 6
src/views/index.vue

@@ -167,6 +167,9 @@ import page5Char2Schema from '../dataSchema/page5Char2Schema';
 import page6Char1Schema from '../dataSchema/page6Char1Schema';
 import page6Char2Schema from '../dataSchema/page6Char2Schema';
 
+//柱状图颜色
+let colorArr = ['rgb(2, 238, 255)','rgb(94, 229, 116)','rgb(255, 255, 0)'];
+
 // import { provinceAndCityData, regionData, provinceAndCityDataPlus, regionDataPlus, CodeToText, TextToCode } from 'element-china-area-data';
 export default {
   name: '',
@@ -500,7 +503,7 @@ export default {
             obj[next.name] ? '' : (obj[next.name] = true && newArr.push(next));
             return newArr;
           }, []);
-          seriesList = seriesList.map((item) => {
+          seriesList = seriesList.map((item,index	) => {
             return {
               name: item.name,
               type: 'bar',
@@ -511,7 +514,10 @@ export default {
               emphasis: {
                 focus: 'series'
               },
-              data: []
+              data: [],
+              itemStyle: {
+                normal: { color: colorArr[index]||"auto" },
+              }
             };
           });
           // console.log(seriesList)
@@ -526,7 +532,7 @@ export default {
               seriesList[index].data.push(num);
             });
           });
-          // console.log(seriesList)
+          // console.log('page2echarts02 seriesList',seriesList)
           this.page2Char2.series = seriesList;
 
           //数量过小时隐藏滚动
@@ -561,7 +567,7 @@ export default {
           // console.log(rows)
           // x坐标
           this.page2Char3.xAxis.data = rows.map((item) => {
-            return item.areaName;
+            return item.smallNumber;
           });
           // console.log('x坐标',  this.page2Char2.xAxis.data)
           // 获取所有项
@@ -576,7 +582,7 @@ export default {
             obj[next.name] ? '' : (obj[next.name] = true && newArr.push(next));
             return newArr;
           }, []);
-          seriesList = seriesList.map((item) => {
+          seriesList = seriesList.map((item,index) => {
             return {
               name: item.name,
               type: 'bar',
@@ -587,7 +593,10 @@ export default {
               emphasis: {
                 focus: 'series'
               },
-              data: []
+              data: [],
+              itemStyle: {
+                normal: { color: colorArr[index]||"auto" },
+              }
             };
           });
           // console.log(seriesList)