From cffbfd9e9b8faf58ca3ae8f0f2329ce476bcaee0 Mon Sep 17 00:00:00 2001 From: lll Date: Sat, 11 Nov 2023 11:13:28 +0800 Subject: [PATCH] 1 --- src/components/GatewayMaintenance.vue | 4 ++-- src/components/IpConfiguration.vue | 7 ++----- src/components/ObjectManagement.vue | 7 ++++++- src/components/PolicyManagement.vue | 7 ++++++- src/components/netConfiguration.vue | 4 ---- src/views/Index.vue | 11 +++++------ 6 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/components/GatewayMaintenance.vue b/src/components/GatewayMaintenance.vue index 8d40e85..133c6a9 100644 --- a/src/components/GatewayMaintenance.vue +++ b/src/components/GatewayMaintenance.vue @@ -253,8 +253,8 @@ export default { }; }, created() { - let that = this; - window.getParameter = that.getParameter; + // let that = this; + // window.getParameter = that.getParameter; this.user_id = this.$route.fullPath.split("?")[1]; this.GetUserAnswer(); // this.tableData = JSON.parse(localStorage.getItem("wgwh")) || []; diff --git a/src/components/IpConfiguration.vue b/src/components/IpConfiguration.vue index 48ded23..55c2a38 100644 --- a/src/components/IpConfiguration.vue +++ b/src/components/IpConfiguration.vue @@ -254,11 +254,6 @@ export default { }, }; }, - created() { - let that = this; - window.getParameter = that.getParameter; - }, - methods: { getParameter(data) { alert(data); @@ -527,6 +522,8 @@ export default { }, }, created() { + let that = this; + window.getParameter = that.getParameter; this.Loading = true; this.GetUserAnswer(); this.Loading = false; diff --git a/src/components/ObjectManagement.vue b/src/components/ObjectManagement.vue index 13d5d0b..8e12878 100644 --- a/src/components/ObjectManagement.vue +++ b/src/components/ObjectManagement.vue @@ -139,7 +139,12 @@ export default { methods: { getParameter(data) { alert(data); - this.user_id = data; + this.user_id = data.split("|")[0]; + if (data.split("|")[1] == 1) { + this.$store.commit("setType", "GYWZ_yx"); + } else { + this.$store.commit("setType", "GYWZ_wx"); + } }, //ip地址验证 validateIpAddress(rule, value, callback) { diff --git a/src/components/PolicyManagement.vue b/src/components/PolicyManagement.vue index de25147..d21b229 100644 --- a/src/components/PolicyManagement.vue +++ b/src/components/PolicyManagement.vue @@ -290,7 +290,12 @@ export default { methods: { getParameter(data) { alert(data); - this.user_id = data; + this.user_id = data.split("|")[0]; + if (data.split("|")[1] == 1) { + this.$store.commit("setType", "GYWZ_yx"); + } else { + this.$store.commit("setType", "GYWZ_wx"); + } }, addPolicy() { this.$router.push({ name: "addstrategy", query: { id: this.user_id } }); diff --git a/src/components/netConfiguration.vue b/src/components/netConfiguration.vue index e3635b2..5f2b49d 100644 --- a/src/components/netConfiguration.vue +++ b/src/components/netConfiguration.vue @@ -177,10 +177,6 @@ export default { }, }; }, - created() { - let that = this; - window.getParameter = that.getParameter; - }, methods: { getParameter(data) { alert(data); diff --git a/src/views/Index.vue b/src/views/Index.vue index 9959fda..5eb00b0 100644 --- a/src/views/Index.vue +++ b/src/views/Index.vue @@ -176,14 +176,13 @@ export default { // }, // ]) // ); - - let that = this; - window.getParameter = that.getParameter; + // let that = this; + // window.getParameter = that.getParameter; }, methods: { - getParameter(data) { - this.$router.push(`/${data}`); - }, + // getParameter(data) { + // this.$router.push(`/${data}`); + // }, }, };