From 0e578f8d0ac2f5eaccfc3f09e4f0031babf7a0cd Mon Sep 17 00:00:00 2001 From: gexinzhineng/gxzn27 <1348660141@qq.com> Date: Mon, 3 Apr 2023 15:26:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80vxe=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- build/vite/index.ts | 11 +- index.html | 4 +- package.json | 63 +- src/api/bpm/definition/index.ts | 6 +- src/api/bpm/form/index.ts | 12 +- src/api/bpm/model/index.ts | 14 +- src/api/bpm/processInstance/index.ts | 1 - src/api/bpm/userGroup/index.ts | 12 +- src/api/infra/apiAccessLog/index.ts | 24 +- src/api/infra/apiErrorLog/index.ts | 24 +- src/api/infra/codegen/index.ts | 90 +- src/api/infra/codegen/types.ts | 61 ++ src/api/infra/config/index.ts | 9 +- src/api/infra/dataSourceConfig/index.ts | 30 +- src/api/infra/fileConfig/index.ts | 21 +- src/api/infra/fileList/index.ts | 28 + src/api/infra/job/index.ts | 28 +- src/api/infra/jobLog/index.ts | 22 +- src/api/mp/account/index.ts | 7 +- src/api/mp/message/index.ts | 2 +- src/api/mp/tag/index.ts | 21 +- src/api/pay/merchant/index.ts | 17 +- src/api/system/area/index.ts | 16 +- src/api/system/dept/index.ts | 2 +- src/api/system/dict/dict.data.ts | 29 +- src/api/system/dict/dict.type.ts | 24 +- src/api/system/dict/types.ts | 46 + src/api/system/errorCode/index.ts | 4 +- src/api/system/loginLog/index.ts | 14 +- src/api/system/mail/account/index.ts | 17 +- src/api/system/mail/log/index.ts | 14 +- src/api/system/mail/template/index.ts | 20 +- src/api/system/menu/index.ts | 15 +- src/api/system/notify/message/index.ts | 22 +- src/api/system/oauth2/client.ts | 22 +- src/api/system/oauth2/token.ts | 10 +- src/api/system/operatelog/index.ts | 12 +- src/api/system/permission/index.ts | 10 +- src/api/system/post/index.ts | 26 +- src/api/system/role/index.ts | 31 +- src/api/system/sensitiveWord/index.ts | 36 +- src/api/system/sms/smsChannel/index.ts | 19 +- src/api/system/sms/smsLog/index.ts | 50 +- src/api/system/sms/smsTemplate/index.ts | 54 +- src/api/system/tenant/index.ts | 12 +- src/api/system/tenantPackage/index.ts | 17 +- src/api/system/user/index.ts | 35 +- .../ContentWrap/src/ContentWrap.vue | 2 +- src/components/Crontab/src/Crontab.vue | 5 +- .../Descriptions/src/Descriptions.vue | 2 +- src/components/DictTag/src/DictTag.vue | 2 +- src/components/Editor/src/Editor.vue | 2 +- src/components/Form/src/Form.vue | 8 +- src/components/Pagination/index.vue | 2 +- src/components/Search/src/Search.vue | 12 +- src/components/Table/src/Table.vue | 6 +- src/config/axios/request.ts | 50 + src/hooks/web/useCrudSchemas.ts | 10 - src/hooks/web/useTable.ts | 4 +- .../components/Breadcrumb/src/Breadcrumb.vue | 4 +- src/layout/components/Message/src/Message.vue | 4 +- src/locales/en.ts | 3 +- src/locales/zh-CN.ts | 3 +- src/router/modules/remaining.ts | 57 +- src/store/modules/dict.ts | 6 +- src/types/auto-components.d.ts | 3 +- src/types/auto-imports.d.ts | 2 - src/types/descriptions.d.ts | 4 +- src/utils/dict.ts | 23 +- src/utils/formatTime.ts | 154 +-- src/utils/index.ts | 18 - src/utils/tree.ts | 10 +- src/views/Profile/components/ProfileUser.vue | 4 +- src/views/bpm/definition/definition.data.ts | 79 ++ src/views/bpm/definition/index.vue | 231 ++--- src/views/bpm/form/form.data.ts | 43 + src/views/bpm/form/formEditor.vue | 168 ++++ src/views/bpm/form/index.vue | 212 ++--- src/views/bpm/group/group.data.ts | 64 ++ src/views/bpm/group/index.vue | 314 ++++--- src/views/bpm/model/index.vue | 881 +++++++++++------- src/views/bpm/model/model.data.ts | 106 +++ src/views/bpm/model/modelEditor.vue | 204 ++++ src/views/bpm/processInstance/create.vue | 154 +++ src/views/bpm/processInstance/detail.vue | 490 ++++++++++ .../bpm/processInstance/process.create.ts | 39 + src/views/bpm/taskAssignRule/index.vue | 367 ++++++-- .../bpm/taskAssignRule/taskAssignRule.data.ts | 54 ++ .../infra/apiAccessLog/apiAccessLog.data.ts | 74 ++ src/views/infra/apiAccessLog/index.vue | 260 +----- .../infra/apiErrorLog/apiErrorLog.data.ts | 76 ++ src/views/infra/apiErrorLog/index.vue | 311 ++----- src/views/infra/build/index.vue | 160 ++-- src/views/infra/codegen/EditTable.vue | 115 +-- src/views/infra/codegen/codegen.data.ts | 53 ++ .../codegen/components/BasicInfoForm.vue | 216 +++-- .../codegen/components/CloumInfoForm.vue | 137 +++ .../infra/codegen/components/ImportTable.vue | 125 +++ .../infra/codegen/components/Preview.vue | 145 +++ src/views/infra/codegen/components/index.ts | 7 +- src/views/infra/codegen/index.vue | 296 ++---- src/views/infra/config/config.data.ts | 91 ++ src/views/infra/config/index.vue | 353 +++---- .../dataSourceConfig/dataSourceConfig.data.ts | 52 ++ src/views/infra/dataSourceConfig/index.vue | 229 +++-- src/views/infra/fileConfig/fileConfig.data.ts | 77 ++ src/views/infra/fileConfig/index.vue | 430 +++++---- src/views/infra/fileList/fileList.data.ts | 52 ++ src/views/infra/fileList/index.vue | 194 ++++ src/views/infra/job/JobLog.vue | 77 ++ src/views/infra/job/index.vue | 542 +++++------ src/views/infra/job/job.data.ts | 70 ++ src/views/infra/job/jobLog.data.ts | 76 ++ src/views/infra/webSocket/index.vue | 4 +- src/views/mp/account/index.vue | 191 +--- src/views/mp/freePublish/index.vue | 362 +------ src/views/mp/message/index.vue | 281 +----- src/views/mp/statistics/index.vue | 364 +------- src/views/pay/merchant/index.vue | 353 +++---- src/views/pay/merchant/merchant.data.ts | 70 ++ src/views/system/area/area.data.ts | 23 + src/views/system/area/index.vue | 171 ++-- src/views/system/dept/dept.data.ts | 84 ++ src/views/system/dept/index.vue | 335 +++---- src/views/system/dict/dict.data.ts | 104 +++ src/views/system/dict/dict.type.ts | 65 ++ src/views/system/dict/index.vue | 444 +++++---- src/views/system/errorCode/errorCode.data.ts | 54 ++ src/views/system/errorCode/index.vue | 333 +++---- src/views/system/loginlog/index.vue | 212 +---- src/views/system/loginlog/loginLog.data.ts | 53 ++ src/views/system/mail/account/account.data.ts | 106 +-- src/views/system/mail/account/index.vue | 199 ++-- src/views/system/mail/log/index.vue | 129 ++- src/views/system/mail/log/log.data.ts | 247 +++-- src/views/system/mail/template/index.vue | 327 +++++-- .../system/mail/template/template.data.ts | 175 ++-- src/views/system/menu/index.vue | 482 ++++++---- src/views/system/menu/menu.data.ts | 76 ++ src/views/system/notice/form.vue | 7 +- src/views/system/notice/index.vue | 283 +++--- src/views/system/notice/notice.data.ts | 59 ++ src/views/system/notify/message/index.vue | 249 ++--- .../system/notify/message/message.data.ts | 101 ++ src/views/system/notify/my/index.vue | 233 +---- src/views/system/notify/my/my.data.ts | 58 ++ src/views/system/notify/template/index.vue | 4 +- src/views/system/oauth2/client/client.data.ts | 197 ++++ src/views/system/oauth2/client/index.vue | 352 +++---- src/views/system/oauth2/token/index.vue | 201 ++-- src/views/system/oauth2/token/token.data.ts | 48 + src/views/system/operatelog/index.vue | 255 ++--- .../system/operatelog/operatelog.data.ts | 106 +++ src/views/system/post/form.vue | 91 ++ src/views/system/post/index.vue | 239 ++--- src/views/system/post/post.data.ts | 58 ++ src/views/system/role/index.vue | 534 ++++++----- src/views/system/role/role.data.ts | 82 ++ src/views/system/sensitiveWord/index.vue | 372 ++++---- .../sensitiveWord/sensitiveWord.data.ts | 74 ++ src/views/system/sms/smsChannel/index.vue | 147 +++ .../system/sms/smsChannel/sms.channel.data.ts | 76 ++ src/views/system/sms/smsLog/index.vue | 57 ++ src/views/system/sms/smsLog/sms.log.data.ts | 93 ++ src/views/system/sms/smsTemplate/index.vue | 232 +++++ .../sms/smsTemplate/sms.template.data.ts | 107 +++ src/views/system/tenant/index.vue | 410 ++++---- src/views/system/tenant/tenant.data.ts | 190 ++++ src/views/system/tenantPackage/index.vue | 325 ++++--- .../tenantPackage/tenantPackage.data.ts | 73 ++ src/views/system/user/index.vue | 867 ++++++++++------- src/views/system/user/user.data.ts | 138 +++ tsconfig.json | 3 +- types/components.d.ts | 3 +- types/global.d.ts | 26 +- types/router.d.ts | 4 +- vite.config.ts | 2 +- 178 files changed, 12350 insertions(+), 8340 deletions(-) create mode 100644 src/api/infra/codegen/types.ts create mode 100644 src/api/infra/fileList/index.ts create mode 100644 src/api/system/dict/types.ts create mode 100644 src/config/axios/request.ts create mode 100644 src/views/bpm/definition/definition.data.ts create mode 100644 src/views/bpm/form/form.data.ts create mode 100644 src/views/bpm/form/formEditor.vue create mode 100644 src/views/bpm/group/group.data.ts create mode 100644 src/views/bpm/model/model.data.ts create mode 100644 src/views/bpm/model/modelEditor.vue create mode 100644 src/views/bpm/processInstance/create.vue create mode 100644 src/views/bpm/processInstance/detail.vue create mode 100644 src/views/bpm/processInstance/process.create.ts create mode 100644 src/views/bpm/taskAssignRule/taskAssignRule.data.ts create mode 100644 src/views/infra/apiAccessLog/apiAccessLog.data.ts create mode 100644 src/views/infra/apiErrorLog/apiErrorLog.data.ts create mode 100644 src/views/infra/codegen/codegen.data.ts create mode 100644 src/views/infra/codegen/components/CloumInfoForm.vue create mode 100644 src/views/infra/codegen/components/ImportTable.vue create mode 100644 src/views/infra/codegen/components/Preview.vue create mode 100644 src/views/infra/config/config.data.ts create mode 100644 src/views/infra/dataSourceConfig/dataSourceConfig.data.ts create mode 100644 src/views/infra/fileConfig/fileConfig.data.ts create mode 100644 src/views/infra/fileList/fileList.data.ts create mode 100644 src/views/infra/fileList/index.vue create mode 100644 src/views/infra/job/JobLog.vue create mode 100644 src/views/infra/job/job.data.ts create mode 100644 src/views/infra/job/jobLog.data.ts create mode 100644 src/views/pay/merchant/merchant.data.ts create mode 100644 src/views/system/area/area.data.ts create mode 100644 src/views/system/dept/dept.data.ts create mode 100644 src/views/system/dict/dict.data.ts create mode 100644 src/views/system/dict/dict.type.ts create mode 100644 src/views/system/errorCode/errorCode.data.ts create mode 100644 src/views/system/loginlog/loginLog.data.ts create mode 100644 src/views/system/menu/menu.data.ts create mode 100644 src/views/system/notice/notice.data.ts create mode 100644 src/views/system/notify/message/message.data.ts create mode 100644 src/views/system/notify/my/my.data.ts create mode 100644 src/views/system/oauth2/client/client.data.ts create mode 100644 src/views/system/oauth2/token/token.data.ts create mode 100644 src/views/system/operatelog/operatelog.data.ts create mode 100644 src/views/system/post/form.vue create mode 100644 src/views/system/post/post.data.ts create mode 100644 src/views/system/role/role.data.ts create mode 100644 src/views/system/sensitiveWord/sensitiveWord.data.ts create mode 100644 src/views/system/sms/smsChannel/index.vue create mode 100644 src/views/system/sms/smsChannel/sms.channel.data.ts create mode 100644 src/views/system/sms/smsLog/index.vue create mode 100644 src/views/system/sms/smsLog/sms.log.data.ts create mode 100644 src/views/system/sms/smsTemplate/index.vue create mode 100644 src/views/system/sms/smsTemplate/sms.template.data.ts create mode 100644 src/views/system/tenant/tenant.data.ts create mode 100644 src/views/system/tenantPackage/tenantPackage.data.ts create mode 100644 src/views/system/user/user.data.ts diff --git a/.gitignore b/.gitignore index ac15926b..3efc9c52 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ dist-ssr pnpm-debug .idea -.history +.history \ No newline at end of file diff --git a/build/vite/index.ts b/build/vite/index.ts index dcec1aed..304ce0d5 100644 --- a/build/vite/index.ts +++ b/build/vite/index.ts @@ -15,7 +15,7 @@ import vueSetupExtend from 'vite-plugin-vue-setup-extend' import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite' import { createSvgIconsPlugin } from 'vite-plugin-svg-icons' -export function createVitePlugins() { +export function createVitePlugins(VITE_APP_TITLE: string) { const root = process.cwd() // 路径查找 function pathResolve(dir: string) { @@ -39,14 +39,11 @@ export function createVitePlugins() { imports: [ 'vue', 'vue-router', - // 可额外添加需要 autoImport 的组件 { '@/hooks/web/useI18n': ['useI18n'], - '@/hooks/web/useMessage': ['useMessage'], '@/hooks/web/useXTable': ['useXTable'], + '@/hooks/web/useMessage': ['useMessage'], '@/hooks/web/useVxeCrudSchemas': ['useVxeCrudSchemas'], - '@/hooks/web/useTable': ['useTable'], - '@/hooks/web/useCrudSchemas': ['useCrudSchemas'], '@/utils/formRules': ['required'], '@/utils/dict': ['DICT_TYPE'] } @@ -95,6 +92,8 @@ export function createVitePlugins() { ext: '.gz', // 生成的压缩包后缀 deleteOriginFile: false //压缩后是否删除源文件 }), - ViteEjsPlugin() + ViteEjsPlugin({ + title: VITE_APP_TITLE + }) ] } diff --git a/index.html b/index.html index 8cfcbefa..cce65bdc 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ name="description" content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" /> - %VITE_APP_TITLE% + <%= title %>
@@ -137,7 +137,7 @@
-
%VITE_APP_TITLE%
+
<%= title %>
diff --git a/package.json b/package.json index 683d09eb..d067560f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.7.1-snapshot.1961", + "version": "1.7.1-snapshot.1941", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, @@ -29,14 +29,12 @@ "@form-create/designer": "^3.1.0", "@form-create/element-ui": "^3.1.17", "@iconify/iconify": "^3.1.0", - "@videojs-player/vue": "^1.0.0", "@vueuse/core": "^9.13.0", "@wangeditor/editor": "^5.1.23", "@wangeditor/editor-for-vue": "^5.1.10", "@zxcvbn-ts/core": "^2.2.1", "animate.css": "^4.1.1", "axios": "^1.3.4", - "benz-amr-recorder": "^1.1.5", "bpmn-js-token-simulation": "^0.10.0", "camunda-bpmn-moddle": "^7.0.1", "cropperjs": "^1.5.13", @@ -45,7 +43,7 @@ "diagram-js": "^11.6.0", "echarts": "^5.4.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.3.1", + "element-plus": "2.2.34", "fast-xml-parser": "^4.1.3", "highlight.js": "^11.7.0", "intro.js": "^6.0.0", @@ -59,63 +57,62 @@ "qs": "^6.11.1", "steady-xml": "^0.1.0", "url": "^0.11.0", - "video.js": "^8.0.4", "vue": "3.2.47", "vue-i18n": "9.2.2", "vue-router": "^4.1.6", "vue-types": "^5.0.2", "vuedraggable": "^4.1.0", - "vxe-table": "^4.3.11", + "vxe-table": "^4.3.10", "web-storage-cache": "^1.1.1", "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.5.0", + "@commitlint/cli": "^17.4.4", "@commitlint/config-conventional": "^17.4.4", - "@iconify/json": "^2.2.38", - "@intlify/unplugin-vue-i18n": "^0.10.0", + "@iconify/json": "^2.2.31", + "@intlify/unplugin-vue-i18n": "^0.8.2", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", - "@types/lodash-es": "^4.17.7", - "@types/node": "^18.15.5", + "@types/lodash-es": "^4.17.6", + "@types/node": "^18.14.6", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", - "@vitejs/plugin-legacy": "^4.0.2", - "@vitejs/plugin-vue": "^4.1.0", - "@vitejs/plugin-vue-jsx": "^3.0.1", - "autoprefixer": "^10.4.14", + "@typescript-eslint/eslint-plugin": "^5.54.1", + "@typescript-eslint/parser": "^5.54.1", + "@vitejs/plugin-legacy": "^4.0.1", + "@vitejs/plugin-vue": "^4.0.0", + "@vitejs/plugin-vue-jsx": "^3.0.0", + "autoprefixer": "^10.4.13", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^2.15.3", - "eslint": "^8.36.0", - "eslint-config-prettier": "^8.8.0", - "eslint-define-config": "^1.17.0", + "eslint": "^8.35.0", + "eslint-config-prettier": "^8.7.0", + "eslint-define-config": "^1.15.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.2.0", + "lint-staged": "^13.1.2", "postcss": "^8.4.21", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", - "prettier": "^2.8.6", - "rimraf": "^4.4.1", - "rollup": "^3.20.0", - "sass": "^1.59.3", - "stylelint": "^15.3.0", + "prettier": "^2.8.4", + "rimraf": "^4.3.1", + "rollup": "^3.18.0", + "sass": "^1.58.3", + "stylelint": "^15.2.0", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.5", - "stylelint-config-recommended": "^11.0.0", - "stylelint-config-standard": "^31.0.0", - "stylelint-order": "^6.0.3", - "terser": "^5.16.6", - "typescript": "5.0.2", + "stylelint-config-recommended": "^10.0.1", + "stylelint-config-standard": "^30.0.1", + "stylelint-order": "^6.0.2", + "terser": "^5.16.5", + "typescript": "4.9.5", "unplugin-auto-import": "^0.15.1", "unplugin-element-plus": "^0.7.0", "unplugin-vue-components": "^0.24.1", - "vite": "4.2.1", + "vite": "4.1.4", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -128,7 +125,7 @@ "windicss": "^3.5.6" }, "engines": { - "node": ">=16.18.0" + "node": ">=16.0.0" }, "license": "MIT", "repository": { diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index c0e51fab..477d6729 100644 --- a/src/api/bpm/definition/index.ts +++ b/src/api/bpm/definition/index.ts @@ -1,19 +1,19 @@ import request from '@/config/axios' -export const getProcessDefinitionBpmnXML = async (id: number) => { +export const getProcessDefinitionBpmnXMLApi = async (id: number) => { return await request.get({ url: '/bpm/process-definition/get-bpmn-xml?id=' + id }) } -export const getProcessDefinitionPage = async (params) => { +export const getProcessDefinitionPageApi = async (params) => { return await request.get({ url: '/bpm/process-definition/page', params }) } -export const getProcessDefinitionList = async (params) => { +export const getProcessDefinitionListApi = async (params) => { return await request.get({ url: '/bpm/process-definition/list', params diff --git a/src/api/bpm/form/index.ts b/src/api/bpm/form/index.ts index 142ed24c..c745201f 100644 --- a/src/api/bpm/form/index.ts +++ b/src/api/bpm/form/index.ts @@ -11,7 +11,7 @@ export type FormVO = { } // 创建工作流的表单定义 -export const createForm = async (data: FormVO) => { +export const createFormApi = async (data: FormVO) => { return await request.post({ url: '/bpm/form/create', data: data @@ -19,7 +19,7 @@ export const createForm = async (data: FormVO) => { } // 更新工作流的表单定义 -export const updateForm = async (data: FormVO) => { +export const updateFormApi = async (data: FormVO) => { return await request.put({ url: '/bpm/form/update', data: data @@ -27,21 +27,21 @@ export const updateForm = async (data: FormVO) => { } // 删除工作流的表单定义 -export const deleteForm = async (id: number) => { +export const deleteFormApi = async (id: number) => { return await request.delete({ url: '/bpm/form/delete?id=' + id }) } // 获得工作流的表单定义 -export const getForm = async (id: number) => { +export const getFormApi = async (id: number) => { return await request.get({ url: '/bpm/form/get?id=' + id }) } // 获得工作流的表单定义分页 -export const getFormPage = async (params) => { +export const getFormPageApi = async (params) => { return await request.get({ url: '/bpm/form/page', params @@ -49,7 +49,7 @@ export const getFormPage = async (params) => { } // 获得动态表单的精简列表 -export const getSimpleFormList = async () => { +export const getSimpleFormsApi = async () => { return await request.get({ url: '/bpm/form/list-all-simple' }) diff --git a/src/api/bpm/model/index.ts b/src/api/bpm/model/index.ts index 2e1d4e64..0335a3db 100644 --- a/src/api/bpm/model/index.ts +++ b/src/api/bpm/model/index.ts @@ -25,20 +25,20 @@ export type ModelVO = { bpmnXml: string } -export const getModelPage = async (params) => { +export const getModelPageApi = async (params) => { return await request.get({ url: '/bpm/model/page', params }) } -export const getModel = async (id: number) => { +export const getModelApi = async (id: number) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } -export const updateModel = async (data: ModelVO) => { +export const updateModelApi = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } // 任务状态修改 -export const updateModelState = async (id: number, state: number) => { +export const updateModelStateApi = async (id: number, state: number) => { const data = { id: id, state: state @@ -46,14 +46,14 @@ export const updateModelState = async (id: number, state: number) => { return await request.put({ url: '/bpm/model/update-state', data: data }) } -export const createModel = async (data: ModelVO) => { +export const createModelApi = async (data: ModelVO) => { return await request.post({ url: '/bpm/model/create', data: data }) } -export const deleteModel = async (id: number) => { +export const deleteModelApi = async (id: number) => { return await request.delete({ url: '/bpm/model/delete?id=' + id }) } -export const deployModel = async (id: number) => { +export const deployModelApi = async (id: number) => { return await request.post({ url: '/bpm/model/deploy?id=' + id }) } diff --git a/src/api/bpm/processInstance/index.ts b/src/api/bpm/processInstance/index.ts index 95591ae3..d48253c3 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -4,7 +4,6 @@ export type Task = { id: string name: string } - export type ProcessInstanceVO = { id: number name: string diff --git a/src/api/bpm/userGroup/index.ts b/src/api/bpm/userGroup/index.ts index 035762bf..88ee9619 100644 --- a/src/api/bpm/userGroup/index.ts +++ b/src/api/bpm/userGroup/index.ts @@ -11,7 +11,7 @@ export type UserGroupVO = { } // 创建用户组 -export const createUserGroup = async (data: UserGroupVO) => { +export const createUserGroupApi = async (data: UserGroupVO) => { return await request.post({ url: '/bpm/user-group/create', data: data @@ -19,7 +19,7 @@ export const createUserGroup = async (data: UserGroupVO) => { } // 更新用户组 -export const updateUserGroup = async (data: UserGroupVO) => { +export const updateUserGroupApi = async (data: UserGroupVO) => { return await request.put({ url: '/bpm/user-group/update', data: data @@ -27,21 +27,21 @@ export const updateUserGroup = async (data: UserGroupVO) => { } // 删除用户组 -export const deleteUserGroup = async (id: number) => { +export const deleteUserGroupApi = async (id: number) => { return await request.delete({ url: '/bpm/user-group/delete?id=' + id }) } // 获得用户组 -export const getUserGroup = async (id: number) => { +export const getUserGroupApi = async (id: number) => { return await request.get({ url: '/bpm/user-group/get?id=' + id }) } // 获得用户组分页 -export const getUserGroupPage = async (params) => { +export const getUserGroupPageApi = async (params) => { return await request.get({ url: '/bpm/user-group/page', params }) } // 获取用户组精简信息列表 -export const getSimpleUserGroupList = async (): Promise => { +export const listSimpleUserGroupsApi = async () => { return await request.get({ url: '/bpm/user-group/list-all-simple' }) } diff --git a/src/api/infra/apiAccessLog/index.ts b/src/api/infra/apiAccessLog/index.ts index c6b4b45f..b46199e4 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -19,12 +19,32 @@ export interface ApiAccessLogVO { 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 访问日志 -export const getApiAccessLogPage = (params: PageParam) => { +export const getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { return request.get({ url: '/infra/api-access-log/page', params }) } // 导出API 访问日志 -export const exportApiAccessLog = (params) => { +export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { return request.download({ url: '/infra/api-access-log/export-excel', params }) } diff --git a/src/api/infra/apiErrorLog/index.ts b/src/api/infra/apiErrorLog/index.ts index 59ee2143..06515c36 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -27,20 +27,38 @@ export interface ApiErrorLogVO { 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 访问日志 -export const getApiErrorLogPage = (params: PageParam) => { +export const getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { return request.get({ url: '/infra/api-error-log/page', params }) } // 更新 API 错误日志的处理状态 -export const updateApiErrorLogPage = (id: number, processStatus: number) => { +export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { return request.put({ url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus }) } // 导出API 访问日志 -export const exportApiErrorLog = (params) => { +export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { return request.download({ url: '/infra/api-error-log/export-excel', params diff --git a/src/api/infra/codegen/index.ts b/src/api/infra/codegen/index.ts index 64701efe..54f00ff0 100644 --- a/src/api/infra/codegen/index.ts +++ b/src/api/infra/codegen/index.ts @@ -1,123 +1,57 @@ import request from '@/config/axios' - -export type CodegenTableVO = { - id: number - tableId: number - isParentMenuIdValid: boolean - dataSourceConfigId: number - scene: number - tableName: string - tableComment: string - remark: string - moduleName: string - businessName: string - className: string - classComment: string - author: string - createTime: Date - updateTime: Date - templateType: number - parentMenuId: number -} - -export type CodegenColumnVO = { - id: number - tableId: number - columnName: string - dataType: string - columnComment: string - nullable: number - primaryKey: number - autoIncrement: string - ordinalPosition: number - javaType: string - javaField: string - dictType: string - example: string - createOperation: number - updateOperation: number - listOperation: number - listOperationCondition: string - listOperationResult: number - htmlType: string -} - -export type DatabaseTableVO = { - name: string - comment: string -} - -export type CodegenDetailVO = { - table: CodegenTableVO - columns: CodegenColumnVO[] -} - -export type CodegenPreviewVO = { - filePath: string - code: string -} - -export type CodegenUpdateReqVO = { - table: CodegenTableVO | any - columns: CodegenColumnVO[] -} - -export type CodegenCreateListReqVO = { - dataSourceConfigId: number - tableNames: string[] -} +import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' // 查询列表代码生成表定义 -export const getCodegenTablePage = (params: PageParam) => { +export const getCodegenTablePageApi = (params) => { return request.get({ url: '/infra/codegen/table/page', params }) } // 查询详情代码生成表定义 -export const getCodegenTable = (id: number) => { +export const getCodegenTableApi = (id: number) => { return request.get({ url: '/infra/codegen/detail?tableId=' + id }) } // 新增代码生成表定义 -export const createCodegenTable = (data: CodegenCreateListReqVO) => { +export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { return request.post({ url: '/infra/codegen/create', data }) } // 修改代码生成表定义 -export const updateCodegenTable = (data: CodegenUpdateReqVO) => { +export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { return request.put({ url: '/infra/codegen/update', data }) } // 基于数据库的表结构,同步数据库的表和字段定义 -export const syncCodegenFromDB = (id: number) => { +export const syncCodegenFromDBApi = (id: number) => { return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) } // 基于 SQL 建表语句,同步数据库的表和字段定义 -export const syncCodegenFromSQL = (id: number, sql: string) => { +export const syncCodegenFromSQLApi = (id: number, sql: string) => { return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql }) } // 预览生成代码 -export const previewCodegen = (id: number) => { +export const previewCodegenApi = (id: number) => { return request.get({ url: '/infra/codegen/preview?tableId=' + id }) } // 下载生成代码 -export const downloadCodegen = (id: number) => { +export const downloadCodegenApi = (id: number) => { return request.download({ url: '/infra/codegen/download?tableId=' + id }) } // 获得表定义 -export const getSchemaTableList = (params) => { +export const getSchemaTableListApi = (params) => { return request.get({ url: '/infra/codegen/db/table/list', params }) } // 基于数据库的表结构,创建代码生成器的表定义 -export const createCodegenList = (data) => { +export const createCodegenListApi = (data) => { return request.post({ url: '/infra/codegen/create-list', data }) } // 删除代码生成表定义 -export const deleteCodegenTable = (id: number) => { +export const deleteCodegenTableApi = (id: number) => { return request.delete({ url: '/infra/codegen/delete?tableId=' + id }) } diff --git a/src/api/infra/codegen/types.ts b/src/api/infra/codegen/types.ts new file mode 100644 index 00000000..be6a66ed --- /dev/null +++ b/src/api/infra/codegen/types.ts @@ -0,0 +1,61 @@ +export type CodegenTableVO = { + id: number + tableId: number + isParentMenuIdValid: boolean + dataSourceConfigId: number + scene: number + tableName: string + tableComment: string + remark: string + moduleName: string + businessName: string + className: string + classComment: string + author: string + createTime: Date + updateTime: Date + templateType: number + parentMenuId: number +} + +export type CodegenColumnVO = { + id: number + tableId: number + columnName: string + dataType: string + columnComment: string + nullable: number + primaryKey: number + autoIncrement: string + ordinalPosition: number + javaType: string + javaField: string + dictType: string + example: string + createOperation: number + updateOperation: number + listOperation: number + listOperationCondition: string + listOperationResult: number + htmlType: string +} +export type DatabaseTableVO = { + name: string + comment: string +} +export type CodegenDetailVO = { + table: CodegenTableVO + columns: CodegenColumnVO[] +} +export type CodegenPreviewVO = { + filePath: string + code: string +} +export type CodegenUpdateReqVO = { + table: CodegenTableVO + columns: CodegenColumnVO[] +} +export type CodegenCreateListReqVO = { + dataSourceConfigId: number + tableNames: string[] +} diff --git a/src/api/infra/config/index.ts b/src/api/infra/config/index.ts index 07fb52fd..c6d3772e 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -12,6 +12,13 @@ export interface ConfigVO { createTime: Date } +export interface ConfigExportReqVO { + name?: string + key?: string + type?: number + createTime?: Date[] +} + // 查询参数列表 export const getConfigPage = (params: PageParam) => { return request.get({ url: '/infra/config/page', params }) @@ -43,6 +50,6 @@ export const deleteConfig = (id: number) => { } // 导出参数 -export const exportConfigApi = (params) => { +export const exportConfigApi = (params: ConfigExportReqVO) => { return request.download({ url: '/infra/config/export', params }) } diff --git a/src/api/infra/dataSourceConfig/index.ts b/src/api/infra/dataSourceConfig/index.ts index b413f345..c0f9f624 100644 --- a/src/api/infra/dataSourceConfig/index.ts +++ b/src/api/infra/dataSourceConfig/index.ts @@ -1,35 +1,35 @@ import request from '@/config/axios' export interface DataSourceConfigVO { - id: number | undefined + id: number name: string url: string username: string password: string - createTime?: Date + createTime: Date +} + +// 查询数据源配置列表 +export const getDataSourceConfigListApi = () => { + return request.get({ url: '/infra/data-source-config/list' }) +} + +// 查询数据源配置详情 +export const getDataSourceConfigApi = (id: number) => { + return request.get({ url: '/infra/data-source-config/get?id=' + id }) } // 新增数据源配置 -export const createDataSourceConfig = (data: DataSourceConfigVO) => { +export const createDataSourceConfigApi = (data: DataSourceConfigVO) => { return request.post({ url: '/infra/data-source-config/create', data }) } // 修改数据源配置 -export const updateDataSourceConfig = (data: DataSourceConfigVO) => { +export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => { return request.put({ url: '/infra/data-source-config/update', data }) } // 删除数据源配置 -export const deleteDataSourceConfig = (id: number) => { +export const deleteDataSourceConfigApi = (id: number) => { return request.delete({ url: '/infra/data-source-config/delete?id=' + id }) } - -// 查询数据源配置详情 -export const getDataSourceConfig = (id: number) => { - return request.get({ url: '/infra/data-source-config/get?id=' + id }) -} - -// 查询数据源配置列表 -export const getDataSourceConfigList = () => { - return request.get({ url: '/infra/data-source-config/list' }) -} diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts index b72f18b7..9a4f625c 100644 --- a/src/api/infra/fileConfig/index.ts +++ b/src/api/infra/fileConfig/index.ts @@ -13,7 +13,6 @@ export interface FileClientConfig { accessSecret?: string domain: string } - export interface FileConfigVO { id: number name: string @@ -25,37 +24,43 @@ export interface FileConfigVO { createTime: Date } +export interface FileConfigPageReqVO extends PageParam { + name?: string + storage?: number + createTime?: Date[] +} + // 查询文件配置列表 -export const getFileConfigPage = (params: PageParam) => { +export const getFileConfigPageApi = (params: FileConfigPageReqVO) => { return request.get({ url: '/infra/file-config/page', params }) } // 查询文件配置详情 -export const getFileConfig = (id: number) => { +export const getFileConfigApi = (id: number) => { return request.get({ url: '/infra/file-config/get?id=' + id }) } // 更新文件配置为主配置 -export const updateFileConfigMaster = (id: number) => { +export const updateFileConfigMasterApi = (id: number) => { return request.put({ url: '/infra/file-config/update-master?id=' + id }) } // 新增文件配置 -export const createFileConfig = (data: FileConfigVO) => { +export const createFileConfigApi = (data: FileConfigVO) => { return request.post({ url: '/infra/file-config/create', data }) } // 修改文件配置 -export const updateFileConfig = (data: FileConfigVO) => { +export const updateFileConfigApi = (data: FileConfigVO) => { return request.put({ url: '/infra/file-config/update', data }) } // 删除文件配置 -export const deleteFileConfig = (id: number) => { +export const deleteFileConfigApi = (id: number) => { return request.delete({ url: '/infra/file-config/delete?id=' + id }) } // 测试文件配置 -export const testFileConfig = (id: number) => { +export const testFileConfigApi = (id: number) => { return request.get({ url: '/infra/file-config/test?id=' + id }) } diff --git a/src/api/infra/fileList/index.ts b/src/api/infra/fileList/index.ts new file mode 100644 index 00000000..48b3c991 --- /dev/null +++ b/src/api/infra/fileList/index.ts @@ -0,0 +1,28 @@ +import request from '@/config/axios' + +export interface FileVO { + id: number + configId: number + path: string + name: string + url: string + size: string + type: string + createTime: Date +} + +export interface FilePageReqVO extends PageParam { + path?: string + type?: string + createTime?: Date[] +} + +// 查询文件列表 +export const getFilePageApi = (params: FilePageReqVO) => { + return request.get({ url: '/infra/file/page', params }) +} + +// 删除文件 +export const deleteFileApi = (id: number) => { + return request.delete({ url: '/infra/file/delete?id=' + id }) +} diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts index c1398d07..63f15da0 100644 --- a/src/api/infra/job/index.ts +++ b/src/api/infra/job/index.ts @@ -13,38 +13,50 @@ export interface JobVO { createTime: Date } +export interface JobPageReqVO extends PageParam { + name?: string + status?: number + handlerName?: string +} + +export interface JobExportReqVO { + name?: string + status?: number + handlerName?: string +} + // 任务列表 -export const getJobPage = (params: PageParam) => { +export const getJobPageApi = (params: JobPageReqVO) => { return request.get({ url: '/infra/job/page', params }) } // 任务详情 -export const getJob = (id: number) => { +export const getJobApi = (id: number) => { return request.get({ url: '/infra/job/get?id=' + id }) } // 新增任务 -export const createJob = (data: JobVO) => { +export const createJobApi = (data: JobVO) => { return request.post({ url: '/infra/job/create', data }) } // 修改定时任务调度 -export const updateJob = (data: JobVO) => { +export const updateJobApi = (data: JobVO) => { return request.put({ url: '/infra/job/update', data }) } // 删除定时任务调度 -export const deleteJob = (id: number) => { +export const deleteJobApi = (id: number) => { return request.delete({ url: '/infra/job/delete?id=' + id }) } // 导出定时任务调度 -export const exportJob = (params) => { +export const exportJobApi = (params: JobExportReqVO) => { return request.download({ url: '/infra/job/export-excel', params }) } // 任务状态修改 -export const updateJobStatus = (id: number, status: number) => { +export const updateJobStatusApi = (id: number, status: number) => { const params = { id, status @@ -58,6 +70,6 @@ export const runJobApi = (id: number) => { } // 获得定时任务的下 n 次执行时间 -export const getJobNextTimes = (id: number) => { +export const getJobNextTimesApi = (id: number) => { return request.get({ url: '/infra/job/get_next_times?id=' + id }) } diff --git a/src/api/infra/jobLog/index.ts b/src/api/infra/jobLog/index.ts index f429cd9e..84b74fbd 100644 --- a/src/api/infra/jobLog/index.ts +++ b/src/api/infra/jobLog/index.ts @@ -14,18 +14,34 @@ export interface JobLogVO { 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 getJobLogPage = (params: PageParam) => { +export const getJobLogPageApi = (params: JobLogPageReqVO) => { return request.get({ url: '/infra/job-log/page', params }) } // 任务日志详情 -export const getJobLog = (id: number) => { +export const getJobLogApi = (id: number) => { return request.get({ url: '/infra/job-log/get?id=' + id }) } // 导出定时任务日志 -export const exportJobLog = (params) => { +export const exportJobLogApi = (params: JobLogExportReqVO) => { return request.download({ url: '/infra/job-log/export-excel', params diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts index d641ef3c..cbdb1422 100644 --- a/src/api/mp/account/index.ts +++ b/src/api/mp/account/index.ts @@ -1,10 +1,5 @@ import request from '@/config/axios' -export interface AccountVO { - id?: number - name: string -} - // 创建公众号账号 export const createAccount = async (data) => { return await request.post({ url: '/mp/account/create', data }) @@ -31,7 +26,7 @@ export const getAccountPage = async (query) => { } // 获取公众号账号精简信息列表 -export const getSimpleAccountList = async () => { +export const getSimpleAccounts = async () => { return request.get({ url: '/mp/account/list-all-simple' }) } diff --git a/src/api/mp/message/index.ts b/src/api/mp/message/index.ts index ad9b95dd..8b7d3cbd 100644 --- a/src/api/mp/message/index.ts +++ b/src/api/mp/message/index.ts @@ -1,7 +1,7 @@ import request from '@/config/axios' // 获得公众号消息分页 -export const getMessagePage = (query: PageParam) => { +export const getMessagePage = (query) => { return request.get({ url: '/mp/message/page', params: query diff --git a/src/api/mp/tag/index.ts b/src/api/mp/tag/index.ts index 50183a51..e681e2e1 100644 --- a/src/api/mp/tag/index.ts +++ b/src/api/mp/tag/index.ts @@ -1,14 +1,7 @@ import request from '@/config/axios' -export interface TagVO { - id?: number - name: string - accountId: number - createTime: Date -} - // 创建公众号标签 -export const createTag = (data: TagVO) => { +export const createTag = (data) => { return request.post({ url: '/mp/tag/create', data: data @@ -16,7 +9,7 @@ export const createTag = (data: TagVO) => { } // 更新公众号标签 -export const updateTag = (data: TagVO) => { +export const updateTag = (data) => { return request.put({ url: '/mp/tag/update', data: data @@ -24,21 +17,21 @@ export const updateTag = (data: TagVO) => { } // 删除公众号标签 -export const deleteTag = (id: number) => { +export const deleteTag = (id) => { return request.delete({ url: '/mp/tag/delete?id=' + id }) } // 获得公众号标签 -export const getTag = (id: number) => { +export const getTag = (id) => { return request.get({ url: '/mp/tag/get?id=' + id }) } // 获得公众号标签分页 -export const getTagPage = (query: PageParam) => { +export const getTagPage = (query) => { return request.get({ url: '/mp/tag/page', params: query @@ -46,14 +39,14 @@ export const getTagPage = (query: PageParam) => { } // 获取公众号标签精简信息列表 -export const getSimpleTagList = () => { +export const getSimpleTags = () => { return request.get({ url: '/mp/tag/list-all-simple' }) } // 同步公众号标签 -export const syncTag = (accountId: number) => { +export const syncTag = (accountId) => { return request.post({ url: '/mp/tag/sync?accountId=' + accountId }) diff --git a/src/api/pay/merchant/index.ts b/src/api/pay/merchant/index.ts index bfb8f5e4..b4b6ba51 100644 --- a/src/api/pay/merchant/index.ts +++ b/src/api/pay/merchant/index.ts @@ -29,17 +29,17 @@ export interface MerchantExportReqVO { } // 查询列表支付商户 -export const getMerchantPage = (params: MerchantPageReqVO) => { +export const getMerchantPageApi = (params: MerchantPageReqVO) => { return request.get({ url: '/pay/merchant/page', params }) } // 查询详情支付商户 -export const getMerchant = (id: number) => { +export const getMerchantApi = (id: number) => { return request.get({ url: '/pay/merchant/get?id=' + id }) } // 根据商户名称搜索商户列表 -export const getMerchantListByName = (name: string) => { +export const getMerchantListByNameApi = (name: string) => { return request.get({ url: '/pay/merchant/list-by-name?id=', params: { @@ -49,27 +49,26 @@ export const getMerchantListByName = (name: string) => { } // 新增支付商户 -export const createMerchant = (data: MerchantVO) => { +export const createMerchantApi = (data: MerchantVO) => { return request.post({ url: '/pay/merchant/create', data }) } // 修改支付商户 -export const updateMerchant = (data: MerchantVO) => { +export const updateMerchantApi = (data: MerchantVO) => { return request.put({ url: '/pay/merchant/update', data }) } // 删除支付商户 -export const deleteMerchant = (id: number) => { +export const deleteMerchantApi = (id: number) => { return request.delete({ url: '/pay/merchant/delete?id=' + id }) } // 导出支付商户 -export const exportMerchant = (params: MerchantExportReqVO) => { +export const exportMerchantApi = (params: MerchantExportReqVO) => { return request.download({ url: '/pay/merchant/export-excel', params }) } - // 支付商户状态修改 -export const updateMerchantStatus = (id: number, status: number) => { +export const changeMerchantStatusApi = (id: number, status: number) => { const data = { id, status diff --git a/src/api/system/area/index.ts b/src/api/system/area/index.ts index e91a4997..7d8a9d7c 100644 --- a/src/api/system/area/index.ts +++ b/src/api/system/area/index.ts @@ -1,11 +1,15 @@ -import request from '@/config/axios' +import request from '@/config/axios/request' // 获得地区树 -export const getAreaTree = async () => { - return await request.get({ url: '/system/area/tree' }) +export const getAreaTree = async (content?: any) => { + return await request.get({ + url: '/system/area/tree', + params: content + }) } - // 获得 IP 对应的地区名 -export const getAreaByIp = async (ip: string) => { - return await request.get({ url: '/system/area/get-by-ip?ip=' + ip }) +export const getAreaByIp = async (ip) => { + return await request.get({ + url: '/system/area/get-by-ip?ip=' + ip + }) } diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index e9c31fd7..d66de3f1 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -18,7 +18,7 @@ export interface DeptPageReqVO { } // 查询部门(精简)列表 -export const getSimpleDeptList = async (): Promise => { +export const listSimpleDeptApi = async () => { return await request.get({ url: '/system/dept/list-all-simple' }) } diff --git a/src/api/system/dict/dict.data.ts b/src/api/system/dict/dict.data.ts index 6d981326..fd97a2dc 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -1,49 +1,36 @@ import request from '@/config/axios' - -export type DictDataVO = { - id: number | undefined - sort: number | undefined - label: string - value: string - dictType: string - status: number - colorType: string - cssClass: string - remark: string - createTime: Date -} +import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' // 查询字典数据(精简)列表 -export const listSimpleDictData = () => { +export const listSimpleDictDataApi = () => { return request.get({ url: '/system/dict-data/list-all-simple' }) } // 查询字典数据列表 -export const getDictDataPage = (params: PageParam) => { +export const getDictDataPageApi = (params: DictDataPageReqVO) => { return request.get({ url: '/system/dict-data/page', params }) } // 查询字典数据详情 -export const getDictData = (id: number) => { +export const getDictDataApi = (id: number) => { return request.get({ url: '/system/dict-data/get?id=' + id }) } // 新增字典数据 -export const createDictData = (data: DictDataVO) => { +export const createDictDataApi = (data: DictDataVO) => { return request.post({ url: '/system/dict-data/create', data }) } // 修改字典数据 -export const updateDictData = (data: DictDataVO) => { +export const updateDictDataApi = (data: DictDataVO) => { return request.put({ url: '/system/dict-data/update', data }) } // 删除字典数据 -export const deleteDictData = (id: number) => { +export const deleteDictDataApi = (id: number) => { return request.delete({ url: '/system/dict-data/delete?id=' + id }) } - // 导出字典类型数据 -export const exportDictDataApi = (params) => { +export const exportDictDataApi = (params: DictDataExportReqVO) => { return request.get({ url: '/system/dict-data/export', params }) } diff --git a/src/api/system/dict/dict.type.ts b/src/api/system/dict/dict.type.ts index ed2969f1..22e6411e 100644 --- a/src/api/system/dict/dict.type.ts +++ b/src/api/system/dict/dict.type.ts @@ -1,44 +1,36 @@ import request from '@/config/axios' - -export type DictTypeVO = { - id: number | undefined - name: string - type: string - status: number - remark: string - createTime: Date -} +import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' // 查询字典(精简)列表 -export const getSimpleDictTypeList = () => { +export const listSimpleDictTypeApi = () => { return request.get({ url: '/system/dict-type/list-all-simple' }) } // 查询字典列表 -export const getDictTypePage = (params: PageParam) => { +export const getDictTypePageApi = (params: DictTypePageReqVO) => { return request.get({ url: '/system/dict-type/page', params }) } // 查询字典详情 -export const getDictType = (id: number) => { +export const getDictTypeApi = (id: number) => { return request.get({ url: '/system/dict-type/get?id=' + id }) } // 新增字典 -export const createDictType = (data: DictTypeVO) => { +export const createDictTypeApi = (data: DictTypeVO) => { return request.post({ url: '/system/dict-type/create', data }) } // 修改字典 -export const updateDictType = (data: DictTypeVO) => { +export const updateDictTypeApi = (data: DictTypeVO) => { return request.put({ url: '/system/dict-type/update', data }) } // 删除字典 -export const deleteDictType = (id: number) => { +export const deleteDictTypeApi = (id: number) => { return request.delete({ url: '/system/dict-type/delete?id=' + id }) } // 导出字典类型 -export const exportDictType = (params) => { +export const exportDictTypeApi = (params: DictTypeExportReqVO) => { return request.get({ url: '/system/dict-type/export', params }) } diff --git a/src/api/system/dict/types.ts b/src/api/system/dict/types.ts new file mode 100644 index 00000000..b630dccb --- /dev/null +++ b/src/api/system/dict/types.ts @@ -0,0 +1,46 @@ +export type DictTypeVO = { + id: number + name: string + type: string + status: number + remark: string + createTime: Date +} + +export type DictTypePageReqVO = { + name: string + type: string + status: number + createTime: Date[] +} + +export type DictTypeExportReqVO = { + name: string + type: string + status: number + createTime: Date[] +} + +export type DictDataVO = { + id: number + sort: number + label: string + value: string + dictType: string + status: number + colorType: string + cssClass: string + remark: string + createTime: Date +} +export type DictDataPageReqVO = { + label: string + dictType: string + status: number +} + +export type DictDataExportReqVO = { + label: string + dictType: string + status: number +} diff --git a/src/api/system/errorCode/index.ts b/src/api/system/errorCode/index.ts index 65eabd3a..0e000794 100644 --- a/src/api/system/errorCode/index.ts +++ b/src/api/system/errorCode/index.ts @@ -1,10 +1,10 @@ import request from '@/config/axios' export interface ErrorCodeVO { - id: number | undefined + id: number type: number applicationName: string - code: number | undefined + code: number message: string memo: string createTime: Date diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index f275c3e2..cadaeaf3 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -13,12 +13,18 @@ export interface LoginLogVO { createTime: Date } -// 查询登录日志列表 -export const getLoginLogPage = (params: PageParam) => { - return request.get({ url: '/system/login-log/page', params }) +export interface LoginLogReqVO extends PageParam { + userIp?: string + username?: string + status?: boolean + createTime?: Date[] } +// 查询登录日志列表 +export const getLoginLogPageApi = (params: LoginLogReqVO) => { + return request.get({ url: '/system/login-log/page', params }) +} // 导出登录日志 -export const exportLoginLog = (params) => { +export const exportLoginLogApi = (params: LoginLogReqVO) => { return request.download({ url: '/system/login-log/export', params }) } diff --git a/src/api/system/mail/account/index.ts b/src/api/system/mail/account/index.ts index 9e10c92a..8b662a70 100644 --- a/src/api/system/mail/account/index.ts +++ b/src/api/system/mail/account/index.ts @@ -10,32 +10,37 @@ export interface MailAccountVO { sslEnable: boolean } +export interface MailAccountPageReqVO extends PageParam { + mail?: string + username?: string +} + // 查询邮箱账号列表 -export const getMailAccountPage = async (params: PageParam) => { +export const getMailAccountPageApi = async (params: MailAccountPageReqVO) => { return await request.get({ url: '/system/mail-account/page', params }) } // 查询邮箱账号详情 -export const getMailAccount = async (id: number) => { +export const getMailAccountApi = async (id: number) => { return await request.get({ url: '/system/mail-account/get?id=' + id }) } // 新增邮箱账号 -export const createMailAccount = async (data: MailAccountVO) => { +export const createMailAccountApi = async (data: MailAccountVO) => { return await request.post({ url: '/system/mail-account/create', data }) } // 修改邮箱账号 -export const updateMailAccount = async (data: MailAccountVO) => { +export const updateMailAccountApi = async (data: MailAccountVO) => { return await request.put({ url: '/system/mail-account/update', data }) } // 删除邮箱账号 -export const deleteMailAccount = async (id: number) => { +export const deleteMailAccountApi = async (id: number) => { return await request.delete({ url: '/system/mail-account/delete?id=' + id }) } // 获得邮箱账号精简列表 -export const getSimpleMailAccountList = async () => { +export const getSimpleMailAccounts = async () => { return request.get({ url: '/system/mail-account/list-all-simple' }) } diff --git a/src/api/system/mail/log/index.ts b/src/api/system/mail/log/index.ts index 13172a72..9c6c60eb 100644 --- a/src/api/system/mail/log/index.ts +++ b/src/api/system/mail/log/index.ts @@ -19,12 +19,22 @@ export interface MailLogVO { sendException: string } +export interface MailLogPageReqVO extends PageParam { + userId?: number + userType?: number + toMail?: string + accountId?: number + templateId?: number + sendStatus?: number + sendTime?: Date[] +} + // 查询邮件日志列表 -export const getMailLogPage = async (params: PageParam) => { +export const getMailLogPageApi = async (params: MailLogPageReqVO) => { return await request.get({ url: '/system/mail-log/page', params }) } // 查询邮件日志详情 -export const getMailLog = async (id: number) => { +export const getMailLogApi = async (id: number) => { return await request.get({ url: '/system/mail-log/get?id=' + id }) } diff --git a/src/api/system/mail/template/index.ts b/src/api/system/mail/template/index.ts index fb7ce5ea..c044ddd4 100644 --- a/src/api/system/mail/template/index.ts +++ b/src/api/system/mail/template/index.ts @@ -13,6 +13,14 @@ export interface MailTemplateVO { remark: string } +export interface MailTemplatePageReqVO extends PageParam { + name?: string + code?: string + accountId?: number + status?: number + createTime?: Date[] +} + export interface MailSendReqVO { mail: string templateCode: string @@ -20,31 +28,31 @@ export interface MailSendReqVO { } // 查询邮件模版列表 -export const getMailTemplatePage = async (params: PageParam) => { +export const getMailTemplatePageApi = async (params: MailTemplatePageReqVO) => { return await request.get({ url: '/system/mail-template/page', params }) } // 查询邮件模版详情 -export const getMailTemplate = async (id: number) => { +export const getMailTemplateApi = async (id: number) => { return await request.get({ url: '/system/mail-template/get?id=' + id }) } // 新增邮件模版 -export const createMailTemplate = async (data: MailTemplateVO) => { +export const createMailTemplateApi = async (data: MailTemplateVO) => { return await request.post({ url: '/system/mail-template/create', data }) } // 修改邮件模版 -export const updateMailTemplate = async (data: MailTemplateVO) => { +export const updateMailTemplateApi = async (data: MailTemplateVO) => { return await request.put({ url: '/system/mail-template/update', data }) } // 删除邮件模版 -export const deleteMailTemplate = async (id: number) => { +export const deleteMailTemplateApi = async (id: number) => { return await request.delete({ url: '/system/mail-template/delete?id=' + id }) } // 发送邮件 -export const sendMail = (data: MailSendReqVO) => { +export const sendMailApi = (data: MailSendReqVO) => { return request.post({ url: '/system/mail-template/send-mail', data }) } diff --git a/src/api/system/menu/index.ts b/src/api/system/menu/index.ts index 13736215..5913972b 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -18,13 +18,18 @@ export interface MenuVO { createTime: Date } +export interface MenuPageReqVO { + name?: string + status?: number +} + // 查询菜单(精简)列表 -export const getSimpleMenusList = () => { +export const listSimpleMenusApi = () => { return request.get({ url: '/system/menu/list-all-simple' }) } // 查询菜单列表 -export const getMenuList = (params) => { +export const getMenuListApi = (params: MenuPageReqVO) => { return request.get({ url: '/system/menu/list', params }) } @@ -34,16 +39,16 @@ export const getMenuApi = (id: number) => { } // 新增菜单 -export const createMenu = (data: MenuVO) => { +export const createMenuApi = (data: MenuVO) => { return request.post({ url: '/system/menu/create', data }) } // 修改菜单 -export const updateMenu = (data: MenuVO) => { +export const updateMenuApi = (data: MenuVO) => { return request.put({ url: '/system/menu/update', data }) } // 删除菜单 -export const deleteMenu = (id: number) => { +export const deleteMenuApi = (id: number) => { return request.delete({ url: '/system/menu/delete?id=' + id }) } diff --git a/src/api/system/notify/message/index.ts b/src/api/system/notify/message/index.ts index e24c3f8c..a42d75c2 100644 --- a/src/api/system/notify/message/index.ts +++ b/src/api/system/notify/message/index.ts @@ -15,13 +15,31 @@ export interface NotifyMessageVO { readTime: Date } +export interface NotifyMessagePageReqVO extends PageParam { + userId?: number + userType?: number + templateCode?: string + templateType?: number + createTime?: Date[] +} + +export interface NotifyMessageMyPageReqVO extends PageParam { + readStatus?: boolean + createTime?: Date[] +} + // 查询站内信消息列表 -export const getNotifyMessagePage = async (params: PageParam) => { +export const getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => { return await request.get({ url: '/system/notify-message/page', params }) } +// 查询站内信消息详情 +export const getNotifyMessageApi = async (id: number) => { + return await request.get({ url: '/system/notify-message/get?id=' + id }) +} + // 获得我的站内信分页 -export const getMyNotifyMessagePage = async (params: PageParam) => { +export const getMyNotifyMessagePage = async (params: NotifyMessageMyPageReqVO) => { return await request.get({ url: '/system/notify-message/my-page', params }) } diff --git a/src/api/system/oauth2/client.ts b/src/api/system/oauth2/client.ts index 6f71acad..4c06386d 100644 --- a/src/api/system/oauth2/client.ts +++ b/src/api/system/oauth2/client.ts @@ -21,27 +21,31 @@ export interface OAuth2ClientVO { createTime: Date } -// 查询 OAuth2 客户端的列表 -export const getOAuth2ClientPage = (params: PageParam) => { +export interface OAuth2ClientPageReqVO extends PageParam { + name?: string + status?: number +} +// 查询 OAuth2列表 +export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { return request.get({ url: '/system/oauth2-client/page', params }) } -// 查询 OAuth2 客户端的详情 -export const getOAuth2Client = (id: number) => { +// 查询 OAuth2详情 +export const getOAuth2ClientApi = (id: number) => { return request.get({ url: '/system/oauth2-client/get?id=' + id }) } -// 新增 OAuth2 客户端 -export const createOAuth2Client = (data: OAuth2ClientVO) => { +// 新增 OAuth2 +export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { return request.post({ url: '/system/oauth2-client/create', data }) } -// 修改 OAuth2 客户端 -export const updateOAuth2Client = (data: OAuth2ClientVO) => { +// 修改 OAuth2 +export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { return request.put({ url: '/system/oauth2-client/update', data }) } // 删除 OAuth2 -export const deleteOAuth2Client = (id: number) => { +export const deleteOAuth2ClientApi = (id: number) => { return request.delete({ url: '/system/oauth2-client/delete?id=' + id }) } diff --git a/src/api/system/oauth2/token.ts b/src/api/system/oauth2/token.ts index 8e9dca1e..dc7c44f5 100644 --- a/src/api/system/oauth2/token.ts +++ b/src/api/system/oauth2/token.ts @@ -11,12 +11,18 @@ export interface OAuth2TokenVO { expiresTime: Date } +export interface OAuth2TokenPageReqVO extends PageParam { + userId?: number + userType?: number + clientId?: string +} + // 查询 token列表 -export const getAccessTokenPage = (params: PageParam) => { +export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => { return request.get({ url: '/system/oauth2-token/page', params }) } // 删除 token -export const deleteAccessToken = (accessToken: number) => { +export const deleteAccessTokenApi = (accessToken: number) => { return request.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken }) } diff --git a/src/api/system/operatelog/index.ts b/src/api/system/operatelog/index.ts index 848a5333..5fd31dba 100644 --- a/src/api/system/operatelog/index.ts +++ b/src/api/system/operatelog/index.ts @@ -23,11 +23,19 @@ export type OperateLogVO = { resultData: string } +export interface OperateLogPageReqVO extends PageParam { + module?: string + userNickname?: string + type?: number + success?: boolean + startTime?: Date[] +} + // 查询操作日志列表 -export const getOperateLogPage = (params: PageParam) => { +export const getOperateLogPageApi = (params: OperateLogPageReqVO) => { return request.get({ url: '/system/operate-log/page', params }) } // 导出操作日志 -export const exportOperateLog = (params) => { +export const exportOperateLogApi = (params: OperateLogPageReqVO) => { return request.download({ url: '/system/operate-log/export', params }) } diff --git a/src/api/system/permission/index.ts b/src/api/system/permission/index.ts index baf2805b..aa355dfc 100644 --- a/src/api/system/permission/index.ts +++ b/src/api/system/permission/index.ts @@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO { } // 查询角色拥有的菜单权限 -export const getRoleMenuList = async (roleId: number) => { +export const listRoleMenusApi = async (roleId: number) => { return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId }) } // 赋予角色菜单权限 -export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => { +export const assignRoleMenuApi = async (data: PermissionAssignRoleMenuReqVO) => { return await request.post({ url: '/system/permission/assign-role-menu', data }) } // 赋予角色数据权限 -export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => { +export const assignRoleDataScopeApi = async (data: PermissionAssignRoleDataScopeReqVO) => { return await request.post({ url: '/system/permission/assign-role-data-scope', data }) } // 查询用户拥有的角色数组 -export const getUserRoleList = async (userId: number) => { +export const listUserRolesApi = async (userId: number) => { return await request.get({ url: '/system/permission/list-user-roles?userId=' + userId }) } // 赋予用户角色 -export const assignUserRole = async (data: PermissionAssignUserRoleReqVO) => { +export const aassignUserRoleApi = async (data: PermissionAssignUserRoleReqVO) => { return await request.post({ url: '/system/permission/assign-user-role', data }) } diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 405db387..9e2540f0 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -10,37 +10,49 @@ export interface PostVO { createTime?: Date } +export interface PostPageReqVO extends PageParam { + code?: string + name?: string + status?: number +} + +export interface PostExportReqVO { + code?: string + name?: string + status?: number +} + // 查询岗位列表 -export const getPostPage = async (params: PageParam) => { +export const getPostPageApi = async (params: PostPageReqVO) => { return await request.get({ url: '/system/post/page', params }) } // 获取岗位精简信息列表 -export const getSimplePostList = async (): Promise => { +export const listSimplePostsApi = async () => { return await request.get({ url: '/system/post/list-all-simple' }) } // 查询岗位详情 -export const getPost = async (id: number) => { +export const getPostApi = async (id: number) => { return await request.get({ url: '/system/post/get?id=' + id }) } // 新增岗位 -export const createPost = async (data: PostVO) => { +export const createPostApi = async (data: PostVO) => { return await request.post({ url: '/system/post/create', data }) } // 修改岗位 -export const updatePost = async (data: PostVO) => { +export const updatePostApi = async (data: PostVO) => { return await request.put({ url: '/system/post/update', data }) } // 删除岗位 -export const deletePost = async (id: number) => { +export const deletePostApi = async (id: number) => { return await request.delete({ url: '/system/post/delete?id=' + id }) } // 导出岗位 -export const exportPost = async (params) => { +export const exportPostApi = async (params: PostExportReqVO) => { return await request.download({ url: '/system/post/export', params }) } diff --git a/src/api/system/role/index.ts b/src/api/system/role/index.ts index 93636ff0..0d477555 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -7,55 +7,52 @@ export interface RoleVO { sort: number status: number type: number - dataScope: number - dataScopeDeptIds: number[] createTime: Date } +export interface RolePageReqVO extends PageParam { + name?: string + code?: string + status?: number + createTime?: Date[] +} + export interface UpdateStatusReqVO { id: number status: number } // 查询角色列表 -export const getRolePage = async (params: PageParam) => { +export const getRolePageApi = async (params: RolePageReqVO) => { return await request.get({ url: '/system/role/page', params }) } // 查询角色(精简)列表 -export const getSimpleRoleList = async (): Promise => { +export const listSimpleRolesApi = async () => { return await request.get({ url: '/system/role/list-all-simple' }) } // 查询角色详情 -export const getRole = async (id: number) => { +export const getRoleApi = async (id: number) => { return await request.get({ url: '/system/role/get?id=' + id }) } // 新增角色 -export const createRole = async (data: RoleVO) => { +export const createRoleApi = async (data: RoleVO) => { return await request.post({ url: '/system/role/create', data }) } // 修改角色 -export const updateRole = async (data: RoleVO) => { +export const updateRoleApi = async (data: RoleVO) => { return await request.put({ url: '/system/role/update', data }) } // 修改角色状态 -export const updateRoleStatus = async (data: UpdateStatusReqVO) => { +export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => { return await request.put({ url: '/system/role/update-status', data }) } // 删除角色 -export const deleteRole = async (id: number) => { +export const deleteRoleApi = async (id: number) => { return await request.delete({ url: '/system/role/delete?id=' + id }) } - -// 导出角色 -export const exportRole = (params) => { - return request.download({ - url: '/system/role/export-excel', - params - }) -} diff --git a/src/api/system/sensitiveWord/index.ts b/src/api/system/sensitiveWord/index.ts index 1116226f..ffda89c0 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -1,5 +1,4 @@ import request from '@/config/axios' -import qs from 'qs' export interface SensitiveWordVO { id: number @@ -10,49 +9,56 @@ export interface SensitiveWordVO { createTime: Date } -export interface SensitiveWordTestReqVO { - text: string - tag: string[] +export interface SensitiveWordPageReqVO extends PageParam { + name?: string + tag?: string + status?: number + createTime?: Date[] +} + +export interface SensitiveWordExportReqVO { + name?: string + tag?: string + status?: number + createTime?: Date[] } // 查询敏感词列表 -export const getSensitiveWordPage = (params: PageParam) => { +export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { return request.get({ url: '/system/sensitive-word/page', params }) } // 查询敏感词详情 -export const getSensitiveWord = (id: number) => { +export const getSensitiveWordApi = (id: number) => { return request.get({ url: '/system/sensitive-word/get?id=' + id }) } // 新增敏感词 -export const createSensitiveWord = (data: SensitiveWordVO) => { +export const createSensitiveWordApi = (data: SensitiveWordVO) => { return request.post({ url: '/system/sensitive-word/create', data }) } // 修改敏感词 -export const updateSensitiveWord = (data: SensitiveWordVO) => { +export const updateSensitiveWordApi = (data: SensitiveWordVO) => { return request.put({ url: '/system/sensitive-word/update', data }) } // 删除敏感词 -export const deleteSensitiveWord = (id: number) => { +export const deleteSensitiveWordApi = (id: number) => { return request.delete({ url: '/system/sensitive-word/delete?id=' + id }) } // 导出敏感词 -export const exportSensitiveWord = (params) => { +export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } // 获取所有敏感词的标签数组 -export const getSensitiveWordTagList = () => { +export const getSensitiveWordTagsApi = () => { return request.get({ url: '/system/sensitive-word/get-tags' }) } // 获得文本所包含的不合法的敏感词数组 -export const validateText = (query: SensitiveWordTestReqVO) => { - return request.get({ - url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' }) - }) +export const validateTextApi = (id: number) => { + return request.get({ url: '/system/sensitive-word/validate-text?' + id }) } diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts index f335628f..176d075f 100644 --- a/src/api/system/sms/smsChannel/index.ts +++ b/src/api/system/sms/smsChannel/index.ts @@ -12,32 +12,39 @@ export interface SmsChannelVO { createTime: Date } +export interface SmsChannelPageReqVO extends PageParam { + signature?: string + code?: string + status?: number + createTime?: Date[] +} + // 查询短信渠道列表 -export const getSmsChannelPage = (params: PageParam) => { +export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => { return request.get({ url: '/system/sms-channel/page', params }) } // 获得短信渠道精简列表 -export function getSimpleSmsChannelList() { +export function getSimpleSmsChannels() { return request.get({ url: '/system/sms-channel/list-all-simple' }) } // 查询短信渠道详情 -export const getSmsChannel = (id: number) => { +export const getSmsChannelApi = (id: number) => { return request.get({ url: '/system/sms-channel/get?id=' + id }) } // 新增短信渠道 -export const createSmsChannel = (data: SmsChannelVO) => { +export const createSmsChannelApi = (data: SmsChannelVO) => { return request.post({ url: '/system/sms-channel/create', data }) } // 修改短信渠道 -export const updateSmsChannel = (data: SmsChannelVO) => { +export const updateSmsChannelApi = (data: SmsChannelVO) => { return request.put({ url: '/system/sms-channel/update', data }) } // 删除短信渠道 -export const deleteSmsChannel = (id: number) => { +export const deleteSmsChannelApi = (id: number) => { return request.delete({ url: '/system/sms-channel/delete?id=' + id }) } diff --git a/src/api/system/sms/smsLog/index.ts b/src/api/system/sms/smsLog/index.ts index 3d54fac1..863eabb6 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -1,39 +1,57 @@ import request from '@/config/axios' export interface SmsLogVO { - id: number | null - channelId: number | null + id: number + channelId: number channelCode: string - templateId: number | null + templateId: number templateCode: string - templateType: number | null + templateType: number templateContent: string - templateParams: Map | null - apiTemplateId: string + templateParams: Map mobile: string - userId: number | null - userType: number | null - sendStatus: number | null - sendTime: Date | null - sendCode: number | null + userId: number + userType: number + sendStatus: number + sendTime: Date + sendCode: number sendMsg: string apiSendCode: string apiSendMsg: string apiRequestId: string apiSerialNo: string - receiveStatus: number | null - receiveTime: Date | null + receiveStatus: number + receiveTime: Date apiReceiveCode: string apiReceiveMsg: string - createTime: Date | null + createTime: Date +} + +export interface SmsLogPageReqVO extends PageParam { + channelId?: number + templateId?: number + mobile?: string + sendStatus?: number + sendTime?: Date[] + receiveStatus?: number + receiveTime?: Date[] +} +export interface SmsLogExportReqVO { + channelId?: number + templateId?: number + mobile?: string + sendStatus?: number + sendTime?: Date[] + receiveStatus?: number + receiveTime?: Date[] } // 查询短信日志列表 -export const getSmsLogPage = (params: PageParam) => { +export const getSmsLogPageApi = (params: SmsLogPageReqVO) => { return request.get({ url: '/system/sms-log/page', params }) } // 导出短信日志 -export const exportSmsLog = (params) => { +export const exportSmsLogApi = (params: SmsLogExportReqVO) => { return request.download({ url: '/system/sms-log/export-excel', params }) } diff --git a/src/api/system/sms/smsTemplate/index.ts b/src/api/system/sms/smsTemplate/index.ts index 35cb489d..0433fe3a 100644 --- a/src/api/system/sms/smsTemplate/index.ts +++ b/src/api/system/sms/smsTemplate/index.ts @@ -1,18 +1,18 @@ import request from '@/config/axios' export interface SmsTemplateVO { - id: number | null - type: number | null + id: number + type: number status: number code: string name: string content: string remark: string apiTemplateId: string - channelId: number | null - channelCode?: string - params?: string[] - createTime?: Date + channelId: number + channelCode: string + params: string[] + createTime: Date } export interface SendSmsReqVO { @@ -21,40 +21,60 @@ export interface SendSmsReqVO { templateParams: Map } +export interface SmsTemplatePageReqVO { + type?: number + status?: number + code?: string + content?: string + apiTemplateId?: string + channelId?: number + createTime?: Date[] +} + +export interface SmsTemplateExportReqVO { + type?: number + status?: number + code?: string + content?: string + apiTemplateId?: string + channelId?: number + createTime?: Date[] +} + // 查询短信模板列表 -export const getSmsTemplatePage = (params: PageParam) => { +export const getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { return request.get({ url: '/system/sms-template/page', params }) } // 查询短信模板详情 -export const getSmsTemplate = (id: number) => { +export const getSmsTemplateApi = (id: number) => { return request.get({ url: '/system/sms-template/get?id=' + id }) } // 新增短信模板 -export const createSmsTemplate = (data: SmsTemplateVO) => { +export const createSmsTemplateApi = (data: SmsTemplateVO) => { return request.post({ url: '/system/sms-template/create', data }) } // 修改短信模板 -export const updateSmsTemplate = (data: SmsTemplateVO) => { +export const updateSmsTemplateApi = (data: SmsTemplateVO) => { return request.put({ url: '/system/sms-template/update', data }) } // 删除短信模板 -export const deleteSmsTemplate = (id: number) => { +export const deleteSmsTemplateApi = (id: number) => { return request.delete({ url: '/system/sms-template/delete?id=' + id }) } +// 发送短信 +export const sendSmsApi = (data: SendSmsReqVO) => { + return request.post({ url: '/system/sms-template/send-sms', data }) +} + // 导出短信模板 -export const exportSmsTemplate = (params) => { +export const exportPostApi = (params: SmsTemplateExportReqVO) => { return request.download({ url: '/system/sms-template/export-excel', params }) } - -// 发送短信 -export const sendSms = (data: SendSmsReqVO) => { - return request.post({ url: '/system/sms-template/send-sms', data }) -} diff --git a/src/api/system/tenant/index.ts b/src/api/system/tenant/index.ts index 176c3757..d79fb7b2 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -32,31 +32,31 @@ export interface TenantExportReqVO { } // 查询租户列表 -export const getTenantPage = (params: TenantPageReqVO) => { +export const getTenantPageApi = (params: TenantPageReqVO) => { return request.get({ url: '/system/tenant/page', params }) } // 查询租户详情 -export const getTenant = (id: number) => { +export const getTenantApi = (id: number) => { return request.get({ url: '/system/tenant/get?id=' + id }) } // 新增租户 -export const createTenant = (data: TenantVO) => { +export const createTenantApi = (data: TenantVO) => { return request.post({ url: '/system/tenant/create', data }) } // 修改租户 -export const updateTenant = (data: TenantVO) => { +export const updateTenantApi = (data: TenantVO) => { return request.put({ url: '/system/tenant/update', data }) } // 删除租户 -export const deleteTenant = (id: number) => { +export const deleteTenantApi = (id: number) => { return request.delete({ url: '/system/tenant/delete?id=' + id }) } // 导出租户 -export const exportTenant = (params: TenantExportReqVO) => { +export const exportTenantApi = (params: TenantExportReqVO) => { return request.download({ url: '/system/tenant/export-excel', params }) } diff --git a/src/api/system/tenantPackage/index.ts b/src/api/system/tenantPackage/index.ts index 01d139e2..e431a9ee 100644 --- a/src/api/system/tenantPackage/index.ts +++ b/src/api/system/tenantPackage/index.ts @@ -12,28 +12,35 @@ export interface TenantPackageVO { createTime: Date } +export interface TenantPackagePageReqVO extends PageParam { + name?: string + status?: number + remark?: string + createTime?: Date[] +} + // 查询租户套餐列表 -export const getTenantPackagePage = (params: PageParam) => { +export const getTenantPackageTypePageApi = (params: TenantPackagePageReqVO) => { return request.get({ url: '/system/tenant-package/page', params }) } // 获得租户 -export const getTenantPackage = (id: number) => { +export const getTenantPackageApi = (id: number) => { return request.get({ url: '/system/tenant-package/get?id=' + id }) } // 新增租户套餐 -export const createTenantPackage = (data: TenantPackageVO) => { +export const createTenantPackageTypeApi = (data: TenantPackageVO) => { return request.post({ url: '/system/tenant-package/create', data }) } // 修改租户套餐 -export const updateTenantPackage = (data: TenantPackageVO) => { +export const updateTenantPackageTypeApi = (data: TenantPackageVO) => { return request.put({ url: '/system/tenant-package/update', data }) } // 删除租户套餐 -export const deleteTenantPackage = (id: number) => { +export const deleteTenantPackageTypeApi = (id: number) => { return request.delete({ url: '/system/tenant-package/delete?id=' + id }) } // 获取租户套餐精简信息列表 diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 6224f0e8..e505921d 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -17,43 +17,58 @@ export interface UserVO { createTime: Date } +export interface UserPageReqVO extends PageParam { + deptId?: number + username?: string + mobile?: string + status?: number + createTime?: Date[] +} + +export interface UserExportReqVO { + code?: string + name?: string + status?: number + createTime?: Date[] +} + // 查询用户管理列表 -export const getUserPage = (params: PageParam) => { +export const getUserPageApi = (params: UserPageReqVO) => { return request.get({ url: '/system/user/page', params }) } // 查询用户详情 -export const getUser = (id: number) => { +export const getUserApi = (id: number) => { return request.get({ url: '/system/user/get?id=' + id }) } // 新增用户 -export const createUser = (data: UserVO) => { +export const createUserApi = (data: UserVO) => { return request.post({ url: '/system/user/create', data }) } // 修改用户 -export const updateUser = (data: UserVO) => { +export const updateUserApi = (data: UserVO) => { return request.put({ url: '/system/user/update', data }) } // 删除用户 -export const deleteUser = (id: number) => { +export const deleteUserApi = (id: number) => { return request.delete({ url: '/system/user/delete?id=' + id }) } // 导出用户 -export const exportUser = (params) => { +export const exportUserApi = (params: UserExportReqVO) => { return request.download({ url: '/system/user/export', params }) } // 下载用户导入模板 -export const importUserTemplate = () => { +export const importUserTemplateApi = () => { return request.download({ url: '/system/user/get-import-template' }) } // 用户密码重置 -export const resetUserPwd = (id: number, password: string) => { +export const resetUserPwdApi = (id: number, password: string) => { const data = { id, password @@ -62,7 +77,7 @@ export const resetUserPwd = (id: number, password: string) => { } // 用户状态修改 -export const updateUserStatus = (id: number, status: number) => { +export const updateUserStatusApi = (id: number, status: number) => { const data = { id, status @@ -71,6 +86,6 @@ export const updateUserStatus = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getSimpleUserList = (): Promise => { +export const getListSimpleUsersApi = () => { return request.get({ url: '/system/user/list-all-simple' }) } diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue index 6890e214..51e50410 100644 --- a/src/components/ContentWrap/src/ContentWrap.vue +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -13,7 +13,7 @@ defineProps({