yf_zhb пре 3 година
родитељ
комит
cd13e7e468

+ 106 - 106
minggao/src/page/home/index.vue

@@ -126,8 +126,8 @@
               ><a
                 v-if="
                   index == routerinfo.length - 2 &&
-                  item.menu != '' &&
-                  item.purview_name != '查看图片'
+                    item.menu != '' &&
+                    item.purview_name != '查看图片'
                 "
                 :href="'/#/index/' + item.menu"
                 style="cursor: pointer"
@@ -181,7 +181,7 @@
 
 <script>
 //这里可以导入其他文件(比如:组件,工具js,第三方插件js,json文件,图片文件等等)
-import QRCode from "qrcodejs2";
+import QRCode from 'qrcodejs2';
 export default {
   //import引入的组件需要注入到对象中才能使用
   components: {},
@@ -192,89 +192,89 @@ export default {
       if (value == this.ruleForm.newpass) {
         callback();
       } else {
-        callback(new Error("俩次密码不一致,请重新确认密码!"));
+        callback(new Error('俩次密码不一致,请重新确认密码!'));
       }
     };
     return {
       infodata: [],
-      username: "",
+      username: '',
       routerdata: [],
-      menuActiveId: "1",
+      menuActiveId: '1',
       // menuOpeneds:["18"]
       routerinfo: [],
       options: [],
-      value: "",
-      imgurl: "", //系统logo
-      headline: "", //系统标题
+      value: '',
+      imgurl: '', //系统logo
+      headline: '', //系统标题
       alterpassTF: false, //修改密码框
       ruleForm: {
-        oldpass: "",
-        newpass: "",
-        newpasstrue: "",
+        oldpass: '',
+        newpass: '',
+        newpasstrue: ''
       },
       rules: {
         oldpass: [
-          { required: true, message: "请输入原始密码", trigger: "blur" },
+          { required: true, message: '请输入原始密码', trigger: 'blur' },
           {
             min: 6,
             max: 15,
-            message: "长度在 6 到 15 个字符",
-            trigger: "blur",
-          },
+            message: '长度在 6 到 15 个字符',
+            trigger: 'blur'
+          }
         ],
         newpass: [
-          { required: true, message: "请输入新密码", trigger: "blur" },
+          { required: true, message: '请输入新密码', trigger: 'blur' },
           {
             min: 6,
             max: 15,
-            message: "长度在 6 到 15 个字符",
-            trigger: "blur",
-          },
+            message: '长度在 6 到 15 个字符',
+            trigger: 'blur'
+          }
         ],
         newpasstrue: [
-          { required: true, message: "请再次输入新密码", trigger: "blur" },
+          { required: true, message: '请再次输入新密码', trigger: 'blur' },
           {
             min: 6,
             max: 15,
-            message: "长度在 6 到 15 个字符",
-            trigger: "blur",
+            message: '长度在 6 到 15 个字符',
+            trigger: 'blur'
           },
-          { validator: validatePass, trigger: "blur" },
-        ],
+          { validator: validatePass, trigger: 'blur' }
+        ]
       },
       indexloading: false,
-      pur_id: "",
+      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",
-        45: "iconfont icon-yujing1"
+        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',
+        45: 'iconfont icon-yujing1'
       },
       QRtf: false,
-      app_url: "",
+      app_url: '',
       menunoneele: true,
-      warntf:false
+      warntf: false
     };
   },
   //监听属性 类似于data概念
   computed: {},
   //监控data中的数据变化
   watch: {
-    "$route.path": function (newVal) {
+    '$route.path': function(newVal) {
       console.log(newVal);
       if (
-        newVal == "/index/facilitydistribute" ||
-        newVal == "/index/pestdistribute"
+        newVal == '/index/facilitydistribute' ||
+        newVal == '/index/pestdistribute'
       ) {
-        console.log("触发");
+        console.log('触发');
         this.menunone();
       }
       this.routemap(this.routerdata);
       // this.menuActiveId = this.$route.path;
-    },
+    }
   },
   //方法集合
   methods: {
@@ -287,17 +287,17 @@ export default {
     getuserinfo() {
       this.indexloading = true;
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=sysmenage.usermanager.user_info",
-      }).then((res) => {
+        method: 'POST',
+        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 = [];
-        res.data.data.children.forEach((item) => {
-          if (item.purview_name !== "APP") {
+        res.data.data.children.forEach(item => {
+          if (item.purview_name !== 'APP') {
             titleList.push(item);
           }
         });
@@ -305,30 +305,30 @@ export default {
         this.infodata = titleList;
         console.log(this.routerdata);
         // this.infodata.shift();
-        localStorage.setItem("userID", res.data.data.im_user_id); // 存储当前登录账号的ID
+        localStorage.setItem('userID', res.data.data.im_user_id); // 存储当前登录账号的ID
         this.username = res.data.data.username;
-        localStorage.setItem("username", this.username);
+        localStorage.setItem('username', this.username);
         this.routemap(this.routerdata);
       });
     },
     quit(e) {
       // user.login.logout_user
       console.log(e);
-      if (e == "a") {
+      if (e == 'a') {
         this.alterpassTF = true;
-      } else if (e == "b") {
+      } else if (e == 'b') {
         this.outsystem();
       }
     },
     outsystem() {
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=sysmenage.usermanager.user_logout",
-      }).then((res) => {
+        method: 'POST',
+        url: '/api/api_gateway?method=sysmenage.usermanager.user_logout'
+      }).then(res => {
         if (res.data.data) {
-          localStorage.removeItem("session");
+          localStorage.removeItem('session');
           // localStorage.removeItem("username");
-          this.$router.push("/Login");
+          this.$router.push('/Login');
         }
       });
     },
@@ -339,40 +339,40 @@ export default {
       }
     },
     submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
+      this.$refs[formName].validate(valid => {
         if (valid) {
           this.$axios({
-            method: "POST",
-            url: "/api/api_gateway?method=app.my.app_change_pwd",
+            method: 'POST',
+            url: '/api/api_gateway?method=app.my.app_change_pwd',
             data: this.qs.stringify({
               old_password: this.ruleForm.oldpass, //                必传      旧密码
               new_password: this.ruleForm.newpass, //                必传      新密码
-              confirm_password: this.ruleForm.newpasstrue, //            必传      再次确认新密码
-            }),
-          }).then((res) => {
+              confirm_password: this.ruleForm.newpasstrue //            必传      再次确认新密码
+            })
+          }).then(res => {
             if (res.data.data) {
               this.alterpassTF = false;
-              if (document.getElementsByClassName("el-message").length == 0) {
+              if (document.getElementsByClassName('el-message').length == 0) {
                 this.$message({
-                  message: "修改成功!",
-                  type: "success",
+                  message: '修改成功!',
+                  type: 'success'
                 });
               }
               this.outsystem();
             } else {
-              if (document.getElementsByClassName("el-message").length == 0) {
+              if (document.getElementsByClassName('el-message').length == 0) {
                 this.$message({
-                  message: "修改失败!" + res.data.data.message,
-                  type: "error",
+                  message: '修改失败!' + res.data.data.message,
+                  type: 'error'
                 });
               }
             }
           });
         } else {
-          if (document.getElementsByClassName("el-message").length == 0) {
+          if (document.getElementsByClassName('el-message').length == 0) {
             this.$message({
-              message: "请完成信息填写!",
-              type: "warning",
+              message: '请完成信息填写!',
+              type: 'warning'
             });
           }
           return false;
@@ -393,17 +393,17 @@ export default {
             // text: "http://114.115.147.140:12345"+this.app_url,
             width: 100,
             height: 100,
-            colorDark: "#000000",
-            colorLight: "#ffffff",
-            correctLevel: QRCode.CorrectLevel.H,
+            colorDark: '#000000',
+            colorLight: '#ffffff',
+            correctLevel: QRCode.CorrectLevel.H
           });
         }
       });
     },
     routemap(routerdata) {
       var newrouter = this.$route.path;
-      var tf = routerdata.filter((item) => {
-        if (item.menu != "") {
+      var tf = routerdata.filter(item => {
+        if (item.menu != '') {
           if (newrouter.indexOf(item.menu) != -1) {
             // 第一层菜单是否包含当前路由
             // var arr = [item.menu,item.pur_id]
@@ -428,24 +428,24 @@ export default {
         // this.menuActiveId = tf[0].pur_id.toString();
         this.routerinfo = [];
         this.routerinfo.unshift(tf[0]);
-        var newpath = this.routerdata.filter((item) => {
+        var newpath = this.routerdata.filter(item => {
           // console.log(item)
           if (item.pur_id == tf[0].parent_perm_id) {
             return item.pur_id == tf[0].parent_perm_id;
           } else {
-            var newpath2 = item.children.filter((items) => {
+            var newpath2 = item.children.filter(items => {
               if (items.pur_id == tf[0].parent_perm_id) {
                 return items.pur_id == tf[0].parent_perm_id;
               } else {
                 if (items.children) {
-                  var newpath3 = items.children.filter((itemsa) => {
+                  var newpath3 = items.children.filter(itemsa => {
                     // console.log(itemsa.pur_id,tf[0].parent_perm_id)
                     if (itemsa.pur_id == tf[0].parent_perm_id) {
                       return itemsa.pur_id == tf[0].parent_perm_id;
                     } else {
                       // console.log(itemsa)
                       if (itemsa.children) {
-                        var newpath4 = itemsa.children.filter((itemsaa) => {
+                        var newpath4 = itemsa.children.filter(itemsaa => {
                           if (itemsaa.pur_id == tf[0].parent_perm_id) {
                             return itemsaa.pur_id == tf[0].parent_perm_id;
                           } else {
@@ -479,19 +479,19 @@ export default {
       } else {
         // console.log(this.routerinfo);
         var obj = {
-          menu: "",
-          parent_perm_id: "88",
-          pur_id: "88",
-          purview_name: "查看详情",
+          menu: '',
+          parent_perm_id: '88',
+          pur_id: '88',
+          purview_name: '查看详情'
         };
         if (this.routerinfo[1] && !this.routerinfo[2]) {
-          if (this.$route.path == "/index/taskRegulatorDetails") {
+          if (this.$route.path == '/index/taskRegulatorDetails') {
             this.routerinfo.push(obj);
-          } else if (this.$route.path == "/index/superviseAdminDetails") {
+          } else if (this.$route.path == '/index/superviseAdminDetails') {
             this.routerinfo.push(obj);
-          } else if (this.$route.path == "/index/superviseDetails") {
+          } else if (this.$route.path == '/index/superviseDetails') {
             this.routerinfo.push(obj);
-          } else if (this.$route.path == "/index/superviseLogDetails") {
+          } else if (this.$route.path == '/index/superviseLogDetails') {
             this.routerinfo.push(obj);
           }
         }
@@ -500,24 +500,24 @@ export default {
     menunone() {
       this.menunoneele = !this.menunoneele;
     },
-    towarn(){
-      this.$router.push("/index/warningrecord");
+    towarn() {
+      this.$router.push('/index/warningrecord');
     },
-    getwarnnum(){
+    getwarnnum() {
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=alert_manage.alert.alert_unread_num",
-        data: this.qs.stringify({}),
+        method: 'POST',
+        url: '/api/api_gateway?method=alert_manage.alert.alert_unread_num',
+        data: this.qs.stringify({})
       })
-        .then((res) => {
+        .then(res => {
           console.log(res);
-          if (res.data.data.unread_num>0) {
-            this.warntf = true
+          if (res.data.data.unread_num > 0) {
+            this.warntf = true;
           } else {
-            this.warntf = false
+            this.warntf = false;
           }
         })
-        .catch((err) => {
+        .catch(err => {
           console.log(err);
         });
     }
@@ -533,20 +533,20 @@ export default {
 
     // console.log(this.$route.path)
     if (
-      this.$route.path == "/Index/facilitydistribute" ||
-      this.$route.path == "/Index/pestdistribute"
+      this.$route.path == '/Index/facilitydistribute' ||
+      this.$route.path == '/Index/pestdistribute'
     ) {
       // console.log("触发")
       this.menunone();
     }
-    this.getwarnnum()
+    this.getwarnnum();
     // this.menunone()
   },
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang="less" scoped>
@@ -556,13 +556,13 @@ p {
 .indexbox {
   // display: flex;
 }
-.index_out_info{
+.index_out_info {
   position: relative;
   margin-right: 15px;
-  i{
+  i {
     font-size: 18px;
   }
-  .dian{
+  .dian {
     width: 8px;
     height: 8px;
     border-radius: 8px;
@@ -616,7 +616,7 @@ p {
       position: absolute;
       top: 50%;
       margin-top: -64px;
-      z-index: 9999999;
+      z-index: 1999;
       transition: all 1s ease;
     }
     /deep/.el-menu {
@@ -663,7 +663,7 @@ p {
       display: none;
     }
     /deep/.el-icon-arrow-down:before {
-      content: "\E6DF";
+      content: '\E6DF';
       color: #fff;
       font-size: 16px;
     }

+ 149 - 26
minggao/src/page/monitoring/monitoringPest/detail.vue

@@ -2,21 +2,29 @@
   <div>
     <el-card style="margin-bottom:20px;">
       <el-descriptions>
-        <el-descriptions-item label="诱捕器编号"
-          >kooriookami</el-descriptions-item
-        >
-        <el-descriptions-item label="隶属海关"
-          >18100000000</el-descriptions-item
-        >
-        <el-descriptions-item label="监测点">苏州市</el-descriptions-item>
+        <el-descriptions-item label="诱捕器编号">{{
+          pestDataInfo.trap_number
+        }}</el-descriptions-item>
+        <el-descriptions-item label="隶属海关">{{
+          pestDataInfo.org_name
+        }}</el-descriptions-item>
+        <el-descriptions-item label="监测点">{{
+          pestDataInfo.point_name
+        }}</el-descriptions-item>
         <el-descriptions-item label="诱剂">
-          <el-tag size="small">蛋白</el-tag>
+          <el-tag size="small">{{ pestDataInfo.inducer_type }}</el-tag>
         </el-descriptions-item>
-        <el-descriptions-item label="填报人">张三</el-descriptions-item>
-        <el-descriptions-item label="填报时间">张三</el-descriptions-item>
+        <el-descriptions-item label="填报人">{{
+          pestDataInfo.user_name
+        }}</el-descriptions-item>
+        <el-descriptions-item label="填报时间">{{
+          pestDataInfo.report_time
+        }}</el-descriptions-item>
         <el-descriptions-item label="来源"
           ><span style="margin-right:20px;"
-            ><el-tag size="small">APP</el-tag></span
+            ><el-tag size="small">{{
+              pestDataInfo.operation_type
+            }}</el-tag></span
           >
           <el-button
             type="info"
@@ -30,45 +38,160 @@
       </el-descriptions>
     </el-card>
     <el-card>
-      <el-table :data="tableList" style="width: 100%" :stripe="true">
-        <el-table-column prop="index" label="序号" width="60px">
+      <el-table
+        :data="tableList"
+        style="width: 100%"
+        :stripe="true"
+        v-loading="loading"
+        ref="gridTable"
+      >
+        <el-table-column prop="index" label="序号" width="60px" align="center">
           <template slot-scope="scope">
-            <span>{{ scope.row.index }}</span>
+            <span>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="pest_name" label="有害生物名称">
+        <el-table-column prop="pest_name" label="有害生物名称" align="center">
+        </el-table-column>
+        <el-table-column prop="pest_number" label="数量" align="center">
+        </el-table-column>
+        <el-table-column prop="female_num" label="雌" align="center">
+        </el-table-column>
+        <el-table-column prop="male_num" label="雄" align="center">
         </el-table-column>
-        <el-table-column prop="pest_number" label="数量"> </el-table-column>
-        <el-table-column prop="pest_number" label="雌"> </el-table-column>
-        <el-table-column prop="pest_number" label="雄"> </el-table-column>
-        <el-table-column prop="pest_number" label="危害作物"> </el-table-column>
-        <el-table-column label="操作" width="100">
+        <el-table-column prop="crops" label="危害作物" align="center">
+          <template slot-scope="scope">
+            <span>{{ scope.row.crops || '-' }}</span>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column label="操作" width="100">
           <template slot-scope="scope">
             <el-button type="info" size="mini" @click="goToDetail(scope.row)">
               详情</el-button
             >
           </template>
-        </el-table-column>
+        </el-table-column> -->
       </el-table>
+      <el-pagination
+        background
+        layout="prev, pager, next,jumper"
+        :total="total"
+        :page-size="20"
+        @current-change="pageChange"
+        :current-page="queryInfo.page"
+      >
+      </el-pagination>
     </el-card>
   </div>
 </template>
 <script>
+import { downFile } from '@/util/downloadFile.js';
+
 export default {
   data() {
     return {
       tableList: [],
-      exportLoading: false
+      exportLoading: false,
+      total: 0,
+      loading: false,
+      queryInfo: {
+        page: 1,
+        trap_number: '', //   设备编号 搜索项
+        point_name: '', //       设备所属监测点 搜索项
+        uid: '', //        用户uid
+        operation_type: '', // 填报来源
+        report_time: '' //  填报时间
+      },
+      pestDataInfo: {}
     };
   },
+  mounted() {
+    console.log(this.$route);
+    const { id } = this.$route.params;
+    const { data } = this.$route.query;
+    this.queryInfo.uid = id;
+
+    try {
+      const equipmentData = JSON.parse(decodeURIComponent(data));
+      this.queryInfo.trap_number = equipmentData.trap_number;
+      this.queryInfo.operation_type = equipmentData.operation_type;
+      this.queryInfo.report_time = equipmentData.report_time;
+
+      this.pestDataInfo = equipmentData;
+
+      if (this.queryInfo.uid) {
+        this.getPestInfoList();
+      }
+    } catch (error) {}
+  },
   methods: {
+    getPestInfoList() {
+      this.loading = true;
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=data_report.report.get_trap_info',
+        data: this.qs.stringify({
+          page_item: 20,
+          page: this.queryInfo.page,
+          trap_number: this.queryInfo.trap_number, //              非必传(string)               设备编号 搜索项
+          uid: this.queryInfo.uid,
+          operation_type: this.queryInfo.operation_type,
+          report_time: this.queryInfo.report_time
+        })
+      })
+        .then(res => {
+          console.log(res.data.data);
+          if (!res.data.data) {
+            return;
+          }
+
+          this.total = res.data.data.total_item;
+          this.tableList = res.data.data.page_list;
+
+          this.$nextTick(() => {
+            this.$refs.gridTable.bodyWrapper.scrollTop = 0;
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    pageChange(e) {
+      this.queryInfo.page = e;
+      this.getPestInfoList();
+    },
     goToDetail() {},
     handleExportButtonClick() {
-      this.exportLoading = true;
+      if (
+        !this.queryInfo.uid ||
+        !this.queryInfo.trap_number ||
+        this.exportLoading
+      ) {
+        return;
+      }
 
-      setTimeout(() => {
-        this.exportLoading = false;
-      }, 1000);
+      this.exportLoading = true;
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=data_report.report.export_trap_info',
+        responseType: 'blob',
+        data: this.qs.stringify({
+          trap_number: this.queryInfo.trap_number,
+          uid: this.queryInfo.uid,
+          operation_type: this.queryInfo.operation_type,
+          report_time: this.queryInfo.report_time
+        })
+      })
+        .then(res => {
+          downFile(res, '外来入侵害虫诱捕法调查记录.xls');
+          setTimeout(() => {
+            this.exportLoading = false;
+          }, 1500);
+        })
+        .catch(err => {
+          setTimeout(() => {
+            this.exportLoading = false;
+          }, 1500);
+        });
     }
   }
 };

+ 22 - 13
minggao/src/page/monitoring/monitoringPest/index.vue

@@ -3,12 +3,12 @@
   <div class="cbdbox">
     <div class="cbdboxs_search">
       <el-input
-        v-model="idinput"
+        v-model.trim="idinput"
         placeholder="请输入诱捕器ID"
         size="mini"
       ></el-input>
       <el-input
-        v-model="nameinput"
+        v-model.trim="nameinput"
         placeholder="请输入填报人"
         size="mini"
       ></el-input>
@@ -97,16 +97,15 @@
             </template>
           </el-table-column>
           <el-table-column prop="point_name" label="监测点"> </el-table-column>
-          <el-table-column prop="inducer_name" label="诱剂"> </el-table-column>
-          <el-table-column prop="pest_name" label="有害生物"> </el-table-column>
-          <el-table-column prop="pest_name" label="有害生物种类">
+          <el-table-column prop="inducer_type" label="诱剂"> </el-table-column>
+          <el-table-column prop="pest_type_num" label="有害生物种类">
           </el-table-column>
           <el-table-column prop="pest_number" label="有害生物总数量">
           </el-table-column>
           <el-table-column prop="user_name" label="填报人"> </el-table-column>
-          <el-table-column prop="report_status" label="填报渠道">
+          <el-table-column prop="operation_type" label="填报渠道">
           </el-table-column>
-          <el-table-column prop="create_time" label="填报时间" width="200">
+          <el-table-column prop="report_time" label="填报时间" width="200">
           </el-table-column>
           <el-table-column label="操作" width="100">
             <template slot-scope="scope">
@@ -208,10 +207,9 @@ export default {
       this.loading = true;
       this.$axios({
         method: 'POST',
-        url:
-          '/api/api_gateway?method=monitor_manage.trap_manage.trap_pest_record',
+        url: '/api/api_gateway?method=data_report.report.get_trap_list',
         data: this.qs.stringify({
-          page_size: 20,
+          page_item: 20,
           page: this.queryInfo.page,
           trap_number: this.queryInfo.trap_number, //              非必传(string)               设备编号 搜索项
           point_name: this.queryInfo.point_name, //                  非必传(string)               设备所属监测点 搜索项
@@ -223,8 +221,12 @@ export default {
       }).then(res => {
         this.loading = false;
         console.log(res.data.data);
-        this.total = res.data.data.pest_num;
-        this.tableData = res.data.data.trap_data;
+        if (!res.data.data) {
+          return;
+        }
+
+        this.total = res.data.data.total_item;
+        this.tableData = res.data.data.page_list;
         for (var i = 0; i < this.tableData.length; i++) {
           this.tableData[i]['index'] = i + 1;
         }
@@ -359,8 +361,15 @@ export default {
       this.content = str;
     },
     goToDetail(row) {
+      if (!row.uid) {
+        return;
+      }
+
       this.$router.push({
-        path: '/index/monitoringPestDetail/id'
+        path: `/index/monitoringPestDetail/${row.uid}`,
+        query: {
+          data: encodeURIComponent(JSON.stringify(row))
+        }
       });
     }
   },

+ 56 - 56
minggao/src/page/warning/warningrecord.vue

@@ -36,7 +36,7 @@
             <p>{{ item.alert_title }}</p>
           </div>
           <div class="list_item_text">预警类型:{{ item.alert_type }}</div>
-          <div class="list_item_text">设备ID:{{ item.device_id || "无" }}</div>
+          <div class="list_item_text">设备ID:{{ item.device_id || '无' }}</div>
           <div class="list_item_text">
             <p>设备位置:</p>
             <p v-if="item.lng == '' || item.lat == ''">无</p>
@@ -108,31 +108,31 @@ export default {
     return {
       options: [
         {
-          value: "害虫总数预警",
-          label: "害虫总数预警",
+          value: '害虫总数预警',
+          label: '害虫总数预警'
         },
         {
-          value: "目标种类数量预警",
-          label: "目标种类数量预警",
+          value: '目标种类数量预警',
+          label: '目标种类数量预警'
         },
         {
-          value: "外来入侵物种预警",
-          label: "外来入侵物种预警",
+          value: '外来入侵物种预警',
+          label: '外来入侵物种预警'
         },
         {
-          value: "指定害虫数量预警",
-          label: "指定害虫数量预警",
-        },
+          value: '指定害虫数量预警',
+          label: '指定害虫数量预警'
+        }
       ],
-      alert_type: "",
+      alert_type: '',
       timevalue: [],
-      start_time: "",
-      end_time: "",
+      start_time: '',
+      end_time: '',
       tablelist: [],
       total: 10,
       pagekey: 1,
       page: 1,
-      dialogVisible: false,
+      dialogVisible: false
     };
   },
   //监听属性 类似于data概念
@@ -143,22 +143,22 @@ export default {
   methods: {
     getwarnlist() {
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=alert_manage.alert.alert_record_list",
+        method: 'POST',
+        url: '/api/api_gateway?method=alert_manage.alert.alert_record_list',
         data: this.qs.stringify({
           page: this.page, //
-          page_item: "12", //
+          page_item: '12', //
           start_time: this.start_time, //
           end_time: this.end_time, //
-          alert_type: this.alert_type, //
-        }),
+          alert_type: this.alert_type //
+        })
       })
-        .then((res) => {
+        .then(res => {
           console.log(res.data.data.page_list);
           this.tablelist = res.data.data.page_list;
           this.total = res.data.data.total_item;
         })
-        .catch((err) => {
+        .catch(err => {
           console.log(err);
         });
     },
@@ -169,8 +169,8 @@ export default {
         this.start_time = this.time_transition(this.timevalue[0]);
         this.end_time = this.time_transition(this.timevalue[1]);
       } else {
-        this.start_time = "";
-        this.end_time = "";
+        this.start_time = '';
+        this.end_time = '';
       }
 
       this.page = 1;
@@ -188,28 +188,28 @@ export default {
       console.log(data.record_id, data.is_read);
       if (data.is_read == 0) {
         this.$axios({
-          method: "POST",
-          url: "/api/api_gateway?method=alert_manage.alert.alert_read",
+          method: 'POST',
+          url: '/api/api_gateway?method=alert_manage.alert.alert_read',
           data: this.qs.stringify({
-            record_id: data.record_id,
-          }),
+            record_id: data.record_id
+          })
         })
-          .then((res) => {
+          .then(res => {
             console.log(res);
-            if (res.data.message == "") {
+            if (res.data.message == '') {
               this.$message({
-                message: "该条预警记录已读",
-                type: "success",
+                message: '该条预警记录已读',
+                type: 'success'
               });
               this.getwarnlist();
             } else {
               this.$message({
                 message: res.data.message,
-                type: "warning",
+                type: 'warning'
               });
             }
           })
-          .catch((err) => {
+          .catch(err => {
             console.log(err);
           });
       }
@@ -217,22 +217,22 @@ export default {
     //一键已读
     allread() {
       this.$axios({
-        method: "POST",
-        url: "/api/api_gateway?method=alert_manage.alert.alert_one_click_read",
-        data: this.qs.stringify({}),
+        method: 'POST',
+        url: '/api/api_gateway?method=alert_manage.alert.alert_one_click_read',
+        data: this.qs.stringify({})
       })
-        .then((res) => {
+        .then(res => {
           console.log(res);
-          if (res.data.message == "") {
+          if (res.data.message == '') {
             this.getwarnlist();
           } else {
             this.$message({
               message: res.data.message,
-              type: "warning",
+              type: 'warning'
             });
           }
         })
-        .catch((err) => {
+        .catch(err => {
           console.log(err);
         });
     },
@@ -247,28 +247,28 @@ export default {
       var seconds = times.getSeconds();
       console.log(
         years +
-          "-" +
+          '-' +
           month +
-          "-" +
+          '-' +
           day +
-          " " +
+          ' ' +
           hours +
-          ":" +
+          ':' +
           minutes +
-          ":" +
+          ':' +
           seconds
       );
       return (
         years +
-        "-" +
+        '-' +
         month +
-        "-" +
+        '-' +
         day +
-        " " +
+        ' ' +
         hours +
-        ":" +
+        ':' +
         minutes +
-        ":" +
+        ':' +
         seconds
       );
     },
@@ -276,18 +276,18 @@ export default {
       this.dialogVisible = true;
       this.$nextTick(() => {
         var center = [lng, lat];
-        var map = new AMap.Map(document.getElementById("mapbox"), {
+        var map = new AMap.Map(document.getElementById('mapbox'), {
           center: center,
           resizeEnable: true,
           zoom: 10,
-          lang: "en",
-          mapStyle: "amap://styles/fresh",
+          lang: 'en',
+          mapStyle: 'amap://styles/fresh'
         });
         var marker = new AMap.Marker();
         marker.setPosition([lng, lat]);
         map.add(marker);
       });
-    },
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -301,7 +301,7 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style scoped lang="less">
@@ -399,4 +399,4 @@ export default {
   background-color: #409eff;
   border-color: #409eff;
 }
-</style>
+</style>