diff --git a/package-lock.json b/package-lock.json index 9911999..e33dd32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "echarts-gl": "^2.0.9", "element": "^0.1.4", "element-ui": "^2.15.14", + "highcharts": "^11.2.0", "postcss-pxtorem": "^6.0.0", "register-service-worker": "^1.7.2", "ui": "^0.2.4", @@ -7012,6 +7013,11 @@ "he": "bin/he" } }, + "node_modules/highcharts": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.2.0.tgz", + "integrity": "sha512-9i650YK7ZBA1Mgtr3avMkLVCAI45RQvYnwi+eHsdFSaBGuQN6BHoa4j4lMkSJLv0V4LISTK1z7J7G82Lzd7zwg==" + }, "node_modules/highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", @@ -18384,6 +18390,11 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, + "highcharts": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/highcharts/-/highcharts-11.2.0.tgz", + "integrity": "sha512-9i650YK7ZBA1Mgtr3avMkLVCAI45RQvYnwi+eHsdFSaBGuQN6BHoa4j4lMkSJLv0V4LISTK1z7J7G82Lzd7zwg==" + }, "highlight.js": { "version": "10.7.3", "resolved": "https://registry.npmmirror.com/highlight.js/-/highlight.js-10.7.3.tgz", diff --git a/package.json b/package.json index 961c133..c7fca37 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "echarts-gl": "^2.0.9", "element": "^0.1.4", "element-ui": "^2.15.14", + "highcharts": "^11.2.0", "postcss-pxtorem": "^6.0.0", "register-service-worker": "^1.7.2", "ui": "^0.2.4", diff --git a/src/assets/img/底盘.png b/src/assets/img/底盘.png new file mode 100644 index 0000000..677045b Binary files /dev/null and b/src/assets/img/底盘.png differ diff --git a/src/store/index.js b/src/store/index.js index ceffa8e..a82f3e1 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1,17 +1,12 @@ -import Vue from 'vue' -import Vuex from 'vuex' +import Vue from "vue"; +import Vuex from "vuex"; -Vue.use(Vuex) +Vue.use(Vuex); export default new Vuex.Store({ - state: { - }, - getters: { - }, - mutations: { - }, - actions: { - }, - modules: { - } -}) + state: {}, + getters: {}, + mutations: {}, + actions: {}, + modules: {}, +}); diff --git a/src/views/lll/NYJCD.vue b/src/views/lll/NYJCD.vue index 705523e..a832213 100644 --- a/src/views/lll/NYJCD.vue +++ b/src/views/lll/NYJCD.vue @@ -57,7 +57,7 @@ -
+
@@ -106,7 +106,7 @@
-
+
@@ -158,7 +158,7 @@ export default { res: "月", click1: "", click2: "", - flag: true, + flag: false, option1: { xAxis: { type: "category", @@ -339,7 +339,6 @@ export default { goOne(a) { this.click2 = ""; this.click1 = a; - this.flag = false; if (this.click1 == "配电室") { this.$router.replace( "/area/nyjcd/pds", @@ -357,7 +356,6 @@ export default { goTwo(a) { this.click1 = ""; this.click2 = a; - this.flag = false; this.$router.replace( `/area/nyjcd/scx1?type=${this.click2}`, () => {}, @@ -621,8 +619,20 @@ export default { this.defineEcharts("yrfd", option); }, }, - created() { - this.flag = true; + created() {}, + watch: { + // 监听,当路由发生变化的时候执行 + $route: { + handler(to, from) { + if (to.path == "/area/nyjcd") { + this.flag = true; + } else { + this.flag = false; + } + }, + deep: true, // 深度观察监听 + immediate: true, // 第一次初始化渲染就可以监听到 + }, }, mounted() { this.defineEcharts("qcssdh", this.option1); diff --git a/src/views/lll/NYJCD/SCX1.vue b/src/views/lll/NYJCD/SCX1.vue index e8911e6..83e724c 100644 --- a/src/views/lll/NYJCD/SCX1.vue +++ b/src/views/lll/NYJCD/SCX1.vue @@ -128,7 +128,9 @@

负荷占比

-
+
+ +
@@ -172,6 +174,7 @@