瀏覽代碼

图表样式及部分指标内容修改

Bella 2 年之前
父節點
當前提交
cad9cde1a6

+ 2 - 2
src/components/business/analysis/analysis.vue

@@ -47,13 +47,13 @@ export default {
       oriCoreData: [],
       coreData: [
         {
-          title: "总用量(kWh)",
+          title: "总用量(kWh)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "总用量(㎡)",
+          title: "总用量(㎡)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 1 - 0
src/components/dashboard/more/carbonOverviewChart.vue

@@ -32,6 +32,7 @@ export default {
             nameTextStyle: {
               padding: [10, 0, 10, 20]
             },
+            
           },
         ],
         tooltip: {

+ 1 - 1
src/components/doubleCarbon/PV/charts/carbonPvEmissionChart.vue

@@ -45,7 +45,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO₂e)',
+            name: '排放量(tCO₂e)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 2 - 2
src/components/doubleCarbon/PV/charts/carbonPvQuotaChart.vue

@@ -44,10 +44,10 @@ export default {
           type: 'category',
           data: [],
           axisTick: {
-            show: false
+            show: true
           },
           axisLine: {
-            show: false
+            show: true
           },
           axisLabel: {
             margin: 8,

+ 1 - 1
src/components/doubleCarbon/PV/doubleCarbonPv.vue

@@ -29,7 +29,7 @@ export default {
       ],
       coreData: [
         {
-          title: "光伏累计减排(tCO₂e/年内)",
+          title: "光伏累计减排(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 7 - 1
src/components/doubleCarbon/car/charts/carbonCarEmissionChart.vue

@@ -44,11 +44,17 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO₂e)',
+            name: '排放量(tCO₂e)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]
             },
+            splitLine: {
+              show: false,
+              lineStyle: {
+                color: "#e8e8e8",
+              },
+            },
           },
         ],
         dataZoom: this.$constant.ECHARTS_OPTION_DATAZOOM,

+ 57 - 60
src/components/doubleCarbon/car/charts/carbonCarQuotaChart.vue

@@ -5,20 +5,18 @@ export default {
   data() {
     return {
       option: {
-        color: ['#6DA6F5','#A29DF8'],
+        color: ["#6DA6F5", "#A29DF8"],
         legend: {
-          data: [
-            '车辆排放',
-          ]
+          data: ["车辆排放"],
         },
         grid: {
-          left: '2%', //默认10%
-          right: '8%', //默认10%
-          bottom: '30px', //默认60
-          top: '40px',
-          containLabel: true
+          left: "2%", //默认10%
+          right: "8%", //默认10%
+          bottom: "30px", //默认60
+          top: "40px",
+          containLabel: true,
         },
-        title:[
+        title: [
           {
             subtext: "单位: tCO₂e", //主标题
             right: "0%", //标题的位置 默认是left,其余还有center、right属性
@@ -31,118 +29,117 @@ export default {
           },
         ],
         xAxis: {
-          type: 'value',
+          type: "value",
           nameTextStyle: {
-            padding: [10, 0, 10, -20]
+            padding: [10, 0, 10, -20],
+          },
+          axisLabel: {
+            rotate: "45",
           },
-          axisLabel : {
-            rotate:"45"
-          }
         },
         yAxis: {
-          type: 'category',
+          type: "category",
           data: [],
           axisTick: {
-            show: false
+            show: true,
           },
           axisLine: {
-            show: false
+            show: true,
           },
           axisLabel: {
             margin: 8,
             formatter: function (params) {
               var val = "";
               if (params.length > 4) {
-                val = params.substr(0, 4) + '...';
+                val = params.substr(0, 4) + "...";
                 return val;
               } else {
                 return params;
               }
-            }
+            },
           },
         },
         tooltip: {
-          trigger: 'axis',
+          trigger: "axis",
           axisPointer: {
-            type: 'shadow'
+            type: "shadow",
           },
           textStyle: {
-            color: '#fff',
-            align: 'left',
-            fontSize: 14
+            color: "#fff",
+            align: "left",
+            fontSize: 14,
           },
-          axisLine: {//x坐标轴轴线
+          axisLine: {
+            //x坐标轴轴线
             show: true,
-            lineStyle: {//x坐标轴轴线样式
-              color: '#000',//'#ccc' | 'rgb(128, 128, 128)' | 'rgba(128, 128, 128, 0.5)',设置标签颜色
-            }
+            lineStyle: {
+              //x坐标轴轴线样式
+              color: "#000", //'#ccc' | 'rgb(128, 128, 128)' | 'rgba(128, 128, 128, 0.5)',设置标签颜色
+            },
           },
-          backgroundColor: 'rgba(0,0,0,0.8)',
+          backgroundColor: "rgba(0,0,0,0.8)",
         },
         series: [
           {
-            name: '车辆排放',
+            name: "车辆排放",
             data: [],
-            type: 'bar',
-            barWidth: '30%',
+            type: "bar",
+            barWidth: "30%",
             backgroundStyle: {
-              color: 'rgba(180, 180, 180, 0.2)'
-            }
+              color: "rgba(180, 180, 180, 0.2)",
+            },
           },
-        ]
+        ],
       },
-    }
+    };
   },
   props: {
     height: Number,
-    queryData: Object
+    queryData: Object,
   },
   components: {
-    Card
+    Card,
   },
   mounted() {
-    this.init()
+    this.init();
   },
   methods: {
     init() {
-      let chart = this.$echarts.init(this.$refs.myChart)
+      let chart = this.$echarts.init(this.$refs.myChart);
       this.chart = chart;
       this.$util.chartsResize(this.chart);
-      chart.setOption(this.option)
-      this.getData()
+      chart.setOption(this.option);
+      this.getData();
     },
     getData() {
-      return apiCarbonCar.getVehicleInfoOrder(this.queryData).then(res=>{
+      return apiCarbonCar.getVehicleInfoOrder(this.queryData).then((res) => {
         if (res) {
-          res.sort((a,b)=>{
-            if (a.jsonObject.Vehicle>b.jsonObject.Vehicle) {
+          res.sort((a, b) => {
+            if (a.jsonObject.Vehicle > b.jsonObject.Vehicle) {
               return 1;
             }
             return -1;
-          })
+          });
         }
-        let data = this.$util.dataUtil.covertDataToEcharts(res, ['Vehicle'])
+        let data = this.$util.dataUtil.covertDataToEcharts(res, ["Vehicle"]);
         this.option.yAxis.data = data.label;
         let arr = [];
         for (const key in data) {
-          if (key == 'label'){
+          if (key == "label") {
             continue;
           }
-          arr.push(data[key])
+          arr.push(data[key]);
         }
         for (let i = 0; i < this.option.series.length; i++) {
-          this.option.series[i].data = arr[i]
+          this.option.series[i].data = arr[i];
         }
-        this.chart.setOption(this.option)
-      })
-    }
-  }
-}
+        this.chart.setOption(this.option);
+      });
+    },
+  },
+};
 </script>
 
 <template>
-  <div class="myChart" ref="myChart" :style="{height: height+'px'}">
-
-  </div>
-
+  <div class="myChart" ref="myChart" :style="{ height: height + 'px' }"></div>
 </template>

+ 4 - 4
src/components/doubleCarbon/car/doubleCarbonCar.vue

@@ -35,13 +35,13 @@ export default {
           historyNum: 0
         },
         {
-          title: '车辆总里程(km)',
+          title: '车辆总里程(KM)',
           num: 0,
           historyDesc: '同比',
           historyNum: 0
         },
         {
-          title: '车辆平均里程(km/天)',
+          title: '车辆平均里程(KM/辆)',
           num: 0,
           historyDesc: '同比',
           historyNum: 0
@@ -146,7 +146,7 @@ export default {
       <a-row :gutter="[12,12]">
         <a-col :span="18" >
           <div class="ioc-card-content">
-            <Card title="碳排放量">
+            <Card title="车辆排放分析">
               <div class="doubleCarbon-car-analyse">
                 <CarbonCarEmissionChart :call-back-company-option="callBackCompanyOption" ref="CarbonCarEmissionChart" :query-data="queryData" :height="450"/>
               </div>
@@ -156,7 +156,7 @@ export default {
         </a-col>
         <a-col :span="6">
           <div class="ioc-card-content">
-            <Card title="碳排放分析">
+            <Card title="车辆排放排名">
               <div class="doubleCarbon-car-quota">
                 <CarbonCarQuotaChart ref="CarbonCarQuotaChart" :query-data="queryData" :height="450"/>
               </div>

+ 1 - 1
src/components/doubleCarbon/overview/charts/carbonEmissionChart.vue

@@ -43,7 +43,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO₂e)',
+            name: '排放量(tCO₂e)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 1 - 1
src/components/doubleCarbon/overview/charts/carbonQuotaChart.vue

@@ -48,7 +48,7 @@ export default {
             show: true
           },
           axisLine: {
-            show: false
+            show: true
           },
           axisLabel: {
             margin: 8,

+ 1 - 1
src/components/doubleCarbon/overview/doubleCarbonOverview.vue

@@ -58,7 +58,7 @@ export default {
           historyNum: 0,
         },
         {
-          title: "光伏减排(tCO₂e)",
+          title: "新能源减排(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,

+ 1 - 1
src/components/doubleCarbon/print/charts/carbonPrintEmissionChart.vue

@@ -45,7 +45,7 @@ export default {
         },
         yAxis: [
           {
-            name: '排放量(tCO₂e)',
+            name: '排放量(tCO₂e)',
             type: 'value',
             nameTextStyle: {
               padding: [0, 0, 0, 50]

+ 2 - 2
src/components/doubleCarbon/print/charts/carbonPrintQuotaChart.vue

@@ -44,10 +44,10 @@ export default {
           type: 'category',
           data: [],
           axisTick: {
-            show: false
+            show: true
           },
           axisLine: {
-            show: false
+            show: true
           },
           axisLabel: {
             margin: 8,

+ 5 - 5
src/components/doubleCarbon/print/doubleCarbonPrint.vue

@@ -29,7 +29,7 @@ export default {
       ],
       coreData: [
         {
-          title: "文印累计排放(tCO₂e/)",
+          title: "文印累计排放(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
@@ -41,13 +41,13 @@ export default {
           historyNum: 0,
         },
         {
-          title: "纸张累计消耗(张/人)",
+          title: "纸张累计排放(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
         },
         {
-          title: "墨盒累计消耗(盒/人)",
+          title: "墨盒累计排放(tCO₂e)",
           num: 0,
           historyDesc: "同比",
           historyNum: 0,
@@ -152,7 +152,7 @@ export default {
       <a-row :gutter="[12, 12]">
         <a-col :span="18">
           <div class="ioc-card-content">
-            <Card title="排放分析">
+            <Card title="文印排放分析">
               <div class="doubleCarbon-print-analyse">
                 <CarbonPrintEmissionChart
                   ref="CarbonPrintEmissionChart"
@@ -166,7 +166,7 @@ export default {
         </a-col>
         <a-col :span="6">
           <div class="ioc-card-content">
-            <Card title="碳排放量">
+            <Card title="文印排放排名">
               <div class="doubleCarbon-print-quota">
                 <CarbonPrintQuotaChart
                   ref="CarbonPrintQuotaChart"

+ 4 - 4
src/components/life/supermarket/lifeSupermarket.vue

@@ -20,28 +20,28 @@ export default {
       coreData: [
         {
           type: 0,
-          title: "消费总额(元)",
+          title: "消费总额(元)",
           num: 0,
           historyDesc: "同比",
           historyNum: "0",
         },
         {
           type: 0,
-          title: "交易单数",
+          title: "交易单数(单)",
           num: 0,
           historyDesc: "同比",
           historyNum: "0",
         },
         {
           type: 0,
-          title: "人均消费金额(元)",
+          title: "人均消费金额(元/人)",
           num: 0,
           historyDesc: "同比",
           historyNum: "0",
         },
         {
           type: 0,
-          title: "平均单价(元)",
+          title: "平均单价(元/单)",
           num: 0,
           historyDesc: "环比",
           historyNum: "0",

+ 13 - 3
src/components/scene/meeting/chart/meetingTimeCharts.vue

@@ -18,9 +18,7 @@ export default {
           containLabel: true,
           //grid区域是否包含坐标轴的刻度标签
         },
-        legend:{
-          
-        },
+        legend: {},
         xAxis: {
           type: "category",
           data: [
@@ -45,6 +43,18 @@ export default {
             nameTextStyle: {
               padding: [0, 20, 0, 0],
             },
+            splitLine: {
+              show: true,
+              lineStyle: {
+                color: "#e8e8e8",
+              },
+            },
+            axisLine: {
+              show: true,
+              lineStyle: {
+                color: "#233653",
+              },
+            },
           },
         ],
         tooltip: {