提交代码 20231221954

main
jinna 2 years ago
parent 1df8b976c1
commit 7aa283ebdf
  1. 21
      src/api/alarm/alarm.js
  2. 10
      src/router/views/index.js
  3. 214
      src/views/alarmList/index.vue
  4. 132
      src/views/alarmcenter/index.vue
  5. 10
      src/views/alarmcenter/sosAlarm/list.vue
  6. 60
      src/views/h5Player/player.vue
  7. 30
      src/views/map/index.vue
  8. 8
      src/views/wirelessintrusion/deployment/list.vue
  9. 8
      src/views/wirelessintrusion/oneClick/list.vue
  10. 134
      src/views/wirelessintrusion/warn/record.vue
  11. 39
      vocalldemo/report.html

@ -48,3 +48,24 @@ export const getAlarm = (query) => {
params: query,
});
};
// 获取故障报警记录
export const getAlarmList = (query) => {
return request({
url: "/api/appData/list",
method: "get",
params: query,
});
};
// 故障上报处理
export const disposeAlarm = (data) => {
return request({
url: "/api/appData/handle",
method: "post",
headers: {
"Content-Type": "application/json;charset=UTF-8",
},
data,
});
};

@ -155,4 +155,14 @@ export default [
isAuth: false,
},
},
{
path: "/alarmList",
name: "诊间报警列表",
component: () =>
import(/* webpackChunkName: "views" */ "@/views/alarmList/index"),
meta: {
isTab: false,
isAuth: false,
},
},
];

@ -0,0 +1,214 @@
<template>
<!-- 图纸分类管理 -->
<basic-container>
<div style="font-size: 28px;margin-bottom: 20px;">故障上报列表</div>
<el-row>
<el-col :span="24">
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange"
@on-load="onLoad" :page.sync="page" @row-save="rowSave" @row-del="rowDel" @row-update="rowUpdate">
<template slot-scope="scope" slot="ipSearch">
<el-input v-model="ip" placeholder="故障上报IP" clearable />
</template>
<template slot-scope="scope" slot="isDeplaySearch">
<el-select v-model="isDeplay" placeholder="是否已处理">
<el-option label="未处理" :value="1"></el-option>
<el-option label="已处理" :value="2"></el-option>
</el-select>
</template>
<template slot-scope="scope" slot="dateRangeSearch">
<el-date-picker v-model="dateRange" type="daterange" placeholder="选择日期"
value-format="yyyy-MM-dd" format="yyyy-MM-dd" start-placeholder="开始日期"
end-placeholder="结束日期">>
</el-date-picker>
</template>
<template slot="status" slot-scope="scope">
<el-tag v-if="scope.row.status == 2" type="success">已处理</el-tag>
<el-tag v-if="scope.row.status == 1" type="danger">未处理</el-tag>
</template>
<template slot-scope="{type,size,row}" slot="menu">
<el-button :disabled="row.status == 2" :size="size" :type="type" @click="handleDispose(row)">处理</el-button>
</template>
</avue-crud>
</el-col>
</el-row>
</basic-container>
</template>
<script>
import {getAlarmList,disposeAlarm} from "@/api/alarm/alarm"
export default{
data(){
return {
area: "1",
equipName:'',
page: {
pageSize: 10,
currentPage: 1,
total: 0,
},
ip:'',
isDeplay:'',
dateRange:[],
option: {
lazy: true,
tip: false,
searchLabelWidth: 80,
searchShow: true,
searchMenuSpan: 6,
tree: true,
border: true,
index: true,
dialogClickModal: false,
viewBtn: false,
addBtn:false,
editBtn:false,
delBtn:false,
menu: true,
column: [
{
label: "故障上报IP",
prop: "deviceId",
align: "center",
},
{
label: "故障上报IP",
prop: "ip",
searchLabelWidth:100,
align: "center",
search: true,
searchslot: true,
type: "select",
hide: true,
row: false,
display: false,
viewDisplay: false,
},
{
label: "故障详情",
prop: "content",
align: "center",
},
{
label: "是否已处理",
prop: "status",
align: "center",
rules: [{
required: true,
message: "请输入分类名称",
trigger: "blur"
}]
},
{
label: "是否已处理",
searchLabelWidth:100,
prop: "isDeplay",
searchslot: true,
search: true,
type: "select",
hide: true,
row: false,
display: false,
viewDisplay: false,
},
{
label: "故障上报时间",
prop: "createTime",
align: "center",
addDisplay:false,
editDisplay:false
},
{
label: "日期范围",
prop: "dateRange",
type: 'datetimerange',
searchslot: true,
searchRange: true,
hide: true,
search: true,
row: false,
display: false,
viewDisplay: false,
},
],
},
data:[],
loading:false
}
},
created(){},
methods:{
searchChange(params, done) {
this.page.currentPage = 1;
this.onLoad();
done();
},
searchReset() {
this.ip = ''
this.isDeplay = ''
this.dateRange = []
this.page.currentPage = 1;
this.onLoad(this.page);
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad();
},
onLoad() {
let params = {}
if(this.dateRange.length == 0){
params = {
deviceId:this.ip ? this.ip : null,
status:this.isDeplay ? this.isDeplay : null,
current:this.page.currentPage,
size:this.page.pageSize,
type:5
}
}else{
params = {
deviceId:this.ip ? this.ip : null,
status:this.isDeplay ? this.isDeplay : null,
current:this.page.currentPage,
size:this.page.pageSize,
type:5,
startTime:this.dateRange[0] + ' 00:00:00',
endTime:this.dateRange[1] + ' 23:59:59'
}
}
this.loading = true;
getAlarmList(params).then(res =>{
this.data = res.data.data.records;
this.page.total = res.data.data.total;
this.loading = false
})
},
handleDispose(val){
console.log('val ====>',val)
this.$confirm('确定处理该故障?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let tmp = {id:val.id,status:2}
console.log(JSON.stringify(tmp))
disposeAlarm(JSON.stringify(tmp)).then(res =>{
console.log('res ====>',res)
if(res.data.code == 200){
this.$message.success('处理成功')
this.onLoad()
}
})
})
},
},
}
</script>
<style lang="scss" scoped></style>

@ -239,68 +239,78 @@ export default {
},
//
linkVideo(row) {
let token = window.sessionStorage.getItem('bizToken');
if (token == 'undefined' || !token) {
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
if(res.status == 200){
if(res.data.code == 0){
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;
if(this.videoData.length === 0){
this.$message.warning('未查询到该报警点摄像头');
}
else{
// this.dialogVisible = true;
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
}
});
}else{
this.$message.error('物联网平台访问超时!')
}
}else{
this.$message.error('物联网平台访问超时!')
}
this.videoData = row.cameraCode
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
// let token = window.sessionStorage.getItem('bizToken');
// if (token == 'undefined' || !token) {
// bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
// if(res.status == 200){
// if(res.data.code == 0){
// 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;
// if(this.videoData.length === 0){
// this.$message.warning('');
// }
// else{
// // this.dialogVisible = true;
// const routeData = this.$router.resolve({
// path: '/videoPlayer', //
// query: {
// list: JSON.stringify(this.videoData), //
// showLeft:true
// }
// })
// console.log('href ===>',routeData.href)
// window.open(routeData.href, '_blank')
// }
// });
// }else{
// this.$message.error('访')
// }
// }else{
// this.$message.error('访')
// }
})
} 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;
if(this.videoData.length === 0){
this.$message.warning('未查询到该报警点摄像头');
}
else{
// this.dialogVisible = true;
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
}
}else{
this.$message.error('物联网平台访问超时!')
}
});
}
// })
// } 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;
// if(this.videoData.length === 0){
// this.$message.warning('');
// }
// else{
// // this.dialogVisible = true;
// const routeData = this.$router.resolve({
// path: '/videoPlayer', //
// query: {
// list: JSON.stringify(this.videoData), //
// showLeft:true
// }
// })
// console.log('href ===>',routeData.href)
// window.open(routeData.href, '_blank')
// }
// }else{
// this.$message.error('访')
// }
// });
// }
},
renderCode(tags) {
let obj = JSON.parse(tags);

@ -444,6 +444,16 @@ export default {
}
});
}
// this.videoData = row.cameraCode
// const routeData = this.$router.resolve({
// path: '/videoPlayer', //
// query: {
// list: JSON.stringify(this.videoData), //
// showLeft:true
// }
// })
// console.log('href ===>',routeData.href)
// window.open(routeData.href, '_blank')
},
//
handleExport() {

@ -165,36 +165,52 @@ export default {
showLeft:true,
videoList:[],
isOrder:false,
code:''
};
},
created() {
// this.qrcodeData1 = this.$route.query.category
// console.log('list ===============>',JSON.parse(this.$route.query.list), this.$route.query.showLeft)
// console.log('list ===>',this.list)
this.list = JSON.parse(this.$route.query.list);
// // this.qrcodeData1 = this.$route.query.category
// // console.log('list ===============>',JSON.parse(this.$route.query.list), this.$route.query.showLeft)
// // console.log('list ===>',this.list)
this.showLeft = this.$route.query.showLeft
this.cameraList = []
let isTags = this.list.find(item => item.tags)
if(isTags){
this.list.map(item =>{
console.log('code ====>',JSON.parse(item.tags).cameraIndexCode)
if(JSON.parse(item.tags).cameraCode){
if(JSON.parse(item.tags).cameraCode.indexOf('-') > -1){
JSON.parse(item.tags).cameraCode.split('-').map(item1=>{
this.cameraList.push({name:item.name,code:item1})
})
if(this.showLeft){
this.code = JSON.parse(this.$route.query.list);
this.cameraList = []
if(this.code != ''){
this.code.split('-').map(item1=>{
this.cameraList.push({name:'',code:item1})
})
}else{
this.cameraList = []
}
}else{
this.list = JSON.parse(this.$route.query.list);
this.showLeft = this.$route.query.showLeft
this.cameraList = []
let isTags = this.list.find(item => item.tags)
if(isTags){
this.list.map(item =>{
console.log('code ====>',JSON.parse(item.tags).cameraIndexCode)
if(JSON.parse(item.tags).cameraCode){
if(JSON.parse(item.tags).cameraCode.indexOf('-') > -1){
JSON.parse(item.tags).cameraCode.split('-').map(item1=>{
this.cameraList.push({name:item.name,code:item1})
})
}else{
this.cameraList.push({name:item.name,code:item.cameraCode})
}
}else{
this.cameraList.push({name:item.name,code:item.cameraCode})
}
}else{
this.cameraList.push({name:item.name,code:JSON.parse(item.tags).cameraIndexCode})
this.cameraList.push({name:item.name,code:JSON.parse(item.tags).cameraIndexCode})
}
})
}else{
this.cameraList = this.list
}
})
}else{
this.cameraList = this.list
}
}
console.log('cameraList =====>',this.cameraList)
// this.timeRange = [this.getYestDayOrNextDay() + ' 00:00:00',new Date().toLocaleString()]
// h5

@ -58,15 +58,17 @@ export default {
console.log('x ====>',this.x,'y ====>',this.y)
if(this.sn && this.floorNo && this.x && this.y) {
window.map._map.focusFloorId = this.floorNo;
coordinateToWGS84({ x:this.x, y:this.y, minX: 13439311, maxY:3667244.25 }).then(res => {
//
coordinateToWGS84({ x:this.x, y:this.y, minX: 13404877.3, maxY:4316313.34 }).then(res => {
console.log('res ====>',res)
// //
if(res.data.code == 200) {
var imagerMarker = new jsmapbase.JSImageMarker({
id: 'iamgeMareker1',//id
image: Img,//
position: new jsmapbase.JSPoint(res.data.data.lng, res.data.data.lat, 0),//
width: 55,//-
height: 55,//-
// position: {x: 120.73009403024408,y: 31.263550654413432,z: 0},//
width: 120,//-
height: 120,//-
floorId: this.floorNo,//id
offset: jsmapbase.JSControlPosition.RIGHT_BOTTOM,//
depthTest: false,//
@ -87,6 +89,26 @@ export default {
window.map.on('mapClickNode', event => {
console.log(map._map.focusFloorId, map._map.allLayers);
console.log('===========', event);
// var imagerMarker = new jsmapbase.JSImageMarker({
// id: 'iamgeMareker1',//id
// image: Img,//
// // position: new jsmapbase.JSPoint(res.data.data.lng, res.data.data.lat, 0),//
// // position: new jsmapbase.JSPoint(event.x,event.y, 0),//
// position: {x:event.x,y:event.y, z:0},//
// width: 120,//-
// height: 120,//-
// floorId: this.floorNo,//id
// offset: jsmapbase.JSControlPosition.RIGHT_BOTTOM,//
// depthTest: false,//
// show: true, //
// properties: {
// name: 'test'
// },//
// callback: (node) => {
// console.log(node);
// }//
// });
// window.map.addMarker(imagerMarker);
});
},
methods: {

@ -209,6 +209,14 @@ export default {
this.loadDict();
},
methods: {
handleSizeChange(val){
this.diaPage.pageSize = val
this.queryDeviceList(this.diaPage)
},
handleCurrentChange(val){
this.diaPage.currentPage = val
this.queryDeviceList(this.diaPage)
},
//
loadDict() {
let token = window.sessionStorage.getItem('bizToken');

@ -223,6 +223,14 @@ export default {
this.loadDict();
},
methods: {
handleSizeChange(val){
this.diaPage.pageSize = val
this.queryDeviceList(this.diaPage)
},
handleCurrentChange(val){
this.diaPage.currentPage = val
this.queryDeviceList(this.diaPage)
},
//
loadDict() {
let token = window.sessionStorage.getItem('bizToken');

@ -284,7 +284,7 @@ export default {
if (row.systemNum < 0) {
return;
}
warnSysClear({ id: row.id, systemNum: row.systemNum, hostSerialNumber: row.hostSerialNumber }).then(res => {
warnSysClear({ id: row.id, systemNum: row.systemNum, hostSerialNumber: row.hostSerialNumber,deviceId:row.deviceId}).then(res => {
this.onLoad(this.page);
this.$message({
type: "success",
@ -423,68 +423,78 @@ export default {
},
//
linkVideo(row) {
let token = window.sessionStorage.getItem('bizToken');
if (token == 'undefined' || !token) {
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
if(res.status == 200){
if(res.data.code == 0){
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;
if (this.videoData.length === 0) {
this.$message.warning('未查询到该报警点摄像头');
}
else {
// this.dialogVisible = true;
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
}
});
}else{
this.$message.error('物联网平台访问超时!')
}
}else{
this.$message.error('物联网平台访问超时!')
}
this.videoData = row.cameraCode
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
// let token = window.sessionStorage.getItem('bizToken');
// if (token == 'undefined' || !token) {
// bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
// if(res.status == 200){
// if(res.data.code == 0){
// 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;
// if (this.videoData.length === 0) {
// this.$message.warning('');
// }
// else {
// // this.dialogVisible = true;
// const routeData = this.$router.resolve({
// path: '/videoPlayer', //
// query: {
// list: JSON.stringify(this.videoData), //
// showLeft:true
// }
// })
// console.log('href ===>',routeData.href)
// window.open(routeData.href, '_blank')
// }
// });
// }else{
// this.$message.error('访')
// }
// }else{
// this.$message.error('访')
// }
})
} 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;
if (this.videoData.length === 0) {
this.$message.warning('未查询到该报警点摄像头');
}
else {
// this.dialogVisible = true;
const routeData = this.$router.resolve({
path: '/videoPlayer', //
query: {
list: JSON.stringify(this.videoData), //
showLeft:true
}
})
console.log('href ===>',routeData.href)
window.open(routeData.href, '_blank')
}
}else{
this.$message.error('物联网平台访问超时!')
}
});
}
// })
// } 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;
// if (this.videoData.length === 0) {
// this.$message.warning('');
// }
// else {
// // this.dialogVisible = true;
// const routeData = this.$router.resolve({
// path: '/videoPlayer', //
// query: {
// list: JSON.stringify(this.videoData), //
// showLeft:true
// }
// })
// console.log('href ===>',routeData.href)
// window.open(routeData.href, '_blank')
// }
// }else{
// this.$message.error('访')
// }
// });
// }
},
renderCode(tags) {
let obj = JSON.parse(tags);

@ -157,13 +157,44 @@
// const baseUrl = "http://152.136.119.150:81";//外网测试环境
//本地测试
// const baseUrl = "http://192.168.1.102:81";//本地测试环境-上报
// const iotBaseUrl = "http://182.139.182.190:60032";//物联网平台测试
const baseUrl = "http://192.168.1.34:81";//本地测试环境-上报
const iotBaseUrl = "http://182.139.182.190:60032";//物联网平台测试
//现场测试
const baseUrl = "http://171.16.8.51:81";//上报
const iotBaseUrl = "http://171.16.8.58:8080"//物联网平台环境
// const baseUrl = "http://171.16.8.51:81";//上报
// const iotBaseUrl = "http://171.16.8.58:8080"//物联网平台环境
//上报报警
document.getElementById('alarmBtn').onclick = function () {
reportIot();
reportSaveIot();
}
//报警信息上报
function reportSaveIot() {
let ip = $('#ip').val();
if(ip == '') {
layer.msg('未成功获取本机IP,请联系运维人员');
return;
}
let txt = $('#volTxt').val()
let formdata = new FormData();
formdata.append('type', '5');
formdata.append('deviceId', ip);
formdata.append('content', txt);
var loadingIndex = layer.load(0, {shade: false});
$.ajax({
url: baseUrl + "/appData/putFile", type: "post", contentType: false, processData: false,
timeout: 6000, dataType: 'json', data: formdata, success: function (res) {
layer.close(loadingIndex);
if (res.code === 200) {
console.log('上报成功');
reportIot();
}else{
layer.msg('报警失败,请联系运维人员');
}
},error: function() {
layer.close(loadingIndex);
layer.msg('报警失败,请联系运维人员');
}
});
}
//报警信息上报

Loading…
Cancel
Save