|
@@ -3,7 +3,7 @@
|
|
<view class="earlyWarning">
|
|
<view class="earlyWarning">
|
|
<scroll-view scroll-x @scrolltolower="scrollGet" class="header">
|
|
<scroll-view scroll-x @scrolltolower="scrollGet" class="header">
|
|
<view class="tabTitle_tow">
|
|
<view class="tabTitle_tow">
|
|
- <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index" v-for="(item,index) in tabTextTow">
|
|
|
|
|
|
+ <view class="tabTitle_tow_li" @tap="tabClickTow(item,index)" :key="index" v-for="(item,index) in videoHardwareList">
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_text">{{item.name}}</view>
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
|
|
<view :class="{on:curTabTow==index}" class="tabTitle_tow_across"></view>
|
|
</view>
|
|
</view>
|
|
@@ -48,7 +48,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { config } from '@/api/request/config.js'
|
|
import { config } from '@/api/request/config.js'
|
|
-import {laboratoryInfo,getCameraByFloor,GetStartList,getDeviceListBySub} from '@/api/index.js'
|
|
|
|
|
|
+import {laboratoryInfo,getCameraByFloor,GetStartList,getDeviceListBySub,sparseHardwareList} from '@/api/index.js'
|
|
export default {
|
|
export default {
|
|
name: "rectifyList",
|
|
name: "rectifyList",
|
|
components: {
|
|
components: {
|
|
@@ -67,8 +67,10 @@ export default {
|
|
liveType: false,
|
|
liveType: false,
|
|
sendLock: true, //发送锁,当为true时上锁,false时解锁发送
|
|
sendLock: true, //发送锁,当为true时上锁,false时解锁发送
|
|
recorderManager: wx.getRecorderManager(),
|
|
recorderManager: wx.getRecorderManager(),
|
|
|
|
+ videoHardwareList:[],//获取所有摄像头编码
|
|
|
|
+ hardwareList:[],//硬件列表
|
|
subId:'96',
|
|
subId:'96',
|
|
- floorId:'5',
|
|
|
|
|
|
+ floorId:'58',
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -83,13 +85,16 @@ export default {
|
|
},
|
|
},
|
|
mounted(){
|
|
mounted(){
|
|
|
|
|
|
- this.laboratoryInfo()
|
|
|
|
- this.getDeviceList()
|
|
|
|
|
|
+ //this.laboratoryInfo()
|
|
|
|
+ //this.getDeviceList()
|
|
|
|
+ //this.getCameraByFloor()
|
|
|
|
+ this.sparseHardwareList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//顶部tab点击
|
|
//顶部tab点击
|
|
tabClickTow(item,index) {
|
|
tabClickTow(item,index) {
|
|
this.curTabTow = index;
|
|
this.curTabTow = index;
|
|
|
|
+ this.GetStartList(item)
|
|
|
|
|
|
},
|
|
},
|
|
//滚动事件
|
|
//滚动事件
|
|
@@ -111,12 +116,27 @@ export default {
|
|
let list = data.data[0];
|
|
let list = data.data[0];
|
|
list.labHardwareVOList.forEach(function(item) {
|
|
list.labHardwareVOList.forEach(function(item) {
|
|
if (item.hardwareTypeEnum.enumName == 'VIDEO_MONITOR') {
|
|
if (item.hardwareTypeEnum.enumName == 'VIDEO_MONITOR') {
|
|
- _this.videoHardwareNUM.push(item)
|
|
|
|
|
|
+ _this.videoHardwareList.push({name:item.hardwareName,num:item.hardwareNUM})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ _this.GetStartList(_this.videoHardwareList[0])
|
|
|
|
+ console.log(_this.videoHardwareList)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
|
|
- //this.getCameraByFloor();
|
|
|
|
- this.GetStartList(_this.videoHardwareNUM);
|
|
|
|
|
|
+ //获取疏散硬件列表
|
|
|
|
+ async sparseHardwareList() {
|
|
|
|
+ let _this = this;
|
|
|
|
+ const {
|
|
|
|
+ data
|
|
|
|
+ } = await sparseHardwareList()
|
|
|
|
+ if (data.code == 200) {
|
|
|
|
+ if(data.rows[0]){
|
|
|
|
+ this.hardwareList=data.rows;
|
|
|
|
+ this.getCameraByFloor();
|
|
|
|
+ }else{
|
|
|
|
+ this.laboratoryInfo();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取楼层摄像头列表
|
|
//获取楼层摄像头列表
|
|
@@ -128,21 +148,14 @@ export default {
|
|
floorId: this.floorId
|
|
floorId: this.floorId
|
|
})
|
|
})
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
- if (data.data[0]) {
|
|
|
|
- let list = _this.videoHardwareNUM.concat(data.data)
|
|
|
|
- let qc = []
|
|
|
|
- for (var i = 0; i < list.length - 1; i++) {
|
|
|
|
- for (var j = i + 1; j < list.length; j++) {
|
|
|
|
- if (list[i] === list[j]) {
|
|
|
|
- list.splice(j, 1);
|
|
|
|
- j--;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- this.GetStartList(list);
|
|
|
|
- } else {
|
|
|
|
- this.GetStartList(_this.videoHardwareNUM);
|
|
|
|
- }
|
|
|
|
|
|
+ for(let i=0;i<data.data.length;i++){
|
|
|
|
+ for(let k=0;k<_this.hardwareList.length;k++){
|
|
|
|
+ if(data.data[i]==_this.hardwareList[k].hardwareNum){
|
|
|
|
+ _this.videoHardwareList.push({name:_this.hardwareList[k].name,num:_this.hardwareList[k].hardwareNum})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.laboratoryInfo()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async GetStartList(rows) {
|
|
async GetStartList(rows) {
|
|
@@ -151,10 +164,7 @@ export default {
|
|
if(!rows[0]){
|
|
if(!rows[0]){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
- let list = "";
|
|
|
|
- for (let i = 0; i < rows.length; i++) {
|
|
|
|
- list = list + rows[i].hardwareNUM + ","
|
|
|
|
- }
|
|
|
|
|
|
+ let list = rows.num;
|
|
let obj = {
|
|
let obj = {
|
|
page: "1",
|
|
page: "1",
|
|
count: "100",
|
|
count: "100",
|