|
|
|
|
@ -5,13 +5,15 @@ |
|
|
|
|
@selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange" |
|
|
|
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<template slot="menuLeft"> |
|
|
|
|
<el-button type="danger" size="small" icon="el-icon-turn-off" plain>消警 |
|
|
|
|
<el-button type="danger" size="small" icon="el-icon-turn-off" plain>布防 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" size="small" icon="el-icon-turn-off" plain>撤防 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button type="danger" size="small" icon="el-icon-turn-off" plain>旁路恢复 |
|
|
|
|
<el-button type="warning" size="small" icon="el-icon-turn-off" plain>旁路 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button @click="handleExport" type="warning" size="small" icon="el-icon-download" plain>导出 |
|
|
|
|
<el-button type="warning" size="small" icon="el-icon-turn-off" plain>旁路恢复 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button @click="handleExport" type="primary" size="small" icon="el-icon-download" plain>导出 |
|
|
|
|
</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template slot-scope="{ row, index }" slot="menu"> |
|
|
|
|
@ -47,10 +49,11 @@ |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import { getList } from "@/api/alarm/alarm"; |
|
|
|
|
import {exportBlob} from "@/api/common"; |
|
|
|
|
import { bizLogin, bizDeviceList } from "@/api/wirelessintrusion/wirelessintrusion"; |
|
|
|
|
import { exportBlob } from "@/api/common"; |
|
|
|
|
import { downloadXls } from "@/util/util"; |
|
|
|
|
import {dateNow} from "@/util/date"; |
|
|
|
|
import {getToken} from "@/util/auth"; |
|
|
|
|
import { dateNow } from "@/util/date"; |
|
|
|
|
import { getToken } from "@/util/auth"; |
|
|
|
|
import NProgress from 'nprogress'; |
|
|
|
|
import 'nprogress/nprogress.css'; |
|
|
|
|
import func from "@/util/func"; |
|
|
|
|
@ -85,7 +88,7 @@ export default { |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "设备名称", |
|
|
|
|
prop: "title", |
|
|
|
|
prop: "deviceName", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "设备编号", |
|
|
|
|
@ -94,39 +97,36 @@ export default { |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "设备类型", |
|
|
|
|
type: 'select', |
|
|
|
|
prop: "deviceType", |
|
|
|
|
prop: "productName", |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "报警类型", |
|
|
|
|
type: "select", |
|
|
|
|
dicUrl: "/api/blade-system/dict-biz/dictionary?code=alarm_message_condition", |
|
|
|
|
props: { |
|
|
|
|
label: "dictValue", |
|
|
|
|
value: "dictKey" |
|
|
|
|
}, |
|
|
|
|
dataType: "number", |
|
|
|
|
dictData: [], |
|
|
|
|
search: true |
|
|
|
|
slot: true, |
|
|
|
|
prop: "type", |
|
|
|
|
search: true, |
|
|
|
|
}, |
|
|
|
|
// { |
|
|
|
|
// label: "报警类型", |
|
|
|
|
// type: "select", |
|
|
|
|
// dicUrl: "/api/blade-system/dict/dictionary?code=notice", |
|
|
|
|
// props: { |
|
|
|
|
// label: "dictValue", |
|
|
|
|
// value: "dictKey" |
|
|
|
|
// }, |
|
|
|
|
// dataType: "number", |
|
|
|
|
// slot: true, |
|
|
|
|
// prop: "category", |
|
|
|
|
// search: true, |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
label: "楼号", |
|
|
|
|
prop: "buildId", |
|
|
|
|
width: 80 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "楼层", |
|
|
|
|
prop: "floorNo", |
|
|
|
|
width: 80 |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "经纬度", |
|
|
|
|
prop: "longidute", |
|
|
|
|
formatter: (data) => { |
|
|
|
|
return (data.longidute ? data.longidute + ',' : '') + data.latidute; |
|
|
|
|
} |
|
|
|
|
prop: "xy", |
|
|
|
|
span: 24, |
|
|
|
|
hide: true |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "报警信息", |
|
|
|
|
@ -139,16 +139,6 @@ export default { |
|
|
|
|
prop: "reportTime", |
|
|
|
|
width: '150' |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '上报日期', |
|
|
|
|
prop: 'releaseTimeRange', |
|
|
|
|
type: 'datetime', |
|
|
|
|
valueFormat: 'yyyy-MM-dd HH:mm:ss', |
|
|
|
|
searchRange: true, |
|
|
|
|
search: true, |
|
|
|
|
hide: true, |
|
|
|
|
viewDisplay: false, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}, |
|
|
|
|
data: [], |
|
|
|
|
@ -234,24 +224,39 @@ export default { |
|
|
|
|
getList(page.currentPage, page.pageSize, values).then(res => { |
|
|
|
|
const data = res.data.data; |
|
|
|
|
this.page.total = data.total; |
|
|
|
|
data.records.map(item => { |
|
|
|
|
item.xy = item.longidute + ',' + item.latidute; |
|
|
|
|
}) |
|
|
|
|
this.data = data.records; |
|
|
|
|
this.loading = false; |
|
|
|
|
this.selectionClear(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 视频联动按钮 |
|
|
|
|
linkVideo() { |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
this.videoData = [ |
|
|
|
|
{ id: '001', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '002', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '003', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '004', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '005', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '006', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '007', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
{ id: '008', url: 'cdcdcdcd', name: '视频一' }, |
|
|
|
|
] |
|
|
|
|
linkVideo(row) { |
|
|
|
|
let token = window.sessionStorage.getItem('bizToken'); |
|
|
|
|
if (token == 'undefined' || !token) { |
|
|
|
|
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => { |
|
|
|
|
window.sessionStorage.setItem('bizToken', res.data.data.token); |
|
|
|
|
bizDeviceList(res.data.data.token, { 'params[pmac]': row.deviceId }).then(res2 => { |
|
|
|
|
const data = res2.data; |
|
|
|
|
this.videoData = data.rows; |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
bizDeviceList(token, { 'params[pmac]': row.deviceId }).then(res2 => { |
|
|
|
|
if (res2.data.code == 401) { |
|
|
|
|
window.sessionStorage.removeItem('bizToken'); |
|
|
|
|
this.linkVideo(row); |
|
|
|
|
} |
|
|
|
|
else if (res2.data.code == 200) { |
|
|
|
|
const data = res2.data; |
|
|
|
|
this.videoData = data.rows; |
|
|
|
|
this.dialogVisible = true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 导出 |
|
|
|
|
handleExport() { |
|
|
|
|
|