@@ -394,6 +394,123 @@ public class DeepelephManager : IDeepelephManager, IScoped | |||||
{ | { | ||||
dayEnum = AlarmType.class_room_call; | dayEnum = AlarmType.class_room_call; | ||||
} | } | ||||
if (dayEnum==AlarmType.lie_on_table) | |||||
{ | |||||
} | |||||
else | |||||
{ | |||||
#region 添加预警 | |||||
var ymmodel = new WarnInfoDto | |||||
{ | |||||
TenantCode = body["tenantCode"]?.ToString(), | |||||
PoiId = body["poiId"]?.ToString(), | |||||
AlarmId = body["alarmId"]?.ToString(), | |||||
AlarmType = body["alarmType"]?.ToString(), | |||||
//AlarmTypeDesc = dayEnum.GetDescription(), | |||||
CameraId = body["cameraId"]?.ToString(), | |||||
Tick = TimestampToDateTime(body["tick"].ToString()), | |||||
SnapshotUrl = body["snapshotUrl"]?.ToString(), | |||||
Rects = body["rects"]?.ToString(), | |||||
Tags = body["tags"]?.ToString(), | |||||
Extend = body["extend"]?.ToString(), | |||||
//PersonType = personEnum.GetDescription(), | |||||
WarnHand = 0, | |||||
}; | |||||
PersonType personEnum; | |||||
if (body["extend"] != null) | |||||
{ | |||||
var extend = JsonConvert.DeserializeObject<JObject>(body["extend"].ToString()); | |||||
ymmodel.PersonId = extend?["personId"]?.ToString(); | |||||
ymmodel.PersonSetId = extend?["personSetId"]?.ToString(); | |||||
ymmodel.ClothId = extend?["clothId"]?.ToString(); | |||||
ymmodel.ClothsSetId = extend?["clothsSetId"]?.ToString(); | |||||
ymmodel.Gender = extend?["genderScore"]?.ToString(); | |||||
ymmodel.TrackId = extend?["trackId"]?.ToString(); | |||||
ymmodel.SpeedLevel = extend?["speedLevel"]?.ToString(); | |||||
if (extend["clothSimilarity"] != null) | |||||
ymmodel.ClothSimilarity = extend?["clothSimilarity"]?.ParseToFloat(); | |||||
if (extend["count"] != null) | |||||
ymmodel.Count = extend?["count"]?.ParseToInt(); | |||||
if (extend["duration"] != null) | |||||
ymmodel.Duration = extend?["duration"]?.ParseToInt(); | |||||
if (extend["faceSimilarity"] != null) | |||||
ymmodel.FaceSimilarity = extend?["faceSimilarity"]?.ParseToFloat(); | |||||
if (extend["maxAroundTracks"] != null) | |||||
ymmodel.MaxAroundTracks = extend?["maxAroundTracks"]?.ParseToInt(); | |||||
if (extend["genderScore"] != null) | |||||
{ | |||||
if ((float)extend["genderScore"][0] > 0.6) | |||||
{ | |||||
ymmodel.Gender = "男性"; | |||||
} | |||||
else if ((float)extend["genderScore"][1] > 0.6) | |||||
{ | |||||
ymmodel.Gender = "女性"; | |||||
} | |||||
else if ((float)extend["genderScore"][2] > 0.6) | |||||
{ | |||||
ymmodel.Gender = "不确定"; | |||||
} | |||||
} | |||||
if (extend["personType"] != null) | |||||
{ | |||||
if (!Enum.TryParse(extend?["personType"]?.ToString(), out personEnum)) | |||||
{ | |||||
personEnum = PersonType.unkonwn; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
personEnum = PersonType.unkonwn; | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
personEnum = PersonType.unkonwn; | |||||
} | |||||
ymmodel.AlarmTypeDesc = dayEnum.GetDescription(); | |||||
ymmodel.PersonType = personEnum.GetDescription(); | |||||
var yjsignImg = Path.Combine(Directory.GetCurrentDirectory(), "Files", App.Configuration["AppInfo:AlarmImg"], ymmodel.AlarmId + ".jpg"); | |||||
var yjsteam = await ymmodel.SnapshotUrl.GetAsByteArrayAsync(); | |||||
ymmodel.SnapshotUrl = $"/Files/{App.Configuration["AppInfo:AlarmImg"]}/{ymmodel.AlarmId}.jpg"; | |||||
using (MemoryStream ms = new MemoryStream(yjsteam)) | |||||
{ | |||||
using (Bitmap bmp = new Bitmap(ms)) | |||||
{ | |||||
using (Graphics g = Graphics.FromImage(bmp)) | |||||
{ | |||||
using (Pen pen = new Pen(Color.Red, 3)) | |||||
{ | |||||
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(yjsignImg, ImageFormat.Jpeg); | |||||
} | |||||
} | |||||
Scoped.Create((_, scope) => | |||||
{ | |||||
var services = scope.ServiceProvider; | |||||
var _repository = services.GetService<IWarnInfoService>(); | |||||
_repository.Add(ymmodel); | |||||
}); | |||||
#endregion | |||||
} | |||||
#region 添加点名 | |||||
var model = new ClassRoomCallDto | var model = new ClassRoomCallDto | ||||
{ | { | ||||
TenantCode = body["tenantCode"]?.ToString(), | TenantCode = body["tenantCode"]?.ToString(), | ||||
@@ -442,6 +559,8 @@ public class DeepelephManager : IDeepelephManager, IScoped | |||||
var _repository = services.GetService<IClassRoomCallService>(); | var _repository = services.GetService<IClassRoomCallService>(); | ||||
_repository.Add(model); | _repository.Add(model); | ||||
}); | }); | ||||
#endregion | |||||
} | } | ||||
} | } | ||||
else if (json["type"].ToString() == "cmd") | else if (json["type"].ToString() == "cmd") | ||||
@@ -225,6 +225,21 @@ | |||||
人员id | 人员id | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:SafeCampus.Application.Services.Business.AttendanceService.AttendanceList.PersonName"> | |||||
<summary> | |||||
人员名称 | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.AttendanceService.AttendanceList.DormitName"> | |||||
<summary> | |||||
寝室名称 | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.AttendanceService.AttendanceList.PersonSetName"> | |||||
<summary> | |||||
班级名称 | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.AttendanceService.AttendanceList.IsAuto"> | <member name="P:SafeCampus.Application.Services.Business.AttendanceService.AttendanceList.IsAuto"> | ||||
<summary> | <summary> | ||||
是否自动上报 | 是否自动上报 | ||||
@@ -1357,6 +1372,16 @@ | |||||
考勤列表 | 考勤列表 | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoDto.State"> | |||||
<summary> | |||||
出勤状态 | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoDto.InsTime"> | |||||
<summary> | |||||
进班时间 | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.PersonName"> | <member name="P:SafeCampus.Application.Services.Business.PersonInfoService.PersonInfoSearch.PersonName"> | ||||
<summary> | <summary> | ||||
人员名称 | 人员名称 | ||||
@@ -1666,6 +1691,11 @@ | |||||
摄像头快照,原链接有效期为2小时,获取到数据后下载到本地 | 摄像头快照,原链接有效期为2小时,获取到数据后下载到本地 | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:SafeCampus.Application.Services.Business.Warn.Dto.WarnInfoList.PersonId"> | |||||
<summary> | |||||
人员id | |||||
</summary> | |||||
</member> | |||||
<member name="P:SafeCampus.Application.Services.Business.Warn.Dto.WarnInfoList.PersonName"> | <member name="P:SafeCampus.Application.Services.Business.Warn.Dto.WarnInfoList.PersonName"> | ||||
<summary> | <summary> | ||||
人员名称 | 人员名称 | ||||
@@ -53,6 +53,8 @@ public class AttendanceService:DbRepository<Attendance>, IAttendanceService | |||||
{ | { | ||||
var query = Context.Queryable<Attendance>() | var query = Context.Queryable<Attendance>() | ||||
//.Includes(x => x.CameraInfoItem) | //.Includes(x => x.CameraInfoItem) | ||||
.Includes(x=>x.PersonInfoItem,x=>x.DormitoryInfoItem) | |||||
.Includes(x=>x.PersonInfoItem,x=>x.PersonSetInfoItem) | |||||
.WhereIF(search.IsAuto.HasValue, x => x.IsAuto == search.IsAuto) | .WhereIF(search.IsAuto.HasValue, x => x.IsAuto == search.IsAuto) | ||||
.WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId) | .WhereIF(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId) | ||||
.WhereIF(!string.IsNullOrEmpty(search.PersonId), x => x.PersonId == search.PersonId) | .WhereIF(!string.IsNullOrEmpty(search.PersonId), x => x.PersonId == search.PersonId) | ||||
@@ -31,6 +31,20 @@ public class AttendanceList | |||||
/// </summary> | /// </summary> | ||||
public string PersonId { get; set; } | public string PersonId { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 人员名称 | |||||
/// </summary> | |||||
public string PersonName { get; set; } | |||||
/// <summary> | |||||
/// 寝室名称 | |||||
/// </summary> | |||||
public string DormitName { get; set; } | |||||
//人员性别 | |||||
public string Gender { get; set; } | |||||
/// <summary> | |||||
/// 班级名称 | |||||
/// </summary> | |||||
public string PersonSetName { get; set; } | |||||
/// <summary> | |||||
/// 是否自动上报 | /// 是否自动上报 | ||||
/// </summary> | /// </summary> | ||||
public bool IsAuto { get; set; } | public bool IsAuto { get; set; } | ||||
@@ -70,4 +84,16 @@ public class AttendanceList | |||||
/// 创建时间 | /// 创建时间 | ||||
/// </summary> | /// </summary> | ||||
public DateTime CreateTime { get; set; } | public DateTime CreateTime { get; set; } | ||||
} | |||||
public class AttendanceListMapper : IRegister | |||||
{ | |||||
public void Register(TypeAdapterConfig config) | |||||
{ | |||||
config.ForType<Attendance, AttendanceList>() | |||||
.Map(x => x.PersonName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Name : "") | |||||
.Map(x => x.PersonSetName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.PersonSetInfoItem.PersonSetName : "") | |||||
.Map(x => x.DormitName, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.DormitoryInfoItem.Name : "") | |||||
.Map(x => x.Gender, x => !string.IsNullOrEmpty(x.PersonId) ? x.PersonInfoItem.Gender : ""); | |||||
} | |||||
} | } |
@@ -58,6 +58,14 @@ public class PersonInfoDto | |||||
/// 考勤列表 | /// 考勤列表 | ||||
/// </summary> | /// </summary> | ||||
public List<Attendance> Attendances { get; set; } | public List<Attendance> Attendances { get; set; } | ||||
/// <summary> | |||||
/// 出勤状态 | |||||
/// </summary> | |||||
public string State { get; set; } | |||||
/// <summary> | |||||
/// 进班时间 | |||||
/// </summary> | |||||
public DateTime? InsTime { get; set; } | |||||
} | } | ||||
public class PersonInfoDtoMapper : IRegister | public class PersonInfoDtoMapper : IRegister | ||||
{ | { | ||||
@@ -37,6 +37,10 @@ public class WarnInfoList | |||||
/// </summary> | /// </summary> | ||||
public string SnapshotUrl { get; set; } | public string SnapshotUrl { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 人员id | |||||
/// </summary> | |||||
public string PersonId { get; set; } | |||||
/// <summary> | |||||
/// 人员名称 | /// 人员名称 | ||||
/// </summary> | /// </summary> | ||||
public string PersonName { get; set; } | public string PersonName { get; set; } | ||||
@@ -15,7 +15,7 @@ public interface IWarnInfoService:IApiBaseInterface<WarnInfoDto, WarnInfoList, W | |||||
/// 获取列表不分页 | /// 获取列表不分页 | ||||
/// </summary> | /// </summary> | ||||
/// <returns></returns> | /// <returns></returns> | ||||
Task<List<WarnInfo>> GetListNoPage(WarnInfoSearch search); | |||||
Task<List<WarnInfoList>> GetListNoPage(WarnInfoSearch search); | |||||
/// <summary> | /// <summary> | ||||
/// 获取告警分离列表 | /// 获取告警分离列表 | ||||
/// </summary> | /// </summary> | ||||
@@ -127,9 +127,12 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient | |||||
return true; | return true; | ||||
} | } | ||||
public async Task<List<WarnInfo>> GetListNoPage(WarnInfoSearch search) | |||||
public async Task<List<WarnInfoList>> GetListNoPage(WarnInfoSearch search) | |||||
{ | { | ||||
var query = Context.Queryable<WarnInfo>() | var query = Context.Queryable<WarnInfo>() | ||||
.Includes(x => x.CameraInfoItem,x=>x.CameraGroupItem) | |||||
.Includes(x => x.PersonInfoItem) | |||||
.Includes(x => x.PersonSetInfoItem) | |||||
.WhereIF(search.WarnHand.HasValue, x => x.WarnHand == search.WarnHand) | .WhereIF(search.WarnHand.HasValue, x => x.WarnHand == search.WarnHand) | ||||
.WhereIF(!string.IsNullOrEmpty(search.AlarmType), x => x.AlarmType == search.AlarmType) | .WhereIF(!string.IsNullOrEmpty(search.AlarmType), x => x.AlarmType == search.AlarmType) | ||||
.WhereIF(search.AlarmTypes!=null&&search.AlarmTypes.Any(),x=>search.AlarmTypes.Contains(x.AlarmType)) | .WhereIF(search.AlarmTypes!=null&&search.AlarmTypes.Any(),x=>search.AlarmTypes.Contains(x.AlarmType)) | ||||
@@ -140,7 +143,7 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient | |||||
var list = await query.OrderByDescending(x => x.Tick) | var list = await query.OrderByDescending(x => x.Tick) | ||||
.ToListAsync(); | .ToListAsync(); | ||||
return list; | |||||
return list.Adapt<List<WarnInfoList>>(); | |||||
} | } | ||||
public async Task<List<WarnType>>GetWarnType() | public async Task<List<WarnType>>GetWarnType() | ||||
{ | { | ||||
@@ -12,5 +12,5 @@ public class WarnGroupSubset | |||||
public string Name { get; set; } | public string Name { get; set; } | ||||
public string Code { get; set; } | public string Code { get; set; } | ||||
public bool State {get;set;} | public bool State {get;set;} | ||||
public int Count { get; set; } | |||||
public int Value { get; set; } | |||||
} | } |
@@ -116,5 +116,27 @@ public enum AlarmType | |||||
/// 车辆超速 | /// 车辆超速 | ||||
/// </summary> | /// </summary> | ||||
[Description("车辆超速")] | [Description("车辆超速")] | ||||
vehicle_speeding | |||||
vehicle_speeding, | |||||
/// <summary> | |||||
/// 违规占道 | |||||
/// </summary> | |||||
[Description("违规占道")] | |||||
violation_occupy, | |||||
/// <summary> | |||||
/// 玩手机 | |||||
/// </summary> | |||||
[Description("玩手机")] | |||||
play_phone, | |||||
/// <summary> | |||||
/// 骑车未戴头盔 | |||||
/// </summary> | |||||
[Description("骑车未戴头盔")] | |||||
bike_without_helmet, | |||||
/// <summary> | |||||
/// 儿童骑平衡车 | |||||
/// </summary> | |||||
[Description("儿童骑平衡车/滑板车")] | |||||
segway_with_child | |||||
} | } |
@@ -436,6 +436,26 @@ | |||||
车辆超速 | 车辆超速 | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="F:SafeCampus.Core.AlarmType.violation_occupy"> | |||||
<summary> | |||||
违规占道 | |||||
</summary> | |||||
</member> | |||||
<member name="F:SafeCampus.Core.AlarmType.play_phone"> | |||||
<summary> | |||||
玩手机 | |||||
</summary> | |||||
</member> | |||||
<member name="F:SafeCampus.Core.AlarmType.bike_without_helmet"> | |||||
<summary> | |||||
骑车未戴头盔 | |||||
</summary> | |||||
</member> | |||||
<member name="F:SafeCampus.Core.AlarmType.segway_with_child"> | |||||
<summary> | |||||
儿童骑平衡车 | |||||
</summary> | |||||
</member> | |||||
<member name="T:SafeCampus.Core.AuthDeviceTypeEnum"> | <member name="T:SafeCampus.Core.AuthDeviceTypeEnum"> | ||||
<summary> | <summary> | ||||
登录设备类型枚举 | 登录设备类型枚举 | ||||
@@ -96,4 +96,9 @@ public class Attendance : PrimaryKeyEntity | |||||
/// </summary> | /// </summary> | ||||
[Navigate(NavigateType.OneToOne, nameof(CameraId), nameof(CameraInfo.SensorId))] | [Navigate(NavigateType.OneToOne, nameof(CameraId), nameof(CameraInfo.SensorId))] | ||||
public CameraInfo CameraInfoItem { get; set; } | public CameraInfo CameraInfoItem { get; set; } | ||||
/// <summary> | |||||
/// 寝室信息 | |||||
/// </summary> | |||||
[Navigate(NavigateType.OneToOne, nameof(PersonId), nameof(PersonInfo.PersonId))] | |||||
public PersonInfo PersonInfoItem { get; set; } | |||||
} | } |
@@ -786,6 +786,11 @@ | |||||
摄像头信息 | 摄像头信息 | ||||
</summary> | </summary> | ||||
</member> | </member> | ||||
<member name="P:SafeCampus.System.Attendance.PersonInfoItem"> | |||||
<summary> | |||||
寝室信息 | |||||
</summary> | |||||
</member> | |||||
<member name="T:SafeCampus.System.BuildingInfo"> | <member name="T:SafeCampus.System.BuildingInfo"> | ||||
<summary> | <summary> | ||||
学生宿舍楼表 | 学生宿舍楼表 | ||||
@@ -123,4 +123,13 @@ public class AlarmApi:IDynamicApiController | |||||
await _hubContext.Clients.All.ReceiveMessage(user,msg); | await _hubContext.Clients.All.ReceiveMessage(user,msg); | ||||
return true; | return true; | ||||
} | } | ||||
/// <summary> | |||||
/// 测试 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public async Task<bool> Test() | |||||
{ | |||||
Thread.Sleep(5000); | |||||
return true; | |||||
} | |||||
} | } |
@@ -13,6 +13,7 @@ using SafeCampus.Web.Core.Controllers.Application.Business; | |||||
using MoYu.RemoteRequest.Extensions; | using MoYu.RemoteRequest.Extensions; | ||||
using Newtonsoft.Json.Linq; | using Newtonsoft.Json.Linq; | ||||
using SafeCampus.Application.Manager.DeepelephManager; | using SafeCampus.Application.Manager.DeepelephManager; | ||||
using SafeCampus.Application.Services.Business.PersonSetInfoService; | |||||
namespace SafeCampus.Web.Core.Controllers.Application.LargeScreen; | namespace SafeCampus.Web.Core.Controllers.Application.LargeScreen; | ||||
@@ -35,9 +36,10 @@ public class LargeScreenController | |||||
private readonly IClassRoomCallTaskService _classRoomCallTaskService; | private readonly IClassRoomCallTaskService _classRoomCallTaskService; | ||||
private readonly IClassRoomCallService _classRoomCallService; | private readonly IClassRoomCallService _classRoomCallService; | ||||
private readonly IDeepelephManager _deepelephManager; | private readonly IDeepelephManager _deepelephManager; | ||||
private readonly 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) | |||||
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) | |||||
{ | { | ||||
_personInfoService = personInfoService; | _personInfoService = personInfoService; | ||||
_cameraGroupService = cameraGroupService; | _cameraGroupService = cameraGroupService; | ||||
@@ -50,6 +52,7 @@ public class LargeScreenController | |||||
_classRoomCallTaskService = classRoomCallTaskService; | _classRoomCallTaskService = classRoomCallTaskService; | ||||
_classRoomCallService = classRoomCallService; | _classRoomCallService = classRoomCallService; | ||||
_deepelephManager = deepelephManager; | _deepelephManager = deepelephManager; | ||||
_personSetInfoService = personSetInfoService; | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -82,23 +85,41 @@ public class LargeScreenController | |||||
var alarmStatistics = warnType.Select(x => new | var alarmStatistics = warnType.Select(x => new | ||||
{ | { | ||||
Name = x.Description, | Name = x.Description, | ||||
Code = x.Name, | |||||
Count = warnlist.Count(xx => xx.AlarmType == x.Name) | |||||
}).Where(x => x.Count > 0).ToList(); | |||||
//Code = x.Name, | |||||
Value = warnlist.Count(xx => xx.AlarmType == x.Name) | |||||
}).Where(x => x.Value > 0).ToList(); | |||||
//按场景统计告警类型 | //按场景统计告警类型 | ||||
var warnGroup= _simpleCacheService.Get<List<WarnGroupInfo>>(SafeCampusConst.WarnGroup); | var warnGroup= _simpleCacheService.Get<List<WarnGroupInfo>>(SafeCampusConst.WarnGroup); | ||||
foreach (var item in warnGroup) | foreach (var item in warnGroup) | ||||
{ | { | ||||
foreach (var warnGroupSubset in item.Subset) | foreach (var warnGroupSubset in item.Subset) | ||||
{ | { | ||||
warnGroupSubset.Count = warnlist.Count(x => x.AlarmType == warnGroupSubset.Code); | |||||
warnGroupSubset.Value = warnlist.Count(x => x.AlarmType == warnGroupSubset.Code); | |||||
} | } | ||||
item.Count = item.Subset.Sum(x => x.Count); | |||||
item.Value = item.Subset.Sum(x => x.Value); | |||||
} | } | ||||
var list = new List<object> | |||||
{ | |||||
new { Name = "男生人数", Value = nan }, | |||||
new { Name = "女生人数", Value = nv } | |||||
}; | |||||
return new | return new | ||||
{ | { | ||||
//数字统计 | |||||
StudentPersonNum=new{TotalNum=ZRS,MaleNum=nan,FemaleNum=nv}, | StudentPersonNum=new{TotalNum=ZRS,MaleNum=nan,FemaleNum=nv}, | ||||
AlarmStatisti=new{TypeStatisti=alarmStatistics,GroupStatisti=warnGroup,WarnList=warnlist}, | |||||
StudentPersonStatistion=list, | |||||
//统计图表 | |||||
AlarmStatisti =new | |||||
{ | |||||
//按类型统计 | |||||
TypeStatisti=alarmStatistics, | |||||
//按告警分组 统计 | |||||
GroupStatisti=warnGroup, | |||||
//告警列表 | |||||
WarnList=warnlist | |||||
}, | |||||
//设备 | |||||
Camera= SheBei, | Camera= SheBei, | ||||
}; | }; | ||||
} | } | ||||
@@ -178,22 +199,38 @@ public class LargeScreenController | |||||
//告警信息 | //告警信息 | ||||
var warnGroup = _simpleCacheService.Get<List<WarnGroupInfo>>(SafeCampusConst.WarnGroup).FirstOrDefault(x=>x.Code=="ZHKT"); | var warnGroup = _simpleCacheService.Get<List<WarnGroupInfo>>(SafeCampusConst.WarnGroup).FirstOrDefault(x=>x.Code=="ZHKT"); | ||||
var warnlist = await _warnInfoService.GetListNoPage(new WarnInfoSearch | var warnlist = await _warnInfoService.GetListNoPage(new WarnInfoSearch | ||||
{ AlarmTypes = warnGroup.Subset.Select(x => x.Code).ToArray(),StartTick = startTime, EndTick = entTime }); | |||||
{ AlarmTypes = warnGroup.Subset.Select(x => x.Code).ToArray(),StartTick = startTime, EndTick = entTime,CameraId = personSetId == "YS001" ? "SXT001" : "SXT002" }); | |||||
//告警信息统计 | //告警信息统计 | ||||
var tongji = warnlist.GroupBy(x => x.AlarmTypeDesc).Select(x=>new{Labale=x.Key,Value=x.Count()}).ToList(); | var tongji = warnlist.GroupBy(x => x.AlarmTypeDesc).Select(x=>new{Labale=x.Key,Value=x.Count()}).ToList(); | ||||
foreach (var personInfoDto in xuesheng.List) | |||||
{ | |||||
var rollCall=classRoom.Where(x=>x.PersonId==personInfoDto.PersonId).MinBy(x=>x.Tick); | |||||
if (rollCall != null) | |||||
{ | |||||
personInfoDto.State = rollCall.Tick.TimeOfDay> TimeSpan.Parse("09:00:00")?"迟到":"正常"; | |||||
personInfoDto.InsTime = rollCall.Tick; | |||||
} | |||||
else | |||||
{ | |||||
personInfoDto.State = "缺勤"; | |||||
personInfoDto.InsTime = null; | |||||
} | |||||
} | |||||
return new | return new | ||||
{ | { | ||||
ClassRoom=new | ClassRoom=new | ||||
{ | { | ||||
Teacher="王明祥", | Teacher="王明祥", | ||||
ClassTime=DateTime.Now.ToString("yyyy-MM-dd 09:00:00"), | ClassTime=DateTime.Now.ToString("yyyy-MM-dd 09:00:00"), | ||||
ClassBreakTime=DateTime.Now.ToString("yyyy-MM-dd 12:00:00") | |||||
ClassBreakTime=DateTime.Now.ToString("yyyy-MM-dd 12:00:00"), | |||||
CameraId= personSetId== "YS001" ? "SXT001": "SXT002" | |||||
}, | }, | ||||
AlarmList= warnlist, | AlarmList= warnlist, | ||||
Statisti=new{Labale= tongji.Select(x=>x.Labale).ToList(),Value=tongji.Select(x=>x.Value).ToList()}, | |||||
NormalClass= xuesheng.List.Count(x=>warnlist.Any(xx=>xx.PersonId==x.PersonId)), | |||||
//AlarmListCount= warnlist.GroupBy(x=>x.PersonId).Count(), | |||||
Statisti =new{Labale= tongji.Select(x=>x.Labale).ToList(),Value=tongji.Select(x=>x.Value).ToList()}, | |||||
NormalClass= xuesheng.List.Count(x=>!warnlist.Any(xx=>xx.PersonId==x.PersonId)), | |||||
StudentList=xuesheng.List, | StudentList=xuesheng.List, | ||||
RollCall= classRoom | |||||
//RollCall= classRoom.Where(x=>x.AlarmType!= "class_room_call").ToList() | |||||
}; | }; | ||||
} | } | ||||
/// <summary> | /// <summary> | ||||
@@ -253,4 +290,20 @@ public class LargeScreenController | |||||
throw Oops.Oh(model["message"].ToString()); | throw Oops.Oh(model["message"].ToString()); | ||||
} | } | ||||
/// <summary> | |||||
/// 获取宿舍楼列表 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public async Task<List<BuildingInfoDto>> GetNoPageList() | |||||
{ | |||||
return await _buildingService.GetNoPageList(); | |||||
} | |||||
/// <summary> | |||||
/// 获取班级列表 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public async Task<dynamic> GetPersonSetNoPageList() | |||||
{ | |||||
return await _personSetInfoService.GetPageList(); | |||||
} | |||||
} | } |
@@ -61,6 +61,12 @@ | |||||
<param name="msg"></param> | <param name="msg"></param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:SafeCampus.Web.Core.Controllers.Application.Business.AlarmApi.Test"> | |||||
<summary> | |||||
测试 | |||||
</summary> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="T:SafeCampus.Web.Core.Controllers.Application.Business.AttendanceApi"> | <member name="T:SafeCampus.Web.Core.Controllers.Application.Business.AttendanceApi"> | ||||
<summary> | <summary> | ||||
考勤事件管理接口 | 考勤事件管理接口 | ||||
@@ -1116,6 +1122,18 @@ | |||||
<param name="streamId">流ID</param> | <param name="streamId">流ID</param> | ||||
<returns></returns> | <returns></returns> | ||||
</member> | </member> | ||||
<member name="M:SafeCampus.Web.Core.Controllers.Application.LargeScreen.LargeScreenController.GetNoPageList"> | |||||
<summary> | |||||
获取宿舍楼列表 | |||||
</summary> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="M:SafeCampus.Web.Core.Controllers.Application.LargeScreen.LargeScreenController.GetPersonSetNoPageList"> | |||||
<summary> | |||||
获取班级列表 | |||||
</summary> | |||||
<returns></returns> | |||||
</member> | |||||
<member name="P:SafeCampus.Web.Core.Controllers.Application.Violation.ReportExportInput.GroupCode"> | <member name="P:SafeCampus.Web.Core.Controllers.Application.Violation.ReportExportInput.GroupCode"> | ||||
<summary> | <summary> | ||||
场景code | 场景code | ||||
@@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121. | |||||
<Project> | <Project> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<_PublishTargetUrl>F:\Project\QJKJ\SafeCampus\SafeCampus.API\SafeCampus.Web.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl> | <_PublishTargetUrl>F:\Project\QJKJ\SafeCampus\SafeCampus.API\SafeCampus.Web.Entry\bin\Release\net6.0\publish\</_PublishTargetUrl> | ||||
<History>True|2024-07-31T08:54:03.1890463Z;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;False|2024-07-12T09:07:07.7298589+08:00;True|2024-07-12T08:46:51.1170229+08:00;True|2024-07-11T18:30:09.2678639+08:00;True|2024-07-11T17:24:01.3152273+08:00;True|2024-07-10T16:39:46.3177813+08:00;True|2024-07-10T15:11:58.9145970+08:00;True|2024-07-09T16:25:08.5009553+08:00;True|2024-07-09T16:20:39.2341016+08:00;False|2024-07-09T16:20:17.8406033+08:00;True|2024-07-09T15:52:31.4276391+08:00;True|2024-07-08T17:13:08.0190137+08:00;True|2024-07-08T16:57:04.2357740+08:00;</History> | |||||
<History>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;</History> | |||||
<LastFailureDetails /> | <LastFailureDetails /> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
</Project> | </Project> |
@@ -18,11 +18,19 @@ const http = moduleRequest("/business/warn/"); | |||||
const http1 = moduleRequest("/violation/analysis/"); | const http1 = moduleRequest("/violation/analysis/"); | ||||
const abilityApi = { | const abilityApi = { | ||||
/** 获取告警分组 */ | |||||
/* 推送配置保存 */ | |||||
pushConfig(params: any) { | |||||
return http.post("setWarnPushSetting", params); | |||||
}, | |||||
// 获取推送信息 | |||||
getPushInfo(params: any) { | |||||
return http.get("getWarnPushSetting", params); | |||||
}, | |||||
/** 获取预警分组 */ | |||||
warnGroup(params: ReqId) { | warnGroup(params: ReqId) { | ||||
return http.get("getWarnGroup", params); | return http.get("getWarnGroup", params); | ||||
}, | }, | ||||
/** 关联摄像头和告警分组 */ | |||||
/** 关联摄像头和预警分组 */ | |||||
setWarnGroup(params: setWarn) { | setWarnGroup(params: setWarn) { | ||||
return http.post("setWarnGroupDevice", params); | return http.post("setWarnGroupDevice", params); | ||||
}, | }, | ||||
@@ -34,15 +34,15 @@ const warnZJRQApi = { | |||||
delete(params: ReqId[]) { | delete(params: ReqId[]) { | ||||
return http.post("deleteInfoD", params); | return http.post("deleteInfoD", params); | ||||
}, | }, | ||||
/** 获取告警分组 */ | |||||
/** 获取预警分组 */ | |||||
warnGroup(params: ReqId) { | warnGroup(params: ReqId) { | ||||
return http.get("getInfo", params); | return http.get("getInfo", params); | ||||
}, | }, | ||||
/** 获取告警分组 */ | |||||
/** 获取预警分组 */ | |||||
warnType(params: ReqId) { | warnType(params: ReqId) { | ||||
return http.get("getAlarmType", params); | return http.get("getAlarmType", params); | ||||
}, | }, | ||||
/** 处理告警 */ | |||||
/** 处理预警 */ | |||||
handWarn(params: ReqId) { | handWarn(params: ReqId) { | ||||
return http.post("handWarn", params); | return http.post("handWarn", params); | ||||
} | } | ||||
@@ -86,8 +86,8 @@ const setSelected = () => { | |||||
}; | }; | ||||
onBeforeMount(async () => { | onBeforeMount(async () => { | ||||
await getRequestData(); | |||||
setSelected(); | setSelected(); | ||||
await getRequestData(); | |||||
}); | }); | ||||
// 使用 nextTick 防止打包后赋值不生效,开发环境是正常的 | // 使用 nextTick 防止打包后赋值不生效,开发环境是正常的 | ||||
@@ -1,81 +1,82 @@ | |||||
<!-- | <!-- | ||||
* @Description: 告警管理 | |||||
* @Description: 预警管理 | |||||
* @Author: huguodong | * @Author: huguodong | ||||
* @Date: 2023-12-15 15:44:05 | * @Date: 2023-12-15 15:44:05 | ||||
!--> | !--> | ||||
<template> | <template> | ||||
<div class="video-box"> | |||||
<videoPlay v-if="options.src" ref="aplayVideo" v-bind="options" @play="onPlay"/> | |||||
</div> | |||||
</template> | |||||
<div class="video-box"> | |||||
<videoPlay v-if="options.src" ref="aplayVideo" v-bind="options" @play="onPlay" /> | |||||
</div> | |||||
</template> | |||||
<script setup lang="tsx" name="sysSpa"> | <script setup lang="tsx" name="sysSpa"> | ||||
import "vue3-video-play/dist/style.css"; | |||||
import {videoPlay} from "vue3-video-play"; | |||||
const onPlay = (ev) => { | |||||
import "vue3-video-play/dist/style.css"; | |||||
import { videoPlay } from "vue3-video-play"; | |||||
const onPlay = ev => { | |||||
console.log("播放"); | console.log("播放"); | ||||
}; | }; | ||||
const props = defineProps({ | const props = defineProps({ | ||||
videoUrl: String, | videoUrl: String, | ||||
videoType: String, | |||||
videoType: String | |||||
}); | }); | ||||
// 视频播放组件 | // 视频播放组件 | ||||
const options = reactive({ | const options = reactive({ | ||||
type: '', | |||||
width: '100%', //播放器高度 | |||||
height: '100%', //播放器高度 | |||||
color: "#409eff", //主题色 | |||||
title: "", //视频名称 | |||||
webFullScreen:false,//网页全屏 | |||||
speed:true,//是否支持快进快退 | |||||
currentTime:0,//跳转到固定播放时间(s) | |||||
muted:false,//静音 | |||||
autoPlay: true, //自动播放 | |||||
loop:false,//循环播放 | |||||
mirror:false,//镜像画面 | |||||
control: true, //是否显示控制器 | |||||
ligthOff:false,//关灯模式 | |||||
volume:0.3,//默认音量0-1 | |||||
src: '', //视频源 | |||||
poster: '', //封面 | |||||
speedRate: [1.0,1.25,1.5,2.0], // 可选的播放速度 | |||||
controlBtns: [ | |||||
"audioTrack",//音轨切换按钮 | |||||
"quality",//视频质量切换按钮 | |||||
"speedRate",//速率切换按钮 | |||||
"volume",//音量 | |||||
"setting",//设置 | |||||
"pip",//画中画按钮 | |||||
"pageFullScreen",//网页全屏按钮 | |||||
"fullScreen",//全屏按钮 | |||||
], //显示所有按钮, | |||||
}) | |||||
type: "", | |||||
width: "100%", //播放器高度 | |||||
height: "100%", //播放器高度 | |||||
color: "#409eff", //主题色 | |||||
title: "", //视频名称 | |||||
webFullScreen: false, //网页全屏 | |||||
speed: true, //是否支持快进快退 | |||||
currentTime: 0, //跳转到固定播放时间(s) | |||||
muted: false, //静音 | |||||
autoPlay: true, //自动播放 | |||||
loop: false, //循环播放 | |||||
mirror: false, //镜像画面 | |||||
control: true, //是否显示控制器 | |||||
ligthOff: false, //关灯模式 | |||||
volume: 0.3, //默认音量0-1 | |||||
src: "", //视频源 | |||||
poster: "", //封面 | |||||
speedRate: [1.0, 1.25, 1.5, 2.0], // 可选的播放速度 | |||||
controlBtns: [ | |||||
"audioTrack", //音轨切换按钮 | |||||
"quality", //视频质量切换按钮 | |||||
"speedRate", //速率切换按钮 | |||||
"volume", //音量 | |||||
"setting", //设置 | |||||
"pip", //画中画按钮 | |||||
"pageFullScreen", //网页全屏按钮 | |||||
"fullScreen" //全屏按钮 | |||||
] //显示所有按钮, | |||||
}); | |||||
// 监视props.msg的变化 | // 监视props.msg的变化 | ||||
watch(() => props.videoType, (newValue) => { | |||||
if(newValue) { | |||||
options.type = newValue; | |||||
console.log(options.type) | |||||
watch( | |||||
() => props.videoType, | |||||
newValue => { | |||||
if (newValue) { | |||||
options.type = newValue; | |||||
console.log(options.type); | |||||
} else { | } else { | ||||
options.type = 'video/mp4'; | |||||
options.type = "video/mp4"; | |||||
} | } | ||||
},{ deep: true, immediate: true }); | |||||
watch(() => props.videoUrl, (newValue) => { | |||||
}, | |||||
{ deep: true, immediate: true } | |||||
); | |||||
watch( | |||||
() => props.videoUrl, | |||||
newValue => { | |||||
options.src = newValue; | options.src = newValue; | ||||
},{ deep: true, immediate: true }); | |||||
}, | |||||
{ deep: true, immediate: true } | |||||
); | |||||
onMounted(() => { | onMounted(() => { | ||||
// 在这里执行其他需要在组件挂载后运行的代码 | |||||
}); | |||||
</script> | |||||
// 在这里执行其他需要在组件挂载后运行的代码 | |||||
}); | |||||
</script> | |||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
</style> | |||||
</style> | |||||
@@ -1,16 +1,16 @@ | |||||
<template> | <template> | ||||
<div class="tool-bar-ri"> | <div class="tool-bar-ri"> | ||||
<div class="header-icon"> | <div class="header-icon"> | ||||
<el-icon @click="opens" color="#ccc" :size="25" style="margin-right: 5px; cursor: pointer"> | |||||
<!-- <el-icon @click="opens" color="#ccc" :size="25" style="margin-right: 5px; cursor: pointer"> | |||||
<Box /> | <Box /> | ||||
</el-icon> | |||||
</el-icon> --> | |||||
<el-icon @click="open" color="#ccc" :size="29" style="margin-right: 20px; cursor: pointer"> | <el-icon @click="open" color="#ccc" :size="29" style="margin-right: 20px; cursor: pointer"> | ||||
<VideoCamera /> | <VideoCamera /> | ||||
</el-icon> | </el-icon> | ||||
<AssemblySize id="assemblySize" /> | <AssemblySize id="assemblySize" /> | ||||
<SearchMenu id="searchMenu" /> | <SearchMenu id="searchMenu" /> | ||||
<ThemeSetting id="themeSetting" /> | <ThemeSetting id="themeSetting" /> | ||||
<Message id="message" /> | |||||
<!-- <Message id="message" /> --> | |||||
<Fullscreen id="fullscreen" /> | <Fullscreen id="fullscreen" /> | ||||
<ChangeModule id="changeModule" /> | <ChangeModule id="changeModule" /> | ||||
</div> | </div> | ||||
@@ -33,7 +33,7 @@ import SearchMenu from "./components/SearchMenu.vue"; | |||||
const userStore = useUserStore(); | const userStore = useUserStore(); | ||||
const username = computed(() => userStore.userInfo?.name); | const username = computed(() => userStore.userInfo?.name); | ||||
function open() { | function open() { | ||||
window.open("http://8.141.155.183:91/view/1808743138258845697"); | |||||
window.open("/#/screen"); | |||||
} | } | ||||
function opens() { | function opens() { | ||||
window.open("http://192.168.10.101:1234/"); | window.open("http://192.168.10.101:1234/"); | ||||
@@ -26,7 +26,7 @@ | |||||
<img src="@/assets/images/home/warn.png" alt="" /> | <img src="@/assets/images/home/warn.png" alt="" /> | ||||
</div> | </div> | ||||
<div class="home-bg-content-item-content"> | <div class="home-bg-content-item-content"> | ||||
<div class="home-bg-content-item-title">告警信息总量</div> | |||||
<div class="home-bg-content-item-title">预警信息总量</div> | |||||
<div class="home-bg-content-item-value">1972</div> | <div class="home-bg-content-item-value">1972</div> | ||||
</div> | </div> | ||||
</div></el-col | </div></el-col | ||||
@@ -61,7 +61,7 @@ | |||||
<div class="home-bg card"> | <div class="home-bg card"> | ||||
<div class="home-bg-title"> | <div class="home-bg-title"> | ||||
<div></div> | <div></div> | ||||
<div>今日告警情况</div> | |||||
<div>今日预警情况</div> | |||||
</div> | </div> | ||||
<div class="home-bg-content"> | <div class="home-bg-content"> | ||||
<div ref="chart1" style="width: 100%; height: 100%"></div> | <div ref="chart1" style="width: 100%; height: 100%"></div> | ||||
@@ -175,7 +175,7 @@ function getCharts1(data: any) { | |||||
}, | }, | ||||
series: [ | series: [ | ||||
{ | { | ||||
name: "今日告警情况", | |||||
name: "今日预警情况", | |||||
type: "pie", | type: "pie", | ||||
radius: ["60%", "90%"], | radius: ["60%", "90%"], | ||||
avoidLabelOverlap: false, | avoidLabelOverlap: false, | ||||
@@ -333,7 +333,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
}, | }, | ||||
{ | { | ||||
prop: "warntotal", | prop: "warntotal", | ||||
label: "告警总量" | |||||
label: "预警总量" | |||||
// render: () => { | // render: () => { | ||||
// return "楼道"; | // return "楼道"; | ||||
// } | // } | ||||
@@ -1,11 +1,11 @@ | |||||
<!-- | <!-- | ||||
* @Description: 告警管理 | |||||
* @Description: 预警管理 | |||||
* @Author: huguodong | * @Author: huguodong | ||||
* @Date: 2023-12-15 15:44:05 | * @Date: 2023-12-15 15:44:05 | ||||
!--> | !--> | ||||
<template> | <template> | ||||
<div class="table-box"> | <div class="table-box"> | ||||
<ProTable ref="proTable" title="告警列表" :columns="columns" :data="tableData"> | |||||
<ProTable ref="proTable" title="预警列表" :columns="columns" :data="tableData"> | |||||
<!-- 表格 header 按钮 --> | <!-- 表格 header 按钮 --> | ||||
<!-- 表格 菜单类型 按钮 --> | <!-- 表格 菜单类型 按钮 --> | ||||
@@ -2,15 +2,15 @@ | |||||
<div style="width: 100%; height: 100%"> | <div style="width: 100%; height: 100%"> | ||||
<div class="commontitle"> | <div class="commontitle"> | ||||
<div class="left"> | <div class="left"> | ||||
<span>学员课堂告警情况</span> | |||||
<span>学员课堂预警情况</span> | |||||
<img src="/static/screen/img/titleIcon.png" alt="" /> | <img src="/static/screen/img/titleIcon.png" alt="" /> | ||||
</div> | </div> | ||||
<div class="right"> | <div class="right"> | ||||
<img src="/static/screen/img/redLight.png" alt="" /> | <img src="/static/screen/img/redLight.png" alt="" /> | ||||
<span>告警数量({{ alarmList.length }})</span> | |||||
<span>预警数量({{ alarmList.length }})</span> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<div style="height: 568px; overflow: auto; margin-top: 4px"> | |||||
<div style="height: 568px; margin-top: 4px; overflow: auto"> | |||||
<ul> | <ul> | ||||
<li v-for="item in alarmList" :key="item.id"> | <li v-for="item in alarmList" :key="item.id"> | ||||
<div class="name">{{ item.personName || "未知" }}</div> | <div class="name">{{ item.personName || "未知" }}</div> | ||||
@@ -20,7 +20,7 @@ | |||||
<div class="title">{{ item.alarmTypeDesc }}</div> | <div class="title">{{ item.alarmTypeDesc }}</div> | ||||
</li> | </li> | ||||
</ul> | </ul> | ||||
<div v-if="alarmList.length == 0" style="text-align: center; margin-top: 160px; color: #78dfff; font-size: 14px">暂无告警</div> | |||||
<div v-if="alarmList.length == 0" style="margin-top: 160px; font-size: 14px; color: #78dfff; text-align: center">暂无预警</div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -42,13 +42,13 @@ defineExpose({ | |||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.commontitle { | .commontitle { | ||||
.right { | .right { | ||||
color: #ffa1a1; | |||||
font-size: 14px; | font-size: 14px; | ||||
color: #ffa1a1; | |||||
img { | img { | ||||
width: 18px; | |||||
position: relative; | position: relative; | ||||
top: 4px; | top: 4px; | ||||
right: 6px; | right: 6px; | ||||
width: 18px; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -56,43 +56,43 @@ ul { | |||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
li { | li { | ||||
box-sizing: border-box; | |||||
width: 129.366px; | width: 129.366px; | ||||
height: 173.506px; | height: 173.506px; | ||||
background: #182665; | |||||
padding: 0 10px; | padding: 0 10px; | ||||
box-sizing: border-box; | |||||
padding-top: 6px; | padding-top: 6px; | ||||
margin-top: 7.8px; | |||||
margin-right: 16px; | margin-right: 16px; | ||||
margin-bottom: 7.8px; | margin-bottom: 7.8px; | ||||
margin-top: 7.8px; | |||||
background: #182665; | |||||
&:nth-child(7n) { | &:nth-child(7n) { | ||||
margin-right: 0px; | |||||
margin-right: 0; | |||||
} | } | ||||
.name { | .name { | ||||
color: #fff; | |||||
text-align: center; | |||||
font-size: 14px; | font-size: 14px; | ||||
color: #ffffff; | |||||
text-align: center; | |||||
} | } | ||||
.imgbox { | .imgbox { | ||||
margin-top: 5px; | |||||
width: 109.702px; | width: 109.702px; | ||||
height: 112.44px; | height: 112.44px; | ||||
object-fit: cover; | |||||
margin-top: 5px; | |||||
text-align: center; | text-align: center; | ||||
object-fit: cover; | |||||
.el-image { | .el-image { | ||||
height: 100%; | |||||
width: 100%; | width: 100%; | ||||
height: 100%; | |||||
} | } | ||||
} | } | ||||
.title { | .title { | ||||
background: #0c4dcf; | |||||
width: 109.702px; | width: 109.702px; | ||||
height: 23px; | height: 23px; | ||||
color: #fff; | |||||
text-align: center; | |||||
font-size: 14px; | font-size: 14px; | ||||
line-height: 23px; | line-height: 23px; | ||||
color: #ffffff; | |||||
text-align: center; | |||||
background: #0c4dcf; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
</style> | |||||
</style> |
@@ -2,7 +2,7 @@ | |||||
<div style="width: 100%; height: 100%"> | <div style="width: 100%; height: 100%"> | ||||
<div class="commontitle"> | <div class="commontitle"> | ||||
<div class="left"> | <div class="left"> | ||||
<span>今日告警信息</span> | |||||
<span>今日预警信息</span> | |||||
<img src="/static/screen/img/titleIcon.png" alt="" /> | <img src="/static/screen/img/titleIcon.png" alt="" /> | ||||
</div> | </div> | ||||
<div class="right"> | <div class="right"> | ||||
@@ -22,14 +22,14 @@ | |||||
<div class="todayBoticeTotal myborder1"> | <div class="todayBoticeTotal myborder1"> | ||||
<div | <div | ||||
style=" | style=" | ||||
position: relative; | |||||
bottom: 3px; | |||||
width: 40px; | width: 40px; | ||||
height: 40px; | height: 40px; | ||||
margin-right: 14px; | |||||
text-align: center; | |||||
border: 1px solid #ab2626; | border: 1px solid #ab2626; | ||||
border-radius: 50%; | border-radius: 50%; | ||||
text-align: center; | |||||
position: relative; | |||||
bottom: 3px; | |||||
margin-right: 14px; | |||||
" | " | ||||
> | > | ||||
<img src="/static/screen/img/redLight.png" alt="" style="width: 22px; margin-top: 5px" /> | <img src="/static/screen/img/redLight.png" alt="" style="width: 22px; margin-top: 5px" /> | ||||
@@ -38,7 +38,7 @@ | |||||
今日<span>7</span>个场景预警总计:<span class="total">{{ count }}</span> 起 | 今日<span>7</span>个场景预警总计:<span class="total">{{ count }}</span> 起 | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div style="width: 100%; height: calc(100% - 136px); overflow: auto; margin-top: 29px"> | |||||
<div style="width: 100%; height: calc(100% - 136px); margin-top: 29px; overflow: auto"> | |||||
<ul> | <ul> | ||||
<template v-for="item in warnList" :key="item.id"> | <template v-for="item in warnList" :key="item.id"> | ||||
<li> | <li> | ||||
@@ -61,7 +61,7 @@ | |||||
</li> | </li> | ||||
</template> | </template> | ||||
<template v-if="!warnList.length"> | <template v-if="!warnList.length"> | ||||
<div style="color: #10cefe; text-align: center; margin-top: 18px; font-size: 14px">暂无数据</div> | |||||
<div style="margin-top: 18px; font-size: 14px; color: #10cefe; text-align: center">暂无数据</div> | |||||
</template> | </template> | ||||
</ul> | </ul> | ||||
</div> | </div> | ||||
@@ -110,36 +110,36 @@ defineExpose({ | |||||
<style scoped lang="scss"> | <style scoped lang="scss"> | ||||
.todayBoticeTotal { | .todayBoticeTotal { | ||||
box-sizing: border-box; | |||||
display: flex; | |||||
align-content: center; | |||||
width: 588px; | width: 588px; | ||||
height: 59px; | height: 59px; | ||||
background: #0f1e5e; | |||||
color: #78dfff; | |||||
padding-top: 13px; | |||||
padding-left: 25px; | |||||
margin-top: 22px; | |||||
font-family: "Microsoft YaHei UI"; | font-family: "Microsoft YaHei UI"; | ||||
font-size: 16px; | font-size: 16px; | ||||
margin-top: 22px; | |||||
padding-left: 25px; | |||||
padding-top: 13px; | |||||
box-sizing: border-box; | |||||
display: flex; | |||||
align-content: center; | |||||
color: #78dfff; | |||||
background: #0f1e5e; | |||||
span.total { | span.total { | ||||
color: #ff483a; | |||||
font-family: "Microsoft YaHei UI"; | |||||
font-size: 22px; | |||||
position: relative; | position: relative; | ||||
top: 3px; | top: 3px; | ||||
font-family: "Microsoft YaHei UI"; | |||||
font-size: 22px; | |||||
color: #ff483a; | |||||
} | } | ||||
} | } | ||||
ul:not(.el-scrollbar__view) { | ul:not(.el-scrollbar__view) { | ||||
li:first-child { | li:first-child { | ||||
margin-top: 0px; | |||||
margin-top: 0; | |||||
} | } | ||||
li { | li { | ||||
box-sizing: border-box; | |||||
display: flex; | display: flex; | ||||
padding-right: 20px; | |||||
margin-top: 18px; | margin-top: 18px; | ||||
background: #182665; | background: #182665; | ||||
padding-right: 20px; | |||||
box-sizing: border-box; | |||||
.left { | .left { | ||||
width: 195px; | width: 195px; | ||||
height: 114px; | height: 114px; | ||||
@@ -150,72 +150,73 @@ ul:not(.el-scrollbar__view) { | |||||
} | } | ||||
} | } | ||||
.right { | .right { | ||||
position: relative; | |||||
flex: 1; | flex: 1; | ||||
padding-left: 20px; | padding-left: 20px; | ||||
position: relative; | |||||
.status { | .status { | ||||
position: absolute; | |||||
top: 16px; | |||||
right: 0; | |||||
box-sizing: border-box; | |||||
display: flex; | |||||
place-content: center space-between; | |||||
width: 82px; | width: 82px; | ||||
height: 22px; | height: 22px; | ||||
color: #fff; | |||||
padding-right: 16px; | |||||
padding-left: 9px; | |||||
font-size: 12px; | font-size: 12px; | ||||
display: flex; | |||||
justify-content: space-between; | |||||
line-height: 20px; | line-height: 20px; | ||||
align-content: center; | |||||
padding-left: 9px; | |||||
padding-right: 16px; | |||||
box-sizing: border-box; | |||||
position: absolute; | |||||
top: 16px; | |||||
right: 0px; | |||||
color: #ffffff; | |||||
} | } | ||||
.time { | .time { | ||||
color: #78dfff; | |||||
font-size: 14px; | |||||
margin-top: 13px; | margin-top: 13px; | ||||
font-size: 14px; | |||||
color: #78dfff; | |||||
} | } | ||||
.title { | .title { | ||||
color: #fff; | |||||
font-size: 16px; | |||||
margin-top: 13px; | margin-top: 13px; | ||||
font-size: 16px; | |||||
color: #ffffff; | |||||
} | } | ||||
.des { | .des { | ||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
color: #78dfff; | |||||
font-size: 12px; | |||||
margin-top: 16px; | margin-top: 16px; | ||||
font-size: 12px; | |||||
color: #78dfff; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
} | } | ||||
.header-select { | .header-select { | ||||
:deep(.el-select__wrapper) { | :deep(.el-select__wrapper) { | ||||
border: 1px solid #35c9f0; | |||||
background: unset; | |||||
width: 100%; | width: 100%; | ||||
height: 40px; | height: 40px; | ||||
background: unset; | |||||
border: 1px solid #35c9f0; | |||||
outline: none; | outline: none; | ||||
} | } | ||||
// :deep(.el-popper) { | // :deep(.el-popper) { | ||||
// position: absolute !important; | // position: absolute !important; | ||||
// top: 58px !important; | // top: 58px !important; | ||||
// left: 0px !important; | // left: 0px !important; | ||||
// } | // } | ||||
:deep(.el-select-dropdown__item) { | :deep(.el-select-dropdown__item) { | ||||
color: #0c4dcf; | |||||
font-size: 20px; | |||||
height: 55px; | height: 55px; | ||||
font-size: 20px; | |||||
line-height: 55px; | line-height: 55px; | ||||
color: #0c4dcf; | |||||
} | } | ||||
:deep(.el-select__placeholder) { | :deep(.el-select__placeholder) { | ||||
background: linear-gradient(9deg, #10cefe 7.44%, #fff 79.62%); | |||||
font-size: 16px; | |||||
background: linear-gradient(9deg, #10cefe 7.44%, #ffffff 79.62%); | |||||
background-clip: text; | |||||
background-clip: text; | background-clip: text; | ||||
-webkit-background-clip: text; | |||||
-webkit-text-fill-color: transparent; | -webkit-text-fill-color: transparent; | ||||
font-size: 16px; | |||||
} | } | ||||
} | } | ||||
// .header-select.nobg { | // .header-select.nobg { | ||||
// :deep(.el-select__wrapper) { | // :deep(.el-select__wrapper) { | ||||
// background-color: unset; | // background-color: unset; | ||||
@@ -237,4 +238,4 @@ ul:not(.el-scrollbar__view) { | |||||
// font-size: 16px; | // font-size: 16px; | ||||
// } | // } | ||||
// } | // } | ||||
</style> | |||||
</style> |
@@ -2,7 +2,7 @@ | |||||
<div style="width: 100%; height: 100%"> | <div style="width: 100%; height: 100%"> | ||||
<div class="commontitle"> | <div class="commontitle"> | ||||
<div class="left"> | <div class="left"> | ||||
<span>今日场景告警次数</span> | |||||
<span>今日场景预警次数</span> | |||||
<img src="/static/screen/img/titleIcon.png" alt="" /> | <img src="/static/screen/img/titleIcon.png" alt="" /> | ||||
</div> | </div> | ||||
<div class="right"></div> | <div class="right"></div> | ||||
@@ -12,10 +12,10 @@ | |||||
<div class="commonTitle1"> | <div class="commonTitle1"> | ||||
<span class="left">校园安全</span> | <span class="left">校园安全</span> | ||||
<span class="right" | <span class="right" | ||||
>告警次数:<span class="num">{{ typeStatistiCount }}</span></span | |||||
>预警次数:<span class="num">{{ typeStatistiCount }}</span></span | |||||
> | > | ||||
</div> | </div> | ||||
<div style="height: 410px; overflow-y: auto; margin-top: 18px"> | |||||
<div style="height: 410px; margin-top: 18px; overflow-y: auto"> | |||||
<ul> | <ul> | ||||
<template v-for="(item, index) in typeStatisti" :key="index"> | <template v-for="(item, index) in typeStatisti" :key="index"> | ||||
<li> | <li> | ||||
@@ -51,10 +51,10 @@ | |||||
<div class="commonTitle1"> | <div class="commonTitle1"> | ||||
<span class="left">{{ item.name }}</span> | <span class="left">{{ item.name }}</span> | ||||
<span class="right" | <span class="right" | ||||
>告警次数:<span class="num">{{ item.value }}</span></span | |||||
>预警次数:<span class="num">{{ item.value }}</span></span | |||||
> | > | ||||
</div> | </div> | ||||
<div style="height: 146px; overflow: auto; margin-top: 24px"> | |||||
<div style="height: 146px; margin-top: 24px; overflow: auto"> | |||||
<ul> | <ul> | ||||
<template v-for="(item1, index1) in item.subset" :key="index1"> | <template v-for="(item1, index1) in item.subset" :key="index1"> | ||||
<li> | <li> | ||||
@@ -127,36 +127,36 @@ defineExpose({ | |||||
margin-bottom: 22px; | margin-bottom: 22px; | ||||
} | } | ||||
.safe { | .safe { | ||||
padding: 24px 29px 0px 29px; | |||||
box-sizing: border-box; | box-sizing: border-box; | ||||
width: 456px; | width: 456px; | ||||
height: 494px; | height: 494px; | ||||
padding: 24px 29px 0; | |||||
ul { | ul { | ||||
padding-right: 10px; | padding-right: 10px; | ||||
li { | li { | ||||
display: flex; | display: flex; | ||||
margin-top: 18.6px; | margin-top: 18.6px; | ||||
&:first-child { | &:first-child { | ||||
margin-top: 0px; | |||||
margin-top: 0; | |||||
} | } | ||||
.title { | .title { | ||||
display: flex; | display: flex; | ||||
color: #e3e9f3; | |||||
font-size: 12px; | font-size: 12px; | ||||
color: #e3e9f3; | |||||
.top { | .top { | ||||
box-sizing: border-box; | |||||
display: inline-block; | display: inline-block; | ||||
width: 60px; | width: 60px; | ||||
height: 20px; | height: 20px; | ||||
border-radius: 10px; | |||||
background: linear-gradient(to left, rgba(55, 116, 237, 0.01), rgba(55, 116, 237, 1)); | |||||
box-sizing: border-box; | |||||
padding-left: 10px; | padding-left: 10px; | ||||
background: linear-gradient(to left, rgb(55 116 237 / 1%), rgb(55 116 237 / 100%)); | |||||
border-radius: 10px; | |||||
} | } | ||||
.title_ { | .title_ { | ||||
display: block; | |||||
width: 76px; | |||||
position: relative; | position: relative; | ||||
right: 10px; | right: 10px; | ||||
display: block; | |||||
width: 76px; | |||||
} | } | ||||
} | } | ||||
.progressBox { | .progressBox { | ||||
@@ -164,23 +164,23 @@ defineExpose({ | |||||
padding-top: 6px; | padding-top: 6px; | ||||
} | } | ||||
.num { | .num { | ||||
color: #fff; | |||||
text-align: right; | |||||
font-size: 14px; | |||||
display: block; | display: block; | ||||
width: 42px; | width: 42px; | ||||
font-size: 14px; | |||||
color: #ffffff; | |||||
text-align: right; | |||||
} | } | ||||
&:nth-child(1) { | &:nth-child(1) { | ||||
.title { | .title { | ||||
.top { | .top { | ||||
background: linear-gradient(to right, rgba(226, 74, 59, 1), rgba(226, 74, 59, 0.01)); | |||||
background: linear-gradient(to right, rgb(226 74 59 / 100%), rgb(226 74 59 / 1%)); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
&:nth-child(2) { | &:nth-child(2) { | ||||
.title { | .title { | ||||
.top { | .top { | ||||
background: linear-gradient(to left, rgba(246, 152, 14, 0.01), rgba(246, 152, 14, 1)); | |||||
background: linear-gradient(to left, rgb(246 152 14 / 1%), rgb(246 152 14 / 100%)); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -188,10 +188,10 @@ defineExpose({ | |||||
} | } | ||||
} | } | ||||
.cate { | .cate { | ||||
width: calc(100% - 200px); | |||||
margin-left: 22px; | |||||
box-sizing: border-box; | box-sizing: border-box; | ||||
width: calc(100% - 200px); | |||||
height: 494px; | height: 494px; | ||||
margin-left: 22px; | |||||
overflow-y: auto; | overflow-y: auto; | ||||
> ul { | > ul { | ||||
display: flex; | display: flex; | ||||
@@ -199,33 +199,33 @@ defineExpose({ | |||||
justify-content: space-between; | justify-content: space-between; | ||||
padding-right: 10px; | padding-right: 10px; | ||||
> li { | > li { | ||||
margin-right: 16px; | |||||
box-sizing: border-box; | |||||
width: 383.228px; | width: 383.228px; | ||||
height: 235.65px; | height: 235.65px; | ||||
margin-bottom: 22px; | |||||
padding: 22px; | padding: 22px; | ||||
box-sizing: border-box; | |||||
margin-right: 16px; | |||||
margin-bottom: 22px; | |||||
} | } | ||||
> li:nth-child(3n) { | > li:nth-child(3n) { | ||||
margin-right: 0px; | |||||
margin-right: 0; | |||||
} | } | ||||
ul { | ul { | ||||
display: flex; | display: flex; | ||||
flex-wrap: wrap; | flex-wrap: wrap; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
li { | li { | ||||
box-sizing: border-box; | |||||
display: flex; | display: flex; | ||||
justify-content: space-between; | justify-content: space-between; | ||||
color: #fff; | |||||
font-size: 12px; | |||||
width: 48%; | width: 48%; | ||||
height: 40.92px; | height: 40.92px; | ||||
box-shadow: 0px 0px 10px 0px #3877f2 inset; | |||||
background: #0e298b; | |||||
box-sizing: border-box; | |||||
padding: 0 8px; | padding: 0 8px; | ||||
line-height: 40.92px; | |||||
margin-bottom: 7.7px; | margin-bottom: 7.7px; | ||||
font-size: 12px; | |||||
line-height: 40.92px; | |||||
color: #ffffff; | |||||
background: #0e298b; | |||||
box-shadow: 0 0 10px 0 #3877f2 inset; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -233,4 +233,4 @@ defineExpose({ | |||||
:deep(.el-progress-bar__outer) { | :deep(.el-progress-bar__outer) { | ||||
background: #404c80; | background: #404c80; | ||||
} | } | ||||
</style> | |||||
</style> |
@@ -1,5 +1,5 @@ | |||||
<!-- | <!-- | ||||
* @Description: 告警管理 | |||||
* @Description: 预警管理 | |||||
* @Author: huguodong | * @Author: huguodong | ||||
* @Date: 2023-12-15 15:44:05 | * @Date: 2023-12-15 15:44:05 | ||||
!--> | !--> | ||||
@@ -15,14 +15,14 @@ | |||||
:size="formSize" | :size="formSize" | ||||
status-icon | status-icon | ||||
> | > | ||||
<s-form-item label="推送设置:" prop="resource"> | |||||
<s-radio-group v-model="ruleForm.resource" :options="pushOptions" /> | |||||
<s-form-item label="推送设置:" prop="pushState"> | |||||
<s-radio-group v-model="ruleForm.pushState" :options="pushOptions" /> | |||||
</s-form-item> | </s-form-item> | ||||
<div class="ruleTitle">推送规则</div> | <div class="ruleTitle">推送规则</div> | ||||
<div class="ruleContent"> | <div class="ruleContent"> | ||||
<span>当日预警每达到</span> | <span>当日预警每达到</span> | ||||
<el-input-number v-model="ruleForm.num" class="mx-4" :min="1" controls-position="right" @change="handleChange" /> | |||||
<el-input-number v-model="ruleForm.daySum" class="mx-4" :min="1" controls-position="right" @change="handleChange" /> | |||||
<span>条时进行推送</span> | <span>条时进行推送</span> | ||||
<div class="tips">当日预警数据每达到设置的条数后,会进行消息推送。</div> | <div class="tips">当日预警数据每达到设置的条数后,会进行消息推送。</div> | ||||
</div> | </div> | ||||
@@ -35,32 +35,33 @@ | |||||
</template> | </template> | ||||
<script setup lang="tsx" name="sysconfigPush"> | <script setup lang="tsx" name="sysconfigPush"> | ||||
import { reactive, ref } from 'vue' | |||||
import { reactive, ref,onMounted } from 'vue' | |||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus' | import type { ComponentSize, FormInstance, FormRules } from 'element-plus' | ||||
import { ElMessage, ElMessageBox } from 'element-plus' | import { ElMessage, ElMessageBox } from 'element-plus' | ||||
import { abilityApi, getPushInfo,userManageClassManageApi, monitorLIVEApi,SysOrg } from "@/api"; | |||||
interface RuleForm { | interface RuleForm { | ||||
resource: string, | |||||
num: number | |||||
pushState: string | boolean, | |||||
daySum: number | |||||
} | } | ||||
const formSize = ref<ComponentSize>('default') | const formSize = ref<ComponentSize>('default') | ||||
const ruleFormRef = ref<FormInstance>() | const ruleFormRef = ref<FormInstance>() | ||||
const ruleForm = reactive<RuleForm>({ | const ruleForm = reactive<RuleForm>({ | ||||
resource: '0', | |||||
num: 1 | |||||
pushState: false, | |||||
daySum: 1 | |||||
}) | }) | ||||
const pushOptions = [{ | const pushOptions = [{ | ||||
label: '开启', | label: '开启', | ||||
value: '1', | |||||
value: true, | |||||
},{ | },{ | ||||
label: '关闭', | label: '关闭', | ||||
value: '0', | |||||
value: false, | |||||
}] | }] | ||||
const rules = reactive<FormRules<RuleForm>>({ | const rules = reactive<FormRules<RuleForm>>({ | ||||
resource: [ | |||||
pushState: [ | |||||
{ | { | ||||
required: true, | required: true, | ||||
message: '请选择推送设置', | message: '请选择推送设置', | ||||
@@ -74,11 +75,20 @@ const handleChange = (value: number) => { | |||||
function isPositiveInteger(value:any) { | function isPositiveInteger(value:any) { | ||||
return /^[1-9]\d*$/.test(value); | return /^[1-9]\d*$/.test(value); | ||||
} | } | ||||
onMounted(() => { | |||||
getPushData() | |||||
}); | |||||
async function getPushData() { | |||||
let {data} = await abilityApi.getPushInfo({}) | |||||
ruleForm.daySum = data.daySum; | |||||
ruleForm.pushState = data.pushState; | |||||
console.log(data); | |||||
} | |||||
const submitForm = async (formEl: FormInstance | undefined) => { | const submitForm = async (formEl: FormInstance | undefined) => { | ||||
if (!formEl) return | if (!formEl) return | ||||
await formEl.validate((valid, fields) => { | await formEl.validate((valid, fields) => { | ||||
if (valid) { | if (valid) { | ||||
if(!isPositiveInteger(ruleForm.num)) { | |||||
if(!isPositiveInteger(ruleForm.daySum)) { | |||||
ElMessage({ | ElMessage({ | ||||
message: '推送规则条数必须是大于零的整数', | message: '推送规则条数必须是大于零的整数', | ||||
@@ -86,10 +96,15 @@ const submitForm = async (formEl: FormInstance | undefined) => { | |||||
}) | }) | ||||
return | return | ||||
} | } | ||||
ElMessage({ | |||||
abilityApi.pushConfig(ruleForm).then(() => { | |||||
ElMessage({ | |||||
message: '操作成功', | message: '操作成功', | ||||
type: 'success', | type: 'success', | ||||
}) | |||||
}) | |||||
}); | |||||
console.log('submit!') | console.log('submit!') | ||||
} else { | } else { | ||||
console.log('error submit!', fields) | console.log('error submit!', fields) | ||||
@@ -106,20 +121,19 @@ const resetForm = (formEl: FormInstance | undefined) => { | |||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||
.content-main { | .content-main { | ||||
height: 100%; | height: 100%; | ||||
.ruleTitle { | .ruleTitle { | ||||
margin: 30px 0 20px; | |||||
font-size: 14px; | font-size: 14px; | ||||
font-weight: 600; | font-weight: 600; | ||||
margin: 30px 0 20px 0; | |||||
} | } | ||||
.ruleContent { | .ruleContent { | ||||
margin: 20px 0; | |||||
font-size: 14px; | font-size: 14px; | ||||
color: #666666; | color: #666666; | ||||
margin: 20px 0; | |||||
.tips { | .tips { | ||||
margin-top: 10px; | |||||
font-size: 14px; | font-size: 14px; | ||||
color: red; | color: red; | ||||
margin-top: 10px; | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -141,6 +141,7 @@ const proTable = ref<ProTableInstance>(); | |||||
const treeFilter = ref<InstanceType<typeof TreeFilter> | null>(null); | const treeFilter = ref<InstanceType<typeof TreeFilter> | null>(null); | ||||
const userStore = useUserStore(); | const userStore = useUserStore(); | ||||
const { accessToken } = userStore; | const { accessToken } = userStore; | ||||
const defaultValue = ref(""); | |||||
// 表格配置项 | // 表格配置项 | ||||
const columns: ColumnProps<SysDormitory.ChamberInfo>[] = [ | const columns: ColumnProps<SysDormitory.ChamberInfo>[] = [ | ||||
{ type: "selection", fixed: "left", width: 50 }, | { type: "selection", fixed: "left", width: 50 }, | ||||
@@ -1,5 +1,5 @@ | |||||
<!-- | <!-- | ||||
* @Description: 告警管理 | |||||
* @Description: 预警管理 | |||||
* @Author: huguodong | * @Author: huguodong | ||||
* @Date: 2023-12-15 15:44:05 | * @Date: 2023-12-15 15:44:05 | ||||
!--> | !--> | ||||
@@ -72,7 +72,7 @@ function getCharts1(data: any) { | |||||
const chart = echarts.init(chart1.value); | const chart = echarts.init(chart1.value); | ||||
const option = { | const option = { | ||||
title: { | title: { | ||||
text: "今日告警情况", | |||||
text: "今日预警情况", | |||||
// subtext: "Fake Data", | // subtext: "Fake Data", | ||||
left: "center" | left: "center" | ||||
}, | }, | ||||
@@ -85,7 +85,7 @@ function getCharts1(data: any) { | |||||
}, | }, | ||||
series: [ | series: [ | ||||
{ | { | ||||
name: "今日告警情况", | |||||
name: "今日预警情况", | |||||
type: "pie", | type: "pie", | ||||
radius: "50%", | radius: "50%", | ||||
data, | data, | ||||
@@ -1,128 +1,146 @@ | |||||
<!-- | <!-- | ||||
* @Description: 告警管理 | |||||
* @Description: 预警管理 | |||||
* @Author: huguodong | * @Author: huguodong | ||||
* @Date: 2023-12-15 15:44:05 | * @Date: 2023-12-15 15:44:05 | ||||
!--> | !--> | ||||
<template> | <template> | ||||
<div class="table-box"> | |||||
<ProTable ref="proTable" title="告警列表" :columns="columns" :request-api="warnZJRQApi.page"> | |||||
<!-- 表格 header 按钮 --> | |||||
<template #tableHeader="scope"> | |||||
<!-- <s-button suffix="告警" @click="onOpen(FormOptEnum.ADD)" /> --> | |||||
<s-button | |||||
type="danger" | |||||
plain | |||||
suffix="告警" | |||||
:opt="FormOptEnum.DELETE" | |||||
:disabled="!scope.isSelected" | |||||
@click="onDelete(scope.selectedListIds, '删除所选数据')" | |||||
/> | |||||
</template> | |||||
<!-- 表格 菜单类型 按钮 --> | |||||
<template #menuType="scope"> | |||||
<el-space wrap> | |||||
<el-tag v-if="scope.row.menuType === MenuTypeDictEnum.MENU" type="success">{{ | |||||
dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.MENU) | |||||
}}</el-tag> | |||||
<el-tag v-else-if="scope.row.menuType === MenuTypeDictEnum.LINK" type="warning">{{ | |||||
dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.LINK) | |||||
}}</el-tag> | |||||
<el-tag v-else type="info">{{ dictStore.dictTranslation(SysDictEnum.MENU_TYPE, scope.row.menuType) }}</el-tag> | |||||
<el-tag v-if="scope.row.isHome === true" type="danger">首页</el-tag> | |||||
</el-space> | |||||
</template> | |||||
<!-- 操作 --> | |||||
<template #operation="scope"> | |||||
<s-button link :opt="FormOptEnum.VIEW" @click="onDetail(scope.row)"> 详情 </s-button> | |||||
<s-button v-if="scope.row.warnHand == 0" link :opt="FormOptEnum.EDIT" @click="toHandle(FormOptEnum.EDIT, scope.row)">处理</s-button> | |||||
<s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.id], `确定删除该预警吗?`)" /> | |||||
</template> | |||||
</ProTable> | |||||
<el-dialog v-model="visible" :title="detailData.alarmTypeDesc + '-' + detailData.tick" width="830px" :before-close="handleClose"> | |||||
<div> | |||||
<img class="detailpic" :src="detailData.snapshotUrl" alt="" /> | |||||
<el-row :gutter="20"> | |||||
<el-col :span="12"> | |||||
<div class="linebox">所属学校:演示学校</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">班级:{{ detailData.personSetName ? detailData.personSetName : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">姓名:{{ detailData.personName ? detailData.personName : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">告警摄像头:{{ detailData.cameraName }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">告警类型:{{ detailData.alarmTypeDesc }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">告警时间:{{ detailData.tick }}</div> | |||||
</el-col> | |||||
<div class="main-box"> | |||||
<TreeFilter | |||||
ref="treeFilters" | |||||
title="预警类型" | |||||
label="label" | |||||
id="value" | |||||
:isData="true" | |||||
width="260px" | |||||
:data="warnOptions" | |||||
@change="changeType" | |||||
></TreeFilter> | |||||
<el-col :span="12"> | |||||
<div class="linebox">备注信息:{{ detailData.extend ? detailData.extend : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox"> | |||||
复核视频: | |||||
<span style="cursor: pointer" v-if="detailData.videoUrl" @click="onPlay(detailData.videoUrl)"> | |||||
<el-icon color="#409efc" :size="20"> | |||||
<VideoCamera /> | |||||
</el-icon> | |||||
<!-- <el-icon><VideoCamera /></el-icon> --> | |||||
</span> | |||||
<span v-else>暂无数据</span> | |||||
<!-- {{ detailData.videoUrl }} --> | |||||
</div> | |||||
</el-col> | |||||
<el-col :span="24"> | |||||
<div class="linebox"> | |||||
处理意见: | |||||
<span style="cursor: pointer" v-if="detailData.remark"> | |||||
{{ detailData.remark }} | |||||
</span> | |||||
<span v-else>暂无数据</span> | |||||
<!-- {{ detailData.videoUrl }} --> | |||||
</div> | |||||
</el-col> | |||||
</el-row> | |||||
</div> | |||||
<template #footer> | |||||
<div class="dialog-footer"> | |||||
<el-button @click="visible = false">关闭</el-button> | |||||
<div class="table-box"> | |||||
<ProTable ref="proTable" :searchCol="3" title="预警列表" :columns="columns" :request-api="warnZJRQApi.page" @reset="resetRecords"> | |||||
<!-- 表格 header 按钮 --> | |||||
<template #tableHeader="scope"> | |||||
<!-- <s-button suffix="预警" @click="onOpen(FormOptEnum.ADD)" /> --> | |||||
<s-button | |||||
type="danger" | |||||
plain | |||||
suffix="预警" | |||||
:opt="FormOptEnum.DELETE" | |||||
:disabled="!scope.isSelected" | |||||
@click="onDelete(scope.selectedListIds, '删除所选数据')" | |||||
/> | |||||
</template> | |||||
<!-- 表格 菜单类型 按钮 --> | |||||
<template #menuType="scope"> | |||||
<el-space wrap> | |||||
<el-tag v-if="scope.row.menuType === MenuTypeDictEnum.MENU" type="success">{{ | |||||
dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.MENU) | |||||
}}</el-tag> | |||||
<el-tag v-else-if="scope.row.menuType === MenuTypeDictEnum.LINK" type="warning">{{ | |||||
dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.LINK) | |||||
}}</el-tag> | |||||
<el-tag v-else type="info">{{ dictStore.dictTranslation(SysDictEnum.MENU_TYPE, scope.row.menuType) }}</el-tag> | |||||
<el-tag v-if="scope.row.isHome === true" type="danger">首页</el-tag> | |||||
</el-space> | |||||
</template> | |||||
<!-- 操作 --> | |||||
<template #operation="scope"> | |||||
<s-button link :opt="FormOptEnum.VIEW" @click="onDetail(scope.row)"> 详情 </s-button> | |||||
<s-button v-if="scope.row.warnHand == 0" link :opt="FormOptEnum.EDIT" @click="toHandle(FormOptEnum.EDIT, scope.row)">处理</s-button> | |||||
<s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.id], `确定删除该预警吗?`)" /> | |||||
</template> | |||||
</ProTable> | |||||
<el-dialog | |||||
v-model="visible" | |||||
:title="detailData.alarmTypeDesc ? detailData.alarmTypeDesc + '-' + detailData.tick : ''" | |||||
width="830px" | |||||
:before-close="handleClose" | |||||
> | |||||
<div> | |||||
<img class="detailpic" :src="detailData.snapshotUrl" alt="" /> | |||||
<el-row :gutter="20"> | |||||
<el-col :span="12"> | |||||
<div class="linebox">所属学校:演示学校</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">班级:{{ detailData.personSetName ? detailData.personSetName : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">姓名:{{ detailData.personName ? detailData.personName : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">预警摄像头:{{ detailData.cameraName }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">预警类型:{{ detailData.alarmTypeDesc }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">预警时间:{{ detailData.tick }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox">备注信息:{{ detailData.extend ? detailData.extend : "暂无数据" }}</div> | |||||
</el-col> | |||||
<el-col :span="12"> | |||||
<div class="linebox"> | |||||
复核视频: | |||||
<span style="cursor: pointer" v-if="detailData.videoUrl" @click="onPlay(detailData.videoUrl)"> | |||||
<el-icon color="#409efc" :size="20"> | |||||
<VideoCamera /> | |||||
</el-icon> | |||||
<!-- <el-icon><VideoCamera /></el-icon> --> | |||||
</span> | |||||
<span v-else>暂无数据</span> | |||||
<!-- {{ detailData.videoUrl }} --> | |||||
</div> | |||||
</el-col> | |||||
<el-col :span="24"> | |||||
<div class="linebox"> | |||||
处理意见: | |||||
<span style="cursor: pointer" v-if="detailData.remark"> | |||||
{{ detailData.remark }} | |||||
</span> | |||||
<span v-else>暂无数据</span> | |||||
<!-- {{ detailData.videoUrl }} --> | |||||
</div> | |||||
</el-col> | |||||
</el-row> | |||||
</div> | </div> | ||||
</template> | |||||
</el-dialog> | |||||
<!-- 视频 --> | |||||
<el-dialog v-model="videoVisible" title="视频" width="830px" :before-close="handleCloseVideo"> | |||||
<div> | |||||
<div class="dialogHeader"> | |||||
<div></div> | |||||
<!-- <div class="dialogBtn" @click="refreshUrl"> | |||||
<template #footer> | |||||
<div class="dialog-footer"> | |||||
<el-button @click="visible = false">关闭</el-button> | |||||
</div> | |||||
</template> | |||||
</el-dialog> | |||||
<!-- 视频 --> | |||||
<el-dialog v-model="videoVisible" title="视频" width="830px" :before-close="handleCloseVideo"> | |||||
<div> | |||||
<div class="dialogHeader"> | |||||
<div></div> | |||||
<!-- <div class="dialogBtn" @click="refreshUrl"> | |||||
<el-icon color="#409efc" :size="20"> | <el-icon color="#409efc" :size="20"> | ||||
<Refresh /> | <Refresh /> | ||||
</el-icon> | </el-icon> | ||||
<div>刷新视频</div> | <div>刷新视频</div> | ||||
</div> --> | </div> --> | ||||
</div> | |||||
<VideoPlay :videoUrl="videoUrls" /> | |||||
</div> | </div> | ||||
<VideoPlay :videoUrl="videoUrls" /> | |||||
</div> | |||||
<template #footer> | |||||
<div class="dialog-footer"> | |||||
<el-button @click="handleCloseVideo">关闭</el-button> | |||||
<template #footer> | |||||
<div class="dialog-footer"> | |||||
<el-button @click="handleCloseVideo">关闭</el-button> | |||||
</div> | |||||
</template> | |||||
</el-dialog> | |||||
<!-- 预览头像 --> | |||||
<el-dialog v-model="preViewvisible" title="查看图片" width="830px" :before-close="previewhandleClose"> | |||||
<div style="display: flex; align-items: center; justify-content: center"> | |||||
<img class="detailpic" :src="faceUrl" alt="" /> | |||||
</div> | </div> | ||||
</template> | |||||
</el-dialog> | |||||
<!-- 预览头像 --> | |||||
<el-dialog v-model="preViewvisible" title="查看图片" width="830px" :before-close="previewhandleClose"> | |||||
<div style="display: flex; align-items: center; justify-content: center"> | |||||
<img class="detailpic" :src="faceUrl" alt="" /> | |||||
</div> | |||||
</el-dialog> | |||||
<!-- 处理告警 --> | |||||
<handleForm ref="formRefH" /> | |||||
</el-dialog> | |||||
<!-- 处理预警 --> | |||||
<handleForm ref="formRefH" /> | |||||
</div> | |||||
</div> | </div> | ||||
</template> | </template> | ||||
@@ -155,20 +173,21 @@ function toHandle(opt: FormOptEnum, record: {} | ZJRQ.WarnInfo= {}) { | |||||
} | } | ||||
let warnOptions = ref([]); | let warnOptions = ref([]); | ||||
function getWarnTypeList() { | function getWarnTypeList() { | ||||
warnOptions.value = [] | |||||
setTimeout(async ()=> { | setTimeout(async ()=> { | ||||
await warnZJRQApi.warnType({}).then((res:any) => { | await warnZJRQApi.warnType({}).then((res:any) => { | ||||
let { code, data } = res; | |||||
if (code == 200) { | |||||
warnOptions.value = data.map((item:any) => { | |||||
return { | |||||
label: item.name, | |||||
value: item.code | |||||
}; | |||||
}) | |||||
} | |||||
}); | |||||
let { code, data } = res; | |||||
if (code == 200) { | |||||
warnOptions.value = data.map((item:any) => { | |||||
return { | |||||
label: item.name, | |||||
value: item.code | |||||
}; | |||||
}) | |||||
} | |||||
}); | |||||
}) | }) | ||||
} | } | ||||
@@ -181,7 +200,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
{ type: "selection", fixed: "left", width: 80 }, | { type: "selection", fixed: "left", width: 80 }, | ||||
// { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false }, | // { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false }, | ||||
// { prop: "cameraId", label: "所属摄像头", search: { el: "input" }, isShow: false }, | // { prop: "cameraId", label: "所属摄像头", search: { el: "input" }, isShow: false }, | ||||
// { prop: "alarmTypeDesc", label: "告警类型", search: { el: "input" }, isShow: false }, | |||||
// { prop: "alarmTypeDesc", label: "预警类型", search: { el: "input" }, isShow: false }, | |||||
{ | { | ||||
prop: "poiId", | prop: "poiId", | ||||
label: "所属学校", | label: "所属学校", | ||||
@@ -199,14 +218,14 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
}, | }, | ||||
{ | { | ||||
prop: "cameraName", | prop: "cameraName", | ||||
label: "告警摄像头", | |||||
label: "预警摄像头", | |||||
// render: () => { | // render: () => { | ||||
// return "楼道"; | // return "楼道"; | ||||
// } | // } | ||||
}, | }, | ||||
{ | { | ||||
prop: "snapshotUrl", | prop: "snapshotUrl", | ||||
label: "告警快照", | |||||
label: "预警快照", | |||||
render: scope => { | render: scope => { | ||||
return ( | return ( | ||||
<img src={scope.row.snapshotUrl ? scope.row.snapshotUrl : ''} onClick={() => viewHeadImage(scope)} style='width:50px;height:50px;' alt=''/> | <img src={scope.row.snapshotUrl ? scope.row.snapshotUrl : ''} onClick={() => viewHeadImage(scope)} style='width:50px;height:50px;' alt=''/> | ||||
@@ -223,12 +242,12 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
{ | { | ||||
prop: "alarmType", | prop: "alarmType", | ||||
label: "告警类型", | |||||
label: "预警类型", | |||||
enum: warnOptions, | enum: warnOptions, | ||||
search: { | |||||
el: "tree-select", | |||||
// span: 1 | |||||
} | |||||
// search: { | |||||
// el: "tree-select", | |||||
// // span: 1 | |||||
// } | |||||
}, | }, | ||||
{ | { | ||||
prop: "warnHand", | prop: "warnHand", | ||||
@@ -252,12 +271,13 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
}, | }, | ||||
search: { | search: { | ||||
el: "tree-select", | el: "tree-select", | ||||
// span: 1 | |||||
span: 0.1 | |||||
} | } | ||||
}, | }, | ||||
{ | { | ||||
prop: "tick", | prop: "tick", | ||||
label: "预警时间", | label: "预警时间", | ||||
width: 180, | |||||
search: { | search: { | ||||
// 自定义 search 组件 | // 自定义 search 组件 | ||||
span: 1, | span: 1, | ||||
@@ -265,7 +285,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
return ( | return ( | ||||
<div class="flex-center"> | <div class="flex-center"> | ||||
<el-date-picker | <el-date-picker | ||||
style="150px; flex-shink: 1;" | |||||
v-model={searchParam.StartTick} | v-model={searchParam.StartTick} | ||||
type="datetime" | type="datetime" | ||||
placeholder="开始时间" | placeholder="开始时间" | ||||
@@ -274,9 +294,10 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
time-format="HH:mm:ss" | time-format="HH:mm:ss" | ||||
value-format="YYYY-MM-DD HH:mm:ss" | value-format="YYYY-MM-DD HH:mm:ss" | ||||
/> | /> | ||||
<span class="mr10 ml10">-</span> | |||||
{/* <span class="mr10 ml10">-</span> */} | |||||
<span style="margin: 0 4px;">-</span> | |||||
<el-date-picker | <el-date-picker | ||||
style="150px;" | |||||
v-model={searchParam.EndTick} | v-model={searchParam.EndTick} | ||||
type="datetime" | type="datetime" | ||||
placeholder="结束时间" | placeholder="结束时间" | ||||
@@ -294,6 +315,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [ | |||||
{ prop: "operation", label: "操作", width: 250, fixed: "right" } | { prop: "operation", label: "操作", width: 250, fixed: "right" } | ||||
]; | ]; | ||||
/** | /** | ||||
* 删除 | * 删除 | ||||
* @param ids id数组 | * @param ids id数组 | ||||
@@ -315,16 +337,14 @@ function RefreshTable() { | |||||
let detailData = ref({}); | let detailData = ref({}); | ||||
function onDetail(row: any) { | function onDetail(row: any) { | ||||
visible.value = true; | visible.value = true; | ||||
setTimeout(async ()=> { | |||||
await warnZJRQApi.detail({ id: row.id }).then((res:any) => { | |||||
warnZJRQApi.detail({ id: row.id }).then((res:any) => { | |||||
let { code, data } = res; | let { code, data } = res; | ||||
if (code == 200) { | if (code == 200) { | ||||
detailData.value = data | detailData.value = data | ||||
} | } | ||||
}); | }); | ||||
}) | |||||
} | } | ||||
@@ -336,13 +356,21 @@ const videoUrls = ref(''); | |||||
const onPlay = (url:string) => { | const onPlay = (url:string) => { | ||||
videoVisible.value = true; | videoVisible.value = true; | ||||
videoUrls.value = url | videoUrls.value = url | ||||
console.log(videoUrls.value) | |||||
} | } | ||||
const handleCloseVideo = () => { | const handleCloseVideo = () => { | ||||
videoVisible.value = false; | videoVisible.value = false; | ||||
videoUrls.value = '' | videoUrls.value = '' | ||||
}; | }; | ||||
const alarmType = ref<number | string>() | |||||
function changeType(val: number | string) { | |||||
alarmType.value = val | |||||
proTable.value!.pageable.pageNum = 1; | |||||
proTable.value!.searchParam.alarmType = val; | |||||
proTable.value!.search(); | |||||
} | |||||
function resetRecords() { | |||||
getWarnTypeList() | |||||
} | |||||
</script> | </script> | ||||
<style lang="scss" scoped> | <style lang="scss" scoped> | ||||