修改PC端bug

main
jinna 2 years ago
parent 1148d41866
commit 457fa291ac
  1. 128
      src/api/rails/rails.js
  2. 79
      src/page/index/index.vue
  3. 8
      src/views/alarmcenter/index.vue
  4. 231
      src/views/alarmcenter/sosAlarm/list.vue
  5. 52
      src/views/components/h5Player/player.vue
  6. 9
      src/views/wirelessintrusion/device/list.vue
  7. 2
      src/views/wirelessintrusion/warn/record.vue

@ -1,126 +1,128 @@
import request from '@/router/axios';
import request from "@/router/axios";
const baseUrl = process.env.NODE_ENV === 'production' ? 'http://182.139.182.190:60032/prod-api' : 'http://182.139.182.190:60032/prod-api';
const baseUrl =
process.env.NODE_ENV === "production"
? "http://171.16.8.58:8080/prod-api"
: "http://182.139.182.190:60032/prod-api";
//围栏列表
export const getRailsList = (token, params) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/rail/page',
method: 'get',
url: baseUrl + "/api/electronicFencePlatform/rail/page",
method: "get",
headers: {
Authorization: token
Authorization: token,
},
params: params,
authorization: false
})
}
authorization: false,
});
};
//围栏详情
export const railsDetail = (token, id) => {
return request({
url: baseUrl + '/api/electronicFence/rails/' + id,
method: 'get',
url: baseUrl + "/api/electronicFence/rails/" + id,
method: "get",
headers: {
Authorization: token
Authorization: token,
},
authorization: false
})
}
authorization: false,
});
};
//围栏删除
export const railsDelete = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/deleteRail',
method: 'delete',
url: baseUrl + "/api/electronicFencePlatform/deleteRail",
method: "delete",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
//围栏新增
export const railsAdd = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/rail',
method: 'post',
url: baseUrl + "/api/electronicFencePlatform/rail",
method: "post",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
//围栏编辑
export const railsUpdate = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/editRail',
method: 'put',
url: baseUrl + "/api/electronicFencePlatform/editRail",
method: "put",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
//围栏使用
export const useRail = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/useRail',
method: 'put',
url: baseUrl + "/api/electronicFencePlatform/useRail",
method: "put",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
///////////////////////////////////////////////////////////////////////////////////////////
//电子区域列表
export const getRegionRailsList = (token, params) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/region/page',
method: 'get',
url: baseUrl + "/api/electronicFencePlatform/region/page",
method: "get",
headers: {
Authorization: token
Authorization: token,
},
params: params,
authorization: false
})
}
authorization: false,
});
};
//电子区域删除
export const regionDelete = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/deleteRegion',
method: 'delete',
url: baseUrl + "/api/electronicFencePlatform/deleteRegion",
method: "delete",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
//电子区域新增
export const regionAdd = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/region',
method: 'post',
url: baseUrl + "/api/electronicFencePlatform/region",
method: "post",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};
//电子区域编辑
export const regionUpdate = (token, data) => {
return request({
url: baseUrl + '/api/electronicFencePlatform/editRegion',
method: 'put',
url: baseUrl + "/api/electronicFencePlatform/editRegion",
method: "put",
headers: {
Authorization: token
Authorization: token,
},
data: data,
authorization: false
})
}
authorization: false,
});
};

@ -1,6 +1,6 @@
<template>
<div class="avue-contail" :class="{'avue--collapse':isCollapse}">
<audio style="display:none" controls id="play_audio" :muted="isMuted" :playsinline="isPlay">
<audio style="display:none;" controls id="play_audio" :muted="isMuted" :playsinline="isPlay">
<source src="~@/assets/audio/alarm.mp3" />
</audio>
<div class="avue-header">
@ -76,40 +76,40 @@
},
mounted() {
this.init();
if(!window.sessionStorage.getItem("click")){
this.$alert('请允许系统提示报警声音', '提示', {
confirmButtonText: '确定',
callback: action => {
window.sessionStorage.setItem("click", 1)
// socket
// if(!window.sessionStorage.getItem("click")){
// this.$alert('', '', {
// confirmButtonText: '',
// callback: action => {
// window.sessionStorage.setItem("click", 1)
// // socket
window.addEventListener('onmessageWS', this.getSocketData);
// this.timer = setInterval(() =>{
// this.getSocketData('222')
// },3000)
// setTimeout(() =>{
// clearInterval(this.timer)
// },6200)
}
});
}else{
window.sessionStorage.removeItem('click')
if(!window.sessionStorage.getItem("click")){
this.$alert('请允许系统提示报警声音', '提示', {
confirmButtonText: '确定',
callback: action => {
window.sessionStorage.setItem("click", 1)
// socket
window.addEventListener('onmessageWS', this.getSocketData);
// this.timer = setInterval(() =>{
// this.getSocketData('222')
// },3000)
// setTimeout(() =>{
// clearInterval(this.timer)
// },9200)
}
});
}
}
// this.timer = setInterval(() =>{
// this.getSocketData('222')
// },3000)
// setTimeout(() =>{
// clearInterval(this.timer)
// },6200)
// }
// });
// }else{
// window.sessionStorage.removeItem('click')
// if(!window.sessionStorage.getItem("click")){
// this.$alert('', '', {
// confirmButtonText: '',
// callback: action => {
// window.sessionStorage.setItem("click", 1)
// // socket
// window.addEventListener('onmessageWS', this.getSocketData);
// // this.timer = setInterval(() =>{
// // this.getSocketData('222')
// // },3000)
// // setTimeout(() =>{
// // clearInterval(this.timer)
// // },9200)
// }
// });
// }
// }
},
computed: mapGetters(["isMenu", "isLock", "isCollapse", "website", "menu"]),
props: [],
@ -134,7 +134,16 @@
// this.start++;
// this.isMuted = false,
// this.isPlay = true
// dom.play()
// var promise = dom.play();
// console.log('promise ====>',promise)
// // if(promise !== undefined) {
// // promise.then(function(){
// // //audio.play();
// // }).catch(function(){
// // //
// // })
// // }
// },2500 * i)
// }
// }

@ -102,7 +102,7 @@ export default {
dataType: "number",
slot: true,
prop: "type",
search: true,
// search: true,
},
{
label: "楼号",
@ -214,7 +214,8 @@ export default {
let values = {
...params,
...this.query,
alarmType: 1
alarmType: 1,
type:1103
};
if (releaseTimeRange) {
values = {
@ -286,6 +287,7 @@ export default {
...values,
startTime: this.queryreleaseTimeRange[0],
endTime: this.queryreleaseTimeRange[1],
type:1103
};
}
let params = '';
@ -298,7 +300,7 @@ export default {
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(`/api/alarmInformation/export?${this.website.tokenHeader}=${getToken()}${params}`).then(res => {
exportBlob(`/api/alarmInformation/export?${this.website.tokenHeader}=${getToken()}&deviceType=1103`).then(res => {
downloadXls(res.data, `报警数据表${dateNow()}.xlsx`);
NProgress.done();
})

@ -106,18 +106,24 @@ export default {
label: "设备类型",
prop: "productName",
},
// {
// label: "",
// type: "select",
// // dicUrl: "/api/blade-system/dict-biz/dictionary?code=alarm_message_condition",
// // props: {
// // label: "dictValue",
// // value: "dictKey"
// // },
// // dataType: "number",
// // slot: true,
// prop: "type",
// // search: true,
// },
{
label: "报警类型",
type: "select",
// dicUrl: "/api/blade-system/dict-biz/dictionary?code=alarm_message_condition",
// props: {
// label: "dictValue",
// value: "dictKey"
// },
// dataType: "number",
// slot: true,
prop: "type",
// search: true,
label: "报警信息",
prop: "content",
overHidden: true,
width: '200'
},
{
label: "楼号",
@ -135,12 +141,7 @@ export default {
span: 24,
hide: true
},
{
label: "报警信息",
prop: "content",
overHidden: true,
width: '200'
},
{
label: "上报时间",
prop: "reportTime",
@ -287,100 +288,65 @@ export default {
})
} else {
// console.log('ceshi2')
// this.videoData = [
// {
// "id":5,
// "sort":null,
// "version":null,
// "createTime":"2023-10-1410:59:40",
// "updateTime":"2023-10-1410:59:40",
// "delFlag":"0",
// "createUser":"client",
// "updateUser":"client",
// "buildId":206885,
// "departmentId":null,
// "name":"WLJK-13F-1-3",
// "sn":"",
// "ip":null,
// "brand":"",
// "httpPost":null,
// "serverPost":null,
// "userName":null,
// "password":null,
// "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.5/Streaming/Channels/101?transportmode=unicast",
// "rtspHistoryUrl":"",
// "rtspDateFormat":"",
// "rtspTimeFormat":"",
// "floorNo":"Floor13",
// "x":213832,
// "y":197192,
// "videoCode":"H265"
// },
// {
// "id":25,
// "sort":null,
// "version":null,
// "createTime":"2023-10-1516:07:07",
// "updateTime":"2023-10-1516:07:07",
// "delFlag":"0",
// "createUser":"client",
// "updateUser":"client",
// "buildId":206885,
// "departmentId":null,
// "name":"JK-13F-1-3",
// "sn":"",
// "ip":null,
// "brand":"",
// "httpPost":null,
// "serverPost":null,
// "userName":null,
// "password":null,
// "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.98/Streaming/Channels/101?transportmode=unicast",
// "rtspHistoryUrl":"",
// "rtspDateFormat":"",
// "rtspTimeFormat":"",
// "floorNo":"Floor13",
// "x":220432,
// "y":200450,
// "videoCode":"H265"
// },
// ]
// let arr = []
// this.videoData.map(item =>{
// arr.push(item.name)
// })
// let tmp = arr.join(',')
// console.log('tmp ===>',tmp)
// getCameraCode({keys:tmp}).then(res =>{
// console.log(res)
// // this.carmeraCode = res.data.data
// this.carmeraCode = [
// {code: "3904f09529de44ffadccaecce4397dcb",name: "JK-13F-1-3"},
// {code: "b9697af4dc0544cd85cc76811e08d371",name: "WLJK-13F-1-3"},
// ]
// if(this.carmeraCode.length === 0){
// this.$message.warning('');
// }else{
// this.dialogVisible = true;
// }
// })
getDeviceCamera(token, { sn: row.hostSerialNumber }).then(res2 => {
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.linkVideo(row);
}
else if (res2.data.code == 0) {
const data = res2.data;
this.videoData = data.data;
console.log('videoData11 ===>',this.videoData)
if(this.videoData.length === 0){
this.$message.warning('未查询到该报警点摄像头');
}
else{
// this.dialogVisible = true;
let arr = []
this.videoData = [
{
"id":5,
"sort":null,
"version":null,
"createTime":"2023-10-1410:59:40",
"updateTime":"2023-10-1410:59:40",
"delFlag":"0",
"createUser":"client",
"updateUser":"client",
"buildId":206885,
"departmentId":null,
"name":"WLJK-13F-1-3",
"sn":"",
"ip":null,
"brand":"",
"httpPost":null,
"serverPost":null,
"userName":null,
"password":null,
"rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.5/Streaming/Channels/101?transportmode=unicast",
"rtspHistoryUrl":"",
"rtspDateFormat":"",
"rtspTimeFormat":"",
"floorNo":"Floor13",
"x":213832,
"y":197192,
"videoCode":"H265"
},
{
"id":25,
"sort":null,
"version":null,
"createTime":"2023-10-1516:07:07",
"updateTime":"2023-10-1516:07:07",
"delFlag":"0",
"createUser":"client",
"updateUser":"client",
"buildId":206885,
"departmentId":null,
"name":"JK-13F-1-3",
"sn":"",
"ip":null,
"brand":"",
"httpPost":null,
"serverPost":null,
"userName":null,
"password":null,
"rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.98/Streaming/Channels/101?transportmode=unicast",
"rtspHistoryUrl":"",
"rtspDateFormat":"",
"rtspTimeFormat":"",
"floorNo":"Floor13",
"x":220432,
"y":200450,
"videoCode":"H265"
},
]
let arr = []
this.videoData.map(item =>{
arr.push(item.name)
})
@ -388,16 +354,51 @@ export default {
console.log('tmp ===>',tmp)
getCameraCode({keys:tmp}).then(res =>{
console.log(res)
this.carmeraCode = res.data.data
// this.carmeraCode = res.data.data
this.carmeraCode = [
{code: "3904f09529de44ffadccaecce4397dcb",name: "JK-13F-1-3"},
{code: "b9697af4dc0544cd85cc76811e08d371",name: "WLJK-13F-1-3"},
]
if(this.carmeraCode.length === 0){
this.$message.warning('未查询到该报警点摄像头');
}else{
this.dialogVisible = true;
}
})
}
}
});
// getDeviceCamera(token, { sn: row.hostSerialNumber }).then(res2 => {
// if (res2.data.code == 401) {
// window.sessionStorage.removeItem('bizToken');
// this.linkVideo(row);
// }
// else if (res2.data.code == 0) {
// const data = res2.data;
// this.videoData = data.data;
// console.log('videoData11 ===>',this.videoData)
// if(this.videoData.length === 0){
// this.$message.warning('');
// }
// else{
// // this.dialogVisible = true;
// let arr = []
// this.videoData.map(item =>{
// arr.push(item.name)
// })
// let tmp = arr.join(',')
// console.log('tmp ===>',tmp)
// getCameraCode({keys:tmp}).then(res =>{
// console.log(res)
// this.carmeraCode = res.data.data
// if(this.carmeraCode.length === 0){
// this.$message.warning('');
// }else{
// this.dialogVisible = true;
// }
// })
// }
// }
// });
}
},
//

@ -135,17 +135,35 @@ export default {
},
recordStartState: 0,
recordStartText: "录像",
timeRange:[]
timeRange:[],
cameraList:[]
};
},
created() {
console.log(this.getYestDayOrNextDay())
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 = this.list
}
// this.timeRange = [this.getYestDayOrNextDay() + ' 00:00:00',new Date().toLocaleString()]
// h5
setTimeout(() => {
this.init();
this.createPlayer();
this.arrangeWindow();
// this.arrangeWindow();
});
},
methods: {
@ -217,14 +235,22 @@ export default {
},
});
// _this.realplay();
this.splitNum =
this.list.length > 1
? 2
: this.list.length > 4
? 3
: this.list.length > 9
? 4
: 4;
this.arrangeWindow()
this.queryLive();
},
arrangeWindow() {
// const splitNum = this.splitNum;
console.log(this.splitNum)
console.log(this.player)
// console.log(this.player)
let splitNum = this.splitNum
let splitNum = Number(this.splitNum)
this.player.JS_ArrangeWindow(splitNum).then(
() => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) },
e => { console.error(e) }
@ -315,23 +341,15 @@ export default {
*/
//
queryLive() {
console.log("视频流查询", this.list);
console.log("视频流查询", this.cameraList);
let playUrlList = [];
this.list.map((code, index) => {
this.cameraList.map((code, index) => {
// console.log('code ===>',code.tags ? JSON.parse(code.tags).cameraIndexCode : code.code)
queryLivePreview({ cameraIndexCode: code.tags ? JSON.parse(code.tags).cameraIndexCode : code.code }).then((res) => {
queryLivePreview({ cameraIndexCode: code.code }).then((res) => {
console.log('res ====>',res)
if (res.data.code === 0 || res.data.code == 200) {
playUrlList.push({name:code.name, code: code.tags ? JSON.parse(code.tags).cameraIndexCode : code.code, url: res.data.data });
this.playUrlList = playUrlList;
this.splitNum =
this.playUrlList.length > 1
? 2
: this.playUrlList.length > 4
? 3
: this.playUrlList.length > 9
? 4
: 4;
this.realplay(index, res.data.data);
}
// else{

@ -373,11 +373,13 @@ export default {
let tags = JSON.parse(item.tags);
item.buildingNo = tags.buildingNo;
item.floorNo = tags.floorNo;
item.xy = tags.lng + ',' + tags.lat;
// console.log('tags ====>',tags)
item.xy = tags.coordinate.replace('-',',');
item.position = tags.buildingNo + '号楼' + tags.floorNo + '层' + tags.address;
}
})
this.data = data.rows;
console.log('data ====>',data)
this.loading = false;
}, () => {
this.loading = false;
@ -406,11 +408,14 @@ export default {
let tags = JSON.parse(item.tags);
item.buildingNo = tags.buildingNo;
item.floorNo = tags.floorNo;
item.xy = tags.lng + ',' + tags.lat;
// item.xy = tags.lng + ',' + tags.lat;
item.xy = tags.coordinate.replace('-',',');
item.position = tags.buildingNo + '号楼' + tags.floorNo + '层' + tags.address;
}
})
this.data = data.rows;
console.log('data ====>',this.data)
}
}, () => {
this.loading = false;

@ -20,7 +20,7 @@
消警
</el-button>
<el-button @click="linkVideo(row, index)" type="text" icon="el-icon-video-camera-solid" size="small"
:disabled="row.cancelTime == ''">
:disabled="row.cancelTime == ''" v-if="row.type == '1103'">
视频联动
</el-button>
</template>

Loading…
Cancel
Save