yf_zd преди 4 години
родител
ревизия
fbfd651806

+ 17 - 36
src/components/Login.vue

@@ -81,43 +81,24 @@ export default {
 				this.$message.error('请输入用户名和密码!')
 				return
 			}
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=user.login.login_user',
-				data: this.qs.stringify({
-					username: this.username,
-					password: this.pass
+			if (this.cState == true) {
+				//是否记住密码
+				localStorage.setItem('username', '管理员')
+				localStorage.setItem('password', 'yfadmin')
+			} else {
+				localStorage.removeItem(username, password)
+			}
+			localStorage.setItem('isLogin', true)
+			if(flag){
+				var routeUrl = this.$router.resolve({
+					path: '/bHome'
 				})
-			}).then((res) => {
-				if (res.data.message == '') {
-					if (this.cState == true) {
-						//是否记住密码
-						localStorage.setItem('username', this.username)
-						localStorage.setItem('password', this.pass)
-					} else {
-						localStorage.removeItem(username, password)
-					}
-					localStorage.setItem('isLogin', true)
-					let selHome = sessionStorage.getItem('selHome')
-					if(flag){
-						var routeUrl = this.$router.resolve({
-							path: '/bHome'
-						})
-						window.open(routeUrl.href, '_blank')
-						this.$router.push('/plantGuard')
-					}else{
-						if (selHome) {
-							this.$router.push(selHome) //登录后默认选择首页
-						} else {
-							this.$router.push('/plantGuard')
-						}	
-					}
-					
-					localStorage.setItem('cUsername',res.data.params.username)
-				} else {
-					this.$message.error(res.data.message)
-				}
-			})
+				window.open(routeUrl.href, '_blank')
+				this.$router.push('/plantGuard')
+			}else{
+				this.$router.push('/plantGuard')
+			}
+			localStorage.setItem('cUsername','管理员')
 		},
 		fillPass() {
 			let username = localStorage.getItem('username')

+ 141 - 171
src/components/index.vue

@@ -6,8 +6,8 @@
         <!-- logo -->
         <div class="logoinfo">
           <div>
-            <img :src="$imghost + logoIcon" width="40" alt v-if="loginInfo.role_logo" />
-            <img :src="loginInfo.role_logo" v-else />
+            <img :src="loginInfo.role_logo"  v-if="loginInfo.role_logo"/>
+            <img :src="$imghost + logoIcon" width="40" alt v-else />
             <!-- <span>{{ loginInfo.role_header || "河南省高标准农田管理系统" }}</span> -->
             <span>河南省高标准农田管理系统</span>
           </div>
@@ -282,6 +282,7 @@ export default {
   directives: {
     trigger: {
       inserted(el, binging) {
+        console.log(2)
         var menuTabsValue = sessionStorage.getItem("menuTabsValue");
         var menuTabs = sessionStorage.getItem("menuTabs");
         if(menuTabs){
@@ -359,196 +360,165 @@ export default {
       // sessionStorage.setItem("menuTabsValue", this.menuTabsValue);
     
     },
-    // 获取用户主题
-    getUserInfo() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=home.homes.user_theme",
-      }).then((res) => {
-        if (res.data.message == "") {
-          this.loginInfo = res.data.data[0];
-        } else {
-          this.$message.error(res.data.message);
-        }
-      });
-    },
     // 获取用户菜单列表
     getNavList() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.user_login_info",
-      }).then((res) => {
-        if (res.data.message == "") {
-          var menuLists=[
-            {
-                  "name": "数据监测",
-                  "id": "1",
-                  "children": [
-                     {
-                     "name": "设备列表",
-                     "path": "/page1",
-                     "id": "2"
-                     },
-                     {
-                     "name": "项目列表",
-                     "path": "/baseAll",
-                     "id": "19"
-                     },
-                  ]
-               },
-               {
-                  "name": "可视农业",
-                  "id": "3",
-                  "children": [
-                     {
-                     "name": "可视化系统",
-                     "path": "/monitor",
-                     "id": "4"
-                     }
-                  ]
-               },
-               {
-                  "name": "智能灌溉",
-                  "id": "5",
-                  "children": [
-                    //  {
-                    //  "name": "系统管理",
-                    //  "path": "/page3",
-                    //  "id": "6"
-                    //  }
-                  ]
-               },
-               {
-                  "name": "水价管理",
-                  "id": "7",
-                  "children": [
-                     {
-                     "name": "地图展示",
-                     "path": "/page9",
-                     "id": "20"
-                    },
-                    {
-                     "name": "消费记录",
-                     "path": "/page10",
-                     "id": "21"
-                    },
-                    {
-                     "name": "充值记录",
-                     "path": "/page11",
-                     "id": "22"
-                    },
-                  ]
-               },
-               {
-                  "name": "地理信息",
-                  "id": "9",
-                  "children": [
-                    //  {
-                    //  "name": "设备列表",
-                    //  "path": "/page1",
-                    //  "id": "10"
-                    // }
-                  ]
-               },
-               {
-                  "name": "产品溯源",
-                  "id": "11",
-                  "children": [
-                    // {
-                    //  "name": "农场管理1",
-                    //  "path": "/farmFieldsManger",
-                    //  "id": "23"
-                    // }
-                  ]
-               },
-               {
-                  "name": "系统管理",
-                  "id": "13",
-                  "children": [
-                     {
-                     "name": "用户管理",
-                     "path": "/page4",
-                     "id": "14"
-                     },
-                     {
-                     "name": "角色管理",
-                     "path": "/page6",
-                     "id": "15"
-                     },
-                     {
-                     "name": "主题定制",
-                     "path": "/page7",
-                     "id": "16"
-                     },
-                  ]
-               },
-               {
-                  "name": "设备管理",
-                  "id": "17",
-                  "children": [
-                     {
-                     "name": "设备列表",
-                     "path": "/page8",
-                     "id": "18"
-                     }
-                  ]
-               }
-          ];
-          
-          let userType = res.data.data.myuser_type; //用户类型
-          let userName = res.data.data.username; //用户名
-          let myuid = res.data.data.myuid; //用户id
-          
-          sessionStorage.setItem("myuser_type", userType);
-          sessionStorage.setItem("myuid", myuid);
-
-          if(menuLists[0].name=='数据监测'){
-            if(userType == 4){
-              menuLists[0].children= [
-                {
+      var menuLists=[
+        {
+              "name": "数据监测",
+              "id": "1",
+              "children": [
+                  {
                   "name": "设备列表",
                   "path": "/page1",
                   "id": "2"
-                }
-              ]
-            }else{
-              menuLists[0].children= [
-                {
+                  },
+                  {
                   "name": "项目列表",
                   "path": "/baseAll",
                   "id": "19"
+                  },
+              ]
+            },
+            {
+              "name": "可视农业",
+              "id": "3",
+              "children": [
+                  {
+                  "name": "可视化系统",
+                  "path": "/monitor",
+                  "id": "4"
+                  }
+              ]
+            },
+            {
+              "name": "智能灌溉",
+              "id": "5",
+              "children": [
+                //  {
+                //  "name": "系统管理",
+                //  "path": "/page3",
+                //  "id": "6"
+                //  }
+              ]
+            },
+            {
+              "name": "水价管理",
+              "id": "7",
+              "children": [
+                  {
+                  "name": "地图展示",
+                  "path": "/page9",
+                  "id": "20"
+                },
+                {
+                  "name": "消费记录",
+                  "path": "/page10",
+                  "id": "21"
+                },
+                {
+                  "name": "充值记录",
+                  "path": "/page11",
+                  "id": "22"
                 },
               ]
+            },
+            {
+              "name": "地理信息",
+              "id": "9",
+              "children": [
+                //  {
+                //  "name": "设备列表",
+                //  "path": "/page1",
+                //  "id": "10"
+                // }
+              ]
+            },
+            {
+              "name": "产品溯源",
+              "id": "11",
+              "children": [
+                // {
+                //  "name": "农场管理1",
+                //  "path": "/farmFieldsManger",
+                //  "id": "23"
+                // }
+              ]
+            },
+            {
+              "name": "系统管理",
+              "id": "13",
+              "children": [
+                  {
+                  "name": "用户管理",
+                  "path": "/page4",
+                  "id": "14"
+                  },
+                  {
+                  "name": "角色管理",
+                  "path": "/page6",
+                  "id": "15"
+                  },
+                  {
+                  "name": "主题定制",
+                  "path": "/page7",
+                  "id": "16"
+                  },
+              ]
+            },
+            {
+              "name": "设备管理",
+              "id": "17",
+              "children": [
+                  {
+                  "name": "设备列表",
+                  "path": "/page8",
+                  "id": "18"
+                  }
+              ]
             }
-          }
-          this.menuList = menuLists;
+      ];
+        console.log(22)
+      
+      let userType = 1; //用户类型
+      let userName = '管理员'; //用户名
+      let myuid = 4; //用户id
+      this.username = userName;
+      sessionStorage.setItem("myuser_type", userType);
+      sessionStorage.setItem("myuid", myuid);
+
+      if(menuLists[0].name=='数据监测'){
+        if(userType == 4){
+          menuLists[0].children= [
+            {
+              "name": "设备列表",
+              "path": "/page1",
+              "id": "2"
+            }
+          ]
+        }else{
+          menuLists[0].children= [
+            {
+              "name": "项目列表",
+              "path": "/baseAll",
+              "id": "19"
+            },
+          ]
         }
-      });
+      }
+      this.menuList = menuLists;
     },
     outSys() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.logout_user",
-      }).then((res) => {
-        if (res.data.message == "") {
-          window.localStorage.removeItem("isLogin");
-          window.localStorage.removeItem("session");
-          window.sessionStorage.removeItem("menuTabs");
-          window.sessionStorage.removeItem("menuTabsValue");
-          this.$router.push("/login");
-        }
-      });
+      sessionStorage.clear();
+      this.$router.push("/login");
     },
 
   },
   //生命周期 - 创建完成(可以访问当前this实例)
-  created() {},
+  created() {
+  },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     this.getNavList();
-    this.getUserInfo();
-    this.username = localStorage.getItem("cUsername");
-    // window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前

+ 34 - 34
src/main.js

@@ -8,7 +8,7 @@ import router from './router'
 import axios from 'axios'
 Vue.prototype.$axios = axios //全局注册,使用方法为:this.$axios
 Vue.prototype.$EventBus = new Vue()
-import './util/http.js'
+// import './util/http.js'
 import {
   VueJsonp
 } from 'vue-jsonp' //解决百度地图跨域
@@ -187,39 +187,39 @@ Vue.filter('equipType', function (i) {
   }
 })
 
-router.beforeEach((to, from, next) => {
-  let isLogin = JSON.parse(localStorage.getItem('isLogin'));
-  if (to.path === '/login') {
-    if (isLogin) {
-      next('/index/home') //登录后默认跳转到首页
-    } else {
-      next()
-    }
-  } else if (to.name == 'TracebackDetailApp'||to.name =='TracebackDetail'||to.name =='FaultUp' || to.name =='PlantGuard'||to.name=='Page1'||to.name=='Page2') {
-    next()
-  } else {
-    // let type = to.meta.login_require; //是否需要登录,为了解决扫码在手机上看
-    axios({
-      method: 'POST',
-      url: '/api/api_gateway?method=user.login.users_check'
-    }).then(res => {
-      if (res.data.data == 1) { //登录状态
-        // console.log('check_success');
-        localStorage.setItem("isLogin", true)
-        next()
-        // checkLoginRequire(type, isLogin, next)
-      } else { //session过期 
-        // console.log('check_false');
-        localStorage.setItem("isLogin", false)
-        next('/login');
-      }
-    }, err => {
-      // console.log('check_error');
-      localStorage.setItem("isLogin", false);
-      next('/login');
-    })
-  }
-})
+// router.beforeEach((to, from, next) => {
+//   let isLogin = JSON.parse(localStorage.getItem('isLogin'));
+//   if (to.path === '/login') {
+//     if (isLogin) {
+//       next('/index/home') //登录后默认跳转到首页
+//     } else {
+//       next()
+//     }
+//   } else if (to.name == 'TracebackDetailApp'||to.name =='TracebackDetail'||to.name =='FaultUp' || to.name =='PlantGuard'||to.name=='Page1'||to.name=='Page2') {
+//     next()
+//   } else {
+//     // let type = to.meta.login_require; //是否需要登录,为了解决扫码在手机上看
+//     axios({
+//       method: 'POST',
+//       url: '/api/api_gateway?method=user.login.users_check'
+//     }).then(res => {
+//       if (res.data.data == 1) { //登录状态
+//         // console.log('check_success');
+//         localStorage.setItem("isLogin", true)
+//         next()
+//         // checkLoginRequire(type, isLogin, next)
+//       } else { //session过期 
+//         // console.log('check_false');
+//         localStorage.setItem("isLogin", false)
+//         next('/login');
+//       }
+//     }, err => {
+//       // console.log('check_error');
+//       localStorage.setItem("isLogin", false);
+//       next('/login');
+//     })
+//   }
+// })
 
 // 引入vuex-store
 import store from './store/store';

+ 147 - 49
src/pages/monitor/monitorSystem/Monitor.vue

@@ -78,7 +78,15 @@
             <div
               style="width: 100%; height: 100%"
               :id="'my-video' + count"
-            ></div>
+            >
+            <video 
+              class="video-js vjs-default-skin vjs-big-play-centered myvideo" 
+              autoplay
+              loop
+              >  
+              <source :src="videourl[count]" type="video/mp4" > 
+              </video> 
+            </div>
           </div>
         </div>
         <div class="split-screen">
@@ -311,7 +319,7 @@ export default {
       Idlist: [], //右侧设备列表
       divMainHeight: "", //视频盒子高度
       selected: null, //默认选中第一台设备
-      divName: "", //默认选中第一台设备
+      divName: 1, //默认选中第一台设备
       html: "", //插件播放内容
       picUrl: "", //视频拍照地址
       playBackDialogVisible: false,
@@ -346,6 +354,18 @@ export default {
         jk_type: "",
         equip_type:2,//1 苗情 2 可视化
       },
+  		videourl:[
+        require('../../../../static/images/mp36.mp4'),
+        require('../../../../static/images/mp37.mp4'),
+        require('../../../../static/images/mp35.mp4'),
+        require('../../../../static/images/mp37.mp4'),
+        require('../../../../static/images/mp35.mp4'),
+        require('../../../../static/images/mp36.mp4'),
+        require('../../../../static/images/mp37.mp4'),
+        require('../../../../static/images/mp35.mp4'),
+        require('../../../../static/images/mp36.mp4'),
+        require('../../../../static/images/mp35.mp4'),
+      ]
     };
   },
   filters: {
@@ -364,15 +384,93 @@ export default {
   methods: {
     //获取视频列表
     getJkList() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=camera.camera_manage.list_camera",
-        data: this.qs.stringify({ page: this.currPage}),
-      }).then((res) => {
-        this.Idlist = res.data.data.data;
-        this.totalPage = Math.ceil(res.data.data.counts / 10);
-        this.initMonitor(); //进入页面默认1屏都显示视频
-      });
+      var data = {
+        "message": "",
+        "errorCode": 0,
+        "data": {
+            "counts": 20,
+            "data": [
+                {
+                    "photo_num": 0,
+                    "device_id": "F31782127-1",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "F32700203-1",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "F16446557",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "F31782127",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "E94969152",
+                    "jktype": "1",
+                    "device_name": " ",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "E42363248",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 1,
+                    "device_id": "E30592812",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 1,
+                    "device_id": "235185770",
+                    "jktype": "1",
+                    "device_name": "",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "D75675201",
+                    "jktype": "1",
+                    "device_name": " ",
+                    "status": "1"
+                },
+                {
+                    "photo_num": 0,
+                    "device_id": "C77523175",
+                    "jktype": "1",
+                    "device_name": "测试",
+                    "status": "1"
+                }
+            ],
+            "accessToken": "at.73remw2k1b59lr346py7y9eg9fmk1ws9-8dvfbwzooj-0tir86m-kz4y1nruo"
+        },
+        "formError": {},
+        "params": {
+            "page": "1"
+        }
+      }
+      this.Idlist = data.data.data;
+      this.totalPage = Math.ceil(data.data.counts / 10);
+      // this.initMonitor(); //进入页面默认1屏都显示视频
     },
     getJkList2() {
       this.$axios({
@@ -493,48 +591,42 @@ export default {
     selectEquip(device_id, jktype, index, videotape) {
       if (this.selected !== "") {
         //判断是否选中左侧监控
-        document
-          .getElementsByClassName("selected")[0]
-          .getElementsByClassName("current")[0].innerHTML = device_id; //更换current里的设备id值
+        // document
+        //   .getElementsByClassName("selected")[0]
+        //   .getElementsByClassName("current")[0].innerHTML = device_id; //更换current里的设备id值
         console.log(device_id);
         this.jktype = jktype;
         this.activeIndex = index; //菜单选中状态
         this.id = device_id; //保存选中的设备id
         this.videotape = videotape;
         console.log(this.divName);
-        this.$axios({
-          url: "/api/api_gateway?method=camera.camera_manage.addr_camera",
-          method: "POST",
-          data: this.qs.stringify({ device_id: device_id}),
-        }).then((res) => {
-          var data = eval("(" + res.data.data + ")");
-          let hlsHdSrc = data.hlsHd;
-          let playHtml = `<video id="n${this.divName}"
-								 style='width: 100%;height: 100%;' src="${hlsHdSrc}" autoplay  poster='' muted controls playsInline  webkit-playsinline>
-                 </video>`;
+        let target = document.getElementById(this.divName);
+        let playHtml = '<video style="width:100%;height:100%" class="video-js vjs-default-skin vjs-big-play-centered myvideo" autoplay loop><source src="'+this.videourl[9]+'" type="video/mp4" ></video>';
+        target.innerHTML = playHtml;
+        // this.$axios({
+        //   url: "/api/api_gateway?method=camera.camera_manage.addr_camera",
+        //   method: "POST",
+        //   data: this.qs.stringify({ device_id: device_id}),
+        // }).then((res) => {
+        //   var data = eval("(" + res.data.data + ")");
+        //   let hlsHdSrc = data.hlsHd;
+        //   let playHtml = `<video id="n${this.divName}"
+				// 				 style='width: 100%;height: 100%;' src="${hlsHdSrc}" autoplay  poster='' muted controls playsInline  webkit-playsinline>
+        //          </video>`;
                  
-          let target = document.getElementById(this.divName);
-          console.log(target);
-          target.removeChild(target.childNodes[0]);
-          target.innerHTML = playHtml;
-          this.$nextTick(() => {
-            this.videoObj[this.divName] = new EZUIKit.EZUIPlayer(`n${this.divName}`);
-          });
-        });
+        //   let target = document.getElementById(this.divName);
+        //   console.log(target);
+        //   target.removeChild(target.childNodes[0]);
+        //   target.innerHTML = playHtml;
+        //   this.$nextTick(() => {
+        //     this.videoObj[this.divName] = new EZUIKit.EZUIPlayer(`n${this.divName}`);
+        //   });
+        // });
       }
     },
     //点击分屏
     splitView(num) {
       this.divNum = num;
-      console.log(this.videoObj);
-      for (let item in this.videoObj) {
-        console.log(item);
-        this.videoObj[item].stop();
-      }
-      this.videoObj = {}
-      this.$nextTick(() => {
-        this.initMonitor();
-      });
     },
     //点击视频
     selectVideo(e, i, divName) {
@@ -563,15 +655,17 @@ export default {
     },
     oneFullFun(el, i) {
       this.selected = i;
+      console.log(el);
+      
       let par = el.currentTarget.parentNode;
-      let current = par.getElementsByClassName("current")[0].innerHTML;
-      if (current == "") {
-        return false;
-      } else if (current.indexOf("device_id") == -1) {
-        this.oneId = current;
-      } else {
-        this.oneId = JSON.parse(current).device_id;
-      }
+      // let current = par.getElementsByClassName("current")[0].innerHTML;
+      // if (current == "") {
+      //   return false;
+      // } else if (current.indexOf("device_id") == -1) {
+      //   this.oneId = current;
+      // } else {
+      //   this.oneId = JSON.parse(current).device_id;
+      // }
       this.$nextTick(() => {
         par.classList.toggle("fullScreen");
         this.oneFScreen = !this.oneFScreen; //点击菜单栏全屏按钮后,再点击单个监控全屏时,隐藏恢复按钮
@@ -1051,4 +1145,8 @@ li {
     }
   }
 }
+.myvideo{
+  width: 100%;
+  height: 100%;
+}
 </style>

+ 180 - 176
src/pages/plantGuard/baseAll.vue

@@ -1,43 +1,32 @@
 <!--  -->
 <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 
-          v-for="(marker, index) in markers" 
-          :key="index" 
-          :position="marker.addr" 
-          :events="markersStatus.events" 
-          :visible="markersStatus.visible" 
-          :draggable="markersStatus.draggable" 
-          :icon="markersStatus.icon"
-          :offset="markersStatus.iconOffset"
-          :label="{content:marker.projectname,offset:[marker.projectname.length*-5/2,60]}"
-          :vid="index">
-        </el-amap-marker>
-        <!-- <el-amap-text 
-          v-for="(text,index) in markers" 
-          :key="index+markers.length"
-          :text="text.text" 
-          :offset="text.offset" 
-          :position="text.position" 
-          :events="text.events">
-        </el-amap-text> -->
-      </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="goPage1(1)" class="project1">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>智慧农田项目</p>
+      </div>
+      <div ref="project2" @click="goPage1()" class="project2">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>小麦智慧种植2</p>
+      </div>
+      <div ref="project3" @click="goPage1()" class="project3">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>小麦智慧种植3</p>
+      </div>
+      <div ref="project4" @click="goPage1()" class="project4">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>小麦智慧种植4</p>
+      </div>
+      <div ref="project5" @click="goPage1()" class="project5">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>小麦智慧种植5</p>
+      </div>
+      <div ref="project6" @click="goPage1()" class="project6">
+        <img src="../../../static/images/icon5.svg" alt="">
+        <p>小麦智慧种植6</p>
+      </div>
     </div>
   </div>
 </template>
@@ -45,8 +34,7 @@
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
 //例如:import 《组件名称》 from '《组件路径》';
-import VueAMap from "vue-amap";
-let amapManager = new VueAMap.AMapManager();
+
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {
@@ -54,57 +42,7 @@ export default {
   data() {
     //这里存放数据
     return {
-      amapManager,
-      center: [65.212881,31.279042],
-      zoom: 8,
-      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);
-        //       }
-        //     }
-        //   }
-      ],
-      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);
-        }
-      },
+
       equipStyleObject:[
         {
           url: require("@/assets/images/home/mapView/scd.png"), // 设别类型0
@@ -198,78 +136,84 @@ export default {
   watch: {},
   //方法集合
   methods: {
-    changeMapType(val){
-      let o = amapManager.getMap();    
-      if(val==0){
-        this.xyzTileLayer.hide()
-        this.xyzTileLayer2.hide()
-      }else{
-        this.xyzTileLayer.show()
-        this.xyzTileLayer2.show()
-      }
-    },
+    // 缩放图片
+    rollImg() {
+      /* 获取当前页面的缩放比 若未设置zoom缩放比,则为默认100%,即1,原图大小 */
+ 
+      var zoom = parseInt(this.$refs.imgDiv.style.zoom) || 100;
+      /* event.wheelDelta 获取滚轮滚动值并将滚动值叠加给缩放比zoom wheelDelta统一为±120,其中正数表示为向上滚动,负数表示向下滚动 */
+ 
+      zoom += event.wheelDelta / 12;
+      /* 最小范围 和 最大范围 的图片缩放尺度 */
  
-    iconFormat(equip_ip, item) {
-      switch (equip_ip + "") {
-        case "2":
-          item.icon = require("@/assets/images/home/mapView/scd.png");
-          break;
-        case "3":
-          item.icon = require("@/assets/images/home/mapView/cbd.png");
-          break;
-        case "4":
-          item.icon = require("@/assets/images/home/mapView/xyq.png");
-          break;
-        case "5":
-          item.icon = require("@/assets/images/home/mapView/qxz.png");
-          break;
-        case "6":
-          item.icon = require("@/assets/images/home/mapView/jk.png");
-          break;
-        case "7":
-          item.icon = require("@/assets/images/home/mapView/bzy.png");
-          break;
-        case "9":
-          item.icon = require("@/assets/images/home/mapView/tccb.png");
-          break;
+      if (zoom >= 100 && zoom < 500) {
+        this.$refs.imgDiv.style.zoom = zoom + "%";
+        this.$refs.project1.style.zoom = zoom + "%";
+        this.$refs.project2.style.zoom = zoom + "%";
+        this.$refs.project3.style.zoom = zoom + "%";
+        this.$refs.project4.style.zoom = zoom + "%";
+        this.$refs.project5.style.zoom = zoom + "%";
+        this.$refs.project6.style.zoom = zoom + "%";
       }
+      return false;
     },
-    getEquipList() {
-      let uid = sessionStorage.getItem("myuid");
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=user.login.user_project_addr",
-        data: this.qs.stringify({
-          // uid:uid
-        })
-      }).then(res => {
-        if (res.data.message == ""){
-          this.markers = res.data.data.user_project;
-          this.txtLabels = []
-          res.data.data.user_project.forEach((item) => {
-            this.txtLabels.push(new AMap.Text({
-              position: item.addr
-            }))
-          });
-          this.$nextTick(()=>{
-            let o = amapManager.getMap();
-            o.setFitView(this.txtLabels)
-          })
-        } else {
-          this.$message.error(res.data.message);
-        }
+     // 拖动图片
+    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 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";
+
+        project1.style.left = e.pageX - x+700 + "px";
+        project1.style.top = e.pageY - y +400 + "px";
+
+        project2.style.left = e.pageX - x+300 + "px";
+        project2.style.top = e.pageY - y +100 + "px";
+
+        project3.style.left = e.pageX - x+500 + "px";
+        project3.style.top = e.pageY - y +700 + "px";
+
+        project4.style.left = e.pageX - x+1200 + "px";
+        project4.style.top = e.pageY - y +450 + "px";
+
+        project5.style.left = e.pageX - x+900 + "px";
+        project5.style.top = e.pageY - y +230 + "px";
+
+        project6.style.left = e.pageX - x+1300 + "px";
+        project6.style.top = e.pageY - y +80 + "px";
+
+      }
+      // 添加鼠标抬起事件,鼠标抬起,将事件移除
+      img.addEventListener("mouseup", function() {
+        left.removeEventListener("mousemove", move);
+      });
+      // 鼠标离开父级元素,把事件移除
+      left.addEventListener("mouseout", function() {
+        left.removeEventListener("mousemove", move);
       });
     },
-    equipMarkerClick(item) {
-    
-    },
-
+    goPage1(flag){
+      this.$router.push('page1')
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    this.getEquipList()
+    // this.getEquipList()
   },
   beforeCreate() {}, //生命周期 - 创建之前
   beforeMount() {}, //生命周期 - 挂载之前
@@ -284,34 +228,94 @@ export default {
 </script>
 <style scoped lang="less">
 .inner{
+    background: #35453a;
     height: 100%;
     position: relative;
     .mapCover{
         height: 100%;
+        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: 100px;
+          left: 300px;
+          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;
+          }
+        }
     }
-    .mapTypebox{
-        position: absolute;
-        right: 20px;
-        top:30px;
-        background: #fff;
-        padding: 5px;
-        border-radius: 5px;
-    }
-}
-// 标注点提示文本
-/deep/.amap-marker-label{
-      background: transparent;
-    border: none;
-    color: red;
-    font-size: 14px;
-    font-weight: 700;
-    text-shadow: #fff 1px 0 0, #fff 0 1px 0, #fff -1px 0 0, #fff 0 -1px 0;
-}
-/deep/.el-radio__input.is-checked .el-radio__inner{
-  border-color: #0195ff;
-  background: #0195ff;
-}
-/deep/.el-radio__input.is-checked + .el-radio__label {
-  color: #0195ff;
 }
+
 </style>

+ 1 - 1
src/pages/plantGuard/equipCtrls/bzyctrl.vue

@@ -273,7 +273,7 @@ created() {
 },
 //生命周期 - 挂载完成(可以访问DOM元素)
 mounted() {
-  this.equipSet()
+  // this.equipSet()
 },
 beforeCreate() {}, //生命周期 - 创建之前
 beforeMount() {}, //生命周期 - 挂载之前

+ 1 - 1
src/pages/plantGuard/equipCtrls/cbdctrl.vue

@@ -272,7 +272,7 @@ created() {
 },
 //生命周期 - 挂载完成(可以访问DOM元素)
 mounted() {
-  this.EquipControl()
+//   this.EquipControl()
 },
 beforeCreate() {}, //生命周期 - 创建之前
 beforeMount() {}, //生命周期 - 挂载之前

+ 1 - 1
src/pages/plantGuard/equipCtrls/scdctrl.vue

@@ -198,7 +198,7 @@ created() {
 },
 //生命周期 - 挂载完成(可以访问DOM元素)
 mounted() {
-  this.EquipControl()
+  // this.EquipControl()
 },
 beforeCreate() {}, //生命周期 - 创建之前
 beforeMount() {}, //生命周期 - 挂载之前

+ 2 - 2
src/pages/plantGuard/equipCtrls/simCode.vue

@@ -162,8 +162,8 @@ export default {
   created() {},
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
-    this.simSet();
-    this.refreshData();
+    // this.simSet();
+    // this.refreshData();
   },
   filters: {
     simStatus(val) {

+ 1 - 1
src/pages/plantGuard/equipCtrls/xycbctrl.vue

@@ -200,7 +200,7 @@ created() {
 },
 //生命周期 - 挂载完成(可以访问DOM元素)
 mounted() {
-  this.EquipControl()
+  // this.EquipControl()
 },
 beforeCreate() {}, //生命周期 - 创建之前
 beforeMount() {}, //生命周期 - 挂载之前

Файловите разлики са ограничени, защото са твърде много
+ 12213 - 151
src/pages/plantGuard/equipHistoryDate.vue


Файловите разлики са ограничени, защото са твърде много
+ 11301 - 35
src/pages/plantGuard/equipHistoryDateQxz.vue


+ 85 - 96
src/pages/plantGuard/equipInfo.vue

@@ -19,10 +19,10 @@
       <div>设备名称:{{info.device_name || '--'}}</div>
       <div>在线状态:<span :class="[info.device_status?'online':'offline']">{{info.device_status?'在线':'离线'}}</span></div>
       <template v-if="equipType==2">
-        <div>设备版本:{{info.dver_num || '--'}}</div>
+        <div>设备版本:{{info.dtype || '--'}}</div>
       </template>
       <template v-if="equipType==3">
-        <div>设备版本:{{info.dver_num || '--'}}</div>
+        <div>设备版本:{{info.dtype || '--'}}</div>
       </template>
       <template v-if="equipType==4">
         <div>添加诱芯:
@@ -36,7 +36,7 @@
         </div>
       </template>
       <template v-if="equipType==5">
-        <div>电压:{{info.device_status || '--'}}V 信号强度:{{info.device_status || '--'}}</div>
+        <div>电压:{{info.volt || '--'}}V 信号强度:{{info.rssi || '--'}}</div>
       </template>
       <template v-if="equipType==7">
         <div>载玻片、培养液更换:
@@ -86,50 +86,75 @@ export default {
   methods: {
     // 设备状态弹框
     getEquipInfo(id, device_status) {
-      if(this.equipType==5){
-        this.$axios({
-          method: "POST",
-          url: "/api/api_gateway?method=weather.weather.qxz_page",
-          data: this.qs.stringify({
-            device_type_id: this.equipType,
-            device_id: id,
-            page: 1
-          })
-        }).then(res => {
-          if (res.data.message == "") {
-            if(res.data.data.counts == 0){
-              this.equipDataState=false;
-              this.equipData = {}
-            }else{
-              this.equipDataState = true;
-              this.equipData = res.data.data.ids[0]
-            }
-          }
-        });
-      }else{
-        this.$axios({
-          method: "POST",
-          url: "/api/api_gateway?method=forecast.worm_lamp.lamp_list",
-          data: this.qs.stringify({
-            device_type_id: this.equipType,
-            page_size: 1,
-            device_id: id,
-            page: 1
-          })
-        }).then(res => {
-          if (res.data.message == "") {
-            if(res.data.data.counts>0){
-              this.info = res.data.data.data[0]
-            }else{
-              this.info = {
-                address: "",
-                dver_num: "--",
-                device_status:0,
-                status_time: 0
-              }
-            }
-          }
-        });
+      if(this.equipType==2){
+        this.info = {
+          address: "河南省郑州市金水区",
+          addtime: 1616488677,
+          d_id: 830,
+          device_code: "",
+          device_model: "",
+          device_name: "杀虫灯",
+          dtype: "1.3.2-FXS(1)",
+          imei: "866950044786944",
+          is_online: 1,
+          lat: "34.7972",
+          lng: "113.664936",
+        }
+      }else if(this.equipType==3){
+        this.info = {
+          address: "河南省郑州市金水区",
+          addtime: 1615971968,
+          d_id: 829,
+          device_code: "",
+          device_model: "",
+          device_name: "测报灯",
+          dtype: "1.1.4(HK)-1.14.22",
+          imei: "867435052201324",
+          is_online: 0,
+          lat: "34.8088073",
+          lng: "113.6624298"
+        }
+      }else if(this.equipType==4){
+        this.info = {
+          address: "河南省郑州市金水区",
+          addtime: 1616384786,
+          d_id: 837,
+          device_code: 0,
+          device_model: 1,
+          device_name: "性诱测报",
+          dtype: "V1.0.23",
+          imei: "868739051977118",
+          is_online: 0,
+          lat: "34.808668",
+          lng: "113.665406"
+        }
+      }else if(this.equipType==5){
+        this.info = {
+          d_id: 825,
+          equip_id: "865553058428964",
+          device_name: "环境监测",
+          is_online: 0,
+          lat: "34.809948",
+          lng: "113.660789",
+          off_time: "",
+          rssi: "10",
+          addtime: 1616485970,
+          volt: "11.9"
+        }
+      }else if(this.equipType==7){
+        this.info = {
+          address: "河南省郑州市金水区",
+          addtime: 1610676431,
+          d_id: 802,
+          device_code: "",
+          device_model: "",
+          device_name: "孢子仪",
+          dtype: "1.0-1.12.22",
+          imei: "867435052203577",
+          is_online: 0,
+          lat: "34.806517",
+          lng: "113.660311"
+        }
       }
     },
     // 添加诱芯
@@ -138,67 +163,31 @@ export default {
       this.lureShow = !this.lureShow;
     },
     addYx() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=device.device_manage.get_spore_time",
-        data: this.qs.stringify({
-          device_type_id: 4,
-          d_id:this.info.d_id,
-        }),
-      }).then((res) => {
-        if (res.data.message == "") {
-          let data = res.data.data;
-          this.lure = data.decoy;
-        }
-      });
+      this.lure = this.editlure
     },
     submitYx() {
       if (!this.editlure) {
         this.$message.warning("请填写诱芯名称");
         return false
       }
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=device.device_manage.updata_spore_time",
-        data: this.qs.stringify({
-          device_type_id: 4,
-          d_id: this.info.d_id,
-          decoy: this.editlure,
-        }),
-      }).then((res) => {
-        if (res.data.message == "") {
-          this.$message.success("添加成功!");
-        } else {
-          this.$message.error(res.data.message);
-        }
-         this.changeLure();
-      });
+      this.$message.success("添加成功!");
+      this.lure = this.editlure
+      this.lureShow = !this.lureShow;
+
     },
     // 载玻片、培养液
     setTime(){
       this.getSporeTime()
     },
     getSporeTime() {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=device.device_manage.get_spore_time",
-        data: this.qs.stringify({
-          device_type_id: this.equipType,
-          d_id:this.info.d_id,
-        }),
-      }).then((res) => {
-        if (res.data.message == "") {
-          let data = res.data.data;
-          this.glass = data.glass_slide_time;
-          this.cultivate = data.cultivate_time;
-          var dat = {
-            glass:this.glass,
-            cultivate:this.cultivate,
-            d_id:this.info.d_id,
-          }
-          this.$emit('child-event',dat)
-        }
-      });
+      this.glass = 1609977600;
+      this.cultivate = 1611360000;
+      var dat = {
+        glass:this.glass,
+        cultivate:this.cultivate,
+        d_id:this.info.d_id,
+      }
+      this.$emit('child-event',dat)
     },
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 220 - 25
src/pages/plantGuard/equipState.vue

@@ -48,10 +48,10 @@ export default {
     return {
         equipState_dict,
         showState: {
-            "2": ["ds","ws","tbs","rps","tps","dps","tt","ct","at","ah","cv","bv","csq","dver","addtime"],
+            "2": ["ds","ws","rps","tps","dps","tt","ct","at","ah","cv","bv","csq","dver","addtime"],
             "3": ["ds","ws","tt","hs","at","ah","upds","dnds","vbat","rps","tps","lps","lamp","csq","dver","addtime"],
-            "4": ["ds","ws","tt","hs","at","ah","upds","dnds","vbat","rps","tps","lps","lamp","csq","dver","addtime"],
-            "7": ["ds","at","ah","set_temp","pre_temp","bs","rps","usb_sta","vbat","csq","dver","addtime"],
+            "4": ["ds","ws","ts","bs","at","ah","cv","rps","tps","dps","infr_ct","csq","dver","addtime"],
+            "7": ["at","ah","set_temp","pre_temp","usb_sta","vbat","csq","dver","addtime"],
         },
         equipData:{},
         equipDataState:false
@@ -65,29 +65,224 @@ export default {
   methods: {
     // 设备状态弹框
     equipStateSet(id, device_status) {
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=forecast.worm_lamp.device_history_data",
-        data: this.qs.stringify({
-          device_type_id: this.equipType,
-          page_size: 1,
-          device_id: id,
-          page: 1
-        })
-      }).then(res => {
-        if (res.data.message == "") {
-          if(res.data.data.counts == 0){
-            this.equipDataState=false;
-            this.equipData = {}
-          }else{
-            this.equipDataState = true;
-            this.equipData = res.data.data.data[0].d_h_t
-            console.log(this.equipData);
-            console.log('this.equipData');
-            
-          }
+      this.equipDataState = true;
+      if(this.equipType == 2){
+        this.equipData = {
+          addtime: 1616488677,
+          ah: "23.0",
+          at: "31.2",
+          bv: "14.168",
+          csq: 16,
+          ct: 0,
+          cv: "23.294",
+          dps: 0,
+          ds: 1,
+          dver: "1.3.2-FXS(1)",
+          et: 2,
+          gps: 1,
+          iccid: "89860476232090003011",
+          imei: "866950044786944",
+          info: 3,
+          lat: "34.8107933",
+          lng: "113.6134650",
+          lps: 2,
+          lux: 21,
+          new_hum: "22",
+          new_tem: "22",
+          proj: "SCD_IOT",
+          rcnt: 19,
+          rps: 0,
+          st: 20,
+          stamp: "20210323163752",
+          stm8vs: 1,
+          tps: 0,
+          ts: 0,
+          tt: 4,
+          vps: 0,
+          ws: 2,
+        }
+      }
+      if(this.equipType == 3){
+        this.equipData = {
+          addtime: 1615971968,
+          ah: "23",
+          at: "12",
+          batStatus: 1,
+          collt: 20,
+          csq: 15,
+          current: "126.75",
+          dat_f: 20,
+          dnds: 0,
+          ds: 1,
+          dtype: 3,
+          dver: "1.1.4(HK)-1.14.22",
+          et: 5,
+          fuse_voltage: "13.16",
+          gps: 2,
+          hrt: 25,
+          hs: 0,
+          hst: 110,
+          htim: 20,
+          iccid: "89860476232090133960",
+          imei: "867435052201324",
+          lamp: 0,
+          lat: "034.8088073",
+          lng: "113.6624298",
+          lps: 0,
+          proj: "DTU_CBD",
+          rcnt: 68,
+          rps: 0,
+          shake: 1,
+          shake_sec: 1,
+          st: 20,
+          stamp: "20210317170606",
+          tph: 70,
+          tpl: 5,
+          tps: 0,
+          ts: 0,
+          tt: 8,
+          upds: 0,
+          vbat: "13.28",
+          ws: 0,
+        }
+      }
+      if(this.equipType == 4){
+        this.equipData = {
+          addtime: 1616384786,
+          ah: 26.4,
+          at: 16.8,
+          bs: 0,
+          bt_ct: "4",
+          btype: 0,
+          bv: 12769,
+          clt_t: 30,
+          cs: 0,
+          csq: 29,
+          cv: 16,
+          dat_f: 10,
+          dps: 0,
+          ds: 1,
+          dtype: 4,
+          dver: "V1.0.23",
+          et: 2,
+          gps: 0,
+          iccid: "89860485192070244815",
+          imei: "868739051977118",
+          infr_ct: 0,
+          lat: "0",
+          lng: "0",
+          new_hum: "",
+          new_tem: "",
+          proj: "SEX_TRAP_1_4G",
+          rps: 0,
+          st: 20,
+          stamp: "20210322114626",
+          tps: 0,
+          ts: 0,
+          volt_ct: 0,
+          wind_drec: 666,
+          wind_sped: 66.6,
+          ws: 1,
         }
-      });
+      }if(this.equipType == 7){
+        this.equipData = {
+          addtime: 1610676431,
+          ah: "15",
+          at: "24",
+          batStatus: 0,
+          box_tem: "",
+          cold_sw: 0,
+          coll_time: ["13-16", "16-19"],
+          csq: 31,
+          cul_time: 1,
+          current: "78.15",
+          datt: 20,
+          drop_time: 1,
+          dtype: 7,
+          dver: "1.0-1.12.22",
+          fuse_voltage: "24.08",
+          gps: 2,
+          iccid: "89860476232090133968",
+          imei: "867435052203577",
+          imgres: 0,
+          lat: "034.8088073",
+          lng: "113.6624298",
+          new_hum: 66,
+          new_tem: 77,
+          on_off: 1,
+          pre_temp: 23,
+          proj: "DTU_CBD",
+          set_temp: 0,
+          stamp: "20210115100710",
+          staytime: 0,
+          turnon: 65,
+          usb_sta: 0,
+          vbat: "24.00",
+          wind_sw: 0,
+          work_sta: 0
+        }
+      }
+
+            this.equipDataState = true;
+            var dat = {
+                "errorCode": 0,
+                "message": "",
+                "params": {
+                    "page_size": "1",
+                    "device_type_id": "7",
+                    "device_id": "867435052203577",
+                    "page": "1"
+                },
+                "data": {
+                    "counts": 2,
+                    "data": [
+                        {
+                            "d_h_t": {
+                                "addtime": 1610676431,
+                                "at": "",
+                                "current": "78.15",
+                                "lng": "113.6624298",
+                                "drop_time": 1,
+                                "turnon": 65,
+                                "coll_time": [
+                                    "13-16",
+                                    "16-19"
+                                ],
+                                "usb_sta": 0,
+                                "iccid": "89860476232090133968",
+                                "imei": "867435052203577",
+                                "lat": "034.8088073",
+                                "fuse_voltage": "24.08",
+                                "cul_time": 1,
+                                "new_hum": 66,
+                                "gps": 2,
+                                "v_bat": "24.00",
+                                "dver": "1.0-1.12.22",
+                                "staytime": 0,
+                                "batStatus": 0,
+                                "imgres": 0,
+                                "wind_sw": 0,
+                                "proj": "DTU_CBD",
+                                "box_tem": "",
+                                "dtype": 7,
+                                "stamp": "20210115100710",
+                                "on_off": 1,
+                                "cold_sw": 0,
+                                "ah": "",
+                                "datt": 20,
+                                "csq": 31,
+                                "set_temp": 0,
+                                "new_tem": 77,
+                                "pre_temp": 23,
+                                "work_sta": 0
+                            }
+                        }
+                    ]
+                },
+                "formError": {}
+            }
+            this.equipData = dat.data.data[0].d_h_t
+ 
     }
   },
   //生命周期 - 创建完成(可以访问当前this实例)

+ 65 - 46
src/pages/plantGuard/equipStateQxz.vue

@@ -34,21 +34,72 @@ export default {
     // 设备状态弹框
     equipStateSet(id, device_status) {
       this.currImei = id;
-      this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=weather.weather.qxz_status",
-        data: this.qs.stringify({
-          device_type_id: this.equipType,
-          page_size: 1,
-          device_id: id,
-          page: 1
-        })
-      }).then(res => {
-        if (res.data.message == "") {
-          console.log(res.data.data.counts)
             let arr = new Array();
-            let conf = res.data.data.conf;
-            let dat = res.data.data.dat;
+            let conf = {
+              e1: "大气温度#℃",
+              e2: "大气湿度#%RH",
+              e3: "风速#m/s",
+              e4: "风向#°",
+              e5: "数字气压#hpa",
+              e6: "雨量累计#mm",
+              e7: "二氧化碳#PPM",
+              e8: "PM2.5#ug/m3",
+              e9: "PM10#ug/m3",
+              e10: "",
+              e11: "",
+              e12: "",
+              e13: "",
+              e14: "",
+              e15: "",
+              e16: "",
+              e17: "",
+              e18: "",
+              e19: "",
+              e20: "",
+              e21: "",
+              e22: "",
+              e23: "",
+              e24: "",
+              e25: "",
+              e26: "",
+              e27: "",
+              e28: "",
+              e29: "",
+              e30: "",
+            }
+            let dat = {
+              e1: "18#101#e1",
+              e2: "21#102#e2",
+              e3: "17#108#e3",
+              e4: "18#109#e4",
+              e5: "22#127#e5",
+              e6: "21#115#e6",
+              e7: "18#120#e7",
+              e8: "25#145#e8",
+              e9: "14#146#e9",
+              e10: "",
+              e11: "",
+              e12: "",
+              e13: "",
+              e14: "",
+              e15: "",
+              e16: "",
+              e17: "",
+              e18: "",
+              e19: "",
+              e20: "",
+              e21: "",
+              e22: "",
+              e23: "",
+              e24: "",
+              e25: "",
+              e26: "",
+              e27: "",
+              e28: "",
+              e29: "",
+              e30: "",
+              uptime: 1616485970,
+            }
             for (let i1 in conf) {
               if (conf[i1]) {
                 let arr2 = conf[i1].split("#");
@@ -70,38 +121,6 @@ export default {
               return a.e.slice(2) - b.e.slice(2);
             });
             this.reaTimeStatusList = arr;
-
-          //   let data = res.data.data.data[0].d_h_t;
-          //   this.equipStateList[5].val = device_status == 0 ? "离线" : "在线";
-          //   for (let item in data) {
-          //     if (item == "ds") {
-          //       this.equipStateList[0].val = data[item] == 0 ? "关机" : "开机";
-          //     } else if (item == "ws") {
-          //       switch (data[item]) {
-          //         case 0:
-          //           this.equipStateList[1].val = "待机";
-          //           break;
-          //         case 1:
-          //           this.equipStateList[1].val = "工作";
-          //           break;
-          //         case 2:
-          //           this.equipStateList[1].val = "充电";
-          //           break;
-          //       }
-          //     } else if (item == "tt") {
-          //       this.equipStateList[2].val =
-          //         data[item] == 0 ? "常亮" : data[item];
-          //     } else if (item == "clt") {
-          //       this.equipStateList[3].val = data[item] / 60;
-          //     } else if (item == "tbs") {
-          //       this.equipStateList[4].val = data[item] == 0 ? "正常" : "保护";
-          //     } else if (item == "rps") {
-          //       this.equipStateList[6].val = data[item] == 0 ? "正常" : "保护";
-          //     }
-          //   }
-        }
-      });
-      // this.equipStateDialogVisible = true;
     },
     editName(item,index){
       console.log(item)

+ 371 - 298
src/pages/plantGuard/page1.vue

@@ -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{

+ 74 - 21
src/pages/plantGuard/twentyFourHistoryDate.vue

@@ -46,27 +46,80 @@ export default {
   methods: {
     // 24小时数据
 		get24List(id) {
-			this.$axios({
-				method: 'POST',
-				url: '/api/api_gateway?method=weather.weather.qxz_day_data',
-				data: this.qs.stringify({ device_id: id })
-			}).then((res) => {
-				let arr = new Array()
-				let data = res.data.data.data
-				if (data && data.length > 0) {
-					for (let item of data) {
-						arr.push({
-							e: item.ekey,
-							name: item.enum[1],
-							min: item.min == '-99.99' ? 'N/A' : item.min,
-							mintime: item.mintime,
-							max: item.max == '-99.99' ? 'N/A' : item.max,
-							maxtime: item.maxtime
-						})
-					}
-					this.data24 = arr
-				}
-			})
+			this.data24 = [
+				{
+					e: 'e1',
+					name: '大气温度',
+					min: 18,
+					mintime: 1616485970,
+					max: 28,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e2',
+					name: '大气湿度',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e3',
+					name: '风速',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e4',
+					name: '风向',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e5',
+					name: '数字气压',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e6',
+					name: '雨量累计',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e7',
+					name: '二氧化碳',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e8',
+					name: 'PM2.5',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+				{
+					e: 'e9',
+					name: 'PM10',
+					min: 32,
+					mintime: 1616485970,
+					max: 15,
+					maxtime: 1616486000
+				},
+			]
 		}
   },
   //生命周期 - 创建完成(可以访问当前this实例)

BIN
static/images/监控.rar