000
This commit is contained in:
14
cdTMP/src/api/monitor/operationLog.js
Normal file
14
cdTMP/src/api/monitor/operationLog.js
Normal file
@@ -0,0 +1,14 @@
|
||||
import { request } from "@/api/request"
|
||||
export default {
|
||||
/**
|
||||
* 分页查询操作日志
|
||||
* @returns 操作日志分页结果
|
||||
*/
|
||||
getOperationsLogs(params = { pageSize: 10, page: 1 }) {
|
||||
return request({
|
||||
url: `/system/log/operation_list`,
|
||||
method: "get",
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ function createRequest(service) {
|
||||
"Accept-Language": "zh_CN",
|
||||
"Content-Type": get(config, "headers.Content-Type", "application/json;charset=UTF-8")
|
||||
},
|
||||
timeout: 10000,
|
||||
timeout: 20000,
|
||||
baseURL: env.VITE_APP_OPEN_PROXY === "true" ? env.VITE_APP_PROXY_PREFIX : env.VITE_APP_BASE_URL,
|
||||
data: {}
|
||||
}
|
||||
|
||||
28
cdTMP/src/router/routes/modules/minitor.js
Normal file
28
cdTMP/src/router/routes/modules/minitor.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { DEFAULT_LAYOUT } from "../base"
|
||||
|
||||
const TESTMANAGE = {
|
||||
path: "/monitor",
|
||||
name: "Monitor",
|
||||
component: DEFAULT_LAYOUT, // () => import("@/layout/default-layout.vue")
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
icon: "icon-desktop",
|
||||
order: 1,
|
||||
locale: "监控"
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "operationLog",
|
||||
name: "OperationLog",
|
||||
component: () => import("@/views/monitor/operationLog/index.vue"),
|
||||
meta: {
|
||||
requiresAuth: true,
|
||||
roles: ["*"],
|
||||
locale: "操作日志",
|
||||
icon: "icon-robot"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default TESTMANAGE
|
||||
36
cdTMP/src/views/monitor/operationLog/index.vue
Normal file
36
cdTMP/src/views/monitor/operationLog/index.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div class="ma-content-block lg:flex justify-between p-4">
|
||||
<div class="lg:w-full w-full lg:ml-4 mt-5 lg:mt-0">
|
||||
<!-- crud组件 -->
|
||||
<ma-crud :options="crudOptions" :columns="crudColumns" ref="crudRef">
|
||||
<template #create_datetime="{ record }">
|
||||
{{ record.create_datetime.replace("T", " ") }}
|
||||
</template>
|
||||
</ma-crud>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from "vue"
|
||||
import operationApi from "@/api/monitor/operationLog"
|
||||
|
||||
const crudRef = ref()
|
||||
const crudOptions = reactive({
|
||||
api: operationApi.getOperationsLogs,
|
||||
showIndex: false,
|
||||
pageLayout: "fixed",
|
||||
rowSelection: { showCheckedAll: true },
|
||||
showTools: false,
|
||||
tablePagination: false
|
||||
})
|
||||
const crudColumns = reactive([
|
||||
{ title: "ID", dataIndex: "id", addDisplay: false, editDisplay: false, width: 50, hide: true },
|
||||
{ title: "用户", dataIndex: "user", search: true, align: "center" },
|
||||
{ title: "操作对象", dataIndex: "operate_obj", align: "center" },
|
||||
{ title: "操作内容", dataIndex: "operate_des", align: "center" },
|
||||
{ title: "时间", dataIndex: "create_datetime", align: "center", search: true, formType: "range" }
|
||||
])
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped></style>
|
||||
Reference in New Issue
Block a user