diff --git a/src/api/system/loginLog.ts b/src/api/system/loginLog.ts
new file mode 100644
index 0000000..2482936
--- /dev/null
+++ b/src/api/system/loginLog.ts
@@ -0,0 +1,40 @@
+import { http } from '@/utils/http/axios';
+
+/**
+ * @description: 登录日志列表
+ */
+export function getLoginLogList(params?) {
+ return http.request({
+ url: '/login/log/page',
+ method: 'GET',
+ params,
+ });
+}
+/**
+ * @description: 根据ID获取详情
+ */
+export function getLoginLogDetail(id) {
+ return http.request({
+ url: '/login/log/detail/'+id,
+ method: 'get',
+ });
+}
+/**
+ * @description: 删除登录日志
+ */
+export function loginLogDelete(id) {
+ return http.request({
+ url: '/login/log/delete/'+id,
+ method: 'DELETE',
+ });
+}
+/**
+ * @description: 批量删除登录日志
+ */
+export function loginLogBatchDelete(data:any) {
+ return http.request({
+ url: '/login/log/batchDelete',
+ method: 'DELETE',
+ data
+ });
+}
\ No newline at end of file
diff --git a/src/views/system/level/index.vue b/src/views/system/level/index.vue
index 05bd21d..9dfef46 100644
--- a/src/views/system/level/index.vue
+++ b/src/views/system/level/index.vue
@@ -108,7 +108,7 @@ const editVisible=ref(false)
};
function reloadTable() {
- tableRef.value.reload();
+ tableRef.value.reload({pageNo:1});
}
const [register, {}] = useForm({
labelWidth: 80,
diff --git a/src/views/system/loginLog/columns.ts b/src/views/system/loginLog/columns.ts
new file mode 100644
index 0000000..8176ae4
--- /dev/null
+++ b/src/views/system/loginLog/columns.ts
@@ -0,0 +1,67 @@
+import { h } from 'vue';
+import { ElTag } from 'element-plus';
+
+export const columns = [
+ {
+ type: 'selection',
+ },
+ {
+ label: '操作用户',
+ prop: 'username',
+ },
+ {
+ label: '请求ip',
+ prop: 'ip',
+ },
+ {
+ label: '浏览器',
+ prop: 'browser',
+ },
+ {
+ label: '操作系统',
+ prop: 'os',
+ },
+ {
+ label: '操作类型',
+ prop: 'typeText',
+ },
+ {
+ label: '操作来源',
+ prop: 'sourceText',
+ },
+ {
+ label: '请求方式',
+ prop: 'requestMethod',
+ },
+ {
+ label: '请求URL',
+ prop: 'url',
+ },
+ {
+ label: '请求地区',
+ prop: 'location',
+ },
+ {
+ label: '请求耗时',
+ prop: 'consumeTime',
+ },
+ {
+ label: '状态',
+ prop: 'status',
+ render(record) {
+ return h(
+ ElTag,
+ {
+ type: record.row.status ==0 ? 'success' : 'danger',
+ },
+ {
+ default: () => (record.row.status ==0 ? '正常' : '异常'),
+ },
+ );
+ },
+ },
+ {
+ label: '创建时间',
+ prop: 'createTime',
+ },
+];
diff --git a/src/views/system/loginLog/edit.vue b/src/views/system/loginLog/edit.vue
new file mode 100644
index 0000000..051e949
--- /dev/null
+++ b/src/views/system/loginLog/edit.vue
@@ -0,0 +1,112 @@
+
+
+
+
+
+
+
+
+ 正常
+ 禁用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/loginLog/index.vue b/src/views/system/loginLog/index.vue
new file mode 100644
index 0000000..cc7a36a
--- /dev/null
+++ b/src/views/system/loginLog/index.vue
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/system/loginLog/querySchemas.ts b/src/views/system/loginLog/querySchemas.ts
new file mode 100644
index 0000000..d362940
--- /dev/null
+++ b/src/views/system/loginLog/querySchemas.ts
@@ -0,0 +1,39 @@
+import { FormSchema } from '@/components/Form/index';
+export const schemas: FormSchema[] = [
+ {
+ field: 'type',
+ component: 'Select',
+ label: '请求类型',
+ componentProps: {
+ placeholder: '请选择请求类型',
+ options: [
+ {
+ label: '登录',
+ value: '0',
+ },
+ {
+ label: '退出',
+ value: '1',
+ },
+ ],
+ },
+ },
+ {
+ field: 'status',
+ component: 'Select',
+ label: '请求状态',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ {
+ label: '正常',
+ value: '0',
+ },
+ {
+ label: '异常',
+ value: '1',
+ },
+ ],
+ },
+ },
+];
diff --git a/src/views/system/position/index.vue b/src/views/system/position/index.vue
index 0955cc8..9e6ab83 100644
--- a/src/views/system/position/index.vue
+++ b/src/views/system/position/index.vue
@@ -108,7 +108,7 @@ const editVisible=ref(false)
};
function reloadTable() {
- tableRef.value.reload();
+ tableRef.value.reload({pageNo:1});
}
const [register, {}] = useForm({
labelWidth: 80,
diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue
index 964c6a8..90922e0 100644
--- a/src/views/system/role/index.vue
+++ b/src/views/system/role/index.vue
@@ -130,7 +130,7 @@ const authVisible=ref(false)
};
function reloadTable() {
- tableRef.value.reload();
+ tableRef.value.reload({pageNo:1});
}
const [register, {}] = useForm({
labelWidth: 80,
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index 80caf00..a7ca6c7 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -156,7 +156,7 @@ const uploadHeaders = reactive({
};
function reloadTable() {
- basicTableRef.value.reload();
+ basicTableRef.value.reload({pageNo:1});
}
async function handleEdit(record: Recordable) {