From 89595fbf84044a1d352cc769807540852cd71a86 Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Fri, 8 Jul 2022 23:49:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E6=94=AF=E6=8C=81=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/views/iot/device/product-list.vue | 2 +- vue/src/views/iot/group/device-list.vue | 71 +++++++++++++++-------- vue/src/views/iot/group/index.vue | 48 ++++----------- 3 files changed, 60 insertions(+), 61 deletions(-) diff --git a/vue/src/views/iot/device/product-list.vue b/vue/src/views/iot/device/product-list.vue index 45d044e3..50de2613 100644 --- a/vue/src/views/iot/device/product-list.vue +++ b/vue/src/views/iot/device/product-list.vue @@ -59,7 +59,7 @@ import { } from "@/api/iot/product"; export default { - name: "Product", + name: "ProductList", dicts: ['iot_vertificate_method', 'iot_network_method'], props: { productId: { diff --git a/vue/src/views/iot/group/device-list.vue b/vue/src/views/iot/group/device-list.vue index 392cbe8e..51ef6424 100644 --- a/vue/src/views/iot/group/device-list.vue +++ b/vue/src/views/iot/group/device-list.vue @@ -1,12 +1,11 @@ + - - - + + diff --git a/vue/src/views/iot/group/index.vue b/vue/src/views/iot/group/index.vue index 471ff337..452b2a3a 100644 --- a/vue/src/views/iot/group/index.vue +++ b/vue/src/views/iot/group/index.vue @@ -39,13 +39,8 @@ - - - - + + @@ -78,7 +73,6 @@ import { delGroup, addGroup, updateGroup, - updateDeviceGroups } from "@/api/iot/group"; export default { @@ -89,9 +83,9 @@ export default { data() { return { // 是否管理员 - isAdmin:false, + isAdmin: false, // 我的分组 - myGroup:false, + myGroup: false, // 遮罩层 loading: true, // 选中数组 @@ -110,8 +104,6 @@ export default { title: "", // 是否显示弹出层 open: false, - // 是否显示设备列表 - openDeviceList: false, // 查询参数 queryParams: { pageNum: 1, @@ -131,11 +123,10 @@ export default { trigger: "blur" }], groupOrder: [{ - required: true, - message: "分组排序不能为空,最大值为99", - trigger: "blur" - } - ], + required: true, + message: "分组排序不能为空,最大值为99", + trigger: "blur" + }], } }; }, @@ -150,8 +141,8 @@ export default { } }, // 我的分组改变事件 - myGroupChange(){ - this.queryParams.userId=this.myGroup?this.$store.state.user.userId:null; + myGroupChange() { + this.queryParams.userId = this.myGroup ? this.$store.state.user.userId : null; }, /** 查看设备按钮操作 */ handleViewDevice(groupId) { @@ -177,10 +168,6 @@ export default { this.open = false; this.reset(); }, - // 关闭选择设备列表 - closeSelectDeviceList() { - this.openDeviceList = false; - }, // 表单重置 reset() { this.form = { @@ -233,8 +220,8 @@ export default { /** 选择设备 */ selectDevice(row) { this.group = row; - this.openDeviceList = true; - // this.$refs.deviceList.getDeviceIdsByGroupId(row.groupId); + // 刷新子组件 + this.$refs.groupDeviceList.openDeviceList = true; }, /** 提交按钮 */ submitForm() { @@ -272,17 +259,6 @@ export default { ...this.queryParams }, `group_${new Date().getTime()}.xlsx`) }, - // 获取子组件选中的ID数组 - getChildData(data) { - this.group.deviceIds = data; - }, - // 更新分组下的设备 - handleDeviceSelected() { - updateDeviceGroups(this.group).then(response => { - this.$modal.msgSuccess("更新分组下的设备成功"); - this.openDeviceList = false; - }) - } } };