update src/views/infra/apiAccessLog/index.vue.
Signed-off-by: yanchangshan <5333290+yanchangshan@user.noreply.gitee.com>pull/2/head
parent
4115d7f7ba
commit
54f97dcbc3
|
@ -2,18 +2,12 @@
|
||||||
<div>
|
<div>
|
||||||
<BasicTable @register="registerTable">
|
<BasicTable @register="registerTable">
|
||||||
<template #toolbar>
|
<template #toolbar>
|
||||||
<a-button type="primary" @click="handleCreate"> 新增 </a-button>
|
|
||||||
<a-button type="warning" @click="handleExport"> 导出 </a-button>
|
<a-button type="warning" @click="handleExport"> 导出 </a-button>
|
||||||
</template>
|
</template>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<TableAction
|
<TableAction
|
||||||
:actions="[
|
:actions="[
|
||||||
{
|
|
||||||
icon: 'clarity:note-edit-line',
|
|
||||||
label: '修改',
|
|
||||||
onClick: handleEdit.bind(null, record)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
icon: 'ant-design:delete-outlined',
|
icon: 'ant-design:delete-outlined',
|
||||||
color: 'error',
|
color: 'error',
|
||||||
|
@ -34,7 +28,7 @@
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup name="ApiAccessLog">
|
<script lang="ts" setup name="ApiAccessLog">
|
||||||
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
||||||
import { ApiAccessLogExportReqVO, exportApiAccessLogApi, getApiAccessLogPageApi,deleteApiAccessLogApi} from '@/api/infra/apiAccessLog'
|
import { ApiAccessLogExportReqVO, exportApiAccessLogApi, getApiAccessLogPageApi, deleteApiAccessLogApi } from '@/api/infra/apiAccessLog'
|
||||||
import { useModal } from '@/components/Modal'
|
import { useModal } from '@/components/Modal'
|
||||||
import ApiAccessLogModel from './ApiAccessLogModel.vue'
|
import ApiAccessLogModel from './ApiAccessLogModel.vue'
|
||||||
import { columns, searchFormSchema } from './ApiAccessLog.data'
|
import { columns, searchFormSchema } from './ApiAccessLog.data'
|
||||||
|
@ -45,7 +39,7 @@ const { t } = useI18n()
|
||||||
const { createConfirm, createMessage } = useMessage()
|
const { createConfirm, createMessage } = useMessage()
|
||||||
const [registerModal, { openModal }] = useModal()
|
const [registerModal, { openModal }] = useModal()
|
||||||
const [registerTable, { getForm, reload }] = useTable({
|
const [registerTable, { getForm, reload }] = useTable({
|
||||||
title: 'API 访问日志表列表',
|
title: 'API访问日志列表',
|
||||||
api: getApiAccessLogPageApi,
|
api: getApiAccessLogPageApi,
|
||||||
columns,
|
columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
|
@ -63,19 +57,6 @@ const [registerTable, { getForm, reload }] = useTable({
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleCreate() {
|
|
||||||
openModal(true, {
|
|
||||||
isUpdate: false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleEdit(record: Recordable) {
|
|
||||||
openModal(true, {
|
|
||||||
record,
|
|
||||||
isUpdate: true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async function handleExport() {
|
async function handleExport() {
|
||||||
createConfirm({
|
createConfirm({
|
||||||
title: '导出',
|
title: '导出',
|
||||||
|
@ -93,5 +74,4 @@ async function handleDelete(record: Recordable) {
|
||||||
createMessage.success(t('common.delSuccessText'))
|
createMessage.success(t('common.delSuccessText'))
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue