refactor: 优化系统日志、在线用户、存储管理、部门管理相关代码

This commit is contained in:
2024-04-22 23:13:35 +08:00
parent 2ddd900121
commit 2987d3eb4d
12 changed files with 57 additions and 51 deletions

View File

@@ -22,7 +22,7 @@
</template>
<template #custom-right>
<a-tooltip content="导出">
<a-button @click="onExport">
<a-button v-permission="['monitor:log:export']" @click="onExport">
<template #icon>
<icon-download />
</template>
@@ -109,6 +109,17 @@ const {
search
} = useTable((p) => listLog({ ...queryForm, page: p.page, size: p.size }), { immediate: true })
// 过滤查询
const filterChange = (dataIndex, filteredValues) => {
try {
const slotName = columns[dataIndex.split('_').pop()].slotName as string
queryForm[slotName] = filteredValues.join(',')
search()
} catch (error) {
search()
}
}
// 重置
const reset = () => {
queryForm.ip = undefined
@@ -125,17 +136,6 @@ const reset = () => {
const onExport = () => {
useDownload(() => exportLoginLog(queryForm))
}
// 过滤查询
const filterChange = (dataIndex, filteredValues) => {
try {
const slotName = columns[dataIndex.split('_').pop()].slotName as string
queryForm[slotName] = filteredValues.join(',')
search()
} catch (error) {
search()
}
}
</script>
<style lang="scss" scoped></style>