diff --git a/src/views/system/log/LoginLog.vue b/src/views/system/log/LoginLog.vue index 175dbea..44dc1b8 100644 --- a/src/views/system/log/LoginLog.vue +++ b/src/views/system/log/LoginLog.vue @@ -6,6 +6,7 @@ :loading="loading" :scroll="{ x: '100%', y: '100%', minWidth: 1000 }" :pagination="pagination" + @filterChange="filterChange" :disabledTools="['setting']" @refresh="search" > @@ -51,6 +52,17 @@ import { useTable } from '@/hooks' defineOptions({ name: 'LoginLog' }) +const filterChange = (values,record)=>{ + try { + const slotName = columns[values.split('_').pop()].slotName as string + const value = record.join(',') + queryForm[slotName] = value + search() + } catch (error) { + search() + } + console.log(values,record) +} const columns: TableInstance['columns'] = [ { title: '序号', @@ -69,14 +81,14 @@ const columns: TableInstance['columns'] = [ filters: [ { text: '成功', - value: 1 + value: '1' }, { text: '失败', - value: 2 + value: '2' } ], - filter: (value, record) => record.status == value, + filter: () =>{return true}, alignLeft: true } }, diff --git a/src/views/system/log/index.vue b/src/views/system/log/index.vue index 2bcc576..af3caf8 100644 --- a/src/views/system/log/index.vue +++ b/src/views/system/log/index.vue @@ -1,14 +1,13 @@ @@ -16,6 +15,26 @@