|
@ -1,12 +1,17 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="page-main">
|
3
|
3
|
<t-button-group class="top-btn">
|
4
|
|
<t-button v-for="(item,index) in sceneList" :key="index" :value="item.monitorSceneId" :color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'" @click="tabClick(item.monitorSceneId)">{{ item.monitorSceneName }}</t-button>
|
|
4
|
<t-button v-for="(item,index) in sceneList" :key="index"
|
|
5
|
:value="item.monitorSceneId"
|
|
6
|
:color="item.monitorSceneId === selectedMonitorScene ? 'primary' : 'secondary'"
|
|
7
|
@click="tabClick(item.monitorSceneId)">
|
|
8
|
{{ item.monitorSceneName }}
|
|
9
|
</t-button>
|
5
|
10
|
</t-button-group>
|
6
|
11
|
<div class="page-top">
|
7
|
12
|
<span>风场:</span>
|
8
|
13
|
<t-select v-model="gateFieldData" clearable @change="getSceneList()">
|
9
|
|
<t-option v-for="(item,index) in organizationList" :key="index" :value="item.organizationId">{{ item.monitorSceneTypeName }}</t-option>
|
|
14
|
<t-option v-for="(item,index) in organizationList" :key="index" :value="item.id">{{ item.name }}</t-option>
|
10
|
15
|
</t-select>
|
11
|
16
|
</div>
|
12
|
17
|
<div class="page-bottom">
|
|
@ -54,10 +59,9 @@ export default {
|
54
|
59
|
limit: 10
|
55
|
60
|
},
|
56
|
61
|
organizationList: [], // 风场数据
|
57
|
|
gateFieldData: 101101,
|
|
62
|
gateFieldData: '',
|
58
|
63
|
videoList: [], // 场景数据列表
|
59
|
64
|
sceneList: [], // 场景列表
|
60
|
|
totalList: [], // 所有风场数据列表
|
61
|
65
|
selectedMonitorScene: '', // 当前选择场景
|
62
|
66
|
videoPlayList: [],
|
63
|
67
|
showReplayDialog: false,
|
|
@ -82,11 +86,16 @@ export default {
|
82
|
86
|
// 获取场景列表
|
83
|
87
|
getSceneList () {
|
84
|
88
|
this.sceneList = []
|
85
|
|
for (let i = 0; i < this.totalList.length; i++) {
|
86
|
|
if (this.totalList[i].organizationId === this.gateFieldData) {
|
87
|
|
this.sceneList.push(this.totalList[i])
|
|
89
|
this.videoList = []
|
|
90
|
console.log(this.organizationList)
|
|
91
|
this.organizationList.forEach((element, index) => {
|
|
92
|
if (element.id === this.gateFieldData) {
|
|
93
|
sysapi.getMonitorScene(this.organizationList[index].id).then((resp) => {
|
|
94
|
this.sceneList = resp.data.data || []
|
|
95
|
this.tabClick(this.sceneList[0].monitorSceneId)
|
|
96
|
})
|
88
|
97
|
}
|
89
|
|
}
|
|
98
|
})
|
90
|
99
|
},
|
91
|
100
|
// 向服务器发送请求获取视频回放数据
|
92
|
101
|
async queryMonitorVideoLog (data) {
|
|
@ -119,18 +128,11 @@ export default {
|
119
|
128
|
this.getVideoSurveillanceData(id)
|
120
|
129
|
},
|
121
|
130
|
// 获取风场下拉框列表
|
122
|
|
getWindFiledList () {
|
123
|
|
sysapi.getMonitorScene().then(resp => {
|
124
|
|
let arr = resp.data.data
|
125
|
|
this.totalList = arr
|
126
|
|
for (let i = 0; i < arr.length; i++) {
|
127
|
|
for (let j = i + 1; j < arr.length; j++) {
|
128
|
|
if (arr[i].monitorSceneTypeName === arr[j].monitorSceneTypeName) {
|
129
|
|
++i
|
130
|
|
}
|
131
|
|
}
|
132
|
|
this.organizationList.push(arr[i])
|
133
|
|
}
|
|
131
|
async getWindFiledList () {
|
|
132
|
sysapi.getDepartments().then(resp => {
|
|
133
|
this.organizationList = resp.data.data
|
|
134
|
this.gateFieldData = this.organizationList[0].id
|
|
135
|
this.getSceneList()
|
134
|
136
|
}, err => {
|
135
|
137
|
this.$Message.danger('获取风场列表失败!')
|
136
|
138
|
console.log(err)
|