Administrator 2 yıl önce
ebeveyn
işleme
1c75d00b3e
3 değiştirilmiş dosya ile 19 ekleme ve 6 silme
  1. 7 1
      src/api/bigdata.js
  2. 10 3
      src/views/bigdata/chart-event.vue
  3. 2 2
      vue.config.js

+ 7 - 1
src/api/bigdata.js

@@ -1,9 +1,15 @@
 import request from '@/utils/request'
 
 // 事件来源,类型统计
-export function getSjlylxtj() {
+export function getSjlylxtj(param) {
+  //暂时传当年,以后再说
+  if (param == null) {
+    let myDate = new Date();
+    param = {day: myDate.getFullYear()}
+  }
   return request({
     url: '/center-firecontrol/VisuForestCloudBigDataController/getEventSourceAndTypeStatistics',
+    data: param,
     method: 'post',
   })
 }

+ 10 - 3
src/views/bigdata/chart-event.vue

@@ -19,12 +19,19 @@
 			}
 		},
 		mounted() {
-			this.myEcharts()
-			this.myEcharts2()
-
+      this.sjlylxtj()
 		},
 
 		methods:{
+
+		  sjlylxtj(){
+		    let that = this
+        getSjlylxtj(null).then(resp => {
+          console.log("====>",resp);
+          that.myEcharts()
+          that.myEcharts2()
+        })
+      },
 			// 出处 https://echarts.apache.org/examples/zh/editor.html?c=pie-borderRadius
 			//http://192.144.199.210:8080/editor/index.html?chart_id=K8nTnNyu0caN65uT
 

+ 2 - 2
vue.config.js

@@ -52,8 +52,8 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        // target: `https://www.sunyishi.com:3031`,
-        target: `http://117.78.49.164:3031`,
+        target: `http://192.168.1.113:3031`,
+        //target: `http://117.78.49.164:3031`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''