Kaynağa Gözat

添加生成二维码功能 3/9

zhangyun 3 yıl önce
ebeveyn
işleme
f056a9f62f

+ 3 - 3
minggao/config/index.js

@@ -12,9 +12,9 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        //  target: 'http://192.168.1.17:12345', //翟毅飞
-        //target: 'http://192.168.1.77:12345', //曹世祥
-        target:"http://114.115.147.140:12345",
+         target: 'http://192.168.1.17:12345', //翟毅飞
+        // target: 'http://192.168.1.77:12345', //曹世祥
+        // target:"http://114.115.147.140:12345",
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api' //重写接口

+ 1 - 0
minggao/package.json

@@ -14,6 +14,7 @@
     "echarts": "^4.9.0",
     "element-ui": "^2.15.6",
     "less": "^4.1.2",
+    "qrcodejs2": "^0.0.2",
     "vue": "^2.5.2",
     "vue-router": "^3.0.1",
     "vuex": "^3.6.2",

+ 1 - 1
minggao/src/assets/css/global.css

@@ -55,7 +55,7 @@ p {
 }
 
 .el-col {
-  margin-bottom: 10px;
+  /* margin-bottom: 10px; */
 }
 
 /* 解决elementUI的table的闪动问题 */

+ 2 - 1
minggao/src/page/commandCenter/realTime.vue

@@ -31,7 +31,7 @@
       </el-col>
     </el-row>
 
-    <el-card>
+    <el-card style="margin-top: 15px">
       <div class="card_box" style="margin-top: 15px">
         <!-- 组织 -->
         <div
@@ -500,6 +500,7 @@ export default {
 
     // 搜索
     searchData() {
+      this.page = 1
       this.userListData();
     },
 

+ 9 - 5
minggao/src/page/commandCenter/supervise.vue

@@ -82,10 +82,11 @@
         stripe
         :height="48 * 13"
         style="width: 100%; overflow-y: auto"
+        ref="gridTable"
       >
         <el-table-column prop="ind" label="序号" width="100">
           <template slot-scope="scope">
-            <span>{{ ((page-1)*20)+scope.row.ind}}</span>
+            <span>{{ (page - 1) * 20 + scope.row.ind }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="task_id" label="任务编号" width="180">
@@ -229,6 +230,9 @@ export default {
             this.tableData = list;
           }
           this.loading = false;
+          this.$nextTick(() => {
+            this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+          });
         })
         .catch((err) => {
           this.loading = false;
@@ -267,13 +271,13 @@ export default {
     searchData(e) {
       console.log(e);
       if (this.value) {
-        this.startTime = this.tabtime(e[0]);
-        this.endTime = this.tabtime(e[1]);
+        this.startTime = this.tabtime(this.value[0]);
+        this.endTime = this.tabtime(this.value[1]);
       } else {
         this.startTime = "";
         this.endTime = "";
       }
-      this.page = 1
+      this.page = 1;
       this.loading = true;
       this.tableData = [];
       this.tableList();
@@ -294,7 +298,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.loading = true;
       this.tableData = [];
-      this.page = 1
+      this.page = 1;
       this.tableList();
     },
 

+ 8 - 8
minggao/src/page/commandCenter/superviseAdminDetails.vue

@@ -152,8 +152,8 @@
           v-for="(item, index) in insectList"
           :key="index"
         >
-          <div>{{ item.pest_name + ":" }}</div>
-          <div style="margin: 0 0 0 20px">{{ item.pest_number }}</div>
+          <p>{{ item.pest_name + ":" }}</p>
+          <p style="margin: 0 0 0 20px">{{ item.pest_number }}只</p>
         </li>
       </ul>
     </el-dialog>
@@ -476,12 +476,12 @@ export default {
   .insect_ul {
     .insect_list {
       display: flex;
-      margin: 0 0 20px 0;
-      div {
-        font-size: 18px;
-        width: 20%;
-        text-align: right;
-        margin: 0px 0 0 -35px;
+      // margin: 0 0 20px 0;
+      margin-bottom: 20px;
+      p{
+        font-size: 16px;
+        width: 30%;
+        text-align: left;
       }
     }
   }

+ 7 - 7
minggao/src/page/commandCenter/superviseDetails.vue

@@ -121,9 +121,9 @@
 
             <ul class="list_ul">
               <li class="list_sing_li">
-                <div class="list_sing_div">
-                  <span class="list_div_tlt">签到图片:</span>
-                  <p v-if="taskObj.img_list.length !== 0" style="display: flex">
+                <div class="list_sing_div list_sing_div2">
+                  <p class="list_div_tlt" style="width:12%">签到图片:</p>
+                  <p v-if="taskObj.img_list.length !== 0" style="display: flex;width:88%;flex-wrap:wrap;">
                     <span
                       class="list_div_img"
                       v-for="(item, index) in taskObj.img_list"
@@ -354,17 +354,17 @@ export default {
       }
 
       .list_sing_li {
-        display: flex;
-        justify-content: space-between;
+        // display: flex;
+        // justify-content: space-between;
         .list_sing_div {
           margin: 0 0 25px 0;
-          width: 40%;
+          width: 100%;
           font-size: 14px;
           display: flex;
           color: #333333;
           .list_div_img {
             width: 113px;
-            margin: 0 15px 0 0;
+            margin: 0 15px 15px 0;
             display: flex;
             img {
               width: 100%;

+ 2 - 2
minggao/src/page/forecasting/cbd/DataDetails.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="cursor: default; width: 99%">
-    <el-button type="success" size="small" @click="goBackPage()"
-      ><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
+    <el-button type="success" size="mini" @click="goBackPage()"
+      >返回</el-button
     >
     <div class="equipInfo">
       <div class="equipMsg">

+ 2 - 2
minggao/src/page/forecasting/cbd/PestsStats.vue

@@ -1,7 +1,7 @@
 <template>
   <div style="cursor: default;width:99%;">
-    <el-button type="success" size="small" @click="goBackPage()"
-      ><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button
+    <el-button type="success" size="mini" @click="goBackPage()"
+      >返回</el-button
     >
     <div class="equipInfo">
       <div class="equipMsg">

+ 1 - 1
minggao/src/page/forecasting/cbd/cbdDataPhotos.vue

@@ -3,7 +3,7 @@
     <!--  -->
     <!-- 设备基本信息 -->
     <div style="margin: 0 0 20px 13px; display: flex">
-      <el-button type="success" size="small" @click="goBackPage()"><i class="el-icon--left el-icon-d-arrow-left"></i>返回</el-button>
+      <el-button type="success" size="mini" @click="goBackPage()">返回</el-button>
       <i class="iconfont icon-yonghu" style="color: #15bc88; line-height: 32px; margin: 0 0 0 18px"></i>
       <div class="equipMsg" style="margin: 6px 0 0 5px; font-size: 15px; color: #8d8d8d">
         <span>设备ID:{{ id }}</span>

+ 5 - 1
minggao/src/page/forecasting/maintain/maintain.vue

@@ -20,7 +20,7 @@
     </div>
     <el-card class="box-card" style="margin-top: 15px">
       <div class="cbdboxs_table" v-loading="loading">
-        <el-table :data="tableData" style="width: 100%" :stripe="true" :height="48*13">
+        <el-table :data="tableData" style="width: 100%" :stripe="true" :height="48*13" ref="gridTable">
           <el-table-column prop="index" label="序号">
             <template slot-scope="scope">
             <span>{{ ((page-1)*20)+scope.row.index}}</span>
@@ -281,9 +281,13 @@ export default {
         for (var i = 0; i < this.tableData.length; i++) {
           this.tableData[i]["index"] = i + 1;
         }
+        this.$nextTick(() => {
+          this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+        });
       });
     },
     search() {
+      this.page = 1
       this.getmaintainlist();
     },
     pageChange(e) {

+ 4 - 0
minggao/src/page/forecasting/trap/bait.vue

@@ -25,6 +25,7 @@
           style="width: 100%"
           :stripe="true"
           :height="48 * 13"
+          ref="gridTable"
         >
           <el-table-column prop="index" label="序号">
             <template slot-scope="scope">
@@ -174,6 +175,9 @@ export default {
         for (var i = 0; i < this.tableData.length; i++) {
           this.tableData[i]["index"] = i + 1;
         }
+        this.$nextTick(() => {
+          this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+        });
       });
     },
     search() {

+ 24 - 12
minggao/src/page/forecasting/trap/fillinrecord.vue

@@ -18,7 +18,7 @@
         size="mini"
         clearable
         @change="search"
-        filterable 
+        filterable
       >
         <el-option
           v-for="item in inoffoptions"
@@ -34,7 +34,7 @@
         size="mini"
         clearable
         @change="search"
-        filterable 
+        filterable
       >
         <el-option
           v-for="item in versionsoptions2"
@@ -77,11 +77,12 @@
           style="width: 100%"
           :stripe="true"
           :height="48 * 13"
+          ref="gridTable"
         >
           <el-table-column prop="index" label="序号" width="60px">
             <template slot-scope="scope">
-            <span>{{ ((queryInfo.page-1)*20)+scope.row.index}}</span>
-          </template>
+              <span>{{ (queryInfo.page - 1) * 20 + scope.row.index }}</span>
+            </template>
           </el-table-column>
           <el-table-column prop="trap_number" label="编号"></el-table-column>
           <el-table-column prop="org_name" label="组织">
@@ -142,7 +143,10 @@
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="deriveVisible = false" size="mini">取 消</el-button>
-        <el-button type="primary" @click="deriveclick" size="mini"
+        <el-button
+          type="primary"
+          @click="deriveclick"
+          size="mini"
           :disabled="deriveTF"
           >{{ deriveTF ? "导出中..." : "确 定" }}</el-button
         >
@@ -190,7 +194,7 @@ export default {
         children: "childrens",
       },
       content: "",
-      deriveTF:false
+      deriveTF: false,
     };
   },
   //监听属性 类似于data概念
@@ -223,6 +227,9 @@ export default {
         for (var i = 0; i < this.tableData.length; i++) {
           this.tableData[i]["index"] = i + 1;
         }
+        this.$nextTick(() => {
+          this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+        });
       });
     },
     // getmon() {
@@ -253,16 +260,21 @@ export default {
       console.log(this.inoffoptions);
       this.queryInfo.point_name = this.inoffvalue;
       this.queryInfo.org_name = this.versionsvalue2;
-      this.queryInfo.page = 1
+      this.queryInfo.page = 1;
       // console.log(this.versionsvalue2)
       this.getcbdlist();
     },
     oickchange(e) {
       //搜索时间段
       console.log(e);
-      this.queryInfo.start_time = this.tabtime(e[0]);
-      this.queryInfo.end_time = this.tabtime(e[1]);
-      this.search()
+      if (e) {
+        this.queryInfo.start_time = this.tabtime(e[0]);
+        this.queryInfo.end_time = this.tabtime(e[1]);
+      }else{
+        this.queryInfo.start_time = ''
+        this.queryInfo.end_time = ''
+      }
+      this.search();
     },
     tabtime(times) {
       //时间转换
@@ -301,7 +313,7 @@ export default {
       document.body.appendChild(link);
       link.click();
       document.body.removeChild(link);
-      this.deriveTF = false
+      this.deriveTF = false;
     },
     deriveclick() {
       // this.deriveVisible = false;
@@ -314,7 +326,7 @@ export default {
           });
         }
       } else {
-        this.deriveTF = true
+        this.deriveTF = true;
         this.$axios({
           method: "POST",
           url: "/api/pest_export",

+ 13 - 14
minggao/src/page/forecasting/trap/trap.vue

@@ -13,7 +13,7 @@
         clearable
         @change="search"
         size="mini"
-        filterable 
+        filterable
       >
         <el-option
           v-for="item in traponsoptions"
@@ -29,7 +29,7 @@
         size="mini"
         clearable
         @change="search"
-        filterable 
+        filterable
       >
         <el-option
           v-for="item in versionsoptions2"
@@ -55,7 +55,7 @@
         size="mini"
         clearable
         @change="search"
-        filterable 
+        filterable
       >
         <el-option
           v-for="item in inoffoptions"
@@ -82,18 +82,14 @@
           style="width: 100%; overflow-y: auto"
           :stripe="true"
           :height="48 * 13"
+          ref="gridTable"
         >
-          <el-table-column
-            prop="index"
-            label="序号"
-            width="60px"
-          >
-          <template slot-scope="scope">
-            <span>{{ ((queryInfo.page-1)*20)+scope.row.index}}</span>
-          </template>
-          </el-table-column>
-          <el-table-column prop="trap_number" label="编号">
+          <el-table-column prop="index" label="序号" width="60px">
+            <template slot-scope="scope">
+              <span>{{ (queryInfo.page - 1) * 20 + scope.row.index }}</span>
+            </template>
           </el-table-column>
+          <el-table-column prop="trap_number" label="编号"> </el-table-column>
           <el-table-column prop="lng" label="经度">
             <template slot-scope="scope">
               <span>{{ ToDegrees(scope.row.lng, "lng") }}</span>
@@ -547,6 +543,9 @@ export default {
         for (var i = 0; i < this.tableData.length; i++) {
           this.tableData[i]["index"] = i + 1;
         }
+        this.$nextTick(() => {
+          this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+        });
       });
     },
     getmon() {
@@ -835,7 +834,7 @@ export default {
         }
       } else {
         this.deriveTF = true;
-        console.log(this.ruleForm)
+        console.log(this.ruleForm);
         this.$axios({
           method: "POST",
           url: "api/trap_list_export",

+ 64 - 28
minggao/src/page/home/index.vue

@@ -19,7 +19,12 @@
         />
         <p>{{ headline }}</p>
       </div>
-      <div class="index_out">
+      <div class="index_out" style="display: flex">
+        <div
+          class="iconfont icon-erweima"
+          style="margin-right: 15px; font-size: 22px; color: #666666"
+          @click="QRcode"
+        ></div>
         <el-dropdown trigger="click" @command="quit">
           <span class="el-dropdown-link" style="cursor: pointer">
             <span>{{ username }}</span>
@@ -51,7 +56,7 @@
             :index="item.pur_id.toString()"
           >
             <template slot="title">
-              <i :class="icon[item.pur_id]" style="color:#fff;"></i>
+              <i :class="icon[item.pur_id]" style="color: #fff"></i>
               <span>{{ item.purview_name }}</span>
             </template>
             <template v-for="items in item.children">
@@ -93,7 +98,11 @@
               v-for="(item, index) in routerinfo"
               :key="item.pur_id"
               ><a
-                v-if="index == routerinfo.length - 2 && item.menu != ''&&item.purview_name!='查看图片'"
+                v-if="
+                  index == routerinfo.length - 2 &&
+                  item.menu != '' &&
+                  item.purview_name != '查看图片'
+                "
                 :href="'/#/index/' + item.menu"
                 style="cursor: pointer"
                 >{{ item.purview_name }}</a
@@ -138,12 +147,15 @@
         >
       </span>
     </el-dialog>
+    <el-dialog title="扫描下载智网监测" :visible.sync="QRtf" width="300px">
+      <div class="qrcode" ref="qrCodeUrl" style="margin: 0 auto"></div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-
+import QRCode from "qrcodejs2";
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
@@ -206,14 +218,16 @@ export default {
       },
       indexloading: false,
       pur_id: "",
-      icon:{
-        1:"iconfont icon-minggaoshouye",
-        4:"iconfont icon-xietongzhihuidaping",
-        10:"iconfont icon-didian",
-        20:"iconfont icon-gongzuoguanli-dingdanguanli",
-        22:"iconfont icon-database-full",
-        25:"iconfont icon-shezhi1",
-      }
+      icon: {
+        1: "iconfont icon-minggaoshouye",
+        4: "iconfont icon-xietongzhihuidaping",
+        10: "iconfont icon-didian",
+        20: "iconfont icon-gongzuoguanli-dingdanguanli",
+        22: "iconfont icon-database-full",
+        25: "iconfont icon-shezhi1",
+      },
+      QRtf: false,
+      app_url:""
     };
   },
   //监听属性 类似于data概念
@@ -241,15 +255,16 @@ export default {
         url: "/api/api_gateway?method=sysmenage.usermanager.user_info",
       }).then((res) => {
         this.indexloading = false;
+        this.app_url = res.data.data.app_url
         this.imgurl = res.data.data.theme_info.logo_url;
         this.headline = res.data.data.theme_info.sys_name;
         this.routerdata = JSON.parse(JSON.stringify(res.data.data.children));
-        var titleList = []
+        var titleList = [];
         res.data.data.children.forEach((item) => {
-          if (item.purview_name !== 'APP') {
-            titleList.push(item)
+          if (item.purview_name !== "APP") {
+            titleList.push(item);
           }
-        })
+        });
         // this.infodata = res.data.data.children;
         this.infodata = titleList;
         console.log(this.routerdata);
@@ -302,27 +317,27 @@ export default {
             if (res.data.data) {
               this.alterpassTF = false;
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                message: "修改成功!",
-                type: "success",
-              });
+                this.$message({
+                  message: "修改成功!",
+                  type: "success",
+                });
               }
               this.outsystem();
             } else {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                message: "修改失败!" + res.data.data.message,
-                type: "error",
-              });
+                this.$message({
+                  message: "修改失败!" + res.data.data.message,
+                  type: "error",
+                });
               }
             }
           });
         } else {
           if (document.getElementsByClassName("el-message").length == 0) {
-          this.$message({
-            message: "请完成信息填写!",
-            type: "warning",
-          });
+            this.$message({
+              message: "请完成信息填写!",
+              type: "warning",
+            });
           }
           return false;
         }
@@ -332,6 +347,22 @@ export default {
       this.$refs[formName].resetFields();
       this.alterpassTF = false;
     },
+    QRcode() {
+      this.QRtf = true;
+      this.$nextTick(() => {
+        console.log(this.$deriveData+this.app_url);
+        if (!this.$refs.qrCodeUrl.firstChild) {
+          new QRCode(this.$refs.qrCodeUrl, {
+            text: this.$deriveData+this.app_url, // 需要转换为二维码的内容
+            width: 100,
+            height: 100,
+            colorDark: "#000000",
+            colorLight: "#ffffff",
+            correctLevel: QRCode.CorrectLevel.H,
+          });
+        }
+      });
+    },
     routemap(routerdata) {
       var newrouter = this.$route.path;
       var tf = routerdata.filter((item) => {
@@ -575,4 +606,9 @@ p {
     }
   }
 }
+/deep/.qrcode {
+  img {
+    margin: 0 auto;
+  }
+}
 </style>

+ 24 - 4
minggao/src/page/homepage/pestdistribute.vue

@@ -684,7 +684,7 @@ export default {
         },
         legend: {
           orient: "horizontal",
-          bottom: "5%",
+          top: "90%",
           itemWidth: 10,
           itemHeight: 10,
           x: "center",
@@ -693,7 +693,22 @@ export default {
             fontSize: 12,
           },
           show: true,
-          data: data,
+          // data: data,
+          type: "scroll", //分页类型
+          data: (function () {
+            var list = [];
+            for (var i = 1; i < data.length; i++) {
+              list.push(data[i]);
+            }
+            return list;
+          })(),
+          pageIconColor: "#ff781f", //翻页箭头颜色
+          pageTextStyle: {
+            color: "#999", //翻页数字颜色
+          }, //翻页数字设置
+          pageIconSize: 13,
+          itemHeight: 10,
+          itemWidth: 15,
         },
         series: [
           {
@@ -828,8 +843,13 @@ export default {
       return years + "-" + month + "-" + date;
     },
     oickchange(e) {
-      this.start_time = this.tabtime(e[0]);
-      this.end_time = this.tabtime(e[1]);
+      if (e) {
+        this.start_time = this.tabtime(e[0]);
+        this.end_time = this.tabtime(e[1]);
+      } else {
+        this.start_time = "";
+        this.end_time = "";
+      }
     },
     search() {
       this.getwornlist();

+ 7 - 2
minggao/src/page/homepage/pestdistributeold.vue

@@ -682,8 +682,13 @@ export default {
       return years + "-" + month + "-" + date;
     },
     oickchange(e) {
-      this.start_time = this.tabtime(e[0]);
-      this.end_time = this.tabtime(e[1]);
+      if (e) {
+        this.start_time = this.tabtime(e[0]);
+        this.end_time = this.tabtime(e[1]);
+      } else {
+        this.start_time = '';
+        this.end_time = '';
+      }
     },
     search() {
       this.getwornlist();

+ 1 - 0
minggao/src/page/monitoring/monitoringtask.vue

@@ -181,6 +181,7 @@ export default {
             color: "#333",
             fontSize: 14,
             interval: 0,
+            rotate:-50
           },
 
           data: categoryData,

+ 1 - 0
minggao/src/page/monitoring/supervisiontask.vue

@@ -153,6 +153,7 @@ export default {
             color: "#333",
             fontSize: 14,
             interval: 0,
+            rotate:-50
           },
           nameTextStyle: {
             color: "#ff0",

+ 9 - 4
minggao/src/page/superviseModule/superviseModule.vue

@@ -78,10 +78,11 @@
         stripe
         style="width: 100%"
         :height="48 * 13"
+        ref="gridTable"
       >
         <el-table-column prop="ind" label="序号" width="180">
           <template slot-scope="scope">
-            <span>{{ ((page-1)*20)+scope.row.ind}}</span>
+            <span>{{ (page - 1) * 20 + scope.row.ind }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="supervisor_user" label="监督人" width="180">
@@ -220,6 +221,9 @@ export default {
               list.push(item);
             });
             this.tableData = list;
+            this.$nextTick(() => {
+              this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+            });
           }
           this.loading = false;
         })
@@ -258,9 +262,10 @@ export default {
 
     // 搜索
     searchData(e) {
+      // console.log(this.value)
       if (this.value) {
-        this.startTime = this.tabtime(e[0]);
-        this.endTime = this.tabtime(e[1]);
+        this.startTime = this.tabtime(this.value[0]);
+        this.endTime = this.tabtime(this.value[1]);
       } else {
         this.startTime = "";
         this.endTime = "";
@@ -286,7 +291,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.loading = true;
       this.tableData = [];
-      this.page = 1
+      this.page = 1;
       this.tableList();
     },
 

+ 56 - 55
minggao/src/page/systemmanger/harmfulBiology.vue

@@ -82,10 +82,11 @@
         stripe
         :height="48 * 13"
         style="width: 100%"
+        ref="gridTable"
       >
         <el-table-column prop="ind" label="序号">
           <template slot-scope="scope">
-            <span>{{ ((page-1)*20)+scope.row.ind}}</span>
+            <span>{{ (page - 1) * 20 + scope.row.ind }}</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -94,10 +95,7 @@
           label="有害生物名称"
         >
         </el-table-column>
-        <el-table-column
-          prop="quarantine"
-          label="检疫性有害生物(是/否)"
-        >
+        <el-table-column prop="quarantine" label="检疫性有害生物(是/否)">
         </el-table-column>
         <el-table-column prop="alien_specie" label="是否外来物种">
         </el-table-column>
@@ -110,8 +108,7 @@
             <span>{{ scope.row.messages || "无" }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="create_time" label="添加时间">
-        </el-table-column>
+        <el-table-column prop="create_time" label="添加时间"> </el-table-column>
         <el-table-column prop="modify_time" label="最后修改时间">
         </el-table-column>
         <el-table-column label="操作">
@@ -217,8 +214,8 @@ export default {
           judge2: "是",
           remark: "这是一个有害虫类",
           addDate: "2016-05-02 10:00:00",
-          endDate: "2021-01-06 10:00:00"
-        }
+          endDate: "2021-01-06 10:00:00",
+        },
       ],
       loading: false, // 加载
 
@@ -229,25 +226,25 @@ export default {
         name: "", //有害生物名称
         judge: "", // 检疫性有害生物
         judge2: "", //是否外来入侵物种
-        remark: "" // 备注
+        remark: "", // 备注
       },
       rules: {
         name: [
-          { required: true, message: "请输入有害生物名称", trigger: "blur" }
+          { required: true, message: "请输入有害生物名称", trigger: "blur" },
           //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
         ],
         judge: [
-          { required: true, message: "请选检疫性有害生物", trigger: "blur" }
+          { required: true, message: "请选检疫性有害生物", trigger: "blur" },
           //   { min: 3, max: 5, message: "长度在 1 到 15 个字符", trigger: "blur" },
         ],
         judge2: [
           {
             required: true,
             message: "请选择是否外来入侵物种",
-            trigger: "blur"
-          }
+            trigger: "blur",
+          },
           //   { min: 3, max: 5, message: "长度在 1 到 30 个字符", trigger: "blur" },
-        ]
+        ],
         // remark: [
         //   { required: true, message: "请输入备注", trigger: "blur" },
         //   //   { min: 3, max: 5, message: "长度在 1 到 30 个字符", trigger: "blur" },
@@ -255,7 +252,7 @@ export default {
       },
       insectObj: {},
       isClick: true, // 防止重复弹框
-      submitBtn: false // 防止弹框确定按钮重复请求
+      submitBtn: false, // 防止弹框确定按钮重复请求
     };
   },
   //监听属性 类似于data概念
@@ -268,7 +265,7 @@ export default {
         this.fullHeight = val;
         this.timer = true;
         let that = this;
-        setTimeout(function() {
+        setTimeout(function () {
           //防止过度调用监测事件,导致卡顿
           that.timer = false;
         }, 400);
@@ -284,7 +281,7 @@ export default {
         this.form.remark = ""; // 备注
         // this.$refs["form"].resetFields();
       }
-    }
+    },
   },
   //方法集合
   methods: {
@@ -319,10 +316,10 @@ export default {
         data: this.qs.stringify({
           page: this.page,
           page_item: "20",
-          pest_name: this.input
-        })
+          pest_name: this.input,
+        }),
       })
-        .then(res => {
+        .then((res) => {
           if (res.data.data.total_item !== 0) {
             var data = res.data.data;
             this.pageSum = data.total_item;
@@ -335,9 +332,12 @@ export default {
           } else {
             this.tableData = [];
           }
+          this.$nextTick(() => {
+            this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+          });
           this.loading = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.loading = false;
         });
     },
@@ -358,7 +358,7 @@ export default {
         name: data.pest_name, //有害生物名称
         judge: data.quarantine, // 检疫性有害生物
         judge2: data.alien_specie, //是否外来入侵物种
-        remark: data.messages // 备注
+        remark: data.messages, // 备注
       };
       this.addrInsectVisible = true;
     },
@@ -368,32 +368,32 @@ export default {
       this.$confirm("此操作将永久删除, 是否继续?", "提示", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
-        type: "warning"
+        type: "warning",
       })
         .then(() => {
           this.$axios({
             method: "POST",
             url: "/api/api_gateway?method=sysmenage.maintain.pest_delete",
             data: this.qs.stringify({
-              pest_id: data.pest_id
-            })
-          }).then(res => {
+              pest_id: data.pest_id,
+            }),
+          }).then((res) => {
             console.log(res.data.data);
             if (res.data.data == true) {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                type: "success",
-                message: "成功",
-                duration: 1500
-              });
+                this.$message({
+                  type: "success",
+                  message: "成功",
+                  duration: 1500,
+                });
               }
             } else {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                type: "error",
-                message: "失败",
-                duration: 1500
-              });
+                this.$message({
+                  type: "error",
+                  message: "失败",
+                  duration: 1500,
+                });
               }
             }
             this.harmfulBiologyList();
@@ -401,17 +401,17 @@ export default {
         })
         .catch(() => {
           if (document.getElementsByClassName("el-message").length == 0) {
-          this.$message({
-            type: "info",
-            message: "已取消删除"
-          });
+            this.$message({
+              type: "info",
+              message: "已取消删除",
+            });
           }
         });
     },
 
     // 添加 - 编辑 确定
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           this.submitBtn = true;
           if (this.tltData == "添加有害生物") {
@@ -420,7 +420,7 @@ export default {
               pest_name: this.form.name,
               alien_specie: this.form.judge2,
               quarantine: this.form.judge,
-              messages: this.form.remark
+              messages: this.form.remark,
             });
           } else if (this.tltData == "编辑有害生物") {
             var url = "/api/api_gateway?method=sysmenage.maintain.pest_modify";
@@ -429,22 +429,22 @@ export default {
               pest_name: this.form.name,
               alien_specie: this.form.judge2,
               quarantine: this.form.judge,
-              messages: this.form.remark
+              messages: this.form.remark,
             });
           }
           this.$axios({
             method: "POST",
             url,
-            data: postData
+            data: postData,
           })
-            .then(res => {
+            .then((res) => {
               if (res.data.message == "") {
                 if (document.getElementsByClassName("el-message").length == 0) {
-                this.$message({
-                  type: "success",
-                  message: "成功",
-                  duration: 1500
-                });
+                  this.$message({
+                    type: "success",
+                    message: "成功",
+                    duration: 1500,
+                  });
                 }
               }
 
@@ -453,7 +453,7 @@ export default {
               this.harmfulBiologyList();
               this.submitBtn = false;
             })
-            .catch(err => {
+            .catch((err) => {
               this.submitBtn = false;
             });
         } else {
@@ -464,7 +464,7 @@ export default {
     cancel() {
       this.$refs["form"].resetFields();
       this.addrInsectVisible = false;
-    }
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -479,7 +479,7 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang="less" scoped>
@@ -518,7 +518,8 @@ export default {
 
 // 文本域样式更改
 /deep/.el-textarea__inner {
-  font-family:  "Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","微软雅黑",Arial,sans-serif;
+  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB",
+    "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
 }
 
 /deep/.el-button--info {

+ 5 - 1
minggao/src/page/systemmanger/userManger.vue

@@ -57,6 +57,7 @@
             stripe
             :height="48 * 13"
             style="width: 100%; overflow-y: auto"
+            ref="gridTable"
           >
             <el-table-column prop="ind" label="序号" width="90">
               <template slot-scope="scope">
@@ -413,7 +414,7 @@ export default {
           {
             min: 3,
             max: 20,
-            message: "长度在 3 到 20 位之间",
+            message: "账号长度在 3 到 20 位之间",
             trigger: "blur",
           },
         ],
@@ -826,6 +827,9 @@ export default {
             this.tableData = list;
             this.pageSum = res.data.data.total_item;
           }
+          this.$nextTick(() => {
+            this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+          });
           this.loading2 = false;
         })
         .catch((err) => {