| | |
| | | counter: '诱导驱离' |
| | | } |
| | | |
| | | const buildPayload = (item) => ({ |
| | | alarmRecordId: item.id, |
| | | areaCode: item.areaCode, |
| | | counterEffect: '', |
| | | coverRadiusM: item.coverRadiusM, |
| | | deployLatitude: item.latitude, |
| | | deployLongitude: item.longitude, |
| | | deviceCode: item.deviceCode, |
| | | const buildPayload = (type, item) => ({ |
| | | counterWay: type === 'signal' ? 1 : type === 'counter' ? 2 : '', |
| | | deviceId: item.deviceId, |
| | | deviceModel: item.deviceModel, |
| | | deviceName: item.deviceName, |
| | | deviceType: item.deviceType, |
| | | droneDeviceCode: item.droneSerialNo, |
| | | droneName: item.droneName, |
| | | droneType: item.droneType, |
| | | findTime: item.alarmTime, |
| | | id: item.id, |
| | | workMode: '' |
| | | droneDeviceCode: item.droneDeviceCode ?? item.droneSerialNo |
| | | }) |
| | | |
| | | const handleAction = async (type, item) => { |
| | | const actionText = actionTextMap[type] || '操作' |
| | | try { |
| | | const res = await interferenceAndExpulsionApi(buildPayload(item)) |
| | | const res = await interferenceAndExpulsionApi(buildPayload(type, item)) |
| | | if (res?.data?.success) { |
| | | ElMessage({ type: 'success', message: `${actionText}成功` }) |
| | | } else { |