From 1566e4c7604d85737ea67fe6757e71b8185fa48e Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期二, 18 十一月 2025 16:52:42 +0800
Subject: [PATCH] 添加设备管理页面,添加测试设备任务监控页面
---
mes-web/src/api/device/deviceManagement.js | 60 ++++++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 46 insertions(+), 14 deletions(-)
diff --git a/mes-web/src/api/device/deviceManagement.js b/mes-web/src/api/device/deviceManagement.js
index 13dd443..48c27ee 100644
--- a/mes-web/src/api/device/deviceManagement.js
+++ b/mes-web/src/api/device/deviceManagement.js
@@ -200,33 +200,38 @@
/**
* 鍒涘缓璁惧缁勯厤缃�
*/
- create(data) {
+ create(config) {
return request({
url: '/api/plcSend/device/group/create',
method: 'post',
- data
+ data: {
+ groupConfig: config
+ }
})
},
/**
* 鏇存柊璁惧缁勯厤缃�
*/
- update(data) {
+ update(id, config) {
return request({
url: '/api/plcSend/device/group/update',
method: 'post',
- data
+ data: {
+ groupId: id,
+ groupConfig: config
+ }
})
},
/**
* 鍒犻櫎璁惧缁勯厤缃�
*/
- delete(data) {
+ delete(id) {
return request({
url: '/api/plcSend/device/group/delete',
method: 'post',
- data
+ data: { groupId: id }
})
},
@@ -263,44 +268,44 @@
/**
* 鍚敤璁惧缁�
*/
- enable(data) {
+ enable(id) {
return request({
url: '/api/plcSend/device/group/enable',
method: 'post',
- data
+ data: { groupId: id }
})
},
/**
* 绂佺敤璁惧缁�
*/
- disable(data) {
+ disable(id) {
return request({
url: '/api/plcSend/device/group/disable',
method: 'post',
- data
+ data: { groupId: id }
})
},
/**
* 鎵归噺鍚敤璁惧缁�
*/
- batchEnable(data) {
+ batchEnable(groupIds) {
return request({
url: '/api/plcSend/device/group/batch-enable',
method: 'post',
- data
+ data: { groupIds }
})
},
/**
* 鎵归噺绂佺敤璁惧缁�
*/
- batchDisable(data) {
+ batchDisable(groupIds) {
return request({
url: '/api/plcSend/device/group/batch-disable',
method: 'post',
- data
+ data: { groupIds }
})
},
@@ -526,6 +531,32 @@
}
}
+// 璁惧浜や簰鎿嶄綔API
+export const deviceInteractionApi = {
+ /**
+ * 鎵ц璁惧閫昏緫鎿嶄綔
+ * @param {Object} data - { deviceId, operation, params }
+ */
+ executeOperation(data) {
+ return request({
+ url: '/api/plcSend/device/interaction/execute',
+ method: 'post',
+ data
+ })
+ },
+
+ /**
+ * 鐜荤拑涓婃枡鍐欏叆
+ */
+ feedGlass(data) {
+ return request({
+ url: '/api/plcSend/device/interaction/glass-feed',
+ method: 'post',
+ data
+ })
+ }
+}
+
// 缁熻API
export const getDeviceStatistics = (data) => {
return request({
@@ -547,6 +578,7 @@
deviceConfigApi,
deviceGroupApi,
devicePlcApi,
+ deviceInteractionApi,
getDeviceStatistics,
getDeviceGroupStatistics
}
\ No newline at end of file
--
Gitblit v1.8.0