Compare commits

..

10 Commits

325 changed files with 21738 additions and 378 deletions

7
.vscode/launch.json vendored
View File

@ -1,5 +1,12 @@
{
"configurations": [
{
"type": "java",
"name": "CriticalScenarioApplication",
"request": "launch",
"mainClass": "com.yfd.business.css.CriticalScenarioApplication",
"projectName": "business-css"
},
{
"type": "java",
"name": "Spring Boot-PlatformApplication<platform>",

12
business-css/README.md Normal file
View File

@ -0,0 +1,12 @@
# business-css
临界事故情景分析模拟系统(业务模块)。
- 引用 `framework` 公共模块:依赖坐标 `com.yfd:platform:1.0:jar:plain`
- 提供基础 REST 接口:`/api/simulation/ping` 与 `/api/simulation/run`
- 运行方式:在项目根目录执行 `mvn -DskipTests spring-boot:run -pl business-css`
## 开发约定
- 统一使用 JDK 17
- 数据库连接在 `application.yml` 中配置,可根据环境覆盖
- 与框架的通用工具、模型、常量等直接通过依赖引入使用

View File

@ -0,0 +1,64 @@
# 临界事故情景分析模拟系统方案
本文档定义业务模块 `business-css` 的目标、架构、数据模型、接口设计与实施计划。
## 目标
- 支撑对“临界事故”相关情景的建模、参数化配置与快速模拟评估。
- 与 `framework` 项目共享通用能力(鉴权、缓存、日志、通用工具、数据访问等)。
- 提供 REST 接口用于前端或第三方系统的集成。
## 总体架构
- 应用Spring BootJDK 17模块名 `business-css`
- 依赖:`com.yfd:platform:1.0:jar:plain` 引入框架公共模块。
- 数据存储MySQL默认 `yfd_platform`,可按环境切换)。
- 接口:按 `REST + JSON` 约定OpenAPI 自动文档可选。
## 核心域模型(初版)
- `Scenario`:事故情景(名称、类型、参数定义、风险等级)。
- `IncidentFactor`:影响因子(指标、阈值、权重、取值范围)。
- `SimulationRequest`:一次模拟请求(情景名、输入参数)。
- `SimulationResult`:模拟输出(状态、关键指标、结论摘要、时间戳)。
## 关键能力
- 参数化建模:基于影响因子提出可配置的情景模板。
- 指标计算:利用 `framework` 的通用工具库(如缓存、时间序列、统计)实现。
- 场景评估:形成风险等级、预警阈值与应对建议。
- 结果持久化:保存模拟结果用于追踪与复盘(后续版本)。
## 接口草图
- `GET /api/simulation/ping`:服务健康检测。
- `POST /api/simulation/run`:执行一次模拟,输入 `SimulationRequest`,输出 `SimulationResult`
- 后续:`/api/scenario/*` 用于情景模板的增删改查;`/api/factor/*` 用于影响因子的管理。
## 数据表(建议)
- `css_scenario`:情景基础信息表。
- `css_factor`:影响因子表。
- `css_simulation_log`:模拟记录表(包含输入与输出摘要)。
## 与框架的集成
- 鉴权与用户上下文:复用 `framework` 的安全模块。
- 通用组件缓存Caffeine/Redis、日志、异常统一处理。
- 数据访问:沿用 MyBatis/MyBatis-Plus 与统一的分页、审计字段策略。
## 版本与发布
- 业务模块版本:`1.0-SNAPSHOT` 起步;与框架 `1.0` 对齐。
- 构建:在仓库根 `pom` 中作为模块聚合;可单独使用 `-pl business-css` 构建或运行。
## 渐进式实施计划
1. 基础骨架搭建(已完成:应用入口、控制器、服务接口与模型)。
2. 定义情景与影响因子数据模型,建立数据库表结构与 Mapper。
3. 接入框架公共工具,完善指标计算与风险评估逻辑。
4. 增加 OpenAPI 文档与前端集成接口规范。
5. 引入结果持久化与查询报表。
## 运维与配置
- 端口默认 `8082`,环境覆盖通过 `application.yml` 与外部化配置。
- 数据库连接按环境注入dev/test/prod
- 日志级别默认 `info`,业务包 `com.yfd` 可设为 `debug`
## 安全与合规
- 按角色访问控制(复用框架安全),仅授权用户可触发模拟。
- 输入校验与审计日志记录,避免非法参数导致资源消耗异常。
---
本文为初版方案,后续将结合具体需求与数据约束逐步细化与调整。

View File

@ -0,0 +1,15 @@
# http://editorconfig.org
root = true
[*] # 表示所有文件适用
charset = utf-8 # 设置文件字符集为 utf-8
indent_style = space # 缩进风格tab | space
indent_size = 2 # 缩进大小
end_of_line = lf # 控制换行类型(lf | cr | crlf)
trim_trailing_whitespace = true # 去除行首的任意空白字符
insert_final_newline = true # 始终在文件末尾插入一个新行
[*.md] # 表示仅 md 文件适用以下规则
max_line_length = off
trim_trailing_whitespace = false

View File

@ -0,0 +1,8 @@
## 开发环境
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
NODE_ENV='development'
VITE_APP_TITLE = '公司开发平台框架'
VITE_APP_PORT = 3000
VITE_APP_BASE_API = '/dev-api'

View File

@ -0,0 +1,6 @@
## 生产环境
NODE_ENV='production'
VITE_APP_TITLE = 'NewFrameWork2023-WEB'
VITE_APP_PORT = 3000
VITE_APP_BASE_API = '/prod-api'

View File

@ -0,0 +1,6 @@
## 模拟环境
NODE_ENV='staging'
VITE_APP_TITLE = 'NewFrameWork2023-WEB'
VITE_APP_PORT = 3000
VITE_APP_BASE_API = '/prod--api'

View File

@ -0,0 +1,16 @@
*.sh
node_modules
*.md
*.woff
*.ttf
.vscode
.idea
dist
/public
/docs
.husky
.local
/bin
.eslintrc.js
prettier.config.js
src/assets

View File

@ -0,0 +1,32 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
globals: {
defineProps: 'readonly',
defineEmits: 'readonly',
defineExpose: 'readonly',
DialogType: "readonly",
OptionType: "readonly",
},
parser: 'vue-eslint-parser',
extends: [
'eslint:recommended',
'plugin:vue/vue3-essential',
'plugin:@typescript-eslint/recommended'
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: ['vue', '@typescript-eslint'],
rules: {
'vue/multi-word-component-names': 'off',
'@typescript-eslint/no-empty-function': 'off', // 关闭空方法检查
'@typescript-eslint/no-explicit-any': 'off', // 关闭any类型的警告
'vue/no-v-model-argument': 'off'
}
};

17
business-css/frontend/.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
node_modules
.DS_Store
dist
dist-ssr
*.local
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.local
package-lock.json
yarn.lock

View File

@ -0,0 +1,3 @@
registry=https://registry.npmjs.org
fetch-retries=5
strict-peer-dependencies=false

View File

@ -0,0 +1,9 @@
/dist/*
.local
.output.js
/node_modules/**
**/*.svg
**/*.sh
/public/*

View File

@ -0,0 +1,36 @@
/**
* 代码格式化配置
*/
module.exports = {
// 指定每个缩进级别的空格数
tabWidth: 2,
// 使用制表符而不是空格缩进行
useTabs: false,
// 在语句末尾打印分号
semi: true,
// 使用单引号而不是双引号
singleQuote: true,
// 更改引用对象属性的时间 可选值"<as-needed|consistent|preserve>"
quoteProps: 'as-needed',
// 多行时尽可能打印尾随逗号。(例如,单行数组永远不会出现逗号结尾。) 可选值"<none|es5|all>"默认none
trailingComma: 'none',
// 在对象文字中的括号之间打印空格
bracketSpacing: true,
// 在单独的箭头函数参数周围包括括号 always(x) => x \ avoidx => x
arrowParens: 'avoid',
// 这两个选项可用于格式化以给定字符偏移量(分别包括和不包括)开始和结束的代码
rangeStart: 0,
rangeEnd: Infinity,
// 指定要使用的解析器,不需要写文件开头的 @prettier
requirePragma: false,
// 不需要自动在文件开头插入 @prettier
insertPragma: false,
// 换行设置 always\never\preserve
proseWrap: 'never',
// 指定HTML文件的全局空格敏感度 css\strict\ignore
htmlWhitespaceSensitivity: 'css',
// Vue文件脚本和样式标签缩进
vueIndentScriptAndStyle: false,
// 换行符使用 lf 结尾是 可选值"<auto|lf|crlf|cr>"
endOfLine: 'lf'
};

View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2022 有来开源组织
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -0,0 +1,26 @@
module.exports = {
// 继承的规则
extends: ['@commitlint/config-conventional'],
// 定义规则类型
rules: {
// type 类型定义,表示 git 提交的 type 必须在以下类型范围内
'type-enum': [
2,
'always',
[
'feat', // 新功能 feature
'fix', // 修复 bug
'docs', // 文档注释
'style', // 代码格式(不影响代码运行的变动)
'refactor', // 重构(既不增加新功能也不是修复bug)
'perf', // 性能优化
'test', // 增加测试
'chore', // 构建过程或辅助工具的变动
'revert', // 回退
'build' // 打包
]
],
// subject 大小写不做校验
'subject-case': [0]
}
};

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="NewFrameWork2023-WEB" />
<meta name="keywords" content="NewFrameWork2023-WEB" />
<title>公司开发平台框架</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

View File

@ -0,0 +1,208 @@
{
root: 'D:\\Trae_space\\ProjectFrameWork2025\\app\\frontend',
registry: 'https://registry.npmmirror.com',
pkgs: [],
production: false,
cacheStrict: false,
cacheDir: 'C:\\Users\\13910\\.npminstall_tarball',
env: {
npm_config_registry: 'https://registry.npmmirror.com',
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\13910\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\13910\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com"]}',
npm_config_user_agent: 'npminstall/7.9.0 npm/? node/v20.19.2 win32 x64',
npm_config_cache: 'C:\\Users\\13910\\.npminstall_tarball',
NODE: 'C:\\Program Files\\nodejs\\node.exe',
npm_node_execpath: 'C:\\Program Files\\nodejs\\node.exe',
npm_execpath: 'C:\\Users\\13910\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js',
npm_config_userconfig: 'C:\\Users\\13910\\.cnpmrc',
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node',
npm_config_r: 'https://registry.npmmirror.com',
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_CHROME_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
RE2_DOWNLOAD_SKIP_PATH: 'true',
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
npm_config_gl_binary_host: 'https://cdn.npmmirror.com/binaries/gl',
RIPGREP_PREBUILT_BINARIES_MIRROR: 'https://registry.npmmirror.com/-/binary/ripgrep-prebuilt',
npm_rootpath: 'D:\\Trae_space\\ProjectFrameWork2025\\app\\frontend',
INIT_CWD: 'D:\\Trae_space\\ProjectFrameWork2025\\app\\frontend'
},
binaryMirrors: {
ENVS: {
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com',
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver',
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node',
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs',
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver',
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver',
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip',
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/',
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/',
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass',
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc',
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v',
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_CHROME_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PUPPETEER_CHROME_HEADLESS_SHELL_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing',
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright',
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli',
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl',
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2',
RE2_DOWNLOAD_SKIP_PATH: 'true',
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma',
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3',
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar',
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp',
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips',
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs',
npm_config_gl_binary_host: 'https://cdn.npmmirror.com/binaries/gl',
RIPGREP_PREBUILT_BINARIES_MIRROR: 'https://registry.npmmirror.com/-/binary/ripgrep-prebuilt'
},
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' },
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] },
'@tensorflow/tfjs-node': {
replaceHostFiles: [Array],
replaceHostRegExpMap: [Object],
replaceHostMap: [Object]
},
cypress: {
host: 'https://cdn.npmmirror.com/binaries/cypress',
newPlatforms: [Object]
},
'utf-8-validate': {
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}'
},
xprofiler: {
remote_path: './xprofiler/v{version}/',
host: 'https://cdn.npmmirror.com/binaries'
},
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' },
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' },
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' },
sqlite3: {
host: 'https://cdn.npmmirror.com/binaries/sqlite3',
remote_path: 'v{version}'
},
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' },
grpc: {
host: 'https://cdn.npmmirror.com/binaries',
remote_path: '{name}/v{version}'
},
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' },
wrtc: {
host: 'https://cdn.npmmirror.com/binaries',
remote_path: '{name}/v{version}'
},
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' },
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' },
canvas: {
host: 'https://cdn.npmmirror.com/binaries/canvas',
remote_path: 'v{version}'
},
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' },
'flow-bin': {
replaceHost: 'https://github.com/facebook/flow/releases/download/v',
host: 'https://cdn.npmmirror.com/binaries/flow/v'
},
'jpegtran-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin'
},
'cwebp-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin'
},
'zopflipng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin'
},
'optipng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/optipng-bin'
},
mozjpeg: {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin'
},
gifsicle: {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin'
},
'pngquant-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin',
replaceHostMap: [Object]
},
'pngcrush-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin'
},
'jpeg-recompress-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin'
},
'advpng-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/advpng-bin'
},
'pngout-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/pngout-bin'
},
'jpegoptim-bin': {
replaceHost: [Array],
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin'
},
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' },
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' },
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' },
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' },
'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' }
},
forbiddenLicenses: null,
flatten: false,
proxy: undefined,
prune: false,
disableFallbackStore: false,
workspacesMap: Map(0) {},
enableWorkspace: false,
workspaceRoot: 'D:\\Trae_space\\ProjectFrameWork2025\\app\\frontend',
isWorkspaceRoot: true,
isWorkspacePackage: false,
offline: false,
strictSSL: true,
ignoreScripts: false,
foregroundScripts: false,
ignoreOptionalDependencies: false,
detail: false,
forceLinkLatest: false,
trace: false,
engineStrict: false,
registryOnly: false,
client: false,
autoFixVersion: [Function: autoFixVersion]
}

View File

@ -0,0 +1,66 @@
{
"name": "NewFrameWork2023-WEB",
"version": "1.2.0",
"scripts": {
"dev": "vite serve --mode development",
"build:prod": "vue-tsc --noEmit && vite build --mode production",
"build:mvn": "vite build --mode production",
"serve": "vite preview",
"lint": "eslint src/**/*.{ts,js,vue} --fix",
"prettier": "prettier --write ."
},
"dependencies": {
"@element-plus/icons-vue": "^2.0.10",
"@types/js-cookie": "^3.0.2",
"@vueuse/core": "^9.1.1",
"@wangeditor/editor": "^5.0.0",
"@wangeditor/editor-for-vue": "^5.1.10",
"axios": "^1.2.0",
"better-scroll": "^2.4.2",
"default-passive-events": "^2.0.0",
"echarts": "^5.2.2",
"element-plus": "^2.2.27",
"js-base64": "^3.7.5",
"js-cookie": "^3.0.1",
"jsencrypt": "^3.3.2",
"nprogress": "^0.2.0",
"path-browserify": "^1.0.1",
"path-to-regexp": "^6.2.0",
"pinia": "^2.0.12",
"screenfull": "^6.0.0",
"sortablejs": "^1.14.0",
"vue": "^3.2.40",
"vue-i18n": "^9.1.9",
"vue-router": "^4.1.6",
"vuedraggable": "^2.24.3"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@types/node": "^16.11.7",
"@types/nprogress": "^0.2.0",
"@types/path-browserify": "^1.0.0",
"@typescript-eslint/eslint-plugin": "^5.19.0",
"@typescript-eslint/parser": "^5.19.0",
"@vitejs/plugin-vue": "^4.0.0",
"autoprefixer": "^10.4.13",
"eslint": "^8.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^8.6.0",
"fast-glob": "^3.2.11",
"husky": "^7.0.4",
"postcss": "^8.4.20",
"prettier": "^2.6.2",
"sass": "^1.53.0",
"tailwindcss": "^3.2.4",
"typescript": "^4.7.4",
"vite": "^4.0.3",
"vite-plugin-svg-icons": "^2.0.1",
"vue-tsc": "^0.35.0"
},
"repository": "https://gitee.com/youlaiorg/vue3-element-admin.git",
"author": "有来开源组织",
"license": "MIT",
"__npminstall_done": false
}

File diff suppressed because it is too large Load Diff

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1 @@
这里放置前端项目的readme文件

View File

@ -0,0 +1,11 @@
<script setup lang="ts">
import { ElConfigProvider } from 'element-plus';
import { useAppStore } from '@/store/modules/app';
const appStore = useAppStore();
</script>
<template>
<el-config-provider :locale="appStore.locale" :size="appStore.size">
<router-view />
</el-config-provider>
</template>

View File

@ -0,0 +1,36 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { LoginData, TokenResult, VerifyCode } from './types';
/**
*
* @param data {LoginForm}
* @returns
*/
export function loginApi(data: LoginData): AxiosPromise<TokenResult> {
return request({
url: '/user/login',
method: 'post',
params: data
});
}
/**
*
*/
export function logoutApi() {
return request({
url: '/user/logout',
method: 'post'
});
}
/**
*
*/
export function getCaptcha(): AxiosPromise<VerifyCode> {
return request({
url: '/user/code?t=' + new Date().getTime().toString(),
method: 'get'
});
}

View File

@ -0,0 +1,34 @@
/**
*
*/
export interface LoginData {
username: string;
password: string;
code: string;
uuid: string;
/**
* Code
*/
//verifyCode: string;
/**
* Code服务端缓存key(UUID)
*/
// verifyCodeKey: string;
}
/**
* Token响应类型
*/
export interface TokenResult {
token: string;
refreshToken: string;
expires: number;
}
/**
*
*/
export interface VerifyCode {
verifyCodeImg: string;
verifyCodeKey: string;
}

View File

@ -0,0 +1,139 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { DeptForm, DeptQuery, Dept } from './types';
//获取组织架构
export function getTreelist(queryParams:any) {
return request({
url: '/system/organization/getOrgTree',
method: 'POST',
params: queryParams
});
}
//新增企业或部门
export function addTreelist(queryParams:any) {
return request({
url: '/system/organization/addOrg',
method: 'POST',
data: queryParams
});
}
// 修改企业部门
export function updataTreelist(queryParams:any) {
return request({
url: '/system/organization/updateById',
method: 'POST',
data: queryParams
});
}
//删除企业
export function delTreelist(queryParams:any) {
return request({
url: '/system/organization/deleteById',
method: 'POST',
params: queryParams
});
}
//获取部门信息
export function gettableData(queryParams:any) {
return request({
url: '/system/organization/getOrganizationById',
method: 'POST',
params: queryParams
});
}
//部门是否有效
export function deptIsVaild(queryParams:any) {
return request({
url: '/system/organization/setIsValid',
method: 'POST',
params: queryParams
});
}
//修改部门信息
export function reviseDepartment(queryParams:any) {
return request({
url: '/system/organization/updateById',
method: 'POST',
data: queryParams
});
}
/**
*
*
* @param queryParams
*/
export function listDepartments(queryParams?: DeptQuery): AxiosPromise<Dept[]> {
return request({
url: '/api/v1/dept',
method: 'get',
params: queryParams
});
}
/**
*
*/
export function listDeptOptions(): AxiosPromise<OptionType[]> {
return request({
url: '/api/v1/dept/options',
method: 'get'
});
}
/**
*
*
* @param id
*/
export function getDeptForm(id: string): AxiosPromise<DeptForm> {
return request({
url: '/api/v1/dept/' + id + '/form',
method: 'get'
});
}
/**
*
*
* @param data
*/
export function addDept(data: DeptForm) {
return request({
url: '/api/v1/dept',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateDept(id: string, data: DeptForm) {
return request({
url: '/api/v1/dept/' + id,
method: 'put',
data: data
});
}
/**
*
*
* @param ids
*/
export function deleteDept(ids: string) {
return request({
url: '/api/v1/dept/' + ids,
method: 'delete'
});
}

View File

@ -0,0 +1,34 @@
/**
*
*/
export interface DeptQuery {
keywords: string | undefined;
status: number | undefined;
}
/**
*
*/
export interface Dept {
id: string;
name: string;
parentId: string;
treePath: string;
sort: number;
status: number;
leader?: string;
mobile?: string;
email?: string;
children: Dept[];
}
/**
*
*/
export interface DeptForm {
id?: string;
parentId: string;
name: string;
sort: number;
status: number;
}

View File

@ -0,0 +1,242 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import {
DictQuery,
DictPageResult,
DictTypeForm,
DictItemQuery,
DictItemPageResult,
DictItemForm
} from './types';
// 查询字典
export function getTreelist(params:any) {
return request({
url: '/system/dictionary/dictList',
method: 'get',
params: params
});
}
// 新增字典
export function addDict(params:any) {
return request({
url: '/system/dictionary/addDict',
method: 'post',
data: params
});
}
// 修改字典
export function updateDict(params:any) {
return request({
url: '/system/dictionary/updateDict',
method: 'post',
data: params
});
}
// 删除字典
export function deleteById(params:any) {
return request({
url: '/system/dictionary/deleteById',
method: 'post',
params: params
});
}
// 字典排序
export function changeDictOrder(params:any) {
return request({
url: '/system/dictionary/changeDictOrder',
method: 'post',
params: params
});
}
// 查询字典项
export function getDictItemById(params:any) {
return request({
url: '/system/dictionaryItems/page',
method: 'get',
params: params
});
}
// 新增字典项
export function addDictionaryItem(params:any) {
return request({
url: '/system/dictionaryItems/addDictionaryItem',
method: 'post',
data: params
});
}
// 修改字典项
export function updateDictionaryItem(params:any) {
return request({
url: '/system/dictionaryItems/updateDictionaryItem',
method: 'post',
data: params
});
}
// 删除字典项
export function deleteDictItemById(params:any) {
return request({
url: '/system/dictionaryItems/deleteDictItemById',
method: 'post',
params: params
});
}
// 批量删除字典项
export function deleteDictItemByIds(params:any) {
return request({
url: '/system/dictionaryItems/deleteDictItemByIds',
method: 'post',
params: params
});
}
// 字典项排序
export function changeItemOrder(params:any) {
return request({
url: '/system/dictionaryItems/changeItemOrder',
method: 'post',
params: params
});
}
/**
*
*
* @param queryParams
*/
export function listDictTypePages(
queryParams: DictQuery
): AxiosPromise<DictPageResult> {
return request({
url: '/api/v1/dict/types/pages',
method: 'get',
params: queryParams
});
}
/**
*
*
* @param id
*/
export function getDictTypeForm(id: number): AxiosPromise<DictTypeForm> {
return request({
url: '/api/v1/dict/types/' + id + '/form',
method: 'get'
});
}
/**
*
*
* @param data
*/
export function addDictType(data: DictTypeForm) {
return request({
url: '/api/v1/dict/types',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateDictType(id: number, data: DictTypeForm) {
return request({
url: '/api/v1/dict/types/' + id,
method: 'put',
data: data
});
}
/**
*
*/
export function deleteDictTypes(ids: string) {
return request({
url: '/api/v1/dict/types/' + ids,
method: 'delete'
});
}
/**
*
*
* @param typeCode
*/
export function getDictionaries(typeCode: string): AxiosPromise<OptionType[]> {
return request({
url: '/api/v1/dict/types/' + typeCode + '/items',
method: 'get'
});
}
/**
*
*/
export function listDictItemPages(
queryParams: DictItemQuery
): AxiosPromise<DictItemPageResult> {
return request({
url: '/api/v1/dict/items/pages',
method: 'get',
params: queryParams
});
}
/**
*
*
* @param id
*/
export function getDictItemData(id: number): AxiosPromise<DictItemForm> {
return request({
url: '/api/v1/dict/items/' + id + '/form',
method: 'get'
});
}
/**
*
*
* @param data
*/
export function saveDictItem(data: DictItemForm) {
return request({
url: '/api/v1/dict/items',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateDictItem(id: number, data: DictItemForm) {
return request({
url: '/api/v1/dict/items/' + id,
method: 'put',
data: data
});
}
/**
*
*
* @param ids ID(,)
*/
export function deleteDictItems(ids: string) {
return request({
url: '/api/v1/dict/items/' + ids,
method: 'delete'
});
}

View File

@ -0,0 +1,84 @@
/**
*
*/
export interface DictQuery extends PageQuery {
/**
*
*/
name?: string;
}
/**
*
*/
export interface Dict {
id: number;
code: string;
name: string;
status: number;
remark: string;
}
/**
*
*/
export type DictPageResult = PageResult<Dict[]>;
/**
*
*/
export interface DictTypeForm {
id: number | undefined;
name: string;
code: string;
status: number;
remark: string;
}
/**
*
*/
export interface DictItemQuery extends PageQuery {
/**
*
*/
name?: string;
/**
*
*/
typeCode?: string;
}
/**
*
*/
export interface DictItem {
id: number;
name: string;
value: string;
typeCode: string;
sort: number;
status: number;
defaulted: number;
remark?: string;
}
/**
*
*/
export type DictItemPageResult = PageResult<DictItem[]>;
/**
*
*/
export interface DictItemForm {
id?: number;
typeCode?: string;
typeName?: string;
name: string;
code: string;
value: string;
status: number;
sort: number;
remark: string;
}

View File

@ -0,0 +1,34 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { FileInfo } from './types';
/**
*
*
* @param file
*/
export function uploadFileApi(file: File): AxiosPromise<FileInfo> {
const formData = new FormData();
formData.append('file', file);
return request({
url: '/api/v1/files',
method: 'post',
data: formData,
headers: {
'Content-Type': 'multipart/form-data'
}
});
}
/**
*
*
* @param filePath
*/
export function deleteFileApi(filePath?: string) {
return request({
url: '/api/v1/files',
method: 'delete',
params: { filePath: filePath }
});
}

View File

@ -0,0 +1,7 @@
/**
* API类型声明
*/
export interface FileInfo {
name: string;
url: string;
}

View File

@ -0,0 +1,159 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { MenuQuery, Menu, Resource, MenuForm } from './types';
//获取菜单表格
export function getdata(queryParams:any) {
return request({
url: '/system/menu/getMenuButtonTree',
method: 'post',
params: queryParams
});
}
//新增目录
export function addmenu(queryParams:any) {
return request({
url: '/system/menu/addMenu',
method: 'post',
data: queryParams
});
}
//修改目录
export function editmenu(queryParams:any) {
return request({
url: '/system/menu/updateById',
method: 'post',
data: queryParams
});
}
//删除
export function deltmenu(queryParams:any) {
return request({
url: '/system/menu/deleteById',
method: 'post',
params: queryParams
});
}
//排序
export function moveOrderno(params:any) {
return request({
url: '/system/menu/changeMenuOrder',
method: 'post',
params: params
});
}
//上传图标之前获取ID
//上传单个图标
export function uploadIcon (data:any) {
return request({
headers: {
'Content-Type': 'multipart/form-data'
},
url: '/system/menu/uploadIcon',
method: 'POST',
data
});
}
//删除单个图标
export function moveIcon(params:any) {
return request({
url: '/system/menu/deleteIcon',
method: 'post',
params: params
});
}
/**
*
*/
export function listRoutes() {
return request({
url: 'system/menu/treeRoutes',
method: 'get',
});
}
/**
*
*
* @param queryParams
*/
export function listMenus(queryParams: MenuQuery): AxiosPromise<Menu[]> {
return request({
url: '/api/v1/menus',
method: 'get',
params: queryParams
});
}
/**
*
*/
export function listMenuOptions(): AxiosPromise<OptionType[]> {
return request({
url: '/api/v1/menus/options',
method: 'get'
});
}
/**
* (+)
*/
export function listResources(): AxiosPromise<Resource[]> {
return request({
url: '/api/v1/menus/resources',
method: 'get'
});
}
/**
*
* @param id
*/
export function getMenuDetail(id: string): AxiosPromise<MenuForm> {
return request({
url: '/api/v1/menus/' + id,
method: 'get'
});
}
/**
*
*
* @param data
*/
export function addMenu(data: MenuForm) {
return request({
url: '/api/v1/menus',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateMenu(id: string, data: MenuForm) {
return request({
url: '/api/v1/menus/' + id,
method: 'put',
data: data
});
}
/**
*
*
* @param ids ID(,)
*/
export function deleteMenus(ids: string) {
return request({
url: '/api/v1/menus/' + ids,
method: 'delete'
});
}

View File

@ -0,0 +1,105 @@
/**
*
*/
export interface MenuQuery {
keywords?: string;
}
/**
*
*/
export interface Menu {
id?: number;
parentId: number;
type?: string | 'CATEGORY' | 'MENU' | 'EXTLINK';
createTime: string;
updateTime: string;
name: string;
icon: string;
component: string;
sort: number;
visible: number;
children: Menu[];
}
/**
*
*/
export interface MenuForm {
/**
* ID
*/
id?: string;
/**
* ID
*/
parentId: string;
/**
*
*/
name: string;
/**
* (1:;0:;)
*/
visible: number;
icon?: string;
/**
*
*/
sort: number;
/**
*
*/
component?: string;
/**
*
*/
path: string;
/**
*
*/
redirect?: string;
/**
*
*/
type: string;
/**
*
*/
perm?: string;
}
/**
* (+)
*/
export interface Resource {
/**
*
*/
value: string;
/**
*
*/
label: string;
/**
*
*/
children: Resource[];
}
/**
*
*/
export interface Permission {
/**
*
*/
value: string;
/**
*
*/
label: string;
}

View File

@ -0,0 +1,28 @@
import request from '@/utils/request';
export function getMessageList(params:any) {
return request({
url: '/system/message/getMessageList',
method: 'get',
params
});
}
export function setMessageStatus(data:any) {
return request({
url: '/system/message/setMessageStatus?id=' + data,
method: 'post'
});
}
export function setAllMessageStatus() {
return request({
url: '/system/message/setAllMessageStatus',
method: 'post'
});
}
export function deleteMessageById(data:any) {
return request({
url: '/system/message/deleteMessageById?id=' + data,
method: 'post',
data
});
}

View File

@ -0,0 +1,18 @@
import request from '@/utils/request';
//获取所有角色
export function getLogList(params:any){
return request({
url: '/system/log/getLogList' ,
method: 'post',
params: params
});
}
export function exportExcel(queryParams: any) {
return request({
url: '/system/log/exportExcel',
method: 'get',
params: queryParams,
responseType: 'arraybuffer'
});
}

View File

@ -0,0 +1,196 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { RoleQuery, RoleForm } from './types';
//获取所有角色
export function listRolePages(queryParams:any){
return request({
url: '/system/role/list' ,
method: 'post',
params:queryParams
});
}
//角色是否有效
export function isvaildTo(queryParams:any){
return request({
url: '/system/role/setIsvaild' ,
method: 'post',
params:queryParams
});
}
//新增角色
export function addDept(queryParams:any){
return request({
url:'/system/role/addRole' ,
method: 'post',
data: queryParams
});
}
//更新角色信息
export function renewDept (queryParams:any){
return request({
url:'/system/role/updateById' ,
method: 'post',
data: queryParams
});
}
//单个删除角色
export function deleDept (queryParams:any){
return request({
url:'/system/role/deleteById' ,
method: 'post',
params: queryParams
});
}
//获取分配权限
export function assignmentPer (queryParams:any){
return request({
url:'/system/menu/permissionAssignment' ,
method: 'post',
params: queryParams
});
}
//发出分配权限
export function setMenuById (queryParams:any){
return request({
url:'/system/role/setMenuById' ,
method: 'post',
params: queryParams
});
}
////获取组织范围
export function setOrgscope (queryParams:any){
return request({
url:'/system/organization/getOrgScopeTree' ,
method: 'post',
params: queryParams
});
}
//修改组织范围
export function postOrgscope (queryParams:any){
return request({
url:'/system/role/setOrgscope' ,
method: 'post',
params: queryParams
});
}
//删除角色
// export function delDept(queryParams:any){
// return request({
// url:'/system/role/addRole' ,
// method: 'post',
// data: queryParams
// });
// }
/**
*
*
* @param queryParam
*/
// export function listRolePages(
// queryParams?: RoleQuery
// ): AxiosPromise<RolePageResult> {
// return request({
// url: '/system/role/list',
// method: 'post',
// params: queryParams
// });
// }
/**
*
*
* @param queryParams
*/
export function listRoleOptions(
queryParams?: RoleQuery
): AxiosPromise<OptionType[]> {
return request({
url: '/api/v1/roles/options',
method: 'get',
params: queryParams
});
}
/**
* ID集合
*
* @param queryParams
*/
export function getRoleMenuIds(roleId: string): AxiosPromise<number[]> {
return request({
url: '/api/v1/roles/' + roleId + '/menuIds',
method: 'get'
});
}
/**
*
*
* @param queryParams
*/
export function updateRoleMenus(
roleId: string,
data: number[]
): AxiosPromise<any> {
return request({
url: '/api/v1/roles/' + roleId + '/menus',
method: 'put',
data: data
});
}
/**
*
*
* @param id
*/
export function getRoleDetail(id: number): AxiosPromise<RoleForm> {
return request({
url: '/api/v1/roles/' + id,
method: 'get'
});
}
/**
*
*
* @param data
*/
export function addRole(data: RoleForm) {
return request({
url: '/api/v1/roles',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateRole(id: number, data: RoleForm) {
return request({
url: '/api/v1/roles/' + id,
method: 'put',
data: data
});
}
/**
* (,)
*
* @param ids
*/
export function deleteRoles(ids: string) {
return request({
url: '/api/v1/roles/' + ids,
method: 'delete'
});
}

View File

@ -0,0 +1,40 @@
/**
*
*/
export interface RoleQuery extends PageQuery {
keywords?: string;
}
/**
*
*/
export interface Role {
id: string;
name: string;
code: string;
sort: number;
status: number;
deleted: number;
menuIds?: any;
permissionIds?: any;
}
/**
*
*/
export type RolePageResult = PageResult<Role[]>;
/**
*
*/
export interface RoleForm {
id?: number;
name: string;
code: string;
sort: number;
status: number;
/**
*
*/
dataScope: number;
}

View File

@ -0,0 +1,51 @@
import request from '@/utils/request';
//获取表格内容
export function getTaskList(params: any) {
return request({
url: '/system/quartzjob/getQuartzJobList',
method: 'get',
params: params
});
}
//新增表格内容
export function addTaskList(params: any) {
return request({
url: '/system/quartzjob/addQuartzJob',
method: 'post',
data: params
});
}
//删除定时任务
export function delTaskList(params: any) {
return request({
url: '/system/quartzjob/deleteQuartzJob',
method: 'post',
params: params
});
}
//修改定时任务
export function updataTaskList(params: any) {
return request({
url: '/system/quartzjob/updateQuartzJob',
method: 'post',
data: params
});
}
//定时任务是否有效
export function setTaskList(params: any) {
return request({
url: '/system/quartzjob/setQuartzStatus',
method: 'post',
params: params
});
}
//拖拽
export function changeItemOrder(params: any) {
return request({
url: '/system/quartzjob/changeDictOrder',
method: 'post',
params: params
});
}

View File

@ -0,0 +1,238 @@
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { UserForm, UserInfo, UserPageResult, UserQuery } from './types';
//获取企业树 数据
export function getTreelist(queryParams:any) {
return request({
url: '/system/organization/getOrgTree',
method: 'POST',
params: queryParams
});
}
//获取用户列表信息
export function gettableData(queryParams:any) {
return request({
url: '/system/user/queryUsers',
method: 'get',
params: queryParams
});
}
//用户-禁用,启用
export function DataStatus (queryParams:any) {
return request({
url: '/system/user/setStatus',
method: 'POST',
params: queryParams
});
}
//删除用户
export function deltableData (queryParams:any) {
return request({
url: '/system/user/deleteById',
method: 'POST',
params: queryParams
});
}
//批量删除
export function delChoise (queryParams:any) {
return request({
url: '/system/user/deleteUserByIds',
method: 'POST',
params: queryParams
});
}
//获取角色
export function getRole (queryParams:any) {
return request({
url: '/system/role/list',
method: 'POST',
params: queryParams
});
}
//新建用户
export function addUsers (queryParams:any,roleids:any) {
return request({
url: '/system/user/addUser?'+'roleids='+roleids,
method: 'POST',
data: queryParams,
});
}
//更改用户
export function updataUser (queryParams:any,roleids:any) {
return request({
url: '/system/user/updateUser?'+'roleids='+roleids,
method: 'POST',
data: queryParams,
});
}
//更改用户
export function updatePersonalInfo (queryParams:any) {
return request({
url: '/user/updatePersonalInfo',
method: 'POST',
data: queryParams,
});
}
//更改头像
export function updateAvatar (data:any) {
return request({
headers: {
'Content-Type': 'multipart/form-data'
},
url: '/system/user/updateAvatar',
method: 'POST',
data
});
}
//重置密码
export function setpass (queryParams:any) {
return request({
url: '/system/user/resetPassword',
method: 'POST',
params: queryParams,
});
}
export function updatePassword (queryParams:any) {
return request({
url: '/user/updatePassword',
method: 'GET',
params: queryParams,
});
}
/**
*
*/
export function getUserInfo(): AxiosPromise<UserInfo> {
return request({
url: '/user/me',
method: 'get'
});
}
/**
*
*
* @param queryParams
*/
export function listUserPages(
queryParams: UserQuery
): AxiosPromise<UserPageResult> {
return request({
url: '/api/v1/users/pages',
method: 'get',
params: queryParams
});
}
/**
*
*
* @param userId
*/
export function getUserForm(userId: number): AxiosPromise<UserForm> {
return request({
url: '/api/v1/users/' + userId + '/form',
method: 'get'
});
}
/**
*
*
* @param data
*/
export function addUser(data: any) {
return request({
url: '/api/v1/users',
method: 'post',
data: data
});
}
/**
*
*
* @param id
* @param data
*/
export function updateUser(id: number, data: UserForm) {
return request({
url: '/api/v1/users/' + id,
method: 'put',
data: data
});
}
/**
*
*
* @param id
* @param status
*/
export function updateUserStatus(id: number, status: number) {
return request({
url: '/api/v1/users/' + id + '/status',
method: 'patch',
params: { status: status }
});
}
/**
*
*
* @param id
* @param password
*/
export function updateUserPassword(id: number, password: string) {
return request({
url: '/api/v1/users/' + id + '/password',
method: 'patch',
params: { password: password }
});
}
/**
*
*
* @param ids
*/
export function deleteUsers(ids: string) {
return request({
url: '/api/v1/users/' + ids,
method: 'delete'
});
}
/**
*
*
* @returns
*/
export function downloadTemplate() {
return request({
url: '/api/v1/users/template',
method: 'get',
responseType: 'arraybuffer'
});
}
/**
*
*
* @param queryParams
* @returns
*/
export function exportUser(queryParams: UserQuery) {
return request({
url: '/api/v1/users/_export',
method: 'get',
params: queryParams,
responseType: 'arraybuffer'
});
}

View File

@ -0,0 +1,67 @@
/**
*
*/
export interface UserInfo {
permissions: string[];
userInfo: any;
nickname: string;
avatar: string;
roles: string[];
perms: string[];
}
/**
*
*/
export interface UserQuery extends PageQuery {
keywords: string;
status: number;
deptId: number;
}
/**
*
*/
export interface UserType {
id: string;
username: string;
nickname: string;
mobile: string;
gender: number;
avatar: string;
email: string;
status: number;
deptName: string;
roleNames: string;
createTime: string;
}
/**
*
*/
export type UserPageResult = PageResult<UserType[]>;
/**
*
*/
export interface UserForm {
id: number | undefined;
deptId: number;
username: string;
nickname: string;
password: string;
mobile: string;
email: string;
gender: number;
status: number;
remark: string;
roleIds: number[];
}
/**
*
*/
export interface UserImportData {
deptId: number;
roleIds: number[];
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 B

View File

Before

Width:  |  Height:  |  Size: 640 B

After

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 564 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 537 B

View File

Before

Width:  |  Height:  |  Size: 520 B

After

Width:  |  Height:  |  Size: 520 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 513 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 662 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 450 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 384 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 562 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

View File

Before

Width:  |  Height:  |  Size: 630 B

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

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