fix:通知和设备分配/回收
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m49s
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m49s
This commit is contained in:
@@ -831,15 +831,20 @@
|
||||
try {
|
||||
const response = await CardService.setSpeedTier(iccid, data.code)
|
||||
if (response.code !== 0) {
|
||||
speedLimitDialogVisible.value = false
|
||||
await nextTick()
|
||||
ElMessage.error(response.msg || '限速设置失败')
|
||||
return
|
||||
}
|
||||
|
||||
ElMessage.success(`限速设置成功:${response.data.speed_tier_name}`)
|
||||
speedLimitDialogVisible.value = false
|
||||
await nextTick()
|
||||
ElMessage.success(`限速设置成功:${response.data.speed_tier_name}`)
|
||||
await handleRefresh()
|
||||
} catch (error) {
|
||||
console.error('设置限速失败:', error)
|
||||
speedLimitDialogVisible.value = false
|
||||
await nextTick()
|
||||
ElMessage.error(normalizeApiError(error).message)
|
||||
} finally {
|
||||
speedTierSubmitting.value = false
|
||||
|
||||
@@ -17,6 +17,21 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #left>
|
||||
<ElButton
|
||||
type="primary"
|
||||
@click="handleBatchAllocate"
|
||||
:disabled="!selectedDevices.length"
|
||||
v-permission="'device:batch_allocate'"
|
||||
>
|
||||
批量分配
|
||||
</ElButton>
|
||||
<ElButton
|
||||
@click="handleBatchRecall"
|
||||
:disabled="!selectedDevices.length"
|
||||
v-permission="'device:batch_recall'"
|
||||
>
|
||||
批量回收
|
||||
</ElButton>
|
||||
<ElButton
|
||||
type="primary"
|
||||
:disabled="!selectedDevices.length"
|
||||
@@ -2350,6 +2365,19 @@
|
||||
})
|
||||
}
|
||||
|
||||
// 批量分配(设备列表原有操作,和设备批量任务页面并行保留)
|
||||
const handleBatchAllocate = async () => {
|
||||
if (selectedDevices.value.length === 0) {
|
||||
ElMessage.warning('请先选择要分配的设备')
|
||||
return
|
||||
}
|
||||
allocateForm.target_shop_id = undefined
|
||||
allocateForm.remark = ''
|
||||
allocateResult.value = null
|
||||
shopCascadeOptions.value = []
|
||||
allocateDialogVisible.value = true
|
||||
}
|
||||
|
||||
// 确认批量分配
|
||||
const handleConfirmAllocate = async () => {
|
||||
if (!allocateFormRef.value) return
|
||||
@@ -2400,6 +2428,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
// 批量回收(设备列表原有操作,和设备批量任务页面并行保留)
|
||||
const handleBatchRecall = () => {
|
||||
if (selectedDevices.value.length === 0) {
|
||||
ElMessage.warning('请先选择要回收的设备')
|
||||
return
|
||||
}
|
||||
recallForm.remark = ''
|
||||
recallResult.value = null
|
||||
recallDialogVisible.value = true
|
||||
}
|
||||
|
||||
// 确认批量回收
|
||||
const handleConfirmRecall = async () => {
|
||||
recallLoading.value = true
|
||||
|
||||
Reference in New Issue
Block a user