|
|
@@ -1,24 +1,29 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div class="inner">
|
|
|
- <div class="mapCover">
|
|
|
- <el-amap
|
|
|
- class="bm-view"
|
|
|
- vid="amapDemo"
|
|
|
- :center="center"
|
|
|
- :amap-manager="amapManager"
|
|
|
- :zoom="zoom"
|
|
|
- :plugin="plugin"
|
|
|
- :events="mapEvents"
|
|
|
- >
|
|
|
- <el-amap-marker vid="component-marker" v-if="componentMarker.position.length" :position="componentMarker.position" ></el-amap-marker>
|
|
|
- </el-amap>
|
|
|
- </div>
|
|
|
- <div class="mapTypebox">
|
|
|
- <el-radio-group v-model="mapType" @change="changeMapType">
|
|
|
- <el-radio :label="0">标准图</el-radio>
|
|
|
- <el-radio :label="1">卫星图</el-radio>
|
|
|
- </el-radio-group>
|
|
|
+ <div class="mapCover" @mousewheel.prevent="rollImg">
|
|
|
+ <img ref="imgDiv" class="img" src="../../../static/images/data/mapBJ.png" @mousedown="move" alt="">
|
|
|
+ <div ref="project1" @click="markPio(0)" v-if="!searchEquipVal" class="project1">
|
|
|
+ <img :src="equipStyleObject[1].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project2" @click="markPio(1)" v-if="!searchEquipVal" class="project2">
|
|
|
+ <img :src="equipStyleObject[2].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project3" @click="markPio(2)" v-if="!searchEquipVal" class="project3">
|
|
|
+ <img :src="equipStyleObject[3].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project4" @click="markPio(3)" v-if="!searchEquipVal" class="project4">
|
|
|
+ <img :src="equipStyleObject[4].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project5" @click="markPio(4)" v-if="!searchEquipVal" class="project5">
|
|
|
+ <img :src="equipStyleObject[5].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project6" @click="markPio(5)" v-if="!searchEquipVal" class="project6">
|
|
|
+ <img :src="equipStyleObject[6].url" alt="">
|
|
|
+ </div>
|
|
|
+ <div ref="project9" @click="markPio(1)" v-if="searchEquipVal" class="project9">
|
|
|
+ <img :src="equipStyleObject[2].url" alt="">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- tabs设备类型 -->
|
|
|
<div class="equipTypebox">
|
|
|
@@ -220,7 +225,15 @@
|
|
|
<div>监控</div>
|
|
|
<div @click="jkClose()"><i class="el-icon-close"></i></div>
|
|
|
</div>
|
|
|
- <div id="videoCon"></div>
|
|
|
+ <div id="videoCon">
|
|
|
+ <video id="myVideo"
|
|
|
+ class="video-js vjs-default-skin vjs-big-play-centered"
|
|
|
+ autoplay
|
|
|
+ loop
|
|
|
+ >
|
|
|
+ <source :src="videourl" type="video/mp4" >
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
<div class="direc">
|
|
|
<div
|
|
|
@mousedown="configCamera('move', 0)"
|
|
|
@@ -322,8 +335,6 @@
|
|
|
<script>
|
|
|
//这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
|
|
|
//例如:import 《组件名称》 from '《组件路径》';
|
|
|
-import VueAMap from "vue-amap";
|
|
|
-let amapManager = new VueAMap.AMapManager();
|
|
|
import sidebar from "@/components/highStand/sidebar"
|
|
|
import equipList from "@/components/highStand/equipList"
|
|
|
import { bd09togcj02,gcj02tobd09,wgs84togcj02,gcj02towgs84 } from "@/components/home/coordtransform_utils.js"; //纠偏方法
|
|
|
@@ -356,91 +367,34 @@ export default {
|
|
|
return {
|
|
|
user_id:'',
|
|
|
sidebarComponents:'',
|
|
|
- amapManager,
|
|
|
- center: [106.323527,29.541514],
|
|
|
- zoom: 5,
|
|
|
- mapType: 1,
|
|
|
- plugin: [
|
|
|
- // {
|
|
|
- // pName: "ToolBar",
|
|
|
- // events: {
|
|
|
- // init(instance) {
|
|
|
- // console.log(instance);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // },
|
|
|
- {
|
|
|
- pName: "Scale",
|
|
|
- events: {
|
|
|
- init(instance) {
|
|
|
- console.log(instance);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- // {
|
|
|
- // pName: 'MapType',
|
|
|
- // defaultType: 0,
|
|
|
- // events: {
|
|
|
- // init(instance) {
|
|
|
- // console.log(instance);
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- ],
|
|
|
+
|
|
|
componentMarker: {
|
|
|
position: []
|
|
|
},
|
|
|
- infoWindow: null,
|
|
|
- xyzTileLayer: null,
|
|
|
- xyzTileLayer2: null,
|
|
|
- mapEvents: {
|
|
|
- init: o => {
|
|
|
- this.xyzTileLayer = new AMap.TileLayer({
|
|
|
- // 图块取图地址
|
|
|
- getTileUrl:
|
|
|
- "http://t{0,1,2,3,4,5,6,7}.tianditu.gov.cn/DataServer?T=img_w&tk=888bc7de1a5f14aa1b335b02e558d9b3&x=[x]&y=[y]&l=[z]",
|
|
|
- zIndex: 100
|
|
|
- });
|
|
|
- this.xyzTileLayer2 = new AMap.TileLayer({
|
|
|
- // 图块取图地址
|
|
|
- getTileUrl:
|
|
|
- "http://t{0,1,2,3,4,5,6,7}.tianditu.gov.cn/DataServer?T=cta_w&tk=888bc7de1a5f14aa1b335b02e558d9b3&x=[x]&y=[y]&l=[z]",
|
|
|
- zIndex: 101
|
|
|
- });
|
|
|
- o.add(this.xyzTileLayer);
|
|
|
- o.add(this.xyzTileLayer2);
|
|
|
- }
|
|
|
- },
|
|
|
// tabs导航
|
|
|
equipType:[
|
|
|
{
|
|
|
type:'',
|
|
|
name:"全部",
|
|
|
- },
|
|
|
- {
|
|
|
- type:7,
|
|
|
- name:"孢子仪",
|
|
|
- },
|
|
|
- {
|
|
|
- type:6,
|
|
|
- name:"监控",
|
|
|
- },
|
|
|
- {
|
|
|
+ },{
|
|
|
+ type:2,
|
|
|
+ name:"杀虫灯"
|
|
|
+ },{
|
|
|
+ type:3,
|
|
|
+ name:"虫情测报",
|
|
|
+ },{
|
|
|
+ type:4,
|
|
|
+ name:"性诱设备",
|
|
|
+ },{
|
|
|
type:5,
|
|
|
name:"环境监测",
|
|
|
- },
|
|
|
- // {
|
|
|
- // type:4,
|
|
|
- // name:"性诱设备",
|
|
|
- // },
|
|
|
- // {
|
|
|
- // type:3,
|
|
|
- // name:"虫情测报",
|
|
|
- // },
|
|
|
- // {
|
|
|
- // type:2,
|
|
|
- // name:"杀虫灯"
|
|
|
- // },
|
|
|
+ },{
|
|
|
+ type:6,
|
|
|
+ name:"监控",
|
|
|
+ },{
|
|
|
+ type:7,
|
|
|
+ name:"孢子仪",
|
|
|
+ },
|
|
|
],
|
|
|
currSelectType:0,
|
|
|
currSelectSite:0,
|
|
|
@@ -451,11 +405,6 @@ export default {
|
|
|
geocoder:null,
|
|
|
equipStyleObject:[
|
|
|
{
|
|
|
- url: require("@/assets/images/home/mapView/scd.png"), // 设别类型0
|
|
|
- size: new AMap.Size(25, 15), // 图标大小
|
|
|
- anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
|
|
|
- },
|
|
|
- {
|
|
|
url: require("@/assets/images/home/mapView/scd.png"), // 设别类型1
|
|
|
size: new AMap.Size(25, 15), // 图标大小
|
|
|
anchor: new AMap.Pixel(5, 5) // 图标显示位置偏移量,基准点为图标左上角
|
|
|
@@ -579,6 +528,7 @@ export default {
|
|
|
equipListActive:'',
|
|
|
hackReset:false,
|
|
|
equipListloading: false,
|
|
|
+ videourl:require('../../../static/images/mp34.mp4'),
|
|
|
};
|
|
|
},
|
|
|
//监听属性 类似于data概念
|
|
|
@@ -602,29 +552,101 @@ export default {
|
|
|
},
|
|
|
//方法集合
|
|
|
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);
|
|
|
+ // 缩放图片
|
|
|
+ rollImg() {
|
|
|
+ /* 获取当前页面的缩放比 若未设置zoom缩放比,则为默认100%,即1,原图大小 */
|
|
|
+
|
|
|
+ var zoom = parseInt(this.$refs.imgDiv.style.zoom) || 100;
|
|
|
+ /* event.wheelDelta 获取滚轮滚动值并将滚动值叠加给缩放比zoom wheelDelta统一为±120,其中正数表示为向上滚动,负数表示向下滚动 */
|
|
|
+
|
|
|
+ zoom += event.wheelDelta / 12;
|
|
|
+ /* 最小范围 和 最大范围 的图片缩放尺度 */
|
|
|
+
|
|
|
+ if (zoom >= 100 && zoom < 500) {
|
|
|
+ this.$refs.imgDiv.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project1)
|
|
|
+ this.$refs.project1.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project2)
|
|
|
+ this.$refs.project2.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project3)
|
|
|
+ this.$refs.project3.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project4)
|
|
|
+ this.$refs.project4.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project5)
|
|
|
+ this.$refs.project5.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project6)
|
|
|
+ this.$refs.project6.style.zoom = zoom + "%";
|
|
|
+ if(this.$refs.project9)
|
|
|
+ this.$refs.project9.style.zoom = zoom + "%";
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ // 拖动图片
|
|
|
+ move(e) {
|
|
|
+ e.preventDefault();
|
|
|
+ // 获取元素
|
|
|
+ var left = document.querySelector(".mapCover");
|
|
|
+ var img = document.querySelector(".img");//背景图
|
|
|
+ var project1 = document.querySelector(".project1");//动图
|
|
|
+ var project2 = document.querySelector(".project2");//动图
|
|
|
+ var project3 = document.querySelector(".project3");//动图
|
|
|
+ var project4 = document.querySelector(".project4");//动图
|
|
|
+ var project5 = document.querySelector(".project5");//动图
|
|
|
+ var project6 = document.querySelector(".project6");//动图
|
|
|
+ var project7 = document.querySelector(".project7");//动图
|
|
|
+ var project8 = document.querySelector(".project8");//动图
|
|
|
+ var project9 = document.querySelector(".project9");//动图
|
|
|
+ var x = e.pageX - img.offsetLeft;
|
|
|
+ var y = e.pageY - img.offsetTop;
|
|
|
+ // 添加鼠标移动事件
|
|
|
+ left.addEventListener("mousemove", move);
|
|
|
+ function move(e) {
|
|
|
+ img.style.left = e.pageX - x + "px";
|
|
|
+ img.style.top = e.pageY - y + "px";
|
|
|
+ if(project1){
|
|
|
+ project1.style.left = e.pageX - x+700 + "px";
|
|
|
+ project1.style.top = e.pageY - y +400 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(project2){
|
|
|
+ project2.style.left = e.pageX - x+1350 + "px";
|
|
|
+ project2.style.top = e.pageY - y +300 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(project3){
|
|
|
+ project3.style.left = e.pageX - x+500 + "px";
|
|
|
+ project3.style.top = e.pageY - y +700 + "px";
|
|
|
}
|
|
|
+
|
|
|
+ if(project4){
|
|
|
+ project4.style.left = e.pageX - x+1200 + "px";
|
|
|
+ project4.style.top = e.pageY - y +450 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(project5){
|
|
|
+ project5.style.left = e.pageX - x+900 + "px";
|
|
|
+ project5.style.top = e.pageY - y +230 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(project6){
|
|
|
+ project6.style.left = e.pageX - x+1300 + "px";
|
|
|
+ project6.style.top = e.pageY - y +80 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+ if(project9){
|
|
|
+ project9.style.left = e.pageX - x+1350 + "px";
|
|
|
+ project9.style.top = e.pageY - y +300 + "px";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ // 添加鼠标抬起事件,鼠标抬起,将事件移除
|
|
|
+ img.addEventListener("mouseup", function() {
|
|
|
+ left.removeEventListener("mousemove", move);
|
|
|
+ });
|
|
|
+ // 鼠标离开父级元素,把事件移除
|
|
|
+ left.addEventListener("mouseout", function() {
|
|
|
+ left.removeEventListener("mousemove", move);
|
|
|
});
|
|
|
},
|
|
|
equipsTypeSwitch(i){
|
|
|
@@ -724,64 +746,101 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getEquipList() {
|
|
|
- this.equipListloading = true;
|
|
|
- this.componentMarker.position = []
|
|
|
- // 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: 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,index) => {
|
|
|
- this.iconFormat(item.device_type_id, item);
|
|
|
- item.style = item.device_type_id
|
|
|
- if(item.gps_type == 1){ //GPS
|
|
|
- item.lnglat = wgs84togcj02(item.lng,item.lat)
|
|
|
- }else{
|
|
|
- // this.lnglatFormat(item);
|
|
|
- }
|
|
|
- item.index = index
|
|
|
- return item;
|
|
|
- });
|
|
|
-
|
|
|
- if(this.massMarks){
|
|
|
- this.massMarks.clear()
|
|
|
+ console.log(111);
|
|
|
+
|
|
|
+ var equips = [
|
|
|
+ {
|
|
|
+ addtime: 1616488677,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 830,
|
|
|
+ device_id: "866950044786944",
|
|
|
+ device_name: "杀虫灯",
|
|
|
+ device_status: 1,
|
|
|
+ device_type_id: 2,
|
|
|
+ gps_type: 0,
|
|
|
+ lat: "34.7972",
|
|
|
+ lng: "113.664936"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ addtime: 1615971968,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 829,
|
|
|
+ device_id: "867435052201324",
|
|
|
+ device_name: "测报灯",
|
|
|
+ device_status: 0,
|
|
|
+ device_type_id: 3,
|
|
|
+ gps_type: 2,
|
|
|
+ lat: "034.8088073",
|
|
|
+ lng: "113.6624298"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ addtime: 1616384786,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 837,
|
|
|
+ device_id: "868739051977118",
|
|
|
+ device_name: "性诱测报",
|
|
|
+ device_status: 0,
|
|
|
+ device_type_id: 4,
|
|
|
+ gps_type: 0,
|
|
|
+ lat: "34.808668",
|
|
|
+ lng: "113.665406"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ addtime: 1614411126,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 825,
|
|
|
+ device_id: "865553058428964",
|
|
|
+ device_name: "环境监测",
|
|
|
+ device_status: 0,
|
|
|
+ device_type_id: 5,
|
|
|
+ gps_type: 2,
|
|
|
+ lat: "34.807349",
|
|
|
+ lng: "113.665079"
|
|
|
+ },{
|
|
|
+ addtime: 0,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 833,
|
|
|
+ device_id: "F31782127-1",
|
|
|
+ device_name: "监控",
|
|
|
+ device_status: 1,
|
|
|
+ device_type_id: 6,
|
|
|
+ gps_type: 2,
|
|
|
+ lat: "34.808612",
|
|
|
+ lng: "113.667213"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ addtime: 1610676431,
|
|
|
+ city: "河南省郑州市金水区",
|
|
|
+ d_id: 802,
|
|
|
+ device_id: "867435052203577",
|
|
|
+ device_name: "孢子仪",
|
|
|
+ device_status: 0,
|
|
|
+ device_type_id: 7,
|
|
|
+ gps_type: 2,
|
|
|
+ lat: "34.806517",
|
|
|
+ lng: "113.660311",
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ this.equipList = equips;
|
|
|
+ this.equipListCurr= equips.filter((item)=>{
|
|
|
+ if(this.searchEquipVal){
|
|
|
+ return item.device_id == '867435052201324'
|
|
|
+ }else{
|
|
|
+ if(this.currSelectType != 0){
|
|
|
+ return item.device_type_id == this.currSelectType
|
|
|
+ }else{
|
|
|
+ return item
|
|
|
}
|
|
|
- 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)
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
- } else {
|
|
|
- this.$message.error(res.data.message);
|
|
|
}
|
|
|
- });
|
|
|
+
|
|
|
+ })
|
|
|
+ },
|
|
|
+ markPio(type){
|
|
|
+ console.log(type);
|
|
|
+ console.log(this.equipList[type]);
|
|
|
+
|
|
|
+ document.getElementById("equipListBox").scrollTop = 87*type;
|
|
|
+ this.equipMarkerClick(this.equipList[type])
|
|
|
},
|
|
|
equipMarkerClick(item) {
|
|
|
this.hackReset = false
|
|
|
@@ -806,105 +865,29 @@ export default {
|
|
|
this.activeName = 'equipState'
|
|
|
this.nowPage = 'equipState'
|
|
|
}
|
|
|
- // if(this.detailsShow != 0){
|
|
|
- // this.activeName = this.pages[this.detailsShow][0].name
|
|
|
- // this.nowPage = this.pages[this.detailsShow][0].name
|
|
|
- // }else{
|
|
|
- // if(this.detailsShow== 5){
|
|
|
- // this.activeName = 'qxzEquipState'
|
|
|
- // this.nowPage = 'qxzEquipState'
|
|
|
- // }else{
|
|
|
- // this.activeName = 'equipState'
|
|
|
- // this.nowPage = 'equipState'
|
|
|
- // }
|
|
|
- // }
|
|
|
|
|
|
if (item.device_type_id == 6) {
|
|
|
- if(this.player){
|
|
|
- this.player.stop()
|
|
|
- this.player = ''
|
|
|
- }
|
|
|
//监控
|
|
|
- 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");
|
|
|
- this.player.play();
|
|
|
- // let player = videojs('myPlayer')
|
|
|
- // player.src({ src: hlsHd, type: 'application/x-mpegURL' })
|
|
|
- // player.play()
|
|
|
- }, 1000);
|
|
|
- }
|
|
|
- });
|
|
|
+
|
|
|
}
|
|
|
},
|
|
|
//关闭方向
|
|
|
stopConfigCamera() {
|
|
|
- this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=camera.camera_manage.ctrl_camera",
|
|
|
- data: this.qs.stringify({
|
|
|
- device_id: this.queryInfo.equip_id,
|
|
|
- ctrl: "stop",
|
|
|
- }),
|
|
|
- });
|
|
|
+ // this.$axios({
|
|
|
+ // method: "POST",
|
|
|
+ // url: "/api/api_gateway?method=camera.camera_manage.ctrl_camera",
|
|
|
+ // data: this.qs.stringify({
|
|
|
+ // device_id: this.queryInfo.equip_id,
|
|
|
+ // ctrl: "stop",
|
|
|
+ // }),
|
|
|
+ // });
|
|
|
},
|
|
|
//上下左右和拍照
|
|
|
configCamera(ctrl, movenum) {
|
|
|
- if (ctrl == "takephoto") {
|
|
|
- this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=camera.camera_manage.camera_takephoto",
|
|
|
- data: this.qs.stringify({
|
|
|
- device_id: this.queryInfo.equip_id,
|
|
|
- ctrl: ctrl,
|
|
|
- }),
|
|
|
- }).then((res) => {
|
|
|
- if (res.data.code == 200) {
|
|
|
- let data = res.data.data;
|
|
|
- this.picUrl = data.picUrl;
|
|
|
- this.takePhotoDialogVisible = true;
|
|
|
- } else {
|
|
|
- this.$message.error("设备网络异常!");
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- //上下左右、放大、缩小
|
|
|
- this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=camera.camera_manage.ctrl_camera",
|
|
|
- data: this.qs.stringify({
|
|
|
- device_id: this.queryInfo.equip_id,
|
|
|
- ctrl: ctrl,
|
|
|
- movenum: movenum,
|
|
|
- }),
|
|
|
- }).then((res) => {
|
|
|
- if (res.data) {
|
|
|
- this.$message.success("操作成功");
|
|
|
- } else {
|
|
|
- this.$message.error("操作失败");
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ this.$message.success("操作成功");
|
|
|
},
|
|
|
jkClose(){
|
|
|
- this.player.stop()
|
|
|
this.detailsShow='';
|
|
|
- console.log(this.player);
|
|
|
|
|
|
},
|
|
|
jkClose2(){
|
|
|
@@ -922,29 +905,7 @@ export default {
|
|
|
},
|
|
|
//载玻片、培养液更换时间配置提交
|
|
|
setTimeSubm() {
|
|
|
- let glass_slide_time = parseInt(
|
|
|
- new Date(this.time.time01).getTime() / 1000
|
|
|
- );
|
|
|
- let cultivate_time = parseInt(
|
|
|
- new Date(this.time.time02).getTime() / 1000
|
|
|
- );
|
|
|
- this.$axios({
|
|
|
- method: "POST",
|
|
|
- url: "/api/api_gateway?method=device.device_manage.updata_spore_time",
|
|
|
- data: this.qs.stringify({
|
|
|
- device_type_id: 7,
|
|
|
- d_id: this.currbzyGlass,
|
|
|
- glass_slide_time,
|
|
|
- cultivate_time,
|
|
|
- }),
|
|
|
- }).then((res) => {
|
|
|
- if (res.data.message == "") {
|
|
|
- this.$message.success("修改成功!");
|
|
|
- } else {
|
|
|
- this.$message.error(res.data.message);
|
|
|
- }
|
|
|
- this.setTimeDialogVisible = false;
|
|
|
- });
|
|
|
+ this.setTimeDialogVisible = false;this.$message.success("修改成功!");
|
|
|
},
|
|
|
//tabs每次切换只渲染一个界面
|
|
|
tabshandleClick(tab) {
|
|
|
@@ -965,8 +926,6 @@ export default {
|
|
|
created() {},
|
|
|
//生命周期 - 挂载完成(可以访问DOM元素)
|
|
|
mounted() {
|
|
|
- this.user_id = this.$store.state.user_id || sessionStorage.getItem("myuid");
|
|
|
- this.getUserEquipType()
|
|
|
this.changeEquip(0,this.equipType[0])
|
|
|
},
|
|
|
beforeCreate() {}, //生命周期 - 创建之前
|
|
|
@@ -986,14 +945,124 @@ export default {
|
|
|
position: relative;
|
|
|
.mapCover{
|
|
|
height: 100%;
|
|
|
- }
|
|
|
- .mapTypebox{
|
|
|
- position: absolute;
|
|
|
- right: 20px;
|
|
|
- top:30px;
|
|
|
- background: #fff;
|
|
|
- padding: 5px;
|
|
|
- border-radius: 5px;
|
|
|
+ overflow: hidden;
|
|
|
+ position: relative;
|
|
|
+ background: url(../../../static/images/data/mapBJ.png) no-repeat center;
|
|
|
+ background-size: 200%;
|
|
|
+ .img{
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ cursor: move;
|
|
|
+ }
|
|
|
+ .project1{
|
|
|
+ position: absolute;
|
|
|
+ top: 400px;
|
|
|
+ left: 700px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project2{
|
|
|
+ position: absolute;
|
|
|
+ top: 300px;
|
|
|
+ left: 1350px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project3{
|
|
|
+ position: absolute;
|
|
|
+ top: 700px;
|
|
|
+ left: 500px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project4{
|
|
|
+ position: absolute;
|
|
|
+ top: 450px;
|
|
|
+ left: 1200px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project5{
|
|
|
+ position: absolute;
|
|
|
+ top: 230px;
|
|
|
+ left: 900px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project6{
|
|
|
+ position: absolute;
|
|
|
+ top: 80px;
|
|
|
+ left: 1300px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project7{
|
|
|
+ position: absolute;
|
|
|
+ top: 170px;
|
|
|
+ left: 680px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project8{
|
|
|
+ position: absolute;
|
|
|
+ top: 670px;
|
|
|
+ left: 1550px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .project9{
|
|
|
+ position: absolute;
|
|
|
+ top: 300px;
|
|
|
+ left: 1350px;
|
|
|
+ cursor: pointer;
|
|
|
+ p{
|
|
|
+ color: red;
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-indent: -20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
// tabs设备类型
|
|
|
@@ -1072,6 +1141,10 @@ export default {
|
|
|
top: 200px;
|
|
|
left: 30%;
|
|
|
z-index: 180;
|
|
|
+ #myVideo{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
}
|
|
|
// 设备列表
|
|
|
.searchEquipBox{
|