# 初始化
import datetime
import os
import django
from system.models import Dept, Menu, MenuButton, Role, Users, Dict, DictItem
from utils.core_initialize import CoreInitialize
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'application.settings')
django.setup()
class Initialize(CoreInitialize):
creator_id = 1
def init_dept(self):
"""
初始化部门信息
"""
self.dept_data = [
{
"id": 1,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": None,
"remark": None,
"name": "北京公司",
"sort": 1,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
},
{
"id": 2,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": None,
"remark": None,
"name": "大连公司",
"sort": 2,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
},
{
"id": 3,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 1,
"remark": None,
"name": "IT部门",
"sort": 1,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
},
{
"id": 4,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 1,
"remark": None,
"name": "财务部门",
"sort": 2,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
},
{
"id": 5,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 2,
"remark": None,
"name": "IT部门",
"sort": 1,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
},
{
"id": 6,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 2,
"remark": None,
"name": "财务部门",
"sort": 2,
"owner": None,
"phone": "13244724433",
"email": "[email protected]",
"status": 1,
}
]
self.save(Dept, self.dept_data, "部门信息")
def init_menu(self):
"""
初始化菜单表
"""
self.menu_data = [
{
"id": 1,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": None,
"sort": 2,
"icon": "ion:settings-outline",
"title": "系统管理",
"permission": None,
"is_ext": 0,
"type": 0,
"path": "/system",
"redirect": "/system/account",
"component": "LAYOUT",
"name": None,
"status": 1,
"keepalive": 0,
"hide_menu": 0,
},
{
"id": 2,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": None,
"sort": 3,
"icon": "ant-design:appstore-outlined",
"title": "系统工具",
"permission": None,
"is_ext": 0,
"type": 0,
"path": "/tool",
"redirect": None,
"component": "LAYOUT",
"name": None,
"status": 1,
"keepalive": 0,
"hide_menu": 0,
},
{
"id": 3,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": None,
"sort": 4,
"icon": "ant-design:code-filled",
"title": "日志管理",
"permission": None,
"is_ext": 0,
"type": 0,
"path": "/log",
"redirect": None,
"component": "LAYOUT",
"name": None,
"status": 1,
"keepalive": 0,
"hide_menu": 0,
},
{
"id": 4,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 1,
"sort": 1,
"icon": "ant-design:bars-outlined",
"title": "菜单管理",
"permission": None,
"is_ext": 0,
"type": 1,
"path": "menu",
"redirect": None,
"component": "/fuadmin/system/menu/index",
"name": "MenuManagement",
"status": 1,
"keepalive": 0,
"hide_menu": 0,
},
{
"id": 5,
"modifier": "超级管理员",
"belong_dept": None,
"creator_id": 1,
"update_datetime": datetime.datetime.now(),
"create_datetime": datetime.datetime.now(),
"parent_id": 1,
"sort": 2,
"icon": "ant-design:contacts-outlined",
"title": "岗位管理",
"permission": None,
"is_ext": 0,
"type": 1,
"path": "post",
"redirect": None,
"component": "/fuadmin/system/post/index",
"name": "PostManagement",
"status": 1,
"keepalive": 0,
"hide_menu": 0,
},
{
"id": 6,
"modifier": "超级管理员",
没有合适的资源?快使用搜索试试~ 我知道了~
基于Python和Vue3的后端管理系统设计源码
共1160个文件
ts:466个
vue:285个
svg:116个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 119 浏览量
2024-04-16
20:17:08
上传
评论
收藏 8.38MB ZIP 举报
温馨提示
本源码项目是基于Python和Vue3的后端管理系统设计,包含1153个文件,主要使用TypeScript、Vue、Python、CSS、JavaScript、Shell和HTML编程语言。该项目采用当前最流行的技术栈Vben、Vue3、Python、Django和Ninja(Fast Api和Django的结合)开发。系统提供了丰富的功能,包括用户管理、权限管理、数据管理、低代码平台等。通过该项目,开发者可以学习并实践Python和Vue3技术的集成,为后续的Web开发奠定基础。系统界面友好,易于操作,适合用于各类后端管理系统开发场景。
资源推荐
资源详情
资源评论
收起资源包目录
基于Python和Vue3的后端管理系统设计源码 (1160个子文件)
.env.analyze 515B
.browserslistrc 40B
CNAME 14B
commit-msg 145B
nginx.conf 1KB
nginx.conf 1KB
skin.min.css 60KB
skin.min.css 60KB
content.min.css 21KB
content.inline.min.css 21KB
content.inline.min.css 21KB
content.min.css 21KB
skin.mobile.min.css 21KB
skin.mobile.min.css 21KB
codemirror.css 9KB
entry.css 3KB
skin.shadowdom.min.css 783B
skin.shadowdom.min.css 783B
content.mobile.min.css 544B
content.mobile.min.css 544B
.env.development 251B
.env.docker 1KB
Dockerfile 1KB
Dockerfile 364B
Dockerfile 332B
Dockerfile 324B
.dockerignore 125B
.dockerignore 29B
.editorconfig 257B
.env 42B
.eslintignore 100B
.gitattributes 459B
.gitignore 1KB
.gitignore 357B
.gitignore 65B
.gitkeep 0B
.gitkeep 0B
index.html 4KB
favicon.ico 1KB
header.jpg 16KB
zh_CN.js 17KB
en.js 16KB
.commitlintrc.js 4KB
ecosystem.config.js 370B
.prettierrc.js 363B
.eslintrc.js 97B
.eslintrc.js 79B
.eslintrc.js 79B
.eslintrc.js 79B
.eslintrc.js 79B
.eslintrc.js 79B
.stylelintrc.js 75B
pca-code.json 135KB
china.json 68KB
demo.json 5KB
demo.json 5KB
package.json 5KB
sys.json 4KB
component.json 4KB
sys.json 4KB
component.json 3KB
layout.json 3KB
layout.json 3KB
package.json 1KB
package.json 1KB
package.json 1KB
import1.json 1024B
package.json 977B
package.json 833B
base.json 754B
package.json 696B
tsconfig.json 652B
package.json 543B
node-server.json 449B
common.json 385B
common.json 378B
turbo.json 297B
DatePicker.json 289B
public.json 255B
node.json 254B
vue-app.json 225B
tsconfig.json 161B
nodemon.json 137B
tsconfig.json 124B
tsconfig.json 124B
tsconfig.json 121B
tsconfig.json 121B
tsconfig.json 121B
dashboard.json 107B
dashboard.json 105B
basic.json 64B
basic.json 53B
btn.less 7KB
menu.less 6KB
color.less 4KB
drag.less 4KB
index.less 4KB
index.less 4KB
dark.less 3KB
index.less 2KB
共 1160 条
- 1
- 2
- 3
- 4
- 5
- 6
- 12
资源评论
沐知全栈开发
- 粉丝: 4771
- 资源: 3372
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功