diff --git a/public/config/config.json b/public/config/config.json
index 842e02c..abae11f 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,6 +1,6 @@
{
"title": "安全生产智慧监管系统",
- "baseUrl": "http://192.168.83.65:6909/safe-server/",
+ "baseUrl": "http://192.168.83.42:6909/safe-server/",
"deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************",
"deployPath": "/alarm",
"mediaBaseUrl": "http://192.168.83.65:8099",
@@ -12,9 +12,10 @@
"maxZoom": "18",
"zoom": "15",
"timeGap": 600000,
- "systemType": "sm",
+ "systemType": "gm",
"lineWidth": "3",
"lineColor": "#1aa034",
+ "lineColors": ["#FF69B4", "#FFA500", "#87CEEB", "#1E90FF", "#FF1493", "#DC143C", "#FFE4B5", "#32CD32", "#BA55D3", "#90EE90", "#FF4500", "#1E90FF", "#DB7093", "#C71585", "#00BFFF", "#00FF00", "#2E8B57", "#FF7F50", "#FFC0CB", "#9370DB", "#4169E1", "#00FA9A", "#DA70D6", "#FF6347"],
"fontSize": "18px",
"fontColor": "#1aa034",
"preventReclick": 2000,
diff --git a/public/config/config.json b/public/config/config.json
index 842e02c..abae11f 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,6 +1,6 @@
{
"title": "安全生产智慧监管系统",
- "baseUrl": "http://192.168.83.65:6909/safe-server/",
+ "baseUrl": "http://192.168.83.42:6909/safe-server/",
"deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************",
"deployPath": "/alarm",
"mediaBaseUrl": "http://192.168.83.65:8099",
@@ -12,9 +12,10 @@
"maxZoom": "18",
"zoom": "15",
"timeGap": 600000,
- "systemType": "sm",
+ "systemType": "gm",
"lineWidth": "3",
"lineColor": "#1aa034",
+ "lineColors": ["#FF69B4", "#FFA500", "#87CEEB", "#1E90FF", "#FF1493", "#DC143C", "#FFE4B5", "#32CD32", "#BA55D3", "#90EE90", "#FF4500", "#1E90FF", "#DB7093", "#C71585", "#00BFFF", "#00FF00", "#2E8B57", "#FF7F50", "#FFC0CB", "#9370DB", "#4169E1", "#00FA9A", "#DA70D6", "#FF6347"],
"fontSize": "18px",
"fontColor": "#1aa034",
"preventReclick": 2000,
diff --git a/src/main.ts b/src/main.ts
index e93f1e2..d813c68 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -61,6 +61,8 @@
window.localStorage.setItem('zoom', result.data.zoom)
// 代理流播放地址
window.localStorage.setItem('appStreamUrl', result.data.appStreamUrl)
+ // 划线,线的颜色
+ window.localStorage.setItem('lineColors', JSON.stringify(result.data.lineColors))
const app = createApp(App)
app.config.globalProperties.hasPerm = hasPermission
diff --git a/public/config/config.json b/public/config/config.json
index 842e02c..abae11f 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,6 +1,6 @@
{
"title": "安全生产智慧监管系统",
- "baseUrl": "http://192.168.83.65:6909/safe-server/",
+ "baseUrl": "http://192.168.83.42:6909/safe-server/",
"deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************",
"deployPath": "/alarm",
"mediaBaseUrl": "http://192.168.83.65:8099",
@@ -12,9 +12,10 @@
"maxZoom": "18",
"zoom": "15",
"timeGap": 600000,
- "systemType": "sm",
+ "systemType": "gm",
"lineWidth": "3",
"lineColor": "#1aa034",
+ "lineColors": ["#FF69B4", "#FFA500", "#87CEEB", "#1E90FF", "#FF1493", "#DC143C", "#FFE4B5", "#32CD32", "#BA55D3", "#90EE90", "#FF4500", "#1E90FF", "#DB7093", "#C71585", "#00BFFF", "#00FF00", "#2E8B57", "#FF7F50", "#FFC0CB", "#9370DB", "#4169E1", "#00FA9A", "#DA70D6", "#FF6347"],
"fontSize": "18px",
"fontColor": "#1aa034",
"preventReclick": 2000,
diff --git a/src/main.ts b/src/main.ts
index e93f1e2..d813c68 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -61,6 +61,8 @@
window.localStorage.setItem('zoom', result.data.zoom)
// 代理流播放地址
window.localStorage.setItem('appStreamUrl', result.data.appStreamUrl)
+ // 划线,线的颜色
+ window.localStorage.setItem('lineColors', JSON.stringify(result.data.lineColors))
const app = createApp(App)
app.config.globalProperties.hasPerm = hasPermission
diff --git a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
index 163ad9f..a19c56c 100644
--- a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
+++ b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
@@ -18,6 +18,7 @@
})
const emits = defineEmits(['givepointsInfo'])
const lineColor = ref('#1aa034')
+const lineColors = ref([])
const baseurl = ref(window.location.href.split('/#')[0])
const canvas = ref(null) as any
const myCtx = ref(null) as any
@@ -33,28 +34,48 @@
function draw() {
ctx.clearRect(0, 0, canvas.value.width, canvas.value.height)
if (pointsInfo.value && pointsInfo.value.length) {
- ctx.beginPath()
- pointsInfo.value.forEach((e: any) => {
+ pointsInfo.value.forEach((e: any, index: number) => {
+ ctx.beginPath()
if (e.boundary && e.boundary.length) { // 画线
ctx.moveTo(e.boundary[0].x, e.boundary[0].y)
ctx.lineTo(e.boundary[1].x, e.boundary[1].y)
ctx.lineTo(e.boundary[2].x, e.boundary[2].y)
ctx.lineTo(e.boundary[3].x, e.boundary[3].y)
+ ctx.lineTo(e.boundary[0].x, e.boundary[0].y)
}
- console.log('划线-----------')
- console.log('e.boundary', e.boundary)
-
- ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ // ---------------------------------线--------------------------------
+ // 获取线的颜色
+ if (lineColors.value.length) {
+ console.log('当前正在画的线的颜色-----------', lineColors.value[index])
+ ctx.strokeStyle = lineColors.value[index]
+ }
+ else {
+ ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ }
+ ctx.stroke()
ctx.closePath()
+ // --------------------------------文字-------------------------------
ctx.font = `${window.localStorage.getItem('fontSize')} 微软雅黑` || '13px 微软雅黑'
- ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
- console.log('e.boundary[0].x', e.boundary[0].x)
- console.log('e.boundary[0].y', e.boundary[0].y)
- const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
- const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
- console.log('文字位置x', Number(textX))
- console.log('文字位置y', Number(textY))
- ctx.fillText(e.remark, e.boundary[0].x, textY)
+ if (lineColors.value.length) {
+ ctx.fillStyle = lineColors.value[index]
+ }
+ else {
+ ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
+ }
+ if (lineColors.value.length) {
+ const textX = 0
+ const textY = 20 + index * 20
+ ctx.fillText(e.remark, textX, textY)
+ }
+ else {
+ console.log('e.boundary[0].x', e.boundary[0].x)
+ console.log('e.boundary[0].y', e.boundary[0].y)
+ const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
+ const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
+ console.log('文字位置x', Number(textX))
+ console.log('文字位置y', Number(textY))
+ ctx.fillText(e.remark, e.boundary[0].x, textY)
+ }
})
}
ctx.lineWidth = window.localStorage.getItem('lineWidth') || 2
@@ -133,6 +154,7 @@
onMounted(() => {
lineColor.value = window.localStorage.getItem('lineColor')!
+ lineColors.value = window.localStorage.getItem('lineColors') ? JSON.parse(window.localStorage.getItem('lineColors')!) : []
canvas.value = document.getElementById('myCanvas')
myCtx.value = canvas.value.getContext('2d')
})
@@ -189,7 +211,7 @@
-
+
diff --git a/public/config/config.json b/public/config/config.json
index 842e02c..abae11f 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,6 +1,6 @@
{
"title": "安全生产智慧监管系统",
- "baseUrl": "http://192.168.83.65:6909/safe-server/",
+ "baseUrl": "http://192.168.83.42:6909/safe-server/",
"deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************",
"deployPath": "/alarm",
"mediaBaseUrl": "http://192.168.83.65:8099",
@@ -12,9 +12,10 @@
"maxZoom": "18",
"zoom": "15",
"timeGap": 600000,
- "systemType": "sm",
+ "systemType": "gm",
"lineWidth": "3",
"lineColor": "#1aa034",
+ "lineColors": ["#FF69B4", "#FFA500", "#87CEEB", "#1E90FF", "#FF1493", "#DC143C", "#FFE4B5", "#32CD32", "#BA55D3", "#90EE90", "#FF4500", "#1E90FF", "#DB7093", "#C71585", "#00BFFF", "#00FF00", "#2E8B57", "#FF7F50", "#FFC0CB", "#9370DB", "#4169E1", "#00FA9A", "#DA70D6", "#FF6347"],
"fontSize": "18px",
"fontColor": "#1aa034",
"preventReclick": 2000,
diff --git a/src/main.ts b/src/main.ts
index e93f1e2..d813c68 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -61,6 +61,8 @@
window.localStorage.setItem('zoom', result.data.zoom)
// 代理流播放地址
window.localStorage.setItem('appStreamUrl', result.data.appStreamUrl)
+ // 划线,线的颜色
+ window.localStorage.setItem('lineColors', JSON.stringify(result.data.lineColors))
const app = createApp(App)
app.config.globalProperties.hasPerm = hasPermission
diff --git a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
index 163ad9f..a19c56c 100644
--- a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
+++ b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
@@ -18,6 +18,7 @@
})
const emits = defineEmits(['givepointsInfo'])
const lineColor = ref('#1aa034')
+const lineColors = ref([])
const baseurl = ref(window.location.href.split('/#')[0])
const canvas = ref(null) as any
const myCtx = ref(null) as any
@@ -33,28 +34,48 @@
function draw() {
ctx.clearRect(0, 0, canvas.value.width, canvas.value.height)
if (pointsInfo.value && pointsInfo.value.length) {
- ctx.beginPath()
- pointsInfo.value.forEach((e: any) => {
+ pointsInfo.value.forEach((e: any, index: number) => {
+ ctx.beginPath()
if (e.boundary && e.boundary.length) { // 画线
ctx.moveTo(e.boundary[0].x, e.boundary[0].y)
ctx.lineTo(e.boundary[1].x, e.boundary[1].y)
ctx.lineTo(e.boundary[2].x, e.boundary[2].y)
ctx.lineTo(e.boundary[3].x, e.boundary[3].y)
+ ctx.lineTo(e.boundary[0].x, e.boundary[0].y)
}
- console.log('划线-----------')
- console.log('e.boundary', e.boundary)
-
- ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ // ---------------------------------线--------------------------------
+ // 获取线的颜色
+ if (lineColors.value.length) {
+ console.log('当前正在画的线的颜色-----------', lineColors.value[index])
+ ctx.strokeStyle = lineColors.value[index]
+ }
+ else {
+ ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ }
+ ctx.stroke()
ctx.closePath()
+ // --------------------------------文字-------------------------------
ctx.font = `${window.localStorage.getItem('fontSize')} 微软雅黑` || '13px 微软雅黑'
- ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
- console.log('e.boundary[0].x', e.boundary[0].x)
- console.log('e.boundary[0].y', e.boundary[0].y)
- const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
- const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
- console.log('文字位置x', Number(textX))
- console.log('文字位置y', Number(textY))
- ctx.fillText(e.remark, e.boundary[0].x, textY)
+ if (lineColors.value.length) {
+ ctx.fillStyle = lineColors.value[index]
+ }
+ else {
+ ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
+ }
+ if (lineColors.value.length) {
+ const textX = 0
+ const textY = 20 + index * 20
+ ctx.fillText(e.remark, textX, textY)
+ }
+ else {
+ console.log('e.boundary[0].x', e.boundary[0].x)
+ console.log('e.boundary[0].y', e.boundary[0].y)
+ const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
+ const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
+ console.log('文字位置x', Number(textX))
+ console.log('文字位置y', Number(textY))
+ ctx.fillText(e.remark, e.boundary[0].x, textY)
+ }
})
}
ctx.lineWidth = window.localStorage.getItem('lineWidth') || 2
@@ -133,6 +154,7 @@
onMounted(() => {
lineColor.value = window.localStorage.getItem('lineColor')!
+ lineColors.value = window.localStorage.getItem('lineColors') ? JSON.parse(window.localStorage.getItem('lineColors')!) : []
canvas.value = document.getElementById('myCanvas')
myCtx.value = canvas.value.getContext('2d')
})
@@ -189,7 +211,7 @@
-
+
diff --git a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
index 62c2b3d..735d1e7 100644
--- a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
+++ b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
@@ -825,7 +825,7 @@
+
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
diff --git a/public/config/config.json b/public/config/config.json
index 842e02c..abae11f 100644
--- a/public/config/config.json
+++ b/public/config/config.json
@@ -1,6 +1,6 @@
{
"title": "安全生产智慧监管系统",
- "baseUrl": "http://192.168.83.65:6909/safe-server/",
+ "baseUrl": "http://192.168.83.42:6909/safe-server/",
"deployPathDec": "****************注意:这个/alarm的alarm一定要改成部署的文件夹的名字***************************",
"deployPath": "/alarm",
"mediaBaseUrl": "http://192.168.83.65:8099",
@@ -12,9 +12,10 @@
"maxZoom": "18",
"zoom": "15",
"timeGap": 600000,
- "systemType": "sm",
+ "systemType": "gm",
"lineWidth": "3",
"lineColor": "#1aa034",
+ "lineColors": ["#FF69B4", "#FFA500", "#87CEEB", "#1E90FF", "#FF1493", "#DC143C", "#FFE4B5", "#32CD32", "#BA55D3", "#90EE90", "#FF4500", "#1E90FF", "#DB7093", "#C71585", "#00BFFF", "#00FF00", "#2E8B57", "#FF7F50", "#FFC0CB", "#9370DB", "#4169E1", "#00FA9A", "#DA70D6", "#FF6347"],
"fontSize": "18px",
"fontColor": "#1aa034",
"preventReclick": 2000,
diff --git a/src/main.ts b/src/main.ts
index e93f1e2..d813c68 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -61,6 +61,8 @@
window.localStorage.setItem('zoom', result.data.zoom)
// 代理流播放地址
window.localStorage.setItem('appStreamUrl', result.data.appStreamUrl)
+ // 划线,线的颜色
+ window.localStorage.setItem('lineColors', JSON.stringify(result.data.lineColors))
const app = createApp(App)
app.config.globalProperties.hasPerm = hasPermission
diff --git a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
index 163ad9f..a19c56c 100644
--- a/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
+++ b/src/views/alarm/policyConfig/monitorPoint/drawArea.vue
@@ -18,6 +18,7 @@
})
const emits = defineEmits(['givepointsInfo'])
const lineColor = ref('#1aa034')
+const lineColors = ref([])
const baseurl = ref(window.location.href.split('/#')[0])
const canvas = ref(null) as any
const myCtx = ref(null) as any
@@ -33,28 +34,48 @@
function draw() {
ctx.clearRect(0, 0, canvas.value.width, canvas.value.height)
if (pointsInfo.value && pointsInfo.value.length) {
- ctx.beginPath()
- pointsInfo.value.forEach((e: any) => {
+ pointsInfo.value.forEach((e: any, index: number) => {
+ ctx.beginPath()
if (e.boundary && e.boundary.length) { // 画线
ctx.moveTo(e.boundary[0].x, e.boundary[0].y)
ctx.lineTo(e.boundary[1].x, e.boundary[1].y)
ctx.lineTo(e.boundary[2].x, e.boundary[2].y)
ctx.lineTo(e.boundary[3].x, e.boundary[3].y)
+ ctx.lineTo(e.boundary[0].x, e.boundary[0].y)
}
- console.log('划线-----------')
- console.log('e.boundary', e.boundary)
-
- ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ // ---------------------------------线--------------------------------
+ // 获取线的颜色
+ if (lineColors.value.length) {
+ console.log('当前正在画的线的颜色-----------', lineColors.value[index])
+ ctx.strokeStyle = lineColors.value[index]
+ }
+ else {
+ ctx.strokeStyle = window.localStorage.getItem('lineColor') || '#1aa034'
+ }
+ ctx.stroke()
ctx.closePath()
+ // --------------------------------文字-------------------------------
ctx.font = `${window.localStorage.getItem('fontSize')} 微软雅黑` || '13px 微软雅黑'
- ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
- console.log('e.boundary[0].x', e.boundary[0].x)
- console.log('e.boundary[0].y', e.boundary[0].y)
- const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
- const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
- console.log('文字位置x', Number(textX))
- console.log('文字位置y', Number(textY))
- ctx.fillText(e.remark, e.boundary[0].x, textY)
+ if (lineColors.value.length) {
+ ctx.fillStyle = lineColors.value[index]
+ }
+ else {
+ ctx.fillStyle = window.localStorage.getItem('fontColor') || '#1aa034'
+ }
+ if (lineColors.value.length) {
+ const textX = 0
+ const textY = 20 + index * 20
+ ctx.fillText(e.remark, textX, textY)
+ }
+ else {
+ console.log('e.boundary[0].x', e.boundary[0].x)
+ console.log('e.boundary[0].y', e.boundary[0].y)
+ const textX = e.boundary[0].x === 0 ? 0 : e.boundary[0].x + 3 > props.width - 60 ? props.width - 60 : e.boundary[0].x + 5
+ const textY = e.boundary[0].y < 15 ? 15 : e.boundary[0].y > props.height - 12 ? props.height - 12 : e.boundary[0].y - 5
+ console.log('文字位置x', Number(textX))
+ console.log('文字位置y', Number(textY))
+ ctx.fillText(e.remark, e.boundary[0].x, textY)
+ }
})
}
ctx.lineWidth = window.localStorage.getItem('lineWidth') || 2
@@ -133,6 +154,7 @@
onMounted(() => {
lineColor.value = window.localStorage.getItem('lineColor')!
+ lineColors.value = window.localStorage.getItem('lineColors') ? JSON.parse(window.localStorage.getItem('lineColors')!) : []
canvas.value = document.getElementById('myCanvas')
myCtx.value = canvas.value.getContext('2d')
})
@@ -189,7 +211,7 @@
-
+
diff --git a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
index 62c2b3d..735d1e7 100644
--- a/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
+++ b/src/views/alarm/policyConfig/monitorPoint/editDialog.vue
@@ -825,7 +825,7 @@
+
- {{ scope.row[item.value] }}
+ {{ scope.row[item.value] }}
diff --git a/src/views/alarm/policyConfig/videoPreview/videoPreview.vue b/src/views/alarm/policyConfig/videoPreview/videoPreview.vue
index afc7b03..4368dce 100644
--- a/src/views/alarm/policyConfig/videoPreview/videoPreview.vue
+++ b/src/views/alarm/policyConfig/videoPreview/videoPreview.vue
@@ -5,6 +5,7 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import dayjs from 'dayjs'
import { zIndex } from 'html2canvas/dist/types/css/property-descriptors/z-index'
+import type { TableColumn } from '@/components/NormalTable/table_interface'
import { getSecurityAlarmList } from '@/api/alarm/securityAlarm/securityAlarmList'
import { createStream, sendHeart, stopStream } from '@/api/monitor/index-new-gm'
import { getMediaStream, getMediaToken, getRecognitionUrl, startBox } from '@/api/monitor/media'
@@ -40,6 +41,7 @@
const loading = ref(false)
const src = ref([''])
const title = ref('')
+const total = ref(0)
const leafLoading = ref(false)
const currentLeafId = ref('')
const radio = ref('1') // 原始流识别流切换按钮
@@ -259,31 +261,59 @@
ElMessage.warning('未获取到识别流')
}
}
-// -----------------------------------------------------------------------------------------------
-
+// ----------------------------------今日报警-------------------------------------------------------------
+const listLoading = ref(false)
+// 默认查询条件
+const listQuery = ref({
+ areaName: '', // 所属区域
+ deviceName: '', // 相机
+ deptId: '', // 所属单位
+ deptName: '', // 所属单位名称
+ alarmTimeStart: `${dayjs().format('YYYY-MM-DD')} 00:00:00`, // 开始时间
+ alarmTimeEnd: `${dayjs().format('YYYY-MM-DD')} 23:59:59`, // 结束时间
+ offset: 1,
+ limit: 20,
+})
+// 表格表头
+const columns: Ref
= ref([
+ { text: '摄像头名称', value: 'deviceName', align: 'center' },
+ { text: '识别类型', value: 'recognitionTypeName', align: 'center' },
+ { text: '区域', value: 'areaName', align: 'center' },
+ { text: '单位', value: 'deptName', align: 'center' },
+ { text: '记录时间', value: 'alarmTime', align: 'center' },
+])
// 获取当日报警数数据
const fetchAlarmData = () => {
- const params = {
- areaName: '', // 所属区域
- deviceName: '', // 相机
- deptId: '', // 所属单位
- deptName: '', // 所属单位名称
- alarmTimeStart: `${dayjs().format('YYYY-MM-DD')} 00:00:00`, // 开始时间
- alarmTimeEnd: `${dayjs().format('YYYY-MM-DD')} 23:59:59`, // 结束时间
- offset: 1,
- limit: 20,
- }
- getSecurityAlarmList(params).then((res) => {
- alarmResultList.value = res.data.rows.map((item: { filePath: string }) => {
+ listLoading.value = true
+ getSecurityAlarmList(listQuery.value).then((res) => {
+ alarmResultList.value = res.data.rows.map((item: any) => {
return {
...item,
+ recognitionTypeName: item.recognitionTypeName || item.sceneName,
url: `${window.localStorage.getItem('baseURL')}/picture/alarm/${item.filePath}?token=${window.localStorage.getItem('token')}`,
}
})
+ total.value = res.data.total
alarmCount.value = alarmResultList.value.length
+ listLoading.value = false
}).catch(() => {
+ listLoading.value = false
})
}
+
+// 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写
+function changePage(val: { size: number; page: number }) {
+ if (val && val.size) {
+ listQuery.value.limit = val.size
+ }
+ if (val && val.page) {
+ listQuery.value.offset = val.page
+ }
+ fetchAlarmData()
+}
+
+// ----------------------------------今日报警-------------------------------------------------------------
+
// 判断是对象且不为空
function isNonEmptyObject(obj: any) {
return typeof obj === 'object'
@@ -532,7 +562,7 @@
-->
-
+
{{ index + 1 }}
@@ -565,9 +594,48 @@
-
+
-->
+
+
+
+ 当日报警数: {{ alarmCount }}
+
+
+
+
+
+ {{ (listQuery.offset - 1) * listQuery.limit + scope.$index + 1 }}
+
+
+
+
+
+
+
+ /
+
+
+
+
+
+