diff --git a/.gitignore b/.gitignore index 3efc9c52..ac15926b 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ dist-ssr pnpm-debug .idea -.history \ No newline at end of file +.history diff --git a/build/vite/index.ts b/build/vite/index.ts index 304ce0d5..dcec1aed 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(VITE_APP_TITLE: string) { +export function createVitePlugins() { const root = process.cwd() // 路径查找 function pathResolve(dir: string) { @@ -39,11 +39,14 @@ export function createVitePlugins(VITE_APP_TITLE: string) { imports: [ 'vue', 'vue-router', + // 可额外添加需要 autoImport 的组件 { '@/hooks/web/useI18n': ['useI18n'], - '@/hooks/web/useXTable': ['useXTable'], '@/hooks/web/useMessage': ['useMessage'], + '@/hooks/web/useXTable': ['useXTable'], '@/hooks/web/useVxeCrudSchemas': ['useVxeCrudSchemas'], + '@/hooks/web/useTable': ['useTable'], + '@/hooks/web/useCrudSchemas': ['useCrudSchemas'], '@/utils/formRules': ['required'], '@/utils/dict': ['DICT_TYPE'] } @@ -92,8 +95,6 @@ export function createVitePlugins(VITE_APP_TITLE: string) { ext: '.gz', // 生成的压缩包后缀 deleteOriginFile: false //压缩后是否删除源文件 }), - ViteEjsPlugin({ - title: VITE_APP_TITLE - }) + ViteEjsPlugin() ] } diff --git a/index.html b/index.html index cce65bdc..8cfcbefa 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@ name="description" content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite3 + element plus 的后台开源免费管理系统!" /> - <%= title %> + %VITE_APP_TITLE%
@@ -137,7 +137,7 @@
-
<%= title %>
+
%VITE_APP_TITLE%
diff --git a/package.json b/package.json index d067560f..683d09eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yudao-ui-admin-vue3", - "version": "1.7.1-snapshot.1941", + "version": "1.7.1-snapshot.1961", "description": "基于vue3、vite4、element-plus、typesScript", "author": "xingyu", "private": false, @@ -29,12 +29,14 @@ "@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", @@ -43,7 +45,7 @@ "diagram-js": "^11.6.0", "echarts": "^5.4.1", "echarts-wordcloud": "^2.1.0", - "element-plus": "2.2.34", + "element-plus": "2.3.1", "fast-xml-parser": "^4.1.3", "highlight.js": "^11.7.0", "intro.js": "^6.0.0", @@ -57,62 +59,63 @@ "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.10", + "vxe-table": "^4.3.11", "web-storage-cache": "^1.1.1", "xe-utils": "^3.5.7", "xml-js": "^1.6.11" }, "devDependencies": { - "@commitlint/cli": "^17.4.4", + "@commitlint/cli": "^17.5.0", "@commitlint/config-conventional": "^17.4.4", - "@iconify/json": "^2.2.31", - "@intlify/unplugin-vue-i18n": "^0.8.2", + "@iconify/json": "^2.2.38", + "@intlify/unplugin-vue-i18n": "^0.10.0", "@purge-icons/generated": "^0.9.0", "@types/intro.js": "^5.1.1", - "@types/lodash-es": "^4.17.6", - "@types/node": "^18.14.6", + "@types/lodash-es": "^4.17.7", + "@types/node": "^18.15.5", "@types/nprogress": "^0.2.0", "@types/qrcode": "^1.5.0", "@types/qs": "^6.9.7", - "@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", + "@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", "bpmn-js": "^8.9.0", "bpmn-js-properties-panel": "^0.46.0", "consola": "^2.15.3", - "eslint": "^8.35.0", - "eslint-config-prettier": "^8.7.0", - "eslint-define-config": "^1.15.0", + "eslint": "^8.36.0", + "eslint-config-prettier": "^8.8.0", + "eslint-define-config": "^1.17.0", "eslint-plugin-prettier": "^4.2.1", "eslint-plugin-vue": "^9.9.0", - "lint-staged": "^13.1.2", + "lint-staged": "^13.2.0", "postcss": "^8.4.21", "postcss-html": "^1.5.0", "postcss-scss": "^4.0.6", - "prettier": "^2.8.4", - "rimraf": "^4.3.1", - "rollup": "^3.18.0", - "sass": "^1.58.3", - "stylelint": "^15.2.0", + "prettier": "^2.8.6", + "rimraf": "^4.4.1", + "rollup": "^3.20.0", + "sass": "^1.59.3", + "stylelint": "^15.3.0", "stylelint-config-html": "^1.1.0", "stylelint-config-prettier": "^9.0.5", - "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", + "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", "unplugin-auto-import": "^0.15.1", "unplugin-element-plus": "^0.7.0", "unplugin-vue-components": "^0.24.1", - "vite": "4.1.4", + "vite": "4.2.1", "vite-plugin-compression": "^0.5.1", "vite-plugin-ejs": "^1.6.4", "vite-plugin-eslint": "^1.8.1", @@ -125,7 +128,7 @@ "windicss": "^3.5.6" }, "engines": { - "node": ">=16.0.0" + "node": ">=16.18.0" }, "license": "MIT", "repository": { diff --git a/src/api/bpm/definition/index.ts b/src/api/bpm/definition/index.ts index 477d6729..c0e51fab 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 getProcessDefinitionBpmnXMLApi = async (id: number) => { +export const getProcessDefinitionBpmnXML = async (id: number) => { return await request.get({ url: '/bpm/process-definition/get-bpmn-xml?id=' + id }) } -export const getProcessDefinitionPageApi = async (params) => { +export const getProcessDefinitionPage = async (params) => { return await request.get({ url: '/bpm/process-definition/page', params }) } -export const getProcessDefinitionListApi = async (params) => { +export const getProcessDefinitionList = 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 c745201f..142ed24c 100644 --- a/src/api/bpm/form/index.ts +++ b/src/api/bpm/form/index.ts @@ -11,7 +11,7 @@ export type FormVO = { } // 创建工作流的表单定义 -export const createFormApi = async (data: FormVO) => { +export const createForm = async (data: FormVO) => { return await request.post({ url: '/bpm/form/create', data: data @@ -19,7 +19,7 @@ export const createFormApi = async (data: FormVO) => { } // 更新工作流的表单定义 -export const updateFormApi = async (data: FormVO) => { +export const updateForm = async (data: FormVO) => { return await request.put({ url: '/bpm/form/update', data: data @@ -27,21 +27,21 @@ export const updateFormApi = async (data: FormVO) => { } // 删除工作流的表单定义 -export const deleteFormApi = async (id: number) => { +export const deleteForm = async (id: number) => { return await request.delete({ url: '/bpm/form/delete?id=' + id }) } // 获得工作流的表单定义 -export const getFormApi = async (id: number) => { +export const getForm = async (id: number) => { return await request.get({ url: '/bpm/form/get?id=' + id }) } // 获得工作流的表单定义分页 -export const getFormPageApi = async (params) => { +export const getFormPage = async (params) => { return await request.get({ url: '/bpm/form/page', params @@ -49,7 +49,7 @@ export const getFormPageApi = async (params) => { } // 获得动态表单的精简列表 -export const getSimpleFormsApi = async () => { +export const getSimpleFormList = 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 0335a3db..2e1d4e64 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 getModelPageApi = async (params) => { +export const getModelPage = async (params) => { return await request.get({ url: '/bpm/model/page', params }) } -export const getModelApi = async (id: number) => { +export const getModel = async (id: number) => { return await request.get({ url: '/bpm/model/get?id=' + id }) } -export const updateModelApi = async (data: ModelVO) => { +export const updateModel = async (data: ModelVO) => { return await request.put({ url: '/bpm/model/update', data: data }) } // 任务状态修改 -export const updateModelStateApi = async (id: number, state: number) => { +export const updateModelState = async (id: number, state: number) => { const data = { id: id, state: state @@ -46,14 +46,14 @@ export const updateModelStateApi = async (id: number, state: number) => { return await request.put({ url: '/bpm/model/update-state', data: data }) } -export const createModelApi = async (data: ModelVO) => { +export const createModel = async (data: ModelVO) => { return await request.post({ url: '/bpm/model/create', data: data }) } -export const deleteModelApi = async (id: number) => { +export const deleteModel = async (id: number) => { return await request.delete({ url: '/bpm/model/delete?id=' + id }) } -export const deployModelApi = async (id: number) => { +export const deployModel = 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 d48253c3..95591ae3 100644 --- a/src/api/bpm/processInstance/index.ts +++ b/src/api/bpm/processInstance/index.ts @@ -4,6 +4,7 @@ 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 88ee9619..035762bf 100644 --- a/src/api/bpm/userGroup/index.ts +++ b/src/api/bpm/userGroup/index.ts @@ -11,7 +11,7 @@ export type UserGroupVO = { } // 创建用户组 -export const createUserGroupApi = async (data: UserGroupVO) => { +export const createUserGroup = async (data: UserGroupVO) => { return await request.post({ url: '/bpm/user-group/create', data: data @@ -19,7 +19,7 @@ export const createUserGroupApi = async (data: UserGroupVO) => { } // 更新用户组 -export const updateUserGroupApi = async (data: UserGroupVO) => { +export const updateUserGroup = async (data: UserGroupVO) => { return await request.put({ url: '/bpm/user-group/update', data: data @@ -27,21 +27,21 @@ export const updateUserGroupApi = async (data: UserGroupVO) => { } // 删除用户组 -export const deleteUserGroupApi = async (id: number) => { +export const deleteUserGroup = async (id: number) => { return await request.delete({ url: '/bpm/user-group/delete?id=' + id }) } // 获得用户组 -export const getUserGroupApi = async (id: number) => { +export const getUserGroup = async (id: number) => { return await request.get({ url: '/bpm/user-group/get?id=' + id }) } // 获得用户组分页 -export const getUserGroupPageApi = async (params) => { +export const getUserGroupPage = async (params) => { return await request.get({ url: '/bpm/user-group/page', params }) } // 获取用户组精简信息列表 -export const listSimpleUserGroupsApi = async () => { +export const getSimpleUserGroupList = async (): Promise => { 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 b46199e4..c6b4b45f 100644 --- a/src/api/infra/apiAccessLog/index.ts +++ b/src/api/infra/apiAccessLog/index.ts @@ -19,32 +19,12 @@ 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 getApiAccessLogPageApi = (params: ApiAccessLogPageReqVO) => { +export const getApiAccessLogPage = (params: PageParam) => { return request.get({ url: '/infra/api-access-log/page', params }) } // 导出API 访问日志 -export const exportApiAccessLogApi = (params: ApiAccessLogExportReqVO) => { +export const exportApiAccessLog = (params) => { 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 06515c36..59ee2143 100644 --- a/src/api/infra/apiErrorLog/index.ts +++ b/src/api/infra/apiErrorLog/index.ts @@ -27,38 +27,20 @@ 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 getApiErrorLogPageApi = (params: ApiErrorLogPageReqVO) => { +export const getApiErrorLogPage = (params: PageParam) => { return request.get({ url: '/infra/api-error-log/page', params }) } // 更新 API 错误日志的处理状态 -export const updateApiErrorLogPageApi = (id: number, processStatus: number) => { +export const updateApiErrorLogPage = (id: number, processStatus: number) => { return request.put({ url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus }) } // 导出API 访问日志 -export const exportApiErrorLogApi = (params: ApiErrorLogExportReqVO) => { +export const exportApiErrorLog = (params) => { 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 54f00ff0..64701efe 100644 --- a/src/api/infra/codegen/index.ts +++ b/src/api/infra/codegen/index.ts @@ -1,57 +1,123 @@ import request from '@/config/axios' -import type { CodegenUpdateReqVO, CodegenCreateListReqVO } from './types' + +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[] +} // 查询列表代码生成表定义 -export const getCodegenTablePageApi = (params) => { +export const getCodegenTablePage = (params: PageParam) => { return request.get({ url: '/infra/codegen/table/page', params }) } // 查询详情代码生成表定义 -export const getCodegenTableApi = (id: number) => { +export const getCodegenTable = (id: number) => { return request.get({ url: '/infra/codegen/detail?tableId=' + id }) } // 新增代码生成表定义 -export const createCodegenTableApi = (data: CodegenCreateListReqVO) => { +export const createCodegenTable = (data: CodegenCreateListReqVO) => { return request.post({ url: '/infra/codegen/create', data }) } // 修改代码生成表定义 -export const updateCodegenTableApi = (data: CodegenUpdateReqVO) => { +export const updateCodegenTable = (data: CodegenUpdateReqVO) => { return request.put({ url: '/infra/codegen/update', data }) } // 基于数据库的表结构,同步数据库的表和字段定义 -export const syncCodegenFromDBApi = (id: number) => { +export const syncCodegenFromDB = (id: number) => { return request.put({ url: '/infra/codegen/sync-from-db?tableId=' + id }) } // 基于 SQL 建表语句,同步数据库的表和字段定义 -export const syncCodegenFromSQLApi = (id: number, sql: string) => { +export const syncCodegenFromSQL = (id: number, sql: string) => { return request.put({ url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql }) } // 预览生成代码 -export const previewCodegenApi = (id: number) => { +export const previewCodegen = (id: number) => { return request.get({ url: '/infra/codegen/preview?tableId=' + id }) } // 下载生成代码 -export const downloadCodegenApi = (id: number) => { +export const downloadCodegen = (id: number) => { return request.download({ url: '/infra/codegen/download?tableId=' + id }) } // 获得表定义 -export const getSchemaTableListApi = (params) => { +export const getSchemaTableList = (params) => { return request.get({ url: '/infra/codegen/db/table/list', params }) } // 基于数据库的表结构,创建代码生成器的表定义 -export const createCodegenListApi = (data) => { +export const createCodegenList = (data) => { return request.post({ url: '/infra/codegen/create-list', data }) } // 删除代码生成表定义 -export const deleteCodegenTableApi = (id: number) => { +export const deleteCodegenTable = (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 deleted file mode 100644 index be6a66ed..00000000 --- a/src/api/infra/codegen/types.ts +++ /dev/null @@ -1,61 +0,0 @@ -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 c6d3772e..07fb52fd 100644 --- a/src/api/infra/config/index.ts +++ b/src/api/infra/config/index.ts @@ -12,13 +12,6 @@ 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 }) @@ -50,6 +43,6 @@ export const deleteConfig = (id: number) => { } // 导出参数 -export const exportConfigApi = (params: ConfigExportReqVO) => { +export const exportConfigApi = (params) => { 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 c0f9f624..b413f345 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 + id: number | undefined name: string url: string username: string password: string - 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 }) + createTime?: Date } // 新增数据源配置 -export const createDataSourceConfigApi = (data: DataSourceConfigVO) => { +export const createDataSourceConfig = (data: DataSourceConfigVO) => { return request.post({ url: '/infra/data-source-config/create', data }) } // 修改数据源配置 -export const updateDataSourceConfigApi = (data: DataSourceConfigVO) => { +export const updateDataSourceConfig = (data: DataSourceConfigVO) => { return request.put({ url: '/infra/data-source-config/update', data }) } // 删除数据源配置 -export const deleteDataSourceConfigApi = (id: number) => { +export const deleteDataSourceConfig = (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/fileList/index.ts b/src/api/infra/file/index.ts similarity index 54% rename from src/api/infra/fileList/index.ts rename to src/api/infra/file/index.ts index 48b3c991..f64bc0d6 100644 --- a/src/api/infra/fileList/index.ts +++ b/src/api/infra/file/index.ts @@ -1,16 +1,5 @@ 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 @@ -18,11 +7,11 @@ export interface FilePageReqVO extends PageParam { } // 查询文件列表 -export const getFilePageApi = (params: FilePageReqVO) => { +export const getFilePage = (params: FilePageReqVO) => { return request.get({ url: '/infra/file/page', params }) } // 删除文件 -export const deleteFileApi = (id: number) => { +export const deleteFile = (id: number) => { return request.delete({ url: '/infra/file/delete?id=' + id }) } diff --git a/src/api/infra/fileConfig/index.ts b/src/api/infra/fileConfig/index.ts index 9a4f625c..b72f18b7 100644 --- a/src/api/infra/fileConfig/index.ts +++ b/src/api/infra/fileConfig/index.ts @@ -13,6 +13,7 @@ export interface FileClientConfig { accessSecret?: string domain: string } + export interface FileConfigVO { id: number name: string @@ -24,43 +25,37 @@ export interface FileConfigVO { createTime: Date } -export interface FileConfigPageReqVO extends PageParam { - name?: string - storage?: number - createTime?: Date[] -} - // 查询文件配置列表 -export const getFileConfigPageApi = (params: FileConfigPageReqVO) => { +export const getFileConfigPage = (params: PageParam) => { return request.get({ url: '/infra/file-config/page', params }) } // 查询文件配置详情 -export const getFileConfigApi = (id: number) => { +export const getFileConfig = (id: number) => { return request.get({ url: '/infra/file-config/get?id=' + id }) } // 更新文件配置为主配置 -export const updateFileConfigMasterApi = (id: number) => { +export const updateFileConfigMaster = (id: number) => { return request.put({ url: '/infra/file-config/update-master?id=' + id }) } // 新增文件配置 -export const createFileConfigApi = (data: FileConfigVO) => { +export const createFileConfig = (data: FileConfigVO) => { return request.post({ url: '/infra/file-config/create', data }) } // 修改文件配置 -export const updateFileConfigApi = (data: FileConfigVO) => { +export const updateFileConfig = (data: FileConfigVO) => { return request.put({ url: '/infra/file-config/update', data }) } // 删除文件配置 -export const deleteFileConfigApi = (id: number) => { +export const deleteFileConfig = (id: number) => { return request.delete({ url: '/infra/file-config/delete?id=' + id }) } // 测试文件配置 -export const testFileConfigApi = (id: number) => { +export const testFileConfig = (id: number) => { return request.get({ url: '/infra/file-config/test?id=' + id }) } diff --git a/src/api/infra/job/index.ts b/src/api/infra/job/index.ts index 63f15da0..c1398d07 100644 --- a/src/api/infra/job/index.ts +++ b/src/api/infra/job/index.ts @@ -13,50 +13,38 @@ 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 getJobPageApi = (params: JobPageReqVO) => { +export const getJobPage = (params: PageParam) => { return request.get({ url: '/infra/job/page', params }) } // 任务详情 -export const getJobApi = (id: number) => { +export const getJob = (id: number) => { return request.get({ url: '/infra/job/get?id=' + id }) } // 新增任务 -export const createJobApi = (data: JobVO) => { +export const createJob = (data: JobVO) => { return request.post({ url: '/infra/job/create', data }) } // 修改定时任务调度 -export const updateJobApi = (data: JobVO) => { +export const updateJob = (data: JobVO) => { return request.put({ url: '/infra/job/update', data }) } // 删除定时任务调度 -export const deleteJobApi = (id: number) => { +export const deleteJob = (id: number) => { return request.delete({ url: '/infra/job/delete?id=' + id }) } // 导出定时任务调度 -export const exportJobApi = (params: JobExportReqVO) => { +export const exportJob = (params) => { return request.download({ url: '/infra/job/export-excel', params }) } // 任务状态修改 -export const updateJobStatusApi = (id: number, status: number) => { +export const updateJobStatus = (id: number, status: number) => { const params = { id, status @@ -70,6 +58,6 @@ export const runJobApi = (id: number) => { } // 获得定时任务的下 n 次执行时间 -export const getJobNextTimesApi = (id: number) => { +export const getJobNextTimes = (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 84b74fbd..f429cd9e 100644 --- a/src/api/infra/jobLog/index.ts +++ b/src/api/infra/jobLog/index.ts @@ -14,34 +14,18 @@ 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 getJobLogPageApi = (params: JobLogPageReqVO) => { +export const getJobLogPage = (params: PageParam) => { return request.get({ url: '/infra/job-log/page', params }) } // 任务日志详情 -export const getJobLogApi = (id: number) => { +export const getJobLog = (id: number) => { return request.get({ url: '/infra/job-log/get?id=' + id }) } // 导出定时任务日志 -export const exportJobLogApi = (params: JobLogExportReqVO) => { +export const exportJobLog = (params) => { return request.download({ url: '/infra/job-log/export-excel', params diff --git a/src/api/mall/product/category.ts b/src/api/mall/product/category.ts new file mode 100644 index 00000000..7ae81285 --- /dev/null +++ b/src/api/mall/product/category.ts @@ -0,0 +1,60 @@ +import request from '@/config/axios' + +/** + * 产品分类 + */ +export interface CategoryVO { + /** + * 分类编号 + */ + id?: number + /** + * 父分类编号 + */ + parentId?: number + /** + * 分类名称 + */ + name: string + /** + * 分类图片 + */ + picUrl: string + /** + * 分类排序 + */ + sort?: number + /** + * 分类描述 + */ + description?: string + /** + * 开启状态 + */ + status: number +} + +// 创建商品分类 +export const createCategory = (data: CategoryVO) => { + return request.post({ url: '/product/category/create', data }) +} + +// 更新商品分类 +export const updateCategory = (data: CategoryVO) => { + return request.put({ url: '/product/category/update', data }) +} + +// 删除商品分类 +export const deleteCategory = (id: number) => { + return request.delete({ url: `/product/category/delete?id=${id}` }) +} + +// 获得商品分类 +export const getCategory = (id: number) => { + return request.get({ url: `/product/category/get?id=${id}` }) +} + +// 获得商品分类列表 +export const getCategoryList = (params: any) => { + return request.get({ url: '/product/category/list', params }) +} diff --git a/src/api/mall/product/property.ts b/src/api/mall/product/property.ts new file mode 100644 index 00000000..01c79f9f --- /dev/null +++ b/src/api/mall/product/property.ts @@ -0,0 +1,103 @@ +import request from '@/config/axios' + +/** + * 商品属性 + */ +export interface PropertyVO { + id?: number + /** 名称 */ + name: string + /** 备注 */ + remark?: string +} + +/** + * 属性值 + */ +export interface PropertyValueVO { + id?: number + /** 属性项的编号 */ + propertyId?: number + /** 名称 */ + name: string + /** 备注 */ + remark?: string +} + +/** + * 商品属性值的明细 + */ +export interface PropertyValueDetailVO { + /** 属性项的编号 */ + propertyId: number // 属性的编号 + /** 属性的名称 */ + propertyName: string + /** 属性值的编号 */ + valueId: number + /** 属性值的名称 */ + valueName: string +} + +// ------------------------ 属性项 ------------------- + +// 创建属性项 +export const createProperty = (data: PropertyVO) => { + return request.post({ url: '/product/property/create', data }) +} + +// 更新属性项 +export const updateProperty = (data: PropertyVO) => { + return request.put({ url: '/product/property/update', data }) +} + +// 删除属性项 +export const deleteProperty = (id: number) => { + return request.delete({ url: `/product/property/delete?id=${id}` }) +} + +// 获得属性项 +export const getProperty = (id: number): Promise => { + return request.get({ url: `/product/property/get?id=${id}` }) +} + +// 获得属性项分页 +export const getPropertyPage = (params: PageParam) => { + return request.get({ url: '/product/property/page', params }) +} + +// 获得属性项列表 +export const getPropertyList = (params: any) => { + return request.get({ url: '/product/property/list', params }) +} + +// 获得属性项列表 +export const getPropertyListAndValue = (params: any) => { + return request.get({ url: '/product/property/get-value-list', params }) +} + +// ------------------------ 属性值 ------------------- + +// 获得属性值分页 +export const getPropertyValuePage = (params: PageParam & any) => { + return request.get({ url: '/product/property/value/page', params }) +} + +// 获得属性值 +export const getPropertyValue = (id: number): Promise => { + return request.get({ url: `/product/property/value/get?id=${id}` }) +} + +// 创建属性值 +export const createPropertyValue = (data: PropertyValueVO) => { + return request.post({ url: '/product/property/value/create', data }) +} + +// 更新属性值 +export const updatePropertyValue = (data: PropertyValueVO) => { + return request.put({ url: '/product/property/value/update', data }) +} + +// 删除属性值 +export const deletePropertyValue = (id: number) => { + return request.delete({ url: `/product/property/value/delete?id=${id}` }) +} diff --git a/src/api/mp/account/index.ts b/src/api/mp/account/index.ts index cbdb1422..d641ef3c 100644 --- a/src/api/mp/account/index.ts +++ b/src/api/mp/account/index.ts @@ -1,5 +1,10 @@ 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 }) @@ -26,7 +31,7 @@ export const getAccountPage = async (query) => { } // 获取公众号账号精简信息列表 -export const getSimpleAccounts = async () => { +export const getSimpleAccountList = 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 8b7d3cbd..ad9b95dd 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) => { +export const getMessagePage = (query: PageParam) => { 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 e681e2e1..50183a51 100644 --- a/src/api/mp/tag/index.ts +++ b/src/api/mp/tag/index.ts @@ -1,7 +1,14 @@ import request from '@/config/axios' +export interface TagVO { + id?: number + name: string + accountId: number + createTime: Date +} + // 创建公众号标签 -export const createTag = (data) => { +export const createTag = (data: TagVO) => { return request.post({ url: '/mp/tag/create', data: data @@ -9,7 +16,7 @@ export const createTag = (data) => { } // 更新公众号标签 -export const updateTag = (data) => { +export const updateTag = (data: TagVO) => { return request.put({ url: '/mp/tag/update', data: data @@ -17,21 +24,21 @@ export const updateTag = (data) => { } // 删除公众号标签 -export const deleteTag = (id) => { +export const deleteTag = (id: number) => { return request.delete({ url: '/mp/tag/delete?id=' + id }) } // 获得公众号标签 -export const getTag = (id) => { +export const getTag = (id: number) => { return request.get({ url: '/mp/tag/get?id=' + id }) } // 获得公众号标签分页 -export const getTagPage = (query) => { +export const getTagPage = (query: PageParam) => { return request.get({ url: '/mp/tag/page', params: query @@ -39,14 +46,14 @@ export const getTagPage = (query) => { } // 获取公众号标签精简信息列表 -export const getSimpleTags = () => { +export const getSimpleTagList = () => { return request.get({ url: '/mp/tag/list-all-simple' }) } // 同步公众号标签 -export const syncTag = (accountId) => { +export const syncTag = (accountId: number) => { 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 b4b6ba51..bfb8f5e4 100644 --- a/src/api/pay/merchant/index.ts +++ b/src/api/pay/merchant/index.ts @@ -29,17 +29,17 @@ export interface MerchantExportReqVO { } // 查询列表支付商户 -export const getMerchantPageApi = (params: MerchantPageReqVO) => { +export const getMerchantPage = (params: MerchantPageReqVO) => { return request.get({ url: '/pay/merchant/page', params }) } // 查询详情支付商户 -export const getMerchantApi = (id: number) => { +export const getMerchant = (id: number) => { return request.get({ url: '/pay/merchant/get?id=' + id }) } // 根据商户名称搜索商户列表 -export const getMerchantListByNameApi = (name: string) => { +export const getMerchantListByName = (name: string) => { return request.get({ url: '/pay/merchant/list-by-name?id=', params: { @@ -49,26 +49,27 @@ export const getMerchantListByNameApi = (name: string) => { } // 新增支付商户 -export const createMerchantApi = (data: MerchantVO) => { +export const createMerchant = (data: MerchantVO) => { return request.post({ url: '/pay/merchant/create', data }) } // 修改支付商户 -export const updateMerchantApi = (data: MerchantVO) => { +export const updateMerchant = (data: MerchantVO) => { return request.put({ url: '/pay/merchant/update', data }) } // 删除支付商户 -export const deleteMerchantApi = (id: number) => { +export const deleteMerchant = (id: number) => { return request.delete({ url: '/pay/merchant/delete?id=' + id }) } // 导出支付商户 -export const exportMerchantApi = (params: MerchantExportReqVO) => { +export const exportMerchant = (params: MerchantExportReqVO) => { return request.download({ url: '/pay/merchant/export-excel', params }) } + // 支付商户状态修改 -export const changeMerchantStatusApi = (id: number, status: number) => { +export const updateMerchantStatus = (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 7d8a9d7c..e91a4997 100644 --- a/src/api/system/area/index.ts +++ b/src/api/system/area/index.ts @@ -1,15 +1,11 @@ -import request from '@/config/axios/request' +import request from '@/config/axios' // 获得地区树 -export const getAreaTree = async (content?: any) => { - return await request.get({ - url: '/system/area/tree', - params: content - }) +export const getAreaTree = async () => { + return await request.get({ url: '/system/area/tree' }) } + // 获得 IP 对应的地区名 -export const getAreaByIp = async (ip) => { - return await request.get({ - url: '/system/area/get-by-ip?ip=' + ip - }) +export const getAreaByIp = async (ip: string) => { + 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 d66de3f1..e9c31fd7 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -18,7 +18,7 @@ export interface DeptPageReqVO { } // 查询部门(精简)列表 -export const listSimpleDeptApi = async () => { +export const getSimpleDeptList = async (): Promise => { 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 fd97a2dc..6d981326 100644 --- a/src/api/system/dict/dict.data.ts +++ b/src/api/system/dict/dict.data.ts @@ -1,36 +1,49 @@ import request from '@/config/axios' -import type { DictDataVO, DictDataPageReqVO, DictDataExportReqVO } from './types' + +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 +} // 查询字典数据(精简)列表 -export const listSimpleDictDataApi = () => { +export const listSimpleDictData = () => { return request.get({ url: '/system/dict-data/list-all-simple' }) } // 查询字典数据列表 -export const getDictDataPageApi = (params: DictDataPageReqVO) => { +export const getDictDataPage = (params: PageParam) => { return request.get({ url: '/system/dict-data/page', params }) } // 查询字典数据详情 -export const getDictDataApi = (id: number) => { +export const getDictData = (id: number) => { return request.get({ url: '/system/dict-data/get?id=' + id }) } // 新增字典数据 -export const createDictDataApi = (data: DictDataVO) => { +export const createDictData = (data: DictDataVO) => { return request.post({ url: '/system/dict-data/create', data }) } // 修改字典数据 -export const updateDictDataApi = (data: DictDataVO) => { +export const updateDictData = (data: DictDataVO) => { return request.put({ url: '/system/dict-data/update', data }) } // 删除字典数据 -export const deleteDictDataApi = (id: number) => { +export const deleteDictData = (id: number) => { return request.delete({ url: '/system/dict-data/delete?id=' + id }) } + // 导出字典类型数据 -export const exportDictDataApi = (params: DictDataExportReqVO) => { +export const exportDictDataApi = (params) => { 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 22e6411e..ed2969f1 100644 --- a/src/api/system/dict/dict.type.ts +++ b/src/api/system/dict/dict.type.ts @@ -1,36 +1,44 @@ import request from '@/config/axios' -import type { DictTypeVO, DictTypePageReqVO, DictTypeExportReqVO } from './types' + +export type DictTypeVO = { + id: number | undefined + name: string + type: string + status: number + remark: string + createTime: Date +} // 查询字典(精简)列表 -export const listSimpleDictTypeApi = () => { +export const getSimpleDictTypeList = () => { return request.get({ url: '/system/dict-type/list-all-simple' }) } // 查询字典列表 -export const getDictTypePageApi = (params: DictTypePageReqVO) => { +export const getDictTypePage = (params: PageParam) => { return request.get({ url: '/system/dict-type/page', params }) } // 查询字典详情 -export const getDictTypeApi = (id: number) => { +export const getDictType = (id: number) => { return request.get({ url: '/system/dict-type/get?id=' + id }) } // 新增字典 -export const createDictTypeApi = (data: DictTypeVO) => { +export const createDictType = (data: DictTypeVO) => { return request.post({ url: '/system/dict-type/create', data }) } // 修改字典 -export const updateDictTypeApi = (data: DictTypeVO) => { +export const updateDictType = (data: DictTypeVO) => { return request.put({ url: '/system/dict-type/update', data }) } // 删除字典 -export const deleteDictTypeApi = (id: number) => { +export const deleteDictType = (id: number) => { return request.delete({ url: '/system/dict-type/delete?id=' + id }) } // 导出字典类型 -export const exportDictTypeApi = (params: DictTypeExportReqVO) => { +export const exportDictType = (params) => { 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 deleted file mode 100644 index b630dccb..00000000 --- a/src/api/system/dict/types.ts +++ /dev/null @@ -1,46 +0,0 @@ -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 0e000794..65eabd3a 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 + id: number | undefined type: number applicationName: string - code: number + code: number | undefined message: string memo: string createTime: Date diff --git a/src/api/system/loginLog/index.ts b/src/api/system/loginLog/index.ts index cadaeaf3..f275c3e2 100644 --- a/src/api/system/loginLog/index.ts +++ b/src/api/system/loginLog/index.ts @@ -13,18 +13,12 @@ export interface LoginLogVO { createTime: Date } -export interface LoginLogReqVO extends PageParam { - userIp?: string - username?: string - status?: boolean - createTime?: Date[] -} - // 查询登录日志列表 -export const getLoginLogPageApi = (params: LoginLogReqVO) => { +export const getLoginLogPage = (params: PageParam) => { return request.get({ url: '/system/login-log/page', params }) } + // 导出登录日志 -export const exportLoginLogApi = (params: LoginLogReqVO) => { +export const exportLoginLog = (params) => { 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 8b662a70..9e10c92a 100644 --- a/src/api/system/mail/account/index.ts +++ b/src/api/system/mail/account/index.ts @@ -10,37 +10,32 @@ export interface MailAccountVO { sslEnable: boolean } -export interface MailAccountPageReqVO extends PageParam { - mail?: string - username?: string -} - // 查询邮箱账号列表 -export const getMailAccountPageApi = async (params: MailAccountPageReqVO) => { +export const getMailAccountPage = async (params: PageParam) => { return await request.get({ url: '/system/mail-account/page', params }) } // 查询邮箱账号详情 -export const getMailAccountApi = async (id: number) => { +export const getMailAccount = async (id: number) => { return await request.get({ url: '/system/mail-account/get?id=' + id }) } // 新增邮箱账号 -export const createMailAccountApi = async (data: MailAccountVO) => { +export const createMailAccount = async (data: MailAccountVO) => { return await request.post({ url: '/system/mail-account/create', data }) } // 修改邮箱账号 -export const updateMailAccountApi = async (data: MailAccountVO) => { +export const updateMailAccount = async (data: MailAccountVO) => { return await request.put({ url: '/system/mail-account/update', data }) } // 删除邮箱账号 -export const deleteMailAccountApi = async (id: number) => { +export const deleteMailAccount = async (id: number) => { return await request.delete({ url: '/system/mail-account/delete?id=' + id }) } // 获得邮箱账号精简列表 -export const getSimpleMailAccounts = async () => { +export const getSimpleMailAccountList = 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 9c6c60eb..13172a72 100644 --- a/src/api/system/mail/log/index.ts +++ b/src/api/system/mail/log/index.ts @@ -19,22 +19,12 @@ 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 getMailLogPageApi = async (params: MailLogPageReqVO) => { +export const getMailLogPage = async (params: PageParam) => { return await request.get({ url: '/system/mail-log/page', params }) } // 查询邮件日志详情 -export const getMailLogApi = async (id: number) => { +export const getMailLog = 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 c044ddd4..fb7ce5ea 100644 --- a/src/api/system/mail/template/index.ts +++ b/src/api/system/mail/template/index.ts @@ -13,14 +13,6 @@ 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 @@ -28,31 +20,31 @@ export interface MailSendReqVO { } // 查询邮件模版列表 -export const getMailTemplatePageApi = async (params: MailTemplatePageReqVO) => { +export const getMailTemplatePage = async (params: PageParam) => { return await request.get({ url: '/system/mail-template/page', params }) } // 查询邮件模版详情 -export const getMailTemplateApi = async (id: number) => { +export const getMailTemplate = async (id: number) => { return await request.get({ url: '/system/mail-template/get?id=' + id }) } // 新增邮件模版 -export const createMailTemplateApi = async (data: MailTemplateVO) => { +export const createMailTemplate = async (data: MailTemplateVO) => { return await request.post({ url: '/system/mail-template/create', data }) } // 修改邮件模版 -export const updateMailTemplateApi = async (data: MailTemplateVO) => { +export const updateMailTemplate = async (data: MailTemplateVO) => { return await request.put({ url: '/system/mail-template/update', data }) } // 删除邮件模版 -export const deleteMailTemplateApi = async (id: number) => { +export const deleteMailTemplate = async (id: number) => { return await request.delete({ url: '/system/mail-template/delete?id=' + id }) } // 发送邮件 -export const sendMailApi = (data: MailSendReqVO) => { +export const sendMail = (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 5913972b..13736215 100644 --- a/src/api/system/menu/index.ts +++ b/src/api/system/menu/index.ts @@ -18,18 +18,13 @@ export interface MenuVO { createTime: Date } -export interface MenuPageReqVO { - name?: string - status?: number -} - // 查询菜单(精简)列表 -export const listSimpleMenusApi = () => { +export const getSimpleMenusList = () => { return request.get({ url: '/system/menu/list-all-simple' }) } // 查询菜单列表 -export const getMenuListApi = (params: MenuPageReqVO) => { +export const getMenuList = (params) => { return request.get({ url: '/system/menu/list', params }) } @@ -39,16 +34,16 @@ export const getMenuApi = (id: number) => { } // 新增菜单 -export const createMenuApi = (data: MenuVO) => { +export const createMenu = (data: MenuVO) => { return request.post({ url: '/system/menu/create', data }) } // 修改菜单 -export const updateMenuApi = (data: MenuVO) => { +export const updateMenu = (data: MenuVO) => { return request.put({ url: '/system/menu/update', data }) } // 删除菜单 -export const deleteMenuApi = (id: number) => { +export const deleteMenu = (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 a42d75c2..e24c3f8c 100644 --- a/src/api/system/notify/message/index.ts +++ b/src/api/system/notify/message/index.ts @@ -15,31 +15,13 @@ 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 getNotifyMessagePageApi = async (params: NotifyMessagePageReqVO) => { +export const getNotifyMessagePage = async (params: PageParam) => { 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: NotifyMessageMyPageReqVO) => { +export const getMyNotifyMessagePage = async (params: PageParam) => { 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 4c06386d..6f71acad 100644 --- a/src/api/system/oauth2/client.ts +++ b/src/api/system/oauth2/client.ts @@ -21,31 +21,27 @@ export interface OAuth2ClientVO { createTime: Date } -export interface OAuth2ClientPageReqVO extends PageParam { - name?: string - status?: number -} -// 查询 OAuth2列表 -export const getOAuth2ClientPageApi = (params: OAuth2ClientPageReqVO) => { +// 查询 OAuth2 客户端的列表 +export const getOAuth2ClientPage = (params: PageParam) => { return request.get({ url: '/system/oauth2-client/page', params }) } -// 查询 OAuth2详情 -export const getOAuth2ClientApi = (id: number) => { +// 查询 OAuth2 客户端的详情 +export const getOAuth2Client = (id: number) => { return request.get({ url: '/system/oauth2-client/get?id=' + id }) } -// 新增 OAuth2 -export const createOAuth2ClientApi = (data: OAuth2ClientVO) => { +// 新增 OAuth2 客户端 +export const createOAuth2Client = (data: OAuth2ClientVO) => { return request.post({ url: '/system/oauth2-client/create', data }) } -// 修改 OAuth2 -export const updateOAuth2ClientApi = (data: OAuth2ClientVO) => { +// 修改 OAuth2 客户端 +export const updateOAuth2Client = (data: OAuth2ClientVO) => { return request.put({ url: '/system/oauth2-client/update', data }) } // 删除 OAuth2 -export const deleteOAuth2ClientApi = (id: number) => { +export const deleteOAuth2Client = (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 dc7c44f5..8e9dca1e 100644 --- a/src/api/system/oauth2/token.ts +++ b/src/api/system/oauth2/token.ts @@ -11,18 +11,12 @@ export interface OAuth2TokenVO { expiresTime: Date } -export interface OAuth2TokenPageReqVO extends PageParam { - userId?: number - userType?: number - clientId?: string -} - // 查询 token列表 -export const getAccessTokenPageApi = (params: OAuth2TokenPageReqVO) => { +export const getAccessTokenPage = (params: PageParam) => { return request.get({ url: '/system/oauth2-token/page', params }) } // 删除 token -export const deleteAccessTokenApi = (accessToken: number) => { +export const deleteAccessToken = (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 5fd31dba..848a5333 100644 --- a/src/api/system/operatelog/index.ts +++ b/src/api/system/operatelog/index.ts @@ -23,19 +23,11 @@ export type OperateLogVO = { resultData: string } -export interface OperateLogPageReqVO extends PageParam { - module?: string - userNickname?: string - type?: number - success?: boolean - startTime?: Date[] -} - // 查询操作日志列表 -export const getOperateLogPageApi = (params: OperateLogPageReqVO) => { +export const getOperateLogPage = (params: PageParam) => { return request.get({ url: '/system/operate-log/page', params }) } // 导出操作日志 -export const exportOperateLogApi = (params: OperateLogPageReqVO) => { +export const exportOperateLog = (params) => { 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 aa355dfc..baf2805b 100644 --- a/src/api/system/permission/index.ts +++ b/src/api/system/permission/index.ts @@ -17,26 +17,26 @@ export interface PermissionAssignRoleDataScopeReqVO { } // 查询角色拥有的菜单权限 -export const listRoleMenusApi = async (roleId: number) => { +export const getRoleMenuList = async (roleId: number) => { return await request.get({ url: '/system/permission/list-role-resources?roleId=' + roleId }) } // 赋予角色菜单权限 -export const assignRoleMenuApi = async (data: PermissionAssignRoleMenuReqVO) => { +export const assignRoleMenu = async (data: PermissionAssignRoleMenuReqVO) => { return await request.post({ url: '/system/permission/assign-role-menu', data }) } // 赋予角色数据权限 -export const assignRoleDataScopeApi = async (data: PermissionAssignRoleDataScopeReqVO) => { +export const assignRoleDataScope = async (data: PermissionAssignRoleDataScopeReqVO) => { return await request.post({ url: '/system/permission/assign-role-data-scope', data }) } // 查询用户拥有的角色数组 -export const listUserRolesApi = async (userId: number) => { +export const getUserRoleList = async (userId: number) => { return await request.get({ url: '/system/permission/list-user-roles?userId=' + userId }) } // 赋予用户角色 -export const aassignUserRoleApi = async (data: PermissionAssignUserRoleReqVO) => { +export const assignUserRole = 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 9e2540f0..405db387 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -10,49 +10,37 @@ 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 getPostPageApi = async (params: PostPageReqVO) => { +export const getPostPage = async (params: PageParam) => { return await request.get({ url: '/system/post/page', params }) } // 获取岗位精简信息列表 -export const listSimplePostsApi = async () => { +export const getSimplePostList = async (): Promise => { return await request.get({ url: '/system/post/list-all-simple' }) } // 查询岗位详情 -export const getPostApi = async (id: number) => { +export const getPost = async (id: number) => { return await request.get({ url: '/system/post/get?id=' + id }) } // 新增岗位 -export const createPostApi = async (data: PostVO) => { +export const createPost = async (data: PostVO) => { return await request.post({ url: '/system/post/create', data }) } // 修改岗位 -export const updatePostApi = async (data: PostVO) => { +export const updatePost = async (data: PostVO) => { return await request.put({ url: '/system/post/update', data }) } // 删除岗位 -export const deletePostApi = async (id: number) => { +export const deletePost = async (id: number) => { return await request.delete({ url: '/system/post/delete?id=' + id }) } // 导出岗位 -export const exportPostApi = async (params: PostExportReqVO) => { +export const exportPost = async (params) => { 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 0d477555..93636ff0 100644 --- a/src/api/system/role/index.ts +++ b/src/api/system/role/index.ts @@ -7,52 +7,55 @@ 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 getRolePageApi = async (params: RolePageReqVO) => { +export const getRolePage = async (params: PageParam) => { return await request.get({ url: '/system/role/page', params }) } // 查询角色(精简)列表 -export const listSimpleRolesApi = async () => { +export const getSimpleRoleList = async (): Promise => { return await request.get({ url: '/system/role/list-all-simple' }) } // 查询角色详情 -export const getRoleApi = async (id: number) => { +export const getRole = async (id: number) => { return await request.get({ url: '/system/role/get?id=' + id }) } // 新增角色 -export const createRoleApi = async (data: RoleVO) => { +export const createRole = async (data: RoleVO) => { return await request.post({ url: '/system/role/create', data }) } // 修改角色 -export const updateRoleApi = async (data: RoleVO) => { +export const updateRole = async (data: RoleVO) => { return await request.put({ url: '/system/role/update', data }) } // 修改角色状态 -export const updateRoleStatusApi = async (data: UpdateStatusReqVO) => { +export const updateRoleStatus = async (data: UpdateStatusReqVO) => { return await request.put({ url: '/system/role/update-status', data }) } // 删除角色 -export const deleteRoleApi = async (id: number) => { +export const deleteRole = 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 ffda89c0..1116226f 100644 --- a/src/api/system/sensitiveWord/index.ts +++ b/src/api/system/sensitiveWord/index.ts @@ -1,4 +1,5 @@ import request from '@/config/axios' +import qs from 'qs' export interface SensitiveWordVO { id: number @@ -9,56 +10,49 @@ export interface SensitiveWordVO { createTime: Date } -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 interface SensitiveWordTestReqVO { + text: string + tag: string[] } // 查询敏感词列表 -export const getSensitiveWordPageApi = (params: SensitiveWordPageReqVO) => { +export const getSensitiveWordPage = (params: PageParam) => { return request.get({ url: '/system/sensitive-word/page', params }) } // 查询敏感词详情 -export const getSensitiveWordApi = (id: number) => { +export const getSensitiveWord = (id: number) => { return request.get({ url: '/system/sensitive-word/get?id=' + id }) } // 新增敏感词 -export const createSensitiveWordApi = (data: SensitiveWordVO) => { +export const createSensitiveWord = (data: SensitiveWordVO) => { return request.post({ url: '/system/sensitive-word/create', data }) } // 修改敏感词 -export const updateSensitiveWordApi = (data: SensitiveWordVO) => { +export const updateSensitiveWord = (data: SensitiveWordVO) => { return request.put({ url: '/system/sensitive-word/update', data }) } // 删除敏感词 -export const deleteSensitiveWordApi = (id: number) => { +export const deleteSensitiveWord = (id: number) => { return request.delete({ url: '/system/sensitive-word/delete?id=' + id }) } // 导出敏感词 -export const exportSensitiveWordApi = (params: SensitiveWordExportReqVO) => { +export const exportSensitiveWord = (params) => { return request.download({ url: '/system/sensitive-word/export-excel', params }) } // 获取所有敏感词的标签数组 -export const getSensitiveWordTagsApi = () => { +export const getSensitiveWordTagList = () => { return request.get({ url: '/system/sensitive-word/get-tags' }) } // 获得文本所包含的不合法的敏感词数组 -export const validateTextApi = (id: number) => { - return request.get({ url: '/system/sensitive-word/validate-text?' + id }) +export const validateText = (query: SensitiveWordTestReqVO) => { + return request.get({ + url: '/system/sensitive-word/validate-text?' + qs.stringify(query, { arrayFormat: 'repeat' }) + }) } diff --git a/src/api/system/sms/smsChannel/index.ts b/src/api/system/sms/smsChannel/index.ts index 176d075f..f335628f 100644 --- a/src/api/system/sms/smsChannel/index.ts +++ b/src/api/system/sms/smsChannel/index.ts @@ -12,39 +12,32 @@ export interface SmsChannelVO { createTime: Date } -export interface SmsChannelPageReqVO extends PageParam { - signature?: string - code?: string - status?: number - createTime?: Date[] -} - // 查询短信渠道列表 -export const getSmsChannelPageApi = (params: SmsChannelPageReqVO) => { +export const getSmsChannelPage = (params: PageParam) => { return request.get({ url: '/system/sms-channel/page', params }) } // 获得短信渠道精简列表 -export function getSimpleSmsChannels() { +export function getSimpleSmsChannelList() { return request.get({ url: '/system/sms-channel/list-all-simple' }) } // 查询短信渠道详情 -export const getSmsChannelApi = (id: number) => { +export const getSmsChannel = (id: number) => { return request.get({ url: '/system/sms-channel/get?id=' + id }) } // 新增短信渠道 -export const createSmsChannelApi = (data: SmsChannelVO) => { +export const createSmsChannel = (data: SmsChannelVO) => { return request.post({ url: '/system/sms-channel/create', data }) } // 修改短信渠道 -export const updateSmsChannelApi = (data: SmsChannelVO) => { +export const updateSmsChannel = (data: SmsChannelVO) => { return request.put({ url: '/system/sms-channel/update', data }) } // 删除短信渠道 -export const deleteSmsChannelApi = (id: number) => { +export const deleteSmsChannel = (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 863eabb6..3d54fac1 100644 --- a/src/api/system/sms/smsLog/index.ts +++ b/src/api/system/sms/smsLog/index.ts @@ -1,57 +1,39 @@ import request from '@/config/axios' export interface SmsLogVO { - id: number - channelId: number + id: number | null + channelId: number | null channelCode: string - templateId: number + templateId: number | null templateCode: string - templateType: number + templateType: number | null templateContent: string - templateParams: Map + templateParams: Map | null + apiTemplateId: string mobile: string - userId: number - userType: number - sendStatus: number - sendTime: Date - sendCode: number + userId: number | null + userType: number | null + sendStatus: number | null + sendTime: Date | null + sendCode: number | null sendMsg: string apiSendCode: string apiSendMsg: string apiRequestId: string apiSerialNo: string - receiveStatus: number - receiveTime: Date + receiveStatus: number | null + receiveTime: Date | null apiReceiveCode: string apiReceiveMsg: string - 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[] + createTime: Date | null } // 查询短信日志列表 -export const getSmsLogPageApi = (params: SmsLogPageReqVO) => { +export const getSmsLogPage = (params: PageParam) => { return request.get({ url: '/system/sms-log/page', params }) } // 导出短信日志 -export const exportSmsLogApi = (params: SmsLogExportReqVO) => { +export const exportSmsLog = (params) => { 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 0433fe3a..35cb489d 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 - type: number + id: number | null + type: number | null status: number code: string name: string content: string remark: string apiTemplateId: string - channelId: number - channelCode: string - params: string[] - createTime: Date + channelId: number | null + channelCode?: string + params?: string[] + createTime?: Date } export interface SendSmsReqVO { @@ -21,60 +21,40 @@ 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 getSmsTemplatePageApi = (params: SmsTemplatePageReqVO) => { +export const getSmsTemplatePage = (params: PageParam) => { return request.get({ url: '/system/sms-template/page', params }) } // 查询短信模板详情 -export const getSmsTemplateApi = (id: number) => { +export const getSmsTemplate = (id: number) => { return request.get({ url: '/system/sms-template/get?id=' + id }) } // 新增短信模板 -export const createSmsTemplateApi = (data: SmsTemplateVO) => { +export const createSmsTemplate = (data: SmsTemplateVO) => { return request.post({ url: '/system/sms-template/create', data }) } // 修改短信模板 -export const updateSmsTemplateApi = (data: SmsTemplateVO) => { +export const updateSmsTemplate = (data: SmsTemplateVO) => { return request.put({ url: '/system/sms-template/update', data }) } // 删除短信模板 -export const deleteSmsTemplateApi = (id: number) => { +export const deleteSmsTemplate = (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 exportPostApi = (params: SmsTemplateExportReqVO) => { +export const exportSmsTemplate = (params) => { 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 d79fb7b2..176c3757 100644 --- a/src/api/system/tenant/index.ts +++ b/src/api/system/tenant/index.ts @@ -32,31 +32,31 @@ export interface TenantExportReqVO { } // 查询租户列表 -export const getTenantPageApi = (params: TenantPageReqVO) => { +export const getTenantPage = (params: TenantPageReqVO) => { return request.get({ url: '/system/tenant/page', params }) } // 查询租户详情 -export const getTenantApi = (id: number) => { +export const getTenant = (id: number) => { return request.get({ url: '/system/tenant/get?id=' + id }) } // 新增租户 -export const createTenantApi = (data: TenantVO) => { +export const createTenant = (data: TenantVO) => { return request.post({ url: '/system/tenant/create', data }) } // 修改租户 -export const updateTenantApi = (data: TenantVO) => { +export const updateTenant = (data: TenantVO) => { return request.put({ url: '/system/tenant/update', data }) } // 删除租户 -export const deleteTenantApi = (id: number) => { +export const deleteTenant = (id: number) => { return request.delete({ url: '/system/tenant/delete?id=' + id }) } // 导出租户 -export const exportTenantApi = (params: TenantExportReqVO) => { +export const exportTenant = (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 e431a9ee..01d139e2 100644 --- a/src/api/system/tenantPackage/index.ts +++ b/src/api/system/tenantPackage/index.ts @@ -12,35 +12,28 @@ export interface TenantPackageVO { createTime: Date } -export interface TenantPackagePageReqVO extends PageParam { - name?: string - status?: number - remark?: string - createTime?: Date[] -} - // 查询租户套餐列表 -export const getTenantPackageTypePageApi = (params: TenantPackagePageReqVO) => { +export const getTenantPackagePage = (params: PageParam) => { return request.get({ url: '/system/tenant-package/page', params }) } // 获得租户 -export const getTenantPackageApi = (id: number) => { +export const getTenantPackage = (id: number) => { return request.get({ url: '/system/tenant-package/get?id=' + id }) } // 新增租户套餐 -export const createTenantPackageTypeApi = (data: TenantPackageVO) => { +export const createTenantPackage = (data: TenantPackageVO) => { return request.post({ url: '/system/tenant-package/create', data }) } // 修改租户套餐 -export const updateTenantPackageTypeApi = (data: TenantPackageVO) => { +export const updateTenantPackage = (data: TenantPackageVO) => { return request.put({ url: '/system/tenant-package/update', data }) } // 删除租户套餐 -export const deleteTenantPackageTypeApi = (id: number) => { +export const deleteTenantPackage = (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 e505921d..6224f0e8 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -17,58 +17,43 @@ 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 getUserPageApi = (params: UserPageReqVO) => { +export const getUserPage = (params: PageParam) => { return request.get({ url: '/system/user/page', params }) } // 查询用户详情 -export const getUserApi = (id: number) => { +export const getUser = (id: number) => { return request.get({ url: '/system/user/get?id=' + id }) } // 新增用户 -export const createUserApi = (data: UserVO) => { +export const createUser = (data: UserVO) => { return request.post({ url: '/system/user/create', data }) } // 修改用户 -export const updateUserApi = (data: UserVO) => { +export const updateUser = (data: UserVO) => { return request.put({ url: '/system/user/update', data }) } // 删除用户 -export const deleteUserApi = (id: number) => { +export const deleteUser = (id: number) => { return request.delete({ url: '/system/user/delete?id=' + id }) } // 导出用户 -export const exportUserApi = (params: UserExportReqVO) => { +export const exportUser = (params) => { return request.download({ url: '/system/user/export', params }) } // 下载用户导入模板 -export const importUserTemplateApi = () => { +export const importUserTemplate = () => { return request.download({ url: '/system/user/get-import-template' }) } // 用户密码重置 -export const resetUserPwdApi = (id: number, password: string) => { +export const resetUserPwd = (id: number, password: string) => { const data = { id, password @@ -77,7 +62,7 @@ export const resetUserPwdApi = (id: number, password: string) => { } // 用户状态修改 -export const updateUserStatusApi = (id: number, status: number) => { +export const updateUserStatus = (id: number, status: number) => { const data = { id, status @@ -86,6 +71,6 @@ export const updateUserStatusApi = (id: number, status: number) => { } // 获取用户精简信息列表 -export const getListSimpleUsersApi = () => { +export const getSimpleUserList = (): Promise => { return request.get({ url: '/system/user/list-all-simple' }) } diff --git a/src/assets/imgs/profile.jpg b/src/assets/imgs/profile.jpg new file mode 100644 index 00000000..e4bcf879 Binary files /dev/null and b/src/assets/imgs/profile.jpg differ diff --git a/src/assets/imgs/wechat.png b/src/assets/imgs/wechat.png new file mode 100644 index 00000000..6afc5e41 Binary files /dev/null and b/src/assets/imgs/wechat.png differ diff --git a/src/components/ContentWrap/src/ContentWrap.vue b/src/components/ContentWrap/src/ContentWrap.vue index 51e50410..6890e214 100644 --- a/src/components/ContentWrap/src/ContentWrap.vue +++ b/src/components/ContentWrap/src/ContentWrap.vue @@ -13,7 +13,7 @@ defineProps({