feat: 注意事项
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m43s

This commit is contained in:
luo
2026-07-25 14:37:27 +08:00
parent dd6bceeeb7
commit cc6fc9243e
5 changed files with 13 additions and 49 deletions

View File

@@ -4,20 +4,6 @@
<div class="card-header">
<span class="header-title">操作审计日志</span>
<div class="filter-section">
<ElSelect
v-model="filterForm.operation_type"
placeholder="操作类型"
clearable
class="operation-type-select"
@change="handleFilterChange"
>
<ElOption
v-for="option in operationTypeOptions"
:key="option.value"
:label="option.label"
:value="option.value"
/>
</ElSelect>
<ElSelect
v-model="filterForm.result_status"
placeholder="执行结果"
@@ -169,34 +155,6 @@
type DisplayItem = ChangeItem | MessageItem
const operationTypeOptions = [
{ label: '设备WiFi设置', value: 'device_set_wifi' },
{ label: '设备切卡', value: 'device_switch_card' },
{ label: '设备切卡模式', value: 'device_switch_mode' },
{ label: '设备停机', value: 'device_stop' },
{ label: '设备复机', value: 'device_start' },
{ label: '设备重启', value: 'device_reboot' },
{ label: '设备重置', value: 'device_reset' },
{ label: '设备分配', value: 'device_allocate' },
{ label: '设备回收', value: 'device_recall' },
{ label: '设备绑卡', value: 'device_bind_card' },
{ label: '设备解绑卡', value: 'device_unbind_card' },
{ label: '卡分配', value: 'card_allocate' },
{ label: '卡回收', value: 'card_recall' },
{ label: '卡停机', value: 'card_stop' },
{ label: '卡复机', value: 'card_start' },
{ label: '手动停卡', value: 'card_manual_stop' },
{ label: '手动复机', value: 'card_manual_start' },
{ label: '自动停卡', value: 'card_auto_stop' },
{ label: '自动复机', value: 'card_auto_start' },
{ label: '卡轮询状态', value: 'card_polling_status' },
{ label: '资产轮询状态', value: 'asset_polling_status' },
{ label: '实名策略', value: 'asset_realname_policy' },
{ label: '实名状态', value: 'asset_realname_status' },
{ label: '轮询开关', value: 'asset_polling' },
{ label: 'IoT卡导入任务', value: 'iot_card_import_task_create' }
] as const
const operationTypeTagMap: Record<string, TagType> = {
device_set_wifi: 'primary',
device_switch_card: 'success',
@@ -309,7 +267,6 @@
})
const filterForm = reactive({
operation_type: '',
result_status: '' as ResultStatus
})
@@ -321,7 +278,6 @@
const res = await AssetService.getOperationLogs(props.assetIdentifier, {
page: pagination.page,
page_size: pagination.page_size,
operation_type: filterForm.operation_type || undefined,
result_status: filterForm.result_status || undefined
})
if (res.code === 0 && res.data) {
@@ -342,7 +298,6 @@
}
const handleReset = () => {
filterForm.operation_type = ''
filterForm.result_status = ''
pagination.page = 1
loadLogs()

View File

@@ -197,12 +197,12 @@
const handleNotificationClick = async (item: NotificationItem) => {
try {
const targetResponse = await NotificationService.getTarget(item.id)
const readResponse = await notificationStore.markRead(item.id)
if (readResponse.code !== 0) {
ElMessage.error(readResponse.msg || '标记已读失败')
return
}
const targetResponse = await NotificationService.getTarget(item.id)
if (targetResponse.code !== 0 || !targetResponse.data) {
ElMessage.info(item.body || '该通知暂无可跳转目标')
await loadNotifications()