From 33a9b5af863f2bb8ee60f72bbe277f2fe3bfff9d Mon Sep 17 00:00:00 2001 From: lour6498 Date: Tue, 21 Mar 2023 10:00:32 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix(=E6=95=B0=E6=8D=AE=E6=BA=90=E9=85=8D?= =?UTF-8?q?=E7=BD=AE):=20=E9=A1=B5=E9=9D=A2api=E6=9C=AA=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/infra/codegen/components/ImportTable.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/infra/codegen/components/ImportTable.vue b/src/views/infra/codegen/components/ImportTable.vue index 38a81541..3d56d5fc 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 From a7503322107ad890908c9986e23949af9c7acdd7 Mon Sep 17 00:00:00 2001 From: lour6498 Date: Tue, 21 Mar 2023 10:01:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?Vue3=20=E9=87=8D=E6=9E=84=EF=BC=9A=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/loginLog/index.ts | 4 +- src/styles/index.scss | 6 + src/views/system/loginlog/detail.vue | 49 +++++ src/views/system/loginlog/index.vue | 213 ++++++++++++++++----- src/views/system/loginlog/loginLog.data.ts | 53 ----- 5 files changed, 225 insertions(+), 100 deletions(-) create mode 100644 src/views/system/loginlog/detail.vue delete mode 100644 src/views/system/loginlog/loginLog.data.ts diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index cadaeaf3..5b06e753 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 39c4c4da..02c187a5 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/system/loginlog/detail.vue b/src/views/system/loginlog/detail.vue new file mode 100644 index 00000000..8372d2e6 --- /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 f2bb8c67..f5a695fc 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 c0a51fbe..00000000 --- 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)