From 85063864a06b772c13b3c7f44dd6bfc81f74286c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?=
<188633308@qq.com>
Date: Thu, 27 May 2021 21:17:26 +0800
Subject: [PATCH 1/2] =?UTF-8?q?update=20=E4=BC=98=E5=8C=96=E5=88=97?=
=?UTF-8?q?=E8=A1=A8=E5=88=86=E9=A1=B5=E5=99=A8=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Web/src/assets/style/lib/list.less | 3 +++
Web/src/assets/style/lib/table.less | 4 ++++
Web/src/components/yoList/index.js | 21 +++++++++++++++------
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/Web/src/assets/style/lib/list.less b/Web/src/assets/style/lib/list.less
index 324a1ce..89e4a38 100644
--- a/Web/src/assets/style/lib/list.less
+++ b/Web/src/assets/style/lib/list.less
@@ -25,4 +25,7 @@
}
}
}
+ >.ant-pagination {
+ margin: @padding-md 0;
+ }
}
diff --git a/Web/src/assets/style/lib/table.less b/Web/src/assets/style/lib/table.less
index 48ca825..335fbf5 100644
--- a/Web/src/assets/style/lib/table.less
+++ b/Web/src/assets/style/lib/table.less
@@ -125,6 +125,10 @@
}
}
}
+
+ .ant-table-pagination {
+ float: none;
+ }
}
.yo-table-actions {
diff --git a/Web/src/components/yoList/index.js b/Web/src/components/yoList/index.js
index b532d75..68dd3d1 100644
--- a/Web/src/components/yoList/index.js
+++ b/Web/src/components/yoList/index.js
@@ -99,12 +99,21 @@ export default {
-
- {Object.keys(this.$slots).map((name) => (
- {this.$slots[name]}
- ))}
-
-
+
+
+ {Object.keys(this.$slots).map((name) => (
+ {this.$slots[name]}
+ ))}
+
+ {
+ !!this.data && !!this.data.length &&
+ }
+
)
},
From c08ee51afa38c50de936885ed2093f7cd9071b2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=87=AA=E5=B8=A6=E5=A4=A7=E4=BD=AC=E6=B0=94=E5=9C=BA?=
<188633308@qq.com>
Date: Fri, 28 May 2021 13:41:29 +0800
Subject: [PATCH 2/2] =?UTF-8?q?fix=20=E6=A0=A1=E9=AA=8C=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E8=8C=83=E5=9B=B4=E5=BC=82=E6=AD=A5=E8=B0=83=E7=94=A8=E6=94=B9?=
=?UTF-8?q?=E5=90=8C=E6=AD=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/User/ISysUserService.cs | 2 +-
Api/Ewide.Core/Service/User/SysUserService.cs | 23 +++++++++++--------
2 files changed, 15 insertions(+), 10 deletions(-)
diff --git a/Api/Ewide.Core/Service/User/ISysUserService.cs b/Api/Ewide.Core/Service/User/ISysUserService.cs
index f712b30..7066ff0 100644
--- a/Api/Ewide.Core/Service/User/ISysUserService.cs
+++ b/Api/Ewide.Core/Service/User/ISysUserService.cs
@@ -6,7 +6,7 @@ namespace Ewide.Core.Service
{
public interface ISysUserService
{
- Task AddUser(AddUserInput input);
+ Task AddUser(AddUserInput input);
Task ChangeUserStatus(UpdateUserInput input);
Task DeleteUser(DeleteUserInput input);
Task ExportUser([FromQuery] UserInput input);
diff --git a/Api/Ewide.Core/Service/User/SysUserService.cs b/Api/Ewide.Core/Service/User/SysUserService.cs
index 48ab4ad..b6eb055 100644
--- a/Api/Ewide.Core/Service/User/SysUserService.cs
+++ b/Api/Ewide.Core/Service/User/SysUserService.cs
@@ -91,10 +91,10 @@ namespace Ewide.Core.Service
///
[HttpPost("/sysUser/add")]
[UnitOfWork]
- public async Task AddUser(AddUserInput input)
+ public async Task AddUser(AddUserInput input)
{
// 数据范围检查
- CheckDataScope(input);
+ await CheckDataScope(input);
var isExist = await _sysUserRep.AnyAsync(u => u.Account == input.Account, false);
if (isExist) throw Oops.Oh(ErrorCode.D1003);
@@ -105,10 +105,14 @@ namespace Ewide.Core.Service
user.Name = user.Account;
if (string.IsNullOrEmpty(user.NickName))
user.NickName = user.Account;
- var newUser = await _sysUserRep.InsertNowAsync(user);
- input.SysEmpParam.Id = newUser.Entity.Id.ToString();
+ var id = Guid.NewGuid().ToString();
+ user.Id = id;
+ await _sysUserRep.InsertAsync(user);
+ input.SysEmpParam.Id = id;
// 增加员工信息
await _sysEmpService.AddOrUpdate(input.SysEmpParam);
+
+ return id;
}
///
@@ -125,7 +129,7 @@ namespace Ewide.Core.Service
throw Oops.Oh(ErrorCode.D1014);
// 数据范围检查
- CheckDataScope(input);
+ await CheckDataScope(input);
// 直接删除用户
await user.DeleteAsync();
@@ -150,7 +154,7 @@ namespace Ewide.Core.Service
public async Task UpdateUser(UpdateUserInput input)
{
// 数据范围检查
- CheckDataScope(input);
+ await CheckDataScope(input);
// 排除自己并且判断与其他是否相同
var isExist = await _sysUserRep.AnyAsync(u => u.Account == input.Account && u.Id != input.Id, false);
@@ -207,7 +211,7 @@ namespace Ewide.Core.Service
public async Task GrantUserRole(UpdateUserInput input)
{
// 数据范围检查
- CheckDataScope(input);
+ await CheckDataScope(input);
await _sysUserRoleService.GrantRole(input);
}
@@ -220,7 +224,7 @@ namespace Ewide.Core.Service
public async Task GrantUserData(UpdateUserInput input)
{
// 数据范围检查
- CheckDataScope(input);
+ await CheckDataScope(input);
await _sysUserDataScopeService.GrantData(input);
}
@@ -380,6 +384,7 @@ namespace Ewide.Core.Service
///
///
[NonAction]
+ [UnitOfWork]
public async Task> GetUserDataScopeIdList(string userId)
{
var dataScopes = await _sysCacheService.GetDataScope(userId); // 先从缓存里面读取
@@ -420,7 +425,7 @@ namespace Ewide.Core.Service
///
///
///
- private async void CheckDataScope(UserInput userParam)
+ private async Task CheckDataScope(UserInput userParam)
{
// 如果当前用户不是超级管理员,则进行数据范围校验
if (!_userManager.SuperAdmin)