perf: typo

This commit is contained in:
xingyu 2022-11-29 23:23:33 +08:00
parent 4e860eb254
commit 3cfa787ede
16 changed files with 181 additions and 54 deletions

View File

@ -3,24 +3,48 @@ import request from '@/config/axios'
export interface ApiAccessLogVO { export interface ApiAccessLogVO {
id: number id: number
traceId: string traceId: string
userId: string userId: number
userType: string userType: number
applicationName: string applicationName: string
requestMethod: string requestMethod: string
requestParams: string requestParams: string
requestUrl: string requestUrl: string
beginTime: string userIp: string
endTIme: string userAgent: string
duration: string beginTime: Date
endTIme: Date
duration: number
resultCode: number resultCode: number
resultMsg: string
createTime: Date
}
export interface ApiAccessLogPageReqVO extends PageParam {
userId?: number
userType?: number
applicationName?: string
requestUrl?: string
beginTime?: Date[]
duration?: number
resultCode?: number
}
export interface ApiAccessLogExportReqVO {
userId?: number
userType?: number
applicationName?: string
requestUrl?: string
beginTime?: Date[]
duration?: number
resultCode?: number
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiAccessLogPageApi = (params) => { export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => {
return request.get({ url: '/infra/api-access-log/page', params }) return request.get({ url: '/infra/api-access-log/page', params })
} }
// 导出API 访问日志 // 导出API 访问日志
export const exportApiAccessLogApi = (params) => { export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => {
return request.download({ url: '/infra/api-access-log/export-excel', params }) return request.download({ url: '/infra/api-access-log/export-excel', params })
} }

View File

@ -2,24 +2,51 @@ import request from '@/config/axios'
export interface ApiErrorLogVO { export interface ApiErrorLogVO {
id: number id: number
userId: string traceId: string
userIp: string userId: number
userAgent: string userType: number
userType: string
applicationName: string applicationName: string
requestMethod: string requestMethod: string
requestParams: string requestParams: string
requestUrl: string requestUrl: string
exceptionTime: string userIp: string
userAgent: string
exceptionTime: Date
exceptionName: string exceptionName: string
exceptionMessage: string
exceptionRootCauseMessage: string
exceptionStackTrace: string exceptionStackTrace: string
processUserId: string exceptionClassName: string
exceptionFileName: string
exceptionMethodName: string
exceptionLineNumber: number
processUserId: number
processStatus: number processStatus: number
processTime: Date
resultCode: number resultCode: number
createTime: Date
}
export interface ApiErrorLogPageReqVO extends PageParam {
userId?: number
userType?: number
applicationName?: string
requestUrl?: string
exceptionTime?: Date[]
processStatus: number
}
export interface ApiErrorLogExportReqVO {
userId?: number
userType?: number
applicationName?: string
requestUrl?: string
exceptionTime?: Date[]
processStatus: number
} }
// 查询列表API 访问日志 // 查询列表API 访问日志
export const getApiErrorLogPageApi = (params) => { export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => {
return request.get({ url: '/infra/api-error-log/page', params }) return request.get({ url: '/infra/api-error-log/page', params })
} }
@ -31,7 +58,7 @@ export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
} }
// 导出API 访问日志 // 导出API 访问日志
export const exportApiErrorLogApi = (params) => { export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => {
return request.download({ return request.download({
url: '/infra/api-error-log/export-excel', url: '/infra/api-error-log/export-excel',
params params

View File

@ -12,8 +12,8 @@ export type CodegenTableVO = {
className: string className: string
classComment: string classComment: string
author: string author: string
createTime: string createTime: Date
updateTime: string updateTime: Date
templateType: number templateType: number
parentMenuId: number parentMenuId: number
} }

View File

@ -2,26 +2,28 @@ import request from '@/config/axios'
export interface ConfigVO { export interface ConfigVO {
id: number id: number
group: string category: string
name: string name: string
key: string key: string
value: string value: string
type: string type: number
visible: boolean visible: boolean
remark: string remark: string
createTime: string createTime: Date
} }
export interface ConfigPageReqVO extends PageParam { export interface ConfigPageReqVO extends PageParam {
name?: string name?: string
key?: string
type?: number type?: number
createTime?: string[] createTime?: Date[]
} }
export interface ConfigExportReqVO { export interface ConfigExportReqVO {
name?: string name?: string
key?: string
type?: number type?: number
createTime?: string[] createTime?: Date[]
} }
// 查询参数列表 // 查询参数列表

View File

@ -6,7 +6,7 @@ export interface DataSourceConfigVO {
url: string url: string
username: string username: string
password: string password: string
createTime: string createTime: Date
} }
// 查询数据源配置列表 // 查询数据源配置列表

View File

@ -1,16 +1,16 @@
import request from '@/config/axios' import request from '@/config/axios'
export interface ConfigType { export interface FileClientConfig {
basePath: string basePath: string
host: string host?: string
port: string port?: number
username: string username?: string
password: string password?: string
mode: string mode?: string
endpoint: string endpoint?: string
bucket: string bucket?: string
accessKey: string accessKey?: string
accessSecret: string accessSecret?: string
domain: string domain: string
} }
export interface FileConfigVO { export interface FileConfigVO {
@ -19,13 +19,19 @@ export interface FileConfigVO {
storage: number storage: number
master: boolean master: boolean
visible: boolean visible: boolean
config: ConfigType config: FileClientConfig
remark: string remark: string
createTime: string createTime: Date
}
export interface FileConfigPageReqVO extends PageParam {
name?: string
storage?: number
createTime?: Date[]
} }
// 查询文件配置列表 // 查询文件配置列表
export const getFileConfigPageApi = (params) => { export const getFileConfigPageApi = (params: FileConfigPageReqVO) => {
return request.get({ url: '/infra/file-config/page', params }) return request.get({ url: '/infra/file-config/page', params })
} }

View File

@ -2,16 +2,19 @@ import request from '@/config/axios'
export interface FileVO { export interface FileVO {
id: number id: number
configId: number
path: string path: string
name: string
url: string url: string
size: string size: string
type: string type: string
createTime: string createTime: Date
} }
export interface FilePageReqVO extends PageParam { export interface FilePageReqVO extends PageParam {
name?: string path?: string
createTime?: string[] type?: string
createTime?: Date[]
} }
// 查询文件列表 // 查询文件列表

View File

@ -10,10 +10,23 @@ export interface JobVO {
retryCount: number retryCount: number
retryInterval: number retryInterval: number
monitorTimeout: number monitorTimeout: number
createTime: Date
}
export interface JobPageReqVO extends PageParam {
name?: string
status?: number
handlerName?: string
}
export interface JobExportReqVO {
name?: string
status?: number
handlerName?: string
} }
// 任务列表 // 任务列表
export const getJobPageApi = (params) => { export const getJobPageApi = (params: JobPageReqVO) => {
return request.get({ url: '/infra/job/page', params }) return request.get({ url: '/infra/job/page', params })
} }
@ -38,7 +51,7 @@ export const deleteJobApi = (id: number) => {
} }
// 导出定时任务调度 // 导出定时任务调度
export const exportJobApi = (params) => { export const exportJobApi = (params: JobExportReqVO) => {
return request.download({ url: '/infra/job/export-excel', params }) return request.download({ url: '/infra/job/export-excel', params })
} }

View File

@ -14,8 +14,24 @@ export interface JobLogVO {
createTime: string createTime: string
} }
export interface JobLogPageReqVO extends PageParam {
jobId?: number
handlerName?: string
beginTime?: string
endTime?: string
status?: number
}
export interface JobLogExportReqVO {
jobId?: number
handlerName?: string
beginTime?: string
endTime?: string
status?: number
}
// 任务日志列表 // 任务日志列表
export const getJobLogPageApi = (params) => { export const getJobLogPageApi = (params: JobLogPageReqVO) => {
return request.get({ url: '/infra/job-log/page', params }) return request.get({ url: '/infra/job-log/page', params })
} }
@ -25,7 +41,7 @@ export const getJobLogApi = (id: number) => {
} }
// 导出定时任务日志 // 导出定时任务日志
export const exportJobLogApi = (params) => { export const exportJobLogApi = (params: JobLogExportReqVO) => {
return request.download({ return request.download({
url: '/infra/job-log/export-excel', url: '/infra/job-log/export-excel',
params params

View File

@ -175,6 +175,14 @@ VXETable.formats.mixin({
// 格式化图片将图片链接转换为html标签 // 格式化图片将图片链接转换为html标签
formatImg({ cellValue }) { formatImg({ cellValue }) {
return '<img height="40" src="' + cellValue + '"> ' return '<img height="40" src="' + cellValue + '"> '
},
// 格式化文件大小
formatSize({ cellValue }, digits = 0) {
const unitArr = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
const srcSize = parseFloat(cellValue)
const index = Math.floor(Math.log(srcSize) / Math.log(1024))
const size = srcSize / Math.pow(1024, index)
return XEUtils.toFixed(XEUtils.floor(size, 2), 2) + ' ' + unitArr[digits]
} }
}) })
export const setupVxeTable = (app: App<Element>) => { export const setupVxeTable = (app: App<Element>) => {

View File

@ -0,0 +1,20 @@
import { ElDatePicker } from 'element-plus'
import { VXETable } from 'vxe-table'
// 日期区间选择渲染
VXETable.renderer.add('XDataPicker', {
// 默认显示模板
renderItemContent(renderOpts, params) {
const { data, field } = params
const { content } = renderOpts
return (
<ElDatePicker
v-model={data[field]}
style="width: 100%"
type={content ? (content as any) : 'datetime'}
value-format="YYYY-MM-DD HH:mm:ss"
clearable
></ElDatePicker>
)
}
})

View File

@ -1,4 +1,5 @@
import './dataTimePicker' import './dataPicker'
import './dataTimeRangePicker'
import './dict' import './dict'
import './html' import './html'
import './link' import './link'

View File

@ -11,10 +11,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
columns: [ columns: [
{ {
title: '文件名', title: '文件名',
field: 'name'
},
{
title: '文件路径',
field: 'path', field: 'path',
search: { isSearch: true
show: true
}
}, },
{ {
title: 'URL', title: 'URL',
@ -25,9 +27,15 @@ const crudSchemas = reactive<VxeCrudSchema>({
} }
} }
}, },
{
title: '文件大小',
field: 'size',
formatter: 'formatSize'
},
{ {
title: '文件类型', title: '文件类型',
field: 'type' field: 'type',
isSearch: true
}, },
{ {
title: t('common.createTime'), title: t('common.createTime'),

View File

@ -23,16 +23,15 @@ const crudSchemas = reactive<VxeCrudSchema>({
{ {
title: '任务名称', title: '任务名称',
field: 'name', field: 'name',
search: { isSearch: true
show: true
}
}, },
{ {
title: t('common.status'), title: t('common.status'),
field: 'status', field: 'status',
dictType: DICT_TYPE.INFRA_JOB_STATUS, dictType: DICT_TYPE.INFRA_JOB_STATUS,
dictClass: 'number', dictClass: 'number',
isForm: false isForm: false,
isSearch: true
}, },
{ {
title: '处理器的名字', title: '处理器的名字',

View File

@ -41,7 +41,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
search: { search: {
show: true, show: true,
itemRender: { itemRender: {
name: 'XDataTimePicker' name: 'XDataPicker'
} }
} }
}, },
@ -53,7 +53,7 @@ const crudSchemas = reactive<VxeCrudSchema>({
search: { search: {
show: true, show: true,
itemRender: { itemRender: {
name: 'XDataTimePicker' name: 'XDataPicker'
} }
} }
}, },