重新整合了项目结构
21
Dockerfile
@ -1,21 +0,0 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
FROM eclipse-temurin:17-jre-alpine
|
||||
|
||||
LABEL maintainer="platform-team"
|
||||
|
||||
ENV TZ=Asia/Shanghai \
|
||||
LANG=zh_CN.UTF-8 \
|
||||
JAVA_OPTS="-Dfile.encoding=UTF-8" \
|
||||
SPRING_PROFILES_ACTIVE=dev
|
||||
|
||||
RUN apk add --no-cache tzdata && \
|
||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 注意:在构建镜像前先执行 `mvn -DskipTests package` 生成 WAR
|
||||
COPY target/platform-1.0.war /app/app.war
|
||||
|
||||
EXPOSE 8093
|
||||
|
||||
ENTRYPOINT ["sh", "-c", "java $JAVA_OPTS -jar /app/app.war --spring.profiles.active=$SPRING_PROFILES_ACTIVE"]
|
||||
@ -1,52 +0,0 @@
|
||||
# 前后端一体化构建与打包说明
|
||||
|
||||
本文档说明如何在 Maven 构建流程中,先编译前端(pnpm),再编译后端(Java),并在 `package` 阶段将两者一起打包,使生成的可运行 `jar/war` 直接可以访问前端首页 `index.html`。
|
||||
|
||||
## 前置要求
|
||||
- 已安装 JDK(推荐 17+)和 Maven(3.6.3+)。
|
||||
- 已安装 Node.js(推荐 18+)与 pnpm(全局):`npm i -g pnpm`。
|
||||
- 当前项目结构:
|
||||
- 后端(Spring Boot):`app/pom.xml`,源码在 `app/src/main/java` 与资源在 `app/src/main/resources`。
|
||||
- 前端(Vite/Vue):位于 `app/frontend`,构建输出目录默认是 `app/frontend/dist`。
|
||||
|
||||
## 构建流程概览
|
||||
在 `pom.xml` 中集成了以下步骤:
|
||||
1. `generate-resources` 阶段:进入 `frontend` 目录,执行 `pnpm install --frozen-lockfile` 与 `pnpm run build`。
|
||||
2. `process-resources` 阶段:将前端构建产物从 `frontend/dist` 复制到后端资源目录 `src/main/resources/static`。
|
||||
3. 随后执行后端 Java 编译与打包,最终产出可运行的 `jar/war`。
|
||||
|
||||
这样在运行后端时,Spring Boot 会从类路径的 `static` 目录自动提供 `index.html` 作为欢迎页入口(访问根路径 `/` 即可看到前端页面)。
|
||||
|
||||
## 关键 POM 配置(摘要)
|
||||
已经在 `app/pom.xml` 的 `<build><plugins>` 中加入:
|
||||
- `exec-maven-plugin`:在 Java 编译前执行 pnpm 安装与构建。
|
||||
- `maven-resources-plugin`:复制前端构建产物到 `src/main/resources/static`。
|
||||
|
||||
无需手动改动目录,只需按下述命令执行即可。
|
||||
|
||||
## 常用命令
|
||||
- 开发运行(跳过测试):`mvn -DskipTests spring-boot:run`
|
||||
- 如需指定开发配置:`mvn -DskipTests -Dspring-boot.run.profiles=dev spring-boot:run`
|
||||
- 构建打包(跳过测试):`mvn -DskipTests package`
|
||||
- 构建过程中会自动执行前端构建并拷贝到后端资源。
|
||||
|
||||
## 运行与访问
|
||||
- 运行可执行包(以 `war` 为例,`artifactId=platform`,`version=1.0`):
|
||||
- 默认运行:`java -jar target/platform-1.0.war`
|
||||
- 指定 dev 配置:`java -Dspring.profiles.active=dev -jar target/platform-1.0.war`
|
||||
- 访问:
|
||||
- 若启用 `dev` 配置并端口为 `8093`:`http://localhost:8093/`
|
||||
- 若使用默认端口(例如 `18080`):`http://localhost:18080/`
|
||||
|
||||
> 说明:Spring Boot 会自动将 `classpath:/static/index.html` 作为欢迎页,访问根路径即可进入前端入口页面。
|
||||
|
||||
## 注意事项
|
||||
- 请确保 `pnpm` 可在构建机/开发机的环境变量中直接调用。
|
||||
- 若前端构建输出目录(`dist`)有自定义,请同步更新 POM 中的复制路径。
|
||||
- 如前端使用路由的 `history` 模式并期望后端兜底到 `index.html`,可按需添加后端控制器或使用前端服务器侧配置(当前方案以静态欢迎页为主)。
|
||||
|
||||
## 故障排查
|
||||
- 构建失败(找不到 `pnpm`):确认已安装并可在命令行执行 `pnpm -v`。
|
||||
- 页面乱码:已在 POM 配置统一 JVM 编码为 `UTF-8`;在 Windows PowerShell 终端也应设置为 `UTF-8`。
|
||||
|
||||
完成上述配置后,只需使用 Maven 的标准命令,即可实现前后端一体化构建和打包运行。
|
||||
161
docs/技术文档.md
@ -1,161 +0,0 @@
|
||||
# 项目技术文档
|
||||
|
||||
> 项目:ProjectFrameWork2025(模块:`app` / Java 后端)
|
||||
> 运行环境:Windows,Java 21(兼容 17+),Spring Boot 3.x
|
||||
|
||||
## 概述
|
||||
- 平台型后端服务,采用 `Spring Boot 3.x`,区分 `dev` / `server` 两种运行配置。
|
||||
- 数据访问使用 `MyBatis-Plus 3.5.6` 与 `MyBatis 3.5.16`,连接池为 `Druid`。
|
||||
- 任务调度使用 `Quartz 2.3.2`;API 文档采用 `springdoc-openapi` / Swagger UI。
|
||||
- 支持 WAR 包运行,亦可容器化部署;默认开发端口 `8093`(`server` 可使用 `8090`)。
|
||||
|
||||
## 目录结构
|
||||
- 仓库根(当前工作目录):`D:\Trae_space\ProjectFrameWork2025\app`
|
||||
- 主要结构:
|
||||
```
|
||||
app/
|
||||
├── .gitignore
|
||||
├── Dockerfile
|
||||
├── frontend/ # 前端说明或资源
|
||||
│ └── readme.md
|
||||
├── pom.xml # Maven 构建管理
|
||||
└── src/
|
||||
├── main/
|
||||
│ ├── java/ # 业务代码(入口类在 com.yfd.platform.*)
|
||||
│ └── resources/ # 配置与静态资源
|
||||
└── test/
|
||||
└── java/ # 测试代码
|
||||
```
|
||||
|
||||
## 快速开始
|
||||
- 前置要求:
|
||||
- 安装 `JDK 21`(兼容 17+),`Maven 3.9+`,`Git`。
|
||||
- Windows 终端执行 `chcp 65001`,确保 UTF-8 编码输出。
|
||||
- 构建后端:
|
||||
- `mvn clean package -DskipTests`
|
||||
- 本地运行(dev):
|
||||
- `java -jar target/platform-1.0.war --spring.profiles.active=dev`
|
||||
- 运行(server):
|
||||
- `java -jar target/platform-1.0.war --spring.profiles.active=server`
|
||||
- API 文档:
|
||||
- 默认访问 `http://localhost:8093/swagger-ui/index.html`(以实际配置为准)
|
||||
|
||||
## 配置说明
|
||||
- Profile 切换:
|
||||
- 通过 `--spring.profiles.active=<dev|server>` 激活环境。
|
||||
- 关键属性:
|
||||
- `file-space.system`:文件根路径,需在激活的 profile 中配置。
|
||||
- `spring.datasource.druid.*`:数据库连接参数与池化配置。
|
||||
- `server.port`:端口(`dev` 默认 8093,`server` 可使用 8090)。
|
||||
- VS Code/终端编码建议:
|
||||
- 启动参数加入 `-Dfile.encoding=UTF-8 -Dsun.jnu.encoding=UTF-8`。
|
||||
- 终端执行 `chcp 65001`,PowerShell 输出设置为 UTF-8。
|
||||
|
||||
## 依赖与版本
|
||||
- `Spring Boot 3.x`
|
||||
- `MyBatis-Plus 3.5.6`(依赖 `MyBatis 3.5.16+`,需有 `Configuration.parsePendingResultMaps(boolean)`)
|
||||
- `Druid` 数据源
|
||||
- `Quartz 2.3.2`
|
||||
- `springdoc-openapi` / Swagger UI
|
||||
- 日志:`Logback`(UTF-8 输出,`logback-spring.xml`)
|
||||
|
||||
## 数据库配置
|
||||
- MySQL 连接示例:
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
master:
|
||||
url: jdbc:mysql://<host>:3306/<db>?useUnicode=true&characterEncoding=UTF8&rewriteBatchedStatements=true&useSSL=false&allowPublicKeyRetrieval=true
|
||||
username: <user>
|
||||
password: <password>
|
||||
```
|
||||
- 远程授权建议:
|
||||
```sql
|
||||
CREATE USER 'appuser'@'%' IDENTIFIED BY 'StrongPassword!';
|
||||
GRANT ALL PRIVILEGES ON <db>.* TO 'appuser'@'%';
|
||||
FLUSH PRIVILEGES;
|
||||
```
|
||||
- Druid 健壮性:
|
||||
```yaml
|
||||
spring:
|
||||
datasource:
|
||||
druid:
|
||||
initial-size: 0
|
||||
test-on-borrow: false
|
||||
test-while-idle: true
|
||||
validation-query: SELECT 1
|
||||
```
|
||||
|
||||
## 日志
|
||||
- 控制台与文件统一 UTF-8 输出:
|
||||
- 控制台 `ConsoleAppender`,文件 `RollingFileAppender`(按日滚动,保留 30 天)。
|
||||
- 推荐日志格式:`%d [%thread] %-5level %logger{50} - %msg%n`。
|
||||
|
||||
## 定时任务
|
||||
- 默认 `RAMJobStore`(非集群、内存存储)。
|
||||
- 如需持久化与集群,改用 `JdbcJobStore` 并配置数据源与表结构。
|
||||
|
||||
## 安全与鉴权
|
||||
- 使用 `JWT` 过滤器进行鉴权(如 `jwtAuthenticationTokenFilter`)。
|
||||
- 敏感配置(`jwt.secret`、数据库密码)建议通过环境变量或外部密钥管理。
|
||||
- 生产环境必须启用 HTTPS 并使用强密钥。
|
||||
|
||||
## API 文档
|
||||
- 启用 `swagger-ui.enabled: true`。
|
||||
- 访问路径通常为 `http://<host>:<port>/swagger-ui/index.html`。
|
||||
|
||||
## Docker 部署
|
||||
- `Dockerfile` 已暴露端口 `8093`:
|
||||
- 构建镜像:`docker build -t projectframework2025-app:latest .`
|
||||
- 运行(开发环境):
|
||||
- `docker run -d --name platform-app -p 8093:8093 -e SPRING_PROFILES_ACTIVE=dev projectframework2025-app:latest`
|
||||
- 运行(服务器环境):
|
||||
- `docker run -d --name platform-app -p 8090:8090 -e SPRING_PROFILES_ACTIVE=server projectframework2025-app:latest`
|
||||
- 如需挂载文件空间:
|
||||
- `-v D:/data/file-space:/data/file-space -e FILE_SPACE_SYSTEM=/data/file-space`
|
||||
|
||||
## 前端
|
||||
- 前端说明见 `frontend/readme.md`。如需联调,请统一跨域与鉴权策略。
|
||||
|
||||
## Git 使用
|
||||
- 远程仓库:`http://121.37.111.42:3000/ThbTech/ProjectFrameWork2025.git`
|
||||
- 主分支:`main`
|
||||
- 常用命令:
|
||||
- `git pull`、`git add .`、`git commit -m "<message>"`、`git push`
|
||||
- 提交署名:
|
||||
- `git config user.name "<Your Name>"`
|
||||
- `git config user.email "<your@email>"`
|
||||
|
||||
## 常见问题
|
||||
- 中文乱码:
|
||||
- 执行 `chcp 65001`,确保 `logback-spring.xml` 使用 UTF-8。
|
||||
- `NoSuchMethodError`(MyBatis):
|
||||
- 升级 `MyBatis` 至 `3.5.16+` 并与 MP 版本匹配。
|
||||
- 数据库 `Access denied`:
|
||||
- 校验账户密码与远程授权;必要时新建业务账户并放开 `3306`。
|
||||
- 端口占用/启动失败:
|
||||
- 检查 `server.port` 与冲突端口;查看应用日志定位根因。
|
||||
|
||||
## 运维与监控
|
||||
- 建议接入 `Spring Boot Actuator`:`/actuator/health`。
|
||||
- 配合日志轮转与集中采集(ELK/Vector),区分环境日志路径。
|
||||
- 监控数据库与线程池指标(Druid/Quartz)。
|
||||
|
||||
## CI/CD 建议
|
||||
- 在 CI 阶段执行:
|
||||
- `mvn -B -DskipTests clean package`
|
||||
- 单元测试与安全扫描(依赖检查、代码质量)
|
||||
- 在 CD 阶段:
|
||||
- 推送镜像到私有仓库,环境变量注入敏感信息。
|
||||
|
||||
## 变更日志(示例模板)
|
||||
- `feat:` 新增功能说明
|
||||
- `fix:` 缺陷修复说明
|
||||
- `docs:` 文档更新说明
|
||||
- `refactor:` 重构说明
|
||||
- `perf:` 性能优化说明
|
||||
|
||||
---
|
||||
|
||||
如需扩展专题文档(接口规范、部署拓扑、参数字典等),建议在 `docs/` 目录继续维护并与版本管理同步。
|
||||
@ -1,15 +0,0 @@
|
||||
# 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
|
||||
@ -1,8 +0,0 @@
|
||||
## 开发环境
|
||||
|
||||
# 变量必须以 VITE_ 为前缀才能暴露给外部读取
|
||||
NODE_ENV='development'
|
||||
|
||||
VITE_APP_TITLE = '公司开发平台框架'
|
||||
VITE_APP_PORT = 3000
|
||||
VITE_APP_BASE_API = '/dev-api'
|
||||
@ -1,6 +0,0 @@
|
||||
## 生产环境
|
||||
NODE_ENV='production'
|
||||
|
||||
VITE_APP_TITLE = 'NewFrameWork2023-WEB'
|
||||
VITE_APP_PORT = 3000
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
@ -1,6 +0,0 @@
|
||||
## 模拟环境
|
||||
NODE_ENV='staging'
|
||||
|
||||
VITE_APP_TITLE = 'NewFrameWork2023-WEB'
|
||||
VITE_APP_PORT = 3000
|
||||
VITE_APP_BASE_API = '/prod--api'
|
||||
@ -1,16 +0,0 @@
|
||||
*.sh
|
||||
node_modules
|
||||
*.md
|
||||
*.woff
|
||||
*.ttf
|
||||
.vscode
|
||||
.idea
|
||||
dist
|
||||
/public
|
||||
/docs
|
||||
.husky
|
||||
.local
|
||||
/bin
|
||||
.eslintrc.js
|
||||
prettier.config.js
|
||||
src/assets
|
||||
@ -1,32 +0,0 @@
|
||||
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
frontend/.gitignore
vendored
@ -1,17 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
.vscode
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.local
|
||||
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
@ -1,3 +0,0 @@
|
||||
registry=https://registry.npmjs.org
|
||||
fetch-retries=5
|
||||
strict-peer-dependencies=false
|
||||
@ -1,9 +0,0 @@
|
||||
/dist/*
|
||||
.local
|
||||
.output.js
|
||||
/node_modules/**
|
||||
|
||||
**/*.svg
|
||||
**/*.sh
|
||||
|
||||
/public/*
|
||||
@ -1,36 +0,0 @@
|
||||
/**
|
||||
* 代码格式化配置
|
||||
*/
|
||||
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 \ avoid:x => 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'
|
||||
};
|
||||
@ -1,21 +0,0 @@
|
||||
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.
|
||||
@ -1,26 +0,0 @@
|
||||
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]
|
||||
}
|
||||
};
|
||||
@ -1,15 +0,0 @@
|
||||
<!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>
|
||||
@ -1,208 +0,0 @@
|
||||
{
|
||||
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]
|
||||
}
|
||||
@ -1,66 +0,0 @@
|
||||
{
|
||||
"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
|
||||
}
|
||||
@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
|
Before Width: | Height: | Size: 4.2 KiB |
@ -1 +0,0 @@
|
||||
这里放置前端项目的readme文件
|
||||
@ -1,11 +0,0 @@
|
||||
<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>
|
||||
@ -1,36 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
/**
|
||||
* 登录数据类型
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@ -1,139 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
/**
|
||||
* 部门查询参数
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@ -1,242 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,84 +0,0 @@
|
||||
/**
|
||||
* 字典查询参数
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
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 }
|
||||
});
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
/**
|
||||
* 文件API类型声明
|
||||
*/
|
||||
export interface FileInfo {
|
||||
name: string;
|
||||
url: string;
|
||||
}
|
||||
@ -1,159 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,105 +0,0 @@
|
||||
/**
|
||||
* 菜单查询参数类型声明
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
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
|
||||
});
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,196 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
/**
|
||||
* 角色查询参数类型
|
||||
*/
|
||||
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;
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
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
|
||||
});
|
||||
}
|
||||
@ -1,238 +0,0 @@
|
||||
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'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
/**
|
||||
* 登录用户信息
|
||||
*/
|
||||
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[];
|
||||
}
|
||||
|
Before Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 243 B |
|
Before Width: | Height: | Size: 189 B |
|
Before Width: | Height: | Size: 160 B |
|
Before Width: | Height: | Size: 253 B |
|
Before Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 528 B |
|
Before Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 640 B |
|
Before Width: | Height: | Size: 642 B |
|
Before Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 564 B |
|
Before Width: | Height: | Size: 537 B |
|
Before Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 527 B |
|
Before Width: | Height: | Size: 677 B |
|
Before Width: | Height: | Size: 655 B |
|
Before Width: | Height: | Size: 469 B |
|
Before Width: | Height: | Size: 462 B |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 385 B |
|
Before Width: | Height: | Size: 372 B |
|
Before Width: | Height: | Size: 289 B |
|
Before Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 313 B |
|
Before Width: | Height: | Size: 156 B |
|
Before Width: | Height: | Size: 401 B |
|
Before Width: | Height: | Size: 427 B |
|
Before Width: | Height: | Size: 223 B |
|
Before Width: | Height: | Size: 233 B |
|
Before Width: | Height: | Size: 513 B |
|
Before Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 662 B |
|
Before Width: | Height: | Size: 485 B |
|
Before Width: | Height: | Size: 448 B |
|
Before Width: | Height: | Size: 359 B |
|
Before Width: | Height: | Size: 173 B |
|
Before Width: | Height: | Size: 171 B |
|
Before Width: | Height: | Size: 162 B |
|
Before Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 460 B |
|
Before Width: | Height: | Size: 394 B |
|
Before Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 459 B |
|
Before Width: | Height: | Size: 450 B |
|
Before Width: | Height: | Size: 521 B |
|
Before Width: | Height: | Size: 425 B |
|
Before Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 490 B |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 238 B |
|
Before Width: | Height: | Size: 562 B |
|
Before Width: | Height: | Size: 652 B |
|
Before Width: | Height: | Size: 630 B |
|
Before Width: | Height: | Size: 200 B |