Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	echarts-screen/package.json
#	echarts-screen/src/components/RoseCon.vue
WENM 4 anni fa
parent
commit
03f83887e4

+ 16 - 2
echarts-screen/package-lock.json

@@ -7339,8 +7339,7 @@
     "lodash": {
       "version": "4.17.15",
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
-      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
-      "dev": true
+      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
     },
     "lodash.defaultsdeep": {
       "version": "4.6.1",
@@ -9986,6 +9985,11 @@
       "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
       "dev": true
     },
+    "resize-detector": {
+      "version": "0.1.10",
+      "resolved": "https://registry.npmjs.org/resize-detector/-/resize-detector-0.1.10.tgz",
+      "integrity": "sha512-iLcXC8A6Fb0DfA+TRiywrK/0A22bFqkhntjMJMEzXDA4XkcEkfwpNbv7W8iewUiD0xYIaeiXOfiEehTqGKsUFw=="
+    },
     "resolve": {
       "version": "1.17.0",
       "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
@@ -11906,6 +11910,16 @@
       "integrity": "sha512-6R4OVBVNtQTlcbXu6SJ8ENR35M2/CdWt3Jmv57jOUM+1ojiFmjVGvZPH8DfHpMDSA+ITs+EW5V6qthADxeyYOQ==",
       "dev": true
     },
+    "vue-echarts": {
+      "version": "5.0.0-beta.0",
+      "resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-5.0.0-beta.0.tgz",
+      "integrity": "sha512-QZFKGXDAYFQo+F20REpzcdLx79nsl4kOorJRpN+08aYq4YiIlmtWss1Lxadm7Fo+NYyWm8nnT+h4xHv3uqWIDQ==",
+      "requires": {
+        "core-js": "^3.4.4",
+        "lodash": "^4.17.15",
+        "resize-detector": "^0.1.10"
+      }
+    },
     "vue-eslint-parser": {
       "version": "7.0.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.0.0.tgz",

+ 0 - 1
echarts-screen/package.json

@@ -9,7 +9,6 @@
   "dependencies": {
     "core-js": "^3.6.4",
     "vue": "^2.6.11",
-    "vue-fullscreen": "^2.1.6",
     "vue-router": "^3.1.6",
     "vue-seamless-scroll": "^1.1.21",
     "vuex": "^3.2.0"

+ 9 - 8
echarts-screen/public/index.html

@@ -1,20 +1,21 @@
 <!DOCTYPE html>
 <html lang="en">
 <head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-  <title><%= htmlWebpackPlugin.options.title %></title>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= htmlWebpackPlugin.options.title %></title>
 </head>
 <body>
-<!--    <script src="//cdn.bootcdn.net/ajax/libs/jquery/1.10.2/jquery.min.js"></script>-->
+<script src="//cdn.bootcdn.net/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
 <script src="//cdn.bootcdn.net/ajax/libs/echarts/4.7.0/echarts.min.js"></script>
 <script src="//www.echartsjs.com/zh/dist/echarts-gl.min.js"></script>
 <script src="//www.echartsjs.com/resource/echarts-liquidfill-latest/dist/echarts-liquidfill.min.js"></script>
-    <script src="//cdn.bootcdn.net/ajax/libs/axios/0.19.0/axios.min.js"></script>
+<script src="//cdn.bootcdn.net/ajax/libs/axios/0.19.0/axios.min.js"></script>
 <noscript>
-  <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
+        Please enable it to continue.</strong>
 </noscript>
 <div id="app"></div>
 <!-- built files will be auto injected -->

+ 168 - 0
echarts-screen/src/components/Newly.vue

@@ -0,0 +1,168 @@
+<!--
+ 描述: 发展历程
+ 作者: Jack Chen
+ 日期: 2020-05-09
+-->
+
+<template>
+  <div class="Newly-container">
+    <div class="tabs"> 
+      <ul class="tab-tilte">
+        <li v-for="(itemTit, index) in tabTitle" @mouseover="handleMouseOver(index)" @mouseout="handleMouseOut(index)" :class="{active: cur == index}">
+          {{ itemTit }}
+        </li>
+      </ul>
+      <div class="indicatorDots">
+        <span :class="{active: cur == i}" v-for="(v, i) in tabTitle" :key="i"></span>
+      </div>
+      <div class="tab-content">
+        <div v-for="(itemCon, index) in tabCon" v-show="cur == index">
+          <div v-for="(v, i) in itemCon" :key="i" class="content">
+            {{ v }}
+          </div>
+        </div>
+      </div>
+    </div>   
+  </div>
+</template>
+
+<script>
+export default {
+  name: "Newly",
+  data() {
+    return {
+      timer: null,
+      // tabTitle: ['2015', '2016', '2017', '2018', '2019', '2020'],
+      tabTitle: ['2019.12', '2020.1', '2020.2', '2020.4', '2020.6', '2020.7'],
+      tabCon: [
+        [
+          '2019年12月底,湖北省武汉市疾控中心监测发现不明原因肺炎病例。',
+          '2019.12.30,武汉市卫生健康委向辖区医疗机构发布《关于做好不明原因肺炎救治工作的紧急通知》。',
+          '2019.12.31,国家卫生健康委员会凌晨作出安排部署。派出工作组、专家组赶赴武汉市,指导做好疫情处置工作,开展现场调查。'
+        ],
+        [
+          '2020.1.1,国家卫健委成立疫情应对处置领导小组。',
+          '2020.1.11,国家疾控中心向武汉提供PCR检测试剂,用于对武汉疑似病例的检测、诊断。',
+          '2020.1.22,鉴于疫情迅速蔓延,防控工作面临严峻挑战,习近平明确要求湖北省对人员外流实施全面严格管控。'
+        ],
+        [
+          '2020.2.2,武汉首座用于集中收治新型冠状病毒感染肺炎患者的专科医院——火神山医院,正式交付解放军支援湖北医疗队。',
+          '2020.2.20,国家医保局医药管理司司长熊先军说,目前,全国所有专职医疗机构都纳入定点,雷神山、火神山医院救治费用全部报销。',
+        ],
+        [
+          '2020.4.3,国务院公告:2020年4月4日举行全国性哀悼活动。',
+          '2020.4.15,习近平总书记主持召开中央政治局常委会会议,听取疫情防控工作和当前经济形势的汇报。',
+          '2020.4.27,湖北省、武汉市疫情防控已由应急性超常规防控向常态化防控转变。'
+        ],
+        [
+          '2020.6.4,经国家专家组评估确认,三名患者均达到出院标准,武汉在院新冠肺炎患者再次清零。',
+          '2020.6.15,北京又有12地升级为疫情中风险,所有社区进入一级工作状态。',
+          '2020.6.22,截至目前,北京已有39个中风险地区。',
+        ],
+        [
+          '2020.7.7,北京新发地集中隔离人员今起分批解除隔离。',
+          '2020.7.20,北京应急响应下调为三级,北京中风险地区清零。',
+          '2020.7.30,大连号召全民抗疫参战,大连新增本土病例8例,新疆新增本土病例31例。'
+        ]
+      ],
+      cur: 0, //默认选中第一个tab
+    }
+  },
+  mounted() {
+    this.getTimer();
+  },
+  methods: {
+    getTimer() {
+      this.timer = setInterval(() => {
+        this.cur++;
+        if (this.cur == this.tabTitle.length) {
+          this.cur = 0;
+        }
+      }, 2000)
+    },
+    handleMouseOver(index) {
+      this.cur = index;
+      clearInterval(this.timer);
+    },
+    handleMouseOut(index) {
+      this.getTimer();
+    }
+  },
+  beforeDestroy() {
+    clearInterval(this.timer);
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.Newly-container {
+  margin: 0 0.125rem;
+  .tabs {
+    display: flex;
+    .tab-tilte {
+      li {
+        color: #fff;
+        background-color: rgba(36, 196, 255, 0.5);
+        text-align: center;
+        cursor: pointer;
+        width: 1.0rem;
+        height: 0.35rem;
+        line-height: 0.35rem;
+        margin-bottom: 0.175rem;
+        -webkit-border-radius: 5px;
+        -ms-border-radius: 5px;
+        -o-border-radius: 5px;
+        -moz-border-radius: 5px;
+        border-radius: 5px;
+        &.active{
+          background: linear-gradient(to right, #1b81bc, 20%, #24c4ff);
+          color: #fff;
+        }
+      }
+    }
+    .indicatorDots {
+      background-color: rgba(36, 196, 255, 0.5);
+      width: 1px;
+      height: 2.8rem;
+      margin: 0.0625rem 0 0 0.375rem;
+      span {
+        display: block;
+        height: 0.525rem;
+        margin-left: -0.0875rem;
+        &:after {
+          content: '';
+          display: block;
+          width: 0.125rem;
+          height: 0.125rem;
+          background: #ddd;
+          -webkit-border-radius: 50%;
+          -ms-border-radius: 50%;
+          -o-border-radius: 50%;
+          -moz-border-radius: 50%;
+          border-radius: 50%;
+          border: 2px solid #1b81bc;
+        }
+        &.active {
+          &:after {
+            background: #24c4ff;
+            -webkit-box-shadow: 0 0 0.125rem #1b81bc;
+            box-shadow: 0 0 0.125rem #1b81bc;
+          }
+        }
+      }
+    }
+    .tab-content {
+      display: flex;
+      align-items: center;
+      div {
+        margin-left: 0.1875rem;
+        color: #fff;
+        .content {
+          line-height: 0.275rem;
+          padding: 0.125rem 0;
+        }
+      }
+    }
+  }
+}
+</style>

+ 204 - 0
echarts-screen/src/components/RoseCon.vue

@@ -0,0 +1,204 @@
+<template>
+  <div class="RoseCon-container">
+    <div class="chart" id="chart_right2"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "RoseCon",
+  data() {
+    return {
+
+    }
+  },
+  mounted() {
+    this.getEchartRight2();
+  },
+  methods: {
+    getEchartRight2() {
+      let myChart = echarts.init(document.getElementById('chart_right2'));
+      let option = {
+        color: ['#EAEA26', '#906BF9', '#FE5656', '#01E17E', '#3DD1F9', '#FFAD05', '#4465fc'],
+        tooltip: {
+          trigger: 'item',
+          formatter: '{b} : {c} ({d}%)'
+        },
+        polar: {},
+        angleAxis: {
+          interval: 1,
+          type: 'category',
+          data: [],
+          z: 10,
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: '#0B4A6B',
+              width: 5,
+              type: 'solid'
+            },
+          },
+          axisLabel: {
+            interval: 0,
+            show: true,
+            color: '#0B4A6B',
+            margin: 8,
+            fontSize: 16
+          },
+        },
+        radiusAxis: {
+          min: 40,
+          max: 120,
+          interval: 20,
+          axisLine: {
+            show: false,
+            lineStyle: {
+              color: '#0B3E5E',
+              width: 1,
+              type: 'solid'
+            },
+          },
+          axisLabel: {
+            formatter: '{value} %',
+            show: false,
+            padding: [0, 0, 20, 0],
+            color: '#0B3E5E',
+            fontSize: 16
+          },
+          splitLine: {
+            lineStyle: {
+              color: '#0B3E5E',
+              width: 2,
+              type: "solid"
+            }
+          }
+        },
+        calculable: true,
+        series: [{
+          type: 'pie',
+          radius: ['6%', '10%'],
+          hoverAnimation: false,
+          labelLine: {
+            normal: {
+              show: false,
+              length: 30,
+              length2: 50
+            },
+            emphasis: {
+              show: false
+            }
+          },
+          tooltip: {
+            show: false
+          },
+          data: [{
+            name: '',
+            value: 0,
+            itemStyle: {
+              normal: {
+                color: '#0B4A6B'
+              }
+            }
+          }]
+        }, {
+          type: 'pie',
+          radius: ['90%', '95%'],
+          hoverAnimation: false,
+          labelLine: {
+            normal: {
+              show: false,
+              length: 30,
+              length2: 50
+            },
+            emphasis: {
+              show: false
+            }
+          },
+          tooltip: {
+            show: false
+          },
+          data: [{
+            name: '',
+            value: 0,
+            itemStyle: {
+              normal: {
+                color: '#0B4A6B'
+              }
+            }
+          }]
+        },{
+          stack: 'a',
+          type: 'pie',
+          radius: ['20%', '80%'],
+          roseType: 'area',
+          zlevel: 10,
+          label: {
+            normal: {
+              show: true,
+              formatter: '{b}',
+              textStyle: {
+                fontSize: 12,
+              },
+              position: 'outside'
+            },
+            emphasis: {
+              show: false
+            }
+          },
+          labelLine: {
+            normal: {
+              show: true,
+              length: 15,
+              length2: 50,
+              lineStyle: {
+                type: 'dotted'
+              }
+            },
+            emphasis: {
+              show: true
+            }
+          },
+          data: [{
+            value: 1173,
+            name: '香港'
+          },{
+            value: 131,
+            name: '台湾'
+          },{
+            value: 108,
+            name: '上海'
+          },{
+            value: 41,
+            name: '广东'
+          },{
+            value: 36,
+            name: '四川'
+          },{
+            value: 22,
+            name: '福建'
+          },{
+            value: 20,
+            name: '内蒙古'
+          }]
+        }]
+      }
+
+      myChart.setOption(option, true);
+      window.addEventListener('resize', () => {
+        myChart.resize();
+      });
+    },
+  },
+  beforeDestroy() {
+
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.RoseCon-container {
+  .chart {
+    height: 3rem;
+  }
+}
+</style>

+ 241 - 0
echarts-screen/src/components/TrendCon.vue

@@ -0,0 +1,241 @@
+
+<template>
+  <div class="TrendCon-container">
+    <div class="chart" id="chart_left3"></div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "TrendCon",
+  data() {
+    return {
+
+    }
+  },
+  mounted() {
+    this.getEchartLeft3();
+  },
+  methods: {
+    getEchartLeft3() {
+      let myChart = echarts.init(document.getElementById('chart_left3'));
+      let dataC1 =[2630, 16402,26343,38874,43352,55475,22263,19097,1872,140,1836,936,];
+      let dataC2 =[5794, 21558,24702,16067,2358,5206,502,421,62,7,1,1,]
+      let dataC3 =[2761, 17238,28060,44730,78630,75993,80813,80904,83824,84507,87457,90271,]
+
+      var xData = function() {
+        var data = [];
+        for (var i = 1; i < 12; i++) {
+          data.push(i + "月");
+        }
+        return data;
+      }();
+
+      // for(var i = 0;i<xData.length;i++){
+      //   dataC1.splice(i,1,{name:xData[i],value:dataC1[i]});
+      //   dataC2.splice(i,1,{name:xData[i],value:dataC2[i]});
+      //   dataC3.splice(i,1,{name:xData[i],value:dataC3[i]});
+      // }
+      // console.log(dataC1);
+      // console.log(dataC2);
+      // console.log(dataC3);
+
+      var fontColor = '#30eee9';
+      let option = {
+        backgroundColor: '#11183c',
+        grid: {
+          left: '5%',
+          right: '2%',
+          top: '10%',
+          bottom: '15%',
+          containLabel: true
+        },
+        tooltip: {
+          trigger: 'axis',
+          axisPointer: {
+            type: 'shadow',
+            lineStyle: {
+              color: '#57617B'
+            }
+          }
+        },
+        legend: {
+          data: ['现有确诊', '现有疑似', '累计确诊'],
+          itemWidth: 20,
+          itemHeight: 10,
+          textStyle: {
+            fontSize: 14,
+            color: '#65aaf1',
+          },
+          right: '35%', //距离右侧
+          top: "5%"
+          // left : '50%'
+        },
+        xAxis: [{
+          type: 'category',
+          boundaryGap: false,
+          axisLabel: {
+            color: '#65aaf1'
+          },
+          axisLine: {
+            show: true,
+            lineStyle: {
+              color: '#0a2b52',
+              width: 1
+            }
+          },
+          /*axisTick:{
+                  show:false,
+                },
+                splitLine:{
+                  show:true,
+                  lineStyle:{
+                    color:'#195384'
+                  }
+              },*/
+          data:xData
+        }],
+        yAxis: [{
+          type: 'value',
+          // name: 'kw/h',
+          min: 0,
+          max: 150000,
+          interval: 20000,
+          nameTextStyle: {
+            color: '#65aaf1',
+            fontStyle: 'normal'
+          },
+          axisLabel: {
+            formatter: '{value}',
+            textStyle: {
+              color: '#65aaf1'
+            }
+          },
+          axisLine: {
+            lineStyle: {
+              color: '#0a2b52'
+            }
+          },
+          splitLine: {
+            show: true,
+            lineStyle: {
+              color: '#0a2b52',
+              width: 1,
+              type: 'solid'
+            }
+          }
+        }],
+        series: [{
+          name: '现有确诊',
+          type: 'line',
+          stack: '总量',
+          symbol: 'circle',
+          showSymbol: false,
+          symbolSize: 8,
+          itemStyle: {
+            normal: {
+              color: '#0092f6',
+              lineStyle: {
+                color: "#0092f6",
+                width: 1
+              },
+              areaStyle: {
+                //color: '#94C9EC'
+                color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
+                  offset: 0.4,
+                  color: 'rgba(7,44,90,0.1)'
+                }, {
+                  offset: 1,
+                  color: 'rgba(0,146,246,0.9)'
+                }]),
+              }
+            }
+          },
+          markPoint: {
+            itemStyle: {
+              normal: {
+                color: 'red'
+              }
+            }
+          },
+          data:dataC1
+        },
+          {
+            name: '现有疑似',
+            type: 'line',
+            stack: '总量',
+            symbol: 'circle',
+            showSymbol: false,
+            symbolSize: 8,
+
+            itemStyle: {
+              normal: {
+                color: '#00d4c7',
+                lineStyle: {
+                  color: "#00d4c7",
+                  width: 1
+                },
+                areaStyle: {
+                  //color: '#94C9EC'
+                  color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
+                    offset: 0.4,
+                    color: 'rgba(7,44,90,0.1)'
+                  }, {
+                    offset: 1,
+                    color: 'rgba(0,212,199,0.9)'
+                  }]),
+                }
+              }
+            },
+            data: dataC2
+          },
+          {
+            name: '累计确诊',
+            type: 'line',
+            stack: '总量',
+            symbol: 'circle',
+            showSymbol: false,
+            symbolSize: 8,
+            itemStyle: {
+              normal: {
+                color: '#aecb56',
+                lineStyle: {
+                  color: "#aecb56",
+                  width: 1
+                },
+                areaStyle: {
+                  //color: '#94C9EC'
+                  color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
+                    offset: 0.4,
+                    color: 'rgba(7,44,90,0.1)'
+                  }, {
+                    offset: 1,
+                    color: 'rgba(114,144,89,0.9)'
+                  }]),
+                }
+              }
+            },
+            data: dataC3
+          }
+        ]
+      }
+
+      myChart.setOption(option, true);
+      window.addEventListener('resize', () => {
+        myChart.resize();
+      })
+    },
+  },
+  beforeDestroy() {
+
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.TrendCon-container {
+  .chart {
+    height: 3rem;
+  }
+}
+</style>

+ 4 - 4
echarts-screen/src/components/index.js

@@ -1,13 +1,13 @@
-
+import Newly from "./Newly";
 import RoseCon from './RoseCon' // 客户分布
-
+import TrendCon from "./TrendCon";
 import PieCon from './PieCon' // 发展历程
 
 const components = {
-
-
   RoseCon,
   PieCon,
+  TrendCon,
+  Newly
 };
 
 const install = (Vue = {}) => {

+ 0 - 5
echarts-screen/src/main.js

@@ -2,20 +2,15 @@ import Vue from 'vue'
 import App from './App.vue'
 import router from './router'
 import store from './store'
-// import vueParticles from 'vue-particles'
 import Vcomp from './components/index'
-// import Toast from './components/toast'
 
 import '@/assets/styles/base.scss'
 import '@/assets/styles/common.scss'
 
-// Vue.use(vueParticles)
 Vue.use(Vcomp)
 
 Vue.config.productionTip = false
 
-// Vue.prototype.$Toast = Toast
-
 
 router.beforeEach((to, from, next) => {
 	if (to.meta.title) {

+ 4 - 4
echarts-screen/src/views/Brand.vue

@@ -30,8 +30,8 @@
                         <div class="panel-footer"></div>
                     </div>
                     <div class="panel">
-                        <h2>营收状况</h2>
-                        <income/>
+                        <h2>全国 现有确诊/疑似/累计确诊 趋势</h2>
+                        <TrendCon/>
                         <div class="panel-footer"></div>
                     </div>
                 </div>
@@ -79,8 +79,8 @@
                         <div class="panel-footer"></div>
                     </div>
                     <div class="panel">
-                        <h2>发展历程</h2>
-                        <history/>
+                        <h2>疫情实况</h2>
+                        <Newly/>
                         <div class="panel-footer"></div>
                     </div>
                 </div>