refactor(api): code style
parent
0216cce5c2
commit
3d588baac4
|
@ -40,11 +40,11 @@ export interface ApiAccessLogExportReqVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表API 访问日志
|
// 查询列表API 访问日志
|
||||||
export function getApiAccessLogPageApi(params: ApiAccessLogPageReqVO) {
|
export function getApiAccessLogPage(params: ApiAccessLogPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/api-access-log/page', params })
|
return defHttp.get({ url: '/infra/api-access-log/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出API 访问日志
|
// 导出API 访问日志
|
||||||
export function exportApiAccessLogApi(params: ApiAccessLogExportReqVO) {
|
export function exportApiAccessLog(params: ApiAccessLogExportReqVO) {
|
||||||
return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls')
|
return defHttp.download({ url: '/infra/api-access-log/export-excel', params }, '访问日志.xls')
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,19 +46,19 @@ export interface ApiErrorLogExportReqVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询列表API 访问日志
|
// 查询列表API 访问日志
|
||||||
export function getApiErrorLogPageApi(params: ApiErrorLogPageReqVO) {
|
export function getApiErrorLogPage(params: ApiErrorLogPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/api-error-log/page', params })
|
return defHttp.get({ url: '/infra/api-error-log/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新 API 错误日志的处理状态
|
// 更新 API 错误日志的处理状态
|
||||||
export function updateApiErrorLogPageApi(id: number, processStatus: number) {
|
export function updateApiErrorLogPage(id: number, processStatus: number) {
|
||||||
return defHttp.put({
|
return defHttp.put({
|
||||||
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出API 错误日志
|
// 导出API 错误日志
|
||||||
export function exportApiErrorLogApi(params: ApiErrorLogExportReqVO) {
|
export function exportApiErrorLog(params: ApiErrorLogExportReqVO) {
|
||||||
return defHttp.download(
|
return defHttp.download(
|
||||||
{
|
{
|
||||||
url: '/infra/api-error-log/export-excel',
|
url: '/infra/api-error-log/export-excel',
|
||||||
|
|
|
@ -2,56 +2,56 @@ import { defHttp } from '@/utils/http/axios'
|
||||||
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
|
import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types'
|
||||||
|
|
||||||
// 查询列表代码生成表定义
|
// 查询列表代码生成表定义
|
||||||
export function getCodegenTablePageApi(params) {
|
export function getCodegenTablePage(params) {
|
||||||
return defHttp.get({ url: '/infra/codegen/table/page', params })
|
return defHttp.get({ url: '/infra/codegen/table/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询详情代码生成表定义
|
// 查询详情代码生成表定义
|
||||||
export function getCodegenTableApi(id: number) {
|
export function getCodegenTable(id: number) {
|
||||||
return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id })
|
return defHttp.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增代码生成表定义
|
// 新增代码生成表定义
|
||||||
export function createCodegenTableApi(data: CodegenCreateListReqVO) {
|
export function createCodegenTable(data: CodegenCreateListReqVO) {
|
||||||
return defHttp.post({ url: '/infra/codegen/create', data })
|
return defHttp.post({ url: '/infra/codegen/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改代码生成表定义
|
// 修改代码生成表定义
|
||||||
export function updateCodegenTableApi(data: CodegenUpdateReqVO) {
|
export function updateCodegenTable(data: CodegenUpdateReqVO) {
|
||||||
return defHttp.put({ url: '/infra/codegen/update', data })
|
return defHttp.put({ url: '/infra/codegen/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于数据库的表结构,同步数据库的表和字段定义
|
// 基于数据库的表结构,同步数据库的表和字段定义
|
||||||
export function syncCodegenFromDBApi(id: number) {
|
export function syncCodegenFromDB(id: number) {
|
||||||
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
// 基于 SQL 建表语句,同步数据库的表和字段定义
|
||||||
export function syncCodegenFromSQLApi(id: number, sql: string) {
|
export function syncCodegenFromSQL(id: number, sql: string) {
|
||||||
return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
return defHttp.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 预览生成代码
|
// 预览生成代码
|
||||||
export function previewCodegenApi(id: number) {
|
export function previewCodegen(id: number) {
|
||||||
return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id })
|
return defHttp.get({ url: '/infra/codegen/preview?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 下载生成代码
|
// 下载生成代码
|
||||||
export function downloadCodegenApi(id: number) {
|
export function downloadCodegen(id: number) {
|
||||||
return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip')
|
return defHttp.download({ url: '/infra/codegen/download?tableId=' + id }, '生成代码.zip')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得表定义
|
// 获得表定义
|
||||||
export function getSchemaTableListApi(params) {
|
export function getSchemaTableList(params) {
|
||||||
return defHttp.get({ url: '/infra/codegen/db/table/list', params })
|
return defHttp.get({ url: '/infra/codegen/db/table/list', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 基于数据库的表结构,创建代码生成器的表定义
|
// 基于数据库的表结构,创建代码生成器的表定义
|
||||||
export function createCodegenListApi(data) {
|
export function createCodegenList(data) {
|
||||||
return defHttp.post({ url: '/infra/codegen/create-list', data })
|
return defHttp.post({ url: '/infra/codegen/create-list', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除代码生成表定义
|
// 删除代码生成表定义
|
||||||
export function deleteCodegenTableApi(id: number) {
|
export function deleteCodegenTable(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,36 +27,36 @@ export interface ConfigExportReqVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询参数列表
|
// 查询参数列表
|
||||||
export function getConfigPageApi(params: ConfigPageReqVO) {
|
export function getConfigPage(params: ConfigPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/config/page', params })
|
return defHttp.get({ url: '/infra/config/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询参数详情
|
// 查询参数详情
|
||||||
export function getConfigApi(id: number) {
|
export function getConfig(id: number) {
|
||||||
return defHttp.get({ url: '/infra/config/get?id=' + id })
|
return defHttp.get({ url: '/infra/config/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据参数键名查询参数值
|
// 根据参数键名查询参数值
|
||||||
export function getConfigKeyApi(configKey: string) {
|
export function getConfigKey(configKey: string) {
|
||||||
return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
return defHttp.get({ url: '/infra/config/get-value-by-key?key=' + configKey })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增参数
|
// 新增参数
|
||||||
export function createConfigApi(data: ConfigVO) {
|
export function createConfig(data: ConfigVO) {
|
||||||
return defHttp.post({ url: '/infra/config/create', data })
|
return defHttp.post({ url: '/infra/config/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改参数
|
// 修改参数
|
||||||
export function updateConfigApi(data: ConfigVO) {
|
export function updateConfig(data: ConfigVO) {
|
||||||
return defHttp.put({ url: '/infra/config/update', data })
|
return defHttp.put({ url: '/infra/config/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除参数
|
// 删除参数
|
||||||
export function deleteConfigApi(id: number) {
|
export function deleteConfig(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/config/delete?id=' + id })
|
return defHttp.delete({ url: '/infra/config/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出参数
|
// 导出参数
|
||||||
export function exportConfigApi(params: ConfigExportReqVO) {
|
export function exportConfig(params: ConfigExportReqVO) {
|
||||||
return defHttp.download({ url: '/infra/config/export', params }, '参数.xls')
|
return defHttp.download({ url: '/infra/config/export', params }, '参数.xls')
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,26 +10,26 @@ export interface DataSourceConfigVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询数据源配置列表
|
// 查询数据源配置列表
|
||||||
export function getDataSourceConfigListApi() {
|
export function getDataSourceConfigList() {
|
||||||
return defHttp.get({ url: '/infra/data-source-config/list' })
|
return defHttp.get({ url: '/infra/data-source-config/list' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询数据源配置详情
|
// 查询数据源配置详情
|
||||||
export function getDataSourceConfigApi(id: number) {
|
export function getDataSourceConfig(id: number) {
|
||||||
return defHttp.get({ url: '/infra/data-source-config/get?id=' + id })
|
return defHttp.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增数据源配置
|
// 新增数据源配置
|
||||||
export function createDataSourceConfigApi(data: DataSourceConfigVO) {
|
export function createDataSourceConfig(data: DataSourceConfigVO) {
|
||||||
return defHttp.post({ url: '/infra/data-source-config/create', data })
|
return defHttp.post({ url: '/infra/data-source-config/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改数据源配置
|
// 修改数据源配置
|
||||||
export function updateDataSourceConfigApi(data: DataSourceConfigVO) {
|
export function updateDataSourceConfig(data: DataSourceConfigVO) {
|
||||||
return defHttp.put({ url: '/infra/data-source-config/update', data })
|
return defHttp.put({ url: '/infra/data-source-config/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除数据源配置
|
// 删除数据源配置
|
||||||
export function deleteDataSourceConfigApi(id: number) {
|
export function deleteDataSourceConfig(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import { defHttp } from '@/utils/http/axios'
|
import { defHttp } from '@/utils/http/axios'
|
||||||
|
|
||||||
// 导出Html
|
// 导出Html
|
||||||
export function exportHtmlApiasync() {
|
export function exportHtml() {
|
||||||
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
|
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出Word
|
// 导出Word
|
||||||
export function exportWordApi() {
|
export function exportWord() {
|
||||||
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
|
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出Markdown
|
// 导出Markdown
|
||||||
export function exportMarkdownApi() {
|
export function exportMarkdown() {
|
||||||
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
|
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,11 @@ export interface FilePageReqVO extends PageParam {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询文件列表
|
// 查询文件列表
|
||||||
export function getFilePageApi(params: FilePageReqVO) {
|
export function getFilePage(params: FilePageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/file/page', params })
|
return defHttp.get({ url: '/infra/file/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除文件
|
// 删除文件
|
||||||
export function deleteFileApi(id: number) {
|
export function deleteFile(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/file/delete?id=' + id })
|
return defHttp.delete({ url: '/infra/file/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,36 +31,36 @@ export interface FileConfigPageReqVO extends PageParam {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询文件配置列表
|
// 查询文件配置列表
|
||||||
export function getFileConfigPageApi(params: FileConfigPageReqVO) {
|
export function getFileConfigPage(params: FileConfigPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/file-config/page', params })
|
return defHttp.get({ url: '/infra/file-config/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询文件配置详情
|
// 查询文件配置详情
|
||||||
export function getFileConfigApi(id: number) {
|
export function getFileConfig(id: number) {
|
||||||
return defHttp.get({ url: '/infra/file-config/get?id=' + id })
|
return defHttp.get({ url: '/infra/file-config/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新文件配置为主配置
|
// 更新文件配置为主配置
|
||||||
export function updateFileConfigMasterApi(id: number) {
|
export function updateFileConfigMaster(id: number) {
|
||||||
return defHttp.put({ url: '/infra/file-config/update-master?id=' + id })
|
return defHttp.put({ url: '/infra/file-config/update-master?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增文件配置
|
// 新增文件配置
|
||||||
export function createFileConfigApi(data: FileConfigVO) {
|
export function createFileConfig(data: FileConfigVO) {
|
||||||
return defHttp.post({ url: '/infra/file-config/create', data })
|
return defHttp.post({ url: '/infra/file-config/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改文件配置
|
// 修改文件配置
|
||||||
export function updateFileConfigApi(data: FileConfigVO) {
|
export function updateFileConfig(data: FileConfigVO) {
|
||||||
return defHttp.put({ url: '/infra/file-config/update', data })
|
return defHttp.put({ url: '/infra/file-config/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除文件配置
|
// 删除文件配置
|
||||||
export function deleteFileConfigApi(id: number) {
|
export function deleteFileConfig(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
|
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 测试文件配置
|
// 测试文件配置
|
||||||
export function testFileConfigApi(id: number) {
|
export function testFileConfig(id: number) {
|
||||||
return defHttp.get({ url: '/infra/file-config/test?id=' + id })
|
return defHttp.get({ url: '/infra/file-config/test?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,37 +26,37 @@ export interface JobExportReqVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务列表
|
// 任务列表
|
||||||
export function getJobPageApi(params: JobPageReqVO) {
|
export function getJobPage(params: JobPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/job/page', params })
|
return defHttp.get({ url: '/infra/job/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务详情
|
// 任务详情
|
||||||
export function getJobApi(id: number) {
|
export function getJob(id: number) {
|
||||||
return defHttp.get({ url: '/infra/job/get?id=' + id })
|
return defHttp.get({ url: '/infra/job/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增任务
|
// 新增任务
|
||||||
export function createJobApi(data: JobVO) {
|
export function createJob(data: JobVO) {
|
||||||
return defHttp.post({ url: '/infra/job/create', data })
|
return defHttp.post({ url: '/infra/job/create', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改定时任务调度
|
// 修改定时任务调度
|
||||||
export function updateJobApi(data: JobVO) {
|
export function updateJob(data: JobVO) {
|
||||||
return defHttp.put({ url: '/infra/job/update', data })
|
return defHttp.put({ url: '/infra/job/update', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除定时任务调度
|
// 删除定时任务调度
|
||||||
export function deleteJobApi(id: number) {
|
export function deleteJob(id: number) {
|
||||||
return defHttp.delete({ url: '/infra/job/delete?id=' + id })
|
return defHttp.delete({ url: '/infra/job/delete?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出定时任务调度
|
// 导出定时任务调度
|
||||||
export function exportJobApi(params: JobExportReqVO) {
|
export function exportJob(params: JobExportReqVO) {
|
||||||
return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls')
|
return defHttp.download({ url: '/infra/job/export-excel', params }, '定时任务.xls')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务状态修改
|
// 任务状态修改
|
||||||
export function updateJobStatusApi(id: number, status: number) {
|
export function updateJobStatus(id: number, status: number) {
|
||||||
const params = {
|
const params = {
|
||||||
id,
|
id,
|
||||||
status
|
status
|
||||||
|
@ -65,11 +65,11 @@ export function updateJobStatusApi(id: number, status: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 定时任务立即执行一次
|
// 定时任务立即执行一次
|
||||||
export function runJobApi(id: number) {
|
export function runJob(id: number) {
|
||||||
return defHttp.put({ url: '/infra/job/trigger?id=' + id })
|
return defHttp.put({ url: '/infra/job/trigger?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获得定时任务的下 n 次执行时间
|
// 获得定时任务的下 n 次执行时间
|
||||||
export function getJobNextTimesApi(id: number) {
|
export function getJobNextTimes(id: number) {
|
||||||
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
|
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,22 +31,16 @@ export interface JobLogExportReqVO {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务日志列表
|
// 任务日志列表
|
||||||
export function getJobLogPageApi(params: JobLogPageReqVO) {
|
export function getJobLogPage(params: JobLogPageReqVO) {
|
||||||
return defHttp.get({ url: '/infra/job-log/page', params })
|
return defHttp.get({ url: '/infra/job-log/page', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 任务日志详情
|
// 任务日志详情
|
||||||
export function getJobLogApi(id: number) {
|
export function getJobLog(id: number) {
|
||||||
return defHttp.get({ url: '/infra/job-log/get?id=' + id })
|
return defHttp.get({ url: '/infra/job-log/get?id=' + id })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出定时任务日志
|
// 导出定时任务日志
|
||||||
export function exportJobLogApi(params: JobLogExportReqVO) {
|
export function exportJobLog(params: JobLogExportReqVO) {
|
||||||
return defHttp.download(
|
return defHttp.download({ url: '/infra/job-log/export-excel', params }, '定时任务日志.xls')
|
||||||
{
|
|
||||||
url: '/infra/job-log/export-excel',
|
|
||||||
params
|
|
||||||
},
|
|
||||||
'定时任务日志.xls'
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,17 +3,17 @@ import { defHttp } from '@/utils/http/axios'
|
||||||
/**
|
/**
|
||||||
* 获取redis 监控信息
|
* 获取redis 监控信息
|
||||||
*/
|
*/
|
||||||
export function getCacheApi() {
|
export function getCache() {
|
||||||
return defHttp.get({ url: '/infra/redis/get-monitor-info' })
|
return defHttp.get({ url: '/infra/redis/get-monitor-info' })
|
||||||
}
|
}
|
||||||
// 获取模块
|
// 获取模块
|
||||||
export function getKeyDefineListApi() {
|
export function getKeyDefineList() {
|
||||||
return defHttp.get({ url: '/infra/redis/get-key-define-list' })
|
return defHttp.get({ url: '/infra/redis/get-key-define-list' })
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取redis key列表
|
* 获取redis key列表
|
||||||
*/
|
*/
|
||||||
export function getKeyListApi(keyTemplate: string) {
|
export function getKeyList(keyTemplate: string) {
|
||||||
return defHttp.get({
|
return defHttp.get({
|
||||||
url: '/infra/redis/get-key-list',
|
url: '/infra/redis/get-key-list',
|
||||||
params: {
|
params: {
|
||||||
|
@ -22,16 +22,16 @@ export function getKeyListApi(keyTemplate: string) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 获取缓存内容
|
// 获取缓存内容
|
||||||
export function getKeyValueApi(key: string) {
|
export function getKeyValue(key: string) {
|
||||||
return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key })
|
return defHttp.get({ url: '/infra/redis/get-key-value?key=' + key })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据键名删除缓存
|
// 根据键名删除缓存
|
||||||
export function deleteKeyApi(key: string) {
|
export function deleteKey(key: string) {
|
||||||
return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key })
|
return defHttp.delete({ url: '/infra/redis/delete-key?key=' + key })
|
||||||
}
|
}
|
||||||
|
|
||||||
export function deleteKeysApi(keyTemplate: string) {
|
export function deleteKeys(keyTemplate: string) {
|
||||||
return defHttp.delete({
|
return defHttp.delete({
|
||||||
url: '/infra/redis/delete-keys?',
|
url: '/infra/redis/delete-keys?',
|
||||||
params: {
|
params: {
|
||||||
|
|
|
@ -21,7 +21,7 @@ const { t } = useI18n()
|
||||||
const src = ref('')
|
const src = ref('')
|
||||||
/** 页面加载 */
|
/** 页面加载 */
|
||||||
const init = async () => {
|
const init = async () => {
|
||||||
const res = await DbDocApi.exportHtmlApi()
|
const res = await DbDocApi.exportHtml()
|
||||||
let blob = new Blob([res], { type: 'text/html' })
|
let blob = new Blob([res], { type: 'text/html' })
|
||||||
let blobUrl = window.URL.createObjectURL(blob)
|
let blobUrl = window.URL.createObjectURL(blob)
|
||||||
src.value = blobUrl
|
src.value = blobUrl
|
||||||
|
@ -29,15 +29,15 @@ const init = async () => {
|
||||||
/** 处理导出 */
|
/** 处理导出 */
|
||||||
const handleExport = async (type: string) => {
|
const handleExport = async (type: string) => {
|
||||||
if (type === 'HTML') {
|
if (type === 'HTML') {
|
||||||
const res = await DbDocApi.exportHtmlApi()
|
const res = await DbDocApi.exportHtml()
|
||||||
downloadByData(res, '数据库文档.html')
|
downloadByData(res, '数据库文档.html')
|
||||||
}
|
}
|
||||||
if (type === 'Word') {
|
if (type === 'Word') {
|
||||||
const res = await DbDocApi.exportWordApi()
|
const res = await DbDocApi.exportWord()
|
||||||
downloadByData(res, '数据库文档.doc')
|
downloadByData(res, '数据库文档.doc')
|
||||||
}
|
}
|
||||||
if (type === 'Markdown') {
|
if (type === 'Markdown') {
|
||||||
const res = await DbDocApi.exportMarkdownApi()
|
const res = await DbDocApi.exportMarkdown()
|
||||||
downloadByData(res, '数据库文档.md')
|
downloadByData(res, '数据库文档.md')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { useMessage } from '@/hooks/web/useMessage'
|
import { useMessage } from '@/hooks/web/useMessage'
|
||||||
import { IconEnum } from '@/enums/appEnum'
|
import { IconEnum } from '@/enums/appEnum'
|
||||||
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
||||||
import { deleteFileApi, getFilePageApi } from '@/api/infra/file'
|
import { deleteFile, getFilePage } from '@/api/infra/file'
|
||||||
import { columns, searchFormSchema } from './file.data'
|
import { columns, searchFormSchema } from './file.data'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
@ -38,7 +38,7 @@ const { createMessage } = useMessage()
|
||||||
|
|
||||||
const [registerTable, { reload }] = useTable({
|
const [registerTable, { reload }] = useTable({
|
||||||
title: '文件列表',
|
title: '文件列表',
|
||||||
api: getFilePageApi,
|
api: getFilePage,
|
||||||
columns,
|
columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
|
@ -60,7 +60,7 @@ function handleAdd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(record: Recordable) {
|
async function handleDelete(record: Recordable) {
|
||||||
await deleteFileApi(record.id)
|
await deleteFile(record.id)
|
||||||
createMessage.success(t('common.delSuccessText'))
|
createMessage.success(t('common.delSuccessText'))
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import { ref, computed, unref } from 'vue'
|
||||||
import { BasicModal, useModalInner } from '@/components/Modal'
|
import { BasicModal, useModalInner } from '@/components/Modal'
|
||||||
import { BasicForm, useForm } from '@/components/Form'
|
import { BasicForm, useForm } from '@/components/Form'
|
||||||
import { formSchema } from './ficleConfig.data'
|
import { formSchema } from './ficleConfig.data'
|
||||||
import { createFileConfigApi, getFileConfigApi, updateFileConfigApi } from '@/api/infra/fileConfig'
|
import { createFileConfig, getFileConfig, updateFileConfig } from '@/api/infra/fileConfig'
|
||||||
|
|
||||||
const emit = defineEmits(['success', 'register'])
|
const emit = defineEmits(['success', 'register'])
|
||||||
const isUpdate = ref(true)
|
const isUpdate = ref(true)
|
||||||
|
@ -28,7 +28,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
|
||||||
isUpdate.value = !!data?.isUpdate
|
isUpdate.value = !!data?.isUpdate
|
||||||
|
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
const res = await getFileConfigApi(data.record.id)
|
const res = await getFileConfig(data.record.id)
|
||||||
rowId.value = res.id
|
rowId.value = res.id
|
||||||
setFieldsValue({ ...res })
|
setFieldsValue({ ...res })
|
||||||
}
|
}
|
||||||
|
@ -41,9 +41,9 @@ async function handleSubmit() {
|
||||||
const values = await validate()
|
const values = await validate()
|
||||||
setModalProps({ confirmLoading: true })
|
setModalProps({ confirmLoading: true })
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
await updateFileConfigApi(values)
|
await updateFileConfig(values)
|
||||||
} else {
|
} else {
|
||||||
await createFileConfigApi(values)
|
await createFileConfig(values)
|
||||||
}
|
}
|
||||||
closeModal()
|
closeModal()
|
||||||
emit('success')
|
emit('success')
|
||||||
|
|
|
@ -36,7 +36,7 @@ import { useModal } from '@/components/Modal'
|
||||||
import PostModal from './FileConfigModal.vue'
|
import PostModal from './FileConfigModal.vue'
|
||||||
import { IconEnum } from '@/enums/appEnum'
|
import { IconEnum } from '@/enums/appEnum'
|
||||||
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
import { BasicTable, useTable, TableAction } from '@/components/Table'
|
||||||
import { deleteFileConfigApi, getFileConfigPageApi, testFileConfigApi, updateFileConfigMasterApi } from '@/api/infra/fileConfig'
|
import { deleteFileConfig, getFileConfigPage, testFileConfig, updateFileConfigMaster } from '@/api/infra/fileConfig'
|
||||||
import { columns, searchFormSchema } from './ficleConfig.data'
|
import { columns, searchFormSchema } from './ficleConfig.data'
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
@ -45,7 +45,7 @@ const [registerModal, { openModal }] = useModal()
|
||||||
|
|
||||||
const [registerTable, { reload }] = useTable({
|
const [registerTable, { reload }] = useTable({
|
||||||
title: '文件配置列表',
|
title: '文件配置列表',
|
||||||
api: getFileConfigPageApi,
|
api: getFileConfigPage,
|
||||||
columns,
|
columns,
|
||||||
formConfig: {
|
formConfig: {
|
||||||
labelWidth: 120,
|
labelWidth: 120,
|
||||||
|
@ -76,7 +76,7 @@ function handleEdit(record: Recordable) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleTest(record: Recordable) {
|
async function handleTest(record: Recordable) {
|
||||||
const res = await testFileConfigApi(record.id)
|
const res = await testFileConfig(record.id)
|
||||||
createSuccessModal({ content: res })
|
createSuccessModal({ content: res })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -86,14 +86,14 @@ function handleMaster(record: Recordable) {
|
||||||
iconType: 'warning',
|
iconType: 'warning',
|
||||||
content: '是否确认修改配置编号为"' + record.id + '"的数据项为主配置?',
|
content: '是否确认修改配置编号为"' + record.id + '"的数据项为主配置?',
|
||||||
async onOk() {
|
async onOk() {
|
||||||
await updateFileConfigMasterApi(record.id)
|
await updateFileConfigMaster(record.id)
|
||||||
createMessage.success('配置成功')
|
createMessage.success('配置成功')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDelete(record: Recordable) {
|
async function handleDelete(record: Recordable) {
|
||||||
await deleteFileConfigApi(record.id)
|
await deleteFileConfig(record.id)
|
||||||
createMessage.success(t('common.delSuccessText'))
|
createMessage.success(t('common.delSuccessText'))
|
||||||
reload()
|
reload()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue