修改t4
This commit is contained in:
@@ -168,5 +168,11 @@
|
|||||||
<param name="idsListDto"></param>
|
<param name="idsListDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:Yi.Framework.ApiMicroservice.Controllers.UserController.GetRolesByUser">
|
||||||
|
<summary>
|
||||||
|
根据http上下文的用户得到该用户有哪些角色
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
</members>
|
</members>
|
||||||
</doc>
|
</doc>
|
||||||
|
|||||||
Binary file not shown.
@@ -6,8 +6,9 @@
|
|||||||
<#@ import namespace="System.Collections.Generic" #>
|
<#@ import namespace="System.Collections.Generic" #>
|
||||||
<#@ output extension=".cs" #>
|
<#@ output extension=".cs" #>
|
||||||
<#
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
DirectoryInfo dir = new DirectoryInfo(@"D:\YiFramework\Yi\Yi.Framework\Yi.Framework.Model\Models\");
|
string dirPath= Path.Combine(solutionsPath,@"Yi.Framework.Model\Models\");
|
||||||
|
DirectoryInfo dir = new DirectoryInfo(dirPath);
|
||||||
FileInfo[] finfo = dir.GetFiles();
|
FileInfo[] finfo = dir.GetFiles();
|
||||||
string filenames = string.Empty;
|
string filenames = string.Empty;
|
||||||
List<string> filenameList = new List<string>();
|
List<string> filenameList = new List<string>();
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
<#@ import namespace="System.Collections.Generic" #>
|
<#@ import namespace="System.Collections.Generic" #>
|
||||||
<#@ output extension=".cs" #>
|
<#@ output extension=".cs" #>
|
||||||
<#
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
DirectoryInfo dir = new DirectoryInfo(@"D:\YiFramework\Yi\Yi.Framework\Yi.Framework.Model\Models\");
|
string dirPath= Path.Combine(solutionsPath,@"Yi.Framework.Model\Models\");
|
||||||
|
DirectoryInfo dir = new DirectoryInfo(dirPath);
|
||||||
FileInfo[] finfo = dir.GetFiles();
|
FileInfo[] finfo = dir.GetFiles();
|
||||||
string filenames = string.Empty;
|
string filenames = string.Empty;
|
||||||
List<string> filenameList = new List<string>();
|
List<string> filenameList = new List<string>();
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ namespace Yi.Framework.Service
|
|||||||
{
|
{
|
||||||
public partial class MenuService:BaseService<menu>, IMenuService
|
public partial class MenuService:BaseService<menu>, IMenuService
|
||||||
{
|
{
|
||||||
public MenuService(DbContext Db) : base(Db) { }
|
|
||||||
|
|
||||||
|
|
||||||
public async Task<menu> AddChildrenMenu(menu _menu, menu _children)
|
public async Task<menu> AddChildrenMenu(menu _menu, menu _children)
|
||||||
{
|
{
|
||||||
var menu_data = await _Db.Set<menu>().Include(u => u.children).Where(u => u.id == _menu.id).FirstOrDefaultAsync();
|
var menu_data = await _Db.Set<menu>().Include(u => u.children).Where(u => u.id == _menu.id).FirstOrDefaultAsync();
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ namespace Yi.Framework.Service
|
|||||||
{
|
{
|
||||||
public partial class MouldService:BaseService<mould>, IMouldService
|
public partial class MouldService:BaseService<mould>, IMouldService
|
||||||
{
|
{
|
||||||
public MouldService(DbContext Db) : base(Db) { }
|
|
||||||
|
|
||||||
public async Task<bool> DelListByUpdateAsync(List<int> _ids)
|
public async Task<bool> DelListByUpdateAsync(List<int> _ids)
|
||||||
{
|
{
|
||||||
var mouldList =await GetEntitiesAsync(u => _ids.Contains(u.id));
|
var mouldList =await GetEntitiesAsync(u => _ids.Contains(u.id));
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ namespace Yi.Framework.Service
|
|||||||
{
|
{
|
||||||
public partial class RoleService:BaseService<role>, IRoleService
|
public partial class RoleService:BaseService<role>, IRoleService
|
||||||
{
|
{
|
||||||
public RoleService(DbContext Db):base(Db)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<bool> DelListByUpdateAsync(List<int> _ids)
|
public async Task<bool> DelListByUpdateAsync(List<int> _ids)
|
||||||
{
|
{
|
||||||
var userList = await GetEntitiesAsync(u=>_ids.Contains(u.id));
|
var userList = await GetEntitiesAsync(u=>_ids.Contains(u.id));
|
||||||
|
|||||||
@@ -12,21 +12,21 @@ namespace Yi.Framework.Service
|
|||||||
|
|
||||||
public partial class MenuService:BaseService<menu>,IMenuService
|
public partial class MenuService:BaseService<menu>,IMenuService
|
||||||
{
|
{
|
||||||
//public MenuService(DbContext Db):base(Db){ }
|
public MenuService(DbContext Db):base(Db){ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class MouldService:BaseService<mould>,IMouldService
|
public partial class MouldService:BaseService<mould>,IMouldService
|
||||||
{
|
{
|
||||||
//public MouldService(DbContext Db):base(Db){ }
|
public MouldService(DbContext Db):base(Db){ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class RoleService:BaseService<role>,IRoleService
|
public partial class RoleService:BaseService<role>,IRoleService
|
||||||
{
|
{
|
||||||
//public RoleService(DbContext Db):base(Db){ }
|
public RoleService(DbContext Db):base(Db){ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public partial class UserService:BaseService<user>,IUserService
|
public partial class UserService:BaseService<user>,IUserService
|
||||||
{
|
{
|
||||||
//public UserService(DbContext Db):base(Db){ }
|
public UserService(DbContext Db):base(Db){ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
<#@ import namespace="System.Collections.Generic" #>
|
<#@ import namespace="System.Collections.Generic" #>
|
||||||
<#@ output extension=".cs" #>
|
<#@ output extension=".cs" #>
|
||||||
<#
|
<#
|
||||||
|
string solutionsPath = Host.ResolveAssemblyReference("$(SolutionDir)");//获取解决方案路径
|
||||||
DirectoryInfo dir = new DirectoryInfo(@"D:\YiFramework\Yi\Yi.Framework\Yi.Framework.Model\Models\");
|
string dirPath= Path.Combine(solutionsPath,@"Yi.Framework.Model\Models\");
|
||||||
|
DirectoryInfo dir = new DirectoryInfo(dirPath);
|
||||||
FileInfo[] finfo = dir.GetFiles();
|
FileInfo[] finfo = dir.GetFiles();
|
||||||
string filenames = string.Empty;
|
string filenames = string.Empty;
|
||||||
List<string> filenameList = new List<string>();
|
List<string> filenameList = new List<string>();
|
||||||
@@ -37,7 +38,7 @@ namespace Yi.Framework.Service
|
|||||||
|
|
||||||
public partial class <#= fn #>Service:BaseService<<#= k #>>,I<#= fn #>Service
|
public partial class <#= fn #>Service:BaseService<<#= k #>>,I<#= fn #>Service
|
||||||
{
|
{
|
||||||
//public <#= fn #>Service(DbContext Db):base(Db){ }
|
public <#= fn #>Service(DbContext Db):base(Db){ }
|
||||||
}
|
}
|
||||||
<# } #>
|
<# } #>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,4 +7,10 @@ export default {
|
|||||||
data: { "ids1": userIds, "ids2": roleIds }
|
data: { "ids1": userIds, "ids2": roleIds }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
GetRolesByUser() {
|
||||||
|
return myaxios({
|
||||||
|
url: '/User/GetRolesByUser',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<material-card color="primary" icon="mdi-account-outline">
|
<material-card color="primary" icon="mdi-account-outline">
|
||||||
<template #title>
|
<template #title>
|
||||||
用户管理 — <small class="text-body-1">用户可拥有多个角色</small>
|
用户管理 — <small class="text-body-1">用户可拥有多个角色</small>
|
||||||
</template>
|
</template>
|
||||||
<ccCombobox
|
<ccCombobox
|
||||||
headers="设置角色"
|
headers="设置角色"
|
||||||
:items="roleItems"
|
:items="roleItems"
|
||||||
@select="getSelect"
|
@select="getSelect"
|
||||||
@@ -24,8 +24,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</ccTable>
|
</ccTable>
|
||||||
</material-card>
|
</material-card>
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import userApi from "../api/userApi";
|
import userApi from "../api/userApi";
|
||||||
@@ -37,13 +35,15 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async showItem(item) {
|
async showItem(item) {
|
||||||
|
var strInfo = "";
|
||||||
|
|
||||||
var strInfo="";
|
roleApi.GetRolesByUser().then(resp=>{
|
||||||
Object.keys(item).forEach(function(key){
|
|
||||||
|
|
||||||
strInfo+=key+":"+ item[key]+"<br>"
|
})
|
||||||
|
|
||||||
});
|
Object.keys(item).forEach(function (key) {
|
||||||
|
strInfo += key + ":" + item[key] + "<br>";
|
||||||
|
});
|
||||||
await this.$dialog.confirm({
|
await this.$dialog.confirm({
|
||||||
text: strInfo,
|
text: strInfo,
|
||||||
title: "信息详情",
|
title: "信息详情",
|
||||||
@@ -67,7 +67,10 @@ strInfo+=key+":"+ item[key]+"<br>"
|
|||||||
roleIds.push(item.id);
|
roleIds.push(item.id);
|
||||||
});
|
});
|
||||||
userApi.SetRoleByUser(userIds, roleIds).then((resp) => {
|
userApi.SetRoleByUser(userIds, roleIds).then((resp) => {
|
||||||
alert(resp);
|
this.$dialog.notify.success(resp.msg, {
|
||||||
|
position: "top-right",
|
||||||
|
timeout: 5000,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getTableSelect(data) {
|
getTableSelect(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user