From 89db14394865e5834ade7d5392d6d04c55fdf97a Mon Sep 17 00:00:00 2001 From: lll Date: Fri, 8 Dec 2023 17:10:17 +0800 Subject: [PATCH] 1 --- src/App.vue | 21 ++++++++++++++------- src/store/index.js | 10 ++++++++-- src/views/lll/NYJCD.vue | 4 ++-- src/views/lll/PDS.vue | 39 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 60 insertions(+), 14 deletions(-) diff --git a/src/App.vue b/src/App.vue index ee5bd95..0d3794e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,13 +15,20 @@ export default { addMessageListener() { let that = this; window.vuplex.addEventListener("message", function (event) { - let json = event.data; - that.$router.push({ - name: "pds1", - query: { - type: json, - }, - }); + if (that.$route.path == "/area/nyjcd/pds") { + let json = event.data; + if (json == "无操作标识") { + that.$store.commit("SetNoOperation", json); + } else { + that.$store.commit("SetNoOperation", "无操作标识"); + } + that.$router.push({ + name: "pds1", + query: { + type: json, + }, + }); + } }); }, }, diff --git a/src/store/index.js b/src/store/index.js index a82f3e1..aa191d4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -4,9 +4,15 @@ import Vuex from "vuex"; Vue.use(Vuex); export default new Vuex.Store({ - state: {}, + state: { + NoOperation: "", + }, getters: {}, - mutations: {}, + mutations: { + SetNoOperation(state, a) { + state.NoOperation = a; + }, + }, actions: {}, modules: {}, }); diff --git a/src/views/lll/NYJCD.vue b/src/views/lll/NYJCD.vue index e955987..07fad5d 100644 --- a/src/views/lll/NYJCD.vue +++ b/src/views/lll/NYJCD.vue @@ -120,7 +120,7 @@ alt="" class="img1" @click=" - this.sendMessageToCSharp({ + sendMessageToCSharp({ type: 'video', message: '余热发电动画', }) @@ -140,7 +140,7 @@ alt="" class="img1" @click=" - this.sendMessageToCSharp({ + sendMessageToCSharp({ type: 'video', message: '垃圾发电动画', }) diff --git a/src/views/lll/PDS.vue b/src/views/lll/PDS.vue index b4e0e7c..1c5ce4e 100644 --- a/src/views/lll/PDS.vue +++ b/src/views/lll/PDS.vue @@ -26,7 +26,10 @@ - + + +
+