提交 4d8668b0 编写于 作者: A april
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.
MIT License
Copyright (c) 2021-present 有来开源组织
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.
......@@ -22,39 +22,41 @@
- 提供了配套的 Java 后端接口,真实的接口数据,而非使用 Mock 数据。您可以访问在[线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5)查看接口详情。
- 权限系统功能齐全,包括用户管理、角色管理、菜单管理、字典管理和部门管理等,以满足您对权限管理的需求。
- 项目还提供了基础设施支持,包括动态路由、按钮级别的权限控制、国际化支持、代码规范、Git 提交规范以及常用组件的封装,以便开发人员更高效地开发和维护项目。
## 项目预览
- **在线预览**[https://vue3.youlai.tech/](https://vue3.youlai.tech/)
- **控制台**
![暗黑模式](https://s2.loli.net/2023/03/13/QvjY4zf3VCGteNF.png)
![暗黑模式](https://foruda.gitee.com/images/1687755822903300961/a4d63e22_716974.png)
- **接口文档**
![接口文档](https://s2.loli.net/2023/03/13/bH4J3O6WRgCUpwt.png)
![接口文档](https://foruda.gitee.com/images/1687755822857820115/96054330_716974.png)
- **权限管理系统**
| ![用户管理](https://s2.loli.net/2023/03/13/L9xgT5sSMVZukQj.png) | ![image-20230313003008012](https://s2.loli.net/2023/03/13/nQg6HmrtFUkPDYv.png) |
| --- | --- |
| ![image-20230313003028425](https://s2.loli.net/2023/03/13/C4fDRJeTuUO7gPI.png) | ![字典管理](https://s2.loli.net/2023/03/13/BzqjHpa64wfeWhE.png) |
|![在这里插入图片描述](https://foruda.gitee.com/images/1687755822816437081/b7620905_716974.png) | ![角色管理](https://foruda.gitee.com/images/1687755822852085747/c13a4d19_716974.png) |
| ------------------------------------------------------ | ------------------------------------------------------ |
| ![菜单管理](https://foruda.gitee.com/images/1687755822966247550/4d4f8118_716974.png) | ![在这里插入图片描述](https://foruda.gitee.com/images/1687755822828758939/8035a91f_716974.png)
## 项目地址
| 项目 | Gitee | Github |GitCode |
| --- | --- | --- | --- |
| 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) |[vue3-element-admin](https://gitcode.net/youlai/vue3-element-admin)|
| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) |[youlai-boot](https://gitcode.net/youlai/youlai-boot)|
| 项目 | Gitee | Github | GitCode |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| 前端 | [vue3-element-admin](https://gitee.com/youlaiorg/vue3-element-admin) | [vue3-element-admin](https://github.com/youlaitech/vue3-element-admin) | [vue3-element-admin](https://gitcode.net/youlai/vue3-element-admin) |
| 后端 | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) | [youlai-boot](https://gitcode.net/youlai/youlai-boot) |
## 环境准备
| 环境 | 名称版本 | 备注 |
| ----------- | :-------- | --------------|
| **开发工具** | VSCode | [下载地址](https://code.visualstudio.com/Download) |
| **运行环境** | Node 16+ | [下载地址](http://nodejs.cn/download) |
| **VSCode插件(必装)** | 1. `Vue Language Features (Volar) ` <br/> 2. `TypeScript Vue Plugin (Volar) ` <br/>3. 禁用 Vetur | ![image-20230224222541797](https://s2.loli.net/2023/02/24/Qt4XDGHFOWqfsyB.png) |
| 环境 | 名称版本 | 备注 |
| -------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ |
| **开发工具** | VSCode | [下载地址](https://code.visualstudio.com/Download) |
| **运行环境** | Node 16+ | [下载地址](http://nodejs.cn/download) |
| **VSCode插件(必装)** | 1. `Vue Language Features (Volar) ` <br/> 2. `TypeScript Vue Plugin (Volar) ` <br/>3. 禁用 Vetur | ![vscode-plugin](https://foruda.gitee.com/images/1687755823108948048/d0198b2d_716974.png) |
## 项目启动
......@@ -63,6 +65,9 @@
# 克隆代码
git clone https://gitee.com/youlaiorg/vue3-element-admin.git
# 切换目录
cd vue3-element-admin
# 安装 pnpm
npm install pnpm -g
......@@ -105,7 +110,7 @@ server {
模板项目的组件类型声明已自动生成。如果添加和使用新的组件,请按照图示方法开启自动生成。在自动生成完成后,记得将其设置为 `false`,避免重复执行引发冲突。
![](https://s2.loli.net/2023/06/03/lrcsHzInYV6wWqo.png)
![](https://foruda.gitee.com/images/1687755823137387608/412ea803_716974.png)
- **项目启动浏览器访问空白**
......@@ -114,7 +119,7 @@ server {
- **项目同步仓库更新升级**
项目同步仓库更新升级之后,建议 `pnpm install` 安装更新依赖之后启动 。
- **其他问题**
如果有其他问题或者建议,建议 [ISSUE](https://gitee.com/youlaiorg/vue3-element-admin/issues/new)
......@@ -122,13 +127,16 @@ server {
## 接口支持
- **接口调用地址**[https://vapi.youlai.tech](https://vapi.youlai.tech)
- **接口文档地址**[在线接口文档](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5)
- **OpenAPI文档地址**[http://vapi.youlai.tech/v3/api-docs](http://vapi.youlai.tech/v3/api-docs)
- **本地接口**:默认使用线上接口,你可以通过以下步骤完成本地接口环境搭建:
> 1. 获取基于 `Java 、SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码 ;
>2. 根据后端工程说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动;
> 3. 替换 [vite.config.ts](vite.config.ts) 的代理目标地址 `vapi.youlai.tech` 为本地的 `localhost:8989`
> 1. 获取基于 `Java 、SpringBoot` 开发的后端 [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git) 源码 ;
> 2. 根据后端工程说明文档 [README.md](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C) 完成本地启动;
> 3. 替换 [vite.config.ts](vite.config.ts) 的代理目标地址 `vapi.youlai.tech` 为本地的 `localhost:8989`
......@@ -146,17 +154,20 @@ server {
执行 `pnpm run commit` 唤起 git commit 交互,根据提示完成信息的输入和选择。
![](https://oss.youlai.tech/youlai-boot/2023/05/21/d9863c6ded9e4363824b0d8c4c1f0642.png)
![](https://foruda.gitee.com/images/1687755823165218215/c1705416_716974.png)
## 公众号🎉
> 无广告,佛系公众号,随缘更新开源组织成员技术分享,期待您的关注!
![](https://s2.loli.net/2023/05/28/JaG4L8ZHmkIgRQC.png)
## 交流群🚀
> 如果交流群的二维码过期,请加我微信,备注「前端」、「后端」或「全栈」即可,我将邀请您加入对应的微信群。
> 关注「有来技术」公众号,获取交流群二维码。
>
> 如果交流群的二维码过期,加我微信,备注「前端」、「后端」或「全栈」即可。
>
> 为了避免营销广告人群混入,此举无奈,望理解!
![](https://s2.loli.net/2023/05/28/7vNjHTotb2h9zBD.png)
| 公众号 | 交流群 |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| <img src="https://foruda.gitee.com/images/1687689212187063809/3c69eaee_716974.png" height="180px"/> | <img src="https://foruda.gitee.com/images/1687689212139273561/6a65ef69_716974.png" height="180px"/> |
MIT License
Copyright (c) 2017-present PanJiaChen
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.
\ No newline at end of file
MIT License
Copyright (c) 2021-present 有来开源组织
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.
import request from '@/utils/request';
import { AxiosPromise } from 'axios';
import { CaptchaResult, LoginData, LoginResult } from './types';
import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { CaptchaResult, LoginData, LoginResult } from "./types";
/**
* 登录API
......@@ -9,10 +9,18 @@ import { CaptchaResult, LoginData, LoginResult } from './types';
* @returns
*/
export function loginApi(data: LoginData): AxiosPromise<LoginResult> {
const formData = new FormData();
formData.append("username", data.username);
formData.append("password", data.password);
formData.append("verifyCodeKey", data.verifyCodeKey || "");
formData.append("verifyCode", data.verifyCode || "");
return request({
url: '/api/v1/auth/login',
method: 'post',
params: data
url: "/api/v1/auth/login",
method: "post",
data: formData,
headers: {
"Content-Type": "multipart/form-data",
},
});
}
......@@ -21,19 +29,17 @@ export function loginApi(data: LoginData): AxiosPromise<LoginResult> {
*/
export function logoutApi() {
return request({
url: '/api/v1/auth/logout',
method: 'delete'
url: "/api/v1/auth/logout",
method: "delete",
});
}
/**
* 获取验证码
*/
export function getCaptchaApi(): AxiosPromise<CaptchaResult> {
return request({
url: '/api/v1/auth/captcha',
method: 'get'
url: "/api/v1/auth/captcha",
method: "get",
});
}
......@@ -5,11 +5,11 @@ export interface LoginData {
/**
* 用户名
*/
username?: string;
username: string;
/**
* 密码
*/
password?: string;
password: string;
/**
* 验证码缓存key
......@@ -57,4 +57,3 @@ export interface CaptchaResult {
*/
verifyCodeBase64: string;
}
......@@ -121,7 +121,7 @@ orderCount.value = 2000;
</div>
<div class="flex flex-col space-y-3">
<div class="text-[var(--el-text-color-secondary)]">访问数</div>
<div class="text-lg">
<div class="text-lg text-right">
{{ Math.round(visitCountOutput) }}
</div>
</div>
......@@ -138,7 +138,7 @@ orderCount.value = 2000;
</div>
<div class="flex flex-col space-y-3">
<div class="text-[var(--el-text-color-secondary)]">消息数</div>
<div class="text-lg">
<div class="text-lg text-right">
{{ Math.round(messageCountOutput) }}
</div>
</div>
......@@ -169,7 +169,7 @@ orderCount.value = 2000;
</div>
<div class="flex flex-col space-y-3">
<div class="text-[var(--el-text-color-secondary)]">订单数</div>
<div class="text-lg">
<div class="text-lg text-right">
{{ Math.round(orderCountOutput) }}
</div>
</div>
......
......@@ -33,6 +33,7 @@ watch(
() => props.typeCode,
(newVal: string) => {
queryParams.typeCode = newVal;
formData.typeCode = newVal;
resetQuery();
}
);
......@@ -121,9 +122,9 @@ function openDialog(dictId?: number) {
* 字典表单提交
*/
function handleSubmit() {
loading.value = false;
dataFormRef.value.validate((isValid: boolean) => {
if (isValid) {
loading.value = false;
const dictId = formData.id;
if (dictId) {
updateDict(dictId, formData)
......
......@@ -96,9 +96,9 @@ function openDialog(dicTypeId?: number) {
* 字典类型表单提交
*/
function handleSubmit() {
loading.value = false;
dataFormRef.value.validate((isValid: boolean) => {
if (isValid) {
loading.value = false;
const dictTypeId = formData.id;
if (dictTypeId) {
updateDictType(dictTypeId, formData)
......@@ -166,11 +166,10 @@ const dictDataDialog = reactive<DialogOption>({
visible: false,
});
// 当前选中的字典类型
const selectedDictType = reactive({ typeCode: "", typeName: "" });
const selectedDictType = reactive({ typeCode: "", typeName: "" }); // 当前选中的字典类型
/**
* 打开字典弹窗
* 打开字典数据弹窗
*/
function openDictDialog(row: DictTypePageVO) {
dictDataDialog.visible = true;
......@@ -181,7 +180,7 @@ function openDictDialog(row: DictTypePageVO) {
}
/**
* 关闭字典弹窗
* 关闭字典数据弹窗
*/
function closeDictDialog() {
dictDataDialog.visible = false;
......
......@@ -111,9 +111,9 @@ function openDialog(roleId?: number) {
* 角色表单提交
*/
function handleSubmit() {
loading.value = true;
roleFormRef.value.validate((valid: any) => {
if (valid) {
loading.value = true;
const roleId = formData.id;
if (roleId) {
updateRole(roleId, formData)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册