huang
2025-11-18 1566e4c7604d85737ea67fe6757e71b8185fa48e
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
}