|
@@ -37,13 +37,14 @@ import { getDahuaVideoServer, getTVWallList } from '@/api/dahua/dahua'
|
|
|
import { tvCameraList } from '@/api/haikang/haikang'
|
|
|
import DHWs from '@/dahua/lib/DHWs'
|
|
|
import { rotation } from '@/api/monitor'
|
|
|
+
|
|
|
+
|
|
|
/** ----------------------------------摄像头预览结束------------------------------------- */
|
|
|
export default {
|
|
|
dicts: ['event_source'],
|
|
|
components: {},
|
|
|
data() {
|
|
|
return {
|
|
|
- array:[],
|
|
|
tvListJson: [
|
|
|
{
|
|
|
'switchTab': '1',
|
|
@@ -282,22 +283,9 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- playRealMonitorVideo(array) { // 自定义设备树自动播放指定通道编码视频
|
|
|
- const config = this.ws.config
|
|
|
- const { loginIp, userCode } = config
|
|
|
- this.ws.postMessage('playRealMonitorVideo', {
|
|
|
- loginIp,
|
|
|
- userCode,
|
|
|
- params: {
|
|
|
- ctrlCode: "ctrl1",
|
|
|
- array: array
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
//火点联动电视墙调用
|
|
|
showTVWall1(longitude,latitude,tvListJson) {
|
|
|
+
|
|
|
// let that=this;
|
|
|
/** ----------------------------------大华摄像头预览开始------------------------------------- */
|
|
|
this.ws.addEventListener('connectStateChange', data => {
|
|
@@ -333,17 +321,20 @@ export default {
|
|
|
console.log(tvListJson)
|
|
|
const array=[]
|
|
|
const array1=[]
|
|
|
- tvListJson[0].treeLabels.forEach((item,index)=>
|
|
|
+ if (tvListJson!=null)
|
|
|
{
|
|
|
- if (index!=0)
|
|
|
+ tvListJson[0].treeLabels.forEach((item,index)=>
|
|
|
{
|
|
|
- const param =Object.assign({})
|
|
|
- param.channelId=item.labelCode
|
|
|
- array.push(param)
|
|
|
- array1.push(item.labelCode)
|
|
|
- }
|
|
|
-
|
|
|
- })
|
|
|
+ if (index!=0)
|
|
|
+ {
|
|
|
+ const param =Object.assign({})
|
|
|
+ param.channelId=item.labelCode
|
|
|
+ array.push(param)
|
|
|
+ array1.push(item.labelCode)
|
|
|
+ }
|
|
|
+
|
|
|
+ })
|
|
|
+ }
|
|
|
this.create1(longitude,latitude,tvListJson,array,array1)
|
|
|
// var obj=JSON.parse(tvListJson)
|
|
|
} else {
|
|
@@ -369,12 +360,6 @@ export default {
|
|
|
this.TVWallVisible = true
|
|
|
|
|
|
},
|
|
|
- rotation(lng,lat,list){
|
|
|
- rotation(lng,lat,list).then(res => {
|
|
|
- console.log(res)
|
|
|
-
|
|
|
- })
|
|
|
- },
|
|
|
create1(longitude,latitude,tvListJson,array,array1) { // 调用创建控件接口
|
|
|
let _this = this
|
|
|
const params = [
|
|
@@ -401,8 +386,32 @@ export default {
|
|
|
setTimeout(() => {
|
|
|
_this.rotation(longitude,latitude,array1)
|
|
|
}, 5000)
|
|
|
+
|
|
|
},
|
|
|
- showTVWall() {
|
|
|
+ playRealMonitorVideo(array) { // 自定义设备树自动播放指定通道编码视频
|
|
|
+ const config = this.ws.config
|
|
|
+ const { loginIp, userCode } = config
|
|
|
+ this.ws.postMessage('playRealMonitorVideo', {
|
|
|
+ loginIp,
|
|
|
+ userCode,
|
|
|
+ params: {
|
|
|
+ ctrlCode: "ctrl1",
|
|
|
+ array: array
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
+ rotation(lng,lat,list){
|
|
|
+ console.log(list)
|
|
|
+ rotation(lng,lat,list).then(res => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ showTVWall(tvListJson,bfArray) {
|
|
|
+ if(tvListJson){
|
|
|
+ this.preview(tvListJson,bfArray);
|
|
|
+ this.TVWallVisible = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
// let that=this;
|
|
|
/** ----------------------------------大华摄像头预览开始------------------------------------- */
|
|
|
this.ws.addEventListener('connectStateChange', data => {
|
|
@@ -440,7 +449,7 @@ export default {
|
|
|
this.$modal.msgWarning('请重新安装客户端')
|
|
|
},
|
|
|
/** 预览按钮操作 */
|
|
|
- preview() {
|
|
|
+ preview(tvListJson,bfArray) {
|
|
|
getTVWallList().then(newres => {
|
|
|
getDahuaVideoServer().then(newResponse => {
|
|
|
this.ws.detectConnectQt().then(res => {
|
|
@@ -464,7 +473,7 @@ export default {
|
|
|
if (res) {
|
|
|
this.alertLoginSuccess()
|
|
|
this.activePanel = 'key2'
|
|
|
- this.create(newres.data)
|
|
|
+ this.create(tvListJson?tvListJson:newres.data,bfArray)
|
|
|
} else {
|
|
|
this.alertLoginFailed()
|
|
|
}
|
|
@@ -477,8 +486,8 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
- create(tvListJson) { // 调用创建控件接口
|
|
|
- debugger
|
|
|
+ create(tvListJson,bfArray) { // 调用创建控件接口
|
|
|
+ // debugger
|
|
|
let _this = this
|
|
|
const params = [
|
|
|
{
|
|
@@ -500,7 +509,7 @@ export default {
|
|
|
this.setPos()
|
|
|
this.customizeTree(tvListJson);
|
|
|
let length = tvListJson[0].treeLabels.length > 4 ? 5 : tvListJson[0].treeLabels.length;
|
|
|
- const bfArray = [];
|
|
|
+ bfArray = [];
|
|
|
for (let i = 1; i < length; i++) {
|
|
|
bfArray.push({"channelId": tvListJson[0].treeLabels[i].labelCode})
|
|
|
}
|