mzr 5 年 前
コミット
a787aa5364

+ 78 - 43
src/views/index/components/communication/index.vue

@@ -2,7 +2,7 @@
  * @Author: WangQiBiao
  * @Date: 2019-09-25 14:10:08
  * @LastEditors: MoZhuangRu
- * @LastEditTime: 2020-01-16 11:43:01
+ * @LastEditTime: 2020-01-17 14:14:02
  * @Description: 在线沟通
  -->
 <template>
@@ -169,52 +169,87 @@ export default {
     createSatisfactionMap () {
       var myChart = echarts.init(document.getElementById('satisfaction'))
       var option = {
-        // backgroundColor: '#2c343b',
+        // this.reportServiceScore
+        name: '仪表盘',
+        grid: {
+          top: '0px',
+          bottom: '5px',
+          left: '0px',
+          right: '0px'
+        },
+        title: {
+          show: true,
+          text: [`{titleBg|满意度}`],
+          left: 'center',
+          bottom: '0',
+          textStyle: {
+            rich: {
+              titleBg: {
+                backgroundColor: '#14223C',
+                borderRadius: 4,
+                height: 20,
+                width: 50,
+                color: '#01DFFC',
+                fontSize: 12
+              }
+            }
+          }
+        },
         series: [
           {
-            name: '满意度',
-            hoverAnimation: false,
-            type: 'pie',
-            radius: ['70%', '100%'],
-            label: {
-              normal: {
-                formatter: '{a|{a}}\n{b|{b}}',
-                fontSize: 10,
-                lineHeight: 14,
-                position: 'center',
-                rich: {
-                  a: {
-                    color: '#02D3EF',
-                    fontSize: 10
-                  },
-                  b: {
-                    color: '#02D3EF',
-                    fontSize: 14
-                  }
-                }
+            type: 'gauge',
+            radius: '100%',
+            axisLine: {
+              show: true,
+              lineStyle: {
+                width: 12,
+                color: [
+                  [
+                    ((this.reportServiceScore) / 100).toFixed(1), new echarts.graphic.LinearGradient(0, 0, 1, 0, [
+                      {
+                        offset: 0,
+                        color: '#43D3C7'
+                      },
+                      {
+                        offset: 1,
+                        color: '#2D32F0'
+                      }
+                    ])
+                  ],
+                  [
+                    1, '#182743'
+                  ]
+                ]
               }
             },
-            data: [
-              {
-                value: this.reportServiceScore,
-                name: `${this.reportServiceScore}%`,
-                itemStyle: {
-                  color: new echarts.graphic.LinearGradient(
-                    0, 0, 0, 1,
-                    [
-                      { offset: 0, color: '#43D3C7' },
-                      { offset: 1, color: '#2D32F0' }
-                    ]
-                  )
-                }
-              },
-              {
-                value: 100 - this.reportServiceScore,
-                itemStyle: {
-                  color: '#182743'
-                }
-              }
-            ]
+            splitLine: {
+              show: false
+            },
+            axisTick: {
+              show: false
+            },
+            axisLabel: {
+              show: false
+            },
+            pointer: {
+              show: false
+            },
+            title: {
+              offsetCenter: [0, '20%'],
+              fontSize: 12,
+              fontFamily: 'Microsoft YaHei',
+              fontWeight: '400',
+              color: '#5774A2'
+            },
+            detail: {
+              formatter: `${this.reportServiceScore}%`,
+              offsetCenter: [0, 0],
+              fontSize: 20,
+              fontFamily: 'DS-Digital',
+              fontWeight: 'bold',
+              color: '#00D2ED'
+            },
+            data: [{ value: 0, name: '' }]
           }
         ]
       }

+ 1 - 0
src/views/index/components/income/index.scss

@@ -56,6 +56,7 @@
     width: 100%;
     height: halfH(200);
     margin: auto;
+    border-top: 1px dashed #132A50;
   }
   .progress{
     .desc{

+ 2 - 2
src/views/index/components/income/index.vue

@@ -2,7 +2,7 @@
  * @Author: WangQiBiao
  * @Date: 2019-09-26 10:57:30
  * @LastEditors: MoZhuangRu
- * @LastEditTime: 2020-01-16 14:36:06
+ * @LastEditTime: 2020-01-17 11:53:32
  * @Description: 收入统计
  -->
 <template>
@@ -20,7 +20,7 @@
     <div class="panel b3">
       <div class="panel-icon"></div>
       <div class="panel-txt">线上</div>
-      <div class="panel-desc">¥{{billSum.billOnline | moneyFormat}}</div>
+      <div class="panel-desc">¥{{billSum.billOnlineSum | moneyFormat}}</div>
     </div>
     <div class="map" id="mapId"></div>
     <div class="progress">