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 @@ 新增 - 刷新 + 导入通用物模型 - 导入通用物模型 + 刷新 查看物模型