前端修改
This commit is contained in:
@@ -6,6 +6,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Const;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Helper;
|
||||
using Yi.Framework.Common.Models;
|
||||
@@ -135,9 +136,15 @@ namespace Yi.Framework.ApiMicroservice.Controllers
|
||||
{
|
||||
var userId = HttpContext.GetUserIdInfo();
|
||||
var data = await _iUserService.GetUserAllInfo(userId);
|
||||
var menus = data.Menus.ToList();
|
||||
|
||||
//为超级管理员直接给全部路由
|
||||
if (SystemConst.Admin.Equals(data.User.UserName))
|
||||
{
|
||||
menus = await _iUserService._repository.ChangeRepository<Repository<MenuEntity>>().GetListAsync();
|
||||
}
|
||||
//将后端菜单转换成前端路由,组件级别需要过滤
|
||||
List<VueRouterModel> routers = MenuEntity.RouterBuild(data.Menus.ToList());
|
||||
List<VueRouterModel> routers = MenuEntity.RouterBuild(menus);
|
||||
return Result.Success().SetData(routers);
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
15
Yi.Framework.Net6/Yi.Framework.Common/Const/SystemConst.cs
Normal file
15
Yi.Framework.Net6/Yi.Framework.Common/Const/SystemConst.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Yi.Framework.Common.Const
|
||||
{
|
||||
public class SystemConst
|
||||
{
|
||||
public const string Admin = "cc";
|
||||
public const string AdminRolesCode = "admin";
|
||||
public const string AdminPermissionCode = "*:*:*";
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Yi.Framework.Common.Const;
|
||||
using Yi.Framework.Common.Enum;
|
||||
using Yi.Framework.Common.Helper;
|
||||
using Yi.Framework.Common.Models;
|
||||
@@ -53,7 +54,7 @@ namespace Yi.Framework.Service
|
||||
if (await Exist(userName, o => user = o))
|
||||
{
|
||||
userAction.Invoke(user);
|
||||
if (user.Password == Common.Helper.MD5Helper.SHA2Encode(password, user.Salt))
|
||||
if (user.Password ==MD5Helper.SHA2Encode(password, user.Salt))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -149,6 +150,7 @@ namespace Yi.Framework.Service
|
||||
public async Task<UserRoleMenuDto> GetUserAllInfo(long userId)
|
||||
{
|
||||
|
||||
|
||||
var userRoleMenu = new UserRoleMenuDto();
|
||||
//首先获取到该用户全部信息,导航到角色、菜单,(菜单需要去重,完全交给Set来处理即可)
|
||||
|
||||
@@ -160,6 +162,18 @@ namespace Yi.Framework.Service
|
||||
}
|
||||
user.Password = null;
|
||||
user.Salt = null;
|
||||
|
||||
//超级管理员特殊处理
|
||||
if (SystemConst.Admin.Equals(user.UserName))
|
||||
{
|
||||
userRoleMenu.User = user;
|
||||
userRoleMenu.RoleCodes.Add(SystemConst.AdminRolesCode);
|
||||
userRoleMenu.PermissionCodes.Add(SystemConst.AdminPermissionCode);
|
||||
return userRoleMenu;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//得到角色集合
|
||||
var roleList = user.Roles;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 若依管理系统
|
||||
VITE_APP_TITLE = 意框架管理系统
|
||||
|
||||
# 开发环境配置
|
||||
VITE_APP_ENV = 'development'
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 页面标题
|
||||
VITE_APP_TITLE = 若依管理系统
|
||||
VITE_APP_TITLE = 意框架管理系统
|
||||
|
||||
# 生产环境配置
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
# 若依管理系统/生产环境
|
||||
# 意框架管理系统/生产环境
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
|
||||
# 是否在打包时开启压缩,支持 gzip 和 brotli
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<title>若依管理系统</title>
|
||||
<title>Yi意框架-ruoyi管理系统</title>
|
||||
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
|
||||
<style>
|
||||
html,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "ruoyi",
|
||||
"version": "3.8.3",
|
||||
"description": "若依管理系统",
|
||||
"author": "若依",
|
||||
"version": "2.0.0",
|
||||
"description": "意框架管理系统",
|
||||
"author": "意框架",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 30 KiB |
@@ -25,7 +25,7 @@ defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const title = ref('若依管理系统');
|
||||
const title = ref('意框架管理系统');
|
||||
const settingsStore = useSettingsStore();
|
||||
const sideTheme = computed(() => settingsStore.sideTheme);
|
||||
</script>
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :sm="24" :lg="12" style="padding-left: 20px">
|
||||
<h2>若依后台管理框架</h2>
|
||||
<h2>意框架-若依后台管理框架</h2>
|
||||
<p>
|
||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||
Ruoyi:一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统,她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||
</p>
|
||||
<p>
|
||||
<b>当前版本:</b> <span>v{{ version }}</span>
|
||||
<b>当前Ruoyi版本:</b> <span>v{{ version }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<el-tag type="danger">¥免费开源</el-tag>
|
||||
@@ -76,12 +76,12 @@
|
||||
<el-col :span="6">
|
||||
<h4>后端技术</h4>
|
||||
<ul>
|
||||
<li>SpringBoot</li>
|
||||
<li>Spring Security</li>
|
||||
<li>.Net6</li>
|
||||
<li>WebFirst</li>
|
||||
<li>JWT</li>
|
||||
<li>MyBatis</li>
|
||||
<li>Druid</li>
|
||||
<li>Fastjson</li>
|
||||
<li>Sqlsugar</li>
|
||||
<li>Redis</li>
|
||||
<li>json</li>
|
||||
<li>...</li>
|
||||
</ul>
|
||||
</el-col>
|
||||
@@ -111,14 +111,34 @@
|
||||
</template>
|
||||
<div class="body">
|
||||
<p>
|
||||
<i class="el-icon-s-promotion"></i> 官网:<el-link
|
||||
<i class="el-icon-s-promotion"></i> Sqlsugar官网地址:<el-link
|
||||
href="https://www.donet5.com/"
|
||||
target="_blank"
|
||||
>https://www.donet5.com/</el-link
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
<i class="el-icon-s-promotion"></i> Yi意框架地址:<el-link
|
||||
href="https://gitee.com/ccnetcore/yi"
|
||||
target="_blank"
|
||||
>https://gitee.com/ccnetcore/yi</el-link
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
<i class="el-icon-s-promotion"></i> Ruoyi官网:<el-link
|
||||
href="http://www.ruoyi.vip"
|
||||
target="_blank"
|
||||
>http://www.ruoyi.vip</el-link
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
<i class="el-icon-user-solid"></i> QQ群:<s>满937441</s> <s>满887144332</s>
|
||||
<i class="el-icon-user-solid"></i> Yi框架 QQ群:<s>官方一群已满</s> <s>官方二群已满</s>
|
||||
<a href="https://jq.qq.com/?_wv=1027&k=0fsNiYZt" target="_blank">
|
||||
官方三群:160110482</a
|
||||
>
|
||||
</p>
|
||||
<p>
|
||||
<i class="el-icon-user-solid"></i> Ruoyi QQ群:<s>满937441</s> <s>满887144332</s>
|
||||
<s>满180251782</s> <s>满104180207</s> <s>满186866453</s> <s>满201396349</s>
|
||||
<s>满101456076</s> <s>满101539465</s> <s>满264312783</s> <s>满167385320</s>
|
||||
<s>满104748341</s> <a href="https://jq.qq.com/?_wv=1027&k=0fsNiYZt" target="_blank">
|
||||
@@ -814,7 +834,7 @@
|
||||
<el-card class="update-log">
|
||||
<template v-slot:header>
|
||||
<div class="clearfix">
|
||||
<span>捐赠支持</span>
|
||||
<span>RuoYi捐赠支持</span>
|
||||
</div>
|
||||
</template>
|
||||
<div class="body">
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">若依后台管理系统</h3>
|
||||
<h3 class="title">意框架-Ruoyi管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="register">
|
||||
<el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
|
||||
<h3 class="title">若依后台管理系统</h3>
|
||||
<h3 class="title">意框架-Ruoyi管理系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="registerForm.username"
|
||||
|
||||
@@ -88,19 +88,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top" v-if="scope.row.userName != 'test'">
|
||||
<el-tooltip content="修改" placement="top" v-if="scope.row.userName != 'cc'">
|
||||
<el-button type="text" icon="Edit" @click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top" v-if="scope.row.userName != 'test'">
|
||||
<el-tooltip content="删除" placement="top" v-if="scope.row.userName != 'cc'">
|
||||
<el-button type="text" icon="Delete" @click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:user:remove']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="重置密码" placement="top" v-if="scope.row.userName != 'test'">
|
||||
<el-tooltip content="重置密码" placement="top" v-if="scope.row.userName != 'cc'">
|
||||
<el-button type="text" icon="Key" @click="handleResetPwd(scope.row)"
|
||||
v-hasPermi="['system:user:resetPwd']"></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="分配角色" placement="top" v-if="scope.row.userName != 'test'">
|
||||
<el-tooltip content="分配角色" placement="top" v-if="scope.row.userName != 'cc'">
|
||||
<el-button type="text" icon="CircleCheck" @click="handleAuthRole(scope.row)"
|
||||
v-hasPermi="['system:user:edit']"></el-button>
|
||||
</el-tooltip>
|
||||
|
||||
Reference in New Issue
Block a user