wwp před 1 měsícem
rodič
revize
d86bd660fd
54 změnil soubory, kde provedl 497 přidání a 238 odebrání
  1. +45
    -48
      SafeCampus.API/SafeCampus.Application/Manager/DeepelephManager/DeepelephManager.cs
  2. +47
    -0
      SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml
  3. +6
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/BuildingService.cs
  4. +6
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/CameraGroupService/CameraGroupService.cs
  5. +31
    -9
      SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/CameraInfoService.cs
  6. +3
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/ClassRoomCallTaskService.cs
  7. +15
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/Dto/ClassRoomCallTaskDto.cs
  8. +8
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/Dto/ClassRoomCallTaskSearch.cs
  9. +2
    -2
      SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs
  10. +11
    -2
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonFacesService/PersonFacesService.cs
  11. +4
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoDto.cs
  12. +8
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoSearch.cs
  13. +2
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/PersonInfoService.cs
  14. +9
    -3
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs
  15. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs
  16. +8
    -7
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoList.cs
  17. +6
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/IWarnInfoService.cs
  18. +11
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/WarnInfoService.cs
  19. +1
    -11
      SafeCampus.API/SafeCampus.Core/Startup.cs
  20. +1
    -11
      SafeCampus.API/SafeCampus.Core/UnifyResult/SafeCampusResult.cs
  21. +2
    -12
      SafeCampus.API/SafeCampus.Core/UnifyResult/SafeCampusResultProvider.cs
  22. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/Attendance.cs
  23. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/BuildingInfo.cs
  24. +10
    -0
      SafeCampus.API/SafeCampus.System/Entity/CameraGroup.cs
  25. +5
    -0
      SafeCampus.API/SafeCampus.System/Entity/ClassRoomCallTask.cs
  26. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/DepartmentInfo.cs
  27. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/MajorInfo.cs
  28. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/PersonInfo.cs
  29. +1
    -1
      SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs
  30. +15
    -0
      SafeCampus.API/SafeCampus.System/SafeCampus.System.xml
  31. +1
    -1
      SafeCampus.API/SafeCampus.System/System.Development.json
  32. +8
    -2
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/ClassRoomCallApi.cs
  33. +37
    -22
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs
  34. +2
    -2
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs
  35. +39
    -20
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/PersonApi.cs
  36. +4
    -3
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/WarnInfoController.cs
  37. +5
    -3
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/SummarySeach.cs
  38. +5
    -0
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioAnalysisController.cs
  39. +6
    -6
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioPortraitSummary.cs
  40. +5
    -5
      SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml
  41. +1
    -0
      SafeCampus.API/SafeCampus.Web.Core/Startup.cs
  42. +1
    -1
      SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user
  43. +1
    -1
      SafeCampus.WEB/src/api/modules/attendance/roolcall.ts
  44. +14
    -2
      SafeCampus.WEB/src/views/attendance/roolcall/index.vue
  45. +4
    -0
      SafeCampus.WEB/src/views/attendance/studentsReturn/index.vue
  46. +34
    -30
      SafeCampus.WEB/src/views/screen/component/index/video.vue
  47. +5
    -1
      SafeCampus.WEB/src/views/userManage/clothing/index.vue
  48. +2
    -0
      SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue
  49. +1
    -1
      SafeCampus.WEB/src/views/userManage/personnel/index.vue
  50. +29
    -19
      SafeCampus.WEB/src/views/violation/analysis/index.vue
  51. +21
    -2
      monitorMobile/components/selectSearch.vue
  52. +1
    -0
      monitorMobile/pages/login.vue
  53. +7
    -2
      monitorMobile/pages/work/rollCall/detail.vue
  54. +1
    -1
      monitorMobile/pages/work/rollCall/index.vue

+ 45
- 48
SafeCampus.API/SafeCampus.Application/Manager/DeepelephManager/DeepelephManager.cs Zobrazit soubor

@@ -202,8 +202,6 @@ public class DeepelephManager : IDeepelephManager, IScoped
if (json["type"].ToString() == "msg")
{

//TODO 发送短信
//TxySmsUtil.SendSms(new[] { "" }, new[] { "" });
var body = json["body"];
if (body != null)
{
@@ -396,10 +394,6 @@ public class DeepelephManager : IDeepelephManager, IScoped
}

if (dayEnum==AlarmType.lie_on_table)
{
}
else
{
#region 添加预警

@@ -509,58 +503,61 @@ public class DeepelephManager : IDeepelephManager, IScoped

#endregion
}
#region 添加点名

var model = new ClassRoomCallDto
{
TenantCode = body["tenantCode"]?.ToString(),
PoiId = body["poiId"]?.ToString(),
TaskId = body["taskId"]?.ToString(),
AlarmType = body["alarmType"].ToString(),
AlarmTypeDesc = dayEnum.GetDescription(),
EventId = body["eventId"]?.ToString(),
CameraId = body["cameraId"]?.ToString(),
Tick = TimestampToDateTime(body["tick"]?.ToString()),
PersonSetId = body["personSetId"]?.ToString(),
PersonId = body["personId"]?.ToString(),
Similarity = body["similarity"] != null ? (float)body["similarity"] : 0,
FaceScore = body["faceScore"] != null ? (float)body["faceScore"] : 0,
SnapshotUrl = body["snapshotUrl"]?.ToString(),
SnapshotData = body["snapshotData"]?.ToString(),
Rects = body["rects"]?.ToString(),
Extend = body["extend"]?.ToString(),
CreateTime = DateTime.Now,
TrackId = body["TrackId"]?.ToString()
};
var signImg = Path.Combine(Directory.GetCurrentDirectory(), "Files", App.Configuration["AppInfo:RoomCallImg"], model.EventId + ".jpg");
var steam = await model.SnapshotUrl.GetAsByteArrayAsync();
model.SnapshotUrl = $"/Files/{App.Configuration["AppInfo:RoomCallImg"]}/{model.EventId}.jpg";
using (MemoryStream ms = new MemoryStream(steam))
else
{
using (Bitmap bmp = new Bitmap(ms))
#region 添加点名

var model = new ClassRoomCallDto
{
using (Graphics g = Graphics.FromImage(bmp))
TenantCode = body["tenantCode"]?.ToString(),
PoiId = body["poiId"]?.ToString(),
TaskId = body["taskId"]?.ToString(),
AlarmType = body["alarmType"].ToString(),
AlarmTypeDesc = dayEnum.GetDescription(),
EventId = body["eventId"]?.ToString(),
CameraId = body["cameraId"]?.ToString(),
Tick = TimestampToDateTime(body["tick"]?.ToString()),
PersonSetId = body["personSetId"]?.ToString(),
PersonId = body["personId"]?.ToString(),
Similarity = body["similarity"] != null ? (float)body["similarity"] : 0,
FaceScore = body["faceScore"] != null ? (float)body["faceScore"] : 0,
SnapshotUrl = body["snapshotUrl"]?.ToString(),
SnapshotData = body["snapshotData"]?.ToString(),
Rects = body["rects"]?.ToString(),
Extend = body["extend"]?.ToString(),
CreateTime = DateTime.Now,
TrackId = body["TrackId"]?.ToString()
};
var signImg = Path.Combine(Directory.GetCurrentDirectory(), "Files", App.Configuration["AppInfo:RoomCallImg"], model.EventId + ".jpg");
var steam = await model.SnapshotUrl.GetAsByteArrayAsync();
model.SnapshotUrl = $"/Files/{App.Configuration["AppInfo:RoomCallImg"]}/{model.EventId}.jpg";
using (MemoryStream ms = new MemoryStream(steam))
{
using (Bitmap bmp = new Bitmap(ms))
{
using (Pen pen = new Pen(Color.Red, 3))
using (Graphics g = Graphics.FromImage(bmp))
{
foreach (var item in body["rects"])
using (Pen pen = new Pen(Color.Red, 3))
{
Rectangle rect = new Rectangle((int)item["left"], (int)item["top"], (int)item["width"], (int)item["height"]);
g.DrawRectangle(pen, rect);
foreach (var item in body["rects"])
{
Rectangle rect = new Rectangle((int)item["left"], (int)item["top"], (int)item["width"], (int)item["height"]);
g.DrawRectangle(pen, rect);
}
}
}
bmp.Save(signImg, ImageFormat.Jpeg);
}
bmp.Save(signImg, ImageFormat.Jpeg);
}
}
Scoped.Create((_, scope) =>
{
var services = scope.ServiceProvider;
var _repository = services.GetService<IClassRoomCallService>();
_repository.Add(model);
});
Scoped.Create((_, scope) =>
{
var services = scope.ServiceProvider;
var _repository = services.GetService<IClassRoomCallService>();
_repository.Add(model);
});

#endregion
#endregion
}
}
}
else if (json["type"].ToString() == "cmd")


+ 47
- 0
SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml Zobrazit soubor

@@ -941,6 +941,21 @@
结束时间
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskDto.PersonSetName">
<summary>
班级名称
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskDto.DepName">
<summary>
院系名称
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskDto.MajorName">
<summary>
专业名称
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskSearch.CameraId">
<summary>
摄像头id
@@ -956,6 +971,16 @@
人员底库id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskSearch.DepId">
<summary>
系部id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskSearch.MajorId">
<summary>
院系id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.ClassRoomCallTaskService.ClassRoomCallTaskSearch.StartTime">
<summary>
开始时间
@@ -1569,6 +1594,16 @@
班级id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.DepId">
<summary>
系部id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.MajorId">
<summary>
院系id
</summary>
</member>
<member name="M:SafeCampus.Application.Services.Business.PersonInfoService.IPersonInfoService.Add(SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoDto)">
<summary>
添加信息
@@ -1637,6 +1672,11 @@
专业id
</summary>
</member>
<member name="P:SafeCampus.Application.Services.Business.PersonSetInfoService.PersonSetInfoDto.TeacherId">
<summary>
班主任id
</summary>
</member>
<member name="M:SafeCampus.Application.Services.Business.PersonSetInfoService.IPersonSetInfoService.Add(SafeCampus.Application.Services.Business.PersonSetInfoService.PersonSetInfoDto)">
<summary>
添加班级
@@ -1983,6 +2023,13 @@
</summary>
<returns></returns>
</member>
<member name="M:SafeCampus.Application.Services.Business.Warn.Service.IWarnInfoService.DeleteBatch(System.Collections.Generic.List{System.Int64})">
<summary>
批量删除
</summary>
<param name="Id"></param>
<returns></returns>
</member>
<member name="M:SafeCampus.Application.Services.IApiBaseInterface`3.Add(`0)">
<summary>
添加


+ 6
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/BuildingService/BuildingService.cs Zobrazit soubor

@@ -43,6 +43,12 @@ public class BuildingService:DbRepository<BuildingInfo>,IBuildingService
{
throw Oops.Oh("信息不存在");
}
var dor = ChangeRepository<DbRepository<DormitoryInfo>>();//切换仓储
var build = await dor.GetListAsync(x=>x.BuildId==model.Id);
if (build.Any())
{
throw Oops.Oh("宿舍楼下还有寝室不可删除!");
}
await DeleteAsync(model);
return true;
}


+ 6
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/CameraGroupService/CameraGroupService.cs Zobrazit soubor

@@ -5,6 +5,9 @@ public class CameraGroupService :DbRepository<CameraGroup>, ICameraGroupService
public async Task<bool> Add(CameraGroupAddInput input)
{
var model = input.Adapt<CameraGroup>();
var sysOrgList = await GetListAsync();//获取全部
if (sysOrgList.Any(it =>it.Name==model.Name&&it.ParentId==model.ParentId))//判断同级是否有名称重复的
throw Oops.Bah($"存在重复名称:{model.Name}");
await InsertAsync(model);
return true;
}
@@ -46,6 +49,8 @@ public class CameraGroupService :DbRepository<CameraGroup>, ICameraGroupService
public async Task<List<CameraGroup>> GetNoPageList()
{
var list = await Context.Queryable<CameraGroup>()
.Includes(x=>x.SysUserItem)
.OrderByDescending(x=>x.Id)
.ToTreeAsync(x => x.Children, x => x.ParentId, null);
//var list = await GetListAsync();
return list;
@@ -53,7 +58,7 @@ public class CameraGroupService :DbRepository<CameraGroup>, ICameraGroupService

public async Task<List<CameraGroup>> GetBIList()
{
var list = await Context.Queryable<CameraGroup>().Includes(x => x.CameraInfos).ToListAsync();
var list = await Context.Queryable<CameraGroup>().Includes(x => x.CameraInfos).Where(x=>x.CameraInfos.Any()).ToListAsync();
return list;
}
}

+ 31
- 9
SafeCampus.API/SafeCampus.Application/Services/Business/CameraInfoService/CameraInfoService.cs Zobrazit soubor

@@ -8,7 +8,7 @@ using System.Drawing.Imaging;

namespace SafeCampus.Application.Services.Business.CameraInfoService;

public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService
public class CameraInfoService : DbRepository<CameraInfo>, ICameraInfoService
{
private readonly IDeepelephManager _deepelephManager;
private readonly ISimpleCacheService _simpleCacheService;
@@ -60,7 +60,7 @@ public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService
{
using (Graphics g = Graphics.FromImage(bmp))
{
}
bmp.Save(signImg, ImageFormat.Jpeg);
}
@@ -106,15 +106,35 @@ public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService
return false;
}

private List<long> GetGroupChildren(List<CameraGroup> node)
{
var list = new List<long>();
if (node == null) return list;
foreach (var cameraGroup in node)
{
list.Add(cameraGroup.Id);
list.AddRange(GetGroupChildren(cameraGroup.Children));
}
return list;
}
public async Task<SqlSugarPagedList<CameraInfoDto>> GetPageList(CameraSearch search)
{
var groupids = new List<long>();
if (search.GroupId.HasValue && search.GroupId.Value != -1)
{
var group = await Context.Queryable<CameraGroup>()
.ToTreeAsync(x => x.Children, x => x.ParentId, search.GroupId);
groupids = GetGroupChildren(group);
groupids.Add(search.GroupId.Value);
}

var query = Context.Queryable<CameraInfo>()
.Includes(x=>x.SysUserItem)
.Includes(x=>x.CameraGroupItem)
.Includes(x => x.SysUserItem)
.Includes(x => x.CameraGroupItem)
.WhereIF(search.DeviceStatus.HasValue, x => x.DeviceStatus == search.DeviceStatus)
.WhereIF(!string.IsNullOrEmpty(search.SensorId), x => x.SensorId == search.SensorId)
.WhereIF(!string.IsNullOrEmpty(search.SensorName), x => x.SensorName == search.SensorName)
.WhereIF(search.GroupId.HasValue, x => (search.GroupId.Value==-1?x.GroupId==null:x.GroupId==search.GroupId.Value));
.WhereIF(search.GroupId.HasValue, x => (search.GroupId.Value == -1 ? x.GroupId == null : groupids.Contains(x.GroupId.Value)));
var list = await query.OrderBy(x => x.LastTime)
.ToPagedListAsyncMapster<CameraInfo, CameraInfoDto>(search.PageNum, search.PageSize);
return list;
@@ -122,7 +142,7 @@ public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService

public async Task<bool> BatchSetGroup(SetGroupInput input)
{
if (input.Id==-1)
if (input.Id == -1)
{
var result = await Context.Updateable<CameraInfo>()
.SetColumns(x => x.GroupId == null)
@@ -144,9 +164,11 @@ public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService
{
var result = await Context.Updateable<CameraInfo>()
.SetColumns(x => x.PushUserId == input.UserId)
.Where(x =>x.GroupId==input.GroupId)
.Where(x => x.GroupId == input.GroupId)
.ExecuteCommandAsync();
return result >0;
await Context.Updateable<CameraGroup>().SetColumns(x => x.PushUserId == input.UserId)
.Where(x => x.Id == input.GroupId).ExecuteCommandAsync();
return result > 0;
}

public async Task<bool> BatchSetPushPerson(SetPushPersonInput input)
@@ -169,7 +191,7 @@ public class CameraInfoService:DbRepository<CameraInfo>, ICameraInfoService
.SetColumns(x => x.PushUserId == input.UserId)
.Where(x => ids.Contains(x.SensorId))
.ExecuteCommandAsync();
return result >0;
return result > 0;
}

throw Oops.Oh("分组不存在");


+ 3
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/ClassRoomCallTaskService.cs Zobrazit soubor

@@ -26,10 +26,13 @@ public class ClassRoomCallTaskService : DbRepository<ClassRoomCallTask> ,IClassR
{
var query = Context.Queryable<ClassRoomCallTask>()
.Includes(x => x.CameraInfoItem)
.Includes(x=>x.PersonSetInfoItem,x=>x.MajorInfoItem,x=>x.DepartmentInfoItem )
.WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId)
.WhereIF(!string.IsNullOrEmpty(search.TaskId), x => x.TaskId == search.TaskId)
.WhereIF(!string.IsNullOrEmpty(search.CameraId), x => x.CameraId == search.CameraId)
.WhereIF(search.StartTime.HasValue, x => x.CreateTime >= search.StartTime)
.WhereIF(search.DepId.HasValue, x => x.PersonSetInfoItem.MajorInfoItem.DepId == search.DepId)
.WhereIF(search.MajorId.HasValue, x => x.PersonSetInfoItem.MajorId == search.MajorId)
.WhereIF(search.EndTime.HasValue, x => x.EndTime <= search.EndTime);

var list = await query.OrderByDescending(x => x.CreateTime)


+ 15
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/Dto/ClassRoomCallTaskDto.cs Zobrazit soubor

@@ -42,6 +42,18 @@ public class ClassRoomCallTaskDto
/// 结束时间
/// </summary>
public DateTime EndTime { get; set; }
/// <summary>
/// 班级名称
/// </summary>
public string PersonSetName { get; set; }
/// <summary>
/// 院系名称
/// </summary>
public string DepName { get; set; }
/// <summary>
/// 专业名称
/// </summary>
public string MajorName { get; set; }
}
public class ClassRoomCallTaskDtoMapper : IRegister
{
@@ -49,6 +61,9 @@ public class ClassRoomCallTaskDtoMapper : IRegister
{
config.ForType<ClassRoomCallTask, ClassRoomCallTaskDto>()
//.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
.Map(x=>x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
.Map(x=>x.MajorName,x=>x.PersonSetInfoItem.MajorInfoItem.Name)
.Map(x=>x.DepName,x=>x.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name)
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
.Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name);
}

+ 8
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/ClassRoomCallTaskService/Dto/ClassRoomCallTaskSearch.cs Zobrazit soubor

@@ -15,6 +15,14 @@ public class ClassRoomCallTaskSearch:BasePageInput
/// </summary>
public string PersonSetId { get; set; }
/// <summary>
/// 系部id
/// </summary>
public long? DepId { get; set; }
/// <summary>
/// 院系id
/// </summary>
public long? MajorId { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? StartTime { get; set; }


+ 2
- 2
SafeCampus.API/SafeCampus.Application/Services/Business/MajorService/MajorService.cs Zobrazit soubor

@@ -61,7 +61,7 @@ public class MajorService: DbRepository<MajorInfo>, IMajorService
.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)
var list = await query.OrderBy(x => x.Sort)
.ToPagedListAsyncMapster<MajorInfo, MajorDto>(search.PageNum, search.PageSize);
return list;
}
@@ -74,7 +74,7 @@ public class MajorService: DbRepository<MajorInfo>, IMajorService
.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();
var list = await query.OrderBy(x => x.Sort).ToListAsync();
return list.Adapt<List<MajorDto>>();
}
}

+ 11
- 2
SafeCampus.API/SafeCampus.Application/Services/Business/PersonFacesService/PersonFacesService.cs Zobrazit soubor

@@ -1,4 +1,6 @@
namespace SafeCampus.Application.Services.Business.PersonFacesService;
using MoYu.RemoteRequest.Extensions;

namespace SafeCampus.Application.Services.Business.PersonFacesService;

public class PersonFacesService:DbRepository<PersonFaces>, IPersonFacesService
{
@@ -6,7 +8,14 @@ public class PersonFacesService:DbRepository<PersonFaces>, IPersonFacesService
{
var oldList = await GetListAsync(x => x.PersonId == list[0].PersonId);
await DeleteAsync(oldList);
await InsertRangeAsync(list);
foreach (var item in list)
{
var signImg = Path.Combine(Directory.GetCurrentDirectory(), "Files", App.Configuration["AppInfo:PersonImg"], item.FaceId + ".jpg");
await item.FaceUrl.GetToSaveAsync(signImg);
item.FaceUrl = $"/Files/{App.Configuration["AppInfo:PersonImg"]}/{item.FaceId}.jpg";
await InsertAsync(item);
}
//await InsertRangeAsync(list);
return true;
}



+ 4
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoDto.cs Zobrazit soubor

@@ -68,7 +68,9 @@ public class PersonInfoDto
public DateTime? InsTime { get; set; }

public string DepName { get; set; }
public long DepId { get; set; }
public string MajorName { get; set; }
public long MajorId { get; set; }
}
public class PersonInfoDtoMapper : IRegister
{
@@ -81,6 +83,8 @@ public class PersonInfoDtoMapper : IRegister
.Map(dest => dest.Faces, src => src.PersonFacesList)
.Map(dest => dest.DormitoryName, src => src.DormitoryInfoItem.Name)
.Map(dest => dest.DepName, src => src.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name)
.Map(x=>x.DepId,x=>x.PersonSetInfoItem.MajorInfoItem.DepId)
.Map(x=>x.MajorId,x=>x.PersonSetInfoItem.MajorInfoItem.Id)
.Map(dest => dest.MajorName, src => src.PersonSetInfoItem.MajorInfoItem.Name);
}
}

+ 8
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoSearch.cs Zobrazit soubor

@@ -14,4 +14,12 @@ public class PersonInfoSearch:BasePageInput
/// 班级id
/// </summary>
public string PersonSetId { get; set; }
/// <summary>
/// 系部id
/// </summary>
public long? DepId { get; set; }
/// <summary>
/// 院系id
/// </summary>
public long? MajorId { get; set; }
}

+ 2
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/PersonInfoService.cs Zobrazit soubor

@@ -69,6 +69,8 @@ public class PersonInfoService:DbRepository<PersonInfo>, IPersonInfoService
.Includes(x=>x.DormitoryInfoItem)
.WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId)
.WhereIF(!string.IsNullOrEmpty(search.PersonName), x => x.Name.Contains(search.PersonName))
.WhereIF(search.DepId.HasValue, x => x.PersonSetInfoItem.MajorInfoItem.DepId==search.DepId)
.WhereIF(search.MajorId.HasValue, x => x.PersonSetInfoItem.MajorId==search.MajorId)
.WhereIF(!string.IsNullOrEmpty(search.Phone), x => x.Phone.Contains(search.Phone));

var list = await query.OrderByDescending(x => x.CreateTime)


+ 9
- 3
SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/Dto/PersonSetInfoDto.cs Zobrazit soubor

@@ -14,11 +14,15 @@ public class PersonSetInfoDto
/// 专业id
/// </summary>
public long MajorId { get; set; }

public string UserId { get; set; }
/// <summary>
/// 班主任id
/// </summary>
public long TeacherId { get; set; }
public string PushUserId { get; set; }
public string UserName { get; set; }
public string MajorName { get; set; }
public string DepartmentName { get; set; }
public SysUser SysUserItem { get; set; }
}

public class PersonSetInfoDtoMapper : IRegister
@@ -26,8 +30,10 @@ public class PersonSetInfoDtoMapper : IRegister
public void Register(TypeAdapterConfig config)
{
config.ForType<PersonSetInfo, PersonSetInfoDto>()
.Map(x => x.UserId, x => x.ClassTeacherItem.UserId)
.Map(x=>x.TeacherId,x=>x.ClassTeacherItem.Id)
.Map(x => x.PushUserId, x => x.ClassTeacherItem.UserId)
.Map(x => x.UserName, x => x.ClassTeacherItem.SysUserItem.Name)
.Map(x => x.SysUserItem, x => x.ClassTeacherItem.SysUserItem)
.Map(x=>x.DepartmentName,x=>x.MajorInfoItem.DepartmentInfoItem.Name)
.Map(x=>x.MajorName,x=>x.MajorInfoItem.Name);
}

+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/PersonSetInfoService/PersonSetInfoService.cs Zobrazit soubor

@@ -42,10 +42,10 @@ public class PersonSetInfoService:DbRepository<PersonSetInfo>, IPersonSetInfoSer
{
var list =await Context.Queryable<PersonSetInfo>()
.Includes(x=>x.MajorInfoItem,x=>x.DepartmentInfoItem)
.Includes(x => x.ClassTeacherItem, st => st.SysUserItem)
.Where(x=>x.PersonSetId!=SafeCampusConst.ZDRY)
.WhereIF(majorId.HasValue,x=>x.MajorId==majorId)
.WhereIF(!string.IsNullOrEmpty(setName),x=>x.PersonSetName.Contains(setName))
.Includes(x => x.ClassTeacherItem, st => st.SysUserItem)
.ToListAsync();
return list.Adapt<List<PersonSetInfoDto>>();
}

+ 8
- 7
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoList.cs Zobrazit soubor

@@ -55,11 +55,11 @@ public class WarnInfoList
/// <summary>
/// 专业名称
/// </summary>
public long MajorName { get; set; }
public string MajorName { get; set; }
/// <summary>
/// 院系名称
/// </summary>
public long DepName { get; set; }
public string DepName { get; set; }
/// <summary>
/// 性别
/// </summary>
@@ -84,10 +84,11 @@ public class WarnInfoListMapper : IRegister
config.ForType<WarnInfo, WarnInfoList>()
//.Map(dest => dest.CameraName, src => src.CameraId.GetDescriptionByEnum<CameraType>());
.Map(dest => dest.CameraName, src => src.CameraInfoItem.SensorName)
.Map(x=>x.PersonName,x=>x.PersonInfoItem.Name)
.Map(x=>x.PersonSetName,x=>x.PersonSetInfoItem.PersonSetName)
.Map(x=>x.MajorName,x=>x.PersonSetInfoItem.MajorInfoItem.Name)
.Map(x=>x.DepName,x=>x.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name)
.Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name);
.Map(x => x.PersonName, x => x.PersonInfoItem.Name)
.Map(x => x.PersonSetName, x => x.PersonSetInfoItem.PersonSetName)
.Map(dest => dest.CameraGroup, src => src.CameraInfoItem.CameraGroupItem.Name)
.Map(x=>x.MajorName,x=>x.PersonSetInfoItem.MajorInfoItem.Name)
.Map(x=>x.DepName,x=>x.PersonSetInfoItem.MajorInfoItem.DepartmentInfoItem.Name);
//;
}
}

+ 6
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/IWarnInfoService.cs Zobrazit soubor

@@ -21,4 +21,10 @@ public interface IWarnInfoService:IApiBaseInterface<WarnInfoDto, WarnInfoList, W
/// </summary>
/// <returns></returns>
Task<List<WarnType>> GetWarnType();
/// <summary>
/// 批量删除
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public Task<bool> DeleteBatch(List<long> Ids);
}

+ 11
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/WarnInfoService.cs Zobrazit soubor

@@ -4,6 +4,7 @@ using MoYu.FriendlyException;
using SafeCampus.Application.Services.Business;
using SafeCampus.Application.Services.Business.Warn.Dto;
using SafeCampus.Application.Services.Business.Warn.Service;
using SafeCampus.Core.Utils.TXYSMS;

namespace SafeCampus.Web.Core.Controllers.Application.Business.Warn.Service;

@@ -18,8 +19,11 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient

public async Task<bool> Add(WarnInfoDto vm)
{

var model = vm.Adapt<WarnInfo>();
await InsertAsync(model);
//TODO 发送短信
TxySmsUtil.SendSms(new[] { "" }, new[] { "" });
return true;
}

@@ -98,7 +102,7 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient
var query = Context.Queryable<WarnInfo>()
.Includes(x=>x.CameraInfoItem)
.Includes(x=>x.PersonInfoItem)
.Includes(x=>x.PersonSetInfoItem,x1=>x1.MajorInfoItem,x2=>x2.DepartmentInfoItem)
.Includes(x=>x.PersonSetInfoItem,x=>x.MajorInfoItem,x=>x.DepartmentInfoItem)
.WhereIF(search.WarnHand.HasValue, x => x.WarnHand == search.WarnHand)
.WhereIF(!string.IsNullOrEmpty(search.AlarmType),x => x.AlarmType == search.AlarmType)
.WhereIF(!string.IsNullOrEmpty(search.CameraId), x => x.CameraId == search.CameraId)
@@ -158,4 +162,10 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient
});
return await query.ToListAsync();
}

public async Task<bool> DeleteBatch(List<long> Ids)
{
await Context.Deleteable<WarnInfo>().In(Ids).ExecuteCommandAsync();
return true;
}
}

+ 1
- 11
SafeCampus.API/SafeCampus.Core/Startup.cs Zobrazit soubor

@@ -1,14 +1,4 @@

//








using SafeCampus.Core.Utils;
using SafeCampus.Core.Utils;

namespace SafeCampus.Core;



+ 1
- 11
SafeCampus.API/SafeCampus.Core/UnifyResult/SafeCampusResult.cs Zobrazit soubor

@@ -1,14 +1,4 @@

//








namespace SafeCampus.Core;
namespace SafeCampus.Core;

/// <summary>
/// 全局返回结果


+ 2
- 12
SafeCampus.API/SafeCampus.Core/UnifyResult/SafeCampusResultProvider.cs Zobrazit soubor

@@ -1,14 +1,4 @@

//








namespace SafeCampus.Core;
namespace SafeCampus.Core;

/// <summary>
/// 规范化RESTful风格返回值
@@ -98,7 +88,7 @@ public class SafeCampusResultProvider : IUnifyResultProvider
return new SafeCampusResult<object>
{
Code = statusCode,
Msg = statusCode == StatusCodes.Status200OK ? "请求成功" : errors,
Msg = statusCode == StatusCodes.Status200OK ? "操作成功" : errors,
Data = data,
Extras = UnifyContext.Take(),
Time = DateTime.Now


+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/Attendance.cs Zobrazit soubor

@@ -3,7 +3,7 @@
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
[IgnoreInitTable]
public class Attendance : PrimaryKeyEntity
{
/// <summary>


+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/BuildingInfo.cs Zobrazit soubor

@@ -6,7 +6,7 @@
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
[IgnoreInitTable]
public class BuildingInfo : PrimaryKeyEntity
{
/// <summary>


+ 10
- 0
SafeCampus.API/SafeCampus.System/Entity/CameraGroup.cs Zobrazit soubor

@@ -17,6 +17,11 @@ public class CameraGroup : PrimaryKeyEntity
[SugarColumn(ColumnName = "ParentId", ColumnDescription = "父级id", IsNullable = true)]
public long ParentId { get; set; }
/// <summary>
/// 推送人id
/// </summary>
[SugarColumn(ColumnName = "PushUserId", ColumnDescription = "推送人id", IsNullable = true)]
public long? PushUserId { get; set; }
/// <summary>
/// 子级
/// </summary>
[SugarColumn(IsIgnore = true)]
@@ -26,4 +31,9 @@ public class CameraGroup : PrimaryKeyEntity
/// </summary>
[Navigate(NavigateType.OneToMany, nameof(CameraInfo.GroupId))]
public List<CameraInfo> CameraInfos { get; set; }
/// <summary>
/// 推送人信息
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(CameraInfo.PushUserId))]
public SysUser SysUserItem { get; set; }
}

+ 5
- 0
SafeCampus.API/SafeCampus.System/Entity/ClassRoomCallTask.cs Zobrazit soubor

@@ -46,4 +46,9 @@ public class ClassRoomCallTask: PrimaryKeyEntity
///</summary>
[Navigate(NavigateType.OneToOne, nameof(CameraId),nameof(CameraInfo.SensorId)),]
public CameraInfo CameraInfoItem { get; set; }
/// <summary>
/// 班级信息
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(PersonSetInfo.PersonSetId), nameof(PersonSetId))]
public PersonSetInfo PersonSetInfoItem { get; set; }
}

+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/DepartmentInfo.cs Zobrazit soubor

@@ -3,7 +3,7 @@
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
[IgnoreInitTable]
public class DepartmentInfo : PrimaryKeyEntity
{
/// <summary>


+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/MajorInfo.cs Zobrazit soubor

@@ -3,7 +3,7 @@
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
[IgnoreInitTable]
public class MajorInfo : PrimaryKeyEntity
{
/// <summary>


+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/PersonInfo.cs Zobrazit soubor

@@ -34,7 +34,7 @@ public class PersonInfo
/// <summary>
/// 扩展属性
/// </summary>
[SugarColumn(ColumnName = "ExtData", ColumnDescription = "扩展属性", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)]
[SugarColumn(ColumnName = "ExtData", ColumnDescription = "扩展属性", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
public string ExtData { get; set; }
/// <summary>
/// 人脸大小阈值


+ 1
- 1
SafeCampus.API/SafeCampus.System/Entity/PersonSetInfo.cs Zobrazit soubor

@@ -3,7 +3,7 @@
[Tenant(SqlSugarConst.DB_DEFAULT)]
[BatchEdit]
[CodeGen]
//[IgnoreInitTable]
[IgnoreInitTable]
public class PersonSetInfo
{
/// <summary>


+ 15
- 0
SafeCampus.API/SafeCampus.System/SafeCampus.System.xml Zobrazit soubor

@@ -841,6 +841,11 @@
父级id
</summary>
</member>
<member name="P:SafeCampus.System.CameraGroup.PushUserId">
<summary>
推送人id
</summary>
</member>
<member name="P:SafeCampus.System.CameraGroup.Children">
<summary>
子级
@@ -851,6 +856,11 @@
摄像头列表
</summary>
</member>
<member name="P:SafeCampus.System.CameraGroup.SysUserItem">
<summary>
推送人信息
</summary>
</member>
<member name="P:SafeCampus.System.CameraInfo.SensorId">
<summary>
摄像头编码
@@ -1056,6 +1066,11 @@
摄像头信息
</summary>
</member>
<member name="P:SafeCampus.System.ClassRoomCallTask.PersonSetInfoItem">
<summary>
班级信息
</summary>
</member>
<member name="P:SafeCampus.System.ClassTeacher.UserId">
<summary>
班主任用户id


+ 1
- 1
SafeCampus.API/SafeCampus.System/System.Development.json Zobrazit soubor

@@ -20,7 +20,7 @@
},
//系统层设置
"SystemSettings": {
"InitTable": false, //是否初始化表结构
"InitTable": true, //是否初始化表结构
"InitSeedData": false, //是否初始化种子数据
"SuperAdminViewAllData": true //是否超级管理员可以查看所有数据
}

+ 8
- 2
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/ClassRoomCallApi.cs Zobrazit soubor

@@ -113,9 +113,15 @@ public class ClassRoomCallApi : IDynamicApiController
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
public async Task<bool> Delete(long id)
[HttpPost]
public async Task<bool> Delete(BaseIdListInput input)
{
return await _classRoomCallTaskService.Remove(id);
foreach (var inputId in input.Ids)
{
await _classRoomCallTaskService.Remove(inputId);
}

return true;
}
/// <summary>
/// 获取点名任务列表


+ 37
- 22
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/DfieldApi.cs Zobrazit soubor

@@ -7,10 +7,10 @@ using SafeCampus.Application.Services.Business.PersonSetInfoService;

namespace SafeCampus.Web.Core.Controllers.Application.Business;
/// <summary>
/// 人员底库管理接口
/// 人员班级管理接口
/// </summary>
[Route("/business/[controller]")]
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 99,Tag = "人员底库管理")]
[ApiDescriptionSettings(ApiGroupConsts.SYSTEM_Business, Order = 99,Tag = "人员班级管理")]
public class DfieldApi : IDynamicApiController
{
private readonly IDeepelephManager _deepelephManager;
@@ -55,9 +55,9 @@ public class DfieldApi : IDynamicApiController
/// 查询底库列表
/// </summary>
/// <returns></returns>
public async Task<dynamic> QueryAll(long? majorId,string setName)
public async Task<dynamic> QueryAll(long? majorId,string personSetName)
{
return await _personSetInfoService.GetPageList(majorId, setName);
return await _personSetInfoService.GetPageList(majorId, personSetName);
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/set/queryAll"
.SetBody(new
@@ -99,29 +99,44 @@ public class DfieldApi : IDynamicApiController
/// <returns></returns>
public async Task<dynamic> DeleteDfieldD(string id)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/set/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personSetId= id
})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
var list = new List<string>();
if (id.Contains(","))
{
var isOk = model["data"].ToString() == id;
if (isOk)
list = id.Split(",").ToList();
}
else
{
list.Add(id);
}

foreach (var ids in list)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/set/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personSetId = ids
})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
{
await _personSetInfoService.Delete(id);
var isOk = model["data"].ToString() == ids;
if (isOk)
{
await _personSetInfoService.Delete(ids);
}
return isOk;
}
return isOk;

throw Oops.Oh(model["message"].ToString());
}

throw Oops.Oh(model["message"].ToString());
return false;
}
/// <summary>
/// 更新底库


+ 2
- 2
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/Dto/DfieldInput.cs Zobrazit soubor

@@ -29,8 +29,8 @@ public class PersonUnBindDfieInput
[IdNotNull(ErrorMessage = "人员id不能为空")]
public string PersonId { get; set; }
/// <summary>
/// 底库id
/// 班级id
/// </summary>
[IdNotNull(ErrorMessage = "底库id不能为空")]
[IdNotNull(ErrorMessage = "班级id不能为空")]
public string PersonSetId { get; set; }
}

+ 39
- 20
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/PersonApi.cs Zobrazit soubor

@@ -153,30 +153,45 @@ public class PersonApi : IDynamicApiController
/// <returns></returns>
public async Task<dynamic> DeletePersonD(string id)
{
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personId = id,
var list = new List<string>();
if (id.Contains(","))
{
list = id.Split(",").ToList();
}
else
{
list.Add(id);
}

})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
foreach (var ids in list)
{
var isOk = model["data"].ToString() == id;
if (isOk)
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/delete"
.SetBody(new
{
token = _deepelephManager.GetToken(),
tenantCode = appSettings.TenantCode,
poiId = appSettings.PoiId,
personId = ids,

})
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);
if ((bool)model["success"])
{
await _personInfoService.Delete(id);
var isOk = model["data"].ToString() == ids;
if (isOk)
{
await _personInfoService.Delete(ids);
}
return isOk;
}
return isOk;

throw Oops.Oh(model["message"].ToString());
}

throw Oops.Oh(model["message"].ToString());
return false;
}
/// <summary>
/// 更新人员信息
@@ -185,6 +200,7 @@ public class PersonApi : IDynamicApiController
/// <returns></returns>
public async Task<dynamic> UpdatePersionU(PersonModel info)
{
info.Faces = info.Faces.Select(x => new Faces { faceId = Guid.NewGuid().ToString("N"), faceUrl = x.faceUrl }).ToList();
var appSettings = App.GetOptionsMonitor<AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/createOrOverride"
.SetBody(new
@@ -346,7 +362,7 @@ public class PersonApi : IDynamicApiController
/// <returns></returns>
public async Task<dynamic> GetPersionById(ControllersIdInput input)
{
return await _personInfoService.GetInfo(input.Id);
var perModel= await _personInfoService.GetInfo(input.Id);
var appSettings = App.GetOptionsMonitor < AppInfoOptions>();
var str = await $"{appSettings.SXAPIURL}/dfield-api/ecology/person/query"
.SetBody(new
@@ -359,6 +375,7 @@ public class PersonApi : IDynamicApiController
.SetContentType("application/json")
.PostAsAsync<string>();
var model = JsonConvert.DeserializeObject<JObject>(str);

if ((bool)model["success"])
{
if (model["data"]["personSets"].Count() > 0)
@@ -371,7 +388,9 @@ public class PersonApi : IDynamicApiController
model["data"]["personSetId"] = null;
model["data"]["personSetName"] = null;
}
return model["data"];

perModel.Faces = JsonConvert.DeserializeObject<List<PersonFaces>>(model["data"]["faces"].ToString());
return perModel;
}

throw Oops.Oh(model["message"].ToString());


+ 4
- 3
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/WarnInfoController.cs Zobrazit soubor

@@ -37,9 +37,10 @@ public class WarnInfoController
/// </summary>
/// <param name="Id"></param>
/// <returns></returns>
public async Task<bool> DeleteInfoD(long Id)
[HttpPost]
public async Task<bool> DeleteInfoD(BaseIdListInput input)
{
return await _warnInfoService.Delete(Id);
return await _warnInfoService.DeleteBatch(input.Ids);
}
/// <summary>
/// 编辑预警信息
@@ -61,7 +62,7 @@ public class WarnInfoController
if (!string.IsNullOrEmpty(model.Extend))
{
var extend = JsonConvert.DeserializeObject<JObject>(model.Extend);
model.Extend = extend["age"]!=null?$"年龄:{extend["age"]};年龄置信度:{extend["ageProb"]};":"";
model.Extend = extend["age"]!=null?$"年龄:{extend["age"]};年龄置信度:{Convert.ToInt32(Convert.ToDecimal(extend["ageProb"])*100)}%;":"";
}

try


+ 5
- 3
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/SummarySeach.cs Zobrazit soubor

@@ -1,13 +1,15 @@
namespace SafeCampus.Web.Core.Controllers.Application.Violation;
using System.ComponentModel.DataAnnotations;

namespace SafeCampus.Web.Core.Controllers.Application.Violation;

public class SummarySeach
{
/// <summary>
/// 搜索条件
/// </summary>
public SearchType SearchType { get; set; }
public SearchType? SearchType { get; set; }
/// <summary>
/// 人员id
/// </summary>
public string PersonId { get; set; }
public string Id { get; set; }
}

+ 5
- 0
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioAnalysisController.cs Zobrazit soubor

@@ -3,6 +3,7 @@ using NPOI.XWPF.UserModel;
using SafeCampus.Application.Services.Business.Warn.Dto;
using SafeCampus.Application.Services.Business.Warn.Service;
using System.Diagnostics;
using MoYu.FriendlyException;
using SafeCampus.Core.Extension;

namespace SafeCampus.Web.Core.Controllers.Application.Violation;
@@ -191,6 +192,10 @@ public class VioAnalysisController
await using var fs = new FileStream(templatePath, FileMode.Open, FileAccess.ReadWrite);
XWPFDocument doc = new XWPFDocument(fs);
var content = warnList.GroupBy(x => x.AlarmTypeDesc).ToList();
if (!content.Any())
{
throw Oops.Oh("该时间段无数据,无法生成报告!");
}
Dictionary<string, string> replacements = new Dictionary<string, string>()
{
//图片


+ 6
- 6
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Violation/VioPortraitSummary.cs Zobrazit soubor

@@ -120,7 +120,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfWeek,
EndTick = endWeek
});
@@ -132,7 +132,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfLastWeek,
EndTick = endOfLastWeek
});
@@ -143,7 +143,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfMonth,
EndTick = endWeek
});
@@ -192,7 +192,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfWeek,
EndTick = endWeek
});
@@ -211,7 +211,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfLastWeek,
EndTick = endOfLastWeek
});
@@ -229,7 +229,7 @@ public class VioPortraitSummary
{
AlarmType = AlarmType.visual_fence.GetDisplay(),
CameraIds = cameraIds,
PersonId = seach.PersonId,
PersonId = seach.Id,
StartTick = startOfMonth,
EndTick = endWeek
});


+ 5
- 5
SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml Zobrazit soubor

@@ -241,7 +241,7 @@
</summary>
<returns></returns>
</member>
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.ClassRoomCallApi.Delete(System.Int64)">
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.ClassRoomCallApi.Delete(SafeCampus.Core.BaseIdListInput)">
<summary>
删除点名任务,删除关联点名数据
</summary>
@@ -513,7 +513,7 @@
</member>
<member name="T:SafeCampus.Web.Core.Controllers.Application.Business.DfieldApi">
<summary>
人员底库管理接口
人员班级管理接口
</summary>
</member>
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.DfieldApi.CreateDfieldA(SafeCampus.Web.Core.Controllers.Application.Business.ControllersNameInput)">
@@ -855,7 +855,7 @@
</member>
<member name="P:SafeCampus.Web.Core.Controllers.Application.Business.PersonUnBindDfieInput.PersonSetId">
<summary>
底库id
班级id
</summary>
</member>
<member name="P:SafeCampus.Web.Core.Controllers.Application.Business.ReturnTimeInput.FuncStart">
@@ -1107,7 +1107,7 @@
预警事件查询接口
</summary>
</member>
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.WarnInfoController.DeleteInfoD(System.Int64)">
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.WarnInfoController.DeleteInfoD(SafeCampus.Core.BaseIdListInput)">
<summary>
删除预警信息
</summary>
@@ -1301,7 +1301,7 @@
搜索条件
</summary>
</member>
<member name="P:SafeCampus.Web.Core.Controllers.Application.Violation.SummarySeach.PersonId">
<member name="P:SafeCampus.Web.Core.Controllers.Application.Violation.SummarySeach.Id">
<summary>
人员id
</summary>


+ 1
- 0
SafeCampus.API/SafeCampus.Web.Core/Startup.cs Zobrazit soubor

@@ -27,6 +27,7 @@ public class Startup : AppStartup
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();// 首字母小写(驼峰样式)
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss";// 时间格式化
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;// 忽略循环引用
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;// 忽略所有 null 属性
}).AddInjectWithUnifyResult<SafeCampusResultProvider>()//配置统一返回模型
;



+ 1
- 1
SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user Zobrazit soubor

@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project>
<PropertyGroup>
<_PublishTargetUrl>F:\Project\QJKJ\SafeCampus\SafeCampus.API\SafeCampus.Web.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl>
<History>True|2024-09-04T08:01:07.1761640Z;True|2024-09-04T15:47:33.3094448+08:00;True|2024-09-04T13:33:22.9396193+08:00;True|2024-08-30T13:27:03.2003529+08:00;True|2024-08-27T15:31:21.7026102+08:00;True|2024-08-20T11:12:26.7141701+08:00;True|2024-08-19T17:23:34.5703879+08:00;True|2024-08-19T15:55:28.3484786+08:00;True|2024-08-19T15:45:49.5623372+08:00;True|2024-08-19T14:56:17.7733738+08:00;True|2024-08-19T14:52:03.2782392+08:00;True|2024-08-19T14:10:57.7043528+08:00;True|2024-08-19T13:38:29.9236695+08:00;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;</History>
<History>True|2024-09-23T06:58:29.0998917Z;True|2024-09-23T14:34:42.4664825+08:00;True|2024-09-23T14:34:14.9788969+08:00;True|2024-09-23T14:21:01.8969413+08:00;True|2024-09-23T14:17:25.6978104+08:00;True|2024-09-23T13:44:21.2948521+08:00;True|2024-09-23T13:42:29.2647186+08:00;True|2024-09-19T17:53:09.3428873+08:00;True|2024-09-19T17:47:47.8015573+08:00;True|2024-09-19T17:33:18.0038814+08:00;True|2024-09-19T17:13:16.6885326+08:00;True|2024-09-19T16:40:10.4911580+08:00;True|2024-09-19T15:32:43.5092007+08:00;True|2024-09-19T14:13:40.1278496+08:00;True|2024-09-19T11:00:03.7642790+08:00;True|2024-09-04T16:01:07.1761640+08:00;True|2024-09-04T15:47:33.3094448+08:00;True|2024-09-04T13:33:22.9396193+08:00;True|2024-08-30T13:27:03.2003529+08:00;True|2024-08-27T15:31:21.7026102+08:00;True|2024-08-20T11:12:26.7141701+08:00;True|2024-08-19T17:23:34.5703879+08:00;True|2024-08-19T15:55:28.3484786+08:00;True|2024-08-19T15:45:49.5623372+08:00;True|2024-08-19T14:56:17.7733738+08:00;True|2024-08-19T14:52:03.2782392+08:00;True|2024-08-19T14:10:57.7043528+08:00;True|2024-08-19T13:38:29.9236695+08:00;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;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>

+ 1
- 1
SafeCampus.WEB/src/api/modules/attendance/roolcall.ts Zobrazit soubor

@@ -35,7 +35,7 @@ const attendanceRoolcallApi = {
},
/** 删除点名任务(删除关联点名数据) */
delete(params: any) {
return http.delete("delete", params);
return http.post("delete", params);
},
/** 删除点名任务(只可删除待处理的任务) */
remove(params: any) {


+ 14
- 2
SafeCampus.WEB/src/views/attendance/roolcall/index.vue Zobrazit soubor

@@ -23,7 +23,7 @@
<template #operation="scope">
<el-space>
<s-button link :opt="FormOptEnum.VIEW" @click="onView(scope.row)" />
<s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.personId], `删除点名任务`)" />
<s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.id], `删除点名任务`)" />
</el-space>
</template>
</ProTable>
@@ -125,6 +125,18 @@ const columns: ColumnProps[] = [
prop: "cameraName",
label: "摄像头名称"
},
{
prop: "depName",
label: "院系"
},
{
prop: "majorName",
label: "专业"
},
{
prop: "personSetName",
label: "班级"
},
{
prop: "continueTime",
label: "持续时间"
@@ -171,7 +183,7 @@ const formRef = ref<InstanceType<typeof Form> | null>(null);
return
}
// 二次确认 => 请求api => 刷新表格
await useHandleData(attendanceRoolcallApi.delete, {id: ids.join(",") }, msg);
await useHandleData(attendanceRoolcallApi.delete, {ids: ids }, msg);
RefreshTable(); //刷新表格
}



+ 4
- 0
SafeCampus.WEB/src/views/attendance/studentsReturn/index.vue Zobrazit soubor

@@ -36,6 +36,7 @@
value-format="YYYY-MM-DD"
type="date"
placeholder="选择查询日期"
:disabled-date="disabledDate"
@change="retrunTimeChange"
>
</el-date-picker>
@@ -115,6 +116,9 @@ const retrunTimeChange = () => {
proTable.value!.searchParam.ReturnTime = ReturnTime.value || ReturnTimeDefault;
proTable.value!.search();
};
const disabledDate = (time: Date) => {
return time.getTime() > Date.now();
};
// 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数)
// 表格配置项
const columns: ColumnProps[] = [


+ 34
- 30
SafeCampus.WEB/src/views/screen/component/index/video.vue Zobrazit soubor

@@ -31,36 +31,40 @@
<CaretBottom v-if="cate == 2" color="#fff" width="11px" />
</div>
</div>
<ul v-if="cate == 1">
<li
v-for="(item, index) in areaList"
:class="{ active: item.id == areaId }"
:key="index"
class="wrap1"
@click="areaItemClick(item)"
:title="item.name"
>
{{ item.name }}
</li>
<template v-if="!areaList.length">
<li class="wrap1" style="border: none">暂无区域</li>
</template>
</ul>
<ul v-if="cate == 2">
<li
v-for="(item, index) in deviceList"
:class="{ active: item.sensorId == sensorId }"
:key="index"
class="wrap1"
@click="itemClick(item)"
:title="item.sensorName"
>
{{ item.sensorName }}
</li>
<template v-if="!deviceList.length">
<li class="wrap1" style="border: none">暂无设备</li>
</template>
</ul>
<div v-if="cate == 1" style="height: calc(100% - 46px); overflow-y: auto">
<ul>
<li
v-for="(item, index) in areaList"
:class="{ active: item.id == areaId }"
:key="index"
class="wrap1"
@click="areaItemClick(item)"
:title="item.name + ' ( ' + item.cameraInfos.length + ' ) '"
>
{{ item.name }} ( {{ item.cameraInfos.length }} )
</li>
<template v-if="!areaList.length">
<li class="wrap1" style="border: none">暂无区域</li>
</template>
</ul>
</div>
<div v-if="cate == 2" style="height: calc(100% - 46px); overflow-y: auto">
<ul>
<li
v-for="(item, index) in deviceList"
:class="{ active: item.sensorId == sensorId }"
:key="index"
class="wrap1"
@click="itemClick(item)"
:title="item.sensorName"
>
{{ item.sensorName }}
</li>
<template v-if="!deviceList.length">
<li class="wrap1" style="border: none">暂无设备</li>
</template>
</ul>
</div>
</div>
</div>
</template>


+ 5
- 1
SafeCampus.WEB/src/views/userManage/clothing/index.vue Zobrazit soubor

@@ -7,6 +7,7 @@
<div class="main-box">
<!-- :request-api="userManageClothApi.getList" -->
<TreeFilter
:key="treeKey"
ref="treeFilter"
label="clothSetName"
id="clothSetId"
@@ -87,6 +88,7 @@ const faceUrl = ref('');
const visible = ref(false); //是否显示人员表单
const proTable = ref<ProTableInstance>();
const treeFilter = ref<any>({});
const treeKey = ref(1234);
const userStore = useUserStore();
const { accessToken } = userStore;
const tableData = ref<any>([])
@@ -161,6 +163,7 @@ const RefreshTable = () => {
}
// 刷新表格+树
const RefreshTree = async() => {
treeKey.value = Math.random();
await getTree(); //刷新树形筛选器
await getList(clothSetId.value)
}
@@ -185,7 +188,8 @@ const getList = (clothSetId:any)=>{
const getTree =async ()=>{
const { data }:any = await userManageClothApi.getList({});
treeData.value = data;
if(!clothSetId.value ){
// showTree.value = true
if(!clothSetId.value){
clothSetId.value = data[0].clothSetId.toString()
}


+ 2
- 0
SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue Zobrazit soubor

@@ -68,6 +68,8 @@ function onOpen(props: FormProps.Base<SysUserPersonnel.SysUserPerInfo>) {
if (props.record.personId) {
//如果传了id,就去请求api获取record
userManagePersonnelApi.detail({ id: props.record.personId }).then((res: any) => {
if (!res.data.majorId) res.data.majorId = "";
if (!res.data.depId) res.data.depId = "";
sysUserProps.record = res.data;
});
}


+ 1
- 1
SafeCampus.WEB/src/views/userManage/personnel/index.vue Zobrazit soubor

@@ -46,7 +46,7 @@
</template>
</el-upload>
</el-dropdown-item>
<el-dropdown-item :command="command(scope.row, cmdEnum.UnderpantsUnBinding)">
<el-dropdown-item v-if="scope.row.personSetId" :command="command(scope.row, cmdEnum.UnderpantsUnBinding)">
{{ cmdEnum.UnderpantsUnBinding }}
</el-dropdown-item>
</el-dropdown-menu>


+ 29
- 19
SafeCampus.WEB/src/views/violation/analysis/index.vue Zobrazit soubor

@@ -93,25 +93,35 @@ const onTimeSubmit = ()=>{
startTime: timeForm.dateArr[0],
endTime: timeForm.dateArr[1],
}).then((res:any) => {
console.log(res,"....UTF-8''");
const filename:any = ref()
filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]);
filename.value = filename.value.slice(7,-1)
let blobUrl = window.URL.createObjectURL(res.data);
const a = document.createElement('a');
a.style.display = 'none';
a.setAttribute("target", "_blank");
a.download = filename.value
a.href = blobUrl;
a.click();
a.remove();
ElMessage({
message: '导出成功',
type: 'success'
});
closeTime();
});
if(res.headers['content-disposition']){
const filename:any = ref()
filename.value = window.decodeURI(res.headers["content-disposition"].split("=")[2]);
filename.value = filename.value.slice(7,-1)
let blobUrl = window.URL.createObjectURL(res.data);
const a = document.createElement('a');
a.style.display = 'none';
a.setAttribute("target", "_blank");
a.download = filename.value
a.href = blobUrl;
a.click();
a.remove();
ElMessage({
message: '导出成功',
type: 'success'
});
closeTime();
}else{
const fileReader:any = new FileReader()
fileReader.readAsText(new Blob([res.data], { type: 'application/octet-stream' }), 'utf-8')
fileReader.onload = () => {
const result = JSON.parse(fileReader.result)
ElMessage({
message: result.msg,
type: 'error'
});
}
}
})
} else {
return false;


+ 21
- 2
monitorMobile/components/selectSearch.vue Zobrazit soubor

@@ -21,9 +21,13 @@
v-for="(item, index) in options" :key="index" :label="item.label" :name="item.value">
</u-checkbox>
</u-checkbox-group>
<view style="padding: 36rpx 50rpx">
<view style="padding: 36rpx 50rpx;display:flex">
<u-button @click="cancel" type="info"
customStyle="border-radius: 45rpx;height: 90rpx;font-weight: 700;font-size: 32rpx;color:#666;"
text="取消选择" v-if="value_"></u-button>
<view style="width: 36rpx;" v-if="value_"></view>
<u-button @click="cofirm" type="primary"
style="border-radius: 45rpx;height: 90rpx;font-weight: 700;font-size: 32rpx;"
customStyle="border-radius: 45rpx;height: 90rpx;font-weight: 700;font-size: 32rpx;"
text="确定"></u-button>
</view>
</view>
@@ -135,6 +139,21 @@
}
this.close()
},
cancel(){
if (!this.multiple) {
this.value_ = ''
this.$emit("input", this.value_)
this.$emit("change", this.value_)
let obj = this.options.find(e1 => e1.value == this.value_)
if (obj) {
this.$emit("update:title", this.title_)
} else {
this.$emit("update:title", '')
}
} else {
this.value_ = []
}
}
}
}
</script>


+ 1
- 0
monitorMobile/pages/login.vue Zobrazit soubor

@@ -162,6 +162,7 @@
height: calc(100% - 880rpx);
margin-top: 46rpx;
padding: 60rpx 60rpx 0 60rpx;
min-height: 450rpx;

.title {
color: #333;


+ 7
- 2
monitorMobile/pages/work/rollCall/detail.vue Zobrazit soubor

@@ -15,6 +15,9 @@
</view>
<view style="height:calc(100% - 200rpx);overflow: auto;">
<view class="list">
<view v-show="cateList.length&&!list.find(e=>cateList[cate].show(e))" style="color: rgb(96, 98, 102);margin-top:36rpx;font-size: 26rpx;text-align: center;">
暂无数据
</view>
<template v-for="(item, index) in list">
<view class="item" @click="popupShow(item)" :key="index" v-show="cateList.length&&cateList[cate].show(item)">
<view class="right">
@@ -45,8 +48,10 @@
</view>
<u-popup :show="show" mode="center" :round="10">
<view class="popupInfo">
<image :src="popupInfo.faceUrl" mode="widthFix" style="width: 480rpx;border-radius:10rpx">
</image>
<view style="width: 480rpx;overflow-y: auto;max-height: 660rpx;">
<image :src="popupInfo.faceUrl" mode="widthFix" style="width: 480rpx;border-radius:10rpx;">
</image>
</view>
<view class="top">
<view class="status" :style="{backgroundColor:cate == 0?'#0FAF76':cate == 1?'#EF2D2D':'#F49D19' }">
{{cateList.find(e=>e.value == cate)?cateList.find(e=>e.value == cate).label:''}}


+ 1
- 1
monitorMobile/pages/work/rollCall/index.vue Zobrazit soubor

@@ -2,7 +2,7 @@
<view style="height: 100%;">
<view class="topBox">
<SelectRadio v-model="search.CameraId" align="center" placeholder="请选择摄像头" @change="refresh"
:options="allOptions.monitorList" />
:options="[{value:'',label:'全部'},...allOptions.monitorList]" />
</view>
<u-empty marginTop="100rpx" :show="list.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
<u-list @scrolltolower="scrolltolower" style="height: calc(100% - 150rpx);">


Načítá se…
Zrušit
Uložit