diff --git a/backend/dvadmin/system/fixtures/init_menu.json b/backend/dvadmin/system/fixtures/init_menu.json index dd220c1..6af8c62 100644 --- a/backend/dvadmin/system/fixtures/init_menu.json +++ b/backend/dvadmin/system/fixtures/init_menu.json @@ -1,13 +1,13 @@ [ { "name": "系统管理", - "icon": "cog", + "icon": "iconfont icon-xitongshezhi", "sort": 1, "is_link": false, "is_catalog": true, "web_path": "", - "component": "", - "component_name": "", + "component": "layout/routerView/parent", + "component_name": "menu", "status": true, "cache": false, "visible": true, @@ -15,17 +15,17 @@ "children": [ { "name": "菜单管理", - "icon": "navicon", + "icon": "iconfont icon-caidan", "sort": 1, "is_link": false, "is_catalog": false, "web_path": "/menu", - "component": "system/menu", + "component": "system/menu/index", "component_name": "menu", "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -72,7 +72,7 @@ "status": true, "cache": false, "visible": false, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -103,7 +103,7 @@ }, { "name": "部门管理", - "icon": "bank", + "icon": "ele-OfficeBuilding", "sort": 3, "is_link": false, "is_catalog": false, @@ -113,7 +113,7 @@ "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -150,7 +150,7 @@ }, { "name": "角色管理", - "icon": "address-book", + "icon": "ele-ColdDrink", "sort": 4, "is_link": false, "is_catalog": false, @@ -160,7 +160,7 @@ "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -203,7 +203,7 @@ }, { "name": "用户管理", - "icon": "users", + "icon": "iconfont icon-icon-", "sort": 6, "is_link": false, "is_catalog": false, @@ -213,7 +213,7 @@ "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -274,7 +274,7 @@ }, { "name": "消息中心", - "icon": "bullhorn", + "icon": "iconfont icon-xiaoxizhongxin", "sort": 7, "is_link": false, "is_catalog": false, @@ -284,7 +284,7 @@ "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -321,7 +321,7 @@ }, { "name": "接口白名单", - "icon": "compass", + "icon": "ele-SetUp", "sort": 8, "is_link": false, "is_catalog": false, @@ -331,7 +331,7 @@ "status": true, "cache": false, "visible": true, - "parent": 277, + "parent": 19, "children": [], "menu_button": [ { @@ -371,13 +371,13 @@ }, { "name": "常规配置", - "icon": "cogs", + "icon": "iconfont icon-configure", "sort": 2, "is_link": false, "is_catalog": true, "web_path": "", - "component": "", - "component_name": "", + "component": "layout/routerView/parent", + "component_name": "config", "status": true, "cache": false, "visible": true, @@ -385,7 +385,7 @@ "children": [ { "name": "系统配置", - "icon": "desktop", + "icon": "iconfont icon-system", "sort": 0, "is_link": false, "is_catalog": false, @@ -395,7 +395,7 @@ "status": true, "cache": false, "visible": true, - "parent": 285, + "parent": 27, "children": [], "menu_button": [ { @@ -432,7 +432,7 @@ }, { "name": "字典管理", - "icon": "book", + "icon": "iconfont icon-dict", "sort": 1, "is_link": false, "is_catalog": false, @@ -442,7 +442,7 @@ "status": true, "cache": false, "visible": true, - "parent": 285, + "parent": 27, "children": [], "menu_button": [ { @@ -479,7 +479,7 @@ }, { "name": "地区管理", - "icon": "map", + "icon": "iconfont icon-Area", "sort": 2, "is_link": false, "is_catalog": false, @@ -489,7 +489,7 @@ "status": true, "cache": false, "visible": true, - "parent": 285, + "parent": 27, "children": [], "menu_button": [ { @@ -526,7 +526,7 @@ }, { "name": "附件管理", - "icon": "file-text-o", + "icon": "iconfont icon-file", "sort": 3, "is_link": false, "is_catalog": false, @@ -536,7 +536,7 @@ "status": true, "cache": false, "visible": true, - "parent": 285, + "parent": 27, "children": [], "menu_button": [ { @@ -570,13 +570,13 @@ }, { "name": "日志管理", - "icon": "book", + "icon": "iconfont icon-rizhi", "sort": 3, "is_link": false, "is_catalog": true, - "web_path": "", - "component": "", - "component_name": "", + "web_path": "/log", + "component": "layout/routerView/parent", + "component_name": "log", "status": true, "cache": false, "visible": true, @@ -584,7 +584,7 @@ "children": [ { "name": "登录日志", - "icon": "file-text", + "icon": "iconfont icon-guanlidenglurizhi", "sort": 1, "is_link": false, "is_catalog": false, @@ -594,7 +594,7 @@ "status": true, "cache": false, "visible": true, - "parent": 290, + "parent": 32, "children": [], "menu_button": [ { @@ -613,7 +613,7 @@ }, { "name": "操作日志", - "icon": "file-code-o", + "icon": "iconfont icon-caozuorizhi", "sort": 2, "is_link": false, "is_catalog": false, @@ -623,7 +623,7 @@ "status": true, "cache": false, "visible": true, - "parent": 290, + "parent": 32, "children": [], "menu_button": [ { @@ -639,40 +639,8 @@ "method": 0 } ] - }, - { - "name": "前端错误日志", - "icon": "bug", - "sort": 4, - "is_link": false, - "is_catalog": false, - "web_path": "/frontendLog", - "component": "system/log/frontendLog/index", - "component_name": "frontendLog", - "status": true, - "cache": false, - "visible": true, - "parent": 290, - "children": [], - "menu_button": [] } ], "menu_button": [] - }, - { - "name": "DVAdmin官网", - "icon": "external-link", - "sort": 4, - "is_link": true, - "is_catalog": false, - "web_path": "https://django-vue-admin.com", - "component": "", - "component_name": "", - "status": true, - "cache": false, - "visible": true, - "parent": null, - "children": [], - "menu_button": [] } -] +] \ No newline at end of file diff --git a/web/CHANGELOG.md b/web/CHANGELOG.md deleted file mode 100644 index 0c212b2..0000000 --- a/web/CHANGELOG.md +++ /dev/null @@ -1,367 +0,0 @@ -# vue-next-admin 更新日志 - -🎉🎉🔥 `vue-next-admin` 基于 vue3.x 、Typescript、vite、Element plus 等,适配手机、平板、pc 的后台开源免费模板库(vue2.x 请切换 vue-prev-admin 分支) - -## 2.2.0 - -`2022.07.10` - -⚡⚡⚡ [/sec/stores/userInfo.ts](https://gitee.com/lyt-top/vue-next-admin/blob/master/src/stores/userInfo.ts) 下添加了 `getApiUserInfo` 接口模拟数据 `setTimeout` 为 3 秒 - -- 🌟 更新 依赖更新最新版本 -- 🐞 修复 [主界面重新授权按钮点击卡死不跳转登录界面#I5C3JS](https://gitee.com/lyt-top/vue-next-admin/issues/I5C3JS),感谢[@Hero-Typ](https://gitee.com/tian_yu_peng) -- 🐞 修复 编译警告[#I5CVSB](https://gitee.com/lyt-top/vue-next-admin/issues/I5CVSB),全局替换成 `:deep(attr)`,感谢[@Linvas](https://gitee.com/linvas)。参考文档:[vue3 sfc-style](https://v3.cn.vuejs.org/api/sfc-style.html#style-scoped)。`node_modules\print-js\dist\print.js` 需 `print-js` 作者适配或去除 `package.json` 中的 `"print-js": "^1.6.0"` -- 🐞 修复 [vue-next-admin-template-js 版本前端控制路由:userInfo.js 请求用户信息接口报错,加载不到路由 可以写个定时器模拟一下接口 一样的报错#I5F1HP](https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP),感谢[@白开水](https://gitee.com/libin951223) - -## 2.1.1 - -`2022.05.27` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 深色模式下,`` 时,`:active` 样式 -- 🎯 优化 [页面缓存在刷新之后失效 #I58U75](https://gitee.com/lyt-top/vue-next-admin/issues/I58U75)),感谢[@ls0428](https://gitee.com/ls0428) -- 🎯 优化 [SvgIcon 对下载的 Svg 图像设置颜色无效 #I59ND0](https://gitee.com/lyt-top/vue-next-admin/issues/I59ND0)),感谢[@elus_z](https://gitee.com/elus_z) -- 🎯 优化 `/src/utils/toolsValidate.ts` 工具类 -- 🐞 修复 [布局切换,TagsView 显示的 tab 会多一个出来 #I58WGM](https://gitee.com/lyt-top/vue-next-admin/issues/I58WGM),感谢[@lg_boy](https://gitee.com/lg_boy) -- 🐞 修复 [如果设置顶部面包屑导航开启图标 isBreadcrumbIcon=true 后,样式有点问题 如果不开启就是正常的 #I58VB8](https://gitee.com/lyt-top/vue-next-admin/issues/I58VB8) -- 🐞 修复 地址栏路由地址输入错误时,返回首页后,再次输入路由地址错误时,不跳转 404 问题 -- 🐞 修复 [2.1.0 版本的图标选择组件多次点击后功能失效 #I590TH](https://gitee.com/lyt-top/vue-next-admin/issues/I590TH),感谢[@quber](https://gitee.com/quber) - -## 2.1.0 - -`2022.04.18` - -⚡⚡⚡ 此版本为破环性更新,优化内容如下:(谨慎更新!谨慎更新!!谨慎更新!!!)。因为 `vuex` 替换成 `pinia` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 部分界面图片不显示问题(更换 gitee 在线图片地址源) -- 🎯 优化 各界面方法引入与逻辑之间添加一行空行,方便区分内容 -- 🎯 优化 图标选择器 [#I4YAHB](https://gitee.com/lyt-top/vue-next-admin/issues/I4YAHB),感谢[@真有你的](https://gitee.com/sunliusen) -- 🎯 优化 图标选择器 icon type 类型为 all 时,类型 ali、ele、awe 回显问题 -- 🎯 优化 去掉开发环境 i18n 控制台警告,页面代码:[i18n/index.ts](https://gitee.com/lyt-top/vue-next-admin/blob/master/src/i18n/index.ts) -- 🎯 优化 `NextLoading.start()` 方法,防止第一次进入界面时出现短暂空白 -- 🎯 优化 地址栏有参数退出登录,再次登录不跳之前界面问题 `src/layout/navBars/breadcrumb/user.vue` -- 🎯 优化 `SvgIcon` 组件,防止 `开启 Tagsview 图标` 时,`tagsView 右键菜单关闭` 报错问题,工作流不可连线、全屏时关闭按钮消失问题 -- 🎯 优化 [如果 url 中有中文等特殊字符,第一次切换该 tab 时 keep-alive 失效#I55JS7](https://gitee.com/lyt-top/vue-next-admin/issues/I55JS7),感谢[yuyong1566](https://gitee.com/yuyong1566) -- 🎯 优化 [wangEditor](https://www.wangeditor.com/) 更新到 v5,[vue3 版本线上示例中 wangeditor 富文本编辑器 demo 实例,无法换行#I5565B](https://gitee.com/lyt-top/vue-next-admin/issues/I5565B),感谢@[jenchih](https://gitee.com/jenchih) -- 🎯 优化 [在关闭 tagview 时,高度刷新时会会变化,出现滚动条](https://gitee.com/lyt-top/vue-next-admin/issues/I55FHM),感谢[张松](https://gitee.com/zs310071113) -- 🎯 优化 [路由参数](https://lyt-top.gitee.io/vue-next-admin-preview/#/params/common)演示 -- 🎉 新增 [vuex](https://vuex.vuejs.org/) 替换成 [pinia](https://pinia.vuejs.org/getting-started.html) -- 🎉 新增 tagsView 支持自定义 tagsView 名称(文章详情时有用),前往体验:[路由参数/普通路由](https://lyt-top.gitee.io/vue-next-admin-preview/#/params/common)。新增 tagsView 支持自定义名称国际化,感谢[@q7but](https://gitee.com/q7but)、[!22 add 添加自定义 tagVIewName 拓展,支持国际化](https://gitee.com/lyt-top/vue-next-admin/pulls/22/files)、感谢[@tony_tong_xin](https://gitee.com/tony_tong_xin) -- 🐞 修复 适配 `"element-plus": "^2.1.9",2.2.0` 版本 -- 🐞 修复 [导航栏横向布局后,一级菜单显示问题#I4Z3M3](https://gitee.com/lyt-top/vue-next-admin/issues/I4Z3M3) -- 🐞 修复 横向布局三级及以上导航菜单高亮、导航高度不统一问题 -- 🐞 修复 分栏模式下,选中的菜单是 primary 样式,鼠标移入字也变成 primary 色了,感谢群友@孤夜-流殇 -- 🐞 修复 [vuex 里面改了颜色 但是不生效 #I4WFMA](https://gitee.com/lyt-top/vue-next-admin/issues/I4WFMA) -- 🐞 修复 全局主题 primary 清空颜色后报错,[#I4X0LG](https://gitee.com/lyt-top/vue-next-admin/issues/I4X0LG),感谢[面向 BUG 编程](https://gitee.com/fhtfy) -- 🐞 修复 [.eslintrc.js 文件 rules 标签名错误 #I53IPK](https://gitee.com/lyt-top/vue-next-admin/issues/I53IPK),感谢[yuyong1566](https://gitee.com/yuyong1566) -- 🐞 修复 `开启 Tagsview 图标` 时,`tagsView 右键菜单关闭` 报错问题 -- 🐞 修复 `router.push` 路径找不到时报错问题,`404、401 界面` 已移入到 `main` 主布局里(之前全屏) -- 🐞 修复 [全局修改组件大小失效了](https://gitee.com/lyt-top/vue-next-admin/issues/I551RP),感谢[lg_boy](https://gitee.com/lg_boy) -- 🐞 修复 [修改一下配置时,需要每次都清理 `window.localStorage` 浏览器永久缓存,配置才会生效,问题解决#I567R1](https://gitee.com/lyt-top/vue-next-admin/issues/I567R1),感谢[@lanbao123](https://gitee.com/lanbao123) -- 🐞 修复 [标记为需要缓存的 tab 页后,再次从左侧菜单打开,还是显示被缓存的页面内容#I4UY3G](https://gitee.com/lyt-top/vue-next-admin/issues/I4UY3G),感谢@axcc1234、特别感谢群友@华仔 -- 🌈 重构 路由(`/src/router/index.ts`)解决 No match found for location with path "xxx"(前端控制,后端控制未解决) 问题 - -## 2.0.2 - -`2022.03.04` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 Alert 提示添加边框 -- 🎯 优化 功能 / 数字滚动 演示界面 -- 🐞 修复 全局主题按钮颜色 :active 问题 -- 🐞 修复 Dropdown 下拉菜单样式问题 -- 🐞 修复 SvgIcon 图标组件动态切换时报警告问题,[SvgIcon 改变 name 时可能导致图像不显示](https://gitee.com/lyt-top/vue-next-admin/issues/I4VGE0),感谢@axcc1234 - -## 2.0.1 - -`2022.02.25` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 svgIcon 图标组件 -- 🎯 优化 vite.config.ts 打包,感谢群友@YourObjec -- 🐞 修复 tagViews 开启图标不显示问题(风格 5),感谢群友@坏人 -- 🐞 修复 [Element Plus 1.2.0-beta.6 以后的版本 el-table 在移动端无法左右滑动](https://gitee.com/lyt-top/vue-next-admin/issues/I4UPTP),感谢@YGDada - -## 2.0.0 - -`2022.02.21` - -⚡⚡⚡ 此版本为破环性更新,优化内容如下:(谨慎更新!谨慎更新!!谨慎更新!!!)。演示界面建议直接覆盖文件。如需使用之前版本,请前往[gitee 发行版](https://gitee.com/lyt-top/vue-next-admin/releases) 进行对应版本下载。基础版会基于 `master` 分支进行修改 - -- 🌟 更新 依赖更新最新版本 -- 🌟 更新 登录页、首页 -- 💔 移除 vue-web-screen-shot -- 💔 移除 城市多级联动,完整 json 数据请去 [vue-next-admin-images/menu](https://gitee.com/lyt-top/vue-next-admin-images/tree/master/menu) 仓库查看 -- 💔 移除 功能/echartsTree 树图 -- 💔 移除 其它设置/Tagsview 风格 2、Tagsview 风格 3 -- 💔 移除 功能/验证器 -- 🚧 调整 src/api 编写方式 -- 🚧 调整 自定义封装公用组件演示,更好的维护 -- 🎉 新增 Volar 支持,vs code 配置参考 [Vue Language Features (Volar)](https://lyt-top.gitee.io/vue-next-admin-doc-preview/home/vscode/) -- 🎉 新增 `SvgIcon` 支持本地 svg 图标使用 -- 🎉 新增 表单表格验证演示 -- 🎯 优化 全局主题(移除 success、info、warning、danger) -- 🎯 优化 工作流(开源) -- 🎯 优化 element plus svg 图标,`elementXXX` 改成 `ele-XXX` -- 🌈 重构 深色模式 -- 🌹 合并 [处理 parent 的 h100 由于外层有 min-height 导致失效的问题](https://gitee.com/lyt-top/vue-next-admin/pulls/20),感谢@MaxNull、@21030442-mao -- 🐞 修复 element plus 升级 `^1.3.0-beta.5` 后 组件 size 大小问题(大改:涉及布局、演示界面) -- 🐞 修复 vs code 使用 Vue Language Features (Volar) 插件 代码报红问题(可以把公用的 ts 类型定义封装起来公用) - -## 1.2.2 - -`2021.12.21` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 iframes 滚动条问题 -- 🎯 优化 部署后每次都要强制刷新清浏览器缓存问题 -- 🎉 新增 工具类百分比验证演示 -- 🐞 修复 [tag-view 标签右键会超出浏览器 #I4KN78](https://gitee.com/lyt-top/vue-next-admin/issues/I4KN78) - -## 1.2.1 - -`2021.12.12` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 cropper 裁剪时卡顿问题 [#I4M2VQ](https://gitee.com/lyt-top/vue-next-admin/issues/I4M2VQ) -- 🎯 优化 Wangeditor 富文本编辑器的问题 [#I4LPC1](https://gitee.com/lyt-top/vue-next-admin/issues/I4LPC1)、[#I4LM7I](https://gitee.com/lyt-top/vue-next-admin/issues/I4LM7I) -- 🐞 修复 浏览器标题问题 -- 🐞 修复 element plus svg 图标引入 -- 🐞 修复 工作流不可以拖线连接问题 - -## 1.2.0 - -`2021.11.28` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 深色模式 -- 🎯 优化 `/@/utils` 文件夹,合并删除单一内容 -- 🎯 优化 系统设置:菜单管理(新增、修改)、角色管理(新增菜单权限)、用户管理、部门管理、字典管理 -- 🎯 优化 登录界面逻辑、权限管理逻辑 -- 🎯 优化 同步 [vue-next-admin-images](https://gitee.com/lyt-top/vue-next-admin-images/tree/master/menu) 后端控制菜单模拟数据 -- 🎉 新增 适配 Font Icon 向 SVG Icon 迁移(改动大,"element-plus": "^1.2.0-beta.4" 谨慎更新) -- 🐞 修复 热更新问题,感谢@甜蜜蜜 -- 🐞 修复 页面/element 字体图标演示 -- 🐞 修复 功能/图标选择器演示,新增高级功能 [issues #I4GJXQ](https://gitee.com/lyt-top/vue-next-admin/issues/I4GJXQ) - -## 1.1.2 - -`2021.10.17` - -- 🌟 更新 依赖更新最新版本 -- 🐞 修复 开启全屏时,刷新界面被还原成未全屏的状态 -- 🎯 优化 tagsView 右键菜单关闭逻辑 -- 🎯 优化 wangeditor 富文本编辑器(增加双向绑定) -- 🎉 新增 工作流(暂不开源) -- 🎉 新增 基础版 ts(不带国际化),切换 `vue-next-admin-template` 分支 - -## 1.1.1 - -`2021.09.25` - -- 🌟 更新 依赖更新最新版本(`"element-plus": "^1.1.0-beta.13"` 版本运行错误,`^1.1.0-beta.16`修复横向菜单卡死问题) -- 🐞 修复 Dialog 弹窗位置错误、Drawer 抽屉内边距、el-menu 菜单收起时背景色问题 -- 🎯 优化 锁屏界面自动锁屏(s/秒)必须设置至少 1 秒 -- 🎉 新增 分栏布局,鼠标移入当前项时,显示当前项菜单内容 -- 🎉 新增 工作流(未完成) - -## 1.1.0 - -`2021.09.10` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 小屏模式下登录页二维码遮挡标题问题 -- 🎉 新增 图片验证器 -- 🎉 新增 动态复杂表单 -- 🎉 新增 工作流(未完成) -- 🎉 新增 深色主题(伪深色,样式变动大,谨慎更新) - -## 1.0.18 - -`2021.08.29` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 权限组件去掉顶级 div(`/src/components/auth`) -- 🎉 新增 布局配置添加恢复默认按钮 -- 🐞 修复 升级 element plus 1.1.0-beta.7后项目无法启动、el-menu 菜单 -- 🐞 修复 表格固定列时的层级、设置了相对定位时,遮挡左侧导航菜单问题 - -## 1.0.17 - -`2021.08.22` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 去除设置布局切换,重置主题样式(initSetLayoutChange),切换布局需手动设置样式,设置的样式自动同步各布局 -- 🎯 优化 Dropdown 下拉菜单用户账号靠边时换行问题 -- 🎯 优化 左侧导航菜单,共用菜单树,防止 `布局配置` 设置 `菜单 / 顶栏` 时,样式丢失等问题 -- 🐞 修复 固定 header 后没有回到顶部的 bug,拉取项目后运行不起来的 bug。!14,感谢@wjs0509 -- 🐞 修复 tagView 右键全屏后,浏览器窗口大小发生任何变化都会导致左边菜单显示出来,并且可点击打开对应页面。I46E6T -- 🐞 修复 默认设置 `菜单 / 顶栏` 样式不生效问题(/@/src/store/modules/themeConfig.ts) - -## 1.0.16 - -`2021.08.14` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 菜单高亮(详情且详情设置了 meta.isHide 时,顶级菜单高亮),感谢群友@YourObject -- 🎯 优化 详情路径写法:如父级(/pages/filtering),那么详情为(/pages/filtering/details?id=1)。这样写可实现(详情时,父级菜单高亮),否则写成(/pages/filteringDetails?id=1)顶级菜单将不会高亮。可参考:`页面/过滤筛选组件`,点击当前图片进行测试 -- 🎯 优化 tagsView 右键菜单全屏时,打开的界面高度问题 -- 🎯 优化 图表批量 resize 问题 -- 🐞 修复 菜单收起时(设置全局主题:primary 且有二级菜单时),文字高亮颜色不对 -- 🐞 修复 国际化 #I43NPE。可参考:`页面/过滤筛选组件`,点击顶部语言切换,进行底部分页国际化查看 - -## 1.0.15 - -`2021.08.06` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 tagsView 右键菜单点击时的字段名(id 已修改成 contextMenuClickId)与路由中返回的 id 名冲突问题,感谢群友@伯牙已遇钟子期 -- 🎉 新增 多个 form 表单验证界面演示 - -## 1.0.14 - -`2021.07.29` - -- 🌟 更新 依赖更新最新版本(vue、vuex、vue-router),出现问题,请手动降级。版本查看:vnpm -- 🎯 优化 数据可视化图表演示加载卡顿问题、优化有图表的演示界面 -- 🎯 优化 路由参数演示界面 -- 🎯 优化 tagsView 操作演示界面,由于存在相同路由多标签,必须要传全部参数值(query 或者 params) -- 🎉 新增 开启 TagsView 共用,开启时:(多个路由菜单共用一个详情组件(参数为后点击的覆盖前面点击的),tagsView 中只会出现一个(不支持同时出现多个 tagsView 标签))。关闭时:(多个路由菜单共用一个详情组件,参数不同,会同时出现多个 tagsView 标签) -- 🐞 修复 tagsView 共用(单标签)时,右键菜单功能点击,参数不对的问题(第 2n+个参数未覆盖第一个参数值) -- 🐞 修复 多 tagsView 标签(参数不同)、单个 tagsView 标签公用(参数不同)所带来的刷新功能、横向自动滚动等问题 -- 🐞 修复 处理全屏若干问题,pr!12,感谢群友@另一个前端 - -## 1.0.13 - -`2021.07.25` - -- 🌟 更新 依赖更新最新版本 -- 🎉 新增 数据可视化演示界面(/visualizingDemo1、/visualizingDemo2) -- 🎉 新增 登录页扫码登录 - -## 1.0.12 - -`2021.07.16` - -- 🌟 更新 依赖更新最新版本 -- 🎉 新增 数据可视化演示空界面(待完善) -- 🎯 优化 tagsView 动态路由(xxx/:id/:name)时的右键菜单刷新、关闭其它时参数丢失问题(2021.07.15 优化) -- 🐞 修复 路由带参数时,复制路径到登录页,跳转后参数消失的问题 -- 🐞 修复 设置多个外链,点击后,页面内容停留在上一个内容(内容未改变)、国际化处理、打开新窗口 sessionStorage 共享等 - -## 1.0.11 - -`2021.07.14` - -- 🌟 更新 依赖更新最新版本 -- 🎉 新增 路由参数、图片懒加载界面演示 -- ⚠️ 警告 Form 表单 `binding value must be a string or number`,解决:加上 `label-position="top"` 不报警告(等待官方修复) -- 🎯 优化 锁屏界面动画效果、首页图表显示 -- 🎯 优化 tagsView 右键菜单 `关闭` 功能逻辑 -- 🐞 修复 开启 TagsView 拖拽报错及小于 `1000px` 时自动设置禁止拖拽(#I3ZRRI) -- 🐞 修复 `iframe 内嵌、外链` 高度问题,使用 computed 进行计算 -- 🐞 修复 默认布局开启 `侧边栏 Logo` 与关闭 `菜单水平折叠`,切换到横向布局时,菜单看不见的问题 -- 🐞 修复 切换不同布局时,再去开启 `经典布局分割菜单` 功能不生效问题 -- 🐞 修复 浏览器窗口标题中/英文切换不实时生效的问题 -- 🐞 修复 切换布局时,某些功能不可以使用。部分界面不需要取消事件监听(proxy.mittBus.off('xxx')) -- 🐞 修复 动态路由带参数,router-link 跳转问题(#I3YX6G) -- 🐞 修复 横向菜单有二级菜单时,点击子级菜单不高亮问题 -- 🐞 修复 功能 tagsView 操作演示不生效 - -## 1.0.10 - -`2021.07.07` - -- 🌟 更新 依赖更新最新版本(字体图标无问题) -- 🎯 优化 内嵌 iframe、外链,解决 tagsView 刷新问题 - -## 1.0.9 - -`2021.07.02` - -- 🌟 更新 依赖更新最新版本 -- 🎯 优化 图标选择器设置宽度、v-model 等问题 -- 🎯 优化 滚动通知栏在手机上的体验 -- 🎯 优化 系统管理/新增菜单(编辑菜单),使用 `图标选择器` 进行模拟 -- 🎯 优化 字体图标(自动载入) 逻辑 -- 🐞 修复 screenfull 全屏时,按键盘 esc 键图标不改变问题,感谢群友@伯牙已遇钟子期 - -## 1.0.8 - -`2021.06.29` - -- 🌟 更新 依赖更新最新版本 -- 🎉 新增 表单中英文切换演示 -- 🎯 优化 登录页查看密码 icon 图标 -- 🎯 优化 图标选择器 -- 🎯 优化 拖动指令 -- 🐞 修复 form 表单在页面小于 576px 时的排版问题 - -## 1.0.7 - -`2021.06.24` - -- 🌟 更新 依赖更新最新版本 -- 🎉 新增 拖动指令及其演示界面 -- 🎯 优化 锁屏界面,解锁提示 -- 🎯 优化 登录页在手机上显示的效果 - -## 1.0.6 - -`2021.06.23` - -- 🎯 优化 去掉内嵌 iframe 内边距(padding) -- 🎯 优化 城市多级联动组件 -- 🎯 优化 Tree 树形控件改成表格组件 -- 🐞 修复 Cascader 级联选择器高度问题 - -## 1.0.5 - -`2021.06.22` - -- 🌟 更新 vite 降级为@vite2.3.7,降级方法 `cnpm install vite@2.3.7`,防止 element plus 字体图标消失 -- 🐞 修复 开启后端控制路由(isRequestRoutes = true)时,内嵌 iframe、外链不可使用的问题 - -## 1.0.4 - -`2021.06.19` - -- 🌟 更新 依赖更新最新版本("vite": "^2.3.7")热更新无问题 -- 🎉 新增 深克隆工具,方便开发,感谢@kangert(#6) -- 🎯 优化 vuex 模块自动导入。感谢@kangert(#4),感谢群友@web 小学生-第五君 -- 🎯 优化 类型定义提高编码体验,修复不能将类型“string | undefined”分配给类型“string”的问题。感谢@kangert(#5) -- 🎯 优化 `layout` 文件夹移动到与 `views` 文件夹同级(改动较大,`/@/views/layout` 变成 `/@/layout`) -- 🎯 优化 页面有 `console.log` 时 `eslint` 不生效问题 -- 🎯 优化 页面、ts 中 `any` 类型问题(改动较大) -- 🎯 优化 登录页在手机上显示的效果 -- 🎯 优化 多行注释信息,鼠标放到方法名即可查看,更加直观的知道方法参数等。引入方法时需去掉以 `.ts` 结尾的后缀(改动较大) -- 🎯 优化 移除 `utils/storage.ts` 下的旧写法(改动较大) -- 🎯 优化 拆分 `router` 下内容,路由、前端、后端控制分开写,方便理解 -- 🐞 修复 鼠标移入顶部用户信息栏 `开/关全屏` 文字反向问题 -- 🐞 修复 热更新时,NextLoading(界面 loading) 不消失问题 `window.nextLoading === undefined` -- 🐞 修复 vuex 中不可以使用 `/@/api/xxx` 下的接口调用问题 - -## 1.0.3 - -`2021.06.02` - -- ❄️ 删除 G6 思维导图界面 -- 🌟 更新 手动更新 vue、vue-router、vuex 到最近最多人使用的版本,出现不可预测的问题请降低版本。版本查看:vue 版本查看 -- 🐞 修复 开启后端控制路由 `isRequestRoutes` 在非首页刷新页面后,回到首页的问题,感谢群友@伯牙已遇钟子期 - -## 1.0.2 - -`2021.06.01` - -- 🌟 更新 依赖更新最新版本 -- 🐞 修复 菜单搜索中文不可以搜索的问题,感谢群友@逍遥天意 - -## 1.0.1 - -`2021.05.31` - -- 🎉 新增 更新日志文件 `CHANGELOG.md`,以后每次更新都会在这里显示对应内容 -- 🌟 更新 依赖更新最新版本 -- 🐞 修复 分栏、经典布局路由设置 `meta.isHide` 为 `true` 时报错问题,感谢群友@29、@芭芭拉 -- 🐞 修复 经典布局点击 `tagsView` 左侧菜单数据不变问题 diff --git a/web/README.md b/web/README.md index 656ed9a..a9f11b3 100644 --- a/web/README.md +++ b/web/README.md @@ -1,44 +1,9 @@ -
- -

- - vue - - - element plus - - - typescript - - - vite - - - license - -

-

 

-
+
django-vue-admin:web
#### 🌈 介绍 基于 vue3.x + CompositionAPI + typescript + vite + element plus + vue-router-next + next.vuex,适配手机、平板、pc 的后台开源免费模板,希望减少工作量,帮助大家实现快速开发。 -#### ⛱️ 线上预览 - -- vue3.x 版本预览(vue-next-admin)https://lyt-top.gitee.io/vue-next-admin-preview/#/login -- vue2.x 版本预览(vue-prev-admin)https://lyt-top.gitee.io/vue-prev-admin-preview/#/login - -#### 💒 代码仓库 - -- vue3.x 版本 https://gitee.com/lyt-top/vue-next-admin -- vue2.x 版本 https://gitee.com/lyt-top/vue-next-admin/tree/vue-prev-admin - -#### 🚧 安装 cnpm、yarn - -- 复制代码(桌面 cmd 运行) `npm install -g cnpm --registry=https://registry.npm.taobao.org` -- 复制代码(桌面 cmd 运行) `npm install -g yarn` - #### 🏭 环境支持 | Edge | Firefox | Chrome | Safari | @@ -49,97 +14,19 @@ #### ⚡ 使用说明 -建议使用 cnpm,因为 yarn 有时会报错。node 版本 > 12xx.xx.x +建议使用 yarn,yarn 是一个类似于npm的包管理器 node 版本 > 16 ```bash -# 克隆项目 -git clone https://gitee.com/lyt-top/vue-next-admin.git # 进入项目 -cd vue-next-admin +cd django-vue-admin/web # 安装依赖 -cnpm install +yarn install # 运行项目 -cnpm run dev +yarn dev # 打包发布 -cnpm run build -``` - -#### 💯 学习交流加 QQ 群 - -- 若加群了没同意(一般秒过),那就是群满了(500 人群),请换一个群试试。群会定期清理半年(6 个月)未发言的群友,资源有限,请谅解。建议勿加多群,可能会误伤! -- 查看开发文档:vue-next-admin-doc -- 群号码: - 1 群:665452019 - 2 群:766356862 - 3 群:795345435 - 4 群:736626228 - - - vue-next-admin 讨论群1 - - - vue-next-admin 讨论群2 - - - vue-next-admin 讨论群3 - - - vue-next-admin 讨论群4 - - -#### 💒 集成后端 - -- @熊猫 PandaGoAdmin -- @甜蜜蜜 GoPro 平台 -- @甜蜜蜜 NiuPi 平台 -- @游子 GFast-V3 -- @diygw.com gw-ui-php -- @zsvg vboot-net -- @zsvg vboot-java -- @青红造了个白 buildadmin -- @Goodwell iotfast(一个开源的物联网平台) - -#### ❤️ 鸣谢列表 - -- vue -- vue-next -- element-ui -- element-plus -- vue-router-next -- vuex -- echarts -- axios -- clipboard -- countUp -- mitt -- nprogress -- screenfull -- sortablejs -- sass -- typescript -- vite -- wangeditor -- cropperjs -- qrcodejs -- print-js -- vue-grid-layout -- splitpanes -- jsplumb - -#### 💕 特别感谢 - -特别感谢老哥们的建议、指导与帮忙。谢谢! - -- @省长 -- @唐参 -- @川歌 -- @华仔 - -#### 💌 支持作者 - -如果觉得框架不错,或者已经在使用了,希望你可以去 Github 或者 -Gitee 帮我点个 ⭐ Star,这将是对我极大的鼓励与支持。 +yarn build +``` \ No newline at end of file diff --git a/web/index.html b/web/index.html index df7198a..339a572 100644 --- a/web/index.html +++ b/web/index.html @@ -4,13 +4,9 @@ - vue-next-admin diff --git a/web/package.json b/web/package.json index 2ba351e..9675d30 100644 --- a/web/package.json +++ b/web/package.json @@ -1,8 +1,7 @@ { - "name": "vue-next-admin", + "name": "django-vue-admin-web", "version": "2.2.0", - "description": "vue3 vite next admin template", - "author": "lyt_20201208", + "description": "django-vue-admin 全栈快速开发后台管理系统前端", "license": "MIT", "scripts": { "dev": "vite --force", @@ -76,14 +75,12 @@ "keywords": [ "vue", "vue3", - "vuejs/vue-next", - "element-ui", "element-plus", - "vue-next-admin", - "next-admin" + "django", + "django-restframework" ], "repository": { "type": "git", "url": "https://gitee.com/lyt-top/vue-next-admin.git" } -} +} \ No newline at end of file diff --git a/web/src/api/menu/index.ts b/web/src/api/menu/index.ts index 9c16bb7..c972f79 100644 --- a/web/src/api/menu/index.ts +++ b/web/src/api/menu/index.ts @@ -1,4 +1,4 @@ -import request from '/@/utils/request'; +import { request } from "/@/utils/service"; /** * 后端控制菜单模拟json,路径在 https://gitee.com/lyt-top/vue-next-admin-images/tree/master/menu @@ -8,6 +8,13 @@ import request from '/@/utils/request'; */ export function useMenuApi() { return { + getSystemMenu: (params?: object) => { + return request({ + url: '/api/system/menu/web_router/', + method: 'get', + params, + }); + }, getMenuAdmin: (params?: object) => { return request({ url: '/gitee/lyt-top/vue-next-admin-images/raw/master/menu/adminMenu.json', diff --git a/web/src/router/backEnd.ts b/web/src/router/backEnd.ts index c2c0add..f4f057c 100644 --- a/web/src/router/backEnd.ts +++ b/web/src/router/backEnd.ts @@ -10,6 +10,7 @@ import { formatTwoStageRoutes, formatFlatteningRoutes, router } from '/@/router/ import { useRoutesList } from '/@/stores/routesList'; import { useTagsViewRoutes } from '/@/stores/tagsViewRoutes'; import { useMenuApi } from '/@/api/menu/index'; +import { handleMenu } from '../utils/menu'; const menuApi = useMenuApi(); @@ -43,10 +44,9 @@ export async function initBackEndControlRoutes() { await useUserInfo().setUserInfos(); // 获取路由菜单数据 const res = await getBackEndControlRoutes(); - // 存储接口原始路由(未处理component),根据需求选择使用 - useRequestOldRoutes().setRequestOldRoutes(JSON.parse(JSON.stringify(res.data))); + // 处理路由(component),替换 dynamicRoutes(/@/router/route)第一个顶级 children 的路由 - dynamicRoutes[0].children = await backEndComponent(res.data); + dynamicRoutes[0].children = await backEndComponent(handleMenu(res.data)); // 添加动态路由 await setAddRoute(); // 设置路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组 @@ -102,14 +102,7 @@ export async function setAddRoute() { * @returns 返回后端路由菜单数据 */ export function getBackEndControlRoutes() { - // 模拟 admin 与 test - const stores = useUserInfo(pinia); - const { userInfos } = storeToRefs(stores); - const auth = userInfos.value.roles[0]; - // 管理员 admin - if (auth === 'admin') return menuApi.getMenuAdmin(); - // 其它用户 test - else return menuApi.getMenuTest(); + return menuApi.getSystemMenu(); } /** diff --git a/web/src/router/route.ts b/web/src/router/route.ts index 748f3db..19dcd20 100644 --- a/web/src/router/route.ts +++ b/web/src/router/route.ts @@ -47,10 +47,10 @@ export const dynamicRoutes: Array = [ }, }, { - path: '/config', + path: '/system', name: 'system', component: () => import('/@/layout/routerView/parent.vue'), - redirect: '/system/menu', + redirect: '/system', meta: { title: 'message.router.system', isLink: '', diff --git a/web/src/stores/themeConfig.ts b/web/src/stores/themeConfig.ts index 02b0269..4be03f8 100644 --- a/web/src/stores/themeConfig.ts +++ b/web/src/stores/themeConfig.ts @@ -123,7 +123,7 @@ export const useThemeConfig = defineStore('themeConfig', { * 后端控制路由 */ // 是否开启后端控制路由 - isRequestRoutes: false, + isRequestRoutes: true, /** * 全局网站标题 / 副标题 diff --git a/web/src/utils/menu.ts b/web/src/utils/menu.ts new file mode 100644 index 0000000..c37dd98 --- /dev/null +++ b/web/src/utils/menu.ts @@ -0,0 +1,49 @@ +import XEUtils from "xe-utils" + +/** + * @description: 处理后端菜单数据格式 + * @param {Array} menuData + * @return {*} + */ +export const handleMenu = (menuData: Array) => { + // 先处理menu meta数据转换 + const handleMeta = (item: any) => { + item.meta = { + title: item.title, + isLink: item.is_link, + isHide: !item.visible, + isKeepAlive: true, + isAffix: false, + isIframe: false, + roles: ['admin'], + icon: item.icon + } + + return item + } + menuData.forEach((val) => { + handleMeta(val) + val.path = val.web_path + }) + + const data = XEUtils.toArrayTree(menuData, { + parentKey: 'parent', + strict: true, + }) + const menu = [ + { + path: '/home', name: 'home', component: '/system/home/index', meta: { + title: 'message.router.home', + isLink: '', + isHide: false, + isKeepAlive: true, + isAffix: true, + isIframe: false, + roles: ['admin'], + icon: 'iconfont icon-shouye' + } + }, + ...data + ] + return menu +} \ No newline at end of file diff --git a/web/src/utils/setIconfont.ts b/web/src/utils/setIconfont.ts index c005a8b..aa47104 100644 --- a/web/src/utils/setIconfont.ts +++ b/web/src/utils/setIconfont.ts @@ -1,7 +1,7 @@ // 字体图标 url const cssCdnUrlList: Array = [ '//at.alicdn.com/t/font_2298093_y6u00apwst.css', - '//at.alicdn.com/t/c/font_3882322_8vb7gh5lw4t.css', //dvadmin3项目用icon + '//at.alicdn.com/t/c/font_3882322_9ah7y8m9175.css', //dvadmin3项目用icon '//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css', ]; // 第三方 js url diff --git a/web/src/views/system/messageCenter/api.ts b/web/src/views/system/messageCenter/api.ts new file mode 100644 index 0000000..199acee --- /dev/null +++ b/web/src/views/system/messageCenter/api.ts @@ -0,0 +1,41 @@ +import { request } from '/@/utils/service'; +import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud'; + +export const apiPrefix = '/api/system/dept/'; +export function GetList(query: PageQuery) { + return request({ + url: apiPrefix, + method: 'get', + data: query, + }); +} +export function GetObj(id: InfoReq) { + return request({ + url: apiPrefix + id, + method: 'get', + }); +} + +export function AddObj(obj: AddReq) { + return request({ + url: apiPrefix, + method: 'post', + data: obj, + }); +} + +export function UpdateObj(obj: EditReq) { + return request({ + url: apiPrefix + obj.id + '/', + method: 'put', + data: obj, + }); +} + +export function DelObj(id: DelReq) { + return request({ + url: apiPrefix + id + '/', + method: 'delete', + data: { id }, + }); +} diff --git a/web/src/views/system/messageCenter/crud.tsx b/web/src/views/system/messageCenter/crud.tsx new file mode 100644 index 0000000..35d57b7 --- /dev/null +++ b/web/src/views/system/messageCenter/crud.tsx @@ -0,0 +1,51 @@ +import * as api from "./api"; +import { dict, PageQuery, AddReq, DelReq, EditReq, CrudExpose, CrudOptions, } from "@fast-crud/fast-crud"; +import { request } from "/@/utils/service"; +import { dictionary } from "/@/utils/dictionary"; +interface CreateCrudOptionsTypes { + crudOptions: CrudOptions; +} + +export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExpose }): CreateCrudOptionsTypes { + const pageRequest = async (query: PageQuery) => { + return await api.GetList(query); + }; + const editRequest = async ({ form, row }: EditReq) => { + form.id = row.id; + return await api.UpdateObj(form); + }; + const delRequest = async ({ row }: DelReq) => { + return await api.DelObj(row.id); + }; + const addRequest = async ({ form }: AddReq) => { + return await api.AddObj(form); + }; + return { + crudOptions: { + request: { + pageRequest, + addRequest, + editRequest, + delRequest + }, + columns: { + _index: { + title: '序号', + form: { show: false }, + column: { + //type: 'index', + align: 'center', + width: '70px', + columnSetDisabled: true, //禁止在列设置中选择 + formatter: (context) => { + //计算序号,你可以自定义计算规则,此处为翻页累加 + let index = context.index ?? 1; + let pagination = crudExpose.crudBinding.value.pagination; + return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1; + }, + }, + }, + } + }, + } +} diff --git a/web/src/views/system/messageCenter/index.vue b/web/src/views/system/messageCenter/index.vue new file mode 100644 index 0000000..1fa8634 --- /dev/null +++ b/web/src/views/system/messageCenter/index.vue @@ -0,0 +1,26 @@ + + +