修改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) => { export const getRailsList = (token, params) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/rail/page', url: baseUrl + "/api/electronicFencePlatform/rail/page",
method: 'get', method: "get",
headers: { headers: {
Authorization: token Authorization: token,
}, },
params: params, params: params,
authorization: false authorization: false,
}) });
} };
//围栏详情 //围栏详情
export const railsDetail = (token, id) => { export const railsDetail = (token, id) => {
return request({ return request({
url: baseUrl + '/api/electronicFence/rails/' + id, url: baseUrl + "/api/electronicFence/rails/" + id,
method: 'get', method: "get",
headers: { headers: {
Authorization: token Authorization: token,
}, },
authorization: false authorization: false,
}) });
} };
//围栏删除 //围栏删除
export const railsDelete = (token, data) => { export const railsDelete = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/deleteRail', url: baseUrl + "/api/electronicFencePlatform/deleteRail",
method: 'delete', method: "delete",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
//围栏新增 //围栏新增
export const railsAdd = (token, data) => { export const railsAdd = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/rail', url: baseUrl + "/api/electronicFencePlatform/rail",
method: 'post', method: "post",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
//围栏编辑 //围栏编辑
export const railsUpdate = (token, data) => { export const railsUpdate = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/editRail', url: baseUrl + "/api/electronicFencePlatform/editRail",
method: 'put', method: "put",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
//围栏使用 //围栏使用
export const useRail = (token, data) => { export const useRail = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/useRail', url: baseUrl + "/api/electronicFencePlatform/useRail",
method: 'put', method: "put",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
//电子区域列表 //电子区域列表
export const getRegionRailsList = (token, params) => { export const getRegionRailsList = (token, params) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/region/page', url: baseUrl + "/api/electronicFencePlatform/region/page",
method: 'get', method: "get",
headers: { headers: {
Authorization: token Authorization: token,
}, },
params: params, params: params,
authorization: false authorization: false,
}) });
} };
//电子区域删除 //电子区域删除
export const regionDelete = (token, data) => { export const regionDelete = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/deleteRegion', url: baseUrl + "/api/electronicFencePlatform/deleteRegion",
method: 'delete', method: "delete",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
//电子区域新增 //电子区域新增
export const regionAdd = (token, data) => { export const regionAdd = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/region', url: baseUrl + "/api/electronicFencePlatform/region",
method: 'post', method: "post",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };
//电子区域编辑 //电子区域编辑
export const regionUpdate = (token, data) => { export const regionUpdate = (token, data) => {
return request({ return request({
url: baseUrl + '/api/electronicFencePlatform/editRegion', url: baseUrl + "/api/electronicFencePlatform/editRegion",
method: 'put', method: "put",
headers: { headers: {
Authorization: token Authorization: token,
}, },
data: data, data: data,
authorization: false authorization: false,
}) });
} };

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

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

@ -106,18 +106,24 @@ export default {
label: "设备类型", label: "设备类型",
prop: "productName", 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: "报警类型", label: "报警信息",
type: "select", prop: "content",
// dicUrl: "/api/blade-system/dict-biz/dictionary?code=alarm_message_condition", overHidden: true,
// props: { width: '200'
// label: "dictValue",
// value: "dictKey"
// },
// dataType: "number",
// slot: true,
prop: "type",
// search: true,
}, },
{ {
label: "楼号", label: "楼号",
@ -135,12 +141,7 @@ export default {
span: 24, span: 24,
hide: true hide: true
}, },
{
label: "报警信息",
prop: "content",
overHidden: true,
width: '200'
},
{ {
label: "上报时间", label: "上报时间",
prop: "reportTime", prop: "reportTime",
@ -287,100 +288,65 @@ export default {
}) })
} else { } else {
// console.log('ceshi2') // console.log('ceshi2')
// this.videoData = [ this.videoData = [
// { {
// "id":5, "id":5,
// "sort":null, "sort":null,
// "version":null, "version":null,
// "createTime":"2023-10-1410:59:40", "createTime":"2023-10-1410:59:40",
// "updateTime":"2023-10-1410:59:40", "updateTime":"2023-10-1410:59:40",
// "delFlag":"0", "delFlag":"0",
// "createUser":"client", "createUser":"client",
// "updateUser":"client", "updateUser":"client",
// "buildId":206885, "buildId":206885,
// "departmentId":null, "departmentId":null,
// "name":"WLJK-13F-1-3", "name":"WLJK-13F-1-3",
// "sn":"", "sn":"",
// "ip":null, "ip":null,
// "brand":"", "brand":"",
// "httpPost":null, "httpPost":null,
// "serverPost":null, "serverPost":null,
// "userName":null, "userName":null,
// "password":null, "password":null,
// "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.5/Streaming/Channels/101?transportmode=unicast", "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.5/Streaming/Channels/101?transportmode=unicast",
// "rtspHistoryUrl":"", "rtspHistoryUrl":"",
// "rtspDateFormat":"", "rtspDateFormat":"",
// "rtspTimeFormat":"", "rtspTimeFormat":"",
// "floorNo":"Floor13", "floorNo":"Floor13",
// "x":213832, "x":213832,
// "y":197192, "y":197192,
// "videoCode":"H265" "videoCode":"H265"
// }, },
// { {
// "id":25, "id":25,
// "sort":null, "sort":null,
// "version":null, "version":null,
// "createTime":"2023-10-1516:07:07", "createTime":"2023-10-1516:07:07",
// "updateTime":"2023-10-1516:07:07", "updateTime":"2023-10-1516:07:07",
// "delFlag":"0", "delFlag":"0",
// "createUser":"client", "createUser":"client",
// "updateUser":"client", "updateUser":"client",
// "buildId":206885, "buildId":206885,
// "departmentId":null, "departmentId":null,
// "name":"JK-13F-1-3", "name":"JK-13F-1-3",
// "sn":"", "sn":"",
// "ip":null, "ip":null,
// "brand":"", "brand":"",
// "httpPost":null, "httpPost":null,
// "serverPost":null, "serverPost":null,
// "userName":null, "userName":null,
// "password":null, "password":null,
// "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.98/Streaming/Channels/101?transportmode=unicast", "rtspRealTimeUrl":"rtsp://admin:qlyy123456@171.16.234.98/Streaming/Channels/101?transportmode=unicast",
// "rtspHistoryUrl":"", "rtspHistoryUrl":"",
// "rtspDateFormat":"", "rtspDateFormat":"",
// "rtspTimeFormat":"", "rtspTimeFormat":"",
// "floorNo":"Floor13", "floorNo":"Floor13",
// "x":220432, "x":220432,
// "y":200450, "y":200450,
// "videoCode":"H265" "videoCode":"H265"
// }, },
// ] ]
// let arr = [] 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.map(item =>{ this.videoData.map(item =>{
arr.push(item.name) arr.push(item.name)
}) })
@ -388,16 +354,51 @@ export default {
console.log('tmp ===>',tmp) console.log('tmp ===>',tmp)
getCameraCode({keys:tmp}).then(res =>{ getCameraCode({keys:tmp}).then(res =>{
console.log(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){ if(this.carmeraCode.length === 0){
this.$message.warning('未查询到该报警点摄像头'); this.$message.warning('未查询到该报警点摄像头');
}else{ }else{
this.dialogVisible = true; 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, recordStartState: 0,
recordStartText: "录像", recordStartText: "录像",
timeRange:[] timeRange:[],
cameraList:[]
}; };
}, },
created() { 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()] // this.timeRange = [this.getYestDayOrNextDay() + ' 00:00:00',new Date().toLocaleString()]
// h5 // h5
setTimeout(() => { setTimeout(() => {
this.init(); this.init();
this.createPlayer(); this.createPlayer();
this.arrangeWindow(); // this.arrangeWindow();
}); });
}, },
methods: { methods: {
@ -217,14 +235,22 @@ export default {
}, },
}); });
// _this.realplay(); // _this.realplay();
this.splitNum =
this.list.length > 1
? 2
: this.list.length > 4
? 3
: this.list.length > 9
? 4
: 4;
this.arrangeWindow()
this.queryLive(); this.queryLive();
}, },
arrangeWindow() { arrangeWindow() {
// const splitNum = this.splitNum; // 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( this.player.JS_ArrangeWindow(splitNum).then(
() => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) }, () => { console.log(`arrangeWindow to ${splitNum}x${splitNum} success`) },
e => { console.error(e) } e => { console.error(e) }
@ -315,23 +341,15 @@ export default {
*/ */
// //
queryLive() { queryLive() {
console.log("视频流查询", this.list); console.log("视频流查询", this.cameraList);
let playUrlList = []; let playUrlList = [];
this.list.map((code, index) => { this.cameraList.map((code, index) => {
// console.log('code ===>',code.tags ? JSON.parse(code.tags).cameraIndexCode : code.code) // 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) console.log('res ====>',res)
if (res.data.code === 0 || res.data.code == 200) { 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 }); playUrlList.push({name:code.name, code: code.tags ? JSON.parse(code.tags).cameraIndexCode : code.code, url: res.data.data });
this.playUrlList = playUrlList; 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); this.realplay(index, res.data.data);
} }
// else{ // else{

@ -373,11 +373,13 @@ export default {
let tags = JSON.parse(item.tags); let tags = JSON.parse(item.tags);
item.buildingNo = tags.buildingNo; item.buildingNo = tags.buildingNo;
item.floorNo = tags.floorNo; 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; item.position = tags.buildingNo + '号楼' + tags.floorNo + '层' + tags.address;
} }
}) })
this.data = data.rows; this.data = data.rows;
console.log('data ====>',data)
this.loading = false; this.loading = false;
}, () => { }, () => {
this.loading = false; this.loading = false;
@ -406,11 +408,14 @@ export default {
let tags = JSON.parse(item.tags); let tags = JSON.parse(item.tags);
item.buildingNo = tags.buildingNo; item.buildingNo = tags.buildingNo;
item.floorNo = tags.floorNo; 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; item.position = tags.buildingNo + '号楼' + tags.floorNo + '层' + tags.address;
} }
}) })
this.data = data.rows; this.data = data.rows;
console.log('data ====>',this.data)
} }
}, () => { }, () => {
this.loading = false; this.loading = false;

@ -20,7 +20,7 @@
消警 消警
</el-button> </el-button>
<el-button @click="linkVideo(row, index)" type="text" icon="el-icon-video-camera-solid" size="small" <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> </el-button>
</template> </template>

Loading…
Cancel
Save