wang_xy пре 1 година
родитељ
комит
6710e3927e
1 измењених фајлова са 21 додато и 113 уклоњено
  1. 21 113
      src/views/zdsz/enginee/material/echarts_statistics/index.vue

+ 21 - 113
src/views/zdsz/enginee/material/echarts_statistics/index.vue

@@ -41,65 +41,7 @@ export default {
       currentMenu:2,   // 0:用料管理 1:进度统计 2:可视化进度
       showSearch:true,
       queryParams:{enginCycle:'0'},
-      option:{
-      backgroundColor: '#feffff',
-        title: {
-          text: '',
-          left: 'center',
-          top: 20,
-          textStyle: {
-            color: '#ccc'
-          }
-        },
-      tooltip: {
-        trigger: 'item'
-      },
-      visualMap: {
-        show: false,
-          min: 80,
-          max: 600,
-          inRange: {
-          colorLightness: [0, 1]
-        }
-      },
-      series: [
-        {
-          name: 'Access From',
-          type: 'pie',
-          radius: '55%',
-          center: ['50%', '50%'],
-          data: [
-            { value: 335, name: 'Direct' },
-            { value: 310, name: 'Email' },
-            { value: 274, name: 'Union Ads' },
-            { value: 235, name: 'Video Ads' },
-            { value: 400, name: 'Search Engine' }
-          ],
-          roseType: 'radius',
-          label: {
-            color: 'rgba(255, 255, 255, 0.3)'
-          },
-          labelLine: {
-            lineStyle: {
-              color: 'rgba(255, 255, 255, 0.3)'
-            },
-            smooth: 0.2,
-            length: 10,
-            length2: 20
-          },
-          itemStyle: {
-            color: '#e81610',
-            shadowBlur: 200,
-            shadowColor: 'rgba(241,9,9,0.5)'
-          },
-          animationType: 'scale',
-          animationEasing: 'elasticOut',
-          animationDelay: function (idx) {
-            return Math.random() * 200;
-          }
-        }
-      ]
-    }
+
     }
   },
   mounted(){
@@ -110,72 +52,38 @@ export default {
     {
       getsumStatus(val).then(res=>{
         let data=[{
-          value: parseInt(res.data.done),name:'完工数量'
+          value: parseInt(res.data.notstart),name:'未施工'
         },{
-          value: parseInt(res.data.notstart),name:'未开工数量'
+          value: parseInt(res.data.willDone),name:'施工中'
         },{
-          value: parseInt(res.data.willDone),name:'未完工数量'
-        }
-        ]
+          value: parseInt(res.data.done),name:'竣工'
+        }]
+        let color = ['#FFC881', '#5DB3FF', '#80D9AE'];
         let  option={
-          backgroundColor: '#feffff',
-          legend: {
-            top: '5%',
-            left: 'center'
-          },
-          title: {
-            text: '',
-            left: 'center',
-            top: 20,
-            textStyle: {
-              color: '#dc0e0e'
-            }
-          },
           tooltip: {
             trigger: 'item'
           },
-          visualMap: {
-            show: false,
-            min: 0,
-            max: 800000,
-            inRange: {
-              colorLightness: [0, 1]
-            }
+          legend: {
+            top: '5%',
+            left: 'center'
           },
+          color: color,
           series: [
             {
               name: '',
               type: 'pie',
-              radius: '55%',
-              center: ['50%', '50%'],
-              data: data.sort(function (a, b) {
-                return a.value - b.value;
-              }),
-              roseType: 'radius',
-              label: {
-                color: 'rgb(1,11,17)'
-              },
-              labelLine: {
-                lineStyle: {
-                  color: 'rgb(32,155,229)'
-                },
-                smooth: 0.2,
-                length: 10,
-                length2: 20
-              },
-              itemStyle: {
-                color: '#98201d',
-                shadowBlur: 200,
-                shadowColor: 'rgb(254,255,255)'
-              },
-              animationType: 'scale',
-              animationEasing: 'elasticOut',
-              animationDelay: function (idx) {
-          return Math.random() * 200;
+              radius: '50%',
+              data: data,
+              emphasis: {
+                itemStyle: {
+                  shadowBlur: 10,
+                  shadowOffsetX: 0,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              }
+            }
+          ]
         }
-      }
-      ]
-      }
         this.initmian(option)
       })
     },