From 8b42e52db09eae0f9df8dc8ac22ae4b595a53b51 Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Sun, 12 Jun 2022 12:13:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/views/index.vue | 28 +++++++++++----------- vue/src/views/iot/product/index.vue | 14 ++++++++++- vue/src/views/iot/product/product-edit.vue | 12 +++++++++- 3 files changed, 38 insertions(+), 16 deletions(-) diff --git a/vue/src/views/index.vue b/vue/src/views/index.vue index ecbfb205..80f20617 100644 --- a/vue/src/views/index.vue +++ b/vue/src/views/index.vue @@ -99,26 +99,26 @@
- -
-
-
- 功能操作 -
- -
-
-
- -
-
告警数量
- + +
+
+
+ +
+
+ +
+
+
+ 操作记录 +
+
diff --git a/vue/src/views/iot/product/index.vue b/vue/src/views/iot/product/index.vue index 00e60da1..e7a5ac17 100644 --- a/vue/src/views/iot/product/index.vue +++ b/vue/src/views/iot/product/index.vue @@ -70,7 +70,7 @@ 详情 删除 - 下载SDK + 设备授权 查看设备 @@ -246,6 +246,18 @@ export default { } }); }, + /** 设备授权操作 */ + handleDeviceAuthorize(row) { + let productId = row.productId + this.$router.push({ + path: '/iot/product-edit', + query: { + productId: productId, + tabPanelName:'productAuthorize', + pageNum: this.queryParams.pageNum + } + }); + }, } }; diff --git a/vue/src/views/iot/product/product-edit.vue b/vue/src/views/iot/product/product-edit.vue index db69b9ce..2776533a 100644 --- a/vue/src/views/iot/product/product-edit.vue +++ b/vue/src/views/iot/product/product-edit.vue @@ -192,9 +192,14 @@ export default { // 获取产品信息 const productId = this.$route.query && this.$route.query.productId; this.form.productId = productId; - if (this.form.productId != 0) { + if (this.form.productId != 0 && this.form.productId != null) { this.getProduct(); } + // 切换选项卡 + const tabPanelName = this.$route.query && this.$route.query.tabPanelName; + if (tabPanelName != null && tabPanelName != '') { + this.activeName = tabPanelName; + } // 获取分类信息 this.getShortCategory(); }, @@ -209,6 +214,11 @@ export default { this.getProduct(); this.getShortCategory(); } + // 切换选项卡 + const tabPanelName = this.$route.query && this.$route.query.tabPanelName; + if (tabPanelName != null && tabPanelName != '') { + this.activeName = tabPanelName; + } } }, methods: {