mirror of
https://gitee.com/JavaLionLi/plus-ui.git
synced 2026-09-15 16:28:33 +08:00
运维数据,nginx-log
This commit is contained in:
parent
f2acffd5db
commit
865f015e47
@ -1,145 +1,235 @@
|
|||||||
export interface LogsVO {
|
export interface LogsVO {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
id: string | number;
|
id: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
realIp: string;
|
realIp: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
timeLocal: string;
|
timeLocal: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestMethod: string;
|
requestMethod: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestUri: string;
|
requestUri: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userAgent: string;
|
userAgent: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestParams: string;
|
requestParams: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userToken: string;
|
userToken: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
mobile: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
userId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
deviceId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户信息表, 是否已更新
|
||||||
|
*/
|
||||||
|
isUpdateUser: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛id
|
||||||
|
*/
|
||||||
|
matchId: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
apiNames: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LogsForm extends BaseEntity {
|
export interface LogsForm extends BaseEntity {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
id?: string | number;
|
id?: string | number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
realIp?: string;
|
realIp?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
timeLocal?: string;
|
timeLocal?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestMethod?: string;
|
requestMethod?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestUri?: string;
|
requestUri?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userAgent?: string;
|
userAgent?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestParams?: string;
|
requestParams?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userToken?: string;
|
userToken?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
mobile?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
deviceId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户信息表, 是否已更新
|
||||||
|
*/
|
||||||
|
isUpdateUser?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛id
|
||||||
|
*/
|
||||||
|
matchId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
apiNames?: string;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LogsQuery extends PageQuery {
|
export interface LogsQuery extends PageQuery {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
realIp?: string;
|
realIp?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
timeLocal?: string;
|
timeLocal?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestMethod?: string;
|
requestMethod?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestUri?: string;
|
requestUri?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userAgent?: string;
|
userAgent?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
requestParams?: string;
|
requestParams?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
userToken?: string;
|
userToken?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日期范围参数
|
* 手机号
|
||||||
*/
|
*/
|
||||||
params?: any;
|
mobile?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户ID
|
||||||
|
*/
|
||||||
|
userId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
deviceId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户信息表, 是否已更新
|
||||||
|
*/
|
||||||
|
isUpdateUser?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 比赛id
|
||||||
|
*/
|
||||||
|
matchId?: string | number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
apiNames?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期范围参数
|
||||||
|
*/
|
||||||
|
params?: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -4,13 +4,16 @@
|
|||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="请求IP" prop="realIp">
|
<el-form-item label="IP" prop="realIp">
|
||||||
<el-input v-model="queryParams.realIp" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.realIp" placeholder="请输入IP" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="请求路径" prop="requestUri">
|
<el-form-item label="url" prop="requestUri">
|
||||||
<el-input v-model="queryParams.requestUri" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.requestUri" placeholder="请输入url" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="时间" prop="createdAt">
|
<el-form-item label="user_token" prop="userToken">
|
||||||
|
<el-input v-model="queryParams.userToken" placeholder="请输入token" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="访问时间" prop="createdAt">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="queryParams.createdAt"
|
v-model="queryParams.createdAt"
|
||||||
type="date"
|
type="date"
|
||||||
@ -18,6 +21,25 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="mobile">
|
||||||
|
<el-input v-model="queryParams.mobile" placeholder="请输入手机号" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="用户ID" prop="userId">
|
||||||
|
<el-input v-model="queryParams.userId" placeholder="请输入用户ID" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备ID" prop="deviceId">
|
||||||
|
<el-input v-model="queryParams.deviceId" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="更新用户信息表, 是否已更新" prop="isUpdateUser">
|
||||||
|
<el-input v-model="queryParams.isUpdateUser" placeholder="请输入更新用户信息表, 是否已更新" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="比赛ID" prop="matchId">
|
||||||
|
<el-input v-model="queryParams.matchId" placeholder="请输入比赛id" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="接口名" prop="apiNames">
|
||||||
|
<el-input v-model="queryParams.apiNames" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||||
@ -28,49 +50,55 @@
|
|||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<!-- <template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['console:logs:add']">新增</el-button>-->
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['console:logs:add']">新增</el-button>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['console:logs:edit']">修改</el-button>-->
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['console:logs:edit']">修改</el-button>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">-->
|
<el-col :span="1.5">
|
||||||
<!-- <el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['console:logs:remove']">删除</el-button>-->
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['console:logs:remove']">删除</el-button>
|
||||||
<!-- </el-col>-->
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['console:logs:export']">导出</el-button>
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['console:logs:export']">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template> -->
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="logsList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="" align="center" prop="id" v-if="true" />
|
<!-- <el-table-column label="" align="center" prop="id" v-if="true" /> -->
|
||||||
<el-table-column label="真实IP" align="center" prop="realIp" />
|
<el-table-column label="IP" align="center" prop="realIp" />
|
||||||
<el-table-column label="请求时间" align="center" prop="timeLocal" />
|
<!-- <el-table-column label="" align="center" prop="timeLocal" /> -->
|
||||||
<el-table-column label="请求方式" align="center" prop="requestMethod" />
|
<!-- <el-table-column label="" align="center" prop="requestMethod" /> -->
|
||||||
<el-table-column label="请求路径" align="center" prop="requestUri" />
|
<el-table-column label="url" align="center" prop="requestUri" />
|
||||||
<el-table-column label="" align="center" prop="userAgent" />
|
<!-- <el-table-column label="" align="center" prop="userAgent" /> -->
|
||||||
<el-table-column label="请求参数" align="center" prop="requestParams" />
|
<!-- <el-table-column label="" align="center" prop="requestParams" /> -->
|
||||||
<el-table-column label="用户token" align="center" prop="userToken" />
|
<el-table-column label="用户token" align="center" prop="userToken" />
|
||||||
<el-table-column label="" align="center" prop="createdAt" width="180">
|
<el-table-column label="访问时间" align="center" prop="createdAt" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
<el-table-column label="手机号" align="center" prop="mobile" />
|
||||||
<!-- <template #default="scope">-->
|
<el-table-column label="用户ID" align="center" prop="userId" />
|
||||||
<!-- <el-tooltip content="修改" placement="top">-->
|
<el-table-column label="设备ID" align="center" prop="deviceId" />
|
||||||
<!-- <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['console:logs:edit']"></el-button>-->
|
<!-- <el-table-column label="更新用户信息表, 是否已更新" align="center" prop="isUpdateUser" /> -->
|
||||||
<!-- </el-tooltip>-->
|
<el-table-column label="比赛id" align="center" prop="matchId" />
|
||||||
<!-- <el-tooltip content="删除" placement="top">-->
|
<el-table-column label="接口名" align="center" prop="apiNames" />
|
||||||
<!-- <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['console:logs:remove']"></el-button>-->
|
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<!-- </el-tooltip>-->
|
<template #default="scope">
|
||||||
<!-- </template>-->
|
<el-tooltip content="修改" placement="top">
|
||||||
<!-- </el-table-column>-->
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['console:logs:edit']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
<el-tooltip content="删除" placement="top">
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['console:logs:remove']"></el-button>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column> -->
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
@ -107,6 +135,24 @@
|
|||||||
placeholder="请选择">
|
placeholder="请选择">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="手机号" prop="mobile">
|
||||||
|
<el-input v-model="form.mobile" placeholder="请输入手机号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户ID" prop="userId">
|
||||||
|
<el-input v-model="form.userId" placeholder="请输入用户ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="deviceId">
|
||||||
|
<el-input v-model="form.deviceId" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新用户信息表, 是否已更新" prop="isUpdateUser">
|
||||||
|
<el-input v-model="form.isUpdateUser" placeholder="请输入更新用户信息表, 是否已更新" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="比赛id" prop="matchId">
|
||||||
|
<el-input v-model="form.matchId" placeholder="请输入比赛id" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="" prop="apiNames">
|
||||||
|
<el-input v-model="form.apiNames" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
@ -150,7 +196,13 @@ const initFormData: LogsForm = {
|
|||||||
userAgent: undefined,
|
userAgent: undefined,
|
||||||
requestParams: undefined,
|
requestParams: undefined,
|
||||||
userToken: undefined,
|
userToken: undefined,
|
||||||
createdAt: undefined
|
createdAt: undefined,
|
||||||
|
mobile: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
deviceId: undefined,
|
||||||
|
isUpdateUser: undefined,
|
||||||
|
matchId: undefined,
|
||||||
|
apiNames: undefined
|
||||||
}
|
}
|
||||||
const data = reactive<PageData<LogsForm, LogsQuery>>({
|
const data = reactive<PageData<LogsForm, LogsQuery>>({
|
||||||
form: {...initFormData},
|
form: {...initFormData},
|
||||||
@ -165,6 +217,12 @@ const data = reactive<PageData<LogsForm, LogsQuery>>({
|
|||||||
requestParams: undefined,
|
requestParams: undefined,
|
||||||
userToken: undefined,
|
userToken: undefined,
|
||||||
createdAt: undefined,
|
createdAt: undefined,
|
||||||
|
mobile: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
deviceId: undefined,
|
||||||
|
isUpdateUser: undefined,
|
||||||
|
matchId: undefined,
|
||||||
|
apiNames: undefined,
|
||||||
params: {
|
params: {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -174,7 +232,7 @@ const data = reactive<PageData<LogsForm, LogsQuery>>({
|
|||||||
],
|
],
|
||||||
createdAt: [
|
createdAt: [
|
||||||
{ required: true, message: "不能为空", trigger: "blur" }
|
{ required: true, message: "不能为空", trigger: "blur" }
|
||||||
]
|
],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -220,12 +278,12 @@ const handleSelectionChange = (selection: LogsVO[]) => {
|
|||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
// /** 新增按钮操作 */
|
||||||
const handleAdd = () => {
|
// const handleAdd = () => {
|
||||||
reset();
|
// reset();
|
||||||
dialog.visible = true;
|
// dialog.visible = true;
|
||||||
dialog.title = "添加nginx日志";
|
// dialog.title = "添加nginx日志";
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: LogsVO) => {
|
const handleUpdate = async (row?: LogsVO) => {
|
||||||
@ -265,7 +323,7 @@ const handleDelete = async (row?: LogsVO) => {
|
|||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
const handleExport = () => {
|
const handleExport = () => {
|
||||||
proxy?.download('operation/logs/export', {
|
proxy?.download('console/logs/export', {
|
||||||
...queryParams.value
|
...queryParams.value
|
||||||
}, `logs_${new Date().getTime()}.xlsx`)
|
}, `logs_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user