|
|
@@ -34,13 +34,42 @@
|
|
|
<components :is="sidebarComponents" @sidebarClear="sidebarClear()" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='queryInfo.type' :model="queryInfo.model"></components>
|
|
|
<!-- 设备列表 -->
|
|
|
<equip-list>
|
|
|
- <p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p><p>1</p>
|
|
|
- <button @click="detailsShow == 3">ceshi</button>
|
|
|
+ <div class="searchEquipBox">
|
|
|
+ <el-input
|
|
|
+ style="cursor: pointer"
|
|
|
+ placeholder="请输入内容"
|
|
|
+ size="mini"
|
|
|
+ clearable
|
|
|
+ v-model="searchEquipVal"
|
|
|
+ suffix-icon="el-icon-search"
|
|
|
+ class="input-with-select"
|
|
|
+ @change="getEquipList()"
|
|
|
+ ></el-input>
|
|
|
+ </div>
|
|
|
+ <div class="equipListBox" id="equipListBox" v-loading="equipListloading" >
|
|
|
+ <div class="equipList" >
|
|
|
+ <div v-for="(item,index) in equipListCurr" :key="index" :class="[index==equipListActive?'active':'','equipItem']" @click="equipMarkerClick(item)">
|
|
|
+ <div>
|
|
|
+ <div class="equipId">
|
|
|
+ <span :class="item.device_status?'online':'offline'"></span>
|
|
|
+ {{item.device_id}}
|
|
|
+ </div>
|
|
|
+ <div class="equipCity">{{item.city}}</div>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div class="equipType">{{item.device_type_id | equipType}}</div>
|
|
|
+ <div>{{item.addtime*1000 | formatTime}}</div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
</equip-list>
|
|
|
<!-- 杀虫灯数据框 -->
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__zoomIn"
|
|
|
- leave-active-class="animate__animated animate__rotateOut"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
>
|
|
|
<dialog-box v-if="detailsShow==2" width='800'>
|
|
|
<template v-slot:header>
|
|
|
@@ -50,7 +79,7 @@
|
|
|
</button>
|
|
|
</template>
|
|
|
<template v-slot:inner>
|
|
|
- <equip-info :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
+ <equip-info v-if="hackReset" :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
<template v-solt:equipStateInner></template>
|
|
|
</equip-info>
|
|
|
<div class="equipData">
|
|
|
@@ -64,7 +93,7 @@
|
|
|
:name="pages.name"
|
|
|
>
|
|
|
<!-- <keep-alive> -->
|
|
|
- <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage"></components>
|
|
|
+ <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
|
|
|
<!-- </keep-alive> -->
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -76,7 +105,7 @@
|
|
|
<!-- 测报灯数据框 -->
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__zoomIn"
|
|
|
- leave-active-class="animate__animated animate__rotateOut"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
>
|
|
|
<dialog-box v-if="detailsShow==3" width='800'>
|
|
|
<template v-slot:header>
|
|
|
@@ -86,7 +115,7 @@
|
|
|
</button>
|
|
|
</template>
|
|
|
<template v-slot:inner>
|
|
|
- <equip-info :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
+ <equip-info v-if="hackReset" :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
<template v-solt:equipStateInner></template>
|
|
|
</equip-info>
|
|
|
<div class="equipData">
|
|
|
@@ -100,7 +129,7 @@
|
|
|
:name="pages.name"
|
|
|
>
|
|
|
<keep-alive>
|
|
|
- <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage"></components>
|
|
|
+ <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
|
|
|
</keep-alive>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -112,7 +141,7 @@
|
|
|
<!-- 性诱设备数据框 -->
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__zoomIn"
|
|
|
- leave-active-class="animate__animated animate__rotateOut"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
>
|
|
|
<dialog-box v-if="detailsShow==4" width='800'>
|
|
|
<template v-slot:header>
|
|
|
@@ -122,7 +151,7 @@
|
|
|
</button>
|
|
|
</template>
|
|
|
<template v-slot:inner>
|
|
|
- <equip-info :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
+ <equip-info v-if="hackReset" :equipId="queryInfo.equip_id" :equipType='detailsShow'>
|
|
|
<template v-solt:equipStateInner></template>
|
|
|
</equip-info>
|
|
|
<div class="equipData">
|
|
|
@@ -136,7 +165,7 @@
|
|
|
:name="pages.name"
|
|
|
>
|
|
|
<keep-alive>
|
|
|
- <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage"></components>
|
|
|
+ <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
|
|
|
</keep-alive>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -148,7 +177,7 @@
|
|
|
<!-- 气象站数据框 -->
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__zoomIn"
|
|
|
- leave-active-class="animate__animated animate__rotateOut"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
>
|
|
|
<dialog-box v-if="detailsShow==5" width='800'>
|
|
|
<template v-slot:header>
|
|
|
@@ -158,7 +187,7 @@
|
|
|
</button>
|
|
|
</template>
|
|
|
<template v-slot:inner>
|
|
|
- <equip-info :equipId='queryInfo.equip_id' :equipType='detailsShow'>
|
|
|
+ <equip-info v-if="hackReset" :equipId='queryInfo.equip_id' :equipType='detailsShow'>
|
|
|
<template v-solt:equipStateInner></template>
|
|
|
</equip-info>
|
|
|
<div class="equipData">
|
|
|
@@ -172,7 +201,7 @@
|
|
|
:name="pages.name"
|
|
|
>
|
|
|
<keep-alive>
|
|
|
- <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage"></components>
|
|
|
+ <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
|
|
|
</keep-alive>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -181,10 +210,32 @@
|
|
|
</template>
|
|
|
</dialog-box>
|
|
|
</transition>
|
|
|
+ <!-- 监控数据框 -->
|
|
|
+ <transition
|
|
|
+ enter-active-class="animate__animated animate__zoomIn"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
+ >
|
|
|
+ <div v-if="detailsShow==6" class="jkDialog">
|
|
|
+ <el-button type="blueInfo" size="small" @click="jkClose2()" >停止</el-button>
|
|
|
+ <el-button type="blueInfo" size="small" @click="jkClose()" >刷新</el-button>
|
|
|
+ <div id="videoCon"></div>
|
|
|
+ </div>
|
|
|
+ <!-- <dialog-box v-if="detailsShow==6" width='800'>
|
|
|
+ <template v-slot:header>
|
|
|
+ <span class="dialog-title">监控</span>
|
|
|
+ <button type="button" @click="detailsShow=''" class="dialog-headerbtn">
|
|
|
+ <i class="el-icon el-icon-close"></i>
|
|
|
+ </button>
|
|
|
+ </template>
|
|
|
+ <template v-slot:inner>
|
|
|
+ <div id="videoCon"></div>
|
|
|
+ </template>
|
|
|
+ </dialog-box> -->
|
|
|
+ </transition>
|
|
|
<!-- 孢子仪数据框 -->
|
|
|
<transition
|
|
|
enter-active-class="animate__animated animate__zoomIn"
|
|
|
- leave-active-class="animate__animated animate__rotateOut"
|
|
|
+ leave-active-class="animate__animated animate__zoomOut"
|
|
|
>
|
|
|
<dialog-box v-if="detailsShow==7" width='800'>
|
|
|
<template v-slot:header>
|
|
|
@@ -194,7 +245,7 @@
|
|
|
</button>
|
|
|
</template>
|
|
|
<template v-slot:inner>
|
|
|
- <equip-info @child-event="setTimeDialogShow" :equipId='queryInfo.equip_id' :equipType='detailsShow'>
|
|
|
+ <equip-info v-if="hackReset" @child-event="setTimeDialogShow" :equipId='queryInfo.equip_id' :equipType='detailsShow'>
|
|
|
<template v-solt:equipStateInner></template>
|
|
|
</equip-info>
|
|
|
<div class="equipData">
|
|
|
@@ -208,7 +259,7 @@
|
|
|
:name="pages.name"
|
|
|
>
|
|
|
<keep-alive>
|
|
|
- <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage"></components>
|
|
|
+ <components :is="pages.name" :equipId="queryInfo.equip_id" :d_id="queryInfo.d_id" :equipType='detailsShow' v-if="pages.name == nowPage && hackReset"></components>
|
|
|
</keep-alive>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
@@ -262,7 +313,8 @@ import equipInfo from './equipInfo' //设备基础信息
|
|
|
import equipHistoryDate from './equipHistoryDate' //设备历史数据
|
|
|
import qxzEquipHistoryDate from './equipHistoryDateQxz' //气象站设备历史数据
|
|
|
import twentyFourHistoryDate from './twentyFourHistoryDate' //气象站24小时数据
|
|
|
-import cbdPhoto from './cbdPhoto/cbdPhoto' //测报灯图片
|
|
|
+import cbdTabPhoto from './cbdPhoto/cbdTabPhoto' //测报灯图片
|
|
|
+import cbdTabPestStat from './cbdTabPestStat' //测报灯害虫统计
|
|
|
export default {
|
|
|
//import引入的组件需要注入到对象中才能使用
|
|
|
components: {
|
|
|
@@ -275,15 +327,17 @@ export default {
|
|
|
equipHistoryDate,
|
|
|
qxzEquipHistoryDate,
|
|
|
twentyFourHistoryDate,
|
|
|
- cbdPhoto,
|
|
|
+ cbdTabPhoto,
|
|
|
+ cbdTabPestStat,
|
|
|
},
|
|
|
data() {
|
|
|
//这里存放数据
|
|
|
return {
|
|
|
+ user_id:'',
|
|
|
sidebarComponents:'',
|
|
|
amapManager,
|
|
|
- center: [120.298433, 31.680335],
|
|
|
- zoom: 6,
|
|
|
+ center: [106.323527,29.541514],
|
|
|
+ zoom: 5,
|
|
|
mapType: 1,
|
|
|
plugin: [
|
|
|
// {
|
|
|
@@ -354,18 +408,18 @@ export default {
|
|
|
type:5,
|
|
|
name:"环境监测",
|
|
|
},
|
|
|
- {
|
|
|
- type:4,
|
|
|
- name:"性诱设备",
|
|
|
- },
|
|
|
- {
|
|
|
- type:3,
|
|
|
- name:"虫情测报",
|
|
|
- },
|
|
|
- {
|
|
|
- type:2,
|
|
|
- name:"杀虫灯"
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // type:4,
|
|
|
+ // name:"性诱设备",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type:3,
|
|
|
+ // name:"虫情测报",
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // type:2,
|
|
|
+ // name:"杀虫灯"
|
|
|
+ // },
|
|
|
],
|
|
|
currSelectType:0,
|
|
|
currSelectSite:0,
|
|
|
@@ -443,8 +497,8 @@ export default {
|
|
|
// 孢子仪配置载玻片时间did
|
|
|
currbzyGlass:"",
|
|
|
// 设备tabs标签
|
|
|
- activeName: "equipState",
|
|
|
- nowPage: "equipState",
|
|
|
+ activeName: "",
|
|
|
+ nowPage: "",
|
|
|
pages:{
|
|
|
"2":[{
|
|
|
name:"equipState",
|
|
|
@@ -458,17 +512,17 @@ export default {
|
|
|
label:"实时状态",
|
|
|
},
|
|
|
{
|
|
|
- name:"cbdPhoto",
|
|
|
+ name:"cbdTabPhoto",
|
|
|
label:"查看图片",
|
|
|
},
|
|
|
{
|
|
|
name:"equipHistoryDate",
|
|
|
label:"历史数据",
|
|
|
},
|
|
|
- // {
|
|
|
- // name:"equipState",
|
|
|
- // label:"害虫统计",
|
|
|
- // }
|
|
|
+ {
|
|
|
+ name:"cbdTabPestStat",
|
|
|
+ label:"害虫统计",
|
|
|
+ }
|
|
|
],
|
|
|
"4":[{
|
|
|
name:"equipState",
|
|
|
@@ -497,14 +551,107 @@ export default {
|
|
|
},
|
|
|
// 右侧控制
|
|
|
sidebarState:false,
|
|
|
+ // 设备列表
|
|
|
+ searchEquipVal:'',
|
|
|
+ equipList:[],
|
|
|
+ equipListCurr:[],
|
|
|
+ equipListActive:'',
|
|
|
+ hackReset:false,
|
|
|
+ equipListloading: false,
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
computed: {},
|
|
|
//监控data中的数据变化
|
|
|
- watch: {},
|
|
|
+ watch: {
|
|
|
+ detailsShow(val){
|
|
|
+ if(val != 0){
|
|
|
+ this.activeName = this.pages[val][0].name
|
|
|
+ this.nowPage = this.pages[val][0].name
|
|
|
+ }else{
|
|
|
+ if(val== 5){
|
|
|
+ this.activeName = 'qxzEquipState'
|
|
|
+ this.nowPage = 'qxzEquipState'
|
|
|
+ }else{
|
|
|
+ this.activeName = 'equipState'
|
|
|
+ this.nowPage = 'equipState'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ getUserEquipType(){
|
|
|
+ this.$axios({
|
|
|
+ method: "POST",
|
|
|
+ url: "/api/api_gateway?method=user.login.user_device_type",
|
|
|
+ data: this.qs.stringify({
|
|
|
+ user_id:this.user_id
|
|
|
+ })
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.message == "") {
|
|
|
+ this.equipType=[{
|
|
|
+ type:'',
|
|
|
+ name:'全部'
|
|
|
+ }]
|
|
|
+ for(let i of res.data.data.type_list){
|
|
|
+ this.equipType.push({
|
|
|
+ type:i,
|
|
|
+ name:this.equipsTypeSwitch(i)
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message.error(res.data.message);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ equipsTypeSwitch(i){
|
|
|
+ switch (i) {
|
|
|
+ case '2':
|
|
|
+ return '杀虫灯';
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ return '虫情测报灯';
|
|
|
+ break;
|
|
|
+ case '4':
|
|
|
+ return '性诱测报';
|
|
|
+ break;
|
|
|
+ case '5':
|
|
|
+ return '环境监测';
|
|
|
+ break;
|
|
|
+ case '6':
|
|
|
+ return '监控';
|
|
|
+ break;
|
|
|
+ case '7':
|
|
|
+ return '孢子仪';
|
|
|
+ break;
|
|
|
+ case '9':
|
|
|
+ return '糖醋测报';
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ return '杀虫灯';
|
|
|
+ break;
|
|
|
+ case 3:
|
|
|
+ return '虫情测报灯';
|
|
|
+ break;
|
|
|
+ case 4:
|
|
|
+ return '性诱测报';
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ return '环境监测';
|
|
|
+ break;
|
|
|
+ case 6:
|
|
|
+ return '监控';
|
|
|
+ break;
|
|
|
+ case 7:
|
|
|
+ return '孢子仪';
|
|
|
+ break;
|
|
|
+ case 9:
|
|
|
+ return '糖醋测报';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
changeMapType(val){
|
|
|
let o = amapManager.getMap();
|
|
|
if(val==0){
|
|
|
@@ -519,11 +666,8 @@ export default {
|
|
|
this.currSelectType = item.type;
|
|
|
this.currSelectSite = index;
|
|
|
this.detailsShow = ''
|
|
|
- this.getEquipList(item.type)
|
|
|
- console.log(item.type);
|
|
|
-
|
|
|
- this.activeName = this.pages[item.type][0].name
|
|
|
- this.nowPage = this.pages[item.type][0].name
|
|
|
+ this.searchEquipVal = ''
|
|
|
+ this.getEquipList()
|
|
|
},
|
|
|
mouseOve(index,item){
|
|
|
this.equipStyleLeft = 80*index
|
|
|
@@ -558,66 +702,71 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
- getEquipList(type) {
|
|
|
+ getEquipList() {
|
|
|
+ this.equipListloading = true;
|
|
|
this.componentMarker.position = []
|
|
|
- if(this.infoWindow){
|
|
|
- this.infoWindow.close()
|
|
|
- }
|
|
|
- let o = amapManager.getMap();
|
|
|
- o.setZoom(4);
|
|
|
+ // if(this.infoWindow){
|
|
|
+ // this.infoWindow.close()
|
|
|
+ // }
|
|
|
+ var equip_type = this.currSelectType || '';
|
|
|
+ this.setZoom = 4;
|
|
|
this.$axios({
|
|
|
method: "POST",
|
|
|
url: "/api/api_gateway?method=home.homes.equip_map_location",
|
|
|
data: this.qs.stringify({
|
|
|
- equip_type: type,
|
|
|
+ equip_type: equip_type,
|
|
|
+ device_id:this.searchEquipVal,
|
|
|
+ user_id:this.user_id
|
|
|
})
|
|
|
}).then(res => {
|
|
|
if (res.data.message == "") {
|
|
|
let data = res.data.data;
|
|
|
this.equipShow = false;
|
|
|
- this.equips = data.map(item => {
|
|
|
+ this.equips = data.map((item,index) => {
|
|
|
this.iconFormat(item.device_type_id, item);
|
|
|
item.style = item.device_type_id
|
|
|
if(item.gps_type == 1){ //GPS
|
|
|
- console.log(wgs84togcj02)
|
|
|
item.lnglat = wgs84togcj02(item.lng,item.lat)
|
|
|
}else{
|
|
|
// this.lnglatFormat(item);
|
|
|
}
|
|
|
+ item.index = index
|
|
|
return item;
|
|
|
});
|
|
|
+
|
|
|
if(this.massMarks){
|
|
|
this.massMarks.clear()
|
|
|
}
|
|
|
- console.log(this.equips)
|
|
|
- this.massMarks = new AMap.MassMarks(this.equips, {
|
|
|
- zIndex: 199, // 海量点图层叠加的顺序
|
|
|
- zooms: [3, 19], // 在指定地图缩放级别范围内展示海量点图层
|
|
|
- style: this.equipStyleObject // 设置样式对象
|
|
|
- });
|
|
|
- this.massMarks.setMap(o)
|
|
|
- var _this = this
|
|
|
- this.massMarks.on('click',e =>{
|
|
|
- this.equipMarkerClick(e.data)
|
|
|
- // this.openInfo(e.data)
|
|
|
- console.log(e.data)
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ console.log(this.equips)
|
|
|
+ this.equipList = this.equips;
|
|
|
+ this.equipListloading = false;
|
|
|
+ this.equipListCurr = this.equips;
|
|
|
+ this.massMarks = new AMap.MassMarks(this.equips, {
|
|
|
+ zIndex: 199, // 海量点图层叠加的顺序
|
|
|
+ zooms: [3, 19], // 在指定地图缩放级别范围内展示海量点图层
|
|
|
+ style: this.equipStyleObject // 设置样式对象
|
|
|
+ });
|
|
|
+ var o = amapManager.getMap();
|
|
|
+ this.massMarks.setMap(o)
|
|
|
+ this.massMarks.on('click',e =>{
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ document.getElementById("equipListBox").scrollTop = 87*e.data.index;
|
|
|
+
|
|
|
+ this.equipMarkerClick(e.data)
|
|
|
+ })
|
|
|
+ })
|
|
|
})
|
|
|
-
|
|
|
- // this.equipPoints = []
|
|
|
- // this.equips.forEach((item) =>{
|
|
|
- // this.equipPoints.push(new AMap.Marker({
|
|
|
- // position: item.lnglat
|
|
|
- // }))
|
|
|
- // })
|
|
|
- // this.$nextTick(()=>{
|
|
|
- // o.setFitView(this.equipPoints)
|
|
|
- // })
|
|
|
} else {
|
|
|
this.$message.error(res.data.message);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
equipMarkerClick(item) {
|
|
|
+ this.hackReset = false
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.hackReset = true
|
|
|
+ })
|
|
|
this.equipShow = true; //图标上设备信息框
|
|
|
this.equipsVisible = true; //右侧设备弹框
|
|
|
this.detailsShow = item.device_type_id; //右侧弹框根据不同设备类型,显示设备信息
|
|
|
@@ -626,7 +775,49 @@ export default {
|
|
|
this.queryInfo.d_id = item.d_id
|
|
|
this.queryInfo.type = item.device_type_id
|
|
|
this.queryInfo.model = item.device_model
|
|
|
+ this.equipListActive = item.index
|
|
|
this.sidebarComponents = "" //siderbar为空
|
|
|
+ if (item.device_type_id == 6) {
|
|
|
+ //监控
|
|
|
+ this.$axios({
|
|
|
+ url: "/api/api_gateway?method=camera.camera_manage.addr_camera",
|
|
|
+ method: "POST",
|
|
|
+ data: this.qs.stringify({
|
|
|
+ device_id: item.device_id,
|
|
|
+ }),
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.message == "") {
|
|
|
+ let data = eval("(" + res.data.data + ")");
|
|
|
+ let hlsHd = data.hlsHd;
|
|
|
+ // this.jkSrc = hlsHd
|
|
|
+ // console.log(this.jkSrc)
|
|
|
+ let playHtml = `<video id="myPlayer" muted autoplay poster='' controls playsInline webkit-playsinline src="${hlsHd}" style="width:100%; height:100%;"></video>`;
|
|
|
+ console.log(hlsHd);
|
|
|
+ document.getElementById("videoCon").innerHTML = playHtml;
|
|
|
+ setTimeout(() => {
|
|
|
+ console.log(document.getElementById("myPlayer"));
|
|
|
+ this.player = new EZUIPlayer("myPlayer");
|
|
|
+ console.log(player);
|
|
|
+ this.player.play();
|
|
|
+ // let player = videojs('myPlayer')
|
|
|
+ // player.src({ src: hlsHd, type: 'application/x-mpegURL' })
|
|
|
+ // player.play()
|
|
|
+ }, 1000);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ jkClose(){
|
|
|
+ this.player.stop()
|
|
|
+ this.detailsShow='';
|
|
|
+ console.log(this.player);
|
|
|
+
|
|
|
+ },
|
|
|
+ jkClose2(){
|
|
|
+ // this.detailsShow='';
|
|
|
+ console.log(this.player);
|
|
|
+
|
|
|
+ this.player.stop()
|
|
|
},
|
|
|
//载玻片、培养液更换时间展示
|
|
|
setTimeDialogShow(data){
|
|
|
@@ -680,12 +871,16 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- // this.getEquipList('')
|
|
|
+ this.user_id = this.$store.state.user_id || sessionStorage.getItem("myuid");
|
|
|
+ this.getUserEquipType()
|
|
|
+ this.changeEquip(0,this.equipType[0])
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
|
beforeMount() {}, //生命周期 - 挂载之前
|
|
|
beforeUpdate() {}, //生命周期 - 更新之前
|
|
|
- updated() {}, //生命周期 - 更新之后
|
|
|
+ updated() {
|
|
|
+
|
|
|
+ }, //生命周期 - 更新之后
|
|
|
beforeDestroy() {}, //生命周期 - 销毁之前
|
|
|
destroyed() {}, //生命周期 - 销毁完成
|
|
|
activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
|
|
|
@@ -775,4 +970,73 @@ export default {
|
|
|
background-color: #0295ff;
|
|
|
}
|
|
|
|
|
|
+// 监控弹框样式
|
|
|
+.jkDialog{
|
|
|
+ position: fixed;
|
|
|
+ width: 750px;
|
|
|
+ background: #323a47;
|
|
|
+ top: 200px;
|
|
|
+ left: 30%;
|
|
|
+}
|
|
|
+// 设备列表
|
|
|
+.searchEquipBox{
|
|
|
+ padding: 20px;
|
|
|
+ background: #0195ff;
|
|
|
+}
|
|
|
+.equipListBox{
|
|
|
+ position: absolute;
|
|
|
+ left: 0;
|
|
|
+ right: 35px;
|
|
|
+ top: 69px;
|
|
|
+ bottom: 0;
|
|
|
+ overflow: auto;
|
|
|
+ .equipList{
|
|
|
+ // padding: 20px;
|
|
|
+ .equipItem{
|
|
|
+ padding: 10px 7px;
|
|
|
+ cursor: pointer;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 15px;
|
|
|
+ border: 1px dashed transparent;
|
|
|
+ border-bottom: 1px dashed #ddd;
|
|
|
+ padding-bottom: 10px;
|
|
|
+ color: #8b8b8b;
|
|
|
+ .equipId{
|
|
|
+ line-height: 34px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #000;
|
|
|
+ font-weight: 700;
|
|
|
+ span{
|
|
|
+ display: inline-block;
|
|
|
+ width: 9px;
|
|
|
+ height: 9px;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 3px;
|
|
|
+ }
|
|
|
+ span.online{
|
|
|
+ background: #0195ff;
|
|
|
+ }
|
|
|
+ span.offline{
|
|
|
+ background: red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .equipCity{
|
|
|
+ text-indent: 16px;
|
|
|
+ }
|
|
|
+ .equipType{
|
|
|
+ line-height: 34px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #0195ff;
|
|
|
+ font-weight: 700;
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .equipItem.active{
|
|
|
+ border: 1px dashed #0195ff;
|
|
|
+ box-shadow: 0px 0px 5px 1px #39acff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
</style>
|