zhaoy 1 year ago
parent
commit
33d7098793
61 changed files with 1956 additions and 1332 deletions
  1. +39
    -118
      backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml
  2. +1
    -1
      backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftStepsEntity.cs
  3. +1
    -0
      backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoEntity.cs
  4. +4
    -35
      backend/BPA.MES.Base.Application/Entitys/Sys/EmployeeEntity.cs
  5. +2
    -2
      backend/BPA.MES.Base.Application/Services/SystemService/Dtos/AccountInput.cs
  6. +5
    -0
      backend/BPA.MES.Base.Application/Services/SystemService/Dtos/AuthorModuleItemOutput.cs
  7. +4
    -44
      backend/BPA.MES.Base.Application/Services/SystemService/Dtos/EmployeeInput.cs
  8. +4
    -28
      backend/BPA.MES.Base.Application/Services/SystemService/Dtos/EmployeeOutput.cs
  9. +1
    -4
      backend/BPA.MES.Base.Application/Services/SystemService/Dtos/ModuleInput.cs
  10. +54
    -65
      backend/BPA.MES.Base.Application/Services/SystemService/Services/AuthorizeService.cs
  11. +1
    -1
      backend/BPA.MES.Base.Application/Services/SystemService/Services/IAuthorizeService.cs
  12. +1
    -1
      frontend/config/routes.ts
  13. +925
    -0
      frontend/dist/630.bef28f50.async.js
  14. +1
    -1
      frontend/dist/index.html
  15. +0
    -1
      frontend/dist/p__craftInfo__kettle.799e866e.async.js
  16. +0
    -1
      frontend/dist/p__craftInfo__kettle.b10f2cd8.chunk.css
  17. +1
    -0
      frontend/dist/p__craftInfo__pot.42dafe91.async.js
  18. +0
    -1
      frontend/dist/p__craftInfo__pot.8768f963.async.js
  19. +0
    -1
      frontend/dist/p__deviceProductInfo__index.74be7f61.async.js
  20. +1
    -0
      frontend/dist/p__deviceProductInfo__index.e412b800.async.js
  21. +0
    -1
      frontend/dist/p__group__index.af69082f.async.js
  22. +2
    -0
      frontend/dist/p__kep__index.306fba2b.async.js
  23. +1
    -0
      frontend/dist/p__kep__index.3368f615.chunk.css
  24. +1
    -0
      frontend/dist/p__logs__alarmlog.2aa921c4.async.js
  25. +1
    -1
      frontend/dist/p__logs__programlog.a237de88.async.js
  26. +1
    -0
      frontend/dist/p__logs__runlog.4b288013.async.js
  27. +0
    -1
      frontend/dist/p__logs__runlog.556ea2d4.async.js
  28. +1
    -1
      frontend/dist/p__logs__userlog.dcb92815.async.js
  29. +0
    -1
      frontend/dist/p__logs__userlog.ee2c9567.async.js
  30. +0
    -10
      frontend/dist/p__manufacturing__index.59b675a0.async.js
  31. +10
    -0
      frontend/dist/p__manufacturing__index.911073cb.async.js
  32. +0
    -1
      frontend/dist/p__materials__index.60c92199.async.js
  33. +1
    -0
      frontend/dist/p__materials__index.cbff19b7.async.js
  34. +0
    -1
      frontend/dist/p__system__authTemplate__index.edfffa37.async.js
  35. +1
    -0
      frontend/dist/p__system__authTemplate__index.f6e3c8dc.async.js
  36. +1
    -0
      frontend/dist/p__system__module__index.0a77d9f3.async.js
  37. +0
    -1
      frontend/dist/p__system__module__index.613cac54.async.js
  38. +0
    -1
      frontend/dist/p__system__role__index.94b6bc88.async.js
  39. +1
    -0
      frontend/dist/p__system__role__index.c64fd058.async.js
  40. +0
    -1
      frontend/dist/p__system__user__index.73876c55.async.js
  41. +1
    -0
      frontend/dist/p__system__user__index.d813edfa.async.js
  42. BIN
     
  43. +65
    -65
      frontend/dist/umi.eb20ece1.js
  44. +2
    -2
      frontend/src/api/AuthTemplate.ts
  45. +1
    -1
      frontend/src/api/Material.ts
  46. +1
    -1
      frontend/src/api/ModuleAPI.ts
  47. +5
    -5
      frontend/src/api/Role.ts
  48. +1
    -1
      frontend/src/api/User.ts
  49. +2
    -2
      frontend/src/api/accountService.ts
  50. +652
    -638
      frontend/src/pages/craftInfo/pot.tsx
  51. +1
    -1
      frontend/src/pages/deviceProductInfo/index.tsx
  52. +3
    -5
      frontend/src/pages/logs/alarmlog.tsx
  53. +3
    -4
      frontend/src/pages/logs/programlog.tsx
  54. +3
    -6
      frontend/src/pages/logs/runlog.tsx
  55. +5
    -6
      frontend/src/pages/logs/userlog.tsx
  56. +1
    -1
      frontend/src/pages/materials/index.tsx
  57. +29
    -43
      frontend/src/pages/system/account/index.tsx
  58. +17
    -14
      frontend/src/pages/system/authTemplate/index.tsx
  59. +88
    -171
      frontend/src/pages/system/user/index.tsx
  60. +5
    -1
      frontend/src/types/Account.d.ts
  61. +5
    -41
      frontend/src/types/UserTypes.d.ts

+ 39
- 118
backend/BPA.MES.Base.Application/BPA.MES.Base.Application.xml View File

@@ -1312,34 +1312,9 @@
1男2女
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.Phone">
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.Status">
<summary>
手机号
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.ICCard">
<summary>
员工IC卡
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.Header">
<summary>
头像
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.OutDate">
<summary>
入职时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.IdCard">
<summary>
身份证
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.Stutas">
<summary>
1在职2出差3离职
1启用 2禁用
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.IsAdmin">
@@ -1347,16 +1322,11 @@
超管
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.TB_RoleId">
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.RoleId">
<summary>
角色Id
</summary>
</member>
<member name="P:BPA.MES.Base.Application.Entitys.EmployeeEntity.IsDeleted">
<summary>
是否删除
</summary>
</member>
<member name="T:BPA.MES.Base.Application.Entitys.ModuleEntity">
<summary>
名 称 :模块菜单表
@@ -7677,9 +7647,9 @@
主键
</summary>
</member>
<member name="P:BPA.MES.Base.Application.AccountQueryPageInput.Name">
<member name="P:BPA.MES.Base.Application.AccountQueryPageInput.Account">
<summary>
设备名称
账号名称
</summary>
</member>
<member name="T:BPA.MES.Base.Application.AccountOutput">
@@ -8104,6 +8074,11 @@
描 述 :
</summary>
</member>
<member name="P:BPA.MES.Base.Application.AuthorModuleItemOutput.Id">
<summary>
模块编号
</summary>
</member>
<member name="T:BPA.MES.Base.Application.AuthorModuleOutput">
<summary>
名 称 :授权模块输出
@@ -8180,16 +8155,6 @@
描 述 :
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Id">
<summary>
主键
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Sort">
<summary>
排序
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Name">
<summary>
员工姓名
@@ -8197,45 +8162,15 @@
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Gender">
<summary>
1男2女
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Phone">
<summary>
手机号
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.ICCard">
<summary>
员工IC卡
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Header">
<summary>
头像
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.JoinDate">
<summary>
入职时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.OutDate">
<summary>
离职时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.IdCard">
<summary>
身份证
0男1女
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.Stutas">
<member name="P:BPA.MES.Base.Application.EmployeeInput.Status">
<summary>
1在职2出差3离职
0启用 1禁用
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeInput.TB_RoleId">
<member name="P:BPA.MES.Base.Application.EmployeeInput.RoleId">
<summary>
角色Id
</summary>
@@ -8340,45 +8275,15 @@
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.Gender">
<summary>
1男2女
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.Phone">
<summary>
手机号
0男1女
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.ICCard">
<member name="P:BPA.MES.Base.Application.EmployeeOutput.Status">
<summary>
员工IC卡
0启用 1禁用
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.Header">
<summary>
头像
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.JoinDate">
<summary>
入职时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.OutDate">
<summary>
离职时间
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.IdCard">
<summary>
身份证
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.Stutas">
<summary>
1在职2出差3离职
</summary>
</member>
<member name="P:BPA.MES.Base.Application.EmployeeOutput.TB_RoleId">
<member name="P:BPA.MES.Base.Application.EmployeeOutput.RoleId">
<summary>
角色Id
</summary>
@@ -8443,11 +8348,6 @@
[模块信息]添加入参
</summary>
</member>
<member name="P:BPA.MES.Base.Application.ModuleAddInput.Id">
<summary>
主键
</summary>
</member>
<member name="T:BPA.MES.Base.Application.ModuleUpdateInput">
<summary>
[模块信息]修改入参
@@ -8918,6 +8818,27 @@
<param name="getObjectId"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.AuthorizeService.EditEmployee(BPA.MES.Base.Application.EmployeeUpdateInput)">
<summary>
编辑员工
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.AuthorizeService.QueryEmployee(BPA.MES.Base.Application.EmployeeQueryPageInput)">
<summary>
查询员工
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:BPA.MES.Base.Application.AuthorizeService.RemoveEmployee(System.String)">
<summary>
删除员工
</summary>
<param name="employeeId"></param>
<returns></returns>
</member>
<member name="T:BPA.MES.Base.Application.Subscriber.ToDoEventSubscriber">
<summary>
名 称 :


+ 1
- 1
backend/BPA.MES.Base.Application/Entitys/App/Pztj_CraftStepsEntity.cs View File

@@ -30,7 +30,7 @@
/// <summary>
/// 功能参数
/// </summary>
[SugarColumn(IsNullable = true)]
[SugarColumn(IsNullable = true, ColumnDataType= "longtext")]
public string Params { get; set; }
}
}

+ 1
- 0
backend/BPA.MES.Base.Application/Entitys/App/Pztj_WorkInfoEntity.cs View File

@@ -12,6 +12,7 @@
/// <summary>
/// 工单名称
/// </summary>
[SugarColumn(IsNullable = true)]
public string Name { get; set; }
/// <summary>
/// 产线Id


+ 4
- 35
backend/BPA.MES.Base.Application/Entitys/Sys/EmployeeEntity.cs View File

@@ -20,38 +20,10 @@
[SugarColumn(IsNullable = true)]
public int Gender { get; set; }
/// <summary>
/// 手机号
/// 1启用 2禁用
/// </summary>
[SugarColumn(IsNullable = false)]
public string Phone { get; set; }
/// <summary>
/// 员工IC卡
/// </summary>
[SugarColumn(IsNullable = true)]
public string ICCard { get; set; }
/// <summary>
/// 头像
/// </summary>
[SugarColumn(IsNullable = true)]
public string Header { get; set; }

[SugarColumn(IsNullable = false)]
public DateTime JoinDate { get; set; }
/// <summary>
/// 入职时间
/// </summary>
[SugarColumn(IsNullable = true)]
public DateTime? OutDate { get; set; }
/// <summary>
/// 身份证
/// </summary>
[SugarColumn(IsNullable = true)]
public string IdCard { get; set; }
/// <summary>
/// 1在职2出差3离职
/// </summary>
[SugarColumn(IsNullable = false)]
public int Stutas { get; set; }
public int Status { get; set; }
/// <summary>
/// 超管
/// </summary>
@@ -60,10 +32,7 @@
/// <summary>
/// 角色Id
/// </summary>
public string TB_RoleId { get; set; }
/// <summary>
/// 是否删除
/// </summary>
public bool IsDeleted { get; set; }
public string RoleId { get; set; }
}
}

+ 2
- 2
backend/BPA.MES.Base.Application/Services/SystemService/Dtos/AccountInput.cs View File

@@ -87,8 +87,8 @@ namespace BPA.MES.Base.Application
/// </summary>
public string? Id { get; set; }
/// <summary>
/// 设备名称
/// 账号名称
/// </summary>
public string Name { get; set; }
public string Account { get; set; }
}
}

+ 5
- 0
backend/BPA.MES.Base.Application/Services/SystemService/Dtos/AuthorModuleItemOutput.cs View File

@@ -8,5 +8,10 @@
/// </summary>
public class AuthorModuleItemOutput
{
/// <summary>
/// 模块编号
/// </summary>
public string Id { get; set; }

}
}

+ 4
- 44
backend/BPA.MES.Base.Application/Services/SystemService/Dtos/EmployeeInput.cs View File

@@ -8,63 +8,23 @@
/// </summary>
public class EmployeeInput
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 员工姓名
/// </summary>

public string Name { get; set; }
/// <summary>
/// 1男2
/// 0男1女
/// </summary>

public int Gender { get; set; }
/// <summary>
/// 手机号
/// </summary>

public string Phone { get; set; }
/// <summary>
/// 员工IC卡
/// 0启用 1禁用
/// </summary>

public string ICCard { get; set; }
/// <summary>
/// 头像
/// </summary>

public string Header { get; set; }
/// <summary>
/// 入职时间
/// </summary>

public DateTime JoinDate { get; set; }

/// <summary>
/// 离职时间
/// </summary>
public DateTime? OutDate { get; set; }
/// <summary>
/// 身份证
/// </summary>

public string IdCard { get; set; }
/// <summary>
/// 1在职2出差3离职
/// </summary>

public int Stutas { get; set; }
public int Status { get; set; }
/// <summary>
/// 角色Id
/// </summary>
public string TB_RoleId { get; set; }
public string RoleId { get; set; }
/// <summary>
/// 是否存在账号
/// </summary>


+ 4
- 28
backend/BPA.MES.Base.Application/Services/SystemService/Dtos/EmployeeOutput.cs View File

@@ -21,42 +21,18 @@
/// </summary>
public string Name { get; set; }
/// <summary>
/// 1男2
/// 0男1
/// </summary>

public int Gender { get; set; }
/// <summary>
/// 手机号
/// 0启用 1禁用
/// </summary>
public string Phone { get; set; }
/// <summary>
/// 员工IC卡
/// </summary>
public string ICCard { get; set; }
/// <summary>
/// 头像
/// </summary>
public string Header { get; set; }
/// <summary>
/// 入职时间
/// </summary>
public DateTime JoinDate { get; set; }
/// <summary>
/// 离职时间
/// </summary>
public DateTime? OutDate { get; set; }
/// <summary>
/// 身份证
/// </summary>
public string IdCard { get; set; }
/// <summary>
/// 1在职2出差3离职
/// </summary>
public int Stutas { get; set; }
public int Status { get; set; }
/// <summary>
/// 角色Id
/// </summary>
public string TB_RoleId { get; set; }
public string RoleId { get; set; }
/// <summary>
/// 是否存在账号
/// </summary>


+ 1
- 4
backend/BPA.MES.Base.Application/Services/SystemService/Dtos/ModuleInput.cs View File

@@ -49,10 +49,7 @@ namespace BPA.MES.Base.Application
/// </summary>
public class ModuleAddInput : ModuleInput
{
/// <summary>
/// 主键
/// </summary>
public string Id { get; set; }
}
/// <summary>
/// [模块信息]修改入参


+ 54
- 65
backend/BPA.MES.Base.Application/Services/SystemService/Services/AuthorizeService.cs View File

@@ -69,7 +69,7 @@
public async Task<object> GetUserInfo()
{
string userId = App.User?.FindFirst(ClaimConst.CLAINM_USERID)?.Value;
var user = await db.Queryable<EmployeeEntity>().LeftJoin<RoleEntity>((t, x) => t.TB_RoleId == x.Id)
var user = await db.Queryable<EmployeeEntity>().LeftJoin<RoleEntity>((t, x) => t.RoleId == x.Id)
.Where((t, x) => t.Id == userId).Select((t, x) => new
{
RoleName = x.Name,
@@ -157,7 +157,7 @@
}
if (category == 2)
{
return user.TB_RoleId;
return user.RoleId;
}
else
{
@@ -177,6 +177,7 @@
public async Task<SqlSugarPagedList<AccountOutput>> AccountPageList(AccountQueryPageInput input)
{
var entity = await _dbContext.Queryable<AccountEntity>()
.WhereIF(!string.IsNullOrEmpty(input.Account),x=>x.Account==input.Account)
.ToPagedListAsync(input.PageIndex,input.PageSize);
SqlSugarPagedList<AccountOutput> output = entity.Adapt<SqlSugarPagedList<AccountOutput>>();
return output;
@@ -259,7 +260,7 @@
[HttpGet]
public async Task<bool> RemoveRole(string input)
{
return await db.Updateable<RoleEntity>().Where(t => t.Id == input).ExecuteCommandHasChangeAsync();
return await db.Deleteable<RoleEntity>().Where(t => t.Id == input).ExecuteCommandHasChangeAsync();
}
[HttpGet]
public async Task<RoleOutput> GetRole(string input)
@@ -289,8 +290,9 @@
public async Task<bool> AddModule(ModuleAddInput input)
{
input.ParentId = input.ParentId ?? string.Empty;
input.Id = null;
return (await db.Insertable(input.Adapt<ModuleEntity>()).ExecuteCommandAsync()) > 0;
var entity = input.Adapt<ModuleEntity>();
await db.Insertable(entity).IgnoreColumns(true).ExecuteCommandAsync();
return true;
}
[HttpPost]

@@ -315,7 +317,7 @@
await RemoveModule(item.Id);
}
}
await _dbContext.Updateable<ModuleEntity>().Where(it => it.Id == input).ExecuteCommandAsync();
await _dbContext.Deleteable<ModuleEntity>().Where(it => it.Id == input).ExecuteCommandAsync();
}
[HttpPost]
public async Task<List<ModuleTreeOutput>> GetTreeGrid(ModuleTreeQueryInput input)
@@ -332,12 +334,12 @@

if (modules.HasVal())
{
foreach (var item in modules.Where(it => it.Category == 1))
foreach (var item in modules.Where(it=>it.ParentId=="").ToList())
{
item.Children = modules.Where(it => it.ParentId == item.Id && it.Category == 2).OrderBy(it => it.Sort).ToList();
item.Children = modules.Where(it => it.ParentId == item.Id ).OrderBy(it => it.Sort).ToList();
foreach (var view in item.Children)
{
view.Children = modules.Where(it => it.ParentId == view.Id && it.Category == 3).OrderBy(it => it.Sort).ToList();
view.Children = modules.Where(it => it.ParentId == view.Id ).OrderBy(it => it.Sort).ToList();
}

list.Add(item);
@@ -392,45 +394,34 @@

#region 授权模板详情
[HttpGet]
public async Task<List<AuthorModuleOutput>> GetModuleByTemplateId(string input)
public async Task<List<AuthorizeTemplateItemEntity>> GetModuleByTemplateId(string input)
{
List<AuthorModuleOutput> result = new List<AuthorModuleOutput>();
var modules = await db.Queryable<ModuleEntity>().ToListAsync();
var roots = modules.Adapt<List<AuthorModuleOutput>>();
db.ThenMapper(roots, item =>
{
item.HasPermission = db.Queryable<AuthorizeTemplateItemEntity>().Where(m => m.TB_TemplateId == input && m.TB_ModuleId == item.Id).Any();
});
if (roots.HasVal())
{
foreach (var item in roots.Where(it => it.Category == 1))
{
item.Childrens = roots.Where(it => it.ParentId == item.Id && it.Category == 2).OrderBy(it => it.Name).ToList();

foreach (var view in item.Childrens)
{
view.Childrens = roots.Where(it => it.ParentId == view.Id && it.Category == 3).OrderBy(it => it.Name).ToList();
}

result.Add(item);
}
}
return result;
var entity =await db.Queryable<AuthorizeTemplateItemEntity>().Where(m => m.TB_TemplateId == input).ToListAsync();
return entity;
}
[HttpPost]
public async Task<bool> EditTemplateItem(AuthorModuleItemUpdateInput input)
{
var temp = await db.Queryable<AuthorizeTemplateEntity>().FirstAsync(t => t.Id == input.TB_TemplateId && t.IsDeleted == false);
await db.Updateable<AuthorizeTemplateItemEntity>().SetColumns(T => T.IsDeleted == true)
.Where(t => t.TB_TemplateId == input.TB_TemplateId).ExecuteCommandHasChangeAsync();

var entity = input.TB_ModuleIds.Distinct().ToList().ConvertAll(t => new AuthorizeTemplateItemEntity
try
{
TB_ModuleId = t,
TB_TemplateId = input.TB_TemplateId
});
var res = await db.Insertable(entity).ExecuteCommandAsync();
return res > 0;
db.Ado.BeginTran();
await db.Deleteable<AuthorizeTemplateItemEntity>()
.Where(t => t.TB_TemplateId == input.TB_TemplateId).ExecuteCommandAsync();
var entity = input.TB_ModuleIds.Distinct().ToList().ConvertAll(t => new AuthorizeTemplateItemEntity
{
TB_ModuleId = t,
TB_TemplateId = input.TB_TemplateId
});
await db.Insertable(entity).ExecuteCommandAsync();
db.Ado.CommitTran();
return true;
}
catch (Exception ex)
{
throw Oops.Bah(ex.Message);
}
}
[HttpPost]
public async Task<List<AuthorizeOutput>> GetAuthorizeObjects(AuthorizeInput input)
@@ -457,7 +448,6 @@
{
var temp = await db.Queryable<EmployeeEntity>()
.Where(t => t.IsAdmin == false)
.Where(t => t.IsDeleted == false)
.WhereIF(!string.IsNullOrWhiteSpace(input.Keyword), t => t.Name.Contains(input.Keyword))
.OrderBy(t => t.Name)
.ToListAsync();
@@ -548,6 +538,7 @@
var model = input.Adapt<AccountEntity>();
//默认123456
model.Pwd = "123456".ToMD5Encrypt();
model.EmployeeId = input.TB_Employee_Id;
return await db.Insertable(model).ExecuteCommandAsync() > 0;
}
}
@@ -571,35 +562,36 @@
{
var model = input.Adapt<EmployeeEntity>();
model.IsAdmin = false;
var temp = await db.Queryable<EmployeeEntity>().FirstAsync(t => t.Name.Equals(input.Name) && t.Phone.Equals(input.Phone) && t.IsDeleted == false);
if (temp != null) throw Oops.Bah("该员工已经存在");
return await db.Insertable(model).ExecuteCommandAsync() > 0;
return await db.Insertable(model).IgnoreColumns(true).ExecuteCommandAsync() > 0;
}
/// <summary>
/// 编辑员工
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<bool> EditEmployee(EmployeeUpdateInput input)
{
var temp = await db.Queryable<EmployeeEntity>().FirstAsync(t => t.Id == input.Id);
temp.Header = input.Header;
temp.IdCard = input.IdCard;
temp.Gender = input.Gender;
temp.JoinDate = input.JoinDate;
temp.OutDate = input.OutDate;
temp.Name = input.Name;
temp.Phone = input.Phone;
temp.Stutas = input.Stutas;
temp.Status = input.Status;
return await db.Updateable(temp).ExecuteCommandHasChangeAsync();
}
/// <summary>
/// 查询员工
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
public async Task<SqlSugarPagedList<EmployeeOutput>> QueryEmployee(EmployeeQueryPageInput input)
{
var entity = await db.Queryable<EmployeeEntity>()

.WhereIF(!string.IsNullOrEmpty(input.Keyword), t => t.Name.Contains(input.Keyword) || t.Phone.Contains(input.Keyword))
.WhereIF(input.Status > 0, t => t.Stutas == input.Status).WhereIF(input.Gender > 0, t => t.Gender == input.Gender)
.WhereIF(input.JoinDate.HasValue, t => t.JoinDate <= input.JoinDate.Value)
.WhereIF(!string.IsNullOrEmpty(input.Keyword), t => t.Name.Contains(input.Keyword))
.WhereIF(input.Status > 0, t => t.Status == input.Status).WhereIF(input.Gender > 0, t => t.Gender == input.Gender)
.Where(t => t.IsAdmin == false)
.Where(t => t.IsDeleted == false)
.Select(t => new EmployeeOutput()
{
Id = t.Id.SelectAll(),
@@ -609,30 +601,27 @@
.ToPagedListAsync(input.PageIndex, input.PageSize);
return entity;
}
/// <summary>
/// 删除员工
/// </summary>
/// <param name="employeeId"></param>
/// <returns></returns>
[HttpGet]
public async Task<bool> RemoveEmployee([FromQuery] string employeeId)
{
bool result = false;
var entity =await db.Queryable<AccountEntity>().FirstAsync(x=>x.EmployeeId== employeeId);
try
{
db.Ado.BeginTran();
await db.Deleteable<EmployeeEntity>().Where(t => t.Id == employeeId).ExecuteCommandAsync();
if (entity!=null)
{
entity.EmployeeId = string.Empty;
await db.Updateable(entity).IgnoreColumns(true).ExecuteCommandAsync();
}
await db.Deleteable<AccountEntity>().Where(t => t.EmployeeId == employeeId).ExecuteCommandAsync();
db.Ado.CommitTran();
result = true;
return true;
}
catch (Exception ex)
{
db.Ado.RollbackTran();
throw Oops.Bah("删除失败!");
}
return result;
}
[HttpGet]
public async Task<List<EmployeeOutput>> EmployeeList()


+ 1
- 1
backend/BPA.MES.Base.Application/Services/SystemService/Services/IAuthorizeService.cs View File

@@ -53,7 +53,7 @@ public interface IAuthorizeService
#endregion

#region 授权模板详情
Task<List<AuthorModuleOutput>> GetModuleByTemplateId(string input);
Task<List<AuthorizeTemplateItemEntity>> GetModuleByTemplateId(string input);
Task<bool> EditTemplateItem(AuthorModuleItemUpdateInput input);
Task<List<AuthorizeOutput>> GetAuthorizeObjects(AuthorizeInput input);
Task<bool> RemoveAuthorize(AuthorizeInput input);


+ 1
- 1
frontend/config/routes.ts View File

@@ -6,7 +6,7 @@
path: '/system',
name: '系统管理',
routes: [
{ path: '/system/account', name: '账号管理', component: './system/account' },
// { path: '/system/account', name: '账号管理', component: './system/account' },
{ path: '/system/user', name: '人员管理', component: './system/user' },
{ path: '/system/role', name: '角色管理', component: './system/role' },
{ path: '/system/module', name: '模块管理', component: './system/module' },


+ 925
- 0
frontend/dist/630.bef28f50.async.js
File diff suppressed because it is too large
View File


+ 1
- 1
frontend/dist/index.html View File

@@ -6,6 +6,6 @@
</head>
<body>
<div id="root"></div>
<script src="/umi.1ebffe09.js"></script>
<script src="/umi.eb20ece1.js"></script>

</body></html>

+ 0
- 1
frontend/dist/p__craftInfo__kettle.799e866e.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__craftInfo__kettle.b10f2cd8.chunk.css View File

@@ -1 +0,0 @@
.box .rowBgColor{background-color:#cfd0d1}.box .ant-table-tbody>tr.ant-table-row:hover>td{background:none!important}

+ 1
- 0
frontend/dist/p__craftInfo__pot.42dafe91.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__craftInfo__pot.8768f963.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__deviceProductInfo__index.74be7f61.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__deviceProductInfo__index.e412b800.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__group__index.af69082f.async.js
File diff suppressed because it is too large
View File


+ 2
- 0
frontend/dist/p__kep__index.306fba2b.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__kep__index.3368f615.chunk.css
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__logs__alarmlog.2aa921c4.async.js View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[522],{90503:function(A,s,d){d.d(s,{DH:function(){return c},Xk:function(){return p},n5:function(){return P},xu:function(){return g}});var f=d(97857),r=d.n(f),t=d(12578),p={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},48350:function(A,s,d){d.r(s);var f=d(15009),r=d.n(f),t=d(99289),p=d.n(t),c=d(5574),P=d.n(c),g=d(67286),a=d(15513),e=d(71577),i=d(45360),E=d(67294),T=d(90503),_=d(85893);s.default=function(){var b=(0,E.useState)("table"),M=P()(b,2),D=M[0],O=M[1],h=(0,E.useRef)(),S=(0,E.useRef)(),L=function(){var n,o;(n=h.current)===null||n===void 0||n.resetFields(),(o=S.current)===null||o===void 0||o.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0,search:!1},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",ellipsis:!0},{title:"\u62A5\u8B66\u7B49\u7EA7",dataIndex:"grade",ellipsis:!0},{title:"\u62A5\u8B66\u503C",dataIndex:"value",search:!1},{title:"\u62A5\u8B66\u4FE1\u606F",dataIndex:"msgInfo",search:!1}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(g.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var n;(n=h.current)===null||n===void 0||n.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:S,onSubmit:function(n){console.log(n),D==="form"&&(n.id?T.Xk.Update(n).then(function(o){o.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}):T.Xk.Add(n).then(function(o){o.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}))},request:p()(r()().mark(function l(){var n,o,m,v=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return n=v.length>0&&v[0]!==void 0?v[0]:{},o={pageIndex:n.current||1,pageSize:n.pageSize||10,msgInfo:n.msgInfo,value:n.value,grade:n.grade,deviceName:n.deviceName},u.next=4,T.Xk.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

frontend/dist/p__logs__alarmlog.b983f6fb.async.js → frontend/dist/p__logs__programlog.a237de88.async.js View File

@@ -1 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[522],{90503:function(L,i,d){d.d(i,{DH:function(){return c},Xk:function(){return f},n5:function(){return P},xu:function(){return g}});var p=d(97857),r=d.n(p),t=d(12578),f={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},48350:function(L,i,d){d.r(i);var p=d(15009),r=d.n(p),t=d(99289),f=d.n(t),c=d(5574),P=d.n(c),g=d(67286),a=d(15513),e=d(71577),s=d(45360),E=d(67294),T=d(90503),_=d(85893);i.default=function(){var A=(0,E.useState)("table"),M=P()(A,2),D=M[0],O=M[1],h=(0,E.useRef)(),S=(0,E.useRef)(),b=function(){var n,o;(n=h.current)===null||n===void 0||n.resetFields(),(o=S.current)===null||o===void 0||o.reload()},I=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0},{title:"\u8BBE\u5907\u540D\u79F0",dataIndex:"deviceName",copyable:!0,ellipsis:!0},{title:"\u62A5\u8B66\u7B49\u7EA7",dataIndex:"grade",copyable:!0,ellipsis:!0},{title:"\u62A5\u8B66\u503C",hideInTable:!0,hideInDescriptions:!0,dataIndex:"value",search:!1},{title:"\u62A5\u8B66\u4FE1\u606F",dataIndex:"msgInfo",width:120,search:!1}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(g.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var n;(n=h.current)===null||n===void 0||n.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:I,type:D,formRef:h,actionRef:S,onSubmit:function(n){console.log(n),D==="form"&&(n.id?T.Xk.Update(n).then(function(o){o.statusCode===200?(s.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),b()):s.ZP.error(o.errors)}):T.Xk.Add(n).then(function(o){o.statusCode===200?(s.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),b()):s.ZP.error(o.errors)}))},request:f()(r()().mark(function l(){var n,o,m,v=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return n=v.length>0&&v[0]!==void 0?v[0]:{},o={pageIndex:n.current||1,pageSize:n.pageSize||10,msgInfo:n.msgInfo,value:n.value,grade:n.grade,deviceName:n.deviceName},u.next=4,T.Xk.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[309],{90503:function(A,s,n){n.d(s,{DH:function(){return P},Xk:function(){return p},n5:function(){return g},xu:function(){return c}});var f=n(97857),r=n.n(f),t=n(12578),p={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},95690:function(A,s,n){n.r(s);var f=n(15009),r=n.n(f),t=n(99289),p=n.n(t),P=n(5574),g=n.n(P),c=n(67286),a=n(15513),e=n(71577),i=n(45360),E=n(67294),T=n(90503),_=n(85893);s.default=function(){var b=(0,E.useState)("table"),S=g()(b,2),D=S[0],O=S[1],h=(0,E.useRef)(),v=(0,E.useRef)(),L=function(){var o,d;(o=h.current)===null||o===void 0||o.resetFields(),(d=v.current)===null||d===void 0||d.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",search:!1},{title:"\u65E5\u5FD7\u7C7B\u522B",dataIndex:"logType"},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo"}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(c.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var o;(o=h.current)===null||o===void 0||o.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(o){console.log(o),D==="form"&&(o.id?T.DH.Update(o).then(function(d){d.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}):T.DH.Add(o).then(function(d){d.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}))},request:p()(r()().mark(function l(){var o,d,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=M.length>0&&M[0]!==void 0?M[0]:{},d={pageIndex:o.current||1,pageSize:o.pageSize||10,logType:o.logType,msgInfo:o.msgInfo},u.next=4,T.DH.PagedList(d);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

+ 1
- 0
frontend/dist/p__logs__runlog.4b288013.async.js View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[675],{90503:function(A,s,n){n.d(s,{DH:function(){return P},Xk:function(){return p},n5:function(){return g},xu:function(){return c}});var f=n(97857),r=n.n(f),t=n(12578),p={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},48098:function(A,s,n){n.r(s);var f=n(15009),r=n.n(f),t=n(99289),p=n.n(t),P=n(5574),g=n.n(P),c=n(67286),a=n(15513),e=n(71577),i=n(45360),E=n(67294),T=n(90503),_=n(85893);s.default=function(){var b=(0,E.useState)("table"),S=g()(b,2),D=S[0],O=S[1],h=(0,E.useRef)(),v=(0,E.useRef)(),L=function(){var o,d;(o=h.current)===null||o===void 0||o.resetFields(),(d=v.current)===null||d===void 0||d.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",search:!1},{title:"\u65E5\u5FD7\u7C7B\u522B",dataIndex:"logType"},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo"}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(c.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var o;(o=h.current)===null||o===void 0||o.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(o){console.log(o),D==="form"&&(o.id?T.xu.Update(o).then(function(d){d.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}):T.xu.Add(o).then(function(d){d.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(d.errors)}))},request:p()(r()().mark(function l(){var o,d,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return o=M.length>0&&M[0]!==void 0?M[0]:{},d={pageIndex:o.current||1,pageSize:o.pageSize||10,logType:o.logType,msgInfo:o.msgInfo},u.next=4,T.xu.PagedList(d);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

+ 0
- 1
frontend/dist/p__logs__runlog.556ea2d4.async.js View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[675],{90503:function(b,s,n){n.d(s,{DH:function(){return P},Xk:function(){return f},n5:function(){return c},xu:function(){return E}});var p=n(97857),r=n.n(p),t=n(12578),f={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},E={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},48098:function(b,s,n){n.r(s);var p=n(15009),r=n.n(p),t=n(99289),f=n.n(t),P=n(5574),c=n.n(P),E=n(67286),a=n(15513),e=n(71577),i=n(45360),g=n(67294),T=n(90503),_=n(85893);s.default=function(){var A=(0,g.useState)("table"),S=c()(A,2),D=S[0],O=S[1],h=(0,g.useRef)(),v=(0,g.useRef)(),L=function(){var d,o;(d=h.current)===null||d===void 0||d.resetFields(),(o=v.current)===null||o===void 0||o.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0},{title:"\u65E5\u5FD7\u7C7B\u522B",dataIndex:"logType",copyable:!0,ellipsis:!0},{title:"\u65E5\u5FD7\u6D88\u606F",hideInTable:!0,hideInDescriptions:!0,dataIndex:"msgInfo",search:!1}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(E.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var d;(d=h.current)===null||d===void 0||d.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(d){console.log(d),D==="form"&&(d.id?T.xu.Update(d).then(function(o){o.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}):T.xu.Add(d).then(function(o){o.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}))},request:f()(r()().mark(function l(){var d,o,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=M.length>0&&M[0]!==void 0?M[0]:{},o={pageIndex:d.current||1,pageSize:d.pageSize||10},u.next=4,T.xu.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

frontend/dist/p__logs__programlog.fa8be6fe.async.js → frontend/dist/p__logs__userlog.dcb92815.async.js View File

@@ -1 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[309],{90503:function(b,s,n){n.d(s,{DH:function(){return P},Xk:function(){return f},n5:function(){return c},xu:function(){return E}});var p=n(97857),r=n.n(p),t=n(12578),f={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},E={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},95690:function(b,s,n){n.r(s);var p=n(15009),r=n.n(p),t=n(99289),f=n.n(t),P=n(5574),c=n.n(P),E=n(67286),a=n(15513),e=n(71577),i=n(45360),g=n(67294),T=n(90503),_=n(85893);s.default=function(){var A=(0,g.useState)("table"),S=c()(A,2),D=S[0],O=S[1],h=(0,g.useRef)(),v=(0,g.useRef)(),L=function(){var d,o;(d=h.current)===null||d===void 0||d.resetFields(),(o=v.current)===null||o===void 0||o.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0},{title:"\u65E5\u5FD7\u7C7B\u522B",dataIndex:"logType",copyable:!0,ellipsis:!0},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo",search:!1}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(E.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var d;(d=h.current)===null||d===void 0||d.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(d){console.log(d),D==="form"&&(d.id?T.DH.Update(d).then(function(o){o.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}):T.DH.Add(d).then(function(o){o.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}))},request:f()(r()().mark(function l(){var d,o,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=M.length>0&&M[0]!==void 0?M[0]:{},o={pageIndex:d.current||1,pageSize:d.pageSize||10},u.next=4,T.DH.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[464],{90503:function(A,_,n){n.d(_,{DH:function(){return P},Xk:function(){return p},n5:function(){return c},xu:function(){return g}});var f=n(97857),r=n.n(f),t=n(12578),p={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},g={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},46730:function(A,_,n){n.r(_);var f=n(15009),r=n.n(f),t=n(99289),p=n.n(t),P=n(5574),c=n.n(P),g=n(67286),a=n(15513),e=n(71577),i=n(45360),E=n(67294),T=n(90503),s=n(85893);_.default=function(){var b=(0,E.useState)("table"),S=c()(b,2),D=S[0],O=S[1],h=(0,E.useRef)(),v=(0,E.useRef)(),L=function(){var d,o;(d=h.current)===null||d===void 0||d.resetFields(),(o=v.current)===null||o===void 0||o.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0,search:!1},{title:"\u6743\u9650",dataIndex:"permission",ellipsis:!0,search:!1},{title:"\u7528\u6237\u540D",dataIndex:"userName"},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo",width:120}];return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(g.Z,{children:[D==="form"?(0,s.jsx)(e.ZP,{type:"link",onClick:function(){var d;(d=h.current)===null||d===void 0||d.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,s.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(d){console.log(d),D==="form"&&(d.id?T.n5.Update(d).then(function(o){o.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}):T.n5.Add(d).then(function(o){o.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}))},request:p()(r()().mark(function l(){var d,o,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=M.length>0&&M[0]!==void 0?M[0]:{},o={pageIndex:d.current||1,pageSize:d.pageSize||10,userName:d.userName,msgInfo:d.msgInfo},u.next=4,T.n5.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

+ 0
- 1
frontend/dist/p__logs__userlog.ee2c9567.async.js View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[464],{90503:function(b,s,n){n.d(s,{DH:function(){return P},Xk:function(){return f},n5:function(){return c},xu:function(){return E}});var p=n(97857),r=n.n(p),t=n(12578),f={Add:function(e){return(0,t.request)("/api/alarmlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/alarmlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/alarmlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/alarmlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/alarmlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/alarmlog/pagedlist",{method:"POST",data:r()({},e)})}},P={Add:function(e){return(0,t.request)("/api/programlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/programlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/programlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/programlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/programlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/programlog/pagedlist",{method:"POST",data:r()({},e)})}},c={Add:function(e){return(0,t.request)("/api/userlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/userlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/userlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/userlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/userlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/userlog/pagedlist",{method:"POST",data:r()({},e)})}},E={Add:function(e){return(0,t.request)("/api/runlog/add",{method:"POST",data:r()({},e)})},Del:function(e){return(0,t.request)("/api/runlog/del",{method:"POST",data:r()({},e)})},Update:function(e){return(0,t.request)("/api/runlog/update",{method:"POST",data:r()({},e)})},Detail:function(e){return(0,t.request)("/api/runlog/detail?id=".concat(e),{method:"GET"})},List:function(e){return(0,t.request)("/api/runlog/list",{method:"POST",data:r()({},e)})},PagedList:function(e){return(0,t.request)("/api/runlog/pagedlist",{method:"POST",data:r()({},e)})}}},46730:function(b,s,n){n.r(s);var p=n(15009),r=n.n(p),t=n(99289),f=n.n(t),P=n(5574),c=n.n(P),E=n(67286),a=n(15513),e=n(71577),i=n(45360),g=n(67294),T=n(90503),_=n(85893);s.default=function(){var A=(0,g.useState)("table"),S=c()(A,2),D=S[0],O=S[1],h=(0,g.useRef)(),v=(0,g.useRef)(),L=function(){var d,o;(d=h.current)===null||d===void 0||d.resetFields(),(o=v.current)===null||o===void 0||o.reload()},R=[{title:"\u4E3B\u952E",dataIndex:"id",hideInForm:!0},{title:"\u6743\u9650",dataIndex:"permission",ellipsis:!0},{title:"\u7528\u6237\u540D",hideInTable:!0,hideInDescriptions:!0,dataIndex:"userName",search:!1},{title:"\u65E5\u5FD7\u6D88\u606F",dataIndex:"msgInfo",width:120,search:!1}];return(0,_.jsx)(_.Fragment,{children:(0,_.jsxs)(E.Z,{children:[D==="form"?(0,_.jsx)(e.ZP,{type:"link",onClick:function(){var d;(d=h.current)===null||d===void 0||d.resetFields(),O("table")},children:"\u2B05\u8FD4\u56DE"}):"",(0,_.jsx)(a.Z,{columns:R,type:D,formRef:h,actionRef:v,onSubmit:function(d){console.log(d),D==="form"&&(d.id?T.n5.Update(d).then(function(o){o.statusCode===200?(i.ZP.info("\u66F4\u65B0\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}):T.n5.Add(d).then(function(o){o.statusCode===200?(i.ZP.info("\u65B0\u589E\u6210\u529F!"),O("table"),L()):i.ZP.error(o.errors)}))},request:f()(r()().mark(function l(){var d,o,m,M=arguments;return r()().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return d=M.length>0&&M[0]!==void 0?M[0]:{},o={pageIndex:d.current||1,pageSize:d.pageSize||10},u.next=4,T.n5.PagedList(o);case 4:if(m=u.sent,m.statusCode!==200){u.next=9;break}return u.abrupt("return",{data:m.data.items,success:!0,total:m.data.total});case 9:return u.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return u.stop()}},l)})),pagination:{pageSize:5},rowKey:"id",dateFormatter:"string",headerTitle:"\u5217\u8868",toolBarRender:!1})]})})}}}]);

+ 0
- 10
frontend/dist/p__manufacturing__index.59b675a0.async.js
File diff suppressed because it is too large
View File


+ 10
- 0
frontend/dist/p__manufacturing__index.911073cb.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__materials__index.60c92199.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__materials__index.cbff19b7.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__authTemplate__index.edfffa37.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__system__authTemplate__index.f6e3c8dc.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__system__module__index.0a77d9f3.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__module__index.613cac54.async.js
File diff suppressed because it is too large
View File


+ 0
- 1
frontend/dist/p__system__role__index.94b6bc88.async.js View File

@@ -1 +0,0 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[24],{56160:function(b,M,e){var h=e(97857),_=e.n(h),E=e(12578);M.Z={CreateRole:function(u){return(0,E.request)("/api/authorize/AddRole",{method:"POST",data:_()({},u)})},DeleteRole:function(u){return(0,E.request)("/api/authorize/RemoveRole?input=".concat(u),{method:"GET"})},ModifyRole:function(u){return(0,E.request)("/api/authorize/EditRole",{method:"POST",data:_()({},u)})},GetRoleList:function(){return(0,E.request)("/api/authorize/GetRoleList",{method:"GET"})},GetRolePagedList:function(u){return(0,E.request)("/api/authorize/QueryRole",{method:"POST",data:_()({},u)})}}},36056:function(b,M,e){e.r(M);var h=e(15009),_=e.n(h),E=e(99289),d=e.n(E),u=e(5574),v=e.n(u),p=e(67294),f=e(12029),B=e(42075),I=e(86738),c=e(45360),C=e(71577),L=e(5914),O=e(12096),D=e(56160),g=e(51042),K=e(15513),r=e(85893),S=function(){var y=(0,p.useState)({id:"",name:"",description:""}),j=v()(y,2),F=j[0],Z=j[1],U=(0,p.useState)(!1),A=v()(U,2),W=A[0],P=A[1],x=f.Z.useForm(),G=v()(x,1),T=G[0],z=[{title:"\u89D2\u8272\u540D\u79F0",dataIndex:"name",key:"name"},{title:"\u89D2\u8272\u63CF\u8FF0",dataIndex:"description",key:"description",search:!1},{title:"\u64CD\u4F5C",search:!1,key:"action",render:function(t,n){return(0,r.jsxs)(B.Z,{size:"middle",children:[(0,r.jsx)("a",{onClick:function(){return $(n)},children:"\u7F16\u8F91"}),(0,r.jsx)(I.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u89D2\u8272\u5417\uFF1F",onConfirm:function(){return J(n)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,r.jsx)("a",{children:"\u5220\u9664"})})]})}}],$=function(t){var n;Z(t),T.setFieldsValue(t),P(!0),(n=R.current)===null||n===void 0||n.reload()},J=function(){var o=d()(_()().mark(function t(n){var s,m;return _()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,D.Z.DeleteRole(n.id);case 2:s=l.sent,s.statusCode===200?(c.ZP.success("\u5220\u9664\u6210\u529F"),(m=R.current)===null||m===void 0||m.reload()):c.ZP.error(s.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return l.stop()}},t)}));return function(n){return o.apply(this,arguments)}}(),V=function(){var o=d()(_()().mark(function t(n){var s,m,a,l;return _()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!n.id){i.next=7;break}return i.next=3,D.Z.ModifyRole(n);case 3:s=i.sent,s.statusCode===200?(c.ZP.success("\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u6210\u529F"),P(!1),(m=R.current)===null||m===void 0||m.reload()):c.ZP.error(s.msg||"\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u5931\u8D25"),i.next=11;break;case 7:return i.next=9,D.Z.CreateRole(n);case 9:a=i.sent,a.statusCode===200?(c.ZP.success("\u521B\u5EFA\u89D2\u8272\u6210\u529F"),P(!1),(l=R.current)===null||l===void 0||l.reload()):c.ZP.error(a.msg||"\u521B\u5EFA\u89D2\u8272\u5931\u8D25");case 11:case"end":return i.stop()}},t)}));return function(n){return o.apply(this,arguments)}}(),N=function(){Z({id:"",name:"",description:""}),T.resetFields(),P(!0)},R=(0,p.useRef)();return(0,r.jsxs)("div",{children:[(0,r.jsx)(K.Z,{columns:z,actionRef:R,cardBordered:!0,request:d()(_()().mark(function o(){var t,n,s=arguments;return _()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=s.length>0&&s[0]!==void 0?s[0]:{},a.next=3,D.Z.GetRolePagedList({keyword:t.name,sortName:"",sortByAsc:!1,pageIndex:t.current||1,pageSize:t.pageSize||10});case 3:if(n=a.sent,n.statusCode!==200){a.next=8;break}return a.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 8:return c.ZP.error(n.errors||"\u83B7\u53D6\u89D2\u8272\u5217\u8868\u5931\u8D25"),a.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return a.stop()}},o)})),rowKey:"id",pagination:{pageSize:10},dateFormatter:"string",headerTitle:"\u89D2\u8272\u5217\u8868",toolBarRender:function(){return[(0,r.jsx)(C.ZP,{icon:(0,r.jsx)(g.Z,{}),type:"primary",onClick:N,children:"\u6DFB\u52A0"},"button")]}}),(0,r.jsx)(L.Z,{footer:null,title:F.id===""?"\u6DFB\u52A0\u89D2\u8272":"\u7F16\u8F91\u89D2\u8272",open:W,onCancel:function(){return P(!1)},children:(0,r.jsxs)(f.Z,{name:"basic",form:T,onFinish:V,children:[(0,r.jsx)(f.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u63CF\u8FF0",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{children:(0,r.jsx)(C.ZP,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})};M.default=S}}]);

+ 1
- 0
frontend/dist/p__system__role__index.c64fd058.async.js View File

@@ -0,0 +1 @@
"use strict";(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[24],{56160:function(b,M,e){var h=e(97857),_=e.n(h),E=e(12578);M.Z={CreateRole:function(u){return(0,E.request)("/api/authorize/AddRole",{method:"POST",data:_()({},u)})},DeleteRole:function(u){return(0,E.request)("/api/authorize/RemoveRole/".concat(u),{method:"GET"})},ModifyRole:function(u){return(0,E.request)("/api/authorize/EditRole",{method:"POST",data:_()({},u)})},GetRoleList:function(){return(0,E.request)("/api/authorize/GetRoleList",{method:"GET"})},GetRolePagedList:function(u){return(0,E.request)("/api/authorize/QueryRole",{method:"POST",data:_()({},u)})}}},36056:function(b,M,e){e.r(M);var h=e(15009),_=e.n(h),E=e(99289),d=e.n(E),u=e(5574),v=e.n(u),p=e(67294),f=e(12029),B=e(42075),I=e(86738),c=e(45360),C=e(71577),L=e(5914),O=e(12096),D=e(56160),g=e(51042),K=e(15513),r=e(85893),S=function(){var y=(0,p.useState)({id:"",name:"",description:""}),j=v()(y,2),F=j[0],Z=j[1],U=(0,p.useState)(!1),A=v()(U,2),W=A[0],P=A[1],x=f.Z.useForm(),G=v()(x,1),T=G[0],z=[{title:"\u89D2\u8272\u540D\u79F0",dataIndex:"name",key:"name"},{title:"\u89D2\u8272\u63CF\u8FF0",dataIndex:"description",key:"description",search:!1},{title:"\u64CD\u4F5C",search:!1,key:"action",render:function(t,n){return(0,r.jsxs)(B.Z,{size:"middle",children:[(0,r.jsx)("a",{onClick:function(){return $(n)},children:"\u7F16\u8F91"}),(0,r.jsx)(I.Z,{title:"\u786E\u5B9A\u8981\u5220\u9664\u6B64\u89D2\u8272\u5417\uFF1F",onConfirm:function(){return J(n)},okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",children:(0,r.jsx)("a",{children:"\u5220\u9664"})})]})}}],$=function(t){var n;Z(t),T.setFieldsValue(t),P(!0),(n=R.current)===null||n===void 0||n.reload()},J=function(){var o=d()(_()().mark(function t(n){var s,m;return _()().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:return l.next=2,D.Z.DeleteRole(n.id);case 2:s=l.sent,s.statusCode===200?(c.ZP.success("\u5220\u9664\u6210\u529F"),(m=R.current)===null||m===void 0||m.reload()):c.ZP.error(s.msg||"\u5220\u9664\u5931\u8D25");case 4:case"end":return l.stop()}},t)}));return function(n){return o.apply(this,arguments)}}(),V=function(){var o=d()(_()().mark(function t(n){var s,m,a,l;return _()().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:if(!n.id){i.next=7;break}return i.next=3,D.Z.ModifyRole(n);case 3:s=i.sent,s.statusCode===200?(c.ZP.success("\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u6210\u529F"),P(!1),(m=R.current)===null||m===void 0||m.reload()):c.ZP.error(s.msg||"\u66F4\u65B0\u89D2\u8272\u4FE1\u606F\u5931\u8D25"),i.next=11;break;case 7:return i.next=9,D.Z.CreateRole(n);case 9:a=i.sent,a.statusCode===200?(c.ZP.success("\u521B\u5EFA\u89D2\u8272\u6210\u529F"),P(!1),(l=R.current)===null||l===void 0||l.reload()):c.ZP.error(a.msg||"\u521B\u5EFA\u89D2\u8272\u5931\u8D25");case 11:case"end":return i.stop()}},t)}));return function(n){return o.apply(this,arguments)}}(),N=function(){Z({id:"",name:"",description:""}),T.resetFields(),P(!0)},R=(0,p.useRef)();return(0,r.jsxs)("div",{children:[(0,r.jsx)(K.Z,{columns:z,actionRef:R,cardBordered:!0,request:d()(_()().mark(function o(){var t,n,s=arguments;return _()().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return t=s.length>0&&s[0]!==void 0?s[0]:{},a.next=3,D.Z.GetRolePagedList({keyword:t.name,sortName:"",sortByAsc:!1,pageIndex:t.current||1,pageSize:t.pageSize||10});case 3:if(n=a.sent,n.statusCode!==200){a.next=8;break}return a.abrupt("return",{data:n.data.items,success:!0,total:n.data.total});case 8:return c.ZP.error(n.errors||"\u83B7\u53D6\u89D2\u8272\u5217\u8868\u5931\u8D25"),a.abrupt("return",{data:[],success:!1,total:0});case 10:case"end":return a.stop()}},o)})),rowKey:"id",pagination:{pageSize:10},dateFormatter:"string",headerTitle:"\u89D2\u8272\u5217\u8868",toolBarRender:function(){return[(0,r.jsx)(C.ZP,{icon:(0,r.jsx)(g.Z,{}),type:"primary",onClick:N,children:"\u6DFB\u52A0"},"button")]}}),(0,r.jsx)(L.Z,{footer:null,title:F.id===""?"\u6DFB\u52A0\u89D2\u8272":"\u7F16\u8F91\u89D2\u8272",open:W,onCancel:function(){return P(!1)},children:(0,r.jsxs)(f.Z,{name:"basic",form:T,onFinish:V,children:[(0,r.jsx)(f.Z.Item,{label:"id",name:"id",hidden:!0,children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{label:"\u63CF\u8FF0",name:"description",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0\uFF01"}],children:(0,r.jsx)(O.Z,{})}),(0,r.jsx)(f.Z.Item,{children:(0,r.jsx)(C.ZP,{type:"primary",htmlType:"submit",children:"\u786E\u5B9A"})})]})})]})};M.default=S}}]);

+ 0
- 1
frontend/dist/p__system__user__index.73876c55.async.js
File diff suppressed because it is too large
View File


+ 1
- 0
frontend/dist/p__system__user__index.d813edfa.async.js
File diff suppressed because it is too large
View File


BIN
View File


frontend/dist/umi.eb20ece1.js
File diff suppressed because it is too large
View File


+ 2
- 2
frontend/src/api/AuthTemplate.ts View File

@@ -24,7 +24,7 @@ export default {
* @returns
*/
DeleteAuthTemp(id: string) {
return request(`/api/authorize/RemoveAuthorTemp?input=${id}`, {
return request(`/api/authorize/RemoveAuthorTemp/${id}`, {
method: 'GET'
});
},
@@ -112,7 +112,7 @@ export default {
* @param templateId
*/
GetModules(templateId: string) {
return request(`/api/authorize/GetModuleByTemplateId?input=${templateId}`, {
return request(`/api/authorize/getmodulebytemplateid/${templateId}`, {
method: 'GET'
});
}

+ 1
- 1
frontend/src/api/Material.ts View File

@@ -126,7 +126,7 @@ export default {
* @returns
*/
GetMaterialExtendAttributeById(materialId: string) {
return request(`/erp/material/MaterialExtend/GetMaterialExtendAttributeById?input=${materialId}`, {
return request(`/erp/material/MaterialExtend/GetMaterialExtendAttributeById/${materialId}`, {
method: 'GET'
});
},


+ 1
- 1
frontend/src/api/ModuleAPI.ts View File

@@ -37,7 +37,7 @@ export default {

//删除模块
DeleteModule(id: string) {
return request(`/api/authorize/removemodule?input=${id}`, {
return request(`/api/authorize/removemodule/${id}`, {
method: 'GET'
});
},


+ 5
- 5
frontend/src/api/Role.ts View File

@@ -3,7 +3,7 @@ import { request } from '@umijs/max';
export default {
//创建角色
CreateRole(parms: RolelTypes.RoleType) {
return request('/api/authorize/AddRole', {
return request('/api/authorize/addrole', {
method: 'POST',
data: {
...parms,
@@ -13,14 +13,14 @@ export default {

//删除角色
DeleteRole(id: string) {
return request(`/api/authorize/RemoveRole?input=${id}`, {
return request(`/api/authorize/removerole/${id}`, {
method: 'GET'
});
},

//修改角色
ModifyRole(parms: RolelTypes.RoleType) {
return request('/api/authorize/EditRole', {
return request('/api/authorize/editrole', {
method: 'POST',
data: {
...parms,
@@ -31,7 +31,7 @@ export default {

//获取角色列表
GetRoleList() {
return request('/api/authorize/GetRoleList', {
return request('/api/authorize/getroleList', {
method: 'GET',
});
},
@@ -42,7 +42,7 @@ export default {
* @returns
*/
GetRolePagedList(parms: RolelTypes.RolePageParams) {
return request('/api/authorize/QueryRole', {
return request('/api/authorize/queryrole', {
method: 'POST',
data: {
...parms,


+ 1
- 1
frontend/src/api/User.ts View File

@@ -90,7 +90,7 @@ export default {
* @returns
*/
RestoreAccount(params: string) {
return request(`/api/authorize/restoreaccountbyuser?input=${params}`, {
return request(`/api/authorize/restoreaccountbyuser/${params}`, {
method: 'GET',
});
},


+ 2
- 2
frontend/src/api/accountService.ts View File

@@ -4,7 +4,7 @@ import { request } from '@umijs/max';
export default {
//创建
Add(parms: Account.TBAccountDTO) {
return request('/api/authorize/add', {
return request('/api/authorize/addaccount', {
method: 'POST',
data: {
...parms,
@@ -40,7 +40,7 @@ export default {
* @param parms
* @returns
*/
PagedList(parms: Account.TBAccountDTO) {
PagedList(parms: Account.Page) {
return request('/api/authorize/accountpagelist', {
method: 'POST',
data: {


+ 652
- 638
frontend/src/pages/craftInfo/pot.tsx
File diff suppressed because it is too large
View File


+ 1
- 1
frontend/src/pages/deviceProductInfo/index.tsx View File

@@ -237,7 +237,7 @@ export default () => {
{funcfromType === 'form' ? <Button type='primary' icon={<LeftCircleOutlined />} onClick={() => {
funcRef.current?.resetFields();
setFuncFromType("table")
}}>返回</Button> : ""}
}}>返回功能列表</Button> : ""}
</Space>
<ProTable<deviceProduct.output>
type={funcfromType as 'table'}


+ 3
- 5
frontend/src/pages/logs/alarmlog.tsx View File

@@ -27,30 +27,28 @@ export default () => {
title: '主键',
dataIndex: 'id',
hideInForm: true,
search: false,
},
{
title: '设备名称',
dataIndex: 'deviceName',
copyable: true,
ellipsis: true,
},
{
title: '报警等级',
dataIndex: 'grade',
copyable: true,
ellipsis: true,
},
{
title: '报警值',
hideInTable: true,
hideInDescriptions: true,
dataIndex: 'value',
search: false,
},
{
title: '报警信息',
dataIndex: 'msgInfo',
width: 120,
search: false,
},
];


+ 3
- 4
frontend/src/pages/logs/programlog.tsx View File

@@ -26,18 +26,15 @@ export default () => {
{
title: '主键',
dataIndex: 'id',
hideInForm: true,
search:false
},
{
title: '日志类别',
dataIndex: 'logType',
copyable: true,
ellipsis: true,
},
{
title: '日志消息',
dataIndex: 'msgInfo',
search: false,
},
];

@@ -82,6 +79,8 @@ export default () => {
const jsonData: programlog.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
logType:params.logType,
msgInfo:params.msgInfo
};
const response = await programlogApi.PagedList(jsonData);
if (response.statusCode === 200) {


+ 3
- 6
frontend/src/pages/logs/runlog.tsx View File

@@ -26,20 +26,15 @@ export default () => {
{
title: '主键',
dataIndex: 'id',
hideInForm: true,
search:false
},
{
title: '日志类别',
dataIndex: 'logType',
copyable: true,
ellipsis: true,
},
{
title: '日志消息',
hideInTable: true,
hideInDescriptions: true,
dataIndex: 'msgInfo',
search: false,
},
];
@@ -85,6 +80,8 @@ export default () => {
const jsonData: runlog.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
logType:params.logType,
msgInfo:params.msgInfo
};
const response = await runlogApi.PagedList(jsonData);
if (response.statusCode === 200) {


+ 5
- 6
frontend/src/pages/logs/userlog.tsx View File

@@ -27,25 +27,23 @@ export default () => {
title: '主键',
dataIndex: 'id',
hideInForm: true,
search: false,
},
{
title: '权限',
dataIndex: 'permission',
ellipsis: true,
search: false,
},
{
title: '用户名',
hideInTable: true,
hideInDescriptions: true,
dataIndex: 'userName',
search: false,
},
{
title: '日志消息',
dataIndex: 'msgInfo',
width: 120,
search: false,
},
];

@@ -90,7 +88,8 @@ export default () => {
const jsonData: userlog.queryPage = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
userName: params.userName,
msgInfo: params.msgInfo
};
const response = await userlogApi.PagedList(jsonData);
if (response.statusCode === 200) {


+ 1
- 1
frontend/src/pages/materials/index.tsx View File

@@ -217,7 +217,7 @@ const Index =()=> {
<Input />
</Form.Item>
<Form.Item
label="分组"
label="物料类型"
name="gourp"
rules={[{ required: true, message: '此项必填!' }]}
>


+ 29
- 43
frontend/src/pages/system/account/index.tsx View File

@@ -38,33 +38,33 @@
typeForm.setFieldsValue(copyFormData);
}}
>
编辑
重置密码
</Button>,
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={() => {
// <Popconfirm
// key="del"
// title="确定要删除此条数据吗?"
// onConfirm={() => {
const EnablejsonData: Account.TBAccountDTO = {
id: record.id,
name: '',
code: ''
};
AccountAPI.Del(EnablejsonData).then((r) => {
if (r.statusCode === 200) {
message.success(r.statusCode === 200 ? '删除成功' : r.message);
actionRef.current?.reload();
}
});
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除</Button>
</Popconfirm>,
// const EnablejsonData: Account.TBAccountDTO = {
// id: record.id,
// name: '',
// code: ''
// };
// AccountAPI.Del(EnablejsonData).then((r) => {
// if (r.statusCode === 200) {
// message.success(r.statusCode === 200 ? '删除成功' : r.message);
// actionRef.current?.reload();
// }
// });
// }}
// onCancel={() => {
// message.info('已取消删除');
// }}
// okText="确认"
// cancelText="关闭"
// >
// <Button type="primary" danger ghost>删除</Button>
// </Popconfirm>,
],
},
];
@@ -113,12 +113,10 @@
actionRef={actionRef}
cardBordered
request={async (params = {}) => {
const jsonData: DeviceTypes.Page = {
const jsonData: Account.Page = {
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
name: params.name || '',
id: '',
code: ''
account: params.account || '',
};
const response = await AccountAPI.PagedList(jsonData);
if (response.statusCode === 200) {
@@ -140,20 +138,8 @@
pageSize: 10,
}}
dateFormatter="string"
headerTitle="设备列表"
toolBarRender={() => [
<Button
key="button"
type="primary"
onClick={() => {
typeForm.resetFields();
setIsModalOpen(true);
setModelTitle('新增信息');
}}
>
新建
</Button>,
]}
headerTitle="账号列表"
toolBarRender={false}
/>
<Modal
key="01"


+ 17
- 14
frontend/src/pages/system/authTemplate/index.tsx View File

@@ -118,22 +118,25 @@ const AuthTemplate: React.FC = () => {
const response = await authTempAPI.GetModules(values.id);
setIsLoading(false);
if (response.statusCode === 200) {
console.log(' response.data', response.data);
const selectKeys: string[] = [];
response.data.forEach((item: AuthTemplateTypes.ModuleType) => {
if (item.hasPermission) {
if (item.childrens.length > 0) {
item.childrens.forEach((cItem: AuthTemplateTypes.ModuleType) => {
if (cItem.hasPermission) {
selectKeys.push(cItem.id);
if (cItem.childrens.length > 0) {
cItem.childrens.forEach((fItem: AuthTemplateTypes.ModuleType) => {
selectKeys.push(fItem.id);
})
}
}
});
}
}
// if (item.hasPermission) {
selectKeys.push(item.tB_ModuleId);
// if (item.childrens.length > 0) {
// item.childrens.forEach((cItem: AuthTemplateTypes.ModuleType) => {
// if (cItem.hasPermission) {
// selectKeys.push(cItem.id);
// if (cItem.childrens.length > 0) {
// cItem.childrens.forEach((fItem: AuthTemplateTypes.ModuleType) => {
// selectKeys.push(fItem.id);
// })
// }
// }
// });
// }
// }
});
console.log('selectKeys', selectKeys);
setSelectTempRowKeys(selectKeys);


+ 88
- 171
frontend/src/pages/system/user/index.tsx View File

@@ -8,7 +8,6 @@ import md5 from 'js-md5'
import { PlusOutlined } from '@ant-design/icons';
import type { ActionType, ProColumns } from '@ant-design/pro-components';
import { ProTable } from '@ant-design/pro-components';
import Password from 'antd/es/input/Password';

const DatePicker: any = TDatePicker;

@@ -19,17 +18,13 @@ const User: React.FC = () => {
const [isAccountVisible, setIsAccountVisible] = useState<boolean>(false);

const [currentPerson, setCurrentPerson] = useState<UserTypes.PersonnelType>({
phone: '',
joinDate: '',
outDate: '',
idCard: '',
stutas: 1,
tB_RoleId: '',
status: 1,
roleId: '',
gender: 1,
id: '',
sort: 1,
name: '',
iCCard: ''
isAccount: false
});
const [form] = Form.useForm();
const [formAccount] = Form.useForm();
@@ -47,24 +42,6 @@ const User: React.FC = () => {
dataIndex: 'account',
key: 'account',
},
{
title: '电话',
search: false,
dataIndex: 'phone',
key: 'phone'
},
{
title: 'IC卡',
search: false,
dataIndex: 'icCard',
key: 'icCard'
},
{
title: '身份证',
search: false,
dataIndex: 'idCard',
key: 'idCard'
},
{
title: '性别',
dataIndex: 'gender',
@@ -72,19 +49,16 @@ const User: React.FC = () => {
valueType: 'select',
valueEnum: {
0: {
text: '全部'
},
1: {
text: '男'
},
2: {
1: {
text: '女',
}
},
render: (_, record) => (
<>
{
record.gender === 1 ?
record.gender === 0 ?
<div style={{ color: 'green' }}>
</div>
@@ -96,32 +70,6 @@ const User: React.FC = () => {
</>
)
},
{
title: '入职时间',
dataIndex: 'joinDate',
key: 'joinDate',
valueType: 'date',
render: (_, record) => (<>
{
(() => {
return <div>{moment(record.joinDate).format('yyyy-MM-DD')}</div>
})()
}
</>)
},
{
title: '离职时间',
dataIndex: 'outDate',
search: false,
key: 'outDate',
render: (_, record) => (<>
{
(() => {
return record.outDate === null ? '-' : <div>{moment(record.outDate).format('yyyy-MM-DD')}</div>
})()
}
</>)
},
{
title: '角色',
search: false,
@@ -131,7 +79,7 @@ const User: React.FC = () => {
<>
{
(() => {
const role = roleList.find(item => item.id === record.tB_RoleId);
const role = roleList.find(item => item.id === record.roleId);
if (role) {
return <div>{role.name}</div>
} else {
@@ -144,32 +92,29 @@ const User: React.FC = () => {
},
{
title: '状态',
dataIndex: 'stutas',
key: 'stutas',
dataIndex: 'status',
key: 'status',
valueType: 'select',
valueEnum: {
0: {
text: '全部'
},
1: {
text: '在职'
},
2: {
1: {
text: '出差',
},
3: {
2: {
text: '离职',
}
},
render: (_, record) => (
<>
{
record.stutas === 1 ?
record.status === 0 ?
<div style={{ color: 'green' }}>
在职
</div>
:
(record.stutas === 2 ? <div style={{ color: 'Orange' }}>
(record.status === 1 ? <div style={{ color: 'Orange' }}>
出差
</div> : <div style={{ color: 'red' }}>
离职
@@ -185,53 +130,60 @@ const User: React.FC = () => {
key: 'action',
render: (_, record) => (
<Space size="middle" >
{
<a onClick={() => {
setIsAccountVisible(true);
formAccount.setFieldValue('tB_Employee_Id', record.id);
formAccount.setFieldValue('account', record.account!);
}}>账户设置</a>
{
<a onClick={() => {
setIsAccountVisible(true);
formAccount.setFieldValue('tB_Employee_Id', record.id);
formAccount.setFieldValue('account', record.account!);
}}>设置登录账号</a>
}
<a onClick={async () => {
const response = await userAPI.RestoreAccount(record.id!);
if (response.data === true) {
message.success('成功!');
} else {
message.error(response.msg || '重置失败');
}
}}>重置密码</a>
<Popconfirm
key="del"
title="确定要重置密码吗?"
onConfirm={async () => {
const response = await userAPI.RestoreAccount(record.id!);
if (response.data === true) {
message.success('成功!');
} else {
message.error(response.msg || '重置失败');
}
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<a >重置密码</a>
</Popconfirm>
<a onClick={() => {
setIsPersonDetailVisible(true);
setCurrentPerson(record);
const tempRecord = JSON.parse(JSON.stringify(record));
tempRecord.joinDate = moment(record.joinDate)
if (record.outDate !== null) {
tempRecord.outDate = moment(record.outDate)
}
form.setFieldsValue(tempRecord);
}}>查看详情</a>
}}>编辑</a>
<Popconfirm
key="del"
title="确定要删除此条数据吗?"
onConfirm={ async() => {
const response = await userAPI.RemoveUser(record.id!);
if (response.data === true) {
message.success('删除成功!');
actionRef.current?.reload();
} else {
message.error(response.msg || '删除失败');
}
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除员工</Button>
</Popconfirm>
key="del"
title="确定要删除此条数据吗?"
onConfirm={async () => {
const response = await userAPI.RemoveUser(record.id!);
if (response.data === true) {
message.success('删除成功!');
actionRef.current?.reload();
} else {
message.error(response.msg || '删除失败');
}
}}
onCancel={() => {
message.info('已取消删除');
}}
okText="确认"
cancelText="关闭"
>
<Button type="primary" danger ghost>删除员工</Button>
</Popconfirm>
</Space>
),
},
@@ -239,17 +191,12 @@ const User: React.FC = () => {

const onAddPerson = () => {
setCurrentPerson({
phone: '',
joinDate: '',
outDate: '',
idCard: '',
stutas: 1,
tB_RoleId: '',
status: 1,
roleId: '',
gender: 1,
id: '',
sort: 1,
name: '',
iCCard: ''
name: ''
});
form.resetFields();
setIsPersonDetailVisible(true);
@@ -266,14 +213,18 @@ const User: React.FC = () => {
message.error(response.msg || '获取角色列表失败');
}
}

useEffect(() => {
if (isPersonDetailVisible) {
onFetchRoleList();
}
}, [isPersonDetailVisible])
/**
* 新增/更新人员信息
*/
const onFinishPerson = async (user: UserTypes.PersonnelType) => {
if (user.id) {
const response = await userAPI.ModifyUser(user);
if (response.data===true) {
if (response.data === true) {
message.success('更新用户信息成功!');
setIsPersonDetailVisible(false);
} else {
@@ -289,7 +240,7 @@ const User: React.FC = () => {
}
}
actionRef.current?.reload();
onFetchRoleList();
}
/**
* 绑定用户账户
@@ -307,7 +258,7 @@ const User: React.FC = () => {
}
}


useEffect(() => {
onFetchRoleList();
@@ -321,8 +272,7 @@ const User: React.FC = () => {
cardBordered
request={async (params = {}) => {
const response = await userAPI.GetUserPagedList({
keyword: params.name,
joinDate: params.joinDate,
name: params.name,
status: params.status,
pageIndex: params.current || 1,
pageSize: params.pageSize || 10,
@@ -369,14 +319,6 @@ const User: React.FC = () => {
<Input />
</Form.Item>

<Form.Item
label="电话"
name="phone"
rules={[{ required: true, message: '请输入联系电话!' }]}
>
<Input />
</Form.Item>

<Form.Item
label="姓名"
name="name"
@@ -385,28 +327,20 @@ const User: React.FC = () => {
<Input />
</Form.Item>

<Form.Item
label="身份证"
name="idCard"
rules={[{ required: true, message: '请输入身份证!' }]}
>
<Input />
</Form.Item>

<Form.Item
label="性别"
name="gender"
rules={[{ required: true, message: '请选择性别!' }]}
>
<Select style={{ width: '100%' }}>
<Select.Option value={1}>男</Select.Option>
<Select.Option value={2}>女</Select.Option>
<Select.Option value={0}>男</Select.Option>
<Select.Option value={1}>女</Select.Option>
</Select>
</Form.Item>

<Form.Item
label="角色"
name="tB_RoleId"
name="roleId"
rules={[{ required: true, message: '请选择角色!' }]}
>
<Select style={{ width: '100%' }}>
@@ -420,32 +354,16 @@ const User: React.FC = () => {

<Form.Item
label="状态"
name="stutas"
name="status"
rules={[{ required: true, message: '请选择状态!' }]}
>
<Select style={{ width: '100%' }}>
<Select.Option value={1}>在职</Select.Option>
<Select.Option value={2}>出差</Select.Option>
<Select.Option value={3}>离职</Select.Option>
<Select.Option value={0}>在职</Select.Option>
<Select.Option value={1}>出差</Select.Option>
<Select.Option value={2}>离职</Select.Option>
</Select>
</Form.Item>

<Form.Item
label="入职日期"
name="joinDate"
rules={[{ required: true, message: '请输入入职日期!' }]}
>
<DatePicker format="YYYY-MM-DD" />
</Form.Item>

<Form.Item
label="离职日期"
name="outDate"
rules={[{ required: false, message: '请输入离职日期!' }]}
>
<DatePicker format="YYYY-MM-DD" />
</Form.Item>

<Form.Item >
<Button type="primary" htmlType="submit">
确定
@@ -453,18 +371,17 @@ const User: React.FC = () => {
</Form.Item>
</Form>
</Modal>
<Modal footer={null} width={500} title='用户账户' open={isAccountVisible}
onOk={()=>
{
formAccount?.resetFields();
setIsAccountVisible(false)
}}
onCancel={()=>{
formAccount?.resetFields();
setIsAccountVisible(false)
<Modal footer={null} width={500} title='用户账户' open={isAccountVisible}
onOk={() => {
formAccount?.resetFields();
setIsAccountVisible(false)

}}
onCancel={() => {
formAccount?.resetFields();
setIsAccountVisible(false)
}
}>
}>
<Form
form={formAccount}
name="basic"


+ 5
- 1
frontend/src/types/Account.d.ts View File

@@ -42,5 +42,9 @@ declare namespace Account {
*/
newPwd: string;
}

interface Page {
pageIndex:number,
pageSize:number
account:string
}
}

+ 5
- 41
frontend/src/types/UserTypes.d.ts View File

@@ -31,62 +31,26 @@ declare namespace UserTypes {
* @memberof TBEmployeeDTO
*/
gender?: number;
/**
* 手机号
* @type {string}
* @memberof TBEmployeeDTO
*/
phone?: string | null;
/**
* 员工IC卡
* @type {string}
* @memberof TBEmployeeDTO
*/
icCard?: string | null;
/**
* 头像
* @type {string}
* @memberof TBEmployeeDTO
*/
header?: string | null;
/**
* 入职时间
* @type {Date}
* @memberof TBEmployeeDTO
*/
joinDate?: Date;
/**
* 离职时间
* @type {Date}
* @memberof TBEmployeeDTO
*/
outDate?: Date | null;
/**
* 身份证
* @type {string}
* @memberof TBEmployeeDTO
*/
idCard?: string | null;
/**
* 1在职2出差3离职
* @type {number}
* @memberof TBEmployeeDTO
*/
stutas?: number;
status?: number;
/**
* 角色Id
* @type {string}
* @memberof TBEmployeeDTO
*/
tB_Role_Id?: string | null;
roleId?: string | null;

isAccount: boolean;
isAccount?: null | boolean ;
}

//人员分页查询参数
type UserPageParams = {
keyword: string,
joinDate: string?,
name: string,
status: number?,
pageIndex: number,
pageSize: number,


Loading…
Cancel
Save