1 Star 0 Fork 21

fengyunsen / fastapi-vue-admin

forked from Scilifen / fastapi-vue-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

fastapi-vue-admin

使用fastapi和vue-element-admin构建的管理后台

目前配置直接写在配置文件中,生产环境推荐使用Nacos作为配置中心

项目初始化

pip install -r requirements.txt -i  https://pypi.tuna.tsinghua.edu.cn/simple
windows下可能需要安装如下软件:
Micorosoft visio c++
https://go.microsoft.com/fwlink/?LinkId=691126
安装cryptography openssl报错:
下载安装https://slproweb.com/products/Win32OpenSSL.html
将安装后目录的include下的openssl目录复制到python的include目录下
将安装后目录中lib下的libcrypto.lib和libssl.lib复制到python的libs目录下
在安装mysqlclient时会出现报错,解决方法如下:
https://blog.csdn.net/alvechen/article/details/95040255

数据库初始化

数据库创建一个fast库,编码格式utf8mb4
数据库更新使用alembic
alembic init alembic
修改alembic的ini文件,将链接地址改为正确的
修改alembic env文件,添加如下内容
import os
import sys
# 把当前项目路径加入到path中
sys.path.append(os.path.dirname(os.path.dirname(__file__)))
from models.base import Base
target_metadata = Base.metadata
注释掉 target_metadata = None

生成执行文件
alembic revision --autogenerate -m "first commit"
alembic upgrade head

项目启动

python main.py

初始化数据

表结构创建完成后执行目录下的init.sql文件插入初始数据

查看项目swagger

访问http://localhost:端口号/docs即可

swagger

启动前端

cd front
npm install --registry=https://registry.npm.taobao.org
npm run dev

登陆页面

初始账户密码:admin/123456 login

主页

dashboard

用户管理

users

edit_user

add_user

角色管理

role

edit_role_user

授权每个角色拥有的菜单 edit_role_menu

授权每个角色的接口访问权限 edit_role_perm

权限管理

需要授权的接口 perm

菜单管理

menu

操作记录

record

cmdb模型管理

cmdb_List

cmdb新增模型

cmdb_type_add

点击模型可以查看修改属性

cmdb模型属性

cmdb_type_item

cmdb实例管理

cmdb_instance

点击可以查看类型下所有录入实例

cmdb实例详情

cmdb_instance_detail

数据录入

cmdb_add_instance

可以通过Excel进行批量导入 cmdb_import

针对Linux服务器提供web terminal功能 cmdb_terminal terminal_detail

MIT License Copyright (c) 2020 mark.huang 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.

简介

Frontend Vue Backend FastAPI 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/fengyunsen/fastapi-vue-admin.git
git@gitee.com:fengyunsen/fastapi-vue-admin.git
fengyunsen
fastapi-vue-admin
fastapi-vue-admin
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891