diff --git a/Yi.BBS.Vue3/package-lock.json b/Yi.BBS.Vue3/package-lock.json index ced8372a..1b88bd6c 100644 --- a/Yi.BBS.Vue3/package-lock.json +++ b/Yi.BBS.Vue3/package-lock.json @@ -17,6 +17,7 @@ "nprogress": "^0.2.0", "pinia": "^2.0.32", "vue": "^3.2.47", + "vue-cropper": "1.0.3", "vue-router": "^4.1.6", "yarm": "^0.4.0" }, @@ -3645,6 +3646,11 @@ "@vue/shared": "3.2.47" } }, + "node_modules/vue-cropper": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/vue-cropper/-/vue-cropper-1.0.3.tgz", + "integrity": "sha512-yDrZkE4H5vOiMA9WQHE+6rmXrZ1S9TMZasEPAZPKg/2I/nySHL4ECD1lNxt7+ofTPKT+9+2sQkCwagPqEqiqJg==" + }, "node_modules/vue-router": { "version": "4.1.6", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.1.6.tgz", @@ -6615,6 +6621,11 @@ "@vue/shared": "3.2.47" } }, + "vue-cropper": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/vue-cropper/-/vue-cropper-1.0.3.tgz", + "integrity": "sha512-yDrZkE4H5vOiMA9WQHE+6rmXrZ1S9TMZasEPAZPKg/2I/nySHL4ECD1lNxt7+ofTPKT+9+2sQkCwagPqEqiqJg==" + }, "vue-router": { "version": "4.1.6", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.1.6.tgz", diff --git a/Yi.BBS.Vue3/package.json b/Yi.BBS.Vue3/package.json index 15f00bc4..331b5631 100644 --- a/Yi.BBS.Vue3/package.json +++ b/Yi.BBS.Vue3/package.json @@ -17,15 +17,16 @@ "nprogress": "^0.2.0", "pinia": "^2.0.32", "vue": "^3.2.47", + "vue-cropper": "1.0.3", "vue-router": "^4.1.6", "yarm": "^0.4.0" }, "devDependencies": { "@vitejs/plugin-vue": "^4.0.0", "copy-webpack-plugin": "^11.0.0", + "sass": "1.52.1", "unplugin-auto-import": "^0.15.0", "unplugin-vue-components": "^0.24.0", - "vite": "^4.1.3", - "sass": "1.52.1" + "vite": "^4.1.3" } } diff --git a/Yi.BBS.Vue3/src/apis/fileApi.js b/Yi.BBS.Vue3/src/apis/fileApi.js new file mode 100644 index 00000000..cb299f7a --- /dev/null +++ b/Yi.BBS.Vue3/src/apis/fileApi.js @@ -0,0 +1,9 @@ +import myaxios from '@/utils/request' +export function upload(data){ + return myaxios({ + url: '/file', + method: 'post', + data:data, + headers: { 'Content-Type': 'multipart/form-data' } + }) +}; diff --git a/Yi.BBS.Vue3/src/apis/userApi.js b/Yi.BBS.Vue3/src/apis/userApi.js new file mode 100644 index 00000000..5ccc3e39 --- /dev/null +++ b/Yi.BBS.Vue3/src/apis/userApi.js @@ -0,0 +1,139 @@ +import myaxios from '@/utils/request' + +// 查询用户列表 +export function listUser(query) { + return myaxios({ + url: '/user', + method: 'get', + params: query + }) +} + +// 查询用户详细 +export function getUser(userId) { + return myaxios({ + url: '/user/' + parseStrEmpty(userId), + method: 'get' + }) +} + +// 新增用户 +export function addUser(data) { + return myaxios({ + url: '/user', + method: 'post', + data: data + }) +} + +// 修改用户 +export function updateUser(id, data) { + return myaxios({ + url: `/user/${id}`, + method: 'put', + data: data + }) +} + +// 删除用户 +export function delUser(userId) { + return myaxios({ + url: `/user/${userId}`, + method: 'delete', + }) +} + +// 用户密码重置 +export function resetUserPwd(id, password) { + const data = { + password + } + + + return myaxios({ + url: `/account/rest-password/${id}`, + method: 'put', + data: data + }) +} + +// 用户状态修改 +export function changeUserStatus(userId, isDel) { + return myaxios({ + url: `/user/${userId}/${isDel}`, + method: 'put' + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return myaxios({ + url: '/account', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return myaxios({ + url: `/user/profile`, + method: 'put', + data: data + }) +} +// 只修改用户头像 +export function updateUserIcon(data) { + return myaxios({ + url: `/account/icon`, + method: 'put', + data:{icon:data} + }) +} + + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return myaxios({ + url: '/account/password', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return request({ + url: '/system/user/profile/avatar', + method: 'post', + data: data + }) +} + +// 查询授权角色 +export function getAuthRole(userId) { + return request({ + url: '/system/user/authRole/' + userId, + method: 'get' + }) +} + +// 保存授权角色 +export function updateAuthRole(data) { + return request({ + url: '/system/user/authRole', + method: 'put', + params: data + }) +} + +// // 查询部门下拉树结构 +// export function deptTreeSelect() { +// return request({ +// url: '/system/user/deptTree', +// method: 'get' +// }) +// } diff --git a/Yi.BBS.Vue3/src/assets/styles/index.scss b/Yi.BBS.Vue3/src/assets/styles/index.scss new file mode 100644 index 00000000..f9d0a723 --- /dev/null +++ b/Yi.BBS.Vue3/src/assets/styles/index.scss @@ -0,0 +1,190 @@ +// @import './variables.module.scss'; +// @import './mixin.scss'; +// @import './transition.scss'; +// @import './element-ui.scss'; +// @import './sidebar.scss'; +// @import './btn.scss'; +// @import './ruoyi.scss'; + +// body { +// height: 100%; +// margin: 0; +// -moz-osx-font-smoothing: grayscale; +// -webkit-font-smoothing: antialiased; +// text-rendering: optimizeLegibility; +// font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif; +// } + +// label { +// font-weight: 700; +// } + +// html { +// height: 100%; +// box-sizing: border-box; +// } + +// #app { +// height: 100%; +// } + +// *, +// *:before, +// *:after { +// box-sizing: inherit; +// } + +// .no-padding { +// padding: 0px !important; +// } + +// .padding-content { +// padding: 4px 0; +// } + +// a:focus, +// a:active { +// outline: none; +// } + +// a, +// a:focus, +// a:hover { +// cursor: pointer; +// color: inherit; +// text-decoration: none; +// } + +// div:focus { +// outline: none; +// } + +// .fr { +// float: right; +// } + +// .fl { +// float: left; +// } + +// .pr-5 { +// padding-right: 5px; +// } + +// .pl-5 { +// padding-left: 5px; +// } + +// .block { +// display: block; +// } + +// .pointer { +// cursor: pointer; +// } + +// .inlineBlock { +// display: block; +// } + +// .clearfix { +// &:after { +// visibility: hidden; +// display: block; +// font-size: 0; +// content: " "; +// clear: both; +// height: 0; +// } +// } + +// aside { +// background: #eef1f6; +// padding: 8px 24px; +// margin-bottom: 20px; +// border-radius: 2px; +// display: block; +// line-height: 32px; +// font-size: 16px; +// font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; +// color: #2c3e50; +// -webkit-font-smoothing: antialiased; +// -moz-osx-font-smoothing: grayscale; + +// a { +// color: #337ab7; +// cursor: pointer; + +// &:hover { +// color: rgb(32, 160, 255); +// } +// } +// } + + + +// .components-container { +// margin: 30px 50px; +// position: relative; +// } + +// .pagination-container { +// margin-top: 30px; +// } + +.text-center { + text-align: center +} + +// .sub-navbar { +// height: 50px; +// line-height: 50px; +// position: relative; +// width: 100%; +// text-align: right; +// padding-right: 20px; +// transition: 600ms ease position; +// background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%); + +// .subtitle { +// font-size: 20px; +// color: #fff; +// } + +// &.draft { +// background: #d0d0d0; +// } + +// &.deleted { +// background: #d0d0d0; +// } +// } + +// .link-type, +// .link-type:focus { +// color: #337ab7; +// cursor: pointer; + +// &:hover { +// color: rgb(32, 160, 255); +// } +// } + +// .filter-container { +// padding-bottom: 10px; + +// .filter-item { +// display: inline-block; +// vertical-align: middle; +// margin-bottom: 10px; +// } +// } + +// //refine vue-multiselect plugin +// .multiselect { +// line-height: 16px; +// } + +// .multiselect--active { +// z-index: 1000 !important; +// } diff --git a/Yi.BBS.Vue3/src/assets/styles/ruoyi.scss b/Yi.BBS.Vue3/src/assets/styles/ruoyi.scss new file mode 100644 index 00000000..acca7fb8 --- /dev/null +++ b/Yi.BBS.Vue3/src/assets/styles/ruoyi.scss @@ -0,0 +1,271 @@ + /** + * 通用css样式布局处理 + * Copyright (c) 2019 ruoyi + */ + + /** 基础通用 **/ +.pt5 { + padding-top: 5px; +} +.pr5 { + padding-right: 5px; +} +.pb5 { + padding-bottom: 5px; +} +.mt5 { + margin-top: 5px; +} +.mr5 { + margin-right: 5px; +} +.mb5 { + margin-bottom: 5px; +} +.mb8 { + margin-bottom: 8px; +} +.ml5 { + margin-left: 5px; +} +.mt10 { + margin-top: 10px; +} +.mr10 { + margin-right: 10px; +} +.mb10 { + margin-bottom: 10px; +} +.ml10 { + margin-left: 10px; +} +.mt20 { + margin-top: 20px; +} +.mr20 { + margin-right: 20px; +} +.mb20 { + margin-bottom: 20px; +} +.ml20 { + margin-left: 20px; +} + +.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { + font-family: inherit; + font-weight: 500; + line-height: 1.1; + color: inherit; +} + +.el-dialog:not(.is-fullscreen) { + margin-top: 6vh !important; +} + +.el-dialog.scrollbar .el-dialog__body { + overflow: auto; + overflow-x: hidden; + max-height: 70vh; + padding: 10px 20px 0; +} + +.el-table { + .el-table__header-wrapper, .el-table__fixed-header-wrapper { + th { + word-break: break-word; + background-color: #f8f8f9 !important; + color: #515a6e; + height: 40px !important; + font-size: 13px; + } + } + .el-table__body-wrapper { + .el-button [class*="el-icon-"] + span { + margin-left: 1px; + } + } +} + +/** 表单布局 **/ +.form-header { + font-size:15px; + color:#6379bb; + border-bottom:1px solid #ddd; + margin:8px 10px 25px 10px; + padding-bottom:5px +} + +/** 表格布局 **/ +.pagination-container { + // position: relative; + height: 25px; + margin-bottom: 10px; + margin-top: 15px; + padding: 10px 20px !important; +} + +/* tree border */ +.tree-border { + margin-top: 5px; + border: 1px solid #e5e6e7; + background: #FFFFFF none; + border-radius:4px; + width: 100%; +} + +.pagination-container .el-pagination { + right: 0; + position: absolute; +} + +@media ( max-width : 768px) { + .pagination-container .el-pagination > .el-pagination__jump { + display: none !important; + } + .pagination-container .el-pagination > .el-pagination__sizes { + display: none !important; + } +} + +.el-table .fixed-width .el-button--small { + padding-left: 0; + padding-right: 0; + width: inherit; +} + +/** 表格更多操作下拉样式 */ +.el-table .el-dropdown-link { + cursor: pointer; + color: #409EFF; + margin-left: 10px; +} + +.el-table .el-dropdown, .el-icon-arrow-down { + font-size: 12px; +} + +.el-tree-node__content > .el-checkbox { + margin-right: 8px; +} + +.list-group-striped > .list-group-item { + border-left: 0; + border-right: 0; + border-radius: 0; + padding-left: 0; + padding-right: 0; +} + +.list-group { + padding-left: 0px; + list-style: none; +} + +.list-group-item { + border-bottom: 1px solid #e7eaec; + border-top: 1px solid #e7eaec; + margin-bottom: -1px; + padding: 11px 0px; + font-size: 13px; +} + + +// .el-card__header { +// padding: 14px 15px 7px !important; +// min-height: 40px; +// } + +// .el-card__body { +// padding: 15px 20px 20px 20px !important; +// } + +.card-box { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 10px; +} + +/* button color */ +.el-button--cyan.is-active, +.el-button--cyan:active { + background: #20B2AA; + border-color: #20B2AA; + color: #FFFFFF; +} + +.el-button--cyan:focus, +.el-button--cyan:hover { + background: #48D1CC; + border-color: #48D1CC; + color: #FFFFFF; +} + +.el-button--cyan { + background-color: #20B2AA; + border-color: #20B2AA; + color: #FFFFFF; +} + +/* text color */ +.text-navy { + color: #1ab394; +} + +.text-primary { + color: inherit; +} + +.text-success { + color: #1c84c6; +} + +.text-info { + color: #23c6c8; +} + +.text-warning { + color: #f8ac59; +} + +.text-danger { + color: #ed5565; +} + +.text-muted { + color: #888888; +} + +/* image */ +.img-circle { + border-radius: 50%; +} + +.img-lg { + width: 120px; + height: 120px; +} + +.avatar-upload-preview { + position: absolute; + top: 50%; + transform: translate(50%, -50%); + width: 200px; + height: 200px; + border-radius: 50%; + box-shadow: 0 0 4px #ccc; + overflow: hidden; +} + +/* 拖拽列样式 */ +.sortable-ghost{ + opacity: .8; + color: #fff!important; + background: #42b983!important; +} + +/* 表格右侧工具栏样式 */ +.top-right-btn { + margin-left: auto; +} diff --git a/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue b/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue index 1d5d5589..8e076eee 100644 --- a/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue +++ b/Yi.BBS.Vue3/src/components/ArticleContentInfo.vue @@ -6,12 +6,15 @@ \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/views/profile/ResetPwd.vue b/Yi.BBS.Vue3/src/views/profile/ResetPwd.vue new file mode 100644 index 00000000..7bb746d1 --- /dev/null +++ b/Yi.BBS.Vue3/src/views/profile/ResetPwd.vue @@ -0,0 +1,59 @@ + + + diff --git a/Yi.BBS.Vue3/src/views/profile/UserAvatar.vue b/Yi.BBS.Vue3/src/views/profile/UserAvatar.vue new file mode 100644 index 00000000..18454b23 --- /dev/null +++ b/Yi.BBS.Vue3/src/views/profile/UserAvatar.vue @@ -0,0 +1,174 @@ + + + + + \ No newline at end of file diff --git a/Yi.BBS.Vue3/src/views/profile/UserInfo.vue b/Yi.BBS.Vue3/src/views/profile/UserInfo.vue new file mode 100644 index 00000000..a93921fc --- /dev/null +++ b/Yi.BBS.Vue3/src/views/profile/UserInfo.vue @@ -0,0 +1,58 @@ + + + diff --git a/Yi.Framework.Net6/src/framework/Yi.Framework.Data/DataSeeds/AbstractDataSeed.cs b/Yi.Framework.Net6/src/framework/Yi.Framework.Data/DataSeeds/AbstractDataSeed.cs index 1992122f..ee089b16 100644 --- a/Yi.Framework.Net6/src/framework/Yi.Framework.Data/DataSeeds/AbstractDataSeed.cs +++ b/Yi.Framework.Net6/src/framework/Yi.Framework.Data/DataSeeds/AbstractDataSeed.cs @@ -9,7 +9,7 @@ namespace Yi.Framework.Data.DataSeeds { public abstract class AbstractDataSeed : IDataSeed { - private readonly IRepository _repository; + protected readonly IRepository _repository; public AbstractDataSeed(IRepository repository) { _repository = repository; diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsMenuDataSeed.cs b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsMenuDataSeed.cs new file mode 100644 index 00000000..055cd097 --- /dev/null +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/DataSeeds/BbsMenuDataSeed.cs @@ -0,0 +1,255 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Yi.Framework.Data.DataSeeds; +using Yi.Framework.Ddd.Repositories; +using Yi.RBAC.Domain.Identity.Entities; +using Yi.RBAC.Domain.Shared.Identity.EnumClasses; + +namespace Yi.BBS.Domain.DataSeed +{ + [AppService(typeof(IDataSeed))] + public class BbsMenuDataSeed : AbstractDataSeed + { + public BbsMenuDataSeed(IRepository repository) : base(repository) + { + } + + public override async Task IsInvoker() + { + return !await _repository.IsAnyAsync(x => x.MenuName == "BBS"); + } + public override List GetSeedData() + { + List entities = new List(); + //BBS + MenuEntity bbs = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "BBS", + MenuType = MenuTypeEnum.Catalogue, + Router = "/bbs", + IsShow = true, + IsLink = false, + MenuIcon = "international", + OrderNum = 97, + ParentId = 0, + IsDeleted = false + }; + entities.Add(bbs); + //文章管理 + MenuEntity article = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "文章管理", + PermissionCode = "bbs:article:list", + MenuType = MenuTypeEnum.Menu, + Router = "article", + IsShow = true, + IsLink = false, + IsCache = true, + Component = "bbs/article/index", + MenuIcon = "education", + OrderNum = 100, + ParentId = bbs.Id, + IsDeleted = false + }; + entities.Add(article); + + MenuEntity articleQuery = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "文章查询", + PermissionCode = "bbs:article:query", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = article.Id, + IsDeleted = false + }; + entities.Add(articleQuery); + + MenuEntity articleAdd = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "文章新增", + PermissionCode = "bbs:article:add", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = article.Id, + IsDeleted = false + }; + entities.Add(articleAdd); + + MenuEntity articleEdit = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "文章修改", + PermissionCode = "bbs:article:edit", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = article.Id, + IsDeleted = false + }; + entities.Add(articleEdit); + + MenuEntity articleRemove = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "文章删除", + PermissionCode = "bbs:article:remove", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = article.Id, + IsDeleted = false + }; + entities.Add(articleRemove); + + + //主题管理 + MenuEntity discuss = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "主题管理", + PermissionCode = "bbs:discuss:list", + MenuType = MenuTypeEnum.Menu, + Router = "discuss", + IsShow = true, + IsLink = false, + IsCache = true, + Component = "bbs/discuss/index", + MenuIcon = "education", + OrderNum = 100, + ParentId = bbs.Id, + IsDeleted = false + }; + entities.Add(discuss); + + MenuEntity discussQuery = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "主题查询", + PermissionCode = "bbs:discuss:query", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = discuss.Id, + IsDeleted = false + }; + entities.Add(discussQuery); + + MenuEntity discussAdd = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "主题新增", + PermissionCode = "bbs:discuss:add", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = discuss.Id, + IsDeleted = false + }; + entities.Add(discussAdd); + + MenuEntity discussEdit = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "主题修改", + PermissionCode = "bbs:discuss:edit", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = discuss.Id, + IsDeleted = false + }; + entities.Add(discussEdit); + + MenuEntity discussRemove = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "主题删除", + PermissionCode = "bbs:discuss:remove", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = discuss.Id, + IsDeleted = false + }; + entities.Add(discussRemove); + + + + //板块管理 + MenuEntity plate = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "板块管理", + PermissionCode = "bbs:plate:list", + MenuType = MenuTypeEnum.Menu, + Router = "plate", + IsShow = true, + IsLink = false, + IsCache = true, + Component = "bbs/plate/index", + MenuIcon = "education", + OrderNum = 100, + ParentId = bbs.Id, + IsDeleted = false + }; + entities.Add(plate); + + MenuEntity plateQuery = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "板块查询", + PermissionCode = "bbs:plate:query", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = plate.Id, + IsDeleted = false + }; + entities.Add(plateQuery); + + MenuEntity plateAdd = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "板块新增", + PermissionCode = "bbs:plate:add", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = plate.Id, + IsDeleted = false + }; + entities.Add(plateAdd); + + MenuEntity plateEdit = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "板块修改", + PermissionCode = "bbs:plate:edit", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = plate.Id, + IsDeleted = false + }; + entities.Add(plateEdit); + + MenuEntity plateRemove = new MenuEntity() + { + Id = SnowflakeHelper.NextId, + MenuName = "板块删除", + PermissionCode = "bbs:plate:remove", + MenuType = MenuTypeEnum.Component, + OrderNum = 100, + ParentId = plate.Id, + IsDeleted = false + }; + entities.Add(plateRemove); + + //默认值 + entities.ForEach(m => + { + m.IsDeleted = false; + m.State = true; + }); + return entities; + } + } +} diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/Yi.BBS.Domain.csproj b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/Yi.BBS.Domain.csproj index 77162d6c..e8d2d743 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/Yi.BBS.Domain.csproj +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Domain/Yi.BBS.Domain.csproj @@ -12,6 +12,7 @@ + diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj index c2d071a9..f5aea785 100644 --- a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj +++ b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/Yi.BBS.Web.csproj @@ -22,12 +22,18 @@ + + Always + Always Always + + Always + diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/ip2region.db b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/ip2region.db new file mode 100644 index 00000000..0fc60e6c Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/ip2region.db differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124076277469184 b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124076277469184 new file mode 100644 index 00000000..1614a4a8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124076277469184 differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124258641612800 b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124258641612800 new file mode 100644 index 00000000..f607dba9 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124258641612800 differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124385380896768 b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124385380896768 new file mode 100644 index 00000000..82472446 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124385380896768 differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124478213427200 b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124478213427200 new file mode 100644 index 00000000..fbfbd781 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637124478213427200 differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637128750699253760.ico b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637128750699253760.ico new file mode 100644 index 00000000..7650ebd0 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/File/1637128750699253760.ico differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637082987092905984.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637082987092905984.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637082987092905984.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083125156810752.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083125156810752.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083125156810752.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083169901645824.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083169901645824.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083169901645824.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083271831621632.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083271831621632.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083271831621632.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083367864406016.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083367864406016.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083367864406016.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083745968328704.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083745968328704.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083745968328704.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083867703808000.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083867703808000.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083867703808000.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083911882412032.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083911882412032.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637083911882412032.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637084155936378880.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637084155936378880.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637084155936378880.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637128794496176128.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637128794496176128.png new file mode 100644 index 00000000..a07294e8 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Image/1637128794496176128.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637082987092905984.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637082987092905984.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637082987092905984.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083125156810752.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083125156810752.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083125156810752.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083169901645824.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083169901645824.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083169901645824.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083271831621632.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083271831621632.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083271831621632.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083367864406016.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083367864406016.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083367864406016.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083745968328704.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083745968328704.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083745968328704.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083867703808000.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083867703808000.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083867703808000.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083911882412032.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083911882412032.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637083911882412032.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637084155936378880.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637084155936378880.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637084155936378880.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637128794496176128.png b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637128794496176128.png new file mode 100644 index 00000000..703bb487 Binary files /dev/null and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/wwwroot/Thumbnail/1637128794496176128.png differ diff --git a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db index cea6ac78..143e51d0 100644 Binary files a/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/src/project/BBS/Yi.BBS.Web/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Yi.BBS.Domain.csproj b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Yi.BBS.Domain.csproj index 77162d6c..e8d2d743 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Yi.BBS.Domain.csproj +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Domain/Yi.BBS.Domain.csproj @@ -12,6 +12,7 @@ + diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj index c2d071a9..f5aea785 100644 --- a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj +++ b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/Yi.BBS.Web.csproj @@ -22,12 +22,18 @@ + + Always + Always Always + + Always + diff --git a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db index cea6ac78..143e51d0 100644 Binary files a/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/src/project/bbs/Yi.BBS.Web/yi-sqlsugar-dev.db differ diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Application/Identity/MenuService.cs b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Application/Identity/MenuService.cs index 036a0a0e..bd217b52 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Application/Identity/MenuService.cs +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Application/Identity/MenuService.cs @@ -24,6 +24,7 @@ namespace Yi.RBAC.Application.Identity var entities = await _DbQueryable.WhereIF(!string.IsNullOrEmpty(input.MenuName), x => x.MenuName.Contains(input.MenuName!)) .WhereIF(input.State is not null, x => x.State == input.State) + .OrderByDescending(x=>x.OrderNum) .ToPageListAsync(input.PageNum, input.PageSize, total); return new PagedResultDto(total, await MapToGetListOutputDtosAsync(entities)); } diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/DataSeeds/MenuDataSeed.cs b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/DataSeeds/MenuDataSeed.cs index 5e3d933e..17d8a7bd 100644 --- a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/DataSeeds/MenuDataSeed.cs +++ b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Domain/DataSeeds/MenuDataSeed.cs @@ -17,6 +17,10 @@ namespace Yi.RBAC.Domain.DataSeeds { } + public override async Task IsInvoker() + { + return !await _repository.IsAnyAsync(x => x.MenuName == "系统管理"); + } public override List GetSeedData() { List entities = new List(); @@ -107,88 +111,6 @@ namespace Yi.RBAC.Domain.DataSeeds entities.Add(swagger); - //BBS - MenuEntity bbs = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "BBS", - MenuType = MenuTypeEnum.Catalogue, - Router = "/bbs", - IsShow = true, - IsLink = false, - MenuIcon = "international", - OrderNum = 97, - ParentId = 0, - IsDeleted = false - }; - entities.Add(bbs); - //文章管理 - MenuEntity article = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "文章管理", - PermissionCode = "bbs:article:list", - MenuType = MenuTypeEnum.Menu, - Router = "article", - IsShow = true, - IsLink = false, - IsCache = true, - Component = "bbs/article/index", - MenuIcon = "education", - OrderNum = 100, - ParentId = bbs.Id, - IsDeleted = false - }; - entities.Add(article); - - MenuEntity articleQuery = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "文章查询", - PermissionCode = "bbs:article:query", - MenuType = MenuTypeEnum.Component, - OrderNum = 100, - ParentId = article.Id, - IsDeleted = false - }; - entities.Add(articleQuery); - - MenuEntity articleAdd = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "文章新增", - PermissionCode = "bbs:article:add", - MenuType = MenuTypeEnum.Component, - OrderNum = 100, - ParentId = article.Id, - IsDeleted = false - }; - entities.Add(articleAdd); - - MenuEntity articleEdit = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "文章修改", - PermissionCode = "bbs:article:edit", - MenuType = MenuTypeEnum.Component, - OrderNum = 100, - ParentId = article.Id, - IsDeleted = false - }; - entities.Add(articleEdit); - - MenuEntity articleRemove = new MenuEntity() - { - Id = SnowflakeHelper.NextId, - MenuName = "文章删除", - PermissionCode = "bbs:article:remove", - MenuType = MenuTypeEnum.Component, - OrderNum = 100, - ParentId = article.Id, - IsDeleted = false - }; - entities.Add(articleRemove); - //ERP MenuEntity erp = new MenuEntity() { @@ -1143,6 +1065,13 @@ namespace Yi.RBAC.Domain.DataSeeds IsDeleted = false }; entities.Add(loginLogRemove); + + //默认值 + entities.ForEach(m => + { + m.IsDeleted = false; + m.State = true; + }); return entities; } } diff --git a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/yi-sqlsugar-dev.db b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/yi-sqlsugar-dev.db index 7071674f..ef3bb696 100644 Binary files a/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/src/project/rbac/Yi.RBAC.Web/yi-sqlsugar-dev.db differ diff --git a/Yi.RuoYi.Vue3/.env.development b/Yi.RuoYi.Vue3/.env.development index fa4ea55e..4ed3dfce 100644 --- a/Yi.RuoYi.Vue3/.env.development +++ b/Yi.RuoYi.Vue3/.env.development @@ -10,8 +10,11 @@ VITE_APP_BASE_API = '/dev-api' # ws/开发环境 VITE_APP_BASE_WS = '/dev-ws' +#BBS +VITE_APP_BASE_URL='http://localhost:19003/api' -VITE_APP_BASE_URL='http://localhost:19001/api' +#RBAC +# VITE_APP_BASE_URL='http://localhost:19001/api' diff --git a/Yi.RuoYi.Vue3/src/views/system/role/index.vue b/Yi.RuoYi.Vue3/src/views/system/role/index.vue index f5421541..63fe41ed 100644 --- a/Yi.RuoYi.Vue3/src/views/system/role/index.vue +++ b/Yi.RuoYi.Vue3/src/views/system/role/index.vue @@ -219,7 +219,8 @@ const dataScopeOptions = ref([ ]); const data = reactive({ - form: {}, + form: { + }, queryParams: { pageNum: 1, pageSize: 10, @@ -368,7 +369,7 @@ function reset() { roleName: undefined, roleCode: undefined, orderNum: 0, - state: false, + state: true, menuCheckStrictly: false, deptCheckStrictly: false, remark: undefined,