yxq 3 maanden geleden
bovenliggende
commit
c8ae36c587
32 gewijzigde bestanden met toevoegingen van 727 en 350 verwijderingen
  1. +119
    -0
      SafeCampus.API/SafeCampus.Application/Manager/DeepelephManager/DeepelephManager.cs
  2. +30
    -0
      SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml
  3. +2
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/AttendanceService.cs
  4. +26
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/Dto/AttendanceList.cs
  5. +8
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoDto.cs
  6. +4
    -0
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoList.cs
  7. +1
    -1
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/IWarnInfoService.cs
  8. +5
    -2
      SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/WarnInfoService.cs
  9. +1
    -1
      SafeCampus.API/SafeCampus.Core/Dto/WarnGroupInfo.cs
  10. +23
    -1
      SafeCampus.API/SafeCampus.Core/Enum/AlarmType.cs
  11. +20
    -0
      SafeCampus.API/SafeCampus.Core/SafeCampus.Core.xml
  12. +5
    -0
      SafeCampus.API/SafeCampus.System/Entity/Attendance.cs
  13. +5
    -0
      SafeCampus.API/SafeCampus.System/SafeCampus.System.xml
  14. +9
    -0
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/AlarmApi.cs
  15. +65
    -12
      SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs
  16. +18
    -0
      SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml
  17. +1
    -1
      SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user
  18. +10
    -2
      SafeCampus.WEB/src/api/modules/sysconfig/ability.ts
  19. +3
    -3
      SafeCampus.WEB/src/api/modules/warn/zjrq.ts
  20. +1
    -1
      SafeCampus.WEB/src/components/TreeFilter/index.vue
  21. +58
    -57
      SafeCampus.WEB/src/components/VideoPlay/videoplay.vue
  22. +4
    -4
      SafeCampus.WEB/src/layouts/components/Header/ToolBarRight.vue
  23. +4
    -4
      SafeCampus.WEB/src/views/home/index.vue
  24. +2
    -2
      SafeCampus.WEB/src/views/practicalTraining/model/index.vue
  25. +19
    -19
      SafeCampus.WEB/src/views/screen/component/classroom/classNotice.vue
  26. +47
    -46
      SafeCampus.WEB/src/views/screen/component/index/todayInfo.vue
  27. +31
    -31
      SafeCampus.WEB/src/views/screen/component/index/todayNotice.vue
  28. +1
    -1
      SafeCampus.WEB/src/views/sysconfig/ability/index.vue
  29. +32
    -18
      SafeCampus.WEB/src/views/sysconfig/push/index.vue
  30. +1
    -0
      SafeCampus.WEB/src/views/userManage/dormitory/index.vue
  31. +3
    -3
      SafeCampus.WEB/src/views/warn/statistion/index.vue
  32. +169
    -141
      SafeCampus.WEB/src/views/warn/zjrq/index.vue

+ 119
- 0
SafeCampus.API/SafeCampus.Application/Manager/DeepelephManager/DeepelephManager.cs Bestand weergeven

@@ -394,6 +394,123 @@ public class DeepelephManager : IDeepelephManager, IScoped
{
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
{
TenantCode = body["tenantCode"]?.ToString(),
@@ -442,6 +559,8 @@ public class DeepelephManager : IDeepelephManager, IScoped
var _repository = services.GetService<IClassRoomCallService>();
_repository.Add(model);
});

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


+ 30
- 0
SafeCampus.API/SafeCampus.Application/SafeCampus.Application.xml Bestand weergeven

@@ -225,6 +225,21 @@
人员id
</summary>
</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">
<summary>
是否自动上报
@@ -1357,6 +1372,16 @@
考勤列表
</summary>
</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">
<summary>
人员名称
@@ -1666,6 +1691,11 @@
摄像头快照,原链接有效期为2小时,获取到数据后下载到本地
</summary>
</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">
<summary>
人员名称


+ 2
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/AttendanceService.cs Bestand weergeven

@@ -53,6 +53,8 @@ public class AttendanceService:DbRepository<Attendance>, IAttendanceService
{
var query = Context.Queryable<Attendance>()
//.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(!string.IsNullOrEmpty(search.PersonSetId), x => x.PersonSetId == search.PersonSetId)
.WhereIF(!string.IsNullOrEmpty(search.PersonId), x => x.PersonId == search.PersonId)


+ 26
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/AttendanceService/Dto/AttendanceList.cs Bestand weergeven

@@ -31,6 +31,20 @@ public class AttendanceList
/// </summary>
public string PersonId { get; set; }
/// <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>
public bool IsAuto { get; set; }
@@ -70,4 +84,16 @@ public class AttendanceList
/// 创建时间
/// </summary>
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 : "");
}
}

+ 8
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/PersonInfoService/Dto/PersonInfoDto.cs Bestand weergeven

@@ -58,6 +58,14 @@ public class PersonInfoDto
/// 考勤列表
/// </summary>
public List<Attendance> Attendances { get; set; }
/// <summary>
/// 出勤状态
/// </summary>
public string State { get; set; }
/// <summary>
/// 进班时间
/// </summary>
public DateTime? InsTime { get; set; }
}
public class PersonInfoDtoMapper : IRegister
{


+ 4
- 0
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Dto/WarnInfoList.cs Bestand weergeven

@@ -37,6 +37,10 @@ public class WarnInfoList
/// </summary>
public string SnapshotUrl { get; set; }
/// <summary>
/// 人员id
/// </summary>
public string PersonId { get; set; }
/// <summary>
/// 人员名称
/// </summary>
public string PersonName { get; set; }


+ 1
- 1
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/IWarnInfoService.cs Bestand weergeven

@@ -15,7 +15,7 @@ public interface IWarnInfoService:IApiBaseInterface<WarnInfoDto, WarnInfoList, W
/// 获取列表不分页
/// </summary>
/// <returns></returns>
Task<List<WarnInfo>> GetListNoPage(WarnInfoSearch search);
Task<List<WarnInfoList>> GetListNoPage(WarnInfoSearch search);
/// <summary>
/// 获取告警分离列表
/// </summary>


+ 5
- 2
SafeCampus.API/SafeCampus.Application/Services/Business/Warn/Service/WarnInfoService.cs Bestand weergeven

@@ -127,9 +127,12 @@ public class WarnInfoService:DbRepository<WarnInfo>, IWarnInfoService,ITransient
return true;
}

public async Task<List<WarnInfo>> GetListNoPage(WarnInfoSearch search)
public async Task<List<WarnInfoList>> GetListNoPage(WarnInfoSearch search)
{
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(!string.IsNullOrEmpty(search.AlarmType), x => x.AlarmType == search.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)
.ToListAsync();
return list;
return list.Adapt<List<WarnInfoList>>();
}
public async Task<List<WarnType>>GetWarnType()
{


+ 1
- 1
SafeCampus.API/SafeCampus.Core/Dto/WarnGroupInfo.cs Bestand weergeven

@@ -12,5 +12,5 @@ public class WarnGroupSubset
public string Name { get; set; }
public string Code { get; set; }
public bool State {get;set;}
public int Count { get; set; }
public int Value { get; set; }
}

+ 23
- 1
SafeCampus.API/SafeCampus.Core/Enum/AlarmType.cs Bestand weergeven

@@ -116,5 +116,27 @@ public enum AlarmType
/// 车辆超速
/// </summary>
[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


}

+ 20
- 0
SafeCampus.API/SafeCampus.Core/SafeCampus.Core.xml Bestand weergeven

@@ -436,6 +436,26 @@
车辆超速
</summary>
</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">
<summary>
登录设备类型枚举


+ 5
- 0
SafeCampus.API/SafeCampus.System/Entity/Attendance.cs Bestand weergeven

@@ -96,4 +96,9 @@ public class Attendance : PrimaryKeyEntity
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(CameraId), nameof(CameraInfo.SensorId))]
public CameraInfo CameraInfoItem { get; set; }
/// <summary>
/// 寝室信息
/// </summary>
[Navigate(NavigateType.OneToOne, nameof(PersonId), nameof(PersonInfo.PersonId))]
public PersonInfo PersonInfoItem { get; set; }
}

+ 5
- 0
SafeCampus.API/SafeCampus.System/SafeCampus.System.xml Bestand weergeven

@@ -786,6 +786,11 @@
摄像头信息
</summary>
</member>
<member name="P:SafeCampus.System.Attendance.PersonInfoItem">
<summary>
寝室信息
</summary>
</member>
<member name="T:SafeCampus.System.BuildingInfo">
<summary>
学生宿舍楼表


+ 9
- 0
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/Business/AlarmApi.cs Bestand weergeven

@@ -123,4 +123,13 @@ public class AlarmApi:IDynamicApiController
await _hubContext.Clients.All.ReceiveMessage(user,msg);
return true;
}
/// <summary>
/// 测试
/// </summary>
/// <returns></returns>
public async Task<bool> Test()
{
Thread.Sleep(5000);
return true;
}
}

+ 65
- 12
SafeCampus.API/SafeCampus.Web.Core/Controllers/Application/LargeScreen/LargeScreenController.cs Bestand weergeven

@@ -13,6 +13,7 @@ using SafeCampus.Web.Core.Controllers.Application.Business;
using MoYu.RemoteRequest.Extensions;
using Newtonsoft.Json.Linq;
using SafeCampus.Application.Manager.DeepelephManager;
using SafeCampus.Application.Services.Business.PersonSetInfoService;

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

@@ -35,9 +36,10 @@ public class LargeScreenController
private readonly IClassRoomCallTaskService _classRoomCallTaskService;
private readonly IClassRoomCallService _classRoomCallService;
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;
_cameraGroupService = cameraGroupService;
@@ -50,6 +52,7 @@ public class LargeScreenController
_classRoomCallTaskService = classRoomCallTaskService;
_classRoomCallService = classRoomCallService;
_deepelephManager = deepelephManager;
_personSetInfoService = personSetInfoService;
}

/// <summary>
@@ -82,23 +85,41 @@ public class LargeScreenController
var alarmStatistics = warnType.Select(x => new
{
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);
foreach (var item in warnGroup)
{
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
{
//数字统计
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,
};
}
@@ -178,22 +199,38 @@ public class LargeScreenController
//告警信息
var warnGroup = _simpleCacheService.Get<List<WarnGroupInfo>>(SafeCampusConst.WarnGroup).FirstOrDefault(x=>x.Code=="ZHKT");
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();
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
{
ClassRoom=new
{
Teacher="王明祥",
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,
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,
RollCall= classRoom
//RollCall= classRoom.Where(x=>x.AlarmType!= "class_room_call").ToList()
};
}
/// <summary>
@@ -253,4 +290,20 @@ public class LargeScreenController

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();
}
}

+ 18
- 0
SafeCampus.API/SafeCampus.Web.Core/SafeCampus.Web.Core.xml Bestand weergeven

@@ -61,6 +61,12 @@
<param name="msg"></param>
<returns></returns>
</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">
<summary>
考勤事件管理接口
@@ -1116,6 +1122,18 @@
<param name="streamId">流ID</param>
<returns></returns>
</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">
<summary>
场景code


+ 1
- 1
SafeCampus.API/SafeCampus.Web.Entry/Properties/PublishProfiles/FolderProfile.pubxml.user Bestand weergeven

@@ -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-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 />
</PropertyGroup>
</Project>

+ 10
- 2
SafeCampus.WEB/src/api/modules/sysconfig/ability.ts Bestand weergeven

@@ -18,11 +18,19 @@ const http = moduleRequest("/business/warn/");
const http1 = moduleRequest("/violation/analysis/");

const abilityApi = {
/** 获取告警分组 */
/* 推送配置保存 */
pushConfig(params: any) {
return http.post("setWarnPushSetting", params);
},
// 获取推送信息
getPushInfo(params: any) {
return http.get("getWarnPushSetting", params);
},
/** 获取预警分组 */
warnGroup(params: ReqId) {
return http.get("getWarnGroup", params);
},
/** 关联摄像头和告警分组 */
/** 关联摄像头和警分组 */
setWarnGroup(params: setWarn) {
return http.post("setWarnGroupDevice", params);
},


+ 3
- 3
SafeCampus.WEB/src/api/modules/warn/zjrq.ts Bestand weergeven

@@ -34,15 +34,15 @@ const warnZJRQApi = {
delete(params: ReqId[]) {
return http.post("deleteInfoD", params);
},
/** 获取警分组 */
/** 获取警分组 */
warnGroup(params: ReqId) {
return http.get("getInfo", params);
},
/** 获取警分组 */
/** 获取警分组 */
warnType(params: ReqId) {
return http.get("getAlarmType", params);
},
/** 处理警 */
/** 处理警 */
handWarn(params: ReqId) {
return http.post("handWarn", params);
}


+ 1
- 1
SafeCampus.WEB/src/components/TreeFilter/index.vue Bestand weergeven

@@ -86,8 +86,8 @@ const setSelected = () => {
};

onBeforeMount(async () => {
await getRequestData();
setSelected();
await getRequestData();
});

// 使用 nextTick 防止打包后赋值不生效,开发环境是正常的


+ 58
- 57
SafeCampus.WEB/src/components/VideoPlay/videoplay.vue Bestand weergeven

@@ -1,81 +1,82 @@
<!--
* @Description: 警管理
* @Description: 警管理
* @Author: huguodong
* @Date: 2023-12-15 15:44:05
!-->
<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">

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("播放");
};
const props = defineProps({
videoUrl: String,
videoType: String,
videoType: String
});
// 视频播放组件
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的变化
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 {
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;
},{ deep: true, immediate: true });

},
{ deep: true, immediate: true }
);

onMounted(() => {
// 在这里执行其他需要在组件挂载后运行的代码
});

</script>
// 在这里执行其他需要在组件挂载后运行的代码
});
</script>
<style lang="scss" scoped>

</style>
</style>

+ 4
- 4
SafeCampus.WEB/src/layouts/components/Header/ToolBarRight.vue Bestand weergeven

@@ -1,16 +1,16 @@
<template>
<div class="tool-bar-ri">
<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 />
</el-icon>
</el-icon> -->
<el-icon @click="open" color="#ccc" :size="29" style="margin-right: 20px; cursor: pointer">
<VideoCamera />
</el-icon>
<AssemblySize id="assemblySize" />
<SearchMenu id="searchMenu" />
<ThemeSetting id="themeSetting" />
<Message id="message" />
<!-- <Message id="message" /> -->
<Fullscreen id="fullscreen" />
<ChangeModule id="changeModule" />
</div>
@@ -33,7 +33,7 @@ import SearchMenu from "./components/SearchMenu.vue";
const userStore = useUserStore();
const username = computed(() => userStore.userInfo?.name);
function open() {
window.open("http://8.141.155.183:91/view/1808743138258845697");
window.open("/#/screen");
}
function opens() {
window.open("http://192.168.10.101:1234/");


+ 4
- 4
SafeCampus.WEB/src/views/home/index.vue Bestand weergeven

@@ -26,7 +26,7 @@
<img src="@/assets/images/home/warn.png" alt="" />
</div>
<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>
</div></el-col
@@ -61,7 +61,7 @@
<div class="home-bg card">
<div class="home-bg-title">
<div></div>
<div>今日警情况</div>
<div>今日警情况</div>
</div>
<div class="home-bg-content">
<div ref="chart1" style="width: 100%; height: 100%"></div>
@@ -175,7 +175,7 @@ function getCharts1(data: any) {
},
series: [
{
name: "今日警情况",
name: "今日警情况",
type: "pie",
radius: ["60%", "90%"],
avoidLabelOverlap: false,
@@ -333,7 +333,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
},
{
prop: "warntotal",
label: "警总量"
label: "警总量"
// render: () => {
// return "楼道";
// }


+ 2
- 2
SafeCampus.WEB/src/views/practicalTraining/model/index.vue Bestand weergeven

@@ -1,11 +1,11 @@
<!--
* @Description: 警管理
* @Description: 警管理
* @Author: huguodong
* @Date: 2023-12-15 15:44:05
!-->
<template>
<div class="table-box">
<ProTable ref="proTable" title="警列表" :columns="columns" :data="tableData">
<ProTable ref="proTable" title="警列表" :columns="columns" :data="tableData">
<!-- 表格 header 按钮 -->

<!-- 表格 菜单类型 按钮 -->


+ 19
- 19
SafeCampus.WEB/src/views/screen/component/classroom/classNotice.vue Bestand weergeven

@@ -2,15 +2,15 @@
<div style="width: 100%; height: 100%">
<div class="commontitle">
<div class="left">
<span>学员课堂警情况</span>
<span>学员课堂警情况</span>
<img src="/static/screen/img/titleIcon.png" alt="" />
</div>
<div class="right">
<img src="/static/screen/img/redLight.png" alt="" />
<span>警数量({{ alarmList.length }})</span>
<span>警数量({{ alarmList.length }})</span>
</div>
</div>
<div style="height: 568px; overflow: auto; margin-top: 4px">
<div style="height: 568px; margin-top: 4px; overflow: auto">
<ul>
<li v-for="item in alarmList" :key="item.id">
<div class="name">{{ item.personName || "未知" }}</div>
@@ -20,7 +20,7 @@
<div class="title">{{ item.alarmTypeDesc }}</div>
</li>
</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>
</template>
@@ -42,13 +42,13 @@ defineExpose({
<style scoped lang="scss">
.commontitle {
.right {
color: #ffa1a1;
font-size: 14px;
color: #ffa1a1;
img {
width: 18px;
position: relative;
top: 4px;
right: 6px;
width: 18px;
}
}
}
@@ -56,43 +56,43 @@ ul {
display: flex;
flex-wrap: wrap;
li {
box-sizing: border-box;
width: 129.366px;
height: 173.506px;
background: #182665;
padding: 0 10px;
box-sizing: border-box;
padding-top: 6px;
margin-top: 7.8px;
margin-right: 16px;
margin-bottom: 7.8px;
margin-top: 7.8px;
background: #182665;
&:nth-child(7n) {
margin-right: 0px;
margin-right: 0;
}
.name {
color: #fff;
text-align: center;
font-size: 14px;
color: #ffffff;
text-align: center;
}
.imgbox {
margin-top: 5px;
width: 109.702px;
height: 112.44px;
object-fit: cover;
margin-top: 5px;
text-align: center;
object-fit: cover;
.el-image {
height: 100%;
width: 100%;
height: 100%;
}
}
.title {
background: #0c4dcf;
width: 109.702px;
height: 23px;
color: #fff;
text-align: center;
font-size: 14px;
line-height: 23px;
color: #ffffff;
text-align: center;
background: #0c4dcf;
}
}
}
</style>
</style>

+ 47
- 46
SafeCampus.WEB/src/views/screen/component/index/todayInfo.vue Bestand weergeven

@@ -2,7 +2,7 @@
<div style="width: 100%; height: 100%">
<div class="commontitle">
<div class="left">
<span>今日警信息</span>
<span>今日警信息</span>
<img src="/static/screen/img/titleIcon.png" alt="" />
</div>
<div class="right">
@@ -22,14 +22,14 @@
<div class="todayBoticeTotal myborder1">
<div
style="
position: relative;
bottom: 3px;
width: 40px;
height: 40px;
margin-right: 14px;
text-align: center;
border: 1px solid #ab2626;
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" />
@@ -38,7 +38,7 @@
今日<span>7</span>个场景预警总计:<span class="total">{{ count }}</span> 起
</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>
<template v-for="item in warnList" :key="item.id">
<li>
@@ -61,7 +61,7 @@
</li>
</template>
<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>
</ul>
</div>
@@ -110,36 +110,36 @@ defineExpose({

<style scoped lang="scss">
.todayBoticeTotal {
box-sizing: border-box;
display: flex;
align-content: center;
width: 588px;
height: 59px;
background: #0f1e5e;
color: #78dfff;
padding-top: 13px;
padding-left: 25px;
margin-top: 22px;
font-family: "Microsoft YaHei UI";
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 {
color: #ff483a;
font-family: "Microsoft YaHei UI";
font-size: 22px;
position: relative;
top: 3px;
font-family: "Microsoft YaHei UI";
font-size: 22px;
color: #ff483a;
}
}
ul:not(.el-scrollbar__view) {
li:first-child {
margin-top: 0px;
margin-top: 0;
}
li {
box-sizing: border-box;
display: flex;
padding-right: 20px;
margin-top: 18px;
background: #182665;
padding-right: 20px;
box-sizing: border-box;
.left {
width: 195px;
height: 114px;
@@ -150,72 +150,73 @@ ul:not(.el-scrollbar__view) {
}
}
.right {
position: relative;
flex: 1;
padding-left: 20px;
position: relative;
.status {
position: absolute;
top: 16px;
right: 0;
box-sizing: border-box;
display: flex;
place-content: center space-between;
width: 82px;
height: 22px;
color: #fff;
padding-right: 16px;
padding-left: 9px;
font-size: 12px;
display: flex;
justify-content: space-between;
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 {
color: #78dfff;
font-size: 14px;
margin-top: 13px;
font-size: 14px;
color: #78dfff;
}
.title {
color: #fff;
font-size: 16px;
margin-top: 13px;
font-size: 16px;
color: #ffffff;
}
.des {
display: flex;
justify-content: space-between;
color: #78dfff;
font-size: 12px;
margin-top: 16px;
font-size: 12px;
color: #78dfff;
}
}
}
}
.header-select {
:deep(.el-select__wrapper) {
border: 1px solid #35c9f0;
background: unset;
width: 100%;
height: 40px;
background: unset;
border: 1px solid #35c9f0;
outline: none;
}

// :deep(.el-popper) {
// position: absolute !important;
// top: 58px !important;
// left: 0px !important;
// }
:deep(.el-select-dropdown__item) {
color: #0c4dcf;
font-size: 20px;
height: 55px;
font-size: 20px;
line-height: 55px;
color: #0c4dcf;
}
: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;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 16px;
}
}

// .header-select.nobg {
// :deep(.el-select__wrapper) {
// background-color: unset;
@@ -237,4 +238,4 @@ ul:not(.el-scrollbar__view) {
// font-size: 16px;
// }
// }
</style>
</style>

+ 31
- 31
SafeCampus.WEB/src/views/screen/component/index/todayNotice.vue Bestand weergeven

@@ -2,7 +2,7 @@
<div style="width: 100%; height: 100%">
<div class="commontitle">
<div class="left">
<span>今日场景警次数</span>
<span>今日场景警次数</span>
<img src="/static/screen/img/titleIcon.png" alt="" />
</div>
<div class="right"></div>
@@ -12,10 +12,10 @@
<div class="commonTitle1">
<span class="left">校园安全</span>
<span class="right"
>警次数:<span class="num">{{ typeStatistiCount }}</span></span
>警次数:<span class="num">{{ typeStatistiCount }}</span></span
>
</div>
<div style="height: 410px; overflow-y: auto; margin-top: 18px">
<div style="height: 410px; margin-top: 18px; overflow-y: auto">
<ul>
<template v-for="(item, index) in typeStatisti" :key="index">
<li>
@@ -51,10 +51,10 @@
<div class="commonTitle1">
<span class="left">{{ item.name }}</span>
<span class="right"
>警次数:<span class="num">{{ item.value }}</span></span
>警次数:<span class="num">{{ item.value }}</span></span
>
</div>
<div style="height: 146px; overflow: auto; margin-top: 24px">
<div style="height: 146px; margin-top: 24px; overflow: auto">
<ul>
<template v-for="(item1, index1) in item.subset" :key="index1">
<li>
@@ -127,36 +127,36 @@ defineExpose({
margin-bottom: 22px;
}
.safe {
padding: 24px 29px 0px 29px;
box-sizing: border-box;
width: 456px;
height: 494px;
padding: 24px 29px 0;
ul {
padding-right: 10px;
li {
display: flex;
margin-top: 18.6px;
&:first-child {
margin-top: 0px;
margin-top: 0;
}
.title {
display: flex;
color: #e3e9f3;
font-size: 12px;
color: #e3e9f3;
.top {
box-sizing: border-box;
display: inline-block;
width: 60px;
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;
background: linear-gradient(to left, rgb(55 116 237 / 1%), rgb(55 116 237 / 100%));
border-radius: 10px;
}
.title_ {
display: block;
width: 76px;
position: relative;
right: 10px;
display: block;
width: 76px;
}
}
.progressBox {
@@ -164,23 +164,23 @@ defineExpose({
padding-top: 6px;
}
.num {
color: #fff;
text-align: right;
font-size: 14px;
display: block;
width: 42px;
font-size: 14px;
color: #ffffff;
text-align: right;
}
&:nth-child(1) {
.title {
.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) {
.title {
.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 {
width: calc(100% - 200px);
margin-left: 22px;
box-sizing: border-box;
width: calc(100% - 200px);
height: 494px;
margin-left: 22px;
overflow-y: auto;
> ul {
display: flex;
@@ -199,33 +199,33 @@ defineExpose({
justify-content: space-between;
padding-right: 10px;
> li {
margin-right: 16px;
box-sizing: border-box;
width: 383.228px;
height: 235.65px;
margin-bottom: 22px;
padding: 22px;
box-sizing: border-box;
margin-right: 16px;
margin-bottom: 22px;
}
> li:nth-child(3n) {
margin-right: 0px;
margin-right: 0;
}
ul {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
li {
box-sizing: border-box;
display: flex;
justify-content: space-between;
color: #fff;
font-size: 12px;
width: 48%;
height: 40.92px;
box-shadow: 0px 0px 10px 0px #3877f2 inset;
background: #0e298b;
box-sizing: border-box;
padding: 0 8px;
line-height: 40.92px;
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) {
background: #404c80;
}
</style>
</style>

+ 1
- 1
SafeCampus.WEB/src/views/sysconfig/ability/index.vue Bestand weergeven

@@ -1,5 +1,5 @@
<!--
* @Description: 警管理
* @Description: 警管理
* @Author: huguodong
* @Date: 2023-12-15 15:44:05
!-->


+ 32
- 18
SafeCampus.WEB/src/views/sysconfig/push/index.vue Bestand weergeven

@@ -15,14 +15,14 @@
:size="formSize"
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>

<div class="ruleTitle">推送规则</div>
<div class="ruleContent">
<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>
<div class="tips">当日预警数据每达到设置的条数后,会进行消息推送。</div>
</div>
@@ -35,32 +35,33 @@
</template>
<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 { ElMessage, ElMessageBox } from 'element-plus'
import { abilityApi, getPushInfo,userManageClassManageApi, monitorLIVEApi,SysOrg } from "@/api";
interface RuleForm {

resource: string,
num: number
pushState: string | boolean,
daySum: number
}

const formSize = ref<ComponentSize>('default')
const ruleFormRef = ref<FormInstance>()
const ruleForm = reactive<RuleForm>({
resource: '0',
num: 1
pushState: false,
daySum: 1
})
const pushOptions = [{
label: '开启',
value: '1',
value: true,
},{
label: '关闭',
value: '0',
value: false,
}]

const rules = reactive<FormRules<RuleForm>>({

resource: [
pushState: [
{
required: true,
message: '请选择推送设置',
@@ -74,11 +75,20 @@ const handleChange = (value: number) => {
function isPositiveInteger(value:any) {
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) => {
if (!formEl) return
await formEl.validate((valid, fields) => {
if (valid) {
if(!isPositiveInteger(ruleForm.num)) {
if(!isPositiveInteger(ruleForm.daySum)) {
ElMessage({
message: '推送规则条数必须是大于零的整数',
@@ -86,10 +96,15 @@ const submitForm = async (formEl: FormInstance | undefined) => {
})
return
}
ElMessage({

abilityApi.pushConfig(ruleForm).then(() => {
ElMessage({
message: '操作成功',
type: 'success',
})
})
});
console.log('submit!')
} else {
console.log('error submit!', fields)
@@ -106,20 +121,19 @@ const resetForm = (formEl: FormInstance | undefined) => {
<style lang="scss" scoped>
.content-main {
height: 100%;

.ruleTitle {
margin: 30px 0 20px;
font-size: 14px;
font-weight: 600;
margin: 30px 0 20px 0;
}
.ruleContent {
margin: 20px 0;
font-size: 14px;
color: #666666;
margin: 20px 0;
.tips {
margin-top: 10px;
font-size: 14px;
color: red;
margin-top: 10px;
}
}
}


+ 1
- 0
SafeCampus.WEB/src/views/userManage/dormitory/index.vue Bestand weergeven

@@ -141,6 +141,7 @@ const proTable = ref<ProTableInstance>();
const treeFilter = ref<InstanceType<typeof TreeFilter> | null>(null);
const userStore = useUserStore();
const { accessToken } = userStore;
const defaultValue = ref("");
// 表格配置项
const columns: ColumnProps<SysDormitory.ChamberInfo>[] = [
{ type: "selection", fixed: "left", width: 50 },


+ 3
- 3
SafeCampus.WEB/src/views/warn/statistion/index.vue Bestand weergeven

@@ -1,5 +1,5 @@
<!--
* @Description: 警管理
* @Description: 警管理
* @Author: huguodong
* @Date: 2023-12-15 15:44:05
!-->
@@ -72,7 +72,7 @@ function getCharts1(data: any) {
const chart = echarts.init(chart1.value);
const option = {
title: {
text: "今日警情况",
text: "今日警情况",
// subtext: "Fake Data",
left: "center"
},
@@ -85,7 +85,7 @@ function getCharts1(data: any) {
},
series: [
{
name: "今日警情况",
name: "今日警情况",
type: "pie",
radius: "50%",
data,


+ 169
- 141
SafeCampus.WEB/src/views/warn/zjrq/index.vue Bestand weergeven

@@ -1,128 +1,146 @@
<!--
* @Description: 警管理
* @Description: 警管理
* @Author: huguodong
* @Date: 2023-12-15 15:44:05
!-->
<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>
</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">
<Refresh />
</el-icon>
<div>刷新视频</div>
</div> -->
</div>
<VideoPlay :videoUrl="videoUrls" />
</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>
</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>
</template>

@@ -155,20 +173,21 @@ function toHandle(opt: FormOptEnum, record: {} | ZJRQ.WarnInfo= {}) {
}
let warnOptions = ref([]);
function getWarnTypeList() {
warnOptions.value = []
setTimeout(async ()=> {
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 },
// { prop: "searchKey", 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",
label: "所属学校",
@@ -199,14 +218,14 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
},
{
prop: "cameraName",
label: "警摄像头",
label: "警摄像头",
// render: () => {
// return "楼道";
// }
},
{
prop: "snapshotUrl",
label: "警快照",
label: "警快照",
render: scope => {
return (
<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",
label: "警类型",
label: "警类型",
enum: warnOptions,
search: {
el: "tree-select",
// span: 1
}
// search: {
// el: "tree-select",
// // span: 1
// }
},
{
prop: "warnHand",
@@ -252,12 +271,13 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
},
search: {
el: "tree-select",
// span: 1
span: 0.1
}
},
{
prop: "tick",
label: "预警时间",
width: 180,
search: {
// 自定义 search 组件
span: 1,
@@ -265,7 +285,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
return (
<div class="flex-center">
<el-date-picker
style="150px; flex-shink: 1;"
v-model={searchParam.StartTick}
type="datetime"
placeholder="开始时间"
@@ -274,9 +294,10 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
time-format="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
style="150px;"
v-model={searchParam.EndTick}
type="datetime"
placeholder="结束时间"
@@ -294,6 +315,7 @@ const columns: ColumnProps<ZJRQ.WarnInfo>[] = [
{ prop: "operation", label: "操作", width: 250, fixed: "right" }
];


/**
* 删除
* @param ids id数组
@@ -315,16 +337,14 @@ function RefreshTable() {
let detailData = ref({});
function onDetail(row: any) {
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;
if (code == 200) {
detailData.value = data
}
});
})
}

@@ -336,13 +356,21 @@ const videoUrls = ref('');
const onPlay = (url:string) => {
videoVisible.value = true;
videoUrls.value = url
console.log(videoUrls.value)
}
const handleCloseVideo = () => {
videoVisible.value = false;
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>

<style lang="scss" scoped>


Laden…
Annuleren
Opslaan