From 29c719dfd43b7fd87c1d3746f1b99dce9a3c8301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Mon, 15 Jul 2024 15:27:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B5=8B=E8=AF=95=E7=8E=AF?= =?UTF-8?q?=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/device.js | 20 ++++++++ src/components/Business/Model/modelDialog.vue | 2 +- src/components/Business/Model/modelSelect.vue | 13 ++--- src/views/ss/store/index.vue | 12 +++-- src/views/ss/suit/index.vue | 1 + src/views/system/device/detail.vue | 22 ++++++++- src/views/system/device/index.vue | 49 ++++++++++++++++++- src/views/system/smUser/index.vue | 24 ++++++++- 8 files changed, 127 insertions(+), 16 deletions(-) diff --git a/src/api/system/device.js b/src/api/system/device.js index 3a7dfa3..bb4b346 100644 --- a/src/api/system/device.js +++ b/src/api/system/device.js @@ -92,3 +92,23 @@ export function resetDevice(deviceId) { method: 'put' }) } + +// 批量修改型号 +export function batchUpdateModel(deviceIds, modelId) { + return request({ + url: `/system/device/batchUpdateModel`, + method: 'put', + data: { + deviceIds, + modelId + } + }) +} + +// 设备开关 +export function switchDevice(deviceId, open) { + return request({ + url: `/system/device/${deviceId}/switch?open=${open}`, + method: 'put' + }) +} diff --git a/src/components/Business/Model/modelDialog.vue b/src/components/Business/Model/modelDialog.vue index 1cb26c0..c1947f1 100644 --- a/src/components/Business/Model/modelDialog.vue +++ b/src/components/Business/Model/modelDialog.vue @@ -2,7 +2,7 @@ diff --git a/src/views/ss/store/index.vue b/src/views/ss/store/index.vue index b9c99f4..7354ea9 100644 --- a/src/views/ss/store/index.vue +++ b/src/views/ss/store/index.vue @@ -134,12 +134,15 @@ - - - + + + + + + @@ -342,7 +345,8 @@ export default { createBy: null, updateTime: null, updateBy: null, - deleted: null + deleted: null, + show: true }; this.resetForm("form"); }, diff --git a/src/views/ss/suit/index.vue b/src/views/ss/suit/index.vue index a7d7b79..515611a 100644 --- a/src/views/ss/suit/index.vue +++ b/src/views/ss/suit/index.vue @@ -92,6 +92,7 @@ +