Commit 3cfa787edeea3876dc05d4b99c7f34b375dd4e12

Authored by xingyu
1 parent 4e860eb2

perf: typo

yudao-ui-admin-vue3/src/api/infra/apiAccessLog/index.ts
@@ -3,24 +3,48 @@ import request from '@/config/axios' @@ -3,24 +3,48 @@ import request from '@/config/axios'
3 export interface ApiAccessLogVO { 3 export interface ApiAccessLogVO {
4 id: number 4 id: number
5 traceId: string 5 traceId: string
6 - userId: string  
7 - userType: string 6 + userId: number
  7 + userType: number
8 applicationName: string 8 applicationName: string
9 requestMethod: string 9 requestMethod: string
10 requestParams: string 10 requestParams: string
11 requestUrl: string 11 requestUrl: string
12 - beginTime: string  
13 - endTIme: string  
14 - duration: string 12 + userIp: string
  13 + userAgent: string
  14 + beginTime: Date
  15 + endTIme: Date
  16 + duration: number
15 resultCode: number 17 resultCode: number
  18 + resultMsg: string
  19 + createTime: Date
  20 +}
  21 +
  22 +export interface ApiAccessLogPageReqVO extends PageParam {
  23 + userId?: number
  24 + userType?: number
  25 + applicationName?: string
  26 + requestUrl?: string
  27 + beginTime?: Date[]
  28 + duration?: number
  29 + resultCode?: number
  30 +}
  31 +
  32 +export interface ApiAccessLogExportReqVO {
  33 + userId?: number
  34 + userType?: number
  35 + applicationName?: string
  36 + requestUrl?: string
  37 + beginTime?: Date[]
  38 + duration?: number
  39 + resultCode?: number
16 } 40 }
17 41
18 // 查询列表API 访问日志 42 // 查询列表API 访问日志
19 -export const getApiAccessLogPageApi = (params) => { 43 +export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => {
20 return request.get({ url: '/infra/api-access-log/page', params }) 44 return request.get({ url: '/infra/api-access-log/page', params })
21 } 45 }
22 46
23 // 导出API 访问日志 47 // 导出API 访问日志
24 -export const exportApiAccessLogApi = (params) => { 48 +export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => {
25 return request.download({ url: '/infra/api-access-log/export-excel', params }) 49 return request.download({ url: '/infra/api-access-log/export-excel', params })
26 } 50 }
yudao-ui-admin-vue3/src/api/infra/apiErrorLog/index.ts
@@ -2,24 +2,51 @@ import request from '@/config/axios' @@ -2,24 +2,51 @@ import request from '@/config/axios'
2 2
3 export interface ApiErrorLogVO { 3 export interface ApiErrorLogVO {
4 id: number 4 id: number
5 - userId: string  
6 - userIp: string  
7 - userAgent: string  
8 - userType: string 5 + traceId: string
  6 + userId: number
  7 + userType: number
9 applicationName: string 8 applicationName: string
10 requestMethod: string 9 requestMethod: string
11 requestParams: string 10 requestParams: string
12 requestUrl: string 11 requestUrl: string
13 - exceptionTime: string 12 + userIp: string
  13 + userAgent: string
  14 + exceptionTime: Date
14 exceptionName: string 15 exceptionName: string
  16 + exceptionMessage: string
  17 + exceptionRootCauseMessage: string
15 exceptionStackTrace: string 18 exceptionStackTrace: string
16 - processUserId: string 19 + exceptionClassName: string
  20 + exceptionFileName: string
  21 + exceptionMethodName: string
  22 + exceptionLineNumber: number
  23 + processUserId: number
17 processStatus: number 24 processStatus: number
  25 + processTime: Date
18 resultCode: number 26 resultCode: number
  27 + createTime: Date
  28 +}
  29 +
  30 +export interface ApiErrorLogPageReqVO extends PageParam {
  31 + userId?: number
  32 + userType?: number
  33 + applicationName?: string
  34 + requestUrl?: string
  35 + exceptionTime?: Date[]
  36 + processStatus: number
  37 +}
  38 +
  39 +export interface ApiErrorLogExportReqVO {
  40 + userId?: number
  41 + userType?: number
  42 + applicationName?: string
  43 + requestUrl?: string
  44 + exceptionTime?: Date[]
  45 + processStatus: number
19 } 46 }
20 47
21 // 查询列表API 访问日志 48 // 查询列表API 访问日志
22 -export const getApiErrorLogPageApi = (params) => { 49 +export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => {
23 return request.get({ url: '/infra/api-error-log/page', params }) 50 return request.get({ url: '/infra/api-error-log/page', params })
24 } 51 }
25 52
@@ -31,7 +58,7 @@ export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { @@ -31,7 +58,7 @@ export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
31 } 58 }
32 59
33 // 导出API 访问日志 60 // 导出API 访问日志
34 -export const exportApiErrorLogApi = (params) => { 61 +export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => {
35 return request.download({ 62 return request.download({
36 url: '/infra/api-error-log/export-excel', 63 url: '/infra/api-error-log/export-excel',
37 params 64 params
yudao-ui-admin-vue3/src/api/infra/codegen/types.ts
@@ -12,8 +12,8 @@ export type CodegenTableVO = { @@ -12,8 +12,8 @@ export type CodegenTableVO = {
12 className: string 12 className: string
13 classComment: string 13 classComment: string
14 author: string 14 author: string
15 - createTime: string  
16 - updateTime: string 15 + createTime: Date
  16 + updateTime: Date
17 templateType: number 17 templateType: number
18 parentMenuId: number 18 parentMenuId: number
19 } 19 }
yudao-ui-admin-vue3/src/api/infra/config/index.ts
@@ -2,26 +2,28 @@ import request from '@/config/axios' @@ -2,26 +2,28 @@ import request from '@/config/axios'
2 2
3 export interface ConfigVO { 3 export interface ConfigVO {
4 id: number 4 id: number
5 - group: string 5 + category: string
6 name: string 6 name: string
7 key: string 7 key: string
8 value: string 8 value: string
9 - type: string 9 + type: number
10 visible: boolean 10 visible: boolean
11 remark: string 11 remark: string
12 - createTime: string 12 + createTime: Date
13 } 13 }
14 14
15 export interface ConfigPageReqVO extends PageParam { 15 export interface ConfigPageReqVO extends PageParam {
16 name?: string 16 name?: string
  17 + key?: string
17 type?: number 18 type?: number
18 - createTime?: string[] 19 + createTime?: Date[]
19 } 20 }
20 21
21 export interface ConfigExportReqVO { 22 export interface ConfigExportReqVO {
22 name?: string 23 name?: string
  24 + key?: string
23 type?: number 25 type?: number
24 - createTime?: string[] 26 + createTime?: Date[]
25 } 27 }
26 28
27 // 查询参数列表 29 // 查询参数列表
yudao-ui-admin-vue3/src/api/infra/dataSourceConfig/index.ts
@@ -6,7 +6,7 @@ export interface DataSourceConfigVO { @@ -6,7 +6,7 @@ export interface DataSourceConfigVO {
6 url: string 6 url: string
7 username: string 7 username: string
8 password: string 8 password: string
9 - createTime: string 9 + createTime: Date
10 } 10 }
11 11
12 // 查询数据源配置列表 12 // 查询数据源配置列表
yudao-ui-admin-vue3/src/api/infra/fileConfig/index.ts
1 import request from '@/config/axios' 1 import request from '@/config/axios'
2 2
3 -export interface ConfigType { 3 +export interface FileClientConfig {
4 basePath: string 4 basePath: string
5 - host: string  
6 - port: string  
7 - username: string  
8 - password: string  
9 - mode: string  
10 - endpoint: string  
11 - bucket: string  
12 - accessKey: string  
13 - accessSecret: string 5 + host?: string
  6 + port?: number
  7 + username?: string
  8 + password?: string
  9 + mode?: string
  10 + endpoint?: string
  11 + bucket?: string
  12 + accessKey?: string
  13 + accessSecret?: string
14 domain: string 14 domain: string
15 } 15 }
16 export interface FileConfigVO { 16 export interface FileConfigVO {
@@ -19,13 +19,19 @@ export interface FileConfigVO { @@ -19,13 +19,19 @@ export interface FileConfigVO {
19 storage: number 19 storage: number
20 master: boolean 20 master: boolean
21 visible: boolean 21 visible: boolean
22 - config: ConfigType 22 + config: FileClientConfig
23 remark: string 23 remark: string
24 - createTime: string 24 + createTime: Date
  25 +}
  26 +
  27 +export interface FileConfigPageReqVO extends PageParam {
  28 + name?: string
  29 + storage?: number
  30 + createTime?: Date[]
25 } 31 }
26 32
27 // 查询文件配置列表 33 // 查询文件配置列表
28 -export const getFileConfigPageApi = (params) => { 34 +export const getFileConfigPageApi = (params: FileConfigPageReqVO) => {
29 return request.get({ url: '/infra/file-config/page', params }) 35 return request.get({ url: '/infra/file-config/page', params })
30 } 36 }
31 37
yudao-ui-admin-vue3/src/api/infra/fileList/index.ts
@@ -2,16 +2,19 @@ import request from '@/config/axios' @@ -2,16 +2,19 @@ import request from '@/config/axios'
2 2
3 export interface FileVO { 3 export interface FileVO {
4 id: number 4 id: number
  5 + configId: number
5 path: string 6 path: string
  7 + name: string
6 url: string 8 url: string
7 size: string 9 size: string
8 type: string 10 type: string
9 - createTime: string 11 + createTime: Date
10 } 12 }
11 13
12 export interface FilePageReqVO extends PageParam { 14 export interface FilePageReqVO extends PageParam {
13 - name?: string  
14 - createTime?: string[] 15 + path?: string
  16 + type?: string
  17 + createTime?: Date[]
15 } 18 }
16 19
17 // 查询文件列表 20 // 查询文件列表
yudao-ui-admin-vue3/src/api/infra/job/index.ts
@@ -10,10 +10,23 @@ export interface JobVO { @@ -10,10 +10,23 @@ export interface JobVO {
10 retryCount: number 10 retryCount: number
11 retryInterval: number 11 retryInterval: number
12 monitorTimeout: number 12 monitorTimeout: number
  13 + createTime: Date
  14 +}
  15 +
  16 +export interface JobPageReqVO extends PageParam {
  17 + name?: string
  18 + status?: number
  19 + handlerName?: string
  20 +}
  21 +
  22 +export interface JobExportReqVO {
  23 + name?: string
  24 + status?: number
  25 + handlerName?: string
13 } 26 }
14 27
15 // 任务列表 28 // 任务列表
16 -export const getJobPageApi = (params) => { 29 +export const getJobPageApi = (params: JobPageReqVO) => {
17 return request.get({ url: '/infra/job/page', params }) 30 return request.get({ url: '/infra/job/page', params })
18 } 31 }
19 32
@@ -38,7 +51,7 @@ export const deleteJobApi = (id: number) => { @@ -38,7 +51,7 @@ export const deleteJobApi = (id: number) => {
38 } 51 }
39 52
40 // 导出定时任务调度 53 // 导出定时任务调度
41 -export const exportJobApi = (params) => { 54 +export const exportJobApi = (params: JobExportReqVO) => {
42 return request.download({ url: '/infra/job/export-excel', params }) 55 return request.download({ url: '/infra/job/export-excel', params })
43 } 56 }
44 57
yudao-ui-admin-vue3/src/api/infra/jobLog/index.ts
@@ -14,8 +14,24 @@ export interface JobLogVO { @@ -14,8 +14,24 @@ export interface JobLogVO {
14 createTime: string 14 createTime: string
15 } 15 }
16 16
  17 +export interface JobLogPageReqVO extends PageParam {
  18 + jobId?: number
  19 + handlerName?: string
  20 + beginTime?: string
  21 + endTime?: string
  22 + status?: number
  23 +}
  24 +
  25 +export interface JobLogExportReqVO {
  26 + jobId?: number
  27 + handlerName?: string
  28 + beginTime?: string
  29 + endTime?: string
  30 + status?: number
  31 +}
  32 +
17 // 任务日志列表 33 // 任务日志列表
18 -export const getJobLogPageApi = (params) => { 34 +export const getJobLogPageApi = (params: JobLogPageReqVO) => {
19 return request.get({ url: '/infra/job-log/page', params }) 35 return request.get({ url: '/infra/job-log/page', params })
20 } 36 }
21 37
@@ -25,7 +41,7 @@ export const getJobLogApi = (id: number) => { @@ -25,7 +41,7 @@ export const getJobLogApi = (id: number) => {
25 } 41 }
26 42
27 // 导出定时任务日志 43 // 导出定时任务日志
28 -export const exportJobLogApi = (params) => { 44 +export const exportJobLogApi = (params: JobLogExportReqVO) => {
29 return request.download({ 45 return request.download({
30 url: '/infra/job-log/export-excel', 46 url: '/infra/job-log/export-excel',
31 params 47 params
yudao-ui-admin-vue3/src/plugins/vxeTable/index.ts
@@ -175,6 +175,14 @@ VXETable.formats.mixin({ @@ -175,6 +175,14 @@ VXETable.formats.mixin({
175 // 格式化图片,将图片链接转换为html标签 175 // 格式化图片,将图片链接转换为html标签
176 formatImg({ cellValue }) { 176 formatImg({ cellValue }) {
177 return '<img height="40" src="' + cellValue + '"> ' 177 return '<img height="40" src="' + cellValue + '"> '
  178 + },
  179 + // 格式化文件大小
  180 + formatSize({ cellValue }, digits = 0) {
  181 + const unitArr = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
  182 + const srcSize = parseFloat(cellValue)
  183 + const index = Math.floor(Math.log(srcSize) / Math.log(1024))
  184 + const size = srcSize / Math.pow(1024, index)
  185 + return XEUtils.toFixed(XEUtils.floor(size, 2), 2) + ' ' + unitArr[digits]
178 } 186 }
179 }) 187 })
180 export const setupVxeTable = (app: App<Element>) => { 188 export const setupVxeTable = (app: App<Element>) => {
yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataPicker.tsx 0 → 100644
  1 +import { ElDatePicker } from 'element-plus'
  2 +import { VXETable } from 'vxe-table'
  3 +
  4 +// 日期区间选择渲染
  5 +VXETable.renderer.add('XDataPicker', {
  6 + // 默认显示模板
  7 + renderItemContent(renderOpts, params) {
  8 + const { data, field } = params
  9 + const { content } = renderOpts
  10 + return (
  11 + <ElDatePicker
  12 + v-model={data[field]}
  13 + style="width: 100%"
  14 + type={content ? (content as any) : 'datetime'}
  15 + value-format="YYYY-MM-DD HH:mm:ss"
  16 + clearable
  17 + ></ElDatePicker>
  18 + )
  19 + }
  20 +})
yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimePicker.tsx renamed to yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/dataTimeRangePicker.tsx
yudao-ui-admin-vue3/src/plugins/vxeTable/renderer/index.tsx
1 -import './dataTimePicker' 1 +import './dataPicker'
  2 +import './dataTimeRangePicker'
2 import './dict' 3 import './dict'
3 import './html' 4 import './html'
4 import './link' 5 import './link'
yudao-ui-admin-vue3/src/views/infra/fileList/fileList.data.ts
@@ -11,10 +11,12 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({ @@ -11,10 +11,12 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
11 columns: [ 11 columns: [
12 { 12 {
13 title: '文件名', 13 title: '文件名',
  14 + field: 'name'
  15 + },
  16 + {
  17 + title: '文件路径',
14 field: 'path', 18 field: 'path',
15 - search: {  
16 - show: true  
17 - } 19 + isSearch: true
18 }, 20 },
19 { 21 {
20 title: 'URL', 22 title: 'URL',
@@ -26,8 +28,14 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({ @@ -26,8 +28,14 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
26 } 28 }
27 }, 29 },
28 { 30 {
  31 + title: '文件大小',
  32 + field: 'size',
  33 + formatter: 'formatSize'
  34 + },
  35 + {
29 title: '文件类型', 36 title: '文件类型',
30 - field: 'type' 37 + field: 'type',
  38 + isSearch: true
31 }, 39 },
32 { 40 {
33 title: t('common.createTime'), 41 title: t('common.createTime'),
yudao-ui-admin-vue3/src/views/infra/job/job.data.ts
@@ -23,16 +23,15 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({ @@ -23,16 +23,15 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
23 { 23 {
24 title: '任务名称', 24 title: '任务名称',
25 field: 'name', 25 field: 'name',
26 - search: {  
27 - show: true  
28 - } 26 + isSearch: true
29 }, 27 },
30 { 28 {
31 title: t('common.status'), 29 title: t('common.status'),
32 field: 'status', 30 field: 'status',
33 dictType: DICT_TYPE.INFRA_JOB_STATUS, 31 dictType: DICT_TYPE.INFRA_JOB_STATUS,
34 dictClass: 'number', 32 dictClass: 'number',
35 - isForm: false 33 + isForm: false,
  34 + isSearch: true
36 }, 35 },
37 { 36 {
38 title: '处理器的名字', 37 title: '处理器的名字',
yudao-ui-admin-vue3/src/views/infra/job/jobLog.data.ts
@@ -41,7 +41,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({ @@ -41,7 +41,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
41 search: { 41 search: {
42 show: true, 42 show: true,
43 itemRender: { 43 itemRender: {
44 - name: 'XDataTimePicker' 44 + name: 'XDataPicker'
45 } 45 }
46 } 46 }
47 }, 47 },
@@ -53,7 +53,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({ @@ -53,7 +53,7 @@ const crudSchemas = reactive&lt;VxeCrudSchema&gt;({
53 search: { 53 search: {
54 show: true, 54 show: true,
55 itemRender: { 55 itemRender: {
56 - name: 'XDataTimePicker' 56 + name: 'XDataPicker'
57 } 57 }
58 } 58 }
59 }, 59 },