|
@@ -237,42 +237,49 @@
|
|
|
:width="180"
|
|
|
>
|
|
|
</a-table-column>
|
|
|
- <!-- <a-table-column
|
|
|
- :title="t('previewList.status')"
|
|
|
+ <a-table-column
|
|
|
+ :title="$t('previewList.status')"
|
|
|
data-index="status"
|
|
|
:width="150"
|
|
|
:body-cell-style="
|
|
|
(record) => ({
|
|
|
- background: record.status ? '' : '#7e2d2d',
|
|
|
+ background: record.status ? '#4cd26380' : '#7e2d2d80',
|
|
|
})
|
|
|
"
|
|
|
>
|
|
|
<template #cell="{ record }">
|
|
|
<span>{{
|
|
|
record.status
|
|
|
- ? t('previewList.ycl')
|
|
|
- : t('previewList.wcl')
|
|
|
+ ? $t('previewList.ycl')
|
|
|
+ : $t('previewList.wcl')
|
|
|
}}</span>
|
|
|
</template>
|
|
|
- </a-table-column> -->
|
|
|
- <!-- <a-table-column
|
|
|
- :title="t('previewList.dqstatus')"
|
|
|
- data-index="isRead"
|
|
|
+ </a-table-column>
|
|
|
+ <a-table-column
|
|
|
+ :title="$t('previewList.bjgd')"
|
|
|
+ data-index="AlarmArchiving"
|
|
|
:width="150"
|
|
|
:body-cell-style="
|
|
|
(record) => ({
|
|
|
- background: record.isRead ? '' : '#2d4f7e',
|
|
|
+ background:
|
|
|
+ record.AlarmArchiving == '0'
|
|
|
+ ? '#ffb65d80'
|
|
|
+ : record.AlarmArchiving == '1'
|
|
|
+ ? '#4cd26380'
|
|
|
+ : '#7e2d2d80',
|
|
|
})
|
|
|
"
|
|
|
>
|
|
|
<template #cell="{ record }">
|
|
|
<span>{{
|
|
|
- record.isRead
|
|
|
- ? t('previewList.yd')
|
|
|
- : t('previewList.wd')
|
|
|
+ record.AlarmArchiving == '0'
|
|
|
+ ? '未归档'
|
|
|
+ : record.AlarmArchiving == '1'
|
|
|
+ ? '正确报警'
|
|
|
+ : '错误报警'
|
|
|
}}</span>
|
|
|
</template>
|
|
|
- </a-table-column> -->
|
|
|
+ </a-table-column>
|
|
|
<a-table-column :title="t('previewList.cz')" :width="150">
|
|
|
<template #cell="{ record }">
|
|
|
<a-button
|
|
@@ -337,13 +344,13 @@
|
|
|
:fullscreen="true"
|
|
|
:closable="true"
|
|
|
>
|
|
|
- <AlarmAll :guid="data.id" :is-show-cl="isShowCl" />
|
|
|
+ <AlarmAll :guid="data.id" :is-show-cl="true" />
|
|
|
</PubModal>
|
|
|
<ViewDrawer
|
|
|
ref="viewDrawerRef"
|
|
|
- v-model:view-data="viewData"
|
|
|
:guid="data.id"
|
|
|
- :is-show-cl="false"
|
|
|
+ :is-show-cl="true"
|
|
|
+ @update:view-data="(v) => Object.assign(viewData, v)"
|
|
|
/>
|
|
|
<div id="participants-area" style="display: none"></div>
|
|
|
</div>
|
|
@@ -351,13 +358,22 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import useWorker from '@/assets/js/video-lib/omnimatrix-video-player';
|
|
|
- import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
|
|
+ import {
|
|
|
+ computed,
|
|
|
+ nextTick,
|
|
|
+ onMounted,
|
|
|
+ onUnmounted,
|
|
|
+ ref,
|
|
|
+ watch,
|
|
|
+ provide,
|
|
|
+ toRaw,
|
|
|
+ } from 'vue';
|
|
|
import { IntercomFn } from '@/utils/Intercom';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import { Icon } from '@iconify/vue';
|
|
|
- import { getCropFullInfo } from '@/api/system';
|
|
|
+ import { getCropFullInfo, getAlarmImgFiles } from '@/api/system';
|
|
|
import { useAppStore } from '@/store';
|
|
|
- import dayjs from 'dayjs';
|
|
|
+ // import dayjs from 'dayjs';
|
|
|
import { Message } from '@arco-design/web-vue';
|
|
|
import useWheel from '@/assets/js/useWheel';
|
|
|
import Speech from '../components/speech.vue';
|
|
@@ -376,7 +392,7 @@
|
|
|
const app = useAppStore();
|
|
|
|
|
|
const viewData = ref<AlarmData>({});
|
|
|
- const isShowCl = ref(false);
|
|
|
+ provide('viewData', viewData);
|
|
|
const modalRef = ref();
|
|
|
const workerObj: any = ref({ qj: null });
|
|
|
const cropFullInfo = ref<{
|
|
@@ -598,62 +614,35 @@
|
|
|
|
|
|
const intercomDisabled = ref<'open' | 'loading' | 'close'>('close');
|
|
|
const intercomClick = () => {
|
|
|
- // (app.ip as string).split('//')[1]
|
|
|
IntercomFn(intercomDisabled, props.data.id);
|
|
|
};
|
|
|
const viewDrawerRef = ref();
|
|
|
- const showView = (record: any) => {
|
|
|
- record.isRead = true;
|
|
|
- const alarmLog = [record];
|
|
|
- // AlgorithmName: '人员计数D';
|
|
|
- // CameraDeviceId: 21;
|
|
|
- // classId: 1;
|
|
|
- // h: 386;
|
|
|
- // isRead: true;
|
|
|
- // src: 'originPicture/20241218/20241218192906_180909_30_21_src.jpg?serverUUID=3f16a3b113234807b81f6f8d0f268232';
|
|
|
- // status: 0;
|
|
|
- // time: 1734521346;
|
|
|
- // timeN: '2024-12-18 19:29:06';
|
|
|
- // type: '人员计数D';
|
|
|
- // w: 680;
|
|
|
- // x: 1454;
|
|
|
- // y: 19;
|
|
|
+ const showView = async (record: any) => {
|
|
|
record.loading = true;
|
|
|
- const img = document.createElement('img');
|
|
|
- img.src = `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.src}&GUID=${props.data.id}`;
|
|
|
- img.onload = () => {
|
|
|
- const [w, h] = [img.width, img.height];
|
|
|
- const newAlarmData = alarmLog.map((item: any, i: number) => {
|
|
|
- return {
|
|
|
- ...item,
|
|
|
- Name: item.AlgorithmName,
|
|
|
- type: item.AlgorithmName,
|
|
|
- status: 0,
|
|
|
- isRead: false,
|
|
|
- img: img.src,
|
|
|
- tImg: img.src,
|
|
|
- imgJson: {
|
|
|
- imageHeight: h,
|
|
|
- imageWidth: w,
|
|
|
- resultData: {
|
|
|
- objectList: [
|
|
|
- {
|
|
|
- rect: {
|
|
|
- ...alarmLog[i],
|
|
|
- width: alarmLog[i].w,
|
|
|
- height: alarmLog[i].h,
|
|
|
- },
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- },
|
|
|
- };
|
|
|
- });
|
|
|
- const [firstAlarmData] = newAlarmData;
|
|
|
- viewData.value = firstAlarmData;
|
|
|
- viewDrawerRef.value.open();
|
|
|
- record.loading = false;
|
|
|
- };
|
|
|
+ record.isRead = true;
|
|
|
+ const imgJson = await getAlarmImgFiles(record.JsonFile, {
|
|
|
+ GUID: props.data.id,
|
|
|
+ });
|
|
|
+
|
|
|
+ Object.assign(record, {
|
|
|
+ Name: record.AlertType,
|
|
|
+ type: record.AlertType,
|
|
|
+ status:
|
|
|
+ record.status !== 'undefined' ? record.status : +record.HandleStatus,
|
|
|
+ isRead: false,
|
|
|
+ img: `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.OriginPicture}&GUID=${props.data.id}`,
|
|
|
+ tImg: `${app.ip}/rpc/rabbitMQ/KunPengYun/Files/${record.Thumbnail}&GUID=${props.data.id}`,
|
|
|
+ imgJson,
|
|
|
+ AlarmArchiving: `${
|
|
|
+ record.AlarmArchiving !== 'undefined'
|
|
|
+ ? record.AlarmArchiving
|
|
|
+ : record.Archived
|
|
|
+ }`,
|
|
|
+ });
|
|
|
+ viewData.value = record;
|
|
|
+
|
|
|
+ viewDrawerRef.value.open();
|
|
|
+ record.loading = false;
|
|
|
};
|
|
|
watch(
|
|
|
radioActive,
|
|
@@ -732,15 +721,17 @@
|
|
|
(e) => {
|
|
|
const data = JSON.parse(e.data);
|
|
|
alarmData.value.unshift({
|
|
|
- type: data.AlgorithmName,
|
|
|
- status: 0,
|
|
|
+ type: data.AlertType,
|
|
|
+ status: +data.HandleStatus,
|
|
|
isRead: false,
|
|
|
loading: false,
|
|
|
- timeN: dayjs(+`${data.time}`.padEnd(13, '0')).format(
|
|
|
- 'YYYY-MM-DD HH:mm:ss'
|
|
|
- ),
|
|
|
+ timeN: data.CreatedAt,
|
|
|
+ AlarmArchiving: `${data.Archived}`,
|
|
|
...data,
|
|
|
});
|
|
|
+ if (alarmData.value.length >= 100) {
|
|
|
+ alarmData.value.splice(50, 50);
|
|
|
+ }
|
|
|
},
|
|
|
false
|
|
|
);
|