!217 add vue3(element plus)

Merge pull request !217 from xingyu/master
This commit is contained in:
芋道源码 2022-07-18 11:09:03 +00:00 committed by Gitee
commit 9fee39b53c
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
423 changed files with 41039 additions and 0 deletions

View File

@ -0,0 +1,12 @@
root = true
[*.{js,ts,vue}]
charset = utf-8 # 设置文件字符集为 utf-8
end_of_line = lf # 控制换行类型(lf | cr | crlf)
insert_final_newline = true # 始终在文件末尾插入一个新行
indent_style = space # 缩进风格tab | space
indent_size = 2 # 缩进大小
max_line_length = 100 # 最大行长度
[*.md] # 仅 md 文件适用以下规则
max_line_length = off # 关闭最大行长度限制
trim_trailing_whitespace = false # 关闭末尾空格修剪

11
yudao-ui-admin-vue3/.env Normal file
View File

@ -0,0 +1,11 @@
# 标题
VITE_APP_TITLE=芋道管理系统
# 项目本地运行端口号
VITE_PORT=80
# open 运行 npm run dev 时自动打开浏览器
VITE_OPEN=true
# 租户开关
VITE_APP_TENANT_ENABLE=true

View File

@ -0,0 +1,17 @@
# 本地开发环境
NODE_ENV=development
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=/dev-api
# 接口地址
VITE_API_URL=/admin-api
# 打包路径
VITE_BASE_PATH=/

View File

@ -0,0 +1,29 @@
# 开发环境
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=/dev-api
# 接口地址
VITE_API_URL=/admin-api
# 打包路径
VITE_BASE_PATH=/dist-dev/
# 是否删除debugger
VITE_DROP_DEBUGGER=false
# 是否删除console.log
VITE_DROP_CONSOLE=false
# 是否sourcemap
VITE_SOURCEMAP=true
# 输出路径
VITE_OUT_DIR=dist-dev

View File

@ -0,0 +1,29 @@
# 生产环境
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
# 接口地址
VITE_API_URL=/admin-api
# 是否删除debugger
VITE_DROP_DEBUGGER=true
# 是否删除console.log
VITE_DROP_CONSOLE=true
# 是否sourcemap
VITE_SOURCEMAP=false
# 打包路径
VITE_BASE_PATH=/
# 输出路径
VITE_OUT_DIR=dist-pro

View File

@ -0,0 +1,29 @@
# 测试环境
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=
# 接口地址
VITE_API_URL=/admin-api
# 是否删除debugger
VITE_DROP_DEBUGGER=false
# 是否删除console.log
VITE_DROP_CONSOLE=false
# 是否sourcemap
VITE_SOURCEMAP=true
# 打包路径
VITE_BASE_PATH=/dist-test/
# 输出路径
VITE_OUT_DIR=dist-test

View File

@ -0,0 +1,8 @@
/build/
/config/
/dist/
/*.js
/test/unit/coverage/
/node_modules/*
/dist*
/src/main.ts

View File

@ -0,0 +1,68 @@
// @ts-check
const { defineConfig } = require('eslint-define-config')
module.exports = defineConfig({
root: true,
env: {
browser: true,
node: true,
es6: true
},
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 2020,
sourceType: 'module',
jsxPragma: 'React',
ecmaFeatures: {
jsx: true
}
},
extends: [
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
'plugin:prettier/recommended'
],
rules: {
'vue/script-setup-uses-vars': 'error',
'vue/no-reserved-component-names': 'off',
'@typescript-eslint/ban-ts-ignore': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-function': 'off',
'vue/custom-event-name-casing': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'error',
'space-before-function-paren': 'off',
'vue/attributes-order': 'off',
'vue/one-component-per-file': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/max-attributes-per-line': 'off',
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
'vue/require-default-prop': 'off',
'vue/require-explicit-emits': 'off',
'vue/html-self-closing': [
'error',
{
html: {
void: 'always',
normal: 'never',
component: 'always'
},
svg: 'always',
math: 'always'
}
],
'vue/multi-word-component-names': 'off'
}
})

8
yudao-ui-admin-vue3/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
/dist*
pnpm-debug
/frank*

View File

@ -0,0 +1,10 @@
/node_modules/**
/dist/
/dist*
/public/*
/docs/*
/vite.config.ts
/src/types/env.d.ts
/docs/**/*
/plop/**/*
CHANGELOG

View File

@ -0,0 +1,6 @@
/dist/*
/public/*
public/*
/dist*
/src/types/env.d.ts
/docs/**/*

View File

@ -0,0 +1,16 @@
{
"types": [
{"type": "chore", "section":"Others", "hidden": false},
{"type": "revert", "section":"Reverts", "hidden": false},
{"type": "feat", "section": "Features", "hidden": false},
{"type": "fix", "section": "Bug Fixes", "hidden": false},
{"type": "improvement", "section": "Feature Improvements", "hidden": false},
{"type": "docs", "section":"Docs", "hidden": false},
{"type": "style", "section":"Styling", "hidden": false},
{"type": "refactor", "section":"Code Refactoring", "hidden": false},
{"type": "perf", "section":"Performance Improvements", "hidden": false},
{"type": "test", "section":"Tests", "hidden": false},
{"type": "build", "section":"Build System", "hidden": false},
{"type": "ci", "section":"CI", "hidden":false}
]
}

View File

@ -0,0 +1,15 @@
{
"recommendations": [
"voorjaar.windicss-intellisense",
"vscode-icons-team.vscode-icons",
"davidanson.vscode-markdownlint",
"stylelint.vscode-stylelint",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"vue.volar",
"lokalise.i18n-ally",
"mikestead.dotenv",
"eamodio.gitlens",
"antfu.iconify"
]
}

View File

@ -0,0 +1,43 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"prettier.enable": true,
"editor.formatOnType": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[css]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"i18n-ally.localesPaths": ["src/locales"],
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.namespace": true,
"i18n-ally.enabledParsers": ["ts"],
"i18n-ally.sourceLanguage": "en",
"i18n-ally.displayLanguage": "zh-CN",
"i18n-ally.enabledFrameworks": ["vue", "react"],
"god.tsconfig": "./tsconfig.json"
}

View File

@ -0,0 +1,85 @@
<h1>🌈 yudao-ui-admin-vue3</h1>
## 介绍
- 基于 vue3.2+ TypeScript Element Plus 2.2.0+ Vite3 Pinia Windicss 等开发的后台管理系统
## 注意事项
- 项目路径请不要使用中文命名!!!会造成解析乱码!!!请使用全英文路径!!!
- node >=14.18.0 ,pnpm >=7
- 开发建议使用 [谷歌浏览器-开发者版](https://www.google.cn/intl/zh-CN/chrome/dev/) 不支持 IE\QQ 等浏览器
### 前端依赖
| 框架 | 说明 | 版本 |
| --- | --- | --- |
| [Vue](https://staging-cn.vuejs.org/) | vue 框架 | 3.2.37 |
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 3.0.1 |
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.2.9 |
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 4.7.4 |
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.0.16 |
| [vueuse](https://vueuse.org//) | 常用工具集 | 8.9.4 |
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.1.10 |
| [vue-router](https://router.vuejs.org/) | vue 路由 | 4.1.2 |
| [windicss](https://cn.windicss.org/) | 下一代工具优先的 CSS 框架 | 3.5.6 |
| [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 2.2.1 |
| [wangeditor](https://www.wangeditor.com/) | 富文本编辑器 | 5.1.11 |
## 用法
### 推荐 VScode 开发,插件如下
- WindiCSS IntelliSense WindiCSS --- 自动完成、语法突出显示、代码折叠和构建等高级功能
- TypeScript Vue Plugin (Volar) --- 用于 TypeScript 的 Vue 插件
- Vue Language Features (Volar) --- Vue3.0 语法支持
- Iconify IntelliSense --- Iconify 预览和搜索
- i18n Ally --- 国际化智能提示
- Stylelint --- css 格式化
- DotENV --- .env 文件高亮
- Prettier --- 代码格式化
- ESLint --- 脚本代码检查
### 安装 pnpm 并启动项目
```
# 查看当前 npm 源
npm config ls
# 如果执行上面命令您并未看到 registry = "https://registry.npmjs.org/"说明使用的非npm官方源请执行下面命令
npm config set registry https://registry.npmjs.org
# 如果您还没安装 pnpm请执行下面命令
npm install -g pnpm
# mac 用户遇到安装报错请在命令前加上 sudo
# 安装依赖
pnpm install
# 运行项目
pnpm run dev
# 安装一个包
pnpm add 包名
# 卸载一个包
pnpm remove 包名
```
## 浏览器支持
本地开发推荐使用 `Chrome 80+` 浏览器
支持现代浏览器, 不支持 IE ,QQ 等
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt=" Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari |
| :-: | :-: | :-: | :-: | :-: |
| not support | last 2 versions | last 2 versions | last 2 versions | last 2 versions |

View File

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="keywords"
content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite + element plus 的后台开源免费管理系统!"
/>
<meta
name="description"
content="芋道管理系统 基于 vue3 + CompositionAPI + typescript + vite + element plus 的后台开源免费管理系统!"
/>
<title><%= title %></title>
</head>
<body>
<div id="app">
<style>
.app-loading {
display: flex;
width: 100%;
height: 100%;
justify-content: center;
align-items: center;
flex-direction: column;
background: #f0f2f5;
}
.app-loading .app-loading-wrap {
position: absolute;
top: 50%;
left: 50%;
display: flex;
-webkit-transform: translate3d(-50%, -50%, 0);
transform: translate3d(-50%, -50%, 0);
justify-content: center;
align-items: center;
flex-direction: column;
}
.app-loading .app-loading-title {
margin-bottom: 30px;
font-size: 20px;
font-weight: bold;
text-align: center;
}
.app-loading .app-loading-logo {
width: 100px;
margin: 0 auto 15px auto;
}
.app-loading .app-loading-item {
position: relative;
display: inline-block;
width: 60px;
height: 60px;
vertical-align: middle;
border-radius: 50%;
}
.app-loading .app-loading-outter {
position: absolute;
width: 100%;
height: 100%;
border: 4px solid #2d8cf0;
border-bottom: 0;
border-left-color: transparent;
border-radius: 50%;
animation: loader-outter 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
}
.app-loading .app-loading-inner {
position: absolute;
top: calc(50% - 20px);
left: calc(50% - 20px);
width: 40px;
height: 40px;
border: 4px solid #87bdff;
border-right: 0;
border-top-color: transparent;
border-radius: 50%;
animation: loader-inner 1s cubic-bezier(0.42, 0.61, 0.58, 0.41) infinite;
}
@-webkit-keyframes loader-outter {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes loader-outter {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@-webkit-keyframes loader-inner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
@keyframes loader-inner {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(-360deg);
transform: rotate(-360deg);
}
}
</style>
<div class="app-loading">
<div class="app-loading-wrap">
<div class="app-loading-title">
<img src="/logo.gif" class="app-loading-logo" alt="Logo" />
<div class="app-loading-title"><%= title %></div>
</div>
<div class="app-loading-item">
<div class="app-loading-outter"></div>
<div class="app-loading-inner"></div>
</div>
</div>
</div>
</div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -0,0 +1,117 @@
{
"name": "ruoyi-vue-pro-vue3",
"version": "0.0.154",
"description": "基于vue3、element-plus、typesScript、vite3。",
"author": "xingyu",
"private": false,
"scripts": {
"i": "pnpm install",
"dev": "vite --mode base",
"ts:check": "vue-tsc --noEmit",
"build:pro": "vite build --mode pro",
"build:dev": "vite build --mode dev",
"build:test": "npm run ts:check && vite build --mode test",
"serve:pro": "vite preview --mode pro",
"serve:dev": "vite preview --mode dev",
"serve:test": "vite preview --mode test",
"npm:check": "npx npm-check-updates",
"clean": "npx rimraf node_modules",
"clean:cache": "npx rimraf node_modules/.cache",
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./src",
"lint:format": "prettier --write --loglevel warn \"src/**/*.{js,ts,json,tsx,css,less,vue,html,md}\"",
"lint:style": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
"lint:lint-staged": "lint-staged -c ",
"lint:pretty": "pretty-quick --staged",
"p": "plop"
},
"dependencies": {
"@iconify/iconify": "^2.2.1",
"@vueuse/core": "^8.9.4",
"@wangeditor/editor": "^5.1.11",
"@wangeditor/editor-for-vue": "^5.1.10",
"@zxcvbn-ts/core": "^2.0.3",
"animate.css": "^4.1.1",
"axios": "^0.27.2",
"dayjs": "^1.11.3",
"echarts": "^5.3.3",
"echarts-wordcloud": "^2.0.0",
"element-plus": "2.2.9",
"intro.js": "^6.0.0",
"lodash-es": "^4.17.21",
"mitt": "^3.0.0",
"nprogress": "^0.2.0",
"pinia": "^2.0.16",
"pinia-plugin-persist": "^1.0.0",
"qrcode": "^1.5.1",
"qs": "^6.11.0",
"vue": "3.2.37",
"vue-cropper": "^1.0.3",
"vue-i18n": "9.1.10",
"vue-router": "^4.1.2",
"vue-types": "^4.1.1",
"web-storage-cache": "^1.1.1"
},
"devDependencies": {
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"@iconify/json": "^2.1.79",
"@intlify/vite-plugin-vue-i18n": "^5.0.0",
"@purge-icons/generated": "^0.8.1",
"@types/intro.js": "^5.1.0",
"@types/lodash-es": "^4.17.6",
"@types/node": "^18.0.6",
"@types/nprogress": "^0.2.0",
"@types/qrcode": "^1.4.2",
"@types/qs": "^6.9.7",
"@typescript-eslint/eslint-plugin": "^5.30.6",
"@typescript-eslint/parser": "^5.30.6",
"@vitejs/plugin-vue": "^3.0.1",
"@vitejs/plugin-vue-jsx": "^2.0.0",
"autoprefixer": "^10.4.7",
"eslint": "^8.20.0",
"eslint-config-prettier": "^8.5.0",
"eslint-define-config": "^1.5.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-vue": "^9.2.0",
"less": "^4.1.3",
"lint-staged": "^13.0.3",
"plop": "^3.1.1",
"postcss": "^8.4.14",
"postcss-html": "^1.5.0",
"postcss-less": "^6.0.0",
"prettier": "^2.7.1",
"pretty-quick": "^3.1.3",
"rimraf": "^3.0.2",
"rollup": "^2.77.0",
"stylelint": "^14.9.1",
"stylelint-config-html": "^1.1.0",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-recommended": "^8.0.0",
"stylelint-config-standard": "^26.0.0",
"stylelint-order": "^5.0.0",
"typescript": "4.7.4",
"unplugin-vue-define-options": "^0.6.2",
"vite": "3.0.1",
"vite-plugin-eslint": "^1.6.1",
"vite-plugin-html": "^3.2.0",
"vite-plugin-purge-icons": "^0.8.1",
"vite-plugin-style-import": "^1.4.1",
"vite-plugin-svg-icons": "^2.0.1",
"vite-plugin-windicss": "^1.8.7",
"vue-tsc": "^0.38.8",
"windicss": "^3.5.6",
"windicss-analysis": "^0.3.5"
},
"engines": {
"node": ">= 14.18.0"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://gitee.com/zhijiantianya/ruoyi-vue-pro"
},
"bugs": {
"url": "https://gitee.com/zhijiantianya/ruoyi-vue-pro/issues/I57XOQ"
},
"homepage": "https://gitee.com/zhijiantianya/ruoyi-vue-pro"
}

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
import { useDesign } from '@/hooks/web/useDesign'
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('{{ name }}')
</script>
<template>
<div :class="`${prefixCls}-{{ name }}`">{{ upperFirstName }}</div>
</template>

View File

@ -0,0 +1,3 @@
import {{ upperFirstName }} from './src/{{ upperFirstName }}.vue'
export { {{ upperFirstName }} }

View File

@ -0,0 +1,38 @@
const toUpperCase = (str) => str.charAt(0).toUpperCase() + str.slice(1)
module.exports = {
description: 'Create vue component',
prompts: [
{
type: 'input',
name: 'name',
message: '请输入组件名称Please enter the component name'
}
],
actions: (data) => {
const { name } = data
const upperFirstName = toUpperCase(name)
const actions = []
if (name) {
actions.push({
type: 'add',
path: `./src/components/${upperFirstName}/src/${upperFirstName}.vue`,
templateFile: './plop/component/component.hbs',
data: {
name,
upperFirstName
}
}, {
type: 'add',
path: `./src/components/${upperFirstName}/index.ts`,
templateFile: './plop/component/index.hbs',
data: {
upperFirstName
}
})
}
return actions
}
}

View File

@ -0,0 +1,37 @@
const toUpperCase = (str) => str.charAt(0).toUpperCase() + str.slice(1)
module.exports = {
description: 'Create vue view',
prompts: [
{
type: 'input',
name: 'path',
message: '请输入路径Please enter a path',
default: 'views'
},
{
type: 'input',
name: 'name',
message: '请输入模块名称Please enter module name'
}
],
actions: (data) => {
const { name, path } = data
const upperFirstName = toUpperCase(name)
const actions = []
if (name) {
actions.push({
type: 'add',
path: `./src/${path}/${upperFirstName}.vue`,
templateFile: './plop/view/view.hbs',
data: {
name,
upperFirstName
}
})
}
return actions
}
}

View File

@ -0,0 +1,6 @@
<script setup lang="ts">
</script>
<template>
<ContentWrap title="{{ upperFirstName }}"> {{ name }} </ContentWrap>
</template>

View File

@ -0,0 +1,7 @@
const viewGenerator = require('./plop/view/prompt.js')
const componentGenerator = require('./plop/component/prompt.js')
module.exports = function (plop) {
plop.setGenerator('view', viewGenerator)
plop.setGenerator('component', componentGenerator)
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
module.exports = {
plugins: {
autoprefixer: {}
}
}

View File

@ -0,0 +1,19 @@
module.exports = {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: false,
vueIndentScriptAndStyle: false,
singleQuote: true,
quoteProps: 'as-needed',
bracketSpacing: true,
trailingComma: 'none',
jsxSingleQuote: false,
arrowParens: 'always',
insertPragma: false,
requirePragma: false,
proseWrap: 'never',
htmlWhitespaceSensitivity: 'strict',
endOfLine: 'auto',
rangeStart: 0
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -0,0 +1,63 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useAppStore } from '@/store/modules/app'
import { ConfigGlobal } from '@/components/ConfigGlobal'
import { isDark } from '@/utils/is'
import { useDesign } from '@/hooks/web/useDesign'
import { useCache } from '@/hooks/web/useCache'
const { getPrefixCls } = useDesign()
const prefixCls = getPrefixCls('app')
const appStore = useAppStore()
const currentSize = computed(() => appStore.getCurrentSize)
const greyMode = computed(() => appStore.getGreyMode)
const { wsCache } = useCache()
//
const setDefaultTheme = () => {
if (wsCache.get('isDark')) {
appStore.setIsDark(wsCache.get('isDark'))
return
}
const isDarkTheme = isDark()
appStore.setIsDark(isDarkTheme)
}
setDefaultTheme()
</script>
<template>
<ConfigGlobal :size="currentSize">
<RouterView :class="greyMode ? `${prefixCls}-grey-mode` : ''" />
</ConfigGlobal>
</template>
<style lang="less">
@prefix-cls: ~'@{namespace}-app';
.size {
width: 100%;
height: 100%;
}
html,
body {
padding: 0 !important;
margin: 0;
overflow: hidden;
.size;
#app {
.size;
}
}
.@{prefix-cls}-grey-mode {
filter: grayscale(100%);
}
</style>

View File

@ -0,0 +1,12 @@
import { defHttp } from '@/config/axios'
import { ApiAccessLogVO } from './types'
// 查询列表API 访问日志
export const getApiAccessLogPageApi = ({ params }) => {
return defHttp.get<PageResult<ApiAccessLogVO>>({ url: '/infra/api-access-log/page', params })
}
// 导出API 访问日志
export const exportApiAccessLogApi = (params) => {
return defHttp.get({ url: '/infra/api-access-log/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,14 @@
export type ApiAccessLogVO = {
id: number
traceId: string
userId: string
userType: string
applicationName: string
requestMethod: string
requestParams: string
requestUrl: string
beginTime: string
endTIme: string
duration: string
resultCode: number
}

View File

@ -0,0 +1,19 @@
import { defHttp } from '@/config/axios'
import { ApiErrorLogVO } from './types'
// 查询列表API 访问日志
export const getApiErrorLogPageApi = ({ params }) => {
return defHttp.get<PageResult<ApiErrorLogVO>>({ url: '/infra/api-error-log/page', params })
}
// 更新 API 错误日志的处理状态
export const updateApiErrorLogPageApi = (id: number, processStatus: number) => {
return defHttp.put({
url: '/infra/api-error-log/update-status?id=' + id + '&processStatus=' + processStatus
})
}
// 导出API 访问日志
export const exportApiErrorLogApi = ({ params }) => {
return defHttp.get({ url: '/infra/api-error-log/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,17 @@
export type ApiErrorLogVO = {
id: number
userId: string
userIp: string
userAgent: string
userType: string
applicationName: string
requestMethod: string
requestParams: string
requestUrl: string
exceptionTime: string
exceptionName: string
exceptionStackTrace: string
processUserId: string
processStatus: number
resultCode: number
}

View File

@ -0,0 +1,62 @@
import { defHttp } from '@/config/axios'
import type { CodegenDetailVO, CodegenPreviewVO, CodegenTableVO, DatabaseTableVO } from './types'
// 查询列表代码生成表定义
export const getCodegenTablePageApi = ({ params }) => {
return defHttp.get<PageResult<CodegenTableVO>>({ url: '/infra/codegen/table/page', params })
}
// 查询详情代码生成表定义
export const getCodegenTableApi = (id: number) => {
return defHttp.get<CodegenDetailVO>({ url: '/infra/codegen/detail?tableId=' + id })
}
// 新增代码生成表定义
export const createCodegenTableApi = (params: CodegenTableVO) => {
return defHttp.post({ url: '/infra/codegen/create', params })
}
// 修改代码生成表定义
export const updateCodegenTableApi = (params: CodegenTableVO) => {
return defHttp.put({ url: '/infra/codegen/update', params })
}
// 基于数据库的表结构,同步数据库的表和字段定义
export const syncCodegenFromDBApi = (id: number) => {
return defHttp.put({ url: '/infra/codegen/sync-from-db?tableId=' + id })
}
// 基于 SQL 建表语句,同步数据库的表和字段定义
export const syncCodegenFromSQLApi = (id: number, sql: string) => {
return defHttp.put({
url: '/infra/codegen/sync-from-sql?tableId=' + id + '&sql=' + sql,
headers: {
'Content-type': 'application/x-www-form-urlencoded'
}
})
}
// 预览生成代码
export const previewCodegenApi = (id: number) => {
return defHttp.get<CodegenPreviewVO[]>({ url: '/infra/codegen/preview?tableId=' + id })
}
// 下载生成代码
export const downloadCodegenApi = (id: number) => {
return defHttp.get({ url: '/infra/codegen/download?tableId=' + id, responseType: 'blob' })
}
// 获得表定义
export const getSchemaTableListApi = (params) => {
return defHttp.get<DatabaseTableVO[]>({ url: '/infra/codegen/db/table/list', params })
}
// 基于数据库的表结构,创建代码生成器的表定义
export const createCodegenListApi = (params) => {
return defHttp.post({ url: '/infra/codegen/create-list', params })
}
// 删除代码生成表定义
export const deleteCodegenTableApi = (id: number) => {
return defHttp.delete({ url: '/infra/codegen/delete?tableId=' + id })
}

View File

@ -0,0 +1,51 @@
export type CodegenTableVO = {
id: number
dataSourceConfigId: number
scene: number
tableName: string
tableComment: string
remark: string
moduleName: string
businessName: string
className: string
classComment: string
author: string
createTime: string
updateTime: string
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
}

View File

@ -0,0 +1,37 @@
import { defHttp } from '@/config/axios'
import type { ConfigVO } from './types'
// 查询参数列表
export const getConfigPageApi = ({ params }) => {
return defHttp.get<PageResult<ConfigVO>>({ url: '/infra/config/page', params })
}
// 查询参数详情
export const getConfigApi = (id: number) => {
return defHttp.get<ConfigVO>({ url: '/infra/config/get?id=' + id })
}
// 根据参数键名查询参数值
export const getConfigKeyApi = (configKey: string) => {
return defHttp.get<ConfigVO>({ url: '/infra/config/get-value-by-key?key=' + configKey })
}
// 新增参数
export const createConfigApi = (params: ConfigVO) => {
return defHttp.post({ url: '/infra/config/create', params })
}
// 修改参数
export const updateConfigApi = (params: ConfigVO) => {
return defHttp.put({ url: '/infra/config/update', params })
}
// 删除参数
export const deleteConfigApi = (id: number) => {
return defHttp.delete({ url: '/infra/config/delete?id=' + id })
}
// 导出参数
export const exportConfigApi = ({ params }) => {
return defHttp.get({ url: '/infra/config/export', params, responseType: 'blob' })
}

View File

@ -0,0 +1,11 @@
export type ConfigVO = {
id: number
group: string
name: string
key: string
value: string
type: string
visible: boolean
remark: string
createTime: string
}

View File

@ -0,0 +1,27 @@
import { defHttp } from '@/config/axios'
import type { DataSourceConfigVO } from './types'
// 查询数据源配置列表
export const getDataSourceConfigListApi = () => {
return defHttp.get<DataSourceConfigVO[]>({ url: '/infra/data-source-config/list' })
}
// 查询数据源配置详情
export const getDataSourceConfigApi = (id: number) => {
return defHttp.get<DataSourceConfigVO>({ url: '/infra/data-source-config/get?id=' + id })
}
// 新增数据源配置
export const createDataSourceConfigApi = (params: DataSourceConfigVO) => {
return defHttp.post({ url: '/infra/data-source-config/create', params })
}
// 修改数据源配置
export const updateDataSourceConfigApi = (params: DataSourceConfigVO) => {
return defHttp.put({ url: '/infra/data-source-config/update', params })
}
// 删除数据源配置
export const deleteDataSourceConfigApi = (id: number) => {
return defHttp.delete({ url: '/infra/data-source-config/delete?id=' + id })
}

View File

@ -0,0 +1,8 @@
export type DataSourceConfigVO = {
id: number
name: string
url: string
username: string
password: string
createTime: string
}

View File

@ -0,0 +1,16 @@
import { defHttp } from '@/config/axios'
// 导出Html
export const exportHtmlApi = () => {
return defHttp.get({ url: '/infra/db-doc/export-html', responseType: 'blob' })
}
// 导出Word
export const exportWordApi = () => {
return defHttp.get({ url: '/infra/db-doc/export-word', responseType: 'blob' })
}
// 导出Markdown
export const exportMarkdownApi = () => {
return defHttp.get({ url: '/infra/db-doc/export-markdown', responseType: 'blob' })
}

View File

@ -0,0 +1,12 @@
import { defHttp } from '@/config/axios'
import type { FileVO } from './types'
// 查询文件列表
export const getFilePageApi = ({ params }) => {
return defHttp.get<PageResult<FileVO>>({ url: '/infra/file/page', params })
}
// 删除文件
export const deleteFileApi = (id: number) => {
return defHttp.delete({ url: '/infra/file/delete?id=' + id })
}

View File

@ -0,0 +1,8 @@
export type FileVO = {
id: number
path: string
url: string
size: string
type: string
createTime: string
}

View File

@ -0,0 +1,37 @@
import { defHttp } from '@/config/axios'
import type { FileConfigVO } from './types'
// 查询文件配置列表
export const getFileConfigPageApi = ({ params }) => {
return defHttp.get<PageResult<FileConfigVO>>({ url: '/infra/file-config/page', params })
}
// 查询文件配置详情
export const getFileConfigApi = (id: number) => {
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/get?id=' + id })
}
// 更新文件配置为主配置
export const updateFileConfigMasterApi = (id: number) => {
return defHttp.get<FileConfigVO>({ url: '/infra/file-config/update-master?id=' + id })
}
// 新增文件配置
export const createFileConfigApi = (params: FileConfigVO) => {
return defHttp.post({ url: '/infra/file-config/create', params })
}
// 修改文件配置
export const updateFileConfigApi = (params: FileConfigVO) => {
return defHttp.put({ url: '/infra/file-config/update', params })
}
// 删除文件配置
export const deleteFileConfigApi = (id: number) => {
return defHttp.delete({ url: '/infra/file-config/delete?id=' + id })
}
// 测试文件配置
export const testFileConfigApi = (id: number) => {
return defHttp.get({ url: '/infra/file-config/test?id=' + id })
}

View File

@ -0,0 +1,23 @@
export type ConfigType = {
basePath: string
host: string
port: string
username: string
password: string
mode: string
endpoint: string
bucket: string
accessKey: string
accessSecret: string
domain: string
}
export type FileConfigVO = {
id: number
name: string
storage: string
primary: number
visible: boolean
config: ConfigType
remark: string
createTime: string
}

View File

@ -0,0 +1,55 @@
import { defHttp } from '@/config/axios'
import type { JobVO } from './types'
// 任务列表
export const getJobPageApi = ({ params }) => {
return defHttp.get<PageResult<JobVO>>({ url: '/infra/job/page', params })
}
// 任务详情
export const getJobApi = (id: number) => {
return defHttp.get<JobVO>({ url: '/infra/job/get?id=' + id })
}
// 新增任务
export const createJobApi = (params: JobVO) => {
return defHttp.post({ url: '/infra/job/create', params })
}
// 修改定时任务调度
export const updateJobApi = (params: JobVO) => {
return defHttp.put({ url: '/infra/job/update', params })
}
// 删除定时任务调度
export const deleteJobApi = (id: number) => {
return defHttp.delete({ url: '/infra/job/delete?id=' + id })
}
// 导出定时任务调度
export const exportJobApi = (params) => {
return defHttp.get({
url: '/infra/job/export-excel',
params,
responseType: 'blob'
})
}
// 任务状态修改
export const updateJobStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/infra/job/update-status', data: data })
}
// 定时任务立即执行一次
export const runJobApi = (id: number) => {
return defHttp.put({ url: '/infra/job/trigger?id=' + id })
}
// 获得定时任务的下 n 次执行时间
export const getJobNextTimesApi = (id: number) => {
return defHttp.get({ url: '/infra/job/get_next_times?id=' + id })
}

View File

@ -0,0 +1,12 @@
export type JobVO = {
id: number
name: string
status: number
handlerName: string
handlerParam: string
cronExpression: string
retryCount: number
retryInterval: number
monitorTimeout: number
createTime: string
}

View File

@ -0,0 +1,21 @@
import { defHttp } from '@/config/axios'
import type { JobLogVO } from './types'
// 任务日志列表
export const getJobLogPageApi = ({ params }) => {
return defHttp.get<PageResult<JobLogVO>>({ url: '/infra/job-log/page', params })
}
// 任务日志详情
export const getJobLogApi = (id: number) => {
return defHttp.get<JobLogVO>({ url: '/infra/job-log/get?id=' + id })
}
// 导出定时任务日志
export const exportJobLogApi = (params) => {
return defHttp.get({
url: '/infra/job-log/export-excel',
params,
responseType: 'blob'
})
}

View File

@ -0,0 +1,13 @@
export type JobLogVO = {
id: number
jobId: number
handlerName: string
handlerParam: string
cronExpression: string
executeIndex: string
beginTime: Date
endTime: Date
duration: string
status: number
createTime: string
}

View File

@ -0,0 +1,16 @@
import { defHttp } from '@/config/axios'
import { RedisKeyInfo, RedisMonitorInfoVO } from '@/api/infra/redis/types'
/**
* redis
*/
export const redisMonitorInfo = () => {
return defHttp.get<RedisMonitorInfoVO>({ url: '/infra/redis/get-monitor-info' })
}
/**
* redis key列表
*/
export const redisKeysInfo = () => {
return defHttp.get<RedisKeyInfo[]>({ url: '/infra/redis/get-key-list' })
}

View File

@ -0,0 +1,185 @@
export interface RedisMonitorInfoVO {
info: RedisInfoVO
dbSize: number
commandStats: RedisCommandStatsVO[]
}
export interface RedisInfoVO {
io_threaded_reads_processed: string
tracking_clients: string
uptime_in_seconds: string
cluster_connections: string
current_cow_size: string
maxmemory_human: string
aof_last_cow_size: string
master_replid2: string
mem_replication_backlog: string
aof_rewrite_scheduled: string
total_net_input_bytes: string
rss_overhead_ratio: string
hz: string
current_cow_size_age: string
redis_build_id: string
errorstat_BUSYGROUP: string
aof_last_bgrewrite_status: string
multiplexing_api: string
client_recent_max_output_buffer: string
allocator_resident: string
mem_fragmentation_bytes: string
aof_current_size: string
repl_backlog_first_byte_offset: string
tracking_total_prefixes: string
redis_mode: string
redis_git_dirty: string
aof_delayed_fsync: string
allocator_rss_bytes: string
repl_backlog_histlen: string
io_threads_active: string
rss_overhead_bytes: string
total_system_memory: string
loading: string
evicted_keys: string
maxclients: string
cluster_enabled: string
redis_version: string
repl_backlog_active: string
mem_aof_buffer: string
allocator_frag_bytes: string
io_threaded_writes_processed: string
instantaneous_ops_per_sec: string
used_memory_human: string
total_error_replies: string
role: string
maxmemory: string
used_memory_lua: string
rdb_current_bgsave_time_sec: string
used_memory_startup: string
used_cpu_sys_main_thread: string
lazyfree_pending_objects: string
aof_pending_bio_fsync: string
used_memory_dataset_perc: string
allocator_frag_ratio: string
arch_bits: string
used_cpu_user_main_thread: string
mem_clients_normal: string
expired_time_cap_reached_count: string
unexpected_error_replies: string
mem_fragmentation_ratio: string
aof_last_rewrite_time_sec: string
master_replid: string
aof_rewrite_in_progress: string
lru_clock: string
maxmemory_policy: string
run_id: string
latest_fork_usec: string
tracking_total_items: string
total_commands_processed: string
expired_keys: string
errorstat_ERR: string
used_memory: string
module_fork_in_progress: string
errorstat_WRONGPASS: string
aof_buffer_length: string
dump_payload_sanitizations: string
mem_clients_slaves: string
keyspace_misses: string
server_time_usec: string
executable: string
lazyfreed_objects: string
db0: string
used_memory_peak_human: string
keyspace_hits: string
rdb_last_cow_size: string
aof_pending_rewrite: string
used_memory_overhead: string
active_defrag_hits: string
tcp_port: string
uptime_in_days: string
used_memory_peak_perc: string
current_save_keys_processed: string
blocked_clients: string
total_reads_processed: string
expire_cycle_cpu_milliseconds: string
sync_partial_err: string
used_memory_scripts_human: string
aof_current_rewrite_time_sec: string
aof_enabled: string
process_supervised: string
master_repl_offset: string
used_memory_dataset: string
used_cpu_user: string
rdb_last_bgsave_status: string
tracking_total_keys: string
atomicvar_api: string
allocator_rss_ratio: string
client_recent_max_input_buffer: string
clients_in_timeout_table: string
aof_last_write_status: string
mem_allocator: string
used_memory_scripts: string
used_memory_peak: string
process_id: string
master_failover_state: string
errorstat_NOAUTH: string
used_cpu_sys: string
repl_backlog_size: string
connected_slaves: string
current_save_keys_total: string
gcc_version: string
total_system_memory_human: string
sync_full: string
connected_clients: string
module_fork_last_cow_size: string
total_writes_processed: string
allocator_active: string
total_net_output_bytes: string
pubsub_channels: string
current_fork_perc: string
active_defrag_key_hits: string
rdb_changes_since_last_save: string
instantaneous_input_kbps: string
used_memory_rss_human: string
configured_hz: string
expired_stale_perc: string
active_defrag_misses: string
used_cpu_sys_children: string
number_of_cached_scripts: string
sync_partial_ok: string
used_memory_lua_human: string
rdb_last_save_time: string
pubsub_patterns: string
slave_expires_tracked_keys: string
redis_git_sha1: string
used_memory_rss: string
rdb_last_bgsave_time_sec: string
os: string
mem_not_counted_for_evict: string
active_defrag_running: string
rejected_connections: string
aof_rewrite_buffer_length: string
total_forks: string
active_defrag_key_misses: string
allocator_allocated: string
aof_base_size: string
instantaneous_output_kbps: string
second_repl_offset: string
rdb_bgsave_in_progress: string
used_cpu_user_children: string
total_connections_received: string
migrate_cached_sockets: string
}
export interface RedisCommandStatsVO {
command: string
calls: number
usec: number
}
export interface RedisKeyInfo {
keyTemplate: string
keyType: string
valueType: string
timeoutType: number
timeout: number
memo: string
}

View File

@ -0,0 +1,62 @@
import { defHttp } from '@/config/axios'
import { getRefreshToken } from '@/utils/auth'
import type { UserLoginVO, TokenType, UserInfoVO } from './types'
export interface CodeImgResult {
captchaOnOff: boolean
img: string
uuid: string
}
export interface SmsCodeVO {
mobile: string
scene: number
}
export interface SmsLoginVO {
mobile: string
code: string
}
// 获取验证码
export const getCodeImgApi = () => {
return defHttp.get<CodeImgResult>({ url: '/system/captcha/get-image' })
}
// 登录
export const loginApi = (params: UserLoginVO) => {
return defHttp.post<TokenType>({ url: '/system/auth/login', params })
}
// 刷新访问令牌
export const refreshToken = () => {
return defHttp.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
}
// 使用租户名,获得租户编号
export const getTenantIdByNameApi = (name: string) => {
return defHttp.get({ url: '/system/tenant/get-id-by-name?name=' + name })
}
// 登出
export const loginOutApi = () => {
return defHttp.delete({ url: '/system/auth/logout' })
}
// 获取用户权限信息
export const getInfoApi = () => {
return defHttp.get<UserInfoVO>({ url: '/system/auth/get-permission-info' })
}
// 路由
export const getAsyncRoutesApi = () => {
return defHttp.get({ url: '/system/auth/list-menus' })
}
//获取登录验证码
export const sendSmsCodeApi = (params: SmsCodeVO) => {
return defHttp.post({ url: '/system/auth/send-sms-code', params })
}
// 短信验证码登录
export const smsLoginApi = (params: SmsLoginVO) => {
return defHttp.post({ url: '/system/auth/sms-login', params })
}

View File

@ -0,0 +1,43 @@
export type UserLoginVO = {
username: string
password: string
code: string
uuid: string
}
export type TokenType = {
id: number // 编号
accessToken: string // 访问令牌
refreshToken: string // 刷新令牌
userId: number // 用户编号
userType: number //用户类型
clientId: string //客户端编号
expiresTime: number //过期时间
}
export type UserVO = {
id: number
username: string
nickname: string
deptId: number
email: string
mobile: string
sex: number
avatar: string
loginIp: string
loginDate: string
}
export type UserInfoVO = {
permissions: []
roles: []
user: {
avatar: string
id: number
nickname: string
}
}
export type TentantNameVO = {
name: string
}

View File

@ -0,0 +1,46 @@
import { defHttp } from '@/config/axios'
import type { AppVO } from './types'
// 查询列表支付应用
export const getAppPageApi = ({ params }) => {
return defHttp.get<PageResult<AppVO>>({ url: '/pay/app/page', params })
}
// 查询详情支付应用
export const getAppApi = (id: number) => {
return defHttp.get<AppVO>({ url: '/pay/app/get?id=' + id })
}
// 新增支付应用
export const createAppApi = (params: AppVO) => {
return defHttp.post({ url: '/pay/app/create', params })
}
// 修改支付应用
export const updateAppApi = (params: AppVO) => {
return defHttp.put({ url: '/pay/app/update', params })
}
// 支付应用信息状态修改
export const changeAppStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/pay/app/update-status', data: data })
}
// 删除支付应用
export const deleteAppApi = (id: number) => {
return defHttp.delete({ url: '/pay/app/delete?id=' + id })
}
// 导出支付应用
export const exportAppApi = (params) => {
return defHttp.get({ url: '/pay/app/export-excel', params, responseType: 'blob' })
}
// 根据商ID称搜索应用列表
export const getAppListByMerchantIdApi = (merchantId: number) => {
return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
}

View File

@ -0,0 +1,11 @@
export type AppVO = {
id: number
name: string
status: number
remark: string
payNotifyUrl: string
refundNotifyUrl: string
merchantName: string
merchantId: number
createTime: string
}

View File

@ -0,0 +1,37 @@
import { defHttp } from '@/config/axios'
import type { ChannelVO } from './types'
// 查询列表支付渠道
export const getChannelPageApi = ({ params }) => {
return defHttp.get<PageResult<ChannelVO>>({ url: '/pay/channel/page', params })
}
// 查询详情支付渠道
export const getChannelApi = (merchantId: number, appId: string, code: string) => {
const params = {
merchantId: merchantId,
appId: appId,
code: code
}
return defHttp.get<ChannelVO>({ url: '/pay/channel/get-channel', params: params })
}
// 新增支付渠道
export const createChannelApi = (params: ChannelVO) => {
return defHttp.post({ url: '/pay/channel/create', params })
}
// 修改支付渠道
export const updateChannelApi = (params: ChannelVO) => {
return defHttp.put({ url: '/pay/channel/update', params })
}
// 删除支付渠道
export const deleteChannelApi = (id: number) => {
return defHttp.delete({ url: '/pay/channel/delete?id=' + id })
}
// 导出支付渠道
export const exportChannelApi = (params) => {
return defHttp.get({ url: '/pay/channel/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,11 @@
export type ChannelVO = {
id: number
code: string
config: string
status: number
remark: string
feeRate: number
merchantId: number
appId: number
createTime: string
}

View File

@ -0,0 +1,50 @@
import { defHttp } from '@/config/axios'
import type { MerchantVO } from './types'
// 查询列表支付商户
export const getMerchantPageApi = ({ params }) => {
return defHttp.get<PageResult<MerchantVO>>({ url: '/pay/merchant/page', params })
}
// 查询详情支付商户
export const getMerchantApi = (id: number) => {
return defHttp.get<MerchantVO>({ url: '/pay/merchant/get?id=' + id })
}
// 根据商户名称搜索商户列表
export const getMerchantListByNameApi = (name: string) => {
return defHttp.get<MerchantVO>({
url: '/pay/merchant/list-by-name?id=',
params: {
name: name
}
})
}
// 新增支付商户
export const createMerchantApi = (params: MerchantVO) => {
return defHttp.post({ url: '/pay/merchant/create', params })
}
// 修改支付商户
export const updateMerchantApi = (params: MerchantVO) => {
return defHttp.put({ url: '/pay/merchant/update', params })
}
// 删除支付商户
export const deleteMerchantApi = (id: number) => {
return defHttp.delete({ url: '/pay/merchant/delete?id=' + id })
}
// 导出支付商户
export const exportMerchantApi = (params) => {
return defHttp.get({ url: '/pay/merchant/export-excel', params, responseType: 'blob' })
}
// 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/pay/merchant/update-status', data: data })
}

View File

@ -0,0 +1,9 @@
export type MerchantVO = {
id: number
no: string
name: string
shortName: string
status: number
remark: string
createTime: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { OrderVO } from './types'
// 查询列表支付订单
export const getOrderPageApi = ({ params }) => {
return defHttp.get<PageResult<OrderVO>>({ url: '/pay/order/page', params })
}
// 查询详情支付订单
export const getOrderApi = (id: number) => {
return defHttp.get<OrderVO>({ url: '/pay/order/get?id=' + id })
}
// 新增支付订单
export const createOrderApi = (params: OrderVO) => {
return defHttp.post({ url: '/pay/order/create', params })
}
// 修改支付订单
export const updateOrderApi = (params: OrderVO) => {
return defHttp.put({ url: '/pay/order/update', params })
}
// 删除支付订单
export const deleteOrderApi = (id: number) => {
return defHttp.delete({ url: '/pay/order/delete?id=' + id })
}
// 导出支付订单
export const exportOrderApi = (params) => {
return defHttp.get({ url: '/pay/order/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,26 @@
export type OrderVO = {
id: number
merchantId: number
appId: number
channelId: number
channelCode: string
merchantOrderId: string
subject: string
body: string
notifyUrl: string
notifyStatus: number
amount: number
channelFeeRate: number
channelFeeAmount: number
status: number
userIp: string
expireTime: string
successTime: string
notifyTime: string
successExtensionId: number
refundStatus: number
refundTimes: number
refundAmount: number
channelUserId: string
channelOrderNo: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { RefundVO } from './types'
// 查询列表退款订单
export const getRefundPageApi = ({ params }) => {
return defHttp.get<PageResult<RefundVO>>({ url: '/pay/refund/page', params })
}
// 查询详情退款订单
export const getRefundApi = (id: number) => {
return defHttp.get<RefundVO>({ url: '/pay/refund/get?id=' + id })
}
// 新增退款订单
export const createRefundApi = (params: RefundVO) => {
return defHttp.post({ url: '/pay/refund/create', params })
}
// 修改退款订单
export const updateRefundApi = (params: RefundVO) => {
return defHttp.put({ url: '/pay/refund/update', params })
}
// 删除退款订单
export const deleteRefundApi = (id: number) => {
return defHttp.delete({ url: '/pay/refund/delete?id=' + id })
}
// 导出退款订单
export const exportRefundApi = (params) => {
return defHttp.get({ url: '/pay/refund/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,26 @@
export type RefundVO = {
id: number
merchantId: number
appId: number
channelId: number
channelCode: string
merchantOrderId: string
subject: string
body: string
notifyUrl: string
notifyStatus: number
amount: number
channelFeeRate: number
channelFeeAmount: number
status: number
userIp: string
expireTime: string
successTime: string
notifyTime: string
successExtensionId: number
refundStatus: number
refundTimes: number
refundAmount: number
channelUserId: string
channelOrderNo: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { DeptVO } from './types'
// 查询部门(精简)列表
export const listSimpleDeptApi = () => {
return defHttp.get({ url: '/system/dept/list-all-simple' })
}
// 查询部门列表
export const getDeptPageApi = ({ params }) => {
return defHttp.get<PageResult<DeptVO>>({ url: '/system/dept/list', params })
}
// 查询部门详情
export const getDeptApi = (id: number) => {
return defHttp.get<DeptVO>({ url: '/system/dept/get?id=' + id })
}
// 新增部门
export const createDeptApi = (params: DeptVO) => {
return defHttp.post({ url: '/system/dept/create', data: params })
}
// 修改部门
export const updateDeptApi = (params: DeptVO) => {
return defHttp.put({ url: '/system/dept/update', data: params })
}
// 删除部门
export const deleteDeptApi = (id: number) => {
return defHttp.delete({ url: '/system/dept/delete?id=' + id })
}

View File

@ -0,0 +1,7 @@
export type DeptVO = {
id: number
name: string
status: number
parentId: number
createTime: string
}

View File

@ -0,0 +1,36 @@
import { defHttp } from '@/config/axios'
import type { DictDataVO } from './types'
// 查询字典数据(精简)列表
export const listSimpleDictDataApi = () => {
return defHttp.get({ url: '/system/dict-data/list-all-simple' })
}
// 查询字典数据列表
export const getDictDataPageApi = ({ params }) => {
return defHttp.get<PageResult<DictDataVO>>({ url: '/system/dict-data/page', params })
}
// 查询字典数据详情
export const getDictDataApi = (id: number) => {
return defHttp.get({ url: '/system/dict-data/get?id=' + id })
}
// 新增字典数据
export const createDictDataApi = (params: DictDataVO) => {
return defHttp.post({ url: '/system/dict-data/create', params })
}
// 修改字典数据
export const updateDictDataApi = (params: DictDataVO) => {
return defHttp.put({ url: '/system/dict-data/update', params })
}
// 删除字典数据
export const deleteDictDataApi = (id: number) => {
return defHttp.delete({ url: '/system/dict-data/delete?id=' + id })
}
// 导出字典类型数据
export const exportDictDataApi = (params: DictDataVO) => {
return defHttp.get({ url: '/system/dict-data/export', params })
}

View File

@ -0,0 +1,36 @@
import { defHttp } from '@/config/axios'
import type { DictTypeVO } from './types'
// 查询字典(精简)列表
export const listSimpleDictTypeApi = () => {
return defHttp.get({ url: '/system/dict-type/list-all-simple' })
}
// 查询字典列表
export const getDictTypePageApi = ({ params }) => {
return defHttp.get<PageResult<DictTypeVO>>({ url: '/system/dict-type/page', params })
}
// 查询字典详情
export const getDictTypeApi = (id: number) => {
return defHttp.get({ url: '/system/dict-type/get?id=' + id })
}
// 新增字典
export const createDictTypeApi = (params: DictTypeVO) => {
return defHttp.post({ url: '/system/dict-type/create', params })
}
// 修改字典
export const updateDictTypeApi = (params: DictTypeVO) => {
return defHttp.put({ url: '/system/dict-type/update', params })
}
// 删除字典
export const deleteDictTypeApi = (id: number) => {
return defHttp.delete({ url: '/system/dict-type/delete?id=' + id })
}
// 导出字典类型
export const exportDictTypeApi = (params: DictTypeVO) => {
return defHttp.get({ url: '/system/dict-type/export', params })
}

View File

@ -0,0 +1,21 @@
export type DictTypeVO = {
id: number
name: string
type: string
status: number
remark: string
createTime: string
}
export type DictDataVO = {
id: number
sort: number
label: string
value: string
dictType: string
status: number
colorType: string
cssClass: string
remark: string
createTime: string
}

View File

@ -0,0 +1,31 @@
import { defHttp } from '@/config/axios'
import type { ErrorCodeVO } from './types'
// 查询错误码列表
export const getErrorCodePageApi = ({ params }) => {
return defHttp.get<PageResult<ErrorCodeVO>>({ url: '/system/error-code/page', params })
}
// 查询错误码详情
export const getErrorCodeApi = (id: number) => {
return defHttp.get<ErrorCodeVO>({ url: '/system/error-code/get?id=' + id })
}
// 新增错误码
export const createErrorCodeApi = (params: ErrorCodeVO) => {
return defHttp.post({ url: '/system/error-code/create', params })
}
// 修改错误码
export const updateErrorCodeApi = (params: ErrorCodeVO) => {
return defHttp.put({ url: '/system/error-code/update', params })
}
// 删除错误码
export const deleteErrorCodeApi = (id: number) => {
return defHttp.delete({ url: '/system/error-code/delete?id=' + id })
}
// 导出错误码
export const excelErrorCodeApi = (params) => {
return defHttp.get({ url: '/system/error-code/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,9 @@
export type ErrorCodeVO = {
id: number
type: number
applicationName: string
code: number
message: string
memo: string
createTime: string
}

View File

@ -0,0 +1,11 @@
import { defHttp } from '@/config/axios'
import type { LoginLogVO } from './types'
// 查询登录日志列表
export const getLoginLogPageApi = ({ params }) => {
return defHttp.get<PageResult<LoginLogVO>>({ url: '/system/login-log/page', params })
}
// 导出登录日志
export const exportLoginLogApi = (params) => {
return defHttp.get({ url: '/system/login-log/export', params, responseType: 'blob' })
}

View File

@ -0,0 +1,11 @@
export type LoginLogVO = {
id: number
logType: number
traceId: number
userType: number
username: string
status: number
userIp: string
userAgent: string
createTime: string
}

View File

@ -0,0 +1,31 @@
import { defHttp } from '@/config/axios'
import type { MenuVO } from './types'
// 查询菜单(精简)列表
export const listSimpleMenusApi = () => {
return defHttp.get({ url: '/system/menu/list-all-simple' })
}
// 查询菜单列表
export const getMenuListApi = (params) => {
return defHttp.get({ url: '/system/menu/list', params })
}
// 获取菜单详情
export const getMenuApi = (id: number) => {
return defHttp.get<MenuVO>({ url: '/system/menu/get?id=' + id })
}
// 新增菜单
export const createMenuApi = (params: MenuVO) => {
return defHttp.post({ url: '/system/menu/create', params })
}
// 修改菜单
export const updateMenuApi = (params: MenuVO) => {
return defHttp.put({ url: '/system/menu/update', params })
}
// 删除菜单
export const deleteMenuApi = (id: number) => {
return defHttp.delete({ url: '/system/menu/delete?id=' + id })
}

View File

@ -0,0 +1,15 @@
export type MenuVO = {
id: number
name: string
permission: string
type: number
sort: number
parentId: number
path: string
icon: string
component: string
status: number
visible: boolean
keepAlive: boolean
createTime: string
}

View File

@ -0,0 +1,27 @@
import { defHttp } from '@/config/axios'
import type { NoticeVO } from './types'
// 查询公告列表
export const getNoticePageApi = ({ params }) => {
return defHttp.get<PageResult<NoticeVO>>({ url: '/system/notice/page', params })
}
// 查询公告详情
export const getNoticeApi = (id: number) => {
return defHttp.get<NoticeVO>({ url: '/system/notice/get?id=' + id })
}
// 新增公告
export const createNoticeApi = (params: NoticeVO) => {
return defHttp.post({ url: '/system/notice/create', params })
}
// 修改公告
export const updateNoticeApi = (params: NoticeVO) => {
return defHttp.put({ url: '/system/notice/update', params })
}
// 删除公告
export const deleteNoticeApi = (id: number) => {
return defHttp.delete({ url: '/system/notice/delete?id=' + id })
}

View File

@ -0,0 +1,12 @@
export type NoticeVO = {
id: number
title: string
type: number
content: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
}

View File

@ -0,0 +1,27 @@
import { defHttp } from '@/config/axios'
import { OAuth2ClientVo } from './client.types'
// 查询 OAuth2列表
export const getOAuth2ClientPageApi = ({ params }) => {
return defHttp.get<PageResult<OAuth2ClientVo>>({ url: '/system/oauth2-client/page', params })
}
// 查询 OAuth2详情
export const getOAuth2ClientApi = (id: number) => {
return defHttp.get<OAuth2ClientVo>({ url: '/system/oauth2-client/get?id=' + id })
}
// 新增 OAuth2
export const createOAuth2ClientApi = (params: OAuth2ClientVo) => {
return defHttp.post({ url: '/system/oauth2-client/create', params })
}
// 修改 OAuth2
export const updateOAuth2ClientApi = (params: OAuth2ClientVo) => {
return defHttp.put({ url: '/system/oauth2-client/update', params })
}
// 删除 OAuth2
export const deleteOAuth2ClientApi = (id: number) => {
return defHttp.delete({ url: '/system/oauth2-client/delete?id=' + id })
}

View File

@ -0,0 +1,20 @@
export type OAuth2ClientVo = {
id: number
clientId: string
secret: string
name: string
logo: string
description: string
status: number
accessTokenValiditySeconds: number
refreshTokenValiditySeconds: number
redirectUris: string[]
autoApprove: boolean
authorizedGrantTypes: string[]
scopes: string[]
authorities: string[]
resourceIds: string[]
additionalInformation: string
isAdditionalInformationJson: boolean
createTime: string
}

View File

@ -0,0 +1,12 @@
import { defHttp } from '@/config/axios'
import { OAuth2TokenVo } from './token.types'
// 查询 token列表
export const getAccessTokenPageApi = ({ params }) => {
return defHttp.get<PageResult<OAuth2TokenVo>>({ url: '/system/oauth2-token/page', params })
}
// 删除 token
export const deleteAccessTokenApi = (accessToken: number) => {
return defHttp.delete({ url: '/system/oauth2-token/delete?accessToken=' + accessToken })
}

View File

@ -0,0 +1,10 @@
export type OAuth2TokenVo = {
id: number
accessToken: string
refreshToken: string
userId: number
userType: number
clientId: string
createTime: string
expiresTime: string
}

View File

@ -0,0 +1,11 @@
import { defHttp } from '@/config/axios'
import type { OperateLogVO } from './types'
// 查询操作日志列表
export const getOperateLogPageApi = ({ params }) => {
return defHttp.get<PageResult<OperateLogVO>>({ url: '/system/operate-log/page', params })
}
// 导出操作日志
export const exportOperateLogApi = (params) => {
return defHttp.get({ url: '/system/operate-log/export', params, responseType: 'blob' })
}

View File

@ -0,0 +1,22 @@
export type OperateLogVO = {
id: number
userNickname: string
traceId: string
userId: number
module: string
name: string
type: number
content: string
exts: object
requestMethod: string
requestUrl: string
userIp: string
userAgent: string
javaMethod: string
javaMethodArgs: string
startTime: string
duration: number
resultCode: number
resultMsg: string
resultData: string
}

View File

@ -0,0 +1,36 @@
import { defHttp } from '@/config/axios'
import type { PostVO } from './types'
// 查询岗位列表
export const getPostPageApi = ({ params }) => {
return defHttp.get<PageResult<PostVO>>({ url: '/system/post/page', params })
}
// 获取岗位精简信息列表
export const listSimplePostsApi = () => {
return defHttp.get<PostVO[]>({ url: '/system/post/list-all-simple' })
}
// 查询岗位详情
export const getPostApi = (id: number) => {
return defHttp.get<PostVO>({ url: '/system/post/get?id=' + id })
}
// 新增岗位
export const createPostApi = (params: PostVO) => {
return defHttp.post({ url: '/system/post/create', params })
}
// 修改岗位
export const updatePostApi = (params: PostVO) => {
return defHttp.put({ url: '/system/post/update', params })
}
// 删除岗位
export const deletePostApi = (id: number) => {
return defHttp.delete({ url: '/system/post/delete?id=' + id })
}
// 导出岗位
export const exportPostApi = (params) => {
return defHttp.get({ url: '/system/post/export', params, responseType: 'blob' })
}

View File

@ -0,0 +1,9 @@
export type PostVO = {
id: number
name: string
code: string
sort: number
status: number
remark: string
createTime: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { RoleVO } from './types'
// 查询角色列表
export const getRolePageApi = ({ params }) => {
return defHttp.get<PageResult<RoleVO>>({ url: '/system/role/page', params })
}
// 查询角色详情
export const getRoleApi = (id: number) => {
return defHttp.get<RoleVO>({ url: '/system/role/get?id=' + id })
}
// 新增角色
export const createRoleApi = (params: RoleVO) => {
return defHttp.post({ url: '/system/role/create', params })
}
// 修改角色
export const updateRoleApi = (params: RoleVO) => {
return defHttp.put({ url: '/system/role/update', params })
}
// 修改角色状态
export const updateRoleStatusApi = (params: RoleVO) => {
return defHttp.put({ url: '/system/role/update-status', params })
}
// 删除角色
export const deleteRoleApi = (id: number) => {
return defHttp.delete({ url: '/system/role/delete?id=' + id })
}

View File

@ -0,0 +1,9 @@
export type RoleVO = {
id: number
name: string
code: string
sort: number
status: number
type: number
createTime: string
}

View File

@ -0,0 +1,42 @@
import { defHttp } from '@/config/axios'
import type { SensitiveWordVO } from './types'
// 查询敏感词列表
export const getSensitiveWordPageApi = ({ params }) => {
return defHttp.get<PageResult<SensitiveWordVO>>({ url: '/system/sensitive-word/page', params })
}
// 查询敏感词详情
export const getSensitiveWordApi = (id: number) => {
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get?id=' + id })
}
// 新增敏感词
export const createSensitiveWordApi = (params: SensitiveWordVO) => {
return defHttp.post({ url: '/system/sensitive-word/create', params })
}
// 修改敏感词
export const updateSensitiveWordApi = (params: SensitiveWordVO) => {
return defHttp.put({ url: '/system/sensitive-word/update', params })
}
// 删除敏感词
export const deleteSensitiveWordApi = (id: number) => {
return defHttp.delete({ url: '/system/sensitive-word/delete?id=' + id })
}
// 导出敏感词
export const exportSensitiveWordApi = (params) => {
return defHttp.get({ url: '/system/sensitive-word/export', params, responseType: 'blob' })
}
// 获取所有敏感词的标签数组
export const getSensitiveWordTagsApi = () => {
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/get-tags' })
}
// 获得文本所包含的不合法的敏感词数组
export const validateTextApi = (id: number) => {
return defHttp.get<SensitiveWordVO>({ url: '/system/sensitive-word/validate-text?' + id })
}

View File

@ -0,0 +1,9 @@
export type SensitiveWordVO = {
id: number
name: string
status: number
description: string
tags: string
type: number
createTime: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { SmsChannelVO } from './types'
// 查询短信渠道列表
export const getSmsChannelPageApi = ({ params }) => {
return defHttp.get<PageResult<SmsChannelVO>>({ url: '/system/sms-channel/page', params })
}
// 获得短信渠道精简列表
export function getSimpleSmsChannels() {
return defHttp.get({ url: '/system/sms-channel/list-all-simple' })
}
// 查询短信渠道详情
export const getSmsChannelApi = (id: number) => {
return defHttp.get<SmsChannelVO>({ url: '/system/sms-channel/get?id=' + id })
}
// 新增短信渠道
export const createSmsChannelApi = (params: SmsChannelVO) => {
return defHttp.post({ url: '/system/sms-channel/create', params })
}
// 修改短信渠道
export const updateSmsChannelApi = (params: SmsChannelVO) => {
return defHttp.put({ url: '/system/sms-channel/update', params })
}
// 删除短信渠道
export const deleteSmsChannelApi = (id: number) => {
return defHttp.delete({ url: '/system/sms-channel/delete?id=' + id })
}

View File

@ -0,0 +1,10 @@
export type SmsChannelVO = {
id: number
status: number
signature: string
remark: string
apiKey: string
apiSecret: string
callbackUrl: string
createTime: string
}

View File

@ -0,0 +1,12 @@
import { defHttp } from '@/config/axios'
import type { SmsLogVO } from './types'
// 查询短信日志列表
export const getSmsLogPageApi = ({ params }) => {
return defHttp.get<PageResult<SmsLogVO>>({ url: '/system/sms-log/page', params })
}
// 导出短信日志
export const exportSmsLogApi = (params) => {
return defHttp.get({ url: '/system/sms-log/export', params, responseType: 'blob' })
}

View File

@ -0,0 +1,9 @@
export type SmsLogVO = {
id: number
idchannelId: number
templateId: number
mobile: string
sendStatus: number
receiveStatus: number
createTime: string
}

View File

@ -0,0 +1,37 @@
import { defHttp } from '@/config/axios'
import type { SmsTemplateVO, SmsSendVO } from './types'
// 查询短信模板列表
export const getSmsTemplatePageApi = ({ params }) => {
return defHttp.get<PageResult<SmsTemplateVO>>({ url: '/system/sms-template/page', params })
}
// 查询短信模板详情
export const getSmsTemplateApi = (id: number) => {
return defHttp.get<SmsTemplateVO>({ url: '/system/sms-template/get?id=' + id })
}
// 新增短信模板
export const createSmsTemplateApi = (params: SmsTemplateVO) => {
return defHttp.post({ url: '/system/sms-template/create', params })
}
// 修改短信模板
export const updateSmsTemplateApi = (params: SmsTemplateVO) => {
return defHttp.put({ url: '/system/sms-template/update', params })
}
// 删除短信模板
export const deleteSmsTemplateApi = (id: number) => {
return defHttp.delete({ url: '/system/sms-template/delete?id=' + id })
}
// 发送短信
export function sendSms(params: SmsSendVO) {
return defHttp.post({ url: '/system/sms-template/send-sms', params })
}
// 导出短信模板
export const exportPostApi = (params) => {
return defHttp.get({ url: '/system/sms-template/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,19 @@
export type SmsTemplateVO = {
id: number
type: number
status: number
code: string
name: string
content: string
remark: string
apiTemplateId: string
channelId: number
channelCode: string
createTime: string
}
export type SmsSendVO = {
mobile: string
templateCode: string
templateParams: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { TenantVO } from './types'
// 查询租户列表
export const getTenantPageApi = ({ params }) => {
return defHttp.get<PageResult<TenantVO>>({ url: '/system/tenant/page', params })
}
// 查询租户详情
export const getTenantApi = (id: number) => {
return defHttp.get<TenantVO>({ url: '/system/tenant/get?id=' + id })
}
// 新增租户
export const createTenantApi = (params: TenantVO) => {
return defHttp.post({ url: '/system/tenant/create', params })
}
// 修改租户
export const updateTenantApi = (params: TenantVO) => {
return defHttp.put({ url: '/system/tenant/update', params })
}
// 删除租户
export const deleteTenantApi = (id: number) => {
return defHttp.delete({ url: '/system/tenant/delete?id=' + id })
}
// 导出租户
export const exportTenantApi = (params) => {
return defHttp.get({ url: '/system/tenant/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,12 @@
export type TenantVO = {
id: number
name: string
packageId: number
contactName: string
contactMobile: string
accountCount: number
expireTime: string
domain: string
status: number
createTime: string
}

View File

@ -0,0 +1,33 @@
import { defHttp } from '@/config/axios'
import type { TenantPackageVO } from './types'
// 查询租户套餐列表
export const getTenantPackageTypePageApi = ({ params }) => {
return defHttp.get<PageResult<TenantPackageVO>>({ url: '/system/tenant-package/page', params })
}
// 获得租户
export const getTenantPackageApi = (id: number) => {
return defHttp.get<TenantPackageVO>({ url: '/system/tenant-package/get?id=' + id })
}
// 新增租户套餐
export const createTenantPackageTypeApi = (params: TenantPackageVO) => {
return defHttp.post({ url: '/system/tenant-package/create', params })
}
// 修改租户套餐
export const updateTenantPackageTypeApi = (params: TenantPackageVO) => {
return defHttp.put({ url: '/system/tenant-package/update', params })
}
// 删除租户套餐
export const deleteTenantPackageTypeApi = (id: number) => {
return defHttp.delete({ url: '/system/tenant-package/delete?id=' + id })
}
// // 获取租户套餐精简信息列表
export const getTenantPackageList = () => {
return defHttp.get({
url: '/system/tenant-package/get-simple-list'
})
}

View File

@ -0,0 +1,11 @@
export type TenantPackageVO = {
id: number
name: string
status: number
remark: string
creator: string
createTime: string
updater: string
updateTime: string
menuIds: string[]
}

View File

@ -0,0 +1,68 @@
import { defHttp } from '@/config/axios'
import type { UserVO } from './types'
// 查询用户管理列表
export const getUserPageApi = ({ params }) => {
return defHttp.get<PageResult<UserVO>>({ url: '/system/user/page', params })
}
// 查询用户详情
export const getUserApi = (id: number) => {
return defHttp.get<UserVO>({ url: '/system/user/get?id=' + id })
}
// 新增用户
export const createUserApi = (params: UserVO) => {
return defHttp.post({ url: '/system/user/create', params })
}
// 修改用户
export const updateUserApi = (params: UserVO) => {
return defHttp.put({ url: '/system/user/update', params })
}
// 删除用户
export const deleteUserApi = (id: number) => {
return defHttp.delete({ url: '/system/user/delete?id=' + id })
}
// 导出用户
export const exportUserApi = (params) => {
return defHttp.get({ url: '/system/user/export', params, responseType: 'blob' })
}
// 下载用户导入模板
export const importUserTemplateApi = () => {
return defHttp.get({ url: '/system/user/get-import-template', responseType: 'blob' })
}
// 用户密码重置
export const resetUserPwdApi = (userId: number, password: number) => {
const data = {
userId,
password
}
return defHttp.put({
url: '/system/user/resetPwd',
data: data
})
}
// 用户状态修改
export const updateUserStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/system/user/update-status', data: data })
}
// 查询授权角色
export const getAuthRoleApi = (userId: string) => {
return defHttp.get({ url: '/system/user/authRole/' + userId })
}
// 保存授权角色
export const updateAuthRoleApi = (data: any) => {
return defHttp.put({ url: '/system/user/authRole', params: data })
}

View File

@ -0,0 +1,28 @@
import { defHttp } from '@/config/axios'
import { ProfileVO } from './types'
// 查询用户个人信息
export const getUserProfileApi = () => {
return defHttp.get<ProfileVO>({ url: '/system/user/profile/get' })
}
// 修改用户个人信息
export const updateUserProfileApi = ({ params }) => {
return defHttp.put({ url: '/system/user/profile/update', params })
}
// 用户密码重置
export const updateUserPwdApi = (oldPassword: string, newPassword: string) => {
return defHttp.put({
url: '/system/user/profile/update-password',
params: {
oldPassword: oldPassword,
newPassword: newPassword
}
})
}
// 用户头像上传
export const uploadAvatarApi = (data) => {
return defHttp.put({ url: '/system/user/profile/update-avatar', data: data })
}

View File

@ -0,0 +1,42 @@
export type ProfileDept = {
id: number
name: string
}
export type ProfileRole = {
id: number
name: string
}
export type ProfilePost = {
id: number
name: string
}
export type SocialUser = {
id: number
type: number
openid: string
token: string
rawTokenInfo: string
nickname: string
avatar: string
rawUserInfo: string
code: string
state: string
}
export type ProfileVO = {
id: number
username: string
nickname: string
dept: ProfileDept
roles: ProfileRole[]
posts: ProfilePost[]
socialUsers: SocialUser[]
email: string
mobile: string
sex: number
avatar: string
status: number
remark: string
loginIp: string
loginDate: Date
createTime: Date
}

Some files were not shown because too many files have changed in this diff Show More