zhangyun před 3 roky
rodič
revize
952f0c8dac

+ 18 - 10
pingpu_vue/src/page/base/baselist.vue

@@ -21,7 +21,7 @@
               placeholder="请输入基地名称"
             ></el-input>
           </div>
-          <div class="btnbox" @click="getbaslist">查询</div>
+          <div class="btnbox" @click="chaxun">查询</div>
         </div>
       </div>
     </div>
@@ -76,10 +76,12 @@
           background
           layout="prev, pager, next,sizes,jumper"
           :total="total"
-          :page-size="6"
+          :page-size="page_size"
           :page-sizes="[6, 9, 12, 15]"
           @current-change="handleCurrentChange"
           @size-change="handleSizeChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -192,6 +194,7 @@ export default {
       baselistdata: [],
       page: 1,
       page_size: 6,
+      pagekey: 1,
       center: [],
       dialogVisible: false,
       baseinfodata: {
@@ -238,9 +241,7 @@ export default {
           "/index/maphandle?lng=" + this.center[0] + "&lat=" + this.center[1]
         );
       } else {
-        this.$router.push(
-          "/index/maphandle"
-        );
+        this.$router.push("/index/maphandle");
       }
     },
     tofac(item) {
@@ -255,7 +256,7 @@ export default {
       );
     },
     toplot(item) {
-      console.log(item)
+      console.log(item);
       var center = JSON.parse(item.coordinates)[0];
       this.$router.push(
         "/index/mapplot?lng=" +
@@ -268,15 +269,22 @@ export default {
     },
     handleCurrentChange(e) {
       this.page = e;
-      this.getbaslist()
+      this.getbaslist();
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.page_size = e;
-      this.getbaslist()
+      this.getbaslist();
+    },
+    chaxun() {
+      this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
+      this.getbaslist();
     },
     getbaslist() {
       this.loading = true;
+      console.log(this.page);
       this.$axios({
         method: "post",
         url: "api/api_gateway?method=basemanager.baseinfo.list_land_base",
@@ -304,7 +312,7 @@ export default {
       console.log(item);
       var data = JSON.parse(JSON.stringify(item));
       this.baseinfodata = data;
-      this.baseinfodata.img_url2 = data.img_url
+      this.baseinfodata.img_url2 = data.img_url;
       console.log(this.baseinfodata);
       this.baseinfodata.base_addr =
         data.area_addr[0] + data.area_addr[1] + data.area_addr[2];
@@ -480,7 +488,7 @@ export default {
       margin-bottom: 20px;
       display: flex;
       flex-wrap: wrap;
-      .el-col{
+      .el-col {
         margin-bottom: 20px;
         float: none;
       }

+ 13 - 2
pingpu_vue/src/page/base/plotlist.vue

@@ -32,7 +32,14 @@
               placeholder="请输入地块名称"
             ></el-input>
           </div>
-          <div class="btnbox" @click="getmassiflist">查询</div>
+          <div
+            class="btnbox"
+            @click="
+              ((page = 1), (pagekey = Math.random() * 10 + 1)), getmassiflist()
+            "
+          >
+            查询
+          </div>
         </div>
       </div>
     </div>
@@ -70,9 +77,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -216,6 +225,7 @@ export default {
       totalNum: 10,
       page: 1,
       page_size: 10,
+      pagekey: 1,
       tableData: [],
       loading: false,
       basevalue: "",
@@ -254,6 +264,7 @@ export default {
   methods: {
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.page_size = e;
       this.getmassiflist();
     },

+ 1 - 1
pingpu_vue/src/page/bzy/DataDetail.vue

@@ -2,7 +2,7 @@
   <div style="cursor: default">
     <div class="baselistbox_top">
       <div class="baselistbox_top_title" style="cursor: pointer">
-        <p @click="goBackPage()">
+        <p @click="goBackPage()" style="cursor: pointer">
           <i class="el-icon-back"></i>
           <span>返回</span>
         </p>

+ 6 - 1
pingpu_vue/src/page/bzy/bzy.vue

@@ -106,9 +106,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="queryInfo.page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="queryInfo.page"
+          :key="queryInfo.pagekey"
         >
         </el-pagination>
       </div>
@@ -304,6 +306,7 @@ export default {
         page: "1",
         is_online: "",
         f_id: "",
+        pagekey:1
       },
       options: [
         {
@@ -407,10 +410,12 @@ export default {
     },
     searchChange() {
       this.queryInfo.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.getEquipList();
     },
     empty() {
       this.queryInfo.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.queryInfo.is_online = "";
       this.queryInfo.f_id = "";
       this.getEquipList();

+ 6 - 1
pingpu_vue/src/page/cbd/Cbd.vue

@@ -187,9 +187,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="queryInfo.page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="queryInfo.page"
+          :key="queryInfo.pagekey"
         >
         </el-pagination>
       </div>
@@ -410,6 +412,7 @@ export default {
         page: "1",
         is_online: "",
         f_id: "",
+        pagekey:1
       },
       options: [
         {
@@ -504,10 +507,12 @@ export default {
     },
     searchChange() {
       this.queryInfo.page = 1;
+      this.pagekey = Math.random()*10+1
       this.getEquipList();
     },
     empty() {
       this.queryInfo.page = 1;
+      this.pagekey = Math.random()*10+1
       this.queryInfo.is_online = "";
       this.queryInfo.f_id = "";
       this.getEquipList();

+ 8 - 3
pingpu_vue/src/page/cbd/analyse.vue

@@ -3,7 +3,7 @@
   <div style="cursor: default">
     <div class="baselistbox_top">
       <div class="baselistbox_top_title" style="cursor: pointer">
-        <p @click="goBackPage">
+        <p @click="goBackPage" style="cursor: pointer">
           <i class="el-icon-back"></i>
           <span>返回</span>
         </p>
@@ -198,15 +198,17 @@
         @current-change="currentchange"
       >
       </el-pagination> -->
-      <div class="pagination" v-if="pageloading">
+      <div class="pagination">
         <el-pagination
           background
           layout="prev, pager, next,sizes,jumper"
           :total="total"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="currentchange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -267,6 +269,7 @@ export default {
       page: 1,
       total: 10,
       page_size: 10,
+      pagekey:1,
       currentPage: 1,
       dialogVisible: false,
       img_url: "",
@@ -863,6 +866,7 @@ export default {
     search() {
       this.page = 1;
       this.total = 10;
+      this.pagekey = Math.random()*10+1;
       this.currentPage = 1;
       if (this.acttableindex == 1) {
         this.getImagesource();
@@ -950,6 +954,7 @@ export default {
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.page_size = e;
       if (this.acttableindex == 1) {
         this.getImagesource();

+ 6 - 1
pingpu_vue/src/page/crop/crop.vue

@@ -76,9 +76,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -99,6 +101,7 @@ export default {
       totalNum: 10,
       page: 1,
       page_size: 10,
+      pagekey:1,
       tableData: [],
       loading: false,
     };
@@ -111,6 +114,7 @@ export default {
   methods: {
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.page_size = e;
       this.getcroplist();
     },
@@ -126,6 +130,7 @@ export default {
     },
     inquire(){
       this.page = 1
+      this.pagekey = Math.random()*10+1;
       this.getcroplist()
     },
     getcroplist() {

+ 19 - 9
pingpu_vue/src/page/crop/evildata.vue

@@ -18,7 +18,7 @@
               size="mini"
               placeholder="请输入病虫害名称"
             ></el-input>
-            <div class="btnbox" @click="page=1,getwormlist()">
+            <div class="btnbox" @click="(page = 1,pagekey = Math.random()*10+1),getwormlist()">
               <span>搜索</span>
             </div>
           </div>
@@ -46,7 +46,7 @@
         </div>
         <el-row :gutter="20">
           <div class="none" v-if="!wormlist.length">
-            <img src="../../../static/images/quexingye.png" alt="">
+            <img src="../../../static/images/quexingye.png" alt="" />
           </div>
           <el-col :span="6" v-for="(item, index) in wormlist" :key="index">
             <div class="wormimgbox">
@@ -71,12 +71,14 @@
         </el-row>
         <div class="pagination">
           <el-pagination
-          v-if="paginationload"
+            v-if="paginationload"
             background
             layout="prev, pager, next,jumper"
             :total="total"
             :page-size="8"
             @current-change="handleCurrentChange"
+            :current-size.sync="page"
+            :key="pagekey"
           >
           </el-pagination>
         </div>
@@ -85,7 +87,13 @@
     <div class="evillist">
       <div class="evillist_title">
         <p>识别排名</p>
-        <div class="btnbox" @click="recognitionVisible = true;wormdisdata.url=''">
+        <div
+          class="btnbox"
+          @click="
+            recognitionVisible = true;
+            wormdisdata.url = '';
+          "
+        >
           <span>{{ wormordisindex == 2 ? "害虫识别" : "病害识别" }}</span>
         </div>
       </div>
@@ -259,6 +267,7 @@ export default {
       wormnum: "",
       wormordisindex: 2,
       page: 1,
+      pagekey:1,
       wormlist: [],
       total: 8,
       adddialogVisible: false,
@@ -295,7 +304,7 @@ export default {
         url: "",
         img_file: "",
       },
-      paginationload:false
+      paginationload: false,
     };
   },
   //监听属性 类似于data概念
@@ -320,14 +329,15 @@ export default {
       });
     },
     tabwormordisindex(index) {
-      this.paginationload = false
+      this.paginationload = false;
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.wormordisindex = index;
       this.getwormlist();
       this.getranking();
     },
     handleCurrentChange(e) {
-      console.log(e)
+      console.log(e);
       this.page = e;
       this.getwormlist();
     },
@@ -344,7 +354,7 @@ export default {
         }),
       }).then((res) => {
         this.loading = false;
-        this.paginationload = true
+        this.paginationload = true;
         if (res.data.data) {
           this.wormlist = res.data.data.data;
           this.total = res.data.data.nums;
@@ -696,7 +706,7 @@ export default {
           border-bottom: 3px solid #4f71ff;
         }
       }
-      .none{
+      .none {
         width: 100%;
         display: flex;
         justify-content: space-around;

+ 9 - 1
pingpu_vue/src/page/fault/faultinfo.vue

@@ -107,9 +107,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -170,6 +172,7 @@ export default {
       totalNum: 10,
       page: 1,
       page_size: 10,
+      pagekey:1,
       faultlist: [],
       loading: false,
       imageListtstatus: false,
@@ -185,6 +188,8 @@ export default {
   //方法集合
   methods: {
     searchChange() {
+      this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.getfaultlist();
     },
     empty() {
@@ -192,10 +197,13 @@ export default {
         type: "",
         f_id: "",
       };
+      this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.getfaultlist();
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.page_size = e;
       this.getfaultlist();
     },

+ 140 - 25
pingpu_vue/src/page/gis/gisshow.vue

@@ -25,15 +25,19 @@
           <span>{{ alreadyhave.area_addr[2] }}</span>
         </p>
         <p>
-          <i class="iconfont icon-zongmianji" style="color:#999;font-size:14px;"></i> 基地面积:{{
-            alreadyhave.base_area
-          }}
+          <i
+            class="iconfont icon-zongmianji"
+            style="color: #999; font-size: 14px"
+          ></i>
+          基地面积:{{ alreadyhave.base_area }}
         </p>
         <p>
-          <i class="iconfont icon-dikuaishuliang" style="color:#999;font-size:14px;"></i> 地块数量:{{
-            faclist.length
-          }}
+          <i
+            class="iconfont icon-dikuaishuliang"
+            style="color: #999; font-size: 14px"
+          ></i>
+          地块数量:{{ faclist.length }}
         </p>
       </div>
@@ -41,9 +45,16 @@
         <div class="listbox_facbox">
           <div class="tishi" v-if="faclist.length == 0">暂无地块</div>
           <div
-            class="listbox_facbox_item"
+            :class="
+              selfacindex == index
+                ? 'listbox_facbox_item listbox_facbox_item2'
+                : 'listbox_facbox_item'
+            "
+            
             v-for="(item, index) in faclist"
             :key="index"
+            @click="selfac(index)"
+            :style="{backgroundColor:item.crop_colors+'50',border:selfacindex == index?'2px solid '+item.crop_colors:'2px solid '+item.crop_colors+'20'}"
           >
             <p class="title">{{ item.massif_name }}</p>
             <p>{{ item.crop_name }}</p>
@@ -111,6 +122,18 @@
           <p>离线设备&nbsp;&nbsp;({{ offlinelist.count }})</p>
         </div>
       </div>
+      <div class="showname">
+        <p>设备名称:</p>
+        <el-switch
+          style="display: block"
+          v-model="devicenameoff"
+          active-color="#4f71ff"
+          inactive-color="#ff4949"
+          active-text="显示"
+          inactive-text="隐藏"
+        >
+        </el-switch>
+      </div>
     </div>
     <el-dialog
       :title="factypalist[factypa]"
@@ -424,7 +447,10 @@ export default {
       },
       listloading: false,
       infoloading: false,
-      player:null
+      player: null,
+      devicenameoff: false,
+      devilist: [],
+      selfacindex: 0,
     };
   },
   //监听属性 类似于data概念
@@ -437,11 +463,41 @@ export default {
     basetype2(val) {
       this.getdevlist();
     },
-    dialogVisible(val){
-      if(!val && this.player){
-        this.player.stop()
+    dialogVisible(val) {
+      if (!val && this.player) {
+        this.player.stop();
       }
-    }
+    },
+    devicenameoff(val) {
+      if (val) {
+        console.log(this.equipmentpolylist);
+        for (var i = 0; i < this.equipmentpolylist.length; i++) {
+          for (var j = 0; j < this.devilist.length; j++) {
+            if (
+              this.equipmentpolylist[i]._opts.data == this.devilist[j].device_id
+            ) {
+              // console.log(this.devilist[j].device_name);
+              this.equipmentpolylist[i].setLabel({
+                direction: "top",
+                offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
+                content:
+                  `<div class='basecontent'>` +
+                  this.devilist[j].device_name +
+                  `</div>`, //设置文本标注内容
+              });
+            }
+          }
+        }
+      } else {
+        for (var i = 0; i < this.equipmentpolylist.length; i++) {
+          this.equipmentpolylist[i].setLabel({
+            direction: "top",
+            offset: new AMap.Pixel(0, 0), //设置文本标注偏移量
+            content: "", //设置文本标注内容
+          });
+        }
+      }
+    },
   },
   //方法集合
   methods: {
@@ -525,6 +581,8 @@ export default {
       });
     },
     selbasechange() {
+      this.selfacindex = 0
+      this.devicenameoff = false
       this.getbaselistinfo();
       this.getbasepoltlist();
       this.getpoltlist();
@@ -586,16 +644,29 @@ export default {
           var ploritem = "";
           for (var i = 0; i < data.length; i++) {
             var polygonArr = JSON.parse(data[i].coordinates);
-            ploritem = new AMap.Polygon({
-              map: this.map,
-              path: polygonArr, //设置多边形边界路径
-              strokeColor: data[i].crop_colors, //线颜色
-              strokeOpacity: 0.5, //线透明度
-              strokeWeight: 3, //线宽
-              fillColor: data[i].crop_colors, //填充色
-              fillOpacity: 0.35, //填充透明度
-              data: data[i].base_id,
-            });
+            if (i == 0) {
+              ploritem = new AMap.Polygon({
+                map: this.map,
+                path: polygonArr, //设置多边形边界路径
+                strokeColor: data[i].crop_colors, //线颜色
+                strokeOpacity: 1, //线透明度
+                strokeWeight: 3, //线宽
+                fillColor: data[i].crop_colors, //填充色
+                fillOpacity: 0.7, //填充透明度
+                data: data[i].base_id,
+              });
+            } else {
+              ploritem = new AMap.Polygon({
+                map: this.map,
+                path: polygonArr, //设置多边形边界路径
+                strokeColor: data[i].crop_colors, //线颜色
+                strokeOpacity: 0.5, //线透明度
+                strokeWeight: 3, //线宽
+                fillColor: data[i].crop_colors, //填充色
+                fillOpacity: 0.35, //填充透明度
+                data: data[i].base_id,
+              });
+            }
             this.facpolylist.push(ploritem);
             ploritem.on("click", (e) => {
               // console.log(e.target._opts.data)
@@ -625,6 +696,7 @@ export default {
         if (res.data.data) {
           var data = res.data.data.data;
           //   this.faclist = data;
+          this.devilist = data;
           this.equipmentlist = res.data.data.statistic;
           this.equipmentlistnum = res.data.data.total_num;
           this.waringlist = res.data.data.waring;
@@ -794,11 +866,34 @@ export default {
           setTimeout(() => {
             let player = new EZUIKit.EZUIPlayer(myPlayer);
             player.play();
-            this.player = player
+            this.player = player;
           }, 1000);
         }
       });
     },
+    selfac(index) {
+      this.selfacindex = index
+      for (var i = 0; i < this.facpolylist.length; i++) {
+        console.log(this.facpolylist[i])
+        if (i == index) {
+          this.facpolylist[i].setOptions({
+            strokeColor: this.facpolylist[i]._opts.strokeColor, //线颜色
+            strokeOpacity: 1, //线透明度
+            strokeWeight: 3, //线宽
+            fillColor: this.facpolylist[i]._opts.fillColor, //填充色
+            fillOpacity: 0.7, //填充透明度
+          });
+        } else {
+          this.facpolylist[i].setOptions({
+            strokeColor: this.facpolylist[i]._opts.strokeColor, //线颜色
+            strokeOpacity: 0.5, //线透明度
+            strokeWeight: 3, //线宽
+            fillColor: this.facpolylist[i]._opts.fillColor, //填充色
+            fillOpacity: 0.35, //填充透明度
+          });
+        }
+      }
+    },
     // basemanager.device.list_land_device
   },
   beforeCreate() {}, //生命周期 - 创建之前
@@ -853,7 +948,7 @@ export default {
             font-size: 28px;
             padding: 0;
           }
-          .el-select__caret{
+          .el-select__caret {
             color: #000;
           }
         }
@@ -887,7 +982,7 @@ export default {
         }
         .listbox_facbox_item {
           width: 100%;
-          background-color: #ecf5ff;
+          // background-color: #ecf5ff;
           padding: 10px;
           box-sizing: border-box;
           margin-top: 14px;
@@ -930,6 +1025,10 @@ export default {
             }
           }
         }
+        // .listbox_facbox_item2 {
+          // border: 1px solid rgba(79, 113, 255, 1);
+          // background-color: rgb(212, 233, 250);
+        // }
       }
     }
   }
@@ -996,6 +1095,15 @@ export default {
         color: #4f71ff;
       }
     }
+    .showname {
+      margin-top: 15px;
+      background-color: #fff;
+      padding: 8px 10px;
+      border-radius: 5px;
+      width: 190px;
+      font-size: 14px;
+      display: flex;
+    }
   }
 }
 .jinkong {
@@ -1112,4 +1220,11 @@ export default {
     }
   }
 }
+/deep/.amap-marker-label {
+  border: 0;
+  padding: 5px 16px;
+  border-radius: 18px;
+  background-color: rgba(255, 255, 255, 0.8);
+  color: #252525;
+}
 </style>

+ 9 - 1
pingpu_vue/src/page/join/joincbd.vue

@@ -97,9 +97,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[12, 24, 36, 48]"
-          :page-size="12"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -132,6 +134,7 @@ export default {
       start_time: "",
       page: "1",
       page_size: "12",
+      pagekey:1
     };
   },
   //监听属性 类似于data概念
@@ -181,6 +184,8 @@ export default {
         var mouth = time.getMonth();
         this.start_time = Math.floor(time.setMonth(mouth - 3) / 1000);
       }
+      this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     timechange(e) {
@@ -188,6 +193,7 @@ export default {
         this.start_time = Math.floor(+new Date(e[0]) / 1000);
         this.end_time = Math.floor(+new Date(e[1]) / 1000);
         this.page = 1;
+        this.pagekey = Math.random() * 10 + 1;
         this.getbaseimglist();
       } else {
         this.empty(1);
@@ -196,6 +202,7 @@ export default {
     idchange(e) {
       this.device_id = e;
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     getbaseimglist() {
@@ -222,6 +229,7 @@ export default {
     handleSizeChange(e) {
       this.page_size = e;
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     handleCurrentChange(e) {

+ 17 - 5
pingpu_vue/src/page/join/joinqxz.vue

@@ -67,6 +67,9 @@
     <div class="baselistbox_table">
       <el-table :data="baseimglist" style="width: 100%">
         <el-table-column prop="updateTime" label="更新时间" width="180">
+          <template slot-scope="scope">
+            <p>{{ +new Date(scope.row.updateTime) | formatTime }}</p>
+          </template>
         </el-table-column>
         <el-table-column prop="devid" label="设备ID" width="180">
         </el-table-column>
@@ -93,11 +96,14 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 40]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
+        <!-- this.pagekey = Math.random()*10+1; -->
       </div>
     </div>
   </div>
@@ -117,13 +123,14 @@ export default {
       time: "",
       timeindex: 1,
       baseimglist: [],
-      totalNum: 12,
+      totalNum: 10,
       imgIndexNumber: 0,
       end_time: "",
       start_time: "",
-      page: "1",
+      page: 1,
       page_size: "10",
-      fengobj:{}
+      fengobj: {},
+      pagekey: 1,
     };
   },
   //监听属性 类似于data概念
@@ -173,6 +180,8 @@ export default {
         var mouth = time.getMonth();
         this.start_time = Math.floor(time.setMonth(mouth - 3) / 1000);
       }
+      this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     timechange(e) {
@@ -180,6 +189,7 @@ export default {
         this.start_time = Math.floor(+new Date(e[0]) / 1000);
         this.end_time = Math.floor(+new Date(e[1]) / 1000);
         this.page = 1;
+        this.pagekey = Math.random() * 10 + 1;
         this.getbaseimglist();
       } else {
         this.empty(1);
@@ -188,6 +198,7 @@ export default {
     idchange(e) {
       this.device_id = e;
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     getbaseimglist() {
@@ -214,6 +225,7 @@ export default {
     handleSizeChange(e) {
       this.page_size = e;
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getbaseimglist();
     },
     handleCurrentChange(e) {
@@ -232,7 +244,7 @@ export default {
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
     //   console.log(feng["E"])
-      this.fengobj = feng
+    this.fengobj = feng;
   },
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后

+ 7 - 7
pingpu_vue/src/page/qxz/Data24.vue

@@ -17,7 +17,7 @@
             <div class="newTime_time">{{ (uptime * 1000) | formatTime }}</div>
             <div>
               <el-button
-                @click="realTimeAxios()"
+                @click="refresh"
                 type="primary"
                 icon="el-icon-refresh-right"
                 size="mini"
@@ -531,11 +531,6 @@ export default {
         }
       });
     },
-    //返回上一页
-    goBackPage() {
-      this.$router.go(-1);
-    },
-
     // swiper初始化
     switchChu() {
       var effect = this.effect;
@@ -547,7 +542,12 @@ export default {
         centeredSlides: true,
       });
     },
-
+    refresh() {
+      if (document.getElementsByClassName("el-message").length == 0) {
+        this.$message.success("指令下发成功");
+      }
+      this.realTimeAxios()
+    },
     // 实时状态
     realTimeAxios() {
       var that = this;

+ 13 - 6
pingpu_vue/src/page/qxz/HistoryData.vue

@@ -87,9 +87,11 @@
             layout="prev, pager, next,sizes,jumper"
             :total="totalNum"
             :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
+            :page-size="page_size"
             @size-change="handleSizeChange"
             @current-change="handleCurrentChange"
+            :current-size.sync="page"
+            :key="pagekey"
           >
           </el-pagination>
         </div>
@@ -105,7 +107,7 @@
             v-for="(item, index) in echartOptions"
             :key="index"
           >
-            <el-card class="box-card" style="margin-bottom:15px;">
+            <el-card class="box-card" style="margin-bottom: 15px">
               <highcharts :options="item"></highcharts>
             </el-card>
           </el-col>
@@ -181,6 +183,7 @@ export default {
       totalNum: 10,
       page: 1,
       page_size: 10,
+      pagekey: 1,
       dialogVisible: false,
       value: "",
       value1: "",
@@ -225,8 +228,10 @@ export default {
         this.start_time = Math.floor(time.setMonth(mouth - 3) / 1000);
       }
       console.log(this.start_time);
+      this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getHisDataList();
-      this.getEchartsHisDataList()
+      this.getEchartsHisDataList();
     },
     timechange(e) {
       console.log(e);
@@ -235,8 +240,9 @@ export default {
         this.start_time = Math.floor(+new Date(e[0]) / 1000);
         this.end_time = Math.floor(+new Date(e[1]) / 1000);
         this.page = 1;
+        this.pagekey = Math.random() * 10 + 1;
         this.getHisDataList();
-        this.getEchartsHisDataList()
+        this.getEchartsHisDataList();
       } else {
         this.empty(1);
       }
@@ -305,7 +311,7 @@ export default {
           // this.$message.success("刷新成功");
           setTimeout(() => {
             this.getHisDataList();
-            this.getEchartsHisDataList()
+            this.getEchartsHisDataList();
             // this.refreshload = false;
           }, 2000);
         } else {
@@ -401,6 +407,7 @@ export default {
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.page_size = e;
       this.getHisDataList();
     },
@@ -568,7 +575,7 @@ export default {
     this.end_time = Math.floor(+new Date() / 1000);
     this.start_time = this.end_time - 24 * 60 * 60;
     this.getHisDataList();
-    this.getEchartsHisDataList()
+    this.getEchartsHisDataList();
   },
   beforeMount() {}, //生命周期 - 挂载之前
   //生命周期 - 挂载完成(可以访问DOM元素)

+ 6 - 1
pingpu_vue/src/page/qxz/envi.vue

@@ -180,9 +180,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="queryInfo.page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="queryInfo.page"
+          :key="queryInfo.pagekey"
         >
         </el-pagination>
       </div>
@@ -336,6 +338,7 @@ export default {
         page: "1",
         is_online: "",
         f_id: "",
+        pagekey:1
       },
       options: [
         {
@@ -430,10 +433,12 @@ export default {
     },
     searchChange() {
       this.queryInfo.page = 1;
+      this.queryInfo.pagekey = Math.random()*10+1;
       this.getEquipList();
     },
     empty() {
       this.queryInfo.page = 1;
+      this.queryInfo.pagekey = Math.random()*10+1;
       this.queryInfo.is_online = "";
       this.queryInfo.f_id = "";
       this.getEquipList();

+ 3 - 3
pingpu_vue/src/page/specialist/specialist.vue

@@ -1,12 +1,12 @@
 <!--  -->
 <template>
   <div class="speciabox">
-    <!-- <iframe
+    <iframe
       :src="`http://103.89.185.161:3010/#/start?token=`+keys+`&code=zhwd`"
       frameborder="0"
       class="iframe"
-    ></iframe> -->
-    <iframe src="http://192.168.1.14:8003/#/index/home?token=55555555555555" frameborder="0" class="iframe"></iframe>
+    ></iframe>
+    <!-- <iframe src="http://192.168.1.14:8003/#/index/home?token=55555555555555" frameborder="0" class="iframe"></iframe> -->
   </div>
 </template>
 

+ 9 - 15
pingpu_vue/src/page/sqz/Data24.vue

@@ -17,7 +17,7 @@
             <div class="newTime_time">{{ (uptime * 1000) | formatTime }}</div>
             <div>
               <el-button
-                @click="realTimeAxios()"
+                @click="refresh"
                 type="primary"
                 icon="el-icon-refresh-right"
                 size="mini"
@@ -491,12 +491,6 @@ export default {
   },
   mounted() {
     this.realTimeAxios(); //实时状态
-    // this.thresholdValAxios(); //气象站开关、阈值状态
-    // this.get24List(this.id);
-    // this.switchChu(); //swiper初始化
-
-    // 测试用的
-    // this.ceshiAxios();
   },
   methods: {
     backtrack() {
@@ -531,11 +525,6 @@ export default {
         }
       });
     },
-    //返回上一页
-    goBackPage() {
-      this.$router.go(-1);
-    },
-
     // swiper初始化
     switchChu() {
       var effect = this.effect;
@@ -547,7 +536,12 @@ export default {
         centeredSlides: true,
       });
     },
-
+    refresh() {
+      if (document.getElementsByClassName("el-message").length == 0) {
+        this.$message.success("指令下发成功");
+      }
+      this.realTimeAxios()
+    },
     // 实时状态
     realTimeAxios() {
       var that = this;
@@ -1004,7 +998,7 @@ export default {
     // },
 
     amendFactor(data) {
-      console.log(data)
+      console.log(data);
       var name = data.name; //修改值
       var type = data.type; //原来值
       var ekey = data.ekey; //通道名
@@ -1037,7 +1031,7 @@ export default {
                     });
                   }
                   this.realTimeAxios(); //实时状态数据请求
-                  this.setFactorShow = false
+                  this.setFactorShow = false;
                 } else {
                   if (
                     document.getElementsByClassName("el-message").length == 0

+ 238 - 34
pingpu_vue/src/page/sqz/HistoryData.vue

@@ -12,31 +12,43 @@
       <p class="baselistbox_top_line"></p>
       <div class="baselistbox_top_search">
         <div class="search_left">
-          <div class="timebtn" @click="deriveData">导出</div>
-          <div class="timebtn" @click="refresh">刷新</div>
+          <div
+            :class="tabtable == 1 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
+            @click="tabtable = 1"
+          >
+            表格
+          </div>
+          <div
+            :class="tabtable == 2 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
+            @click="tabtable = 2"
+          >
+            图表
+          </div>
+          <div class="timebtn timebtn1" @click="deriveData">导出</div>
+          <div class="timebtn timebtn1" @click="refresh">刷新</div>
         </div>
         <div class="search_right">
           <div
             :class="timeindex == 1 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
-            @click="empty(1),flag = true;"
+            @click="empty(1), (flag = true)"
           >
             近一天
           </div>
           <div
             :class="timeindex == 2 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
-            @click="empty(2),flag = true;"
+            @click="empty(2), (flag = true)"
           >
             近七天
           </div>
           <div
             :class="timeindex == 3 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
-            @click="empty(3),flag = true;"
+            @click="empty(3), (flag = true)"
           >
             近一月
           </div>
           <div
             :class="timeindex == 4 ? 'timebtn timebtn1' : 'timebtn timebtn2'"
-            @click="empty(4),flag = true;"
+            @click="empty(4), (flag = true)"
           >
             近三月
           </div>
@@ -54,31 +66,52 @@
       </div>
     </div>
     <div class="baselistbox_table">
-      <el-table :data="hisData" stripe style="width: 100%" height="530px">
-        <el-table-column
-          v-for="(item, index) in tableHead"
-          :key="index"
-          width="160px"
-          :label="item.label"
-          :prop="item.property"
-        >
-          <template slot-scope="scope">{{
-            scope.row[scope.column.property]
-          }}</template>
-        </el-table-column>
-        <el-table-column label="" prop=""></el-table-column>
-      </el-table>
-      <div class="pagination">
-        <el-pagination
-          background
-          layout="prev, pager, next,sizes,jumper"
-          :total="totalNum"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          @size-change="handleSizeChange"
-          @current-change="handleCurrentChange"
-        >
-        </el-pagination>
+      <div v-show="tabtable == 1">
+        <el-table :data="hisData" stripe style="width: 100%" height="530px">
+          <el-table-column
+            v-for="(item, index) in tableHead"
+            :key="index"
+            width="160px"
+            :label="item.label"
+            :prop="item.property"
+          >
+            <template slot-scope="scope">{{
+              scope.row[scope.column.property]
+            }}</template>
+          </el-table-column>
+          <el-table-column label="" prop=""></el-table-column>
+        </el-table>
+        <div class="pagination">
+          <el-pagination
+            background
+            layout="prev, pager, next,sizes,jumper"
+            :total="totalNum"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="page_size"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-size.sync="page"
+            :key="pagekey"
+          >
+          </el-pagination>
+        </div>
+      </div>
+      <div v-show="tabtable == 2">
+        <el-row :gutter="10">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :md="12"
+            :lg="6"
+            :xl="6"
+            v-for="(item, index) in echartOptions"
+            :key="index"
+          >
+            <el-card class="box-card" style="margin-bottom: 15px">
+              <highcharts :options="item"></highcharts>
+            </el-card>
+          </el-col>
+        </el-row>
       </div>
     </div>
     <!-- 导出对话框 -->
@@ -150,6 +183,7 @@ export default {
       totalNum: 10,
       page: 1,
       page_size: 10,
+      pagekey: 1,
       dialogVisible: false,
       value: "",
       value1: "",
@@ -169,7 +203,9 @@ export default {
         device_id: this.$route.params.id,
         page: 1,
       },
-      flag:false
+      flag: false,
+      tabtable: 1,
+      echartOptions: [],
     };
   },
   //监听属性 类似于data概念
@@ -198,16 +234,21 @@ export default {
         this.start_time = Math.floor(time.setMonth(mouth - 3) / 1000);
       }
       console.log(this.start_time);
+      this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.getHisDataList();
+      this.getEchartsHisDataList();
     },
     timechange(e) {
       console.log(e);
-      this.flag = true
+      this.flag = true;
       if (e) {
         this.start_time = Math.floor(+new Date(e[0]) / 1000);
         this.end_time = Math.floor(+new Date(e[1]) / 1000);
         this.page = 1;
+        this.pagekey = Math.random() * 10 + 1;
         this.getHisDataList();
+        this.getEchartsHisDataList();
       } else {
         this.empty(1);
       }
@@ -276,6 +317,7 @@ export default {
           // this.$message.success("刷新成功");
           setTimeout(() => {
             this.getHisDataList();
+            this.getEchartsHisDataList();
             // this.refreshload = false;
           }, 2000);
         } else {
@@ -380,6 +422,7 @@ export default {
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random() * 10 + 1;
       this.page_size = e;
       this.getHisDataList();
     },
@@ -387,11 +430,167 @@ export default {
       this.page = e;
       this.getHisDataList();
     },
+    //获取图表历史数据
+    getEchartsHisDataList() {
+      this.$axios({
+        method: "POST",
+        url: "/api/api_gateway?method=weather.weather.qxz_data_chart",
+        data: this.qs.stringify({
+          begin: this.start_time,
+          end: this.end_time,
+          device_id: this.$route.params.id,
+        }),
+      })
+        .then((res) => {
+          console.log(res.data.data);
+          this.echartsFn(res.data.data);
+        })
+        .catch((err) => {
+          console.log(err);
+        });
+    },
+    echartsFn(data) {
+      let conf = data.conf;
+      let eData = data.data;
+      let ChartData = [];
+      console.log(conf);
+      console.log(eData);
+      console.log(eData.length);
+      if (conf && eData && eData.length > 0) {
+        this.isEchartData = true;
+        for (let i in conf) {
+          if (conf[i]) {
+            //判断是否有值
+            ChartData.push({
+              name: i,
+              tit: conf[i].split("#")[0],
+              unit: conf[i].split("#")[1],
+              dat: [],
+            });
+          }
+        }
+        for (let m of eData) {
+          //m是对象
+          for (let n in m.dat) {
+            //dat是对象 n是key
+            for (let j of ChartData) {
+              //j是对象
+              if (j.name == n && m.dat[n].split("#")[0] != "-99.99") {
+                j.dat.push([
+                  m.time * 1000 + 8 * 3600000,
+                  Number(m.dat[n].split("#")[0]),
+                ]);
+              }
+            }
+          }
+        }
+      } else {
+        this.isEchartData = false;
+      }
+      console.log(ChartData);
+
+      // 判断是否有数据
+      if (ChartData.length !== 0) {
+        this.isEchartData = true;
+        this.echartOptions = ChartData.map((item) => {
+          return this.OptionFn(item);
+        });
+      } else {
+        this.isEchartData = false;
+      }
+    },
+    OptionFn(item) {
+      return {
+        title: {
+          text: item.tit,
+          align: "left",
+        },
+        lang: {
+          noData: "暂无数据",
+        },
+        noData: {
+          style: {
+            fontWeight: "bold",
+            fontSize: "15px",
+            color: "#303030",
+          },
+        },
+        xAxis: {
+          crosshair: true, //十字基准线
+          type: "datetime",
+          dateTimeLabelFormats: {
+            //根据时间间距X轴自动显示哪种格式
+            millisecond: "%H:%M:%S.%L",
+            second: "%H:%M:%S",
+            minute: "%H:%M",
+            hour: "%H:%M",
+            day: "%m-%d",
+            week: "%m-%d",
+            month: "%Y-%m",
+            year: "%Y",
+          },
+        },
+        yAxis: {
+          title: { text: "" },
+        },
+        legend: {
+          // layout: 'vertical',
+          align: "right",
+          verticalAlign: "top",
+        },
+        plotOptions: {
+          series: {
+            label: {
+              connectorAllowed: false,
+            },
+            pointStart: 2010, //该参数定义了数据点的起点
+          },
+        },
+        series: [
+          {
+            name: item.name,
+            data: item.dat,
+          },
+        ],
+        colors: ["#00e29d", "#6cbbff", "#ff3f3f"],
+        credits: {
+          //去掉默认的highcharts.com
+          enabled: false,
+        },
+        tooltip: {
+          // crosshairs: true,
+          shared: true, //折线共享
+          headerFormat: "<b>{point.x:%Y-%m-%e %H:%M:%S}</b><br>",
+          pointFormatter: function () {
+            return item.tit + ":" + this.y + item.unit;
+          },
+        },
+        responsive: {
+          rules: [
+            {
+              condition: {
+                maxWidth: 500,
+              },
+              chartOptions: {
+                legend: {
+                  layout: "horizontal",
+                  align: "center",
+                  verticalAlign: "bottom",
+                },
+              },
+            },
+          ],
+        },
+      };
+    },
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
+    this.end_time = Math.floor(+new Date() / 1000);
+    this.start_time = this.end_time - 24 * 60 * 60;
     this.getHisDataList();
+    this.getEchartsHisDataList();
   },
   beforeMount() {}, //生命周期 - 挂载之前
   //生命周期 - 挂载完成(可以访问DOM元素)
@@ -452,9 +651,14 @@ export default {
           font-size: 14px;
           margin-right: 20px;
           line-height: 26px;
+          cursor: pointer;
+        }
+        .timebtn1 {
           background-color: #4f71ff;
           color: #fff;
-          cursor: pointer;
+        }
+        .timebtn2 {
+          color: #4f71ff;
         }
       }
       .search_right {

+ 6 - 1
pingpu_vue/src/page/sqz/sqz.vue

@@ -179,9 +179,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="queryInfo.page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="queryInfo.page"
+          :key="queryInfo.pagekey"
         >
         </el-pagination>
       </div>
@@ -334,6 +336,7 @@ export default {
         page: "1",
         is_online: "",
         f_id: "",
+        pagekey:1
       },
       options: [
         {
@@ -429,10 +432,12 @@ export default {
     },
     searchChange() {
       this.queryInfo.page = 1;
+      this.queryInfo.pagekey = Math.random()*10+1;
       this.getEquipList();
     },
     empty() {
       this.queryInfo.page = 1;
+      this.queryInfo.pagekey = Math.random()*10+1;
       this.queryInfo.is_online = "";
       this.queryInfo.f_id = "";
       this.getEquipList();

+ 29 - 19
pingpu_vue/src/page/user/userlist.vue

@@ -49,7 +49,10 @@
             >
             <span
               style="color: #4f71ff; margin-right: 15px; cursor: pointer"
-              @click="passdialogVisible = true;u_id=scope.row.uid"
+              @click="
+                passdialogVisible = true;
+                u_id = scope.row.uid;
+              "
               >修改密码</span
             >
             <span
@@ -65,10 +68,12 @@
           background
           layout="prev, pager, next,sizes,jumper"
           :total="totalnum"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-sizes="[1, 2, 3, 5]"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -141,7 +146,9 @@
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="passdialogVisible = false" size="mini">取 消</el-button>
+        <el-button @click="passdialogVisible = false" size="mini"
+          >取 消</el-button
+        >
         <el-button type="primary" @click="amendpass" size="mini"
           >确 定</el-button
         >
@@ -198,16 +205,17 @@ export default {
         callback(new Error("请输入新密码"));
       } else if (value.length < 6) {
         callback(new Error("密码最少输入6位"));
-      } else if(value!=this.ruleForm2.password){
+      } else if (value != this.ruleForm2.password) {
         callback(new Error("俩次密码输入不一致"));
-      }else{
+      } else {
         callback();
       }
     };
     return {
       username: "",
       page: 1,
-      page_size: 10,
+      page_size: 1,
+      pagekey: 1,
       userlist: [],
       totalnum: 10,
       loading: false,
@@ -236,24 +244,24 @@ export default {
         id: "pur_id",
       },
       defKeys: [],
-      passdialogVisible:false,
-      ruleForm2:{
-        password:"",
-        secpassword:""
+      passdialogVisible: false,
+      ruleForm2: {
+        password: "",
+        secpassword: "",
       },
-      rules2:{
+      rules2: {
         password: {
           required: true,
           validator: validatePass2,
           trigger: "blur",
         },
-        secpassword:{
+        secpassword: {
           required: true,
           validator: validatePass,
           trigger: "blur",
-        }
+        },
       },
-      u_id:""
+      u_id: "",
     };
   },
   //监听属性 类似于data概念
@@ -267,11 +275,13 @@ export default {
     },
     searchChange() {
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.getuserlist();
     },
     handleSizeChange(e) {
       this.page_size = e;
       this.page = 1;
+      this.pagekey = Math.random()*10+1;
       this.getuserlist();
     },
     handleCurrentChange(e) {
@@ -300,7 +310,7 @@ export default {
       this.jurdata = JSON.parse(localStorage.getItem("menu"));
       this.jurdata[0].disabled = true;
       var data = e.children;
-      this.defKeys = [1]
+      this.defKeys = [1];
       var arr = [];
       for (var i = 0; i < data.length; i++) {
         if (data[i].children) {
@@ -372,7 +382,7 @@ export default {
         }
       });
     },
-    amendpass(){
+    amendpass() {
       this.$refs["ruleForm2"].validate((valid) => {
         if (valid) {
           this.$axios({
@@ -401,7 +411,7 @@ export default {
         }
       });
     },
-    deluser(id){
+    deluser(id) {
       this.$confirm("此操作将删除该用户, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
@@ -435,7 +445,7 @@ export default {
             message: "已取消删除",
           });
         });
-    }
+    },
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)

+ 32 - 7
pingpu_vue/src/page/worn/earlywarning.vue

@@ -148,9 +148,11 @@
           layout="prev, pager, next,sizes,jumper"
           :total="totalNum"
           :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
+          :page-size="page_size"
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
+          :current-size.sync="page"
+          :key="pagekey"
         >
         </el-pagination>
       </div>
@@ -204,6 +206,7 @@ export default {
       bzyinfo: [],
       qxzinfo: [],
       sqzinfo: [],
+      pagekey:1
     };
   },
   //监听属性 类似于data概念
@@ -212,20 +215,42 @@ export default {
   watch: {},
   //方法集合
   methods: {
-    goBackPage(){
+    goBackPage() {
       this.$router.go(-1);
     },
     handleSizeChange(e) {
       this.page = 1;
+      this.pagekey = Math.random()*10+1
       this.page_size = e;
-      //   this.getwarnlist();
+      if (this.warnvalue == 1) {
+        this.getcbdlist();
+      } else if (this.warnvalue == 2) {
+        this.getsqzlist();
+      } else if (this.warnvalue == 3) {
+        this.getqxzlist();
+      } else if (this.warnvalue == 4) {
+        this.getbzylist();
+      } else if (this.warnvalue == 5) {
+        this.getcroplist();
+      }
     },
     handleCurrentChange(e) {
       this.page = e;
-      //   this.getwarnlist();
+      if (this.warnvalue == 1) {
+        this.getcbdlist();
+      } else if (this.warnvalue == 2) {
+        this.getsqzlist();
+      } else if (this.warnvalue == 3) {
+        this.getqxzlist();
+      } else if (this.warnvalue == 4) {
+        this.getbzylist();
+      } else if (this.warnvalue == 5) {
+        this.getcroplist();
+      }
     },
     tupechange(e) {
       this.page = 1;
+      this.pagekey = Math.random()*10+1
       if (e == 1) {
         this.getcbdlist();
       } else if (e == 2) {
@@ -239,7 +264,7 @@ export default {
       }
     },
     allread() {
-        if (this.warnvalue == 1) {
+      if (this.warnvalue == 1) {
         this.cbdyiduall();
       } else if (this.warnvalue == 2) {
         this.sqzyiduall();
@@ -391,7 +416,7 @@ export default {
         }
       });
     },
-     // 单条信息已读
+    // 单条信息已读
     qxzyidu(id) {
       this.$axios({
         method: "POST",
@@ -533,7 +558,7 @@ export default {
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {
     // this.getcbdlist();
-    this.getsqzlist();
+    this.getqxzlist();
   },
   beforeMount() {}, //生命周期 - 挂载之前
   //生命周期 - 挂载完成(可以访问DOM元素)