From b6af649c30215242a4f10ab8c8a3e781065d82ec Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Thu, 9 Jun 2022 17:52:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BA=E4=BB=B6=E6=B7=BB=E5=8A=A0=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/views/iot/firmware/index.vue | 19 ++++++++++++++++-- vue/src/views/iot/product/product-app.vue | 11 +++++++--- vue/src/views/iot/product/product-edit.vue | 20 ++++++++++++++++--- .../iot/product/product-things-model.vue | 4 ++-- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/vue/src/views/iot/firmware/index.vue b/vue/src/views/iot/firmware/index.vue index dd319d9f..1d936aa3 100644 --- a/vue/src/views/iot/firmware/index.vue +++ b/vue/src/views/iot/firmware/index.vue @@ -21,11 +21,15 @@ - + + + @@ -186,6 +190,17 @@ export default { this.getProductShortList(); }, methods: { + /** 查看产品按钮操作 */ + handleViewProduct(productId) { + this.$router.push({ + path: '/iot/product-edit', + query: { + t: Date.now(), + productId: productId, + } + }); + }, + // 获取下载路径前缀 getDownloadUrl(path) { return window.location.origin + process.env.VUE_APP_BASE_API + path; }, diff --git a/vue/src/views/iot/product/product-app.vue b/vue/src/views/iot/product/product-app.vue index dd2a1996..7e6d958a 100644 --- a/vue/src/views/iot/product/product-app.vue +++ b/vue/src/views/iot/product/product-app.vue @@ -2,7 +2,12 @@
- 该功能暂不可用,后面版本发布 + + + 刷新 + + 该功能暂不可用,后面版本发布 + @@ -71,7 +76,7 @@ export default { }, form: {}, // 产品 - productInfo:{}, + productInfo: {}, }; }, watch: { @@ -121,4 +126,4 @@ export default { background: linear-gradient(303deg, #b2e9fc 50%, #b5c4f8 50%); } - \ No newline at end of file + diff --git a/vue/src/views/iot/product/product-edit.vue b/vue/src/views/iot/product/product-edit.vue index 143e03ba..90fbf290 100644 --- a/vue/src/views/iot/product/product-edit.vue +++ b/vue/src/views/iot/product/product-edit.vue @@ -190,11 +190,25 @@ export default { if (this.form.productId != 0) { this.getProduct(); } - this.init(); + // 获取分类信息 + this.getShortCategory(); + }, + activated() { + const time = this.$route.query.t; + if (time != null && time != this.uniqueId) { + this.uniqueId = time; + // 获取产品信息 + let productId = this.$route.query.productId + if (productId != null && productId!=0) { + this.form.productId = Number(productId); + this.getProduct(); + this.getShortCategory(); + } + } }, methods: { - init() { - // 获取简短分类列表 + // 获取简短分类列表 + getShortCategory() { listShortCategory().then(response => { this.categoryShortList = response.data; }) diff --git a/vue/src/views/iot/product/product-things-model.vue b/vue/src/views/iot/product/product-things-model.vue index baa6ecb4..e4582063 100644 --- a/vue/src/views/iot/product/product-things-model.vue +++ b/vue/src/views/iot/product/product-things-model.vue @@ -5,10 +5,10 @@ 新增 - 刷新 + 导入通用物模型 - 导入通用物模型 + 刷新 查看物模型