diff --git a/WebFirst/database/sqlite.db b/WebFirst/database/sqlite.db
index 1a87a4ba..3dc4e708 100644
Binary files a/WebFirst/database/sqlite.db and b/WebFirst/database/sqlite.db differ
diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db
index 1ae5c4f1..d9f86808 100644
Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ
diff --git a/Yi.Framework.Net6/Yi.Framework.Core/JwtInvoker.cs b/Yi.Framework.Net6/Yi.Framework.Core/JwtInvoker.cs
index dbaf0e95..b7ddc280 100644
--- a/Yi.Framework.Net6/Yi.Framework.Core/JwtInvoker.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Core/JwtInvoker.cs
@@ -42,7 +42,7 @@ namespace Yi.Framework.Core
foreach (var m in menus)
{
- claims.Add(new Claim("permission", m.PermissionCode));
+ claims.Add(new Claim("permission", m.PermissionCode.ToString()));
}
if (isRefresh)
diff --git a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs
index 062ff186..b32d3177 100644
--- a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/MenuEntity.cs
@@ -32,7 +32,7 @@ namespace Yi.Framework.Model.Models
///
///
///
- [SugarColumn(ColumnName= "PermissionCode")]
+ [SugarColumn(ColumnName="PermissionCode" )]
public string PermissionCode { get; set; }
///
///
@@ -69,5 +69,15 @@ namespace Yi.Framework.Model.Models
///
[SugarColumn(ColumnName="TenantId" )]
public long? TenantId { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="MenuIcon" )]
+ public string MenuIcon { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="Router" )]
+ public string Router { get; set; }
}
}
diff --git a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/RoleEntity.cs b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/RoleEntity.cs
index a85c6d45..99c9da38 100644
--- a/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/RoleEntity.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Model/ModelsTemplate/RoleEntity.cs
@@ -54,5 +54,10 @@ namespace Yi.Framework.Model.Models
///
[SugarColumn(ColumnName="ModifyUser" )]
public long? ModifyUser { get; set; }
+ ///
+ ///
+ ///
+ [SugarColumn(ColumnName="RoleCode" )]
+ public string RoleCode { get; set; }
}
}
diff --git a/Yi.Framework.Net6/Yi.Framework.Model/Yi.Framework.Model.csproj b/Yi.Framework.Net6/Yi.Framework.Model/Yi.Framework.Model.csproj
index b2e5a54d..31183d3e 100644
--- a/Yi.Framework.Net6/Yi.Framework.Model/Yi.Framework.Model.csproj
+++ b/Yi.Framework.Net6/Yi.Framework.Model/Yi.Framework.Model.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/Yi.Framework.Net6/Yi.Framework.Service/UserService.cs b/Yi.Framework.Net6/Yi.Framework.Service/UserService.cs
index a2275c85..16fecb33 100644
--- a/Yi.Framework.Net6/Yi.Framework.Service/UserService.cs
+++ b/Yi.Framework.Net6/Yi.Framework.Service/UserService.cs
@@ -1,6 +1,7 @@
using SqlSugar;
using System;
using System.Collections.Generic;
+using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Yi.Framework.Common.Helper;
@@ -112,7 +113,7 @@ namespace Yi.Framework.Service
//首先获取到该用户全部信息,导航到角色、菜单,(菜单需要去重,完全交给Set来处理即可)
//得到用户
- var user = await _repository._Db.Queryable().Includes(u => u.Roles, r => r.Menus).InSingleAsync(userId);
+ var user = await _repository._Db.Queryable().Includes(u => u.Roles.Where(r=>r.IsDeleted==false).ToList(), r => r.Menus.Where(m=>m.IsDeleted==false).ToList()).InSingleAsync(userId);
//得到角色集合
var roleList = user.Roles;
diff --git a/Yi.Vue2.x/src/api/userApi.js b/Yi.Vue2.x/src/api/userApi.js
index 728e97a5..9b9f7851 100644
--- a/Yi.Vue2.x/src/api/userApi.js
+++ b/Yi.Vue2.x/src/api/userApi.js
@@ -19,4 +19,12 @@ export default {
method: 'get'
})
},
+ GiveUserSetRole(UserIds,RoleIds)
+ {
+ return myaxios({
+ url: `/User/GiveUserSetRole`,
+ method: 'put',
+ data:{UserIds,RoleIds}
+ })
+ }
}
\ No newline at end of file
diff --git a/Yi.Vue2.x/src/components/ccAvatar.vue b/Yi.Vue2.x/src/components/ccAvatar.vue
index a8709e15..4f8a6438 100644
--- a/Yi.Vue2.x/src/components/ccAvatar.vue
+++ b/Yi.Vue2.x/src/components/ccAvatar.vue
@@ -2,7 +2,7 @@
diff --git a/Yi.Vue2.x/src/components/ccCombobox.vue b/Yi.Vue2.x/src/components/ccCombobox.vue
index 78f07eb1..527a52f6 100644
--- a/Yi.Vue2.x/src/components/ccCombobox.vue
+++ b/Yi.Vue2.x/src/components/ccCombobox.vue
@@ -58,6 +58,8 @@ export default {
watch:{
select:{//深度监听,可监听到对象、数组的变化
handler(val, oldVal){
+ console.log(oldVal)
+ console.log(val)
this.$emit("select",val);
},
deep:true
diff --git a/Yi.Vue2.x/src/components/ccTreeview.vue b/Yi.Vue2.x/src/components/ccTreeview.vue
index c1e4acaf..4fe46133 100644
--- a/Yi.Vue2.x/src/components/ccTreeview.vue
+++ b/Yi.Vue2.x/src/components/ccTreeview.vue
@@ -52,10 +52,15 @@
hoverable
item-text="menuName"
>
+
+
+ {{ item.menuIcon }}
+
+
权限:{{ item.permissionCode }}
-
+ 路由:{{ item.router }}
-
+
{{ link.icon }}
@@ -81,11 +90,11 @@