diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index cadaeaf30b57cf5090296a2ef4df7f81138eacac..5b06e7534a72706ee6ef7ba6c7805fdd9b46e31b 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -21,10 +21,10 @@ export interface LoginLogReqVO extends PageParam { } // 查询登录日志列表 -export const getLoginLogPageApi = (params: LoginLogReqVO) => { +export const getLoginLogPage = (params: LoginLogReqVO) => { return request.get({ url: '/system/login-log/page', params }) } // 导出登录日志 -export const exportLoginLogApi = (params: LoginLogReqVO) => { +export const exportLoginLog = (params: LoginLogReqVO) => { return request.download({ url: '/system/login-log/export', params }) } diff --git a/src/styles/index.scss b/src/styles/index.scss index 39c4c4dae88eafc181efeddf20782e681eeb4a26..02c187a5ef7b0b8a667e2532c7952d4ca12661b1 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -26,3 +26,9 @@ border-left-color: var(--el-color-primary); } } + +// 添加表头样式 +.el-table.yudao-table { + --el-table-header-bg-color: #f8f8f9; + --el-table-header-text-color: #606266; +} diff --git a/src/views/infra/codegen/components/ImportTable.vue b/src/views/infra/codegen/components/ImportTable.vue index 38a81541cf0c77039d7dc6a6b6747357188b57b8..3d56d5fc42f9e5fe80e354ac18cc9b536596b577 100644 --- a/src/views/infra/codegen/components/ImportTable.vue +++ b/src/views/infra/codegen/components/ImportTable.vue @@ -52,7 +52,7 @@ import { VxeTableInstance } from 'vxe-table' import type { DatabaseTableVO } from '@/api/infra/codegen/types' import { getSchemaTableListApi, createCodegenListApi } from '@/api/infra/codegen' -import { getDataSourceConfigListApi, DataSourceConfigVO } from '@/api/infra/dataSourceConfig' +import { getDataSourceConfigList, DataSourceConfigVO } from '@/api/infra/dataSourceConfig' const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 @@ -63,11 +63,11 @@ const dbLoading = ref(true) const queryParams = reactive({ name: undefined, comment: undefined, - dataSourceConfigId: 0 + dataSourceConfigId: 0 as number | undefined }) const dataSourceConfigs = ref([]) const show = async () => { - const res = await getDataSourceConfigListApi() + const res = await getDataSourceConfigList() dataSourceConfigs.value = res queryParams.dataSourceConfigId = dataSourceConfigs.value[0].id visible.value = true diff --git a/src/views/system/loginlog/detail.vue b/src/views/system/loginlog/detail.vue new file mode 100644 index 0000000000000000000000000000000000000000..8372d2e6e5a8b6b391e172cb118e22002a66f005 --- /dev/null +++ b/src/views/system/loginlog/detail.vue @@ -0,0 +1,49 @@ + + diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue index f2bb8c6777066ffa446191d77b0affa61973df13..f5a695fc51ef1378d5c4124f5d51189f69b8aae8 100644 --- a/src/views/system/loginlog/index.vue +++ b/src/views/system/loginlog/index.vue @@ -1,53 +1,176 @@ - diff --git a/src/views/system/loginlog/loginLog.data.ts b/src/views/system/loginlog/loginLog.data.ts deleted file mode 100644 index c0a51fbee49bed1e6af2b4d68b9530977f76925a..0000000000000000000000000000000000000000 --- a/src/views/system/loginlog/loginLog.data.ts +++ /dev/null @@ -1,53 +0,0 @@ -import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas' - -// CrudSchema -const crudSchemas = reactive({ - primaryKey: 'id', - primaryType: 'id', - primaryTitle: '日志编号', - action: true, - actionWidth: '100px', - columns: [ - { - title: '日志类型', - field: 'logType', - dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE, - dictClass: 'number' - }, - { - title: '用户名称', - field: 'username', - isSearch: true - }, - { - title: '登录地址', - field: 'userIp', - isSearch: true - }, - { - title: '浏览器', - field: 'userAgent' - }, - { - title: '登陆结果', - field: 'result', - dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT, - dictClass: 'number' - }, - { - title: '登录日期', - field: 'createTime', - formatter: 'formatDate', - table: { - width: 150 - }, - search: { - show: true, - itemRender: { - name: 'XDataTimePicker' - } - } - } - ] -}) -export const { allSchemas } = useVxeCrudSchemas(crudSchemas)