Merge branch 'master' of https://github.com/youlaitech/vue3-element-admin
This commit is contained in:
commit
4d8668b047
42
LICENSE
42
LICENSE
|
|
@ -1,21 +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.
|
||||
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.
|
||||
|
|
|
|||
63
README.md
63
README.md
|
|
@ -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/)
|
||||
|
||||
- **控制台**
|
||||
|
||||

|
||||

|
||||
|
||||
- **接口文档**
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
- **权限管理系统**
|
||||
|
||||
|  |  |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
| |  |
|
||||
| ------------------------------------------------------ | ------------------------------------------------------ |
|
||||
|  | 
|
||||
|
||||
## 项目地址
|
||||
|
||||
| 项目 | 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 |  |
|
||||
| 环境 | 名称版本 | 备注 |
|
||||
| -------------------- | :----------------------------------------------------------- | ------------------------------------------------------------ |
|
||||
| **开发工具** | 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 |  |
|
||||
|
||||
|
||||
## 项目启动
|
||||
|
|
@ -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`,避免重复执行引发冲突。
|
||||
|
||||

|
||||

|
||||
|
||||
- **项目启动浏览器访问空白**
|
||||
|
||||
|
|
@ -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 交互,根据提示完成信息的输入和选择。
|
||||
|
||||

|
||||

|
||||
|
||||
## 公众号🎉
|
||||
|
||||
> 无广告,佛系公众号,随缘更新开源组织成员技术分享,期待您的关注!
|
||||
|
||||

|
||||
|
||||
## 交流群🚀
|
||||
|
||||
> 如果交流群的二维码过期,请加我微信,备注「前端」、「后端」或「全栈」即可,我将邀请您加入对应的微信群。
|
||||
> 关注「有来技术」公众号,获取交流群二维码。
|
||||
>
|
||||
> 如果交流群的二维码过期,加我微信,备注「前端」、「后端」或「全栈」即可。
|
||||
>
|
||||
> 为了避免营销广告人群混入,此举无奈,望理解!
|
||||
|
||||

|
||||
|
||||
| 公众号 | 交流群 |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| <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"/> |
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
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.
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
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.
|
||||
|
|
@ -48,14 +48,14 @@
|
|||
"axios": "^1.4.0",
|
||||
"codemirror": "^5.65.13",
|
||||
"echarts": "^5.2.2",
|
||||
"element-plus": "^2.3.6",
|
||||
"element-plus": "^2.3.7",
|
||||
"lodash-es": "^4.17.21",
|
||||
"nprogress": "^0.2.0",
|
||||
"path-browserify": "^1.0.1",
|
||||
"path-to-regexp": "^6.2.0",
|
||||
"pinia": "^2.0.33",
|
||||
"screenfull": "^6.0.0",
|
||||
"vue": "^3.3.1",
|
||||
"vue": "^3.3.4",
|
||||
"vue-i18n": "9.2.2",
|
||||
"vue-router": "^4.2.0",
|
||||
"xlsx": "^0.18.5"
|
||||
|
|
@ -98,7 +98,7 @@
|
|||
"unplugin-auto-import": "^0.15.3",
|
||||
"unplugin-icons": "^0.16.1",
|
||||
"unplugin-vue-components": "^0.24.1",
|
||||
"vite": "^4.3.5",
|
||||
"vite": "^4.4.2",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vue-tsc": "^1.6.5 "
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue