diff --git a/.env.development b/.env.development index d89589a..8a8198b 100644 --- a/.env.development +++ b/.env.development @@ -3,6 +3,6 @@ ENV = 'development' # base api VUE_APP_BASE_API = '' -VUE_APP_DOMAIN=http://patrol.115.langye.net/ +#VUE_APP_DOMAIN=http://patrol.115.langye.net/ -#VUE_APP_DOMAIN=http://192.168.60.100:9001/ +VUE_APP_DOMAIN=http://192.168.60.100:9001/ diff --git a/package.json b/package.json index 64b4be0..810becb 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "table-excel": "^1.1.9", "view-design": "^4.7.0", "vue": "2.6.10", + "vue-matomo": "^4.2.0", "vue-router": "3.0.6", "vuex": "3.1.0", "wangeditor": "^4.7.12" diff --git a/src/App.vue b/src/App.vue index e1f2fe0..82011f4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,28 @@ - - - diff --git a/src/main.js b/src/main.js index 9ec8ca4..c676387 100644 --- a/src/main.js +++ b/src/main.js @@ -62,3 +62,25 @@ new Vue({ store, render: h => h(App) }) + + + +import VueMatomo from 'vue-matomo' + +Vue.use(VueMatomo, { + host: 'http://192.168.60.99:9000/', // 这里配置你自己的piwik服务器地址和网站ID + siteId: 4,//siteId值 + // 根据router自动注册 + router: router, + // // 是否需要在发送追踪信息之前请求许可 + // // 默认false + requireConsent: false, + enableLinkTracking: true, + // // 是否追踪初始页面 + // // 默认true + trackInitialView: false, + // // 最终的追踪js文件名 + // // 默认 'piwik' + trackerFileName: 'matomo', + debug: false +}); diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index d1dee03..e7e5ede 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -609,7 +609,8 @@ ]) }, created() { - this.select.date = this.$moment().format("yyyy-MM") + this.select.date = this.$moment().format("yyyy-MM") + this.select.year= this.$moment().format("yyyy") this.initload() //this.load(); this.indexChart();