diff --git a/.env.dev b/.env.dev index 67bd8cab..36961860 100644 --- a/.env.dev +++ b/.env.dev @@ -13,14 +13,14 @@ VUE_APP_TITLE = MES系统 # 芋道管理系统/开发环境 # VUE_APP_BASE_API = 'http://100.64.0.26:48082' -# VUE_APP_BASE_API = 'http://10.70.2.2:8080' +VUE_APP_BASE_API = 'http://10.70.2.2:8080' # VUE_APP_BASE_API = 'http://192.168.1.20:48080' # VUE_APP_BASE_API = 'http://192.168.2.173:48080' # VUE_APP_BASE_API = 'http://192.168.1.49:48082' # VUE_APP_BASE_API = 'http://192.168.1.8:48082' # VUE_APP_BASE_API = 'http://192.168.4.159:48080' # VUE_APP_BASE_API = 'http://192.168.1.104:48082' -VUE_APP_BASE_API = 'http://192.168.0.33:48082' +# VUE_APP_BASE_API = 'http://192.168.0.33:48082' # VUE_APP_BASE_API = 'http://192.168.1.62:48082' # VUE_APP_BASE_API = 'http://192.168.1.78:48082' # VUE_APP_BASE_API = 'http://192.168.1.47:48082' diff --git a/src/api/infra/apiAccessLog.js b/src/api/infra/apiAccessLog.js new file mode 100644 index 00000000..6456a508 --- /dev/null +++ b/src/api/infra/apiAccessLog.js @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +// 获得API 访问日志分页 +export function getApiAccessLogPage(query) { + return request({ + url: '/infra/api-access-log/page', + method: 'get', + params: query + }) +} + +// 导出API 访问日志 Excel +export function exportApiAccessLogExcel(query) { + return request({ + url: '/infra/api-access-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/infra/apiErrorLog.js b/src/api/infra/apiErrorLog.js new file mode 100644 index 00000000..65942d13 --- /dev/null +++ b/src/api/infra/apiErrorLog.js @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +// 更新 API 错误日志的处理状态 +export function updateApiErrorLogProcess(id, processStatus) { + return request({ + url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus, + method: 'put', + }) +} + +// 获得API 错误日志分页 +export function getApiErrorLogPage(query) { + return request({ + url: '/infra/api-error-log/page', + method: 'get', + params: query + }) +} + +// 导出API 错误日志 Excel +export function exportApiErrorLogExcel(query) { + return request({ + url: '/infra/api-error-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/infra/codegen.js b/src/api/infra/codegen.js new file mode 100644 index 00000000..ffb3e043 --- /dev/null +++ b/src/api/infra/codegen.js @@ -0,0 +1,90 @@ +import request from '@/utils/request' + +// 获得表定义分页 +export function getCodegenTablePage(query) { + return request({ + url: '/infra/codegen/table/page', + method: 'get', + params: query + }) +} + +// 获得表和字段的明细 +export function getCodegenDetail(tableId) { + return request({ + url: '/infra/codegen/detail?tableId=' + tableId, + method: 'get', + }) +} + +// 修改代码生成信息 +export function updateCodegen(data) { + return request({ + url: '/infra/codegen/update', + method: 'put', + data: data + }) +} + +// 基于数据库的表结构,同步数据库的表和字段定义 +export function syncCodegenFromDB(tableId) { + return request({ + url: '/infra/codegen/sync-from-db?tableId=' + tableId, + method: 'put' + }) +} + +// 基于 SQL 建表语句,同步数据库的表和字段定义 +export function syncCodegenFromSQL(tableId, sql) { + return request({ + url: '/infra/codegen/sync-from-sql?tableId=' + tableId, + method: 'put', + headers:{ + 'Content-type': 'application/x-www-form-urlencoded' + }, + data: 'tableId=' + tableId + "&sql=" + sql, + }) +} + +// 预览生成代码 +export function previewCodegen(tableId) { + return request({ + url: '/infra/codegen/preview?tableId=' + tableId, + method: 'get', + }) +} + +// 下载生成代码 +export function downloadCodegen(tableId) { + return request({ + url: '/infra/codegen/download?tableId=' + tableId, + method: 'get', + responseType: 'blob' + }) +} + +// 获得表定义分页 +export function getSchemaTableList(query) { + return request({ + url: '/infra/codegen/db/table/list', + method: 'get', + params: query + }) +} + +// 基于数据库的表结构,创建代码生成器的表定义 +export function createCodegenList(data) { + return request({ + url: '/infra/codegen/create-list', + method: 'post', + data: data + }) +} + +// 删除数据库的表和字段定义 +export function deleteCodegen(tableId) { + return request({ + url: '/infra/codegen/delete?tableId=' + tableId, + method: 'delete' + }) +} diff --git a/src/api/infra/config.js b/src/api/infra/config.js new file mode 100644 index 00000000..eec15177 --- /dev/null +++ b/src/api/infra/config.js @@ -0,0 +1,62 @@ +import request from '@/utils/request' + +// 查询参数列表 +export function listConfig(query) { + return request({ + url: '/infra/config/page', + method: 'get', + params: query + }) +} + +// 查询参数详细 +export function getConfig(configId) { + return request({ + url: '/infra/config/get?id=' + configId, + method: 'get' + }) +} + +// 根据参数键名查询参数值 +export function getConfigKey(configKey) { + return request({ + url: '/infra/config/get-value-by-key?key=' + configKey, + method: 'get' + }) +} + +// 新增参数配置 +export function addConfig(data) { + return request({ + url: '/infra/config/create', + method: 'post', + data: data + }) +} + +// 修改参数配置 +export function updateConfig(data) { + return request({ + url: '/infra/config/update', + method: 'put', + data: data + }) +} + +// 删除参数配置 +export function delConfig(configId) { + return request({ + url: '/infra/config/delete?id=' + configId, + method: 'delete' + }) +} + +// 导出参数 +export function exportConfig(query) { + return request({ + url: '/infra/config/export', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/infra/dataSourceConfig.js b/src/api/infra/dataSourceConfig.js new file mode 100644 index 00000000..2d96b49c --- /dev/null +++ b/src/api/infra/dataSourceConfig.js @@ -0,0 +1,43 @@ +import request from '@/utils/request' + +// 创建数据源配置 +export function createDataSourceConfig(data) { + return request({ + url: '/infra/data-source-config/create', + method: 'post', + data: data + }) +} + +// 更新数据源配置 +export function updateDataSourceConfig(data) { + return request({ + url: '/infra/data-source-config/update', + method: 'put', + data: data + }) +} + +// 删除数据源配置 +export function deleteDataSourceConfig(id) { + return request({ + url: '/infra/data-source-config/delete?id=' + id, + method: 'delete' + }) +} + +// 获得数据源配置 +export function getDataSourceConfig(id) { + return request({ + url: '/infra/data-source-config/get?id=' + id, + method: 'get' + }) +} + +// 获得数据源配置列表 +export function getDataSourceConfigList() { + return request({ + url: '/infra/data-source-config/list', + method: 'get', + }) +} diff --git a/src/api/infra/dbDoc.js b/src/api/infra/dbDoc.js new file mode 100644 index 00000000..015c6d71 --- /dev/null +++ b/src/api/infra/dbDoc.js @@ -0,0 +1,26 @@ +// 导出参数 +import request from "@/utils/request"; + +export function exportHtml() { + return request({ + url: '/infra/db-doc/export-html', + method: 'get', + responseType: 'blob' + }) +} + +export function exportWord() { + return request({ + url: '/infra/db-doc/export-word', + method: 'get', + responseType: 'blob' + }) +} + +export function exportMarkdown() { + return request({ + url: '/infra/db-doc/export-markdown', + method: 'get', + responseType: 'blob' + }) +} diff --git a/src/api/infra/file.js b/src/api/infra/file.js new file mode 100644 index 00000000..2aeda2e9 --- /dev/null +++ b/src/api/infra/file.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// 删除文件 +export function deleteFile(id) { + return request({ + url: '/infra/file/delete?id=' + id, + method: 'delete' + }) +} + +// 获得文件分页 +export function getFilePage(query) { + return request({ + url: '/infra/file/page', + method: 'get', + params: query + }) +} diff --git a/src/api/infra/fileConfig.js b/src/api/infra/fileConfig.js new file mode 100644 index 00000000..4b75773b --- /dev/null +++ b/src/api/infra/fileConfig.js @@ -0,0 +1,59 @@ +import request from '@/utils/request' + +// 创建文件配置 +export function createFileConfig(data) { + return request({ + url: '/infra/file-config/create', + method: 'post', + data: data + }) +} + +// 更新文件配置 +export function updateFileConfig(data) { + return request({ + url: '/infra/file-config/update', + method: 'put', + data: data + }) +} + +// 更新文件配置为主配置 +export function updateFileConfigMaster(id) { + return request({ + url: '/infra/file-config/update-master?id=' + id, + method: 'put' + }) +} + +// 删除文件配置 +export function deleteFileConfig(id) { + return request({ + url: '/infra/file-config/delete?id=' + id, + method: 'delete' + }) +} + +// 获得文件配置 +export function getFileConfig(id) { + return request({ + url: '/infra/file-config/get?id=' + id, + method: 'get' + }) +} + +// 获得文件配置分页 +export function getFileConfigPage(query) { + return request({ + url: '/infra/file-config/page', + method: 'get', + params: query + }) +} + +export function testFileConfig(id) { + return request({ + url: '/infra/file-config/test?id=' + id, + method: 'get' + }) +} diff --git a/src/api/infra/job.js b/src/api/infra/job.js new file mode 100644 index 00000000..c2237c51 --- /dev/null +++ b/src/api/infra/job.js @@ -0,0 +1,82 @@ +import request from '@/utils/request' + +// 查询定时任务调度列表 +export function listJob(query) { + return request({ + url: '/infra/job/page', + method: 'get', + params: query + }) +} + +// 查询定时任务调度详细 +export function getJob(jobId) { + return request({ + url: '/infra/job/get?id=' + jobId, + method: 'get' + }) +} + +// 新增定时任务调度 +export function addJob(data) { + return request({ + url: '/infra/job/create', + method: 'post', + data: data + }) +} + +// 修改定时任务调度 +export function updateJob(data) { + return request({ + url: '/infra/job/update', + method: 'put', + data: data + }) +} + +// 删除定时任务调度 +export function delJob(jobId) { + return request({ + url: '/infra/job/delete?id=' + jobId, + method: 'delete' + }) +} + +// 导出定时任务调度 +export function exportJob(query) { + return request({ + url: '/infra/job/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} + +// 任务状态修改 +export function updateJobStatus(jobId, status) { + return request({ + url: '/infra/job/update-status', + method: 'put', + headers:{ + 'Content-type': 'application/x-www-form-urlencoded' + }, + data: 'id=' + jobId + "&status=" + status, + }) +} + +// 定时任务立即执行一次 +export function runJob(jobId) { + return request({ + url: '/infra/job/trigger?id=' + jobId, + method: 'put' + }) +} + +// 获得定时任务的下 n 次执行时间 +export function getJobNextTimes(jobId) { + return request({ + url: '/infra/job/get_next_times?id=' + jobId, + method: 'get' + }) +} diff --git a/src/api/infra/jobLog.js b/src/api/infra/jobLog.js new file mode 100644 index 00000000..348f2ed9 --- /dev/null +++ b/src/api/infra/jobLog.js @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +// 获得定时任务 +export function getJobLog(id) { + return request({ + url: '/infra/job-log/get?id=' + id, + method: 'get' + }) +} + +// 获得定时任务分页 +export function getJobLogPage(query) { + return request({ + url: '/infra/job-log/page', + method: 'get', + params: query + }) +} + +// 导出定时任务 Excel +export function exportJobLogExcel(query) { + return request({ + url: '/infra/job-log/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/api/infra/redis.js b/src/api/infra/redis.js new file mode 100644 index 00000000..fce18747 --- /dev/null +++ b/src/api/infra/redis.js @@ -0,0 +1,9 @@ +import request from '@/utils/request' + +// 查询缓存详细 +export function getCache() { + return request({ + url: '/infra/redis/get-monitor-info', + method: 'get' + }) +} diff --git a/src/api/infra/testDemo.js b/src/api/infra/testDemo.js new file mode 100644 index 00000000..cec5742b --- /dev/null +++ b/src/api/infra/testDemo.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 创建字典类型 +export function createTestDemo(data) { + return request({ + url: '/infra/test-demo/create', + method: 'post', + data: data + }) +} + +// 更新字典类型 +export function updateTestDemo(data) { + return request({ + url: '/infra/test-demo/update', + method: 'put', + data: data + }) +} + +// 删除字典类型 +export function deleteTestDemo(id) { + return request({ + url: '/infra/test-demo/delete?id=' + id, + method: 'delete' + }) +} + +// 获得字典类型 +export function getTestDemo(id) { + return request({ + url: '/infra/test-demo/get?id=' + id, + method: 'get' + }) +} + +// 获得字典类型分页 +export function getTestDemoPage(query) { + return request({ + url: '/infra/test-demo/page', + method: 'get', + params: query + }) +} + +// 导出字典类型 Excel +export function exportTestDemoExcel(query) { + return request({ + url: '/infra/test-demo/export-excel', + method: 'get', + params: query, + responseType: 'blob' + }) +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 707d79e4..9dbd3ccf 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -19,13 +19,15 @@ body { // font-weight: 700; // } .searchBarBox .el-form-item--medium .el-form-item__label { - line-height: 40px; + line-height: 40px; } + .searchBarBox .el-form-item--medium .el-form-item__content { - line-height: 40px; + line-height: 40px; } + .searchBarBox .el-range-editor--small.el-input__inner { - height: 34px; + height: 34px; } html { @@ -153,13 +155,11 @@ aside { text-align: right; padding-right: 20px; transition: 600ms ease position; - background: linear-gradient( - 90deg, - rgba(32, 182, 249, 1) 0%, - rgba(32, 182, 249, 1) 0%, - rgba(33, 120, 241, 1) 100%, - rgba(33, 120, 241, 1) 100% - ); + background: linear-gradient(90deg, + rgba(32, 182, 249, 1) 0%, + rgba(32, 182, 249, 1) 0%, + rgba(33, 120, 241, 1) 100%, + rgba(33, 120, 241, 1) 100%); .subtitle { font-size: 20px; @@ -204,10 +204,85 @@ aside { z-index: 1000 !important; } +// 滚动条 +::-webkit-scrollbar { + width: 8px; + height: 8px; + background-color: transparent; +} + +::-webkit-scrollbar-track-piece { + background-color: rgba(144, 147, 153, 0); +} + +::-webkit-scrollbar-corner { + background-color: rgba(144, 147, 153, 0); +} + +::-webkit-scrollbar-track { + width: 6px; + background: rgba(144, 147, 153, 0); + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; +} + +::-webkit-scrollbar-thumb { + background-color: #EDEDED; + background-clip: padding-box; + min-height: 28px; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em; + transition: background-color .3s; + cursor: pointer; +} + +::-webkit-scrollbar-thumb:hover { + background-color: #D9D9D9; +} + +// 抽屉head区域---start +.el-drawer__header { + padding-bottom: 20px; + padding-left: 30px; + margin-bottom: 23px; + font-size: 20px; + font-weight: 500; + color: rgba(0, 0, 0, 0.85); + border-bottom: 1px solid rgba(233, 233, 233, 1); +} + +.el-drawer__header> :first-child::before { + content: ''; + display: inline-block; + width: 4px; + height: 24px; + background-color: #0b58ff; + margin-right: 8px; + vertical-align: middle; +} + +// 抽屉head区域---end +// 弹出框,上下分布,去掉label的padding-bottom +.el-form--label-top .el-form-item__label { + padding: 0; +} + +// 大屏滚动表格 +.dv-scroll-board .rows .ceil, +.dv-scroll-board .header .header-item { + border-right: 1px solid rgba(13, 23, 40, 1); +} + +.dv-scroll-board .rows .ceil:last-child, +.dv-scroll-board .header .header-item:last-child { + border-right: none; +} + .no-data-bg { height: 240px; - background: url(../images/no-data-bg.png) 50% 100% / contain - no-repeat; + background: url(../images/no-data-bg.png) 50% 100% / contain no-repeat; position: relative; &::after { @@ -220,4 +295,4 @@ aside { font-size: 18px; letter-spacing: 1px; } -} +} \ No newline at end of file diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index d7c255e2..67b434ec 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -1,8 +1,9 @@