zhangyun 4 éve
szülő
commit
a82c4f5fac

+ 2 - 0
config/index.js

@@ -12,7 +12,9 @@ module.exports = {
     proxyTable: {
       '/api': {
         // target: 'http://182.92.193.64:8002/',
+        // target: 'http://192.168.1.77:8005/',
         target: 'http://8.136.98.49:8005/',
+        // target: "http://182.92.193.64:8002", //测试环境
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api' //重写接口

BIN
dist.rar


+ 46 - 4
src/components/index.vue

@@ -132,8 +132,12 @@
         <div class="content">
             <!-- <div>{{menuTabsValue}}</div> -->
             <!-- <keep-alive> -->
-              <router-view></router-view>
+              <!-- <router-view></router-view> -->
             <!-- </keep-alive> -->
+            <keep-alive>
+              <router-view v-if="$route.meta.keepAlive"></router-view>
+            </keep-alive>
+            <router-view v-if="!$route.meta.keepAlive"></router-view>
         </div>
       </el-main>
     </el-container>
@@ -237,6 +241,8 @@ export default {
   //监控data中的数据变化
   watch: {
     '$route' (to, from) {
+         console.log('--------------');
+         console.log(to.meta.keepAlive);
       let flag = false
       for (let item of this.menuTabs) {
         if (item.name === to.meta.navname) {
@@ -298,9 +304,22 @@ export default {
   //方法集合
   methods: {
     topMenuClick(item, index) {
-      console.log(item);
+      // console.log(item);
+      // console.log(this.$router.options.routes);
       
       if(item.children){
+        this.$router.options.routes.forEach(route => { 
+          if(route.children && route.children.length){
+            route.children.forEach(child => { 
+              if(child.meta){
+                if(child.meta.navname == item.children[0].name){
+                  child.meta.keepAlive = false;
+                }
+              }
+            })
+          }
+        }) 
+
         this.currTopMenuId = item.name;
         this.leftMenuList = item.children;
         this.currLeftMenuId = item.children[0].name;
@@ -323,10 +342,23 @@ export default {
       
     },
     leftMenuClick(item, index) {
+      console.log(item);
+      
+      this.$router.options.routes.forEach(route => { 
+        if(route.children && route.children.length){
+          route.children.forEach(child => { 
+            if(child.meta){
+              if(child.meta.navname == item.name){
+                child.meta.keepAlive = false;
+              }
+            }
+          })
+        }
+      }) 
       this.currLeftMenuId = item.name;
       sessionStorage.setItem("currLeftMenuId", item.name);
       console.log(item)
-      if(item.path=="/operatData"){
+      if(item.path=="operatData"){
         this.$store.commit('setData',{
           name:'ele_operat_id',
           val:''
@@ -337,7 +369,6 @@ export default {
     //添加tab标签
     add_tabs (data) {
       this.menuTabs.push(data)
-      console.log(data);
     },
     //移除tab标签
     removeTab(targetName) {
@@ -371,6 +402,17 @@ export default {
     clickTab(tab) {
       console.log('tab')
       console.log(tab)
+      this.$router.options.routes.forEach(route => { 
+        if(route.children && route.children.length){
+          route.children.forEach(child => { 
+            if(child.meta){
+              if(child.meta.navname == this.menuTabs[tab.index].name){
+                child.meta.keepAlive = true;
+              }
+            }
+          })
+        }
+      })
       this.$router.push({path: this.menuTabs[tab.index].path})
       this.menuList.forEach((item)=>{
         if(item.name == this.menuTabs[tab.index].par){

+ 2 - 0
src/pages/plantGuard/disasterWarn/disasterWarnBase.vue

@@ -41,6 +41,7 @@
                         placeholder="请输入项目名称"
                         v-model="input"
                         suffix-icon="el-icon-search"
+                        @change='getEquipList'
                         clearable>
                     </el-input>
                 </div>
@@ -334,6 +335,7 @@ methods: {
         method: "POST",
         url: "/api/api_gateway?method=user.login.user_project_addr",
         data: this.qs.stringify({
+            projectname:this.input
         })
       }).then(res => {
         if (res.data.message == ""){

+ 4 - 0
src/pages/plantGuard/disasterWarn/disasterWarnList.vue

@@ -128,6 +128,10 @@ export default {
             if(res.data.message == ""){
               that.userList = res.data.data.data
               that.totalNum = res.data.data.nums;
+              for(var i=0;i<that.userList.length;i++){
+                that.userList[i].warning_time = that.formatTime(that.userList[i].warning_time*1000)
+              }
+              console.log(that.userList)
             }
 
           })

+ 7 - 42
src/pages/plantGuard/disasterWarn/warnPhoto.vue

@@ -357,6 +357,7 @@ export default {
         })
         .then((res) => {
           if(res.data.message == ""){
+            console.log(res.data.data.data)
             this.imgDataList = res.data.data.data
             this.totalNum = res.data.data.nums;
           }
@@ -417,56 +418,20 @@ export default {
     },
     downPhoto(arr) {
       let uid = this.$store.state.user_id;
-      let image_id = arr.join(",");
+      let id_list = JSON.stringify(arr);
       this.$axios({
         method: "post",
-        url: "/api/api_gateway?method=forecast.worm_lamp.get_task_id",
+        url: "/api/download",
+        responseType:'blob',
         data: this.qs.stringify({
-          image_id,
-          myuid: uid,
+          id_list,
+          device_id: this.id,
         }),
       }).then((res) => {
         if (res.data.message == "") {
           this.$message.success("图片下载中!");
           let that = this;
-          this.cy_id = res.data.data;
-          function downPhotoState() {
-            if (that.times >= 0) {
-              that.times--;
-              that
-                .$axios({
-                  method: "POST",
-                  url: "/api/api_gateway?method=forecast.worm_lamp.check_down",
-                  data: that.qs.stringify({
-                    get_id: that.cy_id,
-                  }),
-                })
-                .then((res) => {
-                  if (res.data.data) {
-                    // 判断后台从阿里云下载图片是否完成
-                    clearInterval(interval);
-                    that
-                      .$axios({
-                        method: "POST",
-                        url: "/api/image_down",
-                        withCredentials: true,
-                        responseType: "blob",
-                        data: that.qs.stringify({
-                          get_id: that.cy_id,
-                        }),
-                      })
-                      .then((res) => {
-                        that.downloadFile(res.data);
-                      });
-                  }
-                })
-                .catch((error) => this.$message.error(error));
-            } else {
-              clearInterval(interval);
-              that.$message.warning("图片下载失败!");
-            }
-          }
-          var interval = setInterval(downPhotoState, 1000);
+          that.downloadFile(res.data);
         }
       });
     },

+ 5 - 1
src/pages/plantGuard/disasterWarn/windowPopUp.vue

@@ -7,7 +7,7 @@
               <img src="../../../../static/images/disasterWarn/enterIcon.png" alt="">
             </div>
         </div>
-        <div class="msgInfo">
+        <div class="msgInfo" v-loading="loading" element-loading-background="rgba(12,20,44,0.8)">
           <div class="msgItem" v-for="(item,index) in msgList" :key="index">
             <div class="warnVal">
               <div>
@@ -62,6 +62,7 @@ export default {
         addtime:0,
       },
       recognitionImage:['http://182.92.193.64:8003/Basics/cbd/867435052201324/2021/3/11/20210311161847620251.jpg'],
+      loading:false
     };
   },
   methods: {
@@ -69,6 +70,8 @@ export default {
       this.visible = e.visible;
       this.currEquip = e.currEquip;
       this.infoWindow = e.infoWindow;
+      this.loading = true
+      this.msgList = []
       var end_time = parseInt(new Date().getTime()/1000);
       var start_time = end_time - (24 * 60 * 60)
       this.$axios({
@@ -82,6 +85,7 @@ export default {
         }),
       })
       .then((res) => {
+        this.loading = false
         if(res.data.message == ""){
           this.msgList = res.data.data.data
         }

+ 58 - 39
src/pages/plantGuard/irrigate/operatData.vue

@@ -4,7 +4,7 @@
     <el-card class="box-card">
 		<div class="seaarchBox">
 			<div class="searchLeft">
-				<el-input size="small" placeholder="请输入设备" v-model="searchVal" class="input-with-select">
+				<el-input size="small" @change="getList" clearable placeholder="请输入设备" v-model="searchVal" class="input-with-select">
 					<el-button size="small" slot="append" icon="el-icon-search"></el-button>
 				</el-input>
 				<span class="title">时间选择:</span>
@@ -14,11 +14,12 @@
 					type="daterange"
 					range-separator="至"
 					start-placeholder="开始日期"
-					end-placeholder="结束日期">
+					end-placeholder="结束日期"
+          @change="DateChange">
 				</el-date-picker>
 			</div>
 			<div class="exportRight">
-				<el-button size="small" type="blueInfo">导 出</el-button>
+				<!-- <el-button size="small" type="blueInfo">导 出</el-button> -->
 			</div>
 		</div>
        <template>
@@ -49,17 +50,18 @@ export default {
   data() {
 	  //这里存放数据
     return {
-		searchVal:this.$store.state.ele_operat_id,
-        // 
-	    value1:"",
-        role: "",
-        username: "",
-        txtInner:"筛选测试用户",
-        userList: [],
-            userGroupList: [],
-        roleList: [],
-        page: 1,
-        totalNum: 0,
+		  searchVal:this.$store.state.ele_operat_id,
+      value1:"",
+      begin:'',
+      end:'',
+      role: "",
+      username: "",
+      txtInner:"筛选测试用户",
+      userList: [],
+      userGroupList: [],
+      roleList: [],
+      page: 1,
+      totalNum: 0,
 
     };
   },
@@ -83,37 +85,54 @@ export default {
   //方法集合
   methods: {
     //获取用户列表
-    getList() {
-		this.$axios({
-        method: "post",
-        url: "/api/api_gateway?method=weather.weather.sf_control_data",
-        data: this.qs.stringify({
-          device_id: 15112501
-        })
-      }).then(res => {
-		  if(res.data.message==""){
-			  	this.userList = [];
-				this.totalNum = res.data.data.nums;
-			  	res.data.data.dat.forEach((item) => {
-					var relayName = item.relayName.split('/');
-					var relayState = item.relayState?'开启':'关闭';
-					var content = relayState+relayName[item.relayNum]
-					this.userList.push({
-						device_id:item.device_id,
-						content:content,
-						time:this.formatTime(item.uptime*1000),
-						user:item.user
-					})
-			  	});
-		  }
-	  })
+    getList(page) {
+      this.$axios({
+          method: "post",
+          url: "/api/api_gateway?method=weather.weather.sf_control_data",
+          data: this.qs.stringify({
+            device_id: this.searchVal,
+            begin:this.begin,
+            end:this.end,
+            page:page
+          })
+        }).then(res => {
+        if(res.data.message==""){
+            this.userList = [];
+          this.totalNum = res.data.data.nums;
+            res.data.data.dat.forEach((item) => {
+            var relayName = item.relayName.split('/');
+            var relayState = item.relayState?'开启':'关闭';
+            var content = relayState+relayName[item.relayNum]
+            this.userList.push({
+              device_id:item.device_id,
+              content:content,
+              time:this.formatTime(item.uptime*1000),
+              user:item.user
+            })
+            });
+        }
+      })
+    },
+    DateChange(val){
+      if(this.value1){
+        this.begin = parseInt(
+          new Date(this.value1[0]).getTime() / 1000
+        )
+        this.end = parseInt(
+          new Date(this.value1[1]).getTime() / 1000
+        )
+      }else{
+        this.begin = '';
+        this.end = '';
+      }
+      this.getList();
     },
     handleClick(tab, event) {
         console.log(tab, event);
     },
     changePage(value) {
 		this.page = value
-		this.getList();
+		this.getList(value);
     },
 
     

+ 2 - 2
src/pages/plantGuard/irrigate/wranData/wranDataSet.vue

@@ -36,8 +36,8 @@
 			<el-table-column prop="order" label="任务名称"></el-table-column>
 			<el-table-column prop="equipId" label="设备名称"></el-table-column>
 			<el-table-column prop="sensor" label="传感器"></el-table-column>
-			<el-table-column prop="upline" label="上线"></el-table-column>
-			<el-table-column prop="offline" label="下线"></el-table-column>
+			<el-table-column prop="upline" label="上"></el-table-column>
+			<el-table-column prop="offline" label="下"></el-table-column>
 			<el-table-column prop="date" label="时间"></el-table-column>
 			<el-table-column prop="startTime" width="200px" label="操作">
 				<template slot-scope="scope">

+ 1 - 1
src/pages/plantGuard/page10.vue

@@ -70,7 +70,7 @@ export default {
   watch: {},
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.getRoleList();
+    // this.getRoleList();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 1 - 1
src/pages/plantGuard/page11.vue

@@ -66,7 +66,7 @@ export default {
   watch: {},
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
-    this.getRoleList();
+    // this.getRoleList();
   },
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {

+ 2 - 2
src/pages/plantGuard/plantProtection/base.vue

@@ -1247,8 +1247,8 @@ export default {
      //载玻片、培养液更换时间展示
     setTimeDialogShow(data){
       this.setTimeDialogVisible = true;
-      this.time.time01 = data.glass
-      this.time.time02 = data.cultivate
+      this.time.time01 = data.glass*1000
+      this.time.time02 = data.cultivate*1000
       this.currbzyGlass = data.d_id
     },
     //载玻片、培养液更换时间配置提交

+ 2 - 0
src/pages/plantGuard/plantProtection/baseAll.vue

@@ -41,6 +41,7 @@
                         placeholder="请输入项目名称"
                         v-model="input"
                         suffix-icon="el-icon-search"
+                        @change='getEquipList'
                         clearable>
                     </el-input>
                 </div>
@@ -330,6 +331,7 @@ methods: {
         method: "POST",
         url: "/api/api_gateway?method=user.login.user_project_addr",
         data: this.qs.stringify({
+            projectname:this.input
         })
       }).then(res => {
         if (res.data.message == ""){

+ 5 - 1
src/pages/plantGuard/plantProtection/baseComponents/equipInfo.vue

@@ -179,6 +179,7 @@ export default {
               dat.device_name = dat.equip_name;
               dat.addtime = dat.uptime;
               dat.imei = dat.equip_id;
+              dat.d_id = dat.d_id;
               this.info = dat
             }
           }
@@ -208,6 +209,9 @@ export default {
           }
         });
       }
+      if(this.equipType==4){
+        this.addYx()
+      }
     },
     // 添加诱芯
     changeLure(){
@@ -220,7 +224,7 @@ export default {
         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,
+          d_id:this.d_id,
         }),
       }).then((res) => {
         if (res.data.message == "") {

+ 24 - 52
src/pages/plantGuard/plantProtection/bzyPhoto.vue

@@ -336,66 +336,38 @@ export default {
     goBackPage() {
       this.$router.go(-1);
     },
-    downloadFile(data) {
-      let blob = new Blob([data], { type: "application/zip" });
-      let url = window.URL.createObjectURL(blob);
-      const link = document.createElement("a"); // 创建a标签
-      link.href = url;
-      link.download = "下载图片"; // 重命名文件
-      link.click();
-      URL.revokeObjectURL(url); // 释放内存
-    },
+    downloadFile(data) {
+      // console.log(data);
+      let blob = new Blob([data], { type: "application/zip" });
+      let url = window.URL.createObjectURL(blob);
+      const link = document.createElement("a"); // 创建a标签
+      link.href = url;
+      link.download = "下载图片"; // 重命名文件
+      link.click();
+      URL.revokeObjectURL(url); // 释放内存
+    },
     downPhoto(arr) {
       let uid = this.$store.state.user_id;
-      let image_id = arr.join(",");
+      // let id_list = JSON.stringify(arr);
+      let id_list = JSON.stringify(arr);
+      let postData = this.qs.stringify({
+        id_list,
+          device_id: this.id
+      })
       this.$axios({
         method: "post",
-        url: "/api/api_gateway?method=forecast.worm_lamp.get_task_id",
-        data: this.qs.stringify({
-          image_id,
-          myuid: uid,
-        }),
+        url: "/api/download",
+        data: postData,
+        responseType:'blob',
+        // this.qs.stringify({
+        //   id_list,
+        //   device_id: this.id,
+        // }),
       }).then((res) => {
         if (res.data.message == "") {
           this.$message.success('图片下载中!')
           let that = this;
-          this.cy_id = res.data.data;
-          function downPhotoState() {
-            if (that.times >= 0) {
-              that.times--;
-              that
-                .$axios({
-                  method: "POST",
-                  url: "/api/api_gateway?method=forecast.worm_lamp.check_down",
-                  data: that.qs.stringify({
-                    get_id: that.cy_id,
-                  }),
-                })
-                .then((res) => {
-                  if (res.data.data) {
-                    // 判断后台从阿里云下载图片是否完成
-                    clearInterval(interval);
-                    that
-                      .$axios({
-                        method: "POST",
-                        url: "/api/image_down",
-                        responseType: "blob",
-                        data: that.qs.stringify({
-                          get_id: that.cy_id,
-                        }),
-                      })
-                      .then((res) => {
-                        that.downloadFile(res.data);
-                      });
-                  }
-                })
-                .catch((error) => this.$message.error(error));
-            } else {
-              clearInterval(interval);
-              that.$message.warning("图片下载失败!");
-            }
-          }
-          var interval = setInterval(downPhotoState, 1000);
+          that.downloadFile(res.data);
         }
       });
     },

+ 2 - 3
src/pages/plantGuard/plantProtection/cbdPestStats.vue

@@ -74,9 +74,8 @@
           </el-row>
         </div>
         <div class="dataTableSearch">
-          <el-button type="blueInfo" size="mini" @click="deriveData()"
-            >导出</el-button
-          >
+          <div> </div>
+          <!-- <el-button type="blueInfo" size="mini" @click="deriveData()">导出</el-button> -->
           <el-button
             type="blueInfo"
             size="mini"

+ 9 - 43
src/pages/plantGuard/plantProtection/cbdPhoto.vue

@@ -624,6 +624,7 @@ export default {
       if (flag == 2) {
         //批量删除
         this.delBtnState = false;
+        this.downBtnState = true;
       }
 
       if (flag == 3) {
@@ -657,7 +658,8 @@ export default {
         this.$router.push(`/index/messageWarn/${this.id}`);
       }
       if (flag == 7) {
-        this.downBtnState = !this.downBtnState;
+        this.delBtnState = true;
+        this.downBtnState = false;
       }
       if (flag == 8) {
         //批量下载图片
@@ -813,56 +815,20 @@ export default {
     },
     downPhoto(arr) {
       let uid = this.$store.state.user_id;
-      let image_id = arr.join(",");
+      let id_list = JSON.stringify(arr);
       this.$axios({
         method: "post",
-        url: "/api/api_gateway?method=forecast.worm_lamp.get_task_id",
+        url: "/api/download",
+        responseType:'blob',
         data: this.qs.stringify({
-          image_id,
-          myuid: uid,
+          id_list,
+          device_id: this.id,
         }),
       }).then((res) => {
         if (res.data.message == "") {
           this.$message.success("图片下载中!");
           let that = this;
-          this.cy_id = res.data.data;
-          function downPhotoState() {
-            if (that.times >= 0) {
-              that.times--;
-              that
-                .$axios({
-                  method: "POST",
-                  url: "/api/api_gateway?method=forecast.worm_lamp.check_down",
-                  data: that.qs.stringify({
-                    get_id: that.cy_id,
-                  }),
-                })
-                .then((res) => {
-                  if (res.data.data) {
-                    // 判断后台从阿里云下载图片是否完成
-                    clearInterval(interval);
-                    that
-                      .$axios({
-                        method: "POST",
-                        url: "/api/image_down",
-                        withCredentials: true,
-                        responseType: "blob",
-                        data: that.qs.stringify({
-                          get_id: that.cy_id,
-                        }),
-                      })
-                      .then((res) => {
-                        that.downloadFile(res.data);
-                      });
-                  }
-                })
-                .catch((error) => this.$message.error(error));
-            } else {
-              clearInterval(interval);
-              that.$message.warning("图片下载失败!");
-            }
-          }
-          var interval = setInterval(downPhotoState, 1000);
+          that.downloadFile(res.data);
         }
       });
     },

+ 26 - 26
src/router/index.js

@@ -81,157 +81,157 @@ export default new Router({
           path: 'baseAll',
           name: 'baseAll',
           component: BaseAll,
-          meta: { title: '农林植保',order:0,navname: '植保监测', }
+          meta: { title: '农林植保',order:0,navname: '植保监测', keepAlive: false }
         },
         {
           path: 'base',
           name:'base',
           component: Base,
-          meta: { title: '农林植保',order:0, navname:'植保示范点',}
+          meta: { title: '农林植保',order:0, navname:'植保示范点', keepAlive: false}
         },
         {
           path:'irrigateProject',
           name: 'irrigateProject',
           component: IrrigateProject,
-          meta: { title: '智能灌溉',order:3 ,navname:'灌溉监测',}
+          meta: { title: '智能灌溉',order:3 ,navname:'灌溉监测', keepAlive: false}
         },
         {
           path: 'irrigate',
           name: 'irrigate',
           component: Irrigate,
-          meta: { title: '智能灌溉',order:3 ,navname:'灌溉示范点',}
+          meta: { title: '智能灌溉',order:3 ,navname:'灌溉示范点', keepAlive: false}
         },
         {
           path: 'operatData',
           name: 'operatData',
           component: OperatData,
-          meta: { title: '智能灌溉',order:3 ,navname:'操作记录',}
+          meta: { title: '智能灌溉',order:3 ,navname:'操作记录', keepAlive: false}
         },
         {
           path: 'wranData',
           name: 'wranData',
           component: WranData,
-          meta: { title: '智能灌溉',order:3 ,navname:'预警信息',}
+          meta: { title: '智能灌溉',order:3 ,navname:'预警信息', keepAlive: false}
         },
         {
           path:'eleHistory',
           name: 'eleHistory',
           component: EleHistory,
-          meta: { title: '智能灌溉',order:3 ,navname:'水肥数据',}
+          meta: { title: '智能灌溉',order:3 ,navname:'水肥数据', keepAlive: false}
         },
         {
           path: 'userManage',
           name: 'userManage',
           component: UserManage,
-          meta: { title: '系统管理',order:7, navname: '用户管理',}
+          meta: { title: '系统管理',order:7, navname: '用户管理', keepAlive: false}
         },
         {
           path: 'allotEquip',
           name: 'allotEquip',
           component: AllotEquip,
-          meta: { title: '系统管理',order:7,navname: '设备分配', }
+          meta: { title: '系统管理',order:7,navname: '设备分配', keepAlive: false }
         },
         {
           path: 'roleManage',
           name: 'roleManage',
           component: RoleManage,
-          meta: { title: '系统管理',order:7,navname: '角色管理', }
+          meta: { title: '系统管理',order:7,navname: '角色管理', keepAlive: false }
         },
         {
           path: 'topicManage',
           name: 'topicManage',
           component: TopicManage,
-          meta: { title: '系统管理',order:7,navname: '主题定制', }
+          meta: { title: '系统管理',order:7,navname: '主题定制', keepAlive: false }
         },
         {
           path: 'equipManage',
           name: 'equipManage',
           component: EquipManage,
-          meta: { title: '系统管理',order:7,navname: '设备管理', }
+          meta: { title: '系统管理',order:7,navname: '设备管理', keepAlive: false }
         },
         {
           path: 'bzyPhoto',
           name: 'bzyPhoto',
           component: BzyPhoto,
-          meta: { title: '农林植保',order:0,navname: '孢子仪图片', }
+          meta: { title: '农林植保',order:0,navname: '孢子仪图片', keepAlive: false}
         },
         {
           path: 'cbdPhoto',
           name: 'cbdPhoto',
           component: CbdPhoto,
-          meta: { title: '农林植保',order:0,navname: '测报灯图片', }
+          meta: { title: '农林植保',order:0,navname: '测报灯图片', keepAlive: false }
         },
         {
           path: 'cbdPestStats',
           name: 'CbdPestStats',
           component: CbdPestStats,
-          meta: { title: '农林植保',order:0,navname: '害虫统计', }
+          meta: { title: '农林植保',order:0,navname: '害虫统计', keepAlive: false}
         },
         {
           path: 'monitor',
           name: 'Monitor',
           component: Monitor,
-          meta: { title: '可视农业',order:1,navname: '可视化', }
+          meta: { title: '可视农业',order:1,navname: '可视化', keepAlive: false }
         },
         {
           path: 'photoView',
           name: 'PhotoView',
           component: PhotoView,
-          meta: { title: '可视农业',order:0,navname: '可视化详情', }
+          meta: { title: '可视农业',order:0,navname: '可视化详情', keepAlive: false }
         },
         {
           path: 'page9',
           name: 'page9',
           component: Page9,
-          meta: { title: '水价管理',order:4,navname: '水价示范点', }
+          meta: { title: '水价管理',order:4,navname: '水价示范点', keepAlive: false}
         },
         {
           path: 'page10',
           name: 'page10',
           component: Page10,
-          meta: { title: '水价管理',order:4,navname: '消费记录', }
+          meta: { title: '水价管理',order:4,navname: '消费记录', keepAlive: false }
         },
         {
           path: 'page11',
           name: 'page11',
           component: Page11,
-          meta: { title: '水价管理',order:4,navname: '充值记录', }
+          meta: { title: '水价管理',order:4,navname: '充值记录', keepAlive: false }
         },
         {
           path: 'personMsg',
           name:'PersonMsg',
           component: PersonMsg,
-          meta: { title: '',order:0,navname: '个人中心', }
+          meta: { title: '',order:0,navname: '个人中心', keepAlive: false}
         },
         {
           path: 'disasterWarnBase',
           name: 'disasterWarnBase',
           component: DisasterWarnBase,
-          meta: { title: '灾害预警',order:2,navname: '预警监测', }
+          meta: { title: '灾害预警',order:2,navname: '预警监测', keepAlive: false }
         },
         {
           path: 'disasterWarn',
           name: 'disasterWarn',
           component: DisasterWarn,
-          meta: { title: '灾害预警',order:2,navname: '预警示范点', }
+          meta: { title: '灾害预警',order:2,navname: '预警示范点', keepAlive: false }
         },
         {
           path: 'warnPhoto',
           name: 'warnPhoto',
           component: WarnPhoto,
-          meta: { title: '灾害预警',order:2,navname: '预警图片', }
+          meta: { title: '灾害预警',order:2,navname: '预警图片', keepAlive: false }
         },
         {
           path:'disasterWarnList',
           name: 'disasterWarnList',
           component: DisasterWarnList,
-          meta: { title: '灾害预警',order:2,navname: '预警记录', }
+          meta: { title: '灾害预警',order:2,navname: '预警记录', keepAlive: false }
         },
         {
           path:'disasterWarnSet',
           name: 'disasterWarnSet',
           component: DisasterWarnSet,
-          meta: { title: '灾害预警',order:2,navname: '预警设置', }
+          meta: { title: '灾害预警',order:2,navname: '预警设置', keepAlive: false}
         }
       ]
     },

+ 1 - 1
src/util/server.js

@@ -1,6 +1,6 @@
 //1.定义所有环境服务器地址
 const server = {
-  pro: "http://8.136.98.49:8002", //生产环境
+  pro: "http://8.136.98.49:8005", //生产环境
   dev: "http://182.92.193.64:8002", //测试环境
   util: "http://192.168.1.14:8002/" //其他环境,可以为空,为空则适配到测试环境
 }