chenmy 6 年之前
父节点
当前提交
5a55058953

+ 0 - 4
TEAMModelOS.SmartClass/ClientApp/components/smart-class/headers.vue

@@ -27,10 +27,6 @@
         activeIndex: sessionStorage.getItem('_activeIndex') || 0
       }
     },
-
-    created() {
-
-    },
     methods: {
       handleMenuClick(index, route) {
         this.activeIndex = index;

+ 5 - 12
TEAMModelOS.SmartTeach/ClientApp/components/resource/teacherMap.vue

@@ -190,10 +190,7 @@
           { provice: '四川', subject: '语文', title: '省级名师', name: '周一', period: '小学', text1: '成员', number1: '1000', text2: '资源', number2: '2000', text3: '热度', number3: '1500' },
           { provice: '四川', subject: '语文', title: '省级名师', name: '周一', period: '小学', text1: '成员', number1: '1000', text2: '资源', number2: '2000', text3: '热度', number3: '1500' },
           { provice: '四川', subject: '语文', title: '省级名师', name: '周一', period: '小学', text1: '成员', number1: '1000', text2: '资源', number2: '2000', text3: '热度', number3: '1500' },
-
-
         ],
-
         geoCoordMap: {
           "四川省": [104.06, 30.67],
           "陕西省": [108.78, 34.40],
@@ -220,15 +217,14 @@
           "青海省": [101.60, 36.75],
           "西藏自治区": [90.97, 29.84],
         },
-
       };
     },
-    mounted() {
-      this.drawLine();
+    created() {
+      this.convertData();
     },
-
     methods: {
       convertData(data) {
+        console.log(this.geoCoordMap, 6666);
         var res = [];
         for (var i = 0; i < 5; i++) {
           var geoCoord = this.geoCoordMap[[i]];
@@ -239,7 +235,7 @@
             });
           }
         }
-        return res;
+        this.drawLine(res);
       },
       drawLine () {
         // 基于准备好的dom,初始化echarts实例
@@ -294,7 +290,7 @@
               name: '报名人数',
               type: 'scatter',
               coordinateSystem: 'geo',
-              data: this.convertData(this.data),
+              data: this.convertData(data),
               symbolSize: function (val) {
                 return val[2] / 4;
               },
@@ -347,9 +343,6 @@
             }
           ]
         }
-        // 绘制图表
-        myChart.setOption(option);
-        
       }
     },