diff --git a/SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml b/SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml index cf583dd..6a60cc3 100644 --- a/SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml +++ b/SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml @@ -1020,6 +1020,67 @@ + + + id + + + + + 院系名称 + + + + + 院系编码 + + + + + 院系名称 + + + + + 添加 + + 添加参数 + + + + + 修改 + + 添加参数 + + + + + 获取详情 + + + + + + + 删除 + + id + + + + + 获取列表 + + + + + + 不分页获取列表 + + + + ID @@ -1178,6 +1239,82 @@ + + + 专业名称 + + + + + 专业编码 + + + + + 专业简介 + + + + + 院系id + + + + + 专业名称 + + + + + 专业编码 + + + + + 院系id + + + + + 添加 + + 添加参数 + + + + + 修改 + + 添加参数 + + + + + 获取详情 + + + + + + + 删除 + + id + + + + + 获取列表 + + + + + + 获取列表不分页 + + + + 主键Id @@ -1460,6 +1597,11 @@ 班级名称 + + + 专业id + + 添加班级 @@ -1480,7 +1622,7 @@ - + 获取底库列表 diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/DepartmentService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/DepartmentService.cs new file mode 100644 index 0000000..d192df8 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/DepartmentService.cs @@ -0,0 +1,75 @@ +namespace SafeCampus.Application.Services.Business.DepartmentService; + +public class DepartmentService: DbRepository, IDepartmentService +{ + public async Task Add(DepartmentDto input) + { + var model = input.Adapt(); + await InsertAsync(model); + return true; + } + + public async Task Update(DepartmentDto input) + { + if (!input.Id.HasValue) + { + throw Oops.Oh("请填写ID"); + } + var model = await GetFirstAsync(p => p.Id == input.Id); + if (model == null) + { + throw Oops.Oh("信息不存在"); + } + var res = input.Adapt(model); + await UpdateAsync(res); + return true; + } + + public async Task GetInfo(long id) + { + var query = await Context.Queryable() + .FirstAsync(x => x.Id == id); + return query.Adapt(); + } + + public async Task Delete(List id) + { + var majorInfo = ChangeRepository>();//切换仓储 + + var model = await GetListAsync(x => id.Contains(x.Id)); + if (!model.Any()) + { + throw Oops.Oh("信息不存在"); + } + foreach (var departmentInfo in model) + { + var isOK = await majorInfo.IsAnyAsync(x => x.DepId == departmentInfo.Id); + if (isOK) + { + throw Oops.Oh($"{departmentInfo.Name}院系下还有专业禁止删除!"); + } + } + await DeleteAsync(model); + return true; + } + + public async Task> GetPageList(DepartmentSearch search) + { + var query = Context.Queryable() + .WhereIF(!string.IsNullOrEmpty(search.Name), x => x.Name.Contains(search.Name)); + + var list = await query.OrderByDescending(x => x.Code) + .ToPagedListAsyncMapster(search.PageNum, search.PageSize); + return list; + } + + public async Task> GetNoPageList(DepartmentSearch search) + { + var query = Context.Queryable() + .WhereIF(!string.IsNullOrEmpty(search.Name), x => x.Name.Contains(search.Name)); + + var list = await query.OrderByDescending(x => x.Code) + .ToListAsync(); + return list.Adapt>(); + } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentDto.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentDto.cs new file mode 100644 index 0000000..d22eabc --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentDto.cs @@ -0,0 +1,17 @@ +namespace SafeCampus.Application.Services.Business.DepartmentService; + +public class DepartmentDto +{ + /// + /// id + /// + public long? Id { get; set; } + /// + /// 院系名称 + /// + public string Name { get; set; } + /// + /// 院系编码 + /// + public string Code { get; set; } +} diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentSearch.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentSearch.cs new file mode 100644 index 0000000..689692b --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/Dto/DepartmentSearch.cs @@ -0,0 +1,9 @@ +namespace SafeCampus.Application.Services.Business.DepartmentService; + +public class DepartmentSearch: BasePageInput +{ + /// + /// 院系名称 + /// + public string Name { get; set; } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/IDepartmentService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/IDepartmentService.cs new file mode 100644 index 0000000..4894f86 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/DepartmentService/IDepartmentService.cs @@ -0,0 +1,40 @@ +namespace SafeCampus.Application.Services.Business.DepartmentService; + +public interface IDepartmentService : ITransient +{ + /// + /// 添加 + /// + /// 添加参数 + /// + Task Add(DepartmentDto input); + /// + /// 修改 + /// + /// 添加参数 + /// + Task Update(DepartmentDto input); + /// + /// 获取详情 + /// + /// + /// + Task GetInfo(long id); + /// + /// 删除 + /// + /// id + /// + Task Delete(List id); + /// + /// 获取列表 + /// + /// + Task> GetPageList(DepartmentSearch search); + /// + /// 不分页获取列表 + /// + /// + /// + Task> GetNoPageList(DepartmentSearch search); +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorDto.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorDto.cs new file mode 100644 index 0000000..fa66126 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorDto.cs @@ -0,0 +1,35 @@ +using SafeCampus.Application.Services.Business.DepartmentService; + +namespace SafeCampus.Application.Services.Business.MajorService; + +public class MajorDto +{ + public long? Id { get; set; } + /// + /// 专业名称 + /// + public string Name { get; set; } + /// + /// 专业编码 + /// + public string Code { get; set; } + /// + /// 专业简介 + /// + public string Introduce { get; set; } + /// + /// 院系id + /// + public long DepId { get; set; } + + public string DepartmentName { get; set; } +} + +public class MajorDtoMapper : IRegister +{ + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(x => x.DepartmentName, x => x.DepartmentInfoItem.Name); + } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorSearch.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorSearch.cs new file mode 100644 index 0000000..3f48dfc --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/Dto/MajorSearch.cs @@ -0,0 +1,17 @@ +namespace SafeCampus.Application.Services.Business.MajorService; + +public class MajorSearch:BasePageInput +{ + /// + /// 专业名称 + /// + public string Name { get; set; } + /// + /// 专业编码 + /// + public string Code { get; set; } + /// + /// 院系id + /// + public long? DepId { get; set; } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/IMajorService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/IMajorService.cs new file mode 100644 index 0000000..0758c40 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/IMajorService.cs @@ -0,0 +1,40 @@ +namespace SafeCampus.Application.Services.Business.MajorService; + +public interface IMajorService : ITransient +{ + /// + /// 添加 + /// + /// 添加参数 + /// + Task Add(MajorDto input); + /// + /// 修改 + /// + /// 添加参数 + /// + Task Update(MajorDto input); + /// + /// 获取详情 + /// + /// + /// + Task GetInfo(long id); + /// + /// 删除 + /// + /// id + /// + Task Delete(List id); + /// + /// 获取列表 + /// + /// + Task> GetPageList(MajorSearch search); + /// + /// 获取列表不分页 + /// + /// + /// + Task> GetNoPageList(MajorSearch search); +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs new file mode 100644 index 0000000..3c329b1 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs @@ -0,0 +1,80 @@ +namespace SafeCampus.Application.Services.Business.MajorService; + +public class MajorService: DbRepository, IMajorService +{ + public async Task Add(MajorDto input) + { + var model = input.Adapt(); + await InsertAsync(model); + return true; + } + + public async Task Update(MajorDto input) + { + if (!input.Id.HasValue) + { + throw Oops.Oh("请填写ID"); + } + var model = await GetFirstAsync(p => p.Id == input.Id); + if (model == null) + { + throw Oops.Oh("信息不存在"); + } + var res = input.Adapt(model); + await UpdateAsync(res); + return true; + } + + public async Task GetInfo(long id) + { + var query = await Context.Queryable() + .Includes(x => x.DepartmentInfoItem) + .FirstAsync(x => x.Id == id); + return query.Adapt(); + } + + public async Task Delete(List id) + { + var personSetInfo = ChangeRepository>();//切换仓储 + var model = await GetListAsync(x => id.Contains(x.Id)); + if (!model.Any()) + { + throw Oops.Oh("信息不存在"); + } + foreach (var majorInfo in model) + { + var isOK = await personSetInfo.IsAnyAsync(x => x.MajorId == majorInfo.Id); + if (isOK) + { + throw Oops.Oh($"{majorInfo.Name}专业下还有班级禁止删除!"); + } + } + await DeleteAsync(model); + return true; + } + + public async Task> GetPageList(MajorSearch search) + { + var query = Context.Queryable() + .Includes(x=>x.DepartmentInfoItem) + .WhereIF(!string.IsNullOrEmpty(search.Name), x => x.Name.Contains(search.Name)) + .WhereIF(!string.IsNullOrEmpty(search.Code),x=>x.Code.Contains(search.Code)) + .WhereIF(search.DepId.HasValue,x=>x.DepId==search.DepId); + + var list = await query.OrderByDescending(x => x.Sort) + .ToPagedListAsyncMapster(search.PageNum, search.PageSize); + return list; + } + + public async Task> GetNoPageList(MajorSearch search) + { + var query = Context.Queryable() + .Includes(x => x.DepartmentInfoItem) + .WhereIF(!string.IsNullOrEmpty(search.Name), x => x.Name.Contains(search.Name)) + .WhereIF(!string.IsNullOrEmpty(search.Code), x => x.Code.Contains(search.Code)) + .WhereIF(search.DepId.HasValue, x => x.DepId == search.DepId); + + var list = await query.OrderByDescending(x => x.Sort).ToListAsync(); + return list.Adapt>(); + } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs index 552ad75..2626c1d 100644 --- a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs @@ -10,9 +10,15 @@ public class PersonSetInfoDto /// 班级名称 /// public string PersonSetName { get; set; } + /// + /// 专业id + /// + public long MajorId { get; set; } public string UserId { get; set; } public string UserName { get; set; } + public string MajorName { get; set; } + public string DepartmentName { get; set; } } public class PersonSetInfoDtoMapper : IRegister @@ -21,6 +27,8 @@ public class PersonSetInfoDtoMapper : IRegister { config.ForType() .Map(x => x.UserId, x => x.ClassTeacherItem.UserId) - .Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name); + .Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name) + .Map(x=>x.DepartmentName,x=>x.MajorInfoItem.DepartmentInfoItem.Name) + .Map(x=>x.MajorName,x=>x.MajorInfoItem.Name); } } \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs index f861a1e..01d60aa 100644 --- a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/IPersonSetInfoService.cs @@ -23,5 +23,5 @@ public interface IPersonSetInfoService:ITransient /// 获取底库列表 /// /// - Task> GetPageList(); + Task> GetPageList(long? majorId); } \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs index 54fe191..8f2dda1 100644 --- a/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs +++ b/SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs @@ -38,10 +38,12 @@ public class PersonSetInfoService:DbRepository, IPersonSetInfoSer return true; } - public async Task> GetPageList() + public async Task> GetPageList(long? majorId) { var list =await Context.Queryable() + .Includes(x=>x.MajorInfoItem,x=>x.DepartmentInfoItem) .Where(x=>x.PersonSetId!=SafeCampusConst.ZDRY) + .WhereIF(majorId.HasValue,x=>x.MajorId==majorId) .Includes(x => x.ClassTeacherItem, st => st.SysUserItem) .ToListAsync(); return list.Adapt>(); diff --git a/SafeCampus.API/SafeCampus.System/Entity/DepartmentInfo.cs b/SafeCampus.API/SafeCampus.System/Entity/DepartmentInfo.cs new file mode 100644 index 0000000..02d03d6 --- /dev/null +++ b/SafeCampus.API/SafeCampus.System/Entity/DepartmentInfo.cs @@ -0,0 +1,20 @@ +namespace SafeCampus.System; +[SugarTable("DepartmentInfo", TableDescription = "院系信息表")] +[Tenant(SqlSugarConst.DB_DEFAULT)] +[BatchEdit] +[CodeGen] +//[IgnoreInitTable] +public class DepartmentInfo : PrimaryKeyEntity +{ + /// + /// 院系名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "院系名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] + public string Name { get; set; } + /// + /// 院系编码 + /// + [SugarColumn(ColumnName = "Code", ColumnDescription = "院系编码", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] + public string Code { get; set; } + +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.System/Entity/MajorInfo.cs b/SafeCampus.API/SafeCampus.System/Entity/MajorInfo.cs new file mode 100644 index 0000000..f4a47d1 --- /dev/null +++ b/SafeCampus.API/SafeCampus.System/Entity/MajorInfo.cs @@ -0,0 +1,39 @@ +namespace SafeCampus.System; +[SugarTable("MajorInfo", TableDescription = "专业信息表")] +[Tenant(SqlSugarConst.DB_DEFAULT)] +[BatchEdit] +[CodeGen] +//[IgnoreInitTable] +public class MajorInfo : PrimaryKeyEntity +{ + /// + /// 专业名称 + /// + [SugarColumn(ColumnName = "Name", ColumnDescription = "专业名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] + public string Name { get; set; } + /// + /// 专业编码 + /// + [SugarColumn(ColumnName = "Code", ColumnDescription = "专业编码", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] + public string Code { get; set; } + /// + /// 专业简介 + /// + [SugarColumn(ColumnName = "Introduce", ColumnDescription = "专业简介", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)] + public string Introduce { get; set; } + /// + /// 院系id + /// + [SugarColumn(ColumnName = "DepId", ColumnDescription = "院系id",IsNullable = false)] + public long DepId { get; set; } + /// + /// 排序 + /// + [SugarColumn(ColumnName = "Sort", ColumnDescription = "排序", IsNullable = false)] + public int Sort { get; set; } + /// + /// 院系信息 + /// + [Navigate(NavigateType.OneToOne, nameof(DepartmentInfo.Id), nameof(DepId))] + public DepartmentInfo DepartmentInfoItem { get; set; } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs b/SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs index b900d26..eee9061 100644 --- a/SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs +++ b/SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs @@ -3,7 +3,7 @@ [Tenant(SqlSugarConst.DB_DEFAULT)] [BatchEdit] [CodeGen] -[IgnoreInitTable] +//[IgnoreInitTable] public class PersonSetInfo { /// @@ -17,6 +17,16 @@ public class PersonSetInfo [SugarColumn(ColumnName = "PersonSetName", ColumnDescription = "班级名称", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] public string PersonSetName { get; set; } /// + /// 专业id + /// + [SugarColumn(ColumnName = "MajorId", ColumnDescription = "专业id", IsNullable = false)] + public long MajorId { get; set; } + /// + /// 专业信息 + /// + [Navigate(NavigateType.OneToOne, nameof(MajorInfo.Id), nameof(MajorId))] + public MajorInfo MajorInfoItem { get; set; } + /// /// 班主任信息 /// [Navigate(NavigateType.OneToOne, nameof(ClassTeacher.PersonSetId),nameof(PersonSetId))] diff --git a/SafeCampus.API/SafeCampus.System/Entity/System/SysDict.cs b/SafeCampus.API/SafeCampus.System/Entity/System/SysDict.cs index 16d672a..f7c9a1a 100644 --- a/SafeCampus.API/SafeCampus.System/Entity/System/SysDict.cs +++ b/SafeCampus.API/SafeCampus.System/Entity/System/SysDict.cs @@ -37,8 +37,6 @@ public class SysDict : BaseEntity /// [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码")] public int SortCode { get; set; } - - /// /// 子节点 /// diff --git a/SafeCampus.API/SafeCampus.System/SafeCampus.System.xml b/SafeCampus.API/SafeCampus.System/SafeCampus.System.xml index e373eb4..3c2c680 100644 --- a/SafeCampus.API/SafeCampus.System/SafeCampus.System.xml +++ b/SafeCampus.API/SafeCampus.System/SafeCampus.System.xml @@ -1071,6 +1071,16 @@ 班主任信息 + + + 院系名称 + + + + + 院系编码 + + 寝室名称 @@ -1101,6 +1111,36 @@ 宿舍楼信息 + + + 专业名称 + + + + + 专业编码 + + + + + 专业简介 + + + + + 院系id + + + + + 排序 + + + + + 院系信息 + + 查询时间 @@ -1241,6 +1281,16 @@ 班级名称 + + + 专业id + + + + + 专业信息 + + 班主任信息 diff --git a/SafeCampus.API/SafeCampus.Web.Core/Components/AuthComponent.cs b/SafeCampus.API/SafeCampus.Web.Core/Components/AuthComponent.cs index cc667d3..8fdb6f7 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Components/AuthComponent.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Components/AuthComponent.cs @@ -1,14 +1,4 @@ - -// - - - - - - - - -using Microsoft.AspNetCore.Authentication.JwtBearer; +using Microsoft.AspNetCore.Authentication.JwtBearer; namespace SafeCampus.Web.Core; diff --git a/SafeCampus.API/SafeCampus.Web.Core/Components/WebSettingsComponent.cs b/SafeCampus.API/SafeCampus.Web.Core/Components/WebSettingsComponent.cs index 66e3bc6..9f95839 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Components/WebSettingsComponent.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Components/WebSettingsComponent.cs @@ -1,14 +1,4 @@ - -// - - - - - - - - -namespace SafeCampus.Web.Core; +namespace SafeCampus.Web.Core; /// /// Web设置组件 diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DepartmentController.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DepartmentController.cs new file mode 100644 index 0000000..a6df05f --- /dev/null +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DepartmentController.cs @@ -0,0 +1,78 @@ + +using SafeCampus.Application.Services.Business.DepartmentService; + +namespace SafeCampus.Web.Core.Controllers.Application.Business; +/// +///系部管理接口 +/// +[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 83, Tag = "系部管理")] +[Route("/business/department")] +[RolePermission] +public class DepartmentController +{ + private readonly IDepartmentService _departmentService; + + public DepartmentController(IDepartmentService departmentService) + { + _departmentService = departmentService; + } + + /// + /// 添加 + /// + /// 添加参数 + /// + public async Task Add(DepartmentDto input) + { + return await _departmentService.Add(input); + } + + /// + /// 修改 + /// + /// 添加参数 + /// + public async Task Update(DepartmentDto input) + { + return await _departmentService.Update(input); + } + + /// + /// 获取详情 + /// + /// + /// + public async Task GetInfo(long id) + { + return await _departmentService.GetInfo(id); + } + + /// + /// 删除 + /// + /// id + /// + public async Task Delete(List id) + { + return await _departmentService.Delete(id); + } + + /// + /// 获取列表 + /// + /// + public async Task> GetPageList(DepartmentSearch search) + { + return await _departmentService.GetPageList(search); + } + + /// + /// 不分页获取列表 + /// + /// + /// + public async Task> GetNoPageList(DepartmentSearch search) + { + return await _departmentService.GetNoPageList(search); + } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs index a8c5985..7934b6c 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs @@ -45,7 +45,7 @@ public class DfieldApi : IDynamicApiController var model = JsonConvert.DeserializeObject(str); if ((bool)model["success"]) { - await _personSetInfoService.Add(new PersonSetInfoDto{PersonSetId = personSetId ,PersonSetName = input.Name}); + await _personSetInfoService.Add(new PersonSetInfoDto{PersonSetId = personSetId ,PersonSetName = input.Name,MajorId = input.MagjorId}); return model["data"]; } @@ -55,9 +55,9 @@ public class DfieldApi : IDynamicApiController /// 查询底库列表 /// /// - public async Task QueryAll() + public async Task QueryAll(long? majorId) { - return await _personSetInfoService.GetPageList(); + return await _personSetInfoService.GetPageList(majorId); var appSettings = App.GetOptionsMonitor(); var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/set/queryAll" .SetBody(new @@ -151,7 +151,8 @@ public class DfieldApi : IDynamicApiController await _personSetInfoService.Update(new PersonSetInfoDto { PersonSetId = input.Id, - PersonSetName = input.Name + PersonSetName = input.Name, + MajorId = input.MagjorId }); } return isOk; diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DormitoryController.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DormitoryController.cs index 07a367f..5d2839c 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DormitoryController.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DormitoryController.cs @@ -112,7 +112,7 @@ public class DormitoryController public async Task GetReturnInfo(long id,DateTime returnTime) { var model= await _dormitoryService.GetReturnInfo(id, returnTime); - model.AttendanceDtos = model.AttendanceDtos?.GroupBy(x => x.PersonId).Select(x => x.FirstOrDefault()).ToList(); + model.AttendanceDtos = model.AttendanceDtos?.GroupBy(x => x.PersonId).Select(x => x.MaxBy(xx=>xx.Tick)).ToList(); foreach (var modelPersonInfo in model.PersonInfos) { modelPersonInfo.Attendances = null; @@ -145,7 +145,7 @@ public class DormitoryController configId = queryList["data"][0]["configId"].ParseToInt(); } var time = new { timeBegin = input.TimeBegin, timeEnd = input.TimeEnd }; - var personSetIds = await _personSetInfoService.GetPageList(); + var personSetIds = await _personSetInfoService.GetPageList(null); var cameras = await _cameraInfoService.GetPageList(new CameraSearch{PageSize = 1000,PageNum = 1}); var body = new { diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs index 0d5cdd5..8f9a958 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs @@ -10,6 +10,10 @@ public class ControllersNameInput { [IdNotNull(ErrorMessage = "name不能为空")] public string Name { get; set; } + /// + /// 专业id + /// + public long MagjorId { get; set; } } public class ControllersIdInput { diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/MajorController.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/MajorController.cs new file mode 100644 index 0000000..b06b794 --- /dev/null +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/MajorController.cs @@ -0,0 +1,77 @@ +using SafeCampus.Application.Services.Business.MajorService; + +namespace SafeCampus.Web.Core.Controllers.Application.Business; +/// +///专业管理接口 +/// +[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 82, Tag = "专业管理")] +[Route("/business/major")] +[RolePermission] +public class MajorController +{ + private readonly IMajorService _majorService; + + public MajorController(IMajorService majorService) + { + _majorService = majorService; + } + + /// + /// 添加 + /// + /// 添加参数 + /// + public async Task Add(MajorDto input) + { + return await _majorService.Add(input); + } + + /// + /// 修改 + /// + /// 添加参数 + /// + public async Task Update(MajorDto input) + { + return await _majorService.Update(input); + } + + /// + /// 获取详情 + /// + /// + /// + public async Task GetInfo(long id) + { + return await _majorService.GetInfo(id); + } + + /// + /// 删除 + /// + /// id + /// + public async Task Delete(List id) + { + return await _majorService.Delete(id); + } + + /// + /// 获取列表 + /// + /// + public async Task> GetPageList(MajorSearch search) + { + return await _majorService.GetPageList(search); + } + + /// + /// 获取列表不分页 + /// + /// + /// + public async Task> GetNoPageList(MajorSearch search) + { + return await _majorService.GetNoPageList(search); + } +} \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs index da95022..b0f223d 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs +++ b/SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs @@ -13,6 +13,8 @@ using SafeCampus.Web.Core.Controllers.Application.Business; using MoYu.RemoteRequest.Extensions; using Newtonsoft.Json.Linq; using SafeCampus.Application.Manager.DeepelephManager; +using SafeCampus.Application.Services.Business.DepartmentService; +using SafeCampus.Application.Services.Business.MajorService; using SafeCampus.Application.Services.Business.PersonSetInfoService; namespace SafeCampus.Web.Core.Controllers.Application.LargeScreen; @@ -37,9 +39,11 @@ public class LargeScreenController private readonly IClassRoomCallService _classRoomCallService; private readonly IDeepelephManager _deepelephManager; private readonly IPersonSetInfoService _personSetInfoService; + private readonly IMajorService _majorService; + private readonly IDepartmentService _departmentService; - public LargeScreenController(IPersonInfoService personInfoService, ICameraGroupService cameraGroupService, IWarnInfoService warnInfoService, ISimpleCacheService simpleCacheService, IAttendanceService attendanceService, IBuildingService buildingService, IDormitoryService dormitoryService, IConfigService configService, IClassRoomCallTaskService classRoomCallTaskService, IClassRoomCallService classRoomCallService, IDeepelephManager deepelephManager, IPersonSetInfoService personSetInfoService) + public LargeScreenController(IPersonInfoService personInfoService, ICameraGroupService cameraGroupService, IWarnInfoService warnInfoService, ISimpleCacheService simpleCacheService, IAttendanceService attendanceService, IBuildingService buildingService, IDormitoryService dormitoryService, IConfigService configService, IClassRoomCallTaskService classRoomCallTaskService, IClassRoomCallService classRoomCallService, IDeepelephManager deepelephManager, IPersonSetInfoService personSetInfoService, IMajorService majorService, IDepartmentService departmentService) { _personInfoService = personInfoService; _cameraGroupService = cameraGroupService; @@ -53,6 +57,8 @@ public class LargeScreenController _classRoomCallService = classRoomCallService; _deepelephManager = deepelephManager; _personSetInfoService = personSetInfoService; + _majorService = majorService; + _departmentService = departmentService; } /// @@ -302,8 +308,25 @@ public class LargeScreenController /// 获取班级列表 /// /// - public async Task GetPersonSetNoPageList() + public async Task GetPersonSetNoPageList(long? majorId) { - return await _personSetInfoService.GetPageList(); + return await _personSetInfoService.GetPageList(majorId); + } + /// + /// 获取专业 + /// + /// 院系id + /// + public async Task GetMajorNoPageList(long? depId) + { + return await _majorService.GetNoPageList(new MajorSearch{DepId = depId}); + } + /// + /// 获取院系 + /// + /// + public async Task GetDepartment() + { + return await _departmentService.GetNoPageList(new DepartmentSearch()); } } \ No newline at end of file diff --git a/SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml b/SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml index 3d46a03..d5d602a 100644 --- a/SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml +++ b/SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml @@ -385,6 +385,52 @@ + + + 系部管理接口 + + + + + 添加 + + 添加参数 + + + + + 修改 + + 添加参数 + + + + + 获取详情 + + + + + + + 删除 + + id + + + + + 获取列表 + + + + + + 不分页获取列表 + + + + 设备管理接口 @@ -470,7 +516,7 @@ - + 查询底库列表 @@ -791,6 +837,11 @@ 结束时间 + + + 专业id + + 人员id @@ -882,6 +933,52 @@ 删除信息 + + + 专业管理接口 + + + + + 添加 + + 添加参数 + + + + + 修改 + + 添加参数 + + + + + 获取详情 + + + + + + + 删除 + + id + + + + + 获取列表 + + + + + + 获取列表不分页 + + + + 客流查询接口 @@ -1128,12 +1225,25 @@ - + 获取班级列表 + + + 获取专业 + + 院系id + + + + + 获取院系 + + + 场景code diff --git a/SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user b/SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user index 4595f3c..406f77c 100644 --- a/SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. <_PublishTargetUrl>F:\Project\QJKJ\SafeCampus\SafeCampus.API\SafeCampus.Web.Entry\bin\Release\net6.0\publish\ - True|2024-08-12T03:27:42.2864171Z;True|2024-08-09T14:54:42.9062124+08:00;True|2024-08-09T11:49:01.0339449+08:00;True|2024-08-09T11:43:21.9947939+08:00;True|2024-08-09T10:43:25.7641675+08:00;True|2024-08-08T15:23:17.0510180+08:00;True|2024-08-08T15:20:50.3450876+08:00;True|2024-08-08T11:06:43.0783261+08:00;True|2024-08-07T17:24:03.0780935+08:00;True|2024-08-07T17:20:50.6266614+08:00;True|2024-08-07T17:18:15.6367265+08:00;True|2024-08-06T17:31:40.3452266+08:00;True|2024-07-31T16:54:03.1890463+08:00;True|2024-07-30T17:11:33.2514194+08:00;True|2024-07-30T17:08:14.5888060+08:00;True|2024-07-30T09:56:08.6349163+08:00;True|2024-07-30T09:50:02.2368269+08:00;True|2024-07-29T16:20:12.3202393+08:00;True|2024-07-29T16:16:29.9634841+08:00;True|2024-07-29T16:09:51.7696392+08:00;True|2024-07-29T16:06:49.4145658+08:00;True|2024-07-29T15:58:50.6654249+08:00;True|2024-07-29T11:32:11.6206514+08:00;True|2024-07-29T11:26:26.1574563+08:00;True|2024-07-29T11:04:41.1896705+08:00;True|2024-07-29T10:38:38.4560275+08:00;True|2024-07-29T10:33:38.5288332+08:00;False|2024-07-29T10:33:21.0642261+08:00;False|2024-07-29T10:33:00.1005216+08:00;True|2024-07-29T09:54:59.2794860+08:00;True|2024-07-29T09:08:54.4899269+08:00;True|2024-07-26T18:02:13.5407348+08:00;True|2024-07-26T17:46:06.7922851+08:00;True|2024-07-26T15:50:48.6986834+08:00;True|2024-07-26T15:11:17.1696147+08:00;True|2024-07-26T13:58:49.6884964+08:00;True|2024-07-25T17:31:33.0050952+08:00;True|2024-07-25T17:09:12.7084910+08:00;True|2024-07-25T17:02:01.2617736+08:00;True|2024-07-25T16:59:51.6271873+08:00;True|2024-07-25T16:58:05.5249148+08:00;True|2024-07-25T14:14:10.2008367+08:00;False|2024-07-25T14:13:54.0300465+08:00;True|2024-07-25T14:08:57.0244482+08:00;True|2024-07-25T13:41:48.8201522+08:00;True|2024-07-25T10:41:30.7277553+08:00;True|2024-07-25T10:16:05.9105335+08:00;True|2024-07-24T15:31:54.7914854+08:00;True|2024-07-24T09:54:17.6182454+08:00;True|2024-07-23T17:01:18.1510211+08:00;True|2024-07-23T16:41:53.3366577+08:00;True|2024-07-23T16:07:25.4129335+08:00;True|2024-07-23T15:50:42.2437488+08:00;True|2024-07-23T15:19:00.1900116+08:00;True|2024-07-23T14:59:22.8551233+08:00;True|2024-07-23T14:19:55.1193373+08:00;True|2024-07-19T18:04:32.2703039+08:00;True|2024-07-19T15:56:25.4103701+08:00;True|2024-07-19T15:09:00.9662436+08:00;True|2024-07-19T15:05:35.7255851+08:00;True|2024-07-19T13:14:42.9559521+08:00;False|2024-07-19T11:37:52.4020673+08:00;True|2024-07-19T11:10:22.8661346+08:00;True|2024-07-19T11:00:00.8819251+08:00;True|2024-07-19T10:45:46.8271770+08:00;True|2024-07-19T10:45:03.8183458+08:00;True|2024-07-18T18:04:42.1000382+08:00;True|2024-07-18T18:01:51.3964409+08:00;True|2024-07-18T17:57:50.3509206+08:00;True|2024-07-18T16:32:46.2184830+08:00;True|2024-07-18T16:00:11.1381449+08:00;True|2024-07-18T15:11:52.6472758+08:00;True|2024-07-18T11:54:49.4848006+08:00;True|2024-07-18T09:25:58.7204846+08:00;True|2024-07-17T17:29:28.6175272+08:00;True|2024-07-17T17:10:54.5184246+08:00;True|2024-07-17T16:57:59.8174060+08:00;True|2024-07-17T16:18:13.8137834+08:00;True|2024-07-17T15:59:16.2360757+08:00;True|2024-07-17T15:31:41.9159909+08:00;True|2024-07-17T14:41:14.6127340+08:00;True|2024-07-17T14:28:53.4455461+08:00;True|2024-07-17T14:09:44.1826222+08:00;True|2024-07-17T13:57:12.3372528+08:00;True|2024-07-17T11:39:19.5754602+08:00;True|2024-07-16T17:44:10.6162562+08:00;True|2024-07-16T17:13:48.3928403+08:00;True|2024-07-16T17:00:47.7458109+08:00;True|2024-07-16T14:07:19.3463408+08:00;True|2024-07-15T16:05:13.3561511+08:00;True|2024-07-15T16:03:45.7866063+08:00;True|2024-07-15T13:25:00.0791938+08:00;True|2024-07-12T13:45:20.6945520+08:00;True|2024-07-12T13:07:01.3911178+08:00;False|2024-07-12T13:06:45.7048568+08:00;True|2024-07-12T13:06:03.7557254+08:00;False|2024-07-12T11:51:55.8228106+08:00;True|2024-07-12T09:11:11.9982410+08:00;True|2024-07-12T09:10:42.9689716+08:00;True|2024-07-12T09:08:04.7560729+08:00; + True|2024-08-19T05:38:29.9236695Z;False|2024-08-19T13:29:18.8873264+08:00;True|2024-08-19T12:31:57.9280692+08:00;True|2024-08-19T11:50:36.7241244+08:00;True|2024-08-19T10:24:05.0018377+08:00;True|2024-08-19T10:23:30.0445364+08:00;True|2024-08-19T10:12:33.8316906+08:00;True|2024-08-19T10:10:48.0967630+08:00;True|2024-08-16T12:17:51.5743944+08:00;True|2024-08-16T11:36:15.1880346+08:00;True|2024-08-12T11:27:42.2864171+08:00;True|2024-08-09T14:54:42.9062124+08:00;True|2024-08-09T11:49:01.0339449+08:00;True|2024-08-09T11:43:21.9947939+08:00;True|2024-08-09T10:43:25.7641675+08:00;True|2024-08-08T15:23:17.0510180+08:00;True|2024-08-08T15:20:50.3450876+08:00;True|2024-08-08T11:06:43.0783261+08:00;True|2024-08-07T17:24:03.0780935+08:00;True|2024-08-07T17:20:50.6266614+08:00;True|2024-08-07T17:18:15.6367265+08:00;True|2024-08-06T17:31:40.3452266+08:00;True|2024-07-31T16:54:03.1890463+08:00;True|2024-07-30T17:11:33.2514194+08:00;True|2024-07-30T17:08:14.5888060+08:00;True|2024-07-30T09:56:08.6349163+08:00;True|2024-07-30T09:50:02.2368269+08:00;True|2024-07-29T16:20:12.3202393+08:00;True|2024-07-29T16:16:29.9634841+08:00;True|2024-07-29T16:09:51.7696392+08:00;True|2024-07-29T16:06:49.4145658+08:00;True|2024-07-29T15:58:50.6654249+08:00;True|2024-07-29T11:32:11.6206514+08:00;True|2024-07-29T11:26:26.1574563+08:00;True|2024-07-29T11:04:41.1896705+08:00;True|2024-07-29T10:38:38.4560275+08:00;True|2024-07-29T10:33:38.5288332+08:00;False|2024-07-29T10:33:21.0642261+08:00;False|2024-07-29T10:33:00.1005216+08:00;True|2024-07-29T09:54:59.2794860+08:00;True|2024-07-29T09:08:54.4899269+08:00;True|2024-07-26T18:02:13.5407348+08:00;True|2024-07-26T17:46:06.7922851+08:00;True|2024-07-26T15:50:48.6986834+08:00;True|2024-07-26T15:11:17.1696147+08:00;True|2024-07-26T13:58:49.6884964+08:00;True|2024-07-25T17:31:33.0050952+08:00;True|2024-07-25T17:09:12.7084910+08:00;True|2024-07-25T17:02:01.2617736+08:00;True|2024-07-25T16:59:51.6271873+08:00;True|2024-07-25T16:58:05.5249148+08:00;True|2024-07-25T14:14:10.2008367+08:00;False|2024-07-25T14:13:54.0300465+08:00;True|2024-07-25T14:08:57.0244482+08:00;True|2024-07-25T13:41:48.8201522+08:00;True|2024-07-25T10:41:30.7277553+08:00;True|2024-07-25T10:16:05.9105335+08:00;True|2024-07-24T15:31:54.7914854+08:00;True|2024-07-24T09:54:17.6182454+08:00;True|2024-07-23T17:01:18.1510211+08:00;True|2024-07-23T16:41:53.3366577+08:00;True|2024-07-23T16:07:25.4129335+08:00;True|2024-07-23T15:50:42.2437488+08:00;True|2024-07-23T15:19:00.1900116+08:00;True|2024-07-23T14:59:22.8551233+08:00;True|2024-07-23T14:19:55.1193373+08:00;True|2024-07-19T18:04:32.2703039+08:00;True|2024-07-19T15:56:25.4103701+08:00;True|2024-07-19T15:09:00.9662436+08:00;True|2024-07-19T15:05:35.7255851+08:00;True|2024-07-19T13:14:42.9559521+08:00;False|2024-07-19T11:37:52.4020673+08:00;True|2024-07-19T11:10:22.8661346+08:00;True|2024-07-19T11:00:00.8819251+08:00;True|2024-07-19T10:45:46.8271770+08:00;True|2024-07-19T10:45:03.8183458+08:00;True|2024-07-18T18:04:42.1000382+08:00;True|2024-07-18T18:01:51.3964409+08:00;True|2024-07-18T17:57:50.3509206+08:00;True|2024-07-18T16:32:46.2184830+08:00;True|2024-07-18T16:00:11.1381449+08:00;True|2024-07-18T15:11:52.6472758+08:00;True|2024-07-18T11:54:49.4848006+08:00;True|2024-07-18T09:25:58.7204846+08:00;True|2024-07-17T17:29:28.6175272+08:00;True|2024-07-17T17:10:54.5184246+08:00;True|2024-07-17T16:57:59.8174060+08:00;True|2024-07-17T16:18:13.8137834+08:00;True|2024-07-17T15:59:16.2360757+08:00;True|2024-07-17T15:31:41.9159909+08:00;True|2024-07-17T14:41:14.6127340+08:00;True|2024-07-17T14:28:53.4455461+08:00;True|2024-07-17T14:09:44.1826222+08:00;True|2024-07-17T13:57:12.3372528+08:00;True|2024-07-17T11:39:19.5754602+08:00;True|2024-07-16T17:44:10.6162562+08:00;True|2024-07-16T17:13:48.3928403+08:00;True|2024-07-16T17:00:47.7458109+08:00;True|2024-07-16T14:07:19.3463408+08:00;True|2024-07-15T16:05:13.3561511+08:00; \ No newline at end of file diff --git a/SafeCampus.WEB/components.d.ts b/SafeCampus.WEB/components.d.ts index 84a8379..fb733d8 100644 --- a/SafeCampus.WEB/components.d.ts +++ b/SafeCampus.WEB/components.d.ts @@ -12,6 +12,7 @@ declare module 'vue' { 500: typeof import('./src/components/ErrorMessage/500.vue')['default'] CheckCard: typeof import('./src/components/CheckCard/index.vue')['default'] ChooseModule: typeof import('./src/components/ChooseModule/index.vue')['default'] + ClassUserselector: typeof import('./src/components/Selectors/ClassUserselector/index.vue')['default'] CodeHighLight: typeof import('./src/components/CodeHighLight/index.vue')['default'] ColSetting: typeof import('./src/components/ProTable/components/ColSetting.vue')['default'] CropUpload: typeof import('./src/components/CropUpload/index.vue')['default'] @@ -19,13 +20,14 @@ declare module 'vue' { ECharts: typeof import('./src/components/ECharts/index.vue')['default'] ElAside: typeof import('element-plus/es')['ElAside'] ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete'] - ElBadge: typeof import('element-plus/es')['ElBadge'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCol: typeof import('element-plus/es')['ElCol'] ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] ElContainer: typeof import('element-plus/es')['ElContainer'] + ElDatePicker: typeof import('element-plus/es')['ElDatePicker'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDivider: typeof import('element-plus/es')['ElDivider'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] @@ -38,14 +40,21 @@ declare module 'vue' { ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] + ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] + ElLink: typeof import('element-plus/es')['ElLink'] ElMain: typeof import('element-plus/es')['ElMain'] ElMenu: typeof import('element-plus/es')['ElMenu'] ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] + ElOption: typeof import('element-plus/es')['ElOption'] ElPagination: typeof import('element-plus/es')['ElPagination'] - ElPopover: typeof import('element-plus/es')['ElPopover'] ElRadio: typeof import('element-plus/es')['ElRadio'] + ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] + ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] + ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] + ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSlider: typeof import('element-plus/es')['ElSlider'] ElSpace: typeof import('element-plus/es')['ElSpace'] ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] @@ -54,9 +63,11 @@ declare module 'vue' { ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] + ElText: typeof import('element-plus/es')['ElText'] + ElTimePicker: typeof import('element-plus/es')['ElTimePicker'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTree: typeof import('element-plus/es')['ElTree'] ElTreeSelect: typeof import('element-plus/es')['ElTreeSelect'] + ElUpload: typeof import('element-plus/es')['ElUpload'] ESign: typeof import('./src/components/ESign/index.vue')['default'] FormContainer: typeof import('./src/components/Form/FormContainer/index.vue')['default'] Grid: typeof import('./src/components/Grid/index.vue')['default'] diff --git a/SafeCampus.WEB/package.json b/SafeCampus.WEB/package.json index b435dea..3edfa30 100644 --- a/SafeCampus.WEB/package.json +++ b/SafeCampus.WEB/package.json @@ -52,6 +52,7 @@ "nprogress": "^0.2.0", "pinia": "^2.1.7", "pinia-plugin-persistedstate": "^3.2.1", + "pinyin-pro": "^3.24.2", "print-js": "^1.6.0", "qs": "^6.11.2", "screenfull": "^6.0.2", diff --git a/SafeCampus.WEB/pnpm-lock.yaml b/SafeCampus.WEB/pnpm-lock.yaml index 528e024..766581a 100644 --- a/SafeCampus.WEB/pnpm-lock.yaml +++ b/SafeCampus.WEB/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: pinia-plugin-persistedstate: specifier: ^3.2.1 version: 3.2.1(pinia@2.1.7(typescript@5.3.3)(vue@3.4.21(typescript@5.3.3))) + pinyin-pro: + specifier: ^3.24.2 + version: 3.24.2 print-js: specifier: ^1.6.0 version: 1.6.0 @@ -167,7 +170,7 @@ importers: version: 3.2.5 rollup-plugin-visualizer: specifier: ^5.12.0 - version: 5.12.0(rollup@4.6.1) + version: 5.12.0(rollup@2.79.1) sass: specifier: ^1.71.1 version: 1.71.1 @@ -203,16 +206,16 @@ importers: version: 5.3.3 unocss: specifier: ^0.58.5 - version: 0.58.5(postcss@8.4.35)(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) + version: 0.58.5(postcss@8.4.35)(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) unplugin-auto-import: specifier: ^0.17.5 - version: 0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@4.6.1) + version: 0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@2.79.1) unplugin-icons: specifier: ^0.18.5 version: 0.18.5(@vue/compiler-sfc@3.4.21)(vue-template-compiler@2.7.14) unplugin-vue-components: specifier: ^0.26.0 - version: 0.26.0(@babel/parser@7.24.0)(rollup@4.6.1)(vue@3.4.21(typescript@5.3.3)) + version: 0.26.0(@babel/parser@7.24.0)(rollup@2.79.1)(vue@3.4.21(typescript@5.3.3)) unplugin-vue-setup-extend-plus: specifier: ^1.0.1 version: 1.0.1 @@ -4090,6 +4093,9 @@ packages: typescript: optional: true + pinyin-pro@3.24.2: + resolution: {integrity: sha512-5tPyLhxT4CZ9dWqQRqm3X5ADdS18Sb2w0ranNBgr6jCrqO4O8gtfuyqG7Y6+1Mre+0n2VlhKDz+3P5oqSLrkOw==} + pkcs7@0.2.3: resolution: {integrity: sha512-kJRwmADEQUg+qJyRgWLtpEL9q9cFjZschejTEK3GRjKvnsU9G5WWoe/wKqRgbBoqWdVSeTUKP6vIA3Y72M3rWA==} engines: {node: ^0.10, npm: ^1.4.6} @@ -6867,13 +6873,13 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.1.0(rollup@4.6.1)': + '@rollup/pluginutils@5.1.0(rollup@2.79.1)': dependencies: '@types/estree': 1.0.0 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.6.1 + rollup: 2.79.1 '@rollup/rollup-android-arm-eabi@4.6.1': optional: true @@ -7073,20 +7079,20 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unocss/astro@0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))': + '@unocss/astro@0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))': dependencies: '@unocss/core': 0.58.5 '@unocss/reset': 0.58.5 - '@unocss/vite': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) + '@unocss/vite': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) optionalDependencies: vite: 5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2) transitivePeerDependencies: - rollup - '@unocss/cli@0.58.5(rollup@4.6.1)': + '@unocss/cli@0.58.5(rollup@2.79.1)': dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0(rollup@4.6.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) '@unocss/config': 0.58.5 '@unocss/core': 0.58.5 '@unocss/preset-uno': 0.58.5 @@ -7210,10 +7216,10 @@ snapshots: dependencies: '@unocss/core': 0.58.5 - '@unocss/vite@0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))': + '@unocss/vite@0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2))': dependencies: '@ampproject/remapping': 2.2.1 - '@rollup/pluginutils': 5.1.0(rollup@4.6.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) '@unocss/config': 0.58.5 '@unocss/core': 0.58.5 '@unocss/inspector': 0.58.5 @@ -9901,6 +9907,8 @@ snapshots: optionalDependencies: typescript: 5.3.3 + pinyin-pro@3.24.2: {} + pkcs7@0.2.3: {} pkcs7@1.0.4: @@ -10176,14 +10184,14 @@ snapshots: serialize-javascript: 4.0.0 terser: 5.19.2 - rollup-plugin-visualizer@5.12.0(rollup@4.6.1): + rollup-plugin-visualizer@5.12.0(rollup@2.79.1): dependencies: open: 8.4.2 picomatch: 2.3.1 source-map: 0.7.4 yargs: 17.7.1 optionalDependencies: - rollup: 4.6.1 + rollup: 2.79.1 rollup@0.25.8: dependencies: @@ -10905,9 +10913,9 @@ snapshots: unicorn-magic@0.1.0: {} - unimport@3.7.1(rollup@4.6.1): + unimport@3.7.1(rollup@2.79.1): dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.6.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) acorn: 8.11.2 escape-string-regexp: 5.0.0 estree-walker: 3.0.3 @@ -10936,10 +10944,10 @@ snapshots: universalify@2.0.0: {} - unocss@0.58.5(postcss@8.4.35)(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)): + unocss@0.58.5(postcss@8.4.35)(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)): dependencies: - '@unocss/astro': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) - '@unocss/cli': 0.58.5(rollup@4.6.1) + '@unocss/astro': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) + '@unocss/cli': 0.58.5(rollup@2.79.1) '@unocss/core': 0.58.5 '@unocss/extractor-arbitrary-variants': 0.58.5 '@unocss/postcss': 0.58.5(postcss@8.4.35) @@ -10957,7 +10965,7 @@ snapshots: '@unocss/transformer-compile-class': 0.58.5 '@unocss/transformer-directives': 0.58.5 '@unocss/transformer-variant-group': 0.58.5 - '@unocss/vite': 0.58.5(rollup@4.6.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) + '@unocss/vite': 0.58.5(rollup@2.79.1)(vite@5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2)) optionalDependencies: vite: 5.1.4(@types/node@20.14.10)(sass@1.71.1)(terser@5.19.2) transitivePeerDependencies: @@ -10965,15 +10973,15 @@ snapshots: - rollup - supports-color - unplugin-auto-import@0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@4.6.1): + unplugin-auto-import@0.17.5(@vueuse/core@10.9.0(vue@3.4.21(typescript@5.3.3)))(rollup@2.79.1): dependencies: '@antfu/utils': 0.7.7 - '@rollup/pluginutils': 5.1.0(rollup@4.6.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) fast-glob: 3.3.2 local-pkg: 0.5.0 magic-string: 0.30.5 minimatch: 9.0.3 - unimport: 3.7.1(rollup@4.6.1) + unimport: 3.7.1(rollup@2.79.1) unplugin: 1.7.1 optionalDependencies: '@vueuse/core': 10.9.0(vue@3.4.21(typescript@5.3.3)) @@ -10995,10 +11003,10 @@ snapshots: transitivePeerDependencies: - supports-color - unplugin-vue-components@0.26.0(@babel/parser@7.24.0)(rollup@4.6.1)(vue@3.4.21(typescript@5.3.3)): + unplugin-vue-components@0.26.0(@babel/parser@7.24.0)(rollup@2.79.1)(vue@3.4.21(typescript@5.3.3)): dependencies: '@antfu/utils': 0.7.6 - '@rollup/pluginutils': 5.1.0(rollup@4.6.1) + '@rollup/pluginutils': 5.1.0(rollup@2.79.1) chokidar: 3.5.3 debug: 4.3.4 fast-glob: 3.3.1 diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/department.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/department.ts new file mode 100644 index 0000000..1a0fef3 --- /dev/null +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/department.ts @@ -0,0 +1,34 @@ +/** + * @description 用户管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + */ + +import { ReqPage } from "@/api"; +/** + * @Description: 院系管理接口 + * @Author: wwp + * @Date: 2024-07-24 15:34:54 + */ + +export namespace SysDepartment { + // 院系信息 + export interface DepartmentInfo { + id?: string | number | undefined; + name?: string | undefined; + code?: string | undefined; + introduce?: string | undefined; + depId?: string | number | undefined; + departmentName?: string | undefined; + } + // 院系列表传参 + export interface Page extends ReqPage {} +} diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts index 16330cf..fad4693 100644 --- a/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts @@ -15,3 +15,5 @@ export * from "./personnel"; export * from "./clothing"; export * from "./dormitory"; +export * from "./department"; +export * from "./major"; diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/major.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/major.ts new file mode 100644 index 0000000..94c6b3f --- /dev/null +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/major.ts @@ -0,0 +1,35 @@ +/** + * @description 用户管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + */ + +import { ReqPage } from "@/api"; +/** + * @Description: 专业管理接口 + * @Author: wwp + * @Date: 2024-07-24 15:34:54 + */ + +export namespace SysMajor { + // 院系信息 + export interface MajorInfo { + id?: string | number | undefined; + name?: string | undefined; + code?: string | undefined; + introduce?: string | undefined; + depId?: string | number | undefined; + departmentName?: string | undefined; + sort?: string | number | undefined; + } + // 院系列表传参 + export interface Page extends ReqPage {} +} diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts index 41226e5..dfad718 100644 --- a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts @@ -33,6 +33,8 @@ export namespace SysUserPersonnel { userId?: string | number | undefined; personId?: string | number | undefined; userName?: string | number | undefined; + majorId?: any; + majorName?: any; } /** 人脸信息 */ export interface SysUserAvatar { @@ -68,5 +70,7 @@ export namespace SysUserPersonnel { personSets: any; personSetId?: number | string; status?: number | string; + depId?: any; + majorId?: any; } } diff --git a/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts b/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts index 78b33e7..7c233af 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts @@ -23,8 +23,8 @@ const http = moduleRequest("/business/dfieldApi/"); */ const userManageClassManageApi = { /** 查询底库列表 */ - page() { - return http.get("queryAll"); + page(params: SysUserPersonnel.ClassPage) { + return http.get("queryAll", params); }, /** 删除底库 */ delete(params: ReqId) { diff --git a/SafeCampus.WEB/src/api/modules/usermanage/department.ts b/SafeCampus.WEB/src/api/modules/usermanage/department.ts new file mode 100644 index 0000000..d1750fc --- /dev/null +++ b/SafeCampus.WEB/src/api/modules/usermanage/department.ts @@ -0,0 +1,60 @@ +/** + * @description 单页管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + * @see https://gitee.com/dotnetmoyu/SimpleAdmin + */ +import { moduleRequest } from "@/api/request"; +import { ReqId, ResPage, ReqPersonId, SysDepartment } from "@/api/interface"; +const http = moduleRequest("/business/department/"); + +/** + * @Description: 单页管理 + * @Author: wwp + * @Date: 2023-12-15 15:34:54 + */ +const userManageDepartmentApi = { + // 获取院系分页列表 + page(params: SysDepartment.Page) { + return http.get("getPageList", params); + }, + /** 新增院系 */ + add(params: SysDepartment.DepartmentInfo) { + return http.post("add", params); + }, + /** 修改院系 */ + update(params: SysDepartment.DepartmentInfo) { + return http.put("update", params); + }, + /** 删除院系 */ + delete(params: ReqId) { + return http.post("delete", params); + }, + // 院系详情 + detail(params: ReqId) { + return http.get("getInfo", params); + }, + /**院系列表(不分页)*/ + list(params: any) { + return http.get("getNoPageList", params); + } +}; + +const departmentButtonCode = { + /** 新增院系 */ + add: "userManageDepartmentAdd", + /** 删除院系 */ + edit: "userManageDepartmentEdit", + /** 删除院系 */ + delete: "userManageDepartmentDelete" +}; + +export { userManageDepartmentApi, departmentButtonCode }; diff --git a/SafeCampus.WEB/src/api/modules/usermanage/index.ts b/SafeCampus.WEB/src/api/modules/usermanage/index.ts index 4021a98..ccdbdef 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/index.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/index.ts @@ -18,3 +18,5 @@ export * from "./clothing"; export * from "./teacher"; export * from "./keyPersonnel"; export * from "./dormitory"; +export * from "./department"; +export * from "./major"; diff --git a/SafeCampus.WEB/src/api/modules/usermanage/major.ts b/SafeCampus.WEB/src/api/modules/usermanage/major.ts new file mode 100644 index 0000000..3464057 --- /dev/null +++ b/SafeCampus.WEB/src/api/modules/usermanage/major.ts @@ -0,0 +1,60 @@ +/** + * @description 单页管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + * @see https://gitee.com/dotnetmoyu/SimpleAdmin + */ +import { moduleRequest } from "@/api/request"; +import { ReqId, ResPage, ReqPersonId, SysMajor } from "@/api/interface"; +const http = moduleRequest("/business/major/"); + +/** + * @Description: 单页管理 + * @Author: wwp + * @Date: 2023-12-15 15:34:54 + */ +const userManageMajorApi = { + // 获取专业分页列表 + page(params: SysMajor.Page) { + return http.get("getPageList", params); + }, + /** 新增专业 */ + add(params: SysMajor.MajorInfo) { + return http.post("add", params); + }, + /** 修改专业 */ + update(params: SysMajor.MajorInfo) { + return http.put("update", params); + }, + /** 删除专业 */ + delete(params: ReqId) { + return http.post("delete", params); + }, + // 专业详情 + detail(params: ReqId) { + return http.get("getInfo", params); + }, + /**专业列表(不分页)*/ + list(params: any) { + return http.get("getNoPageList", params); + } +}; + +const majorButtonCode = { + /** 新增专业 */ + add: "userManageMajorAdd", + /** 删除专业 */ + edit: "userManageMajorEdit", + /** 删除专业 */ + delete: "userManageMajorDelete" +}; + +export { userManageMajorApi, majorButtonCode }; diff --git a/SafeCampus.WEB/src/mixin/index.ts b/SafeCampus.WEB/src/mixin/index.ts new file mode 100644 index 0000000..4e581f3 --- /dev/null +++ b/SafeCampus.WEB/src/mixin/index.ts @@ -0,0 +1,21 @@ +import { userManageClassManageApi, userManageMajorApi, userManageDepartmentApi } from "@/api"; + +// 获取专业列表 +const getMajorList = async (depId: any) => { + const res: any = await userManageMajorApi.list({ depId }); + return res.data; +}; +/* 获取系部 */ + +const getDepartmentList = async () => { + const res: any = await userManageDepartmentApi.list({}); + return res.data; +}; +/* 获取所属班级 */ + +const getClassList = async (majorId: any) => { + const res: any = await userManageClassManageApi.page({ majorId }); + return res.data; +}; + +export { getMajorList, getDepartmentList, getClassList }; diff --git a/SafeCampus.WEB/src/utils/index.ts b/SafeCampus.WEB/src/utils/index.ts index a0cbdd4..76bddd7 100644 --- a/SafeCampus.WEB/src/utils/index.ts +++ b/SafeCampus.WEB/src/utils/index.ts @@ -327,7 +327,7 @@ export function findItemNested(enumData: any, callValue: any, value: string, chi /** * @description 时间戳转化为日期 * */ -export function formatDate(timestamp:number) { +export function formatDate(timestamp: number) { let date = new Date(timestamp); let year = date.getFullYear(); let month = "0" + (date.getMonth() + 1); // getMonth返回的月份是从0开始的 @@ -336,6 +336,29 @@ export function formatDate(timestamp:number) { let minutes = "0" + date.getMinutes(); let seconds = "0" + date.getSeconds(); - return year + "-" + month.substr(-2) + "-" + day.substr(-2) - + " " + hours.substr(-2) + ":" + minutes.substr(-2) + ":" + seconds.substr(-2); + return year + "-" + month.substr(-2) + "-" + day.substr(-2) + " " + hours.substr(-2) + ":" + minutes.substr(-2) + ":" + seconds.substr(-2); +} + +/** + * 日期格式化 + */ +export function dateFormat(date: any, format: any) { + format = format || "yyyy-MM-dd hh:mm:ss"; + if (date !== "Invalid Date") { + let o: any = { + "M+": date.getMonth() + 1, //month + "d+": date.getDate(), //day + "h+": date.getHours(), //hour + "m+": date.getMinutes(), //minute + "s+": date.getSeconds(), //second + "q+": Math.floor((date.getMonth() + 3) / 3), //quarter + S: date.getMilliseconds() //millisecond + }; + if (/(y+)/.test(format)) format = format.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (let k in o) + if (new RegExp("(" + k + ")").test(format)) + format = format.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); + return format; + } + return ""; } diff --git a/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue b/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue index 99d3e50..56498ab 100644 --- a/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue +++ b/SafeCampus.WEB/src/views/attendance/behaviorTrace/index.vue @@ -5,7 +5,7 @@ --> - + -->
@@ -44,19 +44,84 @@
diff --git a/SafeCampus.WEB/src/views/userManage/department/components/form.vue b/SafeCampus.WEB/src/views/userManage/department/components/form.vue new file mode 100644 index 0000000..4b48292 --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/department/components/form.vue @@ -0,0 +1,120 @@ + + + + + + diff --git a/SafeCampus.WEB/src/views/userManage/department/index.vue b/SafeCampus.WEB/src/views/userManage/department/index.vue new file mode 100644 index 0000000..16eb98f --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/department/index.vue @@ -0,0 +1,115 @@ + + + + diff --git a/SafeCampus.WEB/src/views/userManage/major/components/form.vue b/SafeCampus.WEB/src/views/userManage/major/components/form.vue new file mode 100644 index 0000000..07a1005 --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/major/components/form.vue @@ -0,0 +1,137 @@ + + + + + + diff --git a/SafeCampus.WEB/src/views/userManage/major/index.vue b/SafeCampus.WEB/src/views/userManage/major/index.vue new file mode 100644 index 0000000..8b5ac38 --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/major/index.vue @@ -0,0 +1,138 @@ + + + + diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue index abaf000..6e7db4c 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue @@ -13,10 +13,21 @@ - - + + + + + + + + + + + @@ -72,12 +83,16 @@ diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue index 5237eb1..fc5b54c 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue @@ -45,12 +45,13 @@ const sysUserProps = reactive>({ // 表单验证规则 const rules = reactive({ - // personId: [required("请输入人员ID")], name: [required("请输入姓名")], gender: [required("请选择性别")], faces: [required("请上传人脸图片")], - phone: [required("请输入手机号")] - // extData: [required("请输入扩展数据")] + phone: [required("请输入手机号")], + depId: [required("请选择系部")], + majorId: [required("请选择专业")], + personSetId: [required("请选择班级")] }); /** diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index ca34c02..55e1a3d 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -5,55 +5,11 @@ -->