huang
2025-11-18 1566e4c7604d85737ea67fe6757e71b8185fa48e
mes-web/src/views/device/DeviceGroupList.vue
@@ -398,10 +398,10 @@
  try {
    const groupId = row.id || row.groupId
    if (row.enabled) {
      await deviceGroupApi.enable({ groupId })
      await deviceGroupApi.enable(groupId)
      ElMessage.success('设备组启用成功')
    } else {
      await deviceGroupApi.disable({ groupId })
      await deviceGroupApi.disable(groupId)
      ElMessage.success('设备组禁用成功')
    }
    emit('refresh-statistics')
@@ -416,7 +416,7 @@
const batchEnable = async () => {
  try {
    const groupIds = selectedGroups.value.map(item => item.id || item.groupId)
    await deviceGroupApi.batchEnable({ groupIds })
    await deviceGroupApi.batchEnable(groupIds)
    ElMessage.success(`成功启用 ${groupIds.length} 个设备组`)
    clearSelection()
    loadGroupList()
@@ -430,7 +430,7 @@
const batchDisable = async () => {
  try {
    const groupIds = selectedGroups.value.map(item => item.id || item.groupId)
    await deviceGroupApi.batchDisable({ groupIds })
    await deviceGroupApi.batchDisable(groupIds)
    ElMessage.success(`成功禁用 ${groupIds.length} 个设备组`)
    clearSelection()
    loadGroupList()