```
feat(alarm): 添加预警状态筛选功能 - 在API接口中添加warning字段用于筛选预警状态 - 实现预警状态的下拉选择框,支持全部、是、否三种选项 - 添加清空按钮重置所有筛选条件 - 更新告警管理页面的数据请求逻辑以包含预警筛选参数 - 修复视频组件样式问题,移除不必要的悬停动画效果 ```
This commit is contained in:
@@ -4,6 +4,7 @@ export interface RosInspectionRecordLineImageQueryDTO {
|
|||||||
recognizeType?: number | string;
|
recognizeType?: number | string;
|
||||||
startTime?: string;
|
startTime?: string;
|
||||||
endTime?: string;
|
endTime?: string;
|
||||||
|
warning?: boolean;
|
||||||
keyword?: string;
|
keyword?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -931,7 +931,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.video-grid-cell:hover {
|
.video-grid-cell:hover {
|
||||||
transform: translateY(-1px);
|
|
||||||
border-color: rgba(141, 237, 255, 0.42);
|
border-color: rgba(141, 237, 255, 0.42);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -942,7 +941,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
display: block;
|
display: block;
|
||||||
opacity: 0.76;
|
// opacity: 0.76;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stream-message {
|
.stream-message {
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ interface AlarmRecord {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RecognitionStatusText = "待执行" | "执行中" | "执行成功" | "执行失败" | "未知状态";
|
type RecognitionStatusText = "待执行" | "执行中" | "执行成功" | "执行失败" | "未知状态";
|
||||||
|
type WarningFilterValue = "" | "true" | "false";
|
||||||
|
|
||||||
interface AlarmPageResult {
|
interface AlarmPageResult {
|
||||||
total?: number;
|
total?: number;
|
||||||
@@ -48,6 +49,7 @@ const recognitionStatusMap: Record<number, RecognitionStatusText> = {
|
|||||||
|
|
||||||
const alarmNo = ref("");
|
const alarmNo = ref("");
|
||||||
const recognizeType = ref("");
|
const recognizeType = ref("");
|
||||||
|
const warningFilter = ref<WarningFilterValue>("true");
|
||||||
const startTime = ref("");
|
const startTime = ref("");
|
||||||
const endTime = ref("");
|
const endTime = ref("");
|
||||||
const alarms = ref<AlarmRecord[]>([]);
|
const alarms = ref<AlarmRecord[]>([]);
|
||||||
@@ -97,6 +99,15 @@ function handleSearch() {
|
|||||||
fetchAlarmList();
|
fetchAlarmList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleClear() {
|
||||||
|
alarmNo.value = "";
|
||||||
|
recognizeType.value = "";
|
||||||
|
warningFilter.value = "";
|
||||||
|
startTime.value = "";
|
||||||
|
endTime.value = "";
|
||||||
|
handleSearch();
|
||||||
|
}
|
||||||
|
|
||||||
// 请求告警分页列表并更新表格数据
|
// 请求告警分页列表并更新表格数据
|
||||||
async function fetchAlarmList() {
|
async function fetchAlarmList() {
|
||||||
listLoading.value = true;
|
listLoading.value = true;
|
||||||
@@ -108,6 +119,7 @@ async function fetchAlarmList() {
|
|||||||
limit: pageSize,
|
limit: pageSize,
|
||||||
query: {
|
query: {
|
||||||
recognizeType: normalizeRecognizeType(recognizeType.value),
|
recognizeType: normalizeRecognizeType(recognizeType.value),
|
||||||
|
warning: normalizeWarningFilter(warningFilter.value),
|
||||||
startTime: normalizeDateTime(startTime.value),
|
startTime: normalizeDateTime(startTime.value),
|
||||||
endTime: normalizeDateTime(endTime.value),
|
endTime: normalizeDateTime(endTime.value),
|
||||||
id: alarmNo.value.trim() || undefined,
|
id: alarmNo.value.trim() || undefined,
|
||||||
@@ -183,6 +195,14 @@ function normalizeRecognizeType(value: string) {
|
|||||||
return value ? Number(value) : undefined;
|
return value ? Number(value) : undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function normalizeWarningFilter(value: WarningFilterValue) {
|
||||||
|
if (!value) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value === "true";
|
||||||
|
}
|
||||||
|
|
||||||
function formatPosition(record: RosInspectionRecordLineImage) {
|
function formatPosition(record: RosInspectionRecordLineImage) {
|
||||||
if (typeof record.poseX !== "number" || typeof record.poseY !== "number") {
|
if (typeof record.poseX !== "number" || typeof record.poseY !== "number") {
|
||||||
return "--";
|
return "--";
|
||||||
@@ -210,6 +230,11 @@ onMounted(() => {
|
|||||||
<option value="3">隧道积水</option>
|
<option value="3">隧道积水</option>
|
||||||
<option value="4">墙体裂缝</option>
|
<option value="4">墙体裂缝</option>
|
||||||
</select>
|
</select>
|
||||||
|
<select v-model="warningFilter" class="toolbar-select">
|
||||||
|
<option value="">全部预警状态</option>
|
||||||
|
<option value="true">是否预警:是</option>
|
||||||
|
<option value="false">是否预警:否</option>
|
||||||
|
</select>
|
||||||
<input
|
<input
|
||||||
v-model="startTime"
|
v-model="startTime"
|
||||||
class="toolbar-input alarm-time-input"
|
class="toolbar-input alarm-time-input"
|
||||||
@@ -228,6 +253,7 @@ onMounted(() => {
|
|||||||
@keyup.enter="handleSearch"
|
@keyup.enter="handleSearch"
|
||||||
/>
|
/>
|
||||||
<button class="page-action-btn primary" type="button" @click="handleSearch">搜索</button>
|
<button class="page-action-btn primary" type="button" @click="handleSearch">搜索</button>
|
||||||
|
<button class="page-action-btn ghost" type="button" @click="handleClear">清空</button>
|
||||||
<button class="page-action-btn ghost" type="button" @click="fetchAlarmList">刷新</button>
|
<button class="page-action-btn ghost" type="button" @click="fetchAlarmList">刷新</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar-right">共 {{ totalAlarms }} 条告警记录</div>
|
<div class="toolbar-right">共 {{ totalAlarms }} 条告警记录</div>
|
||||||
|
|||||||
@@ -1640,10 +1640,10 @@ function getStatusClass(status: DeviceItem["status"]) {
|
|||||||
:class="['monitor-video', { infrared: activeCameraMode === 'infrared' }]" autoplay muted
|
:class="['monitor-video', { infrared: activeCameraMode === 'infrared' }]" autoplay muted
|
||||||
playsinline></video>
|
playsinline></video>
|
||||||
<div class="scan-line"></div>
|
<div class="scan-line"></div>
|
||||||
<div class="video-overlay top-left">实时视频流</div>
|
<!-- <div class="video-overlay top-left">实时视频流</div>
|
||||||
<div class="video-overlay top-right">
|
<div class="video-overlay top-right">
|
||||||
{{ activeCameraMode === "white" ? "白光镜头" : "红外镜头" }}
|
{{ activeCameraMode === "white" ? "白光镜头" : "红外镜头" }}
|
||||||
</div>
|
</div> -->
|
||||||
<div class="video-overlay bottom-left">{{ currentRobot.id }}</div>
|
<div class="video-overlay bottom-left">{{ currentRobot.id }}</div>
|
||||||
<div v-if="streamLoading" class="video-empty">视频流连接中...</div>
|
<div v-if="streamLoading" class="video-empty">视频流连接中...</div>
|
||||||
<div v-else-if="streamError" class="video-empty">{{ streamError }}</div>
|
<div v-else-if="streamError" class="video-empty">{{ streamError }}</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user