Przeglądaj źródła

第二次复测修复

zhangyun 4 lat temu
rodzic
commit
8b76e83be0
31 zmienionych plików z 4598 dodań i 855 usunięć
  1. 3 3
      minggao/config/index.js
  2. 3 3
      minggao/src/assets/icon/demo_index.html
  3. 3 3
      minggao/src/assets/icon/iconfont.css
  4. 1 1
      minggao/src/assets/icon/iconfont.js
  5. BIN
      minggao/src/assets/icon/iconfont.ttf
  6. BIN
      minggao/src/assets/icon/iconfont.woff
  7. BIN
      minggao/src/assets/icon/iconfont.woff2
  8. 1 0
      minggao/src/page/commandCenter/laboratory.vue
  9. 2 0
      minggao/src/page/commandCenter/supervise.vue
  10. 3 1
      minggao/src/page/commandCenter/superviseAdmin.vue
  11. 1 0
      minggao/src/page/commandCenter/superviseLog.vue
  12. 1 0
      minggao/src/page/commandCenter/taskRegulator.vue
  13. 47 6
      minggao/src/page/forecasting/cbd/Cbd.vue
  14. 1 1
      minggao/src/page/forecasting/cbd/MessageWarn.vue
  15. 12 4
      minggao/src/page/forecasting/cbd/PestsStats.vue
  16. 3907 0
      minggao/src/page/forecasting/cbd/aaa.vue
  17. 304 665
      minggao/src/page/forecasting/cbd/cbdDataPhotos.vue
  18. 2 1
      minggao/src/page/forecasting/maintain/maintain.vue
  19. 3 1
      minggao/src/page/forecasting/trap/bait.vue
  20. 3 1
      minggao/src/page/forecasting/trap/fillinrecord.vue
  21. 58 18
      minggao/src/page/forecasting/trap/trap.vue
  22. 1 1
      minggao/src/page/home/index.vue
  23. 19 14
      minggao/src/page/homepage/facilitydistribute.vue
  24. 22 18
      minggao/src/page/homepage/pestdistribute.vue
  25. 42 9
      minggao/src/page/monitor/Monitor.vue
  26. 15 16
      minggao/src/page/monitor/PhotoView.vue
  27. 1 16
      minggao/src/page/monitoring/monitoringtask.vue
  28. 42 30
      minggao/src/page/superviseModule/superviseModule.vue
  29. 2 0
      minggao/src/page/systemmanger/dayRecord.vue
  30. 98 42
      minggao/src/page/systemmanger/userManger.vue
  31. 1 1
      minggao/src/util/http.js

+ 3 - 3
minggao/config/index.js

@@ -13,8 +13,8 @@ module.exports = {
     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.77:12345', //曹世祥
+        // target:"http://114.115.147.140:12345",
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api' //重写接口
@@ -23,7 +23,7 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: '192.168.137.1', // can be overwritten by process.env.HOST
+    host: '192.168.1.29', // can be overwritten by process.env.HOST
     port: 8888, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: false,
     errorOverlay: true,

+ 3 - 3
minggao/src/assets/icon/demo_index.html

@@ -810,9 +810,9 @@
 <pre><code class="language-css"
 >@font-face {
   font-family: 'iconfont';
-  src: url('iconfont.woff2?t=1645854729946') format('woff2'),
-       url('iconfont.woff?t=1645854729946') format('woff'),
-       url('iconfont.ttf?t=1645854729946') format('truetype');
+  src: url('iconfont.woff2?t=1646124670247') format('woff2'),
+       url('iconfont.woff?t=1646124670247') format('woff'),
+       url('iconfont.ttf?t=1646124670247') format('truetype');
 }
 </code></pre>
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>

+ 3 - 3
minggao/src/assets/icon/iconfont.css

@@ -1,8 +1,8 @@
 @font-face {
   font-family: 'iconfont';  /* Project id 1738837 */
-  src: url('//at.alicdn.com/t/font_1738837_llu41pt10a.woff2?t=1645854725746') format('woff2'),
-       url('//at.alicdn.com/t/font_1738837_llu41pt10a.woff?t=1645854725746') format('woff'),
-       url('//at.alicdn.com/t/font_1738837_llu41pt10a.ttf?t=1645854725746') format('truetype');
+  src: url('//at.alicdn.com/t/font_1738837_7aca1c6twkl.woff2?t=1646124664018') format('woff2'),
+       url('//at.alicdn.com/t/font_1738837_7aca1c6twkl.woff?t=1646124664018') format('woff'),
+       url('//at.alicdn.com/t/font_1738837_7aca1c6twkl.ttf?t=1646124664018') format('truetype');
 }
 
 .iconfont {

Plik diff jest za duży
+ 1 - 1
minggao/src/assets/icon/iconfont.js


BIN
minggao/src/assets/icon/iconfont.ttf


BIN
minggao/src/assets/icon/iconfont.woff


BIN
minggao/src/assets/icon/iconfont.woff2


+ 1 - 0
minggao/src/page/commandCenter/laboratory.vue

@@ -423,6 +423,7 @@ export default {
       this.startTime = "";
       this.endTime = "";
       this.loading = true;
+      this.page = 1
       this.tableList();
     },
 

+ 2 - 0
minggao/src/page/commandCenter/supervise.vue

@@ -267,6 +267,7 @@ export default {
         this.startTime = "";
         this.endTime = "";
       }
+      this.page = 1
       this.loading = true;
       this.tableData = [];
       this.tableList();
@@ -287,6 +288,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.loading = true;
       this.tableData = [];
+      this.page = 1
       this.tableList();
     },
 

+ 3 - 1
minggao/src/page/commandCenter/superviseAdmin.vue

@@ -124,7 +124,7 @@
           width="180"
         ></el-table-column>
         <el-table-column
-          prop="start_time"
+          prop="last_time"
           label="任务结束"
           width="180"
         ></el-table-column>
@@ -319,6 +319,7 @@ export default {
         this.startTime = "";
         this.endTime = "";
       }
+      this.page = 1
       this.tableData = [];
       this.loading = true;
       this.tableList();
@@ -388,6 +389,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.tableData = [];
       this.loading = true;
+      this.page = 1
       this.tableList();
     },
 

+ 1 - 0
minggao/src/page/commandCenter/superviseLog.vue

@@ -267,6 +267,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.tableData = [];
       this.loading = true;
+      this.page = 1
       this.tableList();
     },
 

+ 1 - 0
minggao/src/page/commandCenter/taskRegulator.vue

@@ -759,6 +759,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.loading = true;
       this.tableData = [];
+      this.page = 1
       this.tableList();
     },
 

+ 47 - 6
minggao/src/page/forecasting/cbd/Cbd.vue

@@ -104,7 +104,11 @@
                   >
                     <div class="popover-content" v-html="content"></div>
                     <span @mouseover="orglisthover(item)" slot="reference"
-                      >{{ item.org_list[0].org_name }}...</span
+                      >{{
+                        item.org_list.length == 0
+                          ? "暂无组织"
+                          : item.org_list[0].org_name
+                      }}...</span
                     >
                   </el-popover>
                 </p>
@@ -235,7 +239,11 @@
               >
                 <div class="popover-content" v-html="content"></div>
                 <span @mouseover="orglisthover(scope.row)" slot="reference"
-                  >{{ scope.row.org_list[0].org_name }}...</span
+                  >{{
+                    scope.row.org_list.length == 0
+                      ? "暂无组织"
+                      : scope.row.org_list[0].org_name
+                  }}...</span
                 >
               </el-popover>
             </template>
@@ -561,13 +569,13 @@
           </el-form-item>
           <div class="addtrapbox" style="display: flex">
             <el-form-item label="所在纬度" prop="lng">
-              <el-input v-model="ruleForm.lng"></el-input>
+              <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
-              <el-input v-model="ruleForm.lat"></el-input>
+              <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lat, "lat") }}
               </p>
@@ -578,6 +586,9 @@
               >地图选点</el-button
             >
           </div>
+          <el-form-item label="所在城市" prop="basecity">
+            <el-input v-model="ruleForm.basecity" disabled style="width:217px"></el-input>
+          </el-form-item>
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -775,6 +786,7 @@ export default {
         lat: "",
         device_name: "",
         device_id: "",
+        basecity:""
       },
       rules: {
         device_name: [
@@ -1086,19 +1098,20 @@ export default {
       //   this.ruleForm[key] = e[key];
       // }
       this.ruleForm.org_id = [];
-
+      this.city(this.ruleForm.lat,this.ruleForm.lng)
       this.getmon3(item);
     },
     getmon3(item) {
       this.$axios({
         method: "POST",
-        url: "/api/api_gateway?method=sysmenage.usermanager.get_parent_org_list;",
+        url: "/api/api_gateway?method=sysmenage.usermanager.get_parent_org_list",
         data: this.qs.stringify({
           device_id: item.d_id,
         }),
       }).then((res) => {
         // console.log(res.data.data);
         var orgdatas = res.data.data;
+        this.ruleForm.org_id = [];
         for (var i = 0; i < item.org_list.length; i++) {
           var arr = [item.org_list[i].org_id];
           this.ruleForm.org_id.push(arr);
@@ -1364,6 +1377,7 @@ export default {
               lng: this.ToDigital(this.ruleForm.lng), //
               device_id: this.ruleForm.device_id,
               device_name: this.ruleForm.device_name,
+              city:this.ruleForm.basecity
             }),
           }).then((res) => {
             console.log(res);
@@ -1506,6 +1520,7 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       console.log(this.ruleForm);
+      this.city(this.ruleForm.lat,this.ruleForm.lng)
       this.addLocationDialogVisible = false;
     },
     addLocationDialogClosed() {
@@ -1612,6 +1627,32 @@ export default {
       }
       this.content = str;
     },
+    city(lat,lng) {
+      $.ajax({
+        url: "https://restapi.amap.com/v3/geocode/regeo",
+        type: "get",
+        dataType: "jsonp",
+        data: this.qs.stringify({
+          location: lng + "," + lat,
+          key: "78ce288400f4fc6d9458989875c833c2",
+          extensions: "base",
+        }),
+        success: (res)=> {
+          console.log(res);
+          this.ruleForm.basecity = res.regeocode.addressComponent.city
+          console.log(this.ruleForm)
+        },
+        error: function (err) {
+          alert("服务端错误,请刷新浏览器后重试")
+        }
+      })
+      // return arr;
+    },
+    latblur(){
+      if(this.ruleForm.lat!=""&&this.ruleForm.lng!=""){
+        this.city(this.ruleForm.lat,this.ruleForm.lng)
+      }
+    }
   },
   components: {
     SearchBar,

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

@@ -483,7 +483,7 @@ export default {
 			that
 				.$axios({
 					method: 'post',
-					url: '/api/api_gateway?method=forecast.forecast_system.cbd_msg_conf',
+					url: '/api/api_gateway?method=monitor_manage.cbd_manage.cbd_msg_conf',
 					data: postData
 				})
 				.then((res) => {

+ 12 - 4
minggao/src/page/forecasting/cbd/PestsStats.vue

@@ -990,6 +990,10 @@ export default {
         {
           value: "选项1",
           label: "全部"
+        },
+        {
+          value: "选项2",
+          label: "时间段"
         }
       ],
       value: "", //文件名称
@@ -2000,10 +2004,7 @@ export default {
           duration: 1500
         });
         }
-      } else if (
-        that.value !== "" &&
-        (that.value1 == "选项1" || that.value1 == "")
-      ) {
+      } else {
         //判断当前是自动统计还是手动统计
         if (that.viewSwitch == true) {
           // console.log("自动统计");
@@ -2022,6 +2023,13 @@ export default {
           begin = "";
           end = "";
         }
+        if (that.value1=="选项2") {
+          begin = this.queryInfo.begin;
+          end = this.queryInfo.end;
+        } else if(that.value1=="选项1"){
+          begin = "";
+          end = "";
+        }
         // console.log(this.$deriveData)
         window.location.href =
           this.$deriveData +

Plik diff jest za duży
+ 3907 - 0
minggao/src/page/forecasting/cbd/aaa.vue


Plik diff jest za duży
+ 304 - 665
minggao/src/page/forecasting/cbd/cbdDataPhotos.vue


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

@@ -59,6 +59,7 @@
         :total="total"
         :page-size="20"
         @current-change="pageChange"
+        :current-page="queryInfo.page"
       >
       </el-pagination>
     </el-card>
@@ -264,7 +265,7 @@ export default {
         method: "POST",
         url: "/api/api_gateway?method=monitor_manage.maintain.checkpoint_list",
         data: this.qs.stringify({
-          page_size: 20,
+          page_item: 20,
           page: this.page,
           point_name: this.monitorname, //              非必传(string)     诱剂名称 搜索项
         }),

+ 3 - 1
minggao/src/page/forecasting/trap/bait.vue

@@ -56,6 +56,7 @@
         :total="total"
         :page-size="20"
         @current-change="pageChange"
+        :current-page="queryInfo.page"
       >
       </el-pagination>
     </el-card>
@@ -157,7 +158,7 @@ export default {
         method: "POST",
         url: "/api/api_gateway?method=monitor_manage.maintain.inducer_list",
         data: this.qs.stringify({
-          page_size: 20,
+          page_item: 20,
           page: this.queryInfo.page,
           inducer_name: this.queryInfo.inducer_name, //              非必传(string)     诱剂名称 搜索项
         }),
@@ -172,6 +173,7 @@ export default {
       });
     },
     search() {
+      this.queryInfo.page = 1
       this.getcbdlist();
     },
     pageChange(e) {

+ 3 - 1
minggao/src/page/forecasting/trap/fillinrecord.vue

@@ -117,6 +117,7 @@
         :total="total"
         :page-size="20"
         @current-change="pageChange"
+        :current-page="queryInfo.page"
       >
       </el-pagination>
     </el-card>
@@ -245,6 +246,7 @@ export default {
       console.log(this.inoffoptions);
       this.queryInfo.point_name = this.inoffvalue;
       this.queryInfo.org_name = this.versionsvalue2;
+      this.queryInfo.page = 1
       // console.log(this.versionsvalue2)
       this.getcbdlist();
     },
@@ -315,7 +317,7 @@ export default {
             start_time: this.queryInfo.start_time,
             end_time: this.queryInfo.end_time,
             user_name: this.queryInfo.user_name,
-            user: localStorage.getItem("usernme"),
+            user: localStorage.getItem("username"),
           }),
           responseType: "blob",
         }).then((res) => {

+ 58 - 18
minggao/src/page/forecasting/trap/trap.vue

@@ -7,8 +7,13 @@
         placeholder="请输入诱捕器编号"
         size="mini"
       ></el-input>
-      <el-select v-model="trapvalue" placeholder="请选择所在监测点" clearable
-        @change="search" size="mini">
+      <el-select
+        v-model="trapvalue"
+        placeholder="请选择所在监测点"
+        clearable
+        @change="search"
+        size="mini"
+      >
         <el-option
           v-for="item in traponsoptions"
           :key="item.point_id"
@@ -59,15 +64,7 @@
       </el-select>
       <el-button type="info" @click="search" size="mini">搜索</el-button>
       <el-button size="mini" @click="reset">重置</el-button>
-      <el-button
-        type="info"
-        @click="
-          addtraptf = true;
-          parameter = 'add';
-        "
-        size="mini"
-        >添加诱捕器</el-button
-      >
+      <el-button type="info" @click="openadd" size="mini">添加诱捕器</el-button>
       <el-button type="info" @click="downloadtf = true" size="mini"
         >批量导入诱捕器</el-button
       >
@@ -165,6 +162,7 @@
         :total="total"
         :page-size="20"
         @current-change="pageChange"
+        :current-page="queryInfo.page"
       >
       </el-pagination>
     </el-card>
@@ -188,13 +186,13 @@
           </el-form-item>
           <div class="addtrapbox">
             <el-form-item label="所在纬度" prop="lng">
-              <el-input v-model="ruleForm.lng"></el-input>
+              <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
-              <el-input v-model="ruleForm.lat"></el-input>
+              <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lat, "lat") }}
               </p>
@@ -205,6 +203,9 @@
               >地图选点</el-button
             >
           </div>
+          <el-form-item label="所在城市" prop="basecity">
+            <el-input v-model="ruleForm.basecity" disabled style="width:217px"></el-input>
+          </el-form-item>
           <el-form-item label="隶属海关" prop="org_id">
             <!-- <el-select v-model="ruleForm.org_id" placeholder="请选择隶属海关">
               <el-option
@@ -448,6 +449,7 @@ export default {
         inducer_id: "", //     必传(string)               诱剂id
         point_id: "", //     必传(string)               所属监测点id
         trap_status: "", //    必传(string)               设备状态0停用 1正常
+        basecity:""
       },
       rules: {
         trap_number: [
@@ -569,6 +571,7 @@ export default {
       this.versionsvalue1 = e[e.length - 1];
     },
     search() {
+      this.queryInfo.page = 1;
       this.queryInfo.point_id = this.trapvalue;
       this.queryInfo.trap_number = this.idinput;
       this.queryInfo.org_id = this.versionsvalue2;
@@ -613,6 +616,7 @@ export default {
               point_id: this.ruleForm.point_id, //                  必传(string)               所属监测点id
               trap_status: this.ruleForm.trap_status, //               必传(string)               设备状态0停用 1正常
               parameter: this.parameter,
+              city:this.ruleForm.basecity
             }),
           }).then((res) => {
             console.log(res);
@@ -663,6 +667,11 @@ export default {
         this.ruleForm[key] = "";
       }
     },
+    openadd() {
+      this.addtraptf = true;
+      this.parameter = "add";
+      // console.log(this.ruleForm)
+    },
     addtrap(e) {
       //增加诱捕器
       console.log(e);
@@ -674,6 +683,8 @@ export default {
       this.ruleForm.trap_status = this.ruleForm.trap_status.toString();
       this.parameter = "modify";
       this.ruleForm.org_id = [];
+      console.log(this.ruleForm)
+      this.city(e.lat,e.lng)
       this.getmon3(e);
     },
     getmon3(e) {
@@ -687,9 +698,9 @@ export default {
         // console.log(res.data.data);
         var orgdatas = res.data.data;
         for (var i = 0; i < e.org_list.length; i++) {
-            var arr = [e.org_list[i].org_id];
-            this.ruleForm.org_id.push(arr);
-          }
+          var arr = [e.org_list[i].org_id];
+          this.ruleForm.org_id.push(arr);
+        }
         if (orgdatas.length != 0) {
           for (var i = 0; i < orgdatas.length; i++) {
             if (orgdatas[i].length != 0) {
@@ -753,7 +764,7 @@ export default {
     handle(ev) {
       this.downloadinput = ev.name;
       var datas = new FormData();
-      var username = localStorage.getItem("username")
+      var username = localStorage.getItem("username");
       datas.append("username", username);
       datas.append("file", ev.raw);
       this.$axios({
@@ -806,7 +817,7 @@ export default {
             org_id: this.ruleForm.org_id,
             trap_status: this.ruleForm.trap_status,
             file_name: this.derivefilename,
-            user: localStorage.getItem("usernme"),
+            user: localStorage.getItem("username"),
           }),
           responseType: "blob",
         }).then((res) => {
@@ -826,6 +837,7 @@ export default {
       this.queryInfo.trap_status = "";
       this.versionsvalue2 = "";
       this.versionsvalue = [];
+      this.queryInfo.page = 1
       this.getcbdlist();
     },
     init() {
@@ -906,12 +918,14 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       this.addLocationDialogVisible = false;
+      this.city(this.ruleForm.lat,this.ruleForm.lng)
     },
     addLocationDialogClosed() {
       //弹框关闭时
       // this.locationForm = { lat: "", lng: "" };
       this.center = [114.05, 22.55];
       this.map = null;
+      
     },
     locationSearch() {
       if (this.locationForm.lat && this.locationForm.lng) {
@@ -1016,6 +1030,32 @@ export default {
       }
       this.content = str;
     },
+    city(lat,lng) {
+      $.ajax({
+        url: "https://restapi.amap.com/v3/geocode/regeo",
+        type: "get",
+        dataType: "jsonp",
+        data: this.qs.stringify({
+          location: lng + "," + lat,
+          key: "78ce288400f4fc6d9458989875c833c2",
+          extensions: "base",
+        }),
+        success: (res)=> {
+          console.log(res);
+          this.ruleForm.basecity = res.regeocode.addressComponent.city
+          console.log(this.ruleForm)
+        },
+        error: function (err) {
+          alert("服务端错误,请刷新浏览器后重试")
+        }
+      })
+      // return arr;
+    },
+    latblur(){
+      if(this.ruleForm.lat!=""&&this.ruleForm.lng!=""){
+        this.city(this.ruleForm.lat,this.ruleForm.lng)
+      }
+    }
   },
   beforeCreate() {}, //生命周期 - 创建之前
   //生命周期 - 创建完成(可以访问当前this实例)

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

@@ -3,7 +3,7 @@
   <div
     class="indexbox"
     v-loading="indexloading"
-    element-loading-text="欢迎登录大数据平台!加载中,请稍后..."
+    element-loading-text="欢迎登录!加载中,请稍后..."
     element-loading-spinner="el-icon-loading"
     element-loading-background="rgba(255, 255, 255)"
   >

+ 19 - 14
minggao/src/page/homepage/facilitydistribute.vue

@@ -33,7 +33,7 @@
       >
         <el-option
           v-for="item in versionsoptions2"
-          :key="item.org_name"
+          :key="item.org_id"
           :label="item.org_name"
           :value="item.org_id"
         >
@@ -313,23 +313,27 @@ export default {
       //   return res;
       // };
       function format(city) {
-        var arr = [];
-        for (var i = 0; i < city.length; i++) {
-          var obj = {};
-          obj["value"] = [
-            Number(city[i].lat),
-            Number(city[i].lng),
-            Number(city[i].device_type_id),
-            Number(city[i].d_id),
-          ];
-          arr.push(obj);
+        if (city) {
+          var arr = [];
+          for (var i = 0; i < city.length; i++) {
+            var obj = {};
+            obj["value"] = [
+              Number(city[i].lng),
+              Number(city[i].lat),
+              Number(city[i].device_type_id),
+              Number(city[i].d_id),
+            ];
+            arr.push(obj);
+          }
+          return arr;
+        } else {
+          return [];
         }
-        return arr;
       }
       var huizhou = format(data1.huizhou);
-      var shanwei = format(data1.shanwei_data);
+      var shanwei = format(data1.shanwei);
       var shenzhen = format(data1.shenzhen);
-      // console.log(huizhou);
+      console.log(huizhou);
       var option = {
         backgroundColor: "#252b45",
         title: {
@@ -703,6 +707,7 @@ export default {
       this.typevalue = "";
       this.idinput = "";
       this.getbaselist();
+      
     },
     // getmon() {
     //   //获取监测点列表 组织列表

+ 22 - 18
minggao/src/page/homepage/pestdistribute.vue

@@ -175,7 +175,7 @@ export default {
   //方法集合
   methods: {
     init(traparr) {
-    //   console.log(trap_data_arr);
+      //   console.log(trap_data_arr);
       var that = this;
       let myChart = echarts.init(document.getElementById("mychart"));
       var arr = [];
@@ -210,25 +210,29 @@ export default {
       });
 
       function citt(trap_data) {
-          // console.log(trap_data)
-        var trap_data_arr = [];
-        for (var i = 0; i < trap_data.length; i++) {
-          var obj = {
-            value: [
-              trap_data[i].lng,
-              trap_data[i].lat,
-              trap_data[i].pest_total,
-            ],
-            device_id: trap_data[i].device_id,
-            pest_data: trap_data[i].pest_data,
-          };
-          trap_data_arr.push(obj);
+        // console.log(trap_data)
+        if (trap_data) {
+          var trap_data_arr = [];
+          for (var i = 0; i < trap_data.length; i++) {
+            var obj = {
+              value: [
+                trap_data[i].lng,
+                trap_data[i].lat,
+                trap_data[i].pest_total,
+              ],
+              device_id: trap_data[i].device_id,
+              pest_data: trap_data[i].pest_data,
+            };
+            trap_data_arr.push(obj);
+          }
+          return trap_data_arr;
+        } else {
+          return [];
         }
-        return trap_data_arr;
       }
-    var huizhou = citt(traparr[0])
-    var shenzhen = citt(traparr[1])
-    var shanwei = citt(traparr[2])
+      var huizhou = citt(traparr[0]);
+      var shenzhen = citt(traparr[1]);
+      var shanwei = citt(traparr[2]);
       myChart.setOption({
         backgroundColor: "#252b45",
         title: {

+ 42 - 9
minggao/src/page/monitor/Monitor.vue

@@ -663,6 +663,7 @@
               :props="defaultParams"
               :clearable="true"
               placeholder="请选择隶属海关"
+              filterable
             ></el-cascader>
           </el-form-item>
           <el-form-item label="所在监测点" prop="point_id">
@@ -680,13 +681,13 @@
           </el-form-item>
           <div class="addtrapbox" style="display: flex">
             <el-form-item label="所在纬度" prop="lng">
-              <el-input v-model="ruleForm.lng"></el-input>
+              <el-input v-model="ruleForm.lng" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lng, "lng") }}
               </p>
             </el-form-item>
             <el-form-item label="所在纬度" prop="lat">
-              <el-input v-model="ruleForm.lat"></el-input>
+              <el-input v-model="ruleForm.lat" @blur="latblur"></el-input>
               <p style="height: 24px; padding-left: 16px">
                 {{ ToDegrees(ruleForm.lat, "lat") }}
               </p>
@@ -697,6 +698,9 @@
               >地图选点</el-button
             >
           </div>
+          <el-form-item label="所在城市" prop="basecity">
+            <el-input v-model="ruleForm.basecity" disabled style="width:217px"></el-input>
+          </el-form-item>
         </el-form>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -994,6 +998,7 @@ export default {
         lat: "",
         device_name: "",
         device_id: "",
+        basecity:""
       },
       rules: {
         device_name: [
@@ -1080,13 +1085,12 @@ export default {
     },
     monset(e) {
       console.log(e);
-
       // this.ruleForm.device_id = item.device_id
       // this.ruleForm.device_name = item.device_name
       for (var key in this.ruleForm) {
         this.ruleForm[key] = e[key];
       }
-      this.ruleForm.org_id = [];
+      this.city(this.ruleForm.lat,this.ruleForm.lng)
       this.getmon3(e);
     },
     getmon3(e) {
@@ -1097,8 +1101,9 @@ export default {
           device_id: e.d_id,
         }),
       }).then((res) => {
-        // console.log(res.data.data);
+        console.log(res.data.data);
         var orgdatas = res.data.data;
+        this.ruleForm.org_id = [];
         for (var i = 0; i < e.temp_org_list.length; i++) {
           var arr = [e.temp_org_list[i].org_id];
           this.ruleForm.org_id.push(arr);
@@ -1170,7 +1175,7 @@ export default {
     stopConfigCamera() {
       this.$axios({
         method: "POST",
-        url: "/api/api_gateway?method=camera.camera_manage.ctrl_camera",
+        url: "/api/api_gateway?method=monitor_manage.camera_manage.ctrl_camera",
         data: this.qs.stringify({
           device_id: this.id,
           ctrl: "stop",
@@ -1182,7 +1187,7 @@ export default {
       if (ctrl == "takephoto") {
         this.$axios({
           method: "POST",
-          url: "/api/api_gateway?method=camera.camera_manage.camera_takephoto",
+          url: "/api/api_gateway?method=monitor_manage.camera_manage.camera_takephoto",
           data: this.qs.stringify({
             device_id: this.id,
           }),
@@ -1201,7 +1206,7 @@ export default {
         //上下左右、放大、缩小
         this.$axios({
           method: "POST",
-          url: "/api/api_gateway?method=camera.camera_manage.ctrl_camera",
+          url: "/api/api_gateway?method=monitor_manage.camera_manage.ctrl_camera",
           data: this.qs.stringify({
             device_id: this.id,
             ctrl: ctrl,
@@ -1219,7 +1224,7 @@ export default {
     photograph() {
       this.$axios({
         method: "POST",
-        url: "/api/api_gateway?method=camera.camera_manage.camera_takephoto",
+        url: "/api/api_gateway?method=monitor_manage.camera_manage.camera_takephoto",
         data: this.qs.stringify({
           device_id: this.id,
         }),
@@ -1965,6 +1970,7 @@ export default {
               lng: this.ToDigital(this.ruleForm.lng), //
               device_id: this.ruleForm.device_id,
               device_name: this.ruleForm.device_name,
+              city:this.ruleForm.basecity
             }),
           }).then((res) => {
             console.log(res);
@@ -2106,6 +2112,7 @@ export default {
       this.ruleForm.lng = this.locationForm.lng;
       this.ruleForm.lat = this.locationForm.lat;
       this.addLocationDialogVisible = false;
+      this.city(this.ruleForm.lat,this.ruleForm.lng)
     },
     addLocationDialogClosed() {
       //弹框关闭时
@@ -2203,6 +2210,32 @@ export default {
         return digital.toFixed(6);
       }
     },
+    city(lat,lng) {
+      $.ajax({
+        url: "https://restapi.amap.com/v3/geocode/regeo",
+        type: "get",
+        dataType: "jsonp",
+        data: this.qs.stringify({
+          location: lng + "," + lat,
+          key: "78ce288400f4fc6d9458989875c833c2",
+          extensions: "base",
+        }),
+        success: (res)=> {
+          console.log(res);
+          this.ruleForm.basecity = res.regeocode.addressComponent.city
+          console.log(this.ruleForm)
+        },
+        error: function (err) {
+          alert("服务端错误,请刷新浏览器后重试")
+        }
+      })
+      // return arr;
+    },
+    latblur(){
+      if(this.ruleForm.lat!=""&&this.ruleForm.lng!=""){
+        this.city(this.ruleForm.lat,this.ruleForm.lng)
+      }
+    }
   },
   watch: {
     // 添加设备弹框

+ 15 - 16
minggao/src/page/monitor/PhotoView.vue

@@ -101,7 +101,9 @@ export default {
         data: this.qs.stringify({
           device_id: this.imei,
           page: this.page,
-          page_size: 12
+          page_size: 12,
+          start_time: this.begin, //              非必传(时间戳)                   开始时间
+          end_time: this.end, //                非必传(时间戳)                   结束时间
         }),
       })
         .then((res) => {
@@ -112,12 +114,10 @@ export default {
                 message: "获取图片数据成功!",
                 type: "success",
               });
-              }
+            }
             this.total = res.data.data.counts;
             this.images = res.data.data.data;
-
           }
-
         })
         .catch((err) => {
           console.log(err);
@@ -134,7 +134,7 @@ export default {
         this.begin = "";
         this.end = "";
       }
-      //   this.getImageList();
+      this.getImageList();
     },
 
     // 删除图片
@@ -155,16 +155,15 @@ export default {
           });
           this.$axios({
             method: "POST",
-            url:
-              "/api/api_gateway?method=monitor_manage.camera_manage.del_camera_photo",
+            url: "/api/api_gateway?method=monitor_manage.camera_manage.del_camera_photo",
             data: postData,
           })
             .then((res) => {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                type: "success",
-                message: "删除成功!",
-              });
+                this.$message({
+                  type: "success",
+                  message: "删除成功!",
+                });
               }
               this.images = [];
               this.getImageList();
@@ -172,10 +171,10 @@ export default {
             .catch((err) => {
               console.log(err);
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                type: "info",
-                message: "已取消删除",
-              });
+                this.$message({
+                  type: "info",
+                  message: "已取消删除",
+                });
               }
             });
         })
@@ -185,7 +184,7 @@ export default {
     //改变page
     changePage(val) {
       this.page = val;
-      this.getImageList()
+      this.getImageList();
     },
   },
 };

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

@@ -189,7 +189,7 @@ export default {
             fontSize: 14,
           },
           axisLabel: {
-            color: "#000",
+            color: "#333",
             fontSize: 14,
           },
           axisTick: {
@@ -199,21 +199,6 @@ export default {
             },
             show: true,
           },
-          splitLine: {
-            show: true,
-            lineStyle: {
-              color: "#335971",
-              // "type": "dashed"
-            },
-          },
-          axisLine: {
-            lineStyle: {
-              color: "#333",
-              width: 1,
-              // "type": "dashed"
-            },
-            show: true,
-          },
           name: "",
         },
         series: [

+ 42 - 30
minggao/src/page/superviseModule/superviseModule.vue

@@ -77,11 +77,16 @@
         v-loading="loading"
         stripe
         style="width: 100%"
+        :height="48 * 13"
       >
         <el-table-column prop="ind" label="序号" width="180"> </el-table-column>
         <el-table-column prop="supervisor_user" label="监督人" width="180">
         </el-table-column>
-         <el-table-column prop="actual_supervisor" label="实际监督人" width="180">
+        <el-table-column
+          prop="actual_supervisor"
+          label="实际监督人"
+          width="180"
+        >
         </el-table-column>
         <el-table-column prop="supervisor_type" label="监督形式" width="180">
         </el-table-column>
@@ -106,7 +111,7 @@
       <!-- 分页 -->
       <el-pagination
         style="margin: 60px 0 0 0"
-        :page-size="10"
+        :page-size="20"
         @current-change="newPage"
         :current-page="page"
         v-if="tableData.length > 0"
@@ -136,12 +141,12 @@ export default {
       options: [
         {
           value: "远程监督",
-          label: "远程监督"
+          label: "远程监督",
         },
         {
           value: "现场监督",
-          label: "现场监督"
-        }
+          label: "现场监督",
+        },
       ],
       value: "", // 时间筛选
       startTime: "", // 开始时间
@@ -154,7 +159,7 @@ export default {
 
       // 分页
       page: 1, // 当期页码
-      tableSum: 0 // 总页数
+      tableSum: 0, // 总页数
     };
   },
   //监听属性 类似于data概念
@@ -167,12 +172,12 @@ export default {
         this.fullHeight = val;
         this.timer = true;
         let that = this;
-        setTimeout(function() {
+        setTimeout(function () {
           //防止过度调用监测事件,导致卡顿
           that.timer = false;
         }, 400);
       }
-    }
+    },
   },
   //方法集合
   methods: {
@@ -191,18 +196,17 @@ export default {
     tableList() {
       this.$axios({
         method: "POST",
-        url:
-          "/api/api_gateway?method=control_center.task.supervisor_record_list",
+        url: "/api/api_gateway?method=control_center.task.supervisor_record_list",
         data: this.qs.stringify({
           page: this.page,
-          page_item: "10",
+          page_item: "20",
           supervisor_user_id: this.input, // 监督人id
           start_time: this.startTime, // 开始时间
           end_time: this.endTime, // 结束时间
-          supervisor_type: this.input2 // 监督形式
-        })
+          supervisor_type: this.input2, // 监督形式
+        }),
       })
-        .then(res => {
+        .then((res) => {
           if (res.data.data.total_item !== 0) {
             var data = res.data.data;
             this.tableSum = data.total_item;
@@ -215,7 +219,7 @@ export default {
           }
           this.loading = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.loading = false;
         });
     },
@@ -229,14 +233,14 @@ export default {
           user_type: "supervisor", // 用户类型,operator(任务处理人), supervisor(任务监督人), owner(任务发布人)
           operator_id: "", // 已经选择的任务处理人id
           supervisor_id: "", // 已经选择的任务监督人id
-          owner_id: "" // 已经选择的任务发布人id
-        })
+          owner_id: "", // 已经选择的任务发布人id
+        }),
       })
-        .then(res => {
+        .then((res) => {
           if (res.data.data.length !== 0) {
             var data = res.data.data;
             var list = [];
-            data.forEach(item => {
+            data.forEach((item) => {
               var obj = {};
               obj["value"] = item.user_id;
               obj["label"] = item.real_name;
@@ -245,18 +249,19 @@ export default {
             this.conductorList = list;
           }
         })
-        .catch(err => {});
+        .catch((err) => {});
     },
 
     // 搜索
     searchData(e) {
       if (this.value) {
         this.startTime = this.tabtime(e[0]);
-        this.endTime = this.tabtime(e[1]);
+        this.startTime = this.tabtime(e[1]);
       } else {
         this.startTime = "";
         this.endTime = "";
       }
+      this.page = 1;
       this.loading = true;
       this.tableData = [];
       this.tableList();
@@ -277,6 +282,7 @@ export default {
       this.endTime = ""; // 结束时间
       this.loading = true;
       this.tableData = [];
+      this.page = 1
       this.tableList();
     },
 
@@ -286,13 +292,19 @@ export default {
       this.$axios({
         method: "POST",
         url: "/api/api_gateway?method=control_center.task.supervisor_export",
-        responseType: "blob"
+        responseType: "blob",
+        data: this.qs.stringify({
+          supervisor_user_id: this.input, //                      非必填                   监督人id
+          start_time: this.startTime, //                               非必填                     开始时间
+          end_time: this.startTime, //                                 非必填                     结束时间
+          supervisor_type: this.input2, //                          非必填                     监督形式
+        }),
       })
-        .then(res => {
+        .then((res) => {
           this.downloadFile(res, "监督记录.xls");
           this.loadingShow = false;
         })
-        .catch(err => {
+        .catch((err) => {
           this.loadingShow = false;
           // console.log(err);
         });
@@ -321,10 +333,10 @@ export default {
       this.$router.push({
         path: "/index/superviseDetails",
         query: {
-          id: data.id
-        }
+          id: data.id,
+        },
       });
-    }
+    },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},
@@ -341,7 +353,7 @@ export default {
   updated() {}, //生命周期 - 更新之后
   beforeDestroy() {}, //生命周期 - 销毁之前
   destroyed() {}, //生命周期 - 销毁完成
-  activated() {} //如果页面有keep-alive缓存功能,这个函数会触发
+  activated() {}, //如果页面有keep-alive缓存功能,这个函数会触发
 };
 </script>
 <style lang="less" scoped>
@@ -374,9 +386,9 @@ export default {
     color: #1890ff;
   }
 }
-/deep/.el-date-editor{
+/deep/.el-date-editor {
   cursor: pointer;
-  .el-range-input{
+  .el-range-input {
     cursor: pointer;
   }
 }

+ 2 - 0
minggao/src/page/systemmanger/dayRecord.vue

@@ -213,6 +213,7 @@ export default {
         this.startTime = "";
         this.endTime = "";
       }
+      this.page = 1
       // console.log(this.startTime)
       // console.log(this.endTime)
       this.tableList();
@@ -225,6 +226,7 @@ export default {
       this.input1 = "";
       this.startTime = "";
       this.endTime = "";
+      this.page = 1
       this.tableList();
     }
   },

+ 98 - 42
minggao/src/page/systemmanger/userManger.vue

@@ -76,10 +76,47 @@
               width="280"
             >
               <template slot-scope="scope">
-                <span v-for="(item, index) in scope.row.org_list" :key="index"
-                  >{{ item.org_name }}
-                  <span v-if="index !== scope.row.org_list.length - 1">、</span>
-                </span>
+                <span v-if="scope.row.org_list.length == 1">{{
+                  scope.row.org_list[0].org_name
+                }}</span>
+                <el-popover
+                  ref="popover"
+                  placement="right"
+                  title=""
+                  width="150"
+                  trigger="hover"
+                  v-else
+                >
+                  <div class="popover-content" v-html="content"></div>
+                  <span @mouseover="orglisthover(scope.row)" slot="reference"
+                    >{{ scope.row.org_list.length==0?"暂无组织":scope.row.org_list[0].org_name }}...</span
+                  >
+                </el-popover>
+              </template>
+            </el-table-column>
+            <el-table-column
+              :show-overflow-tooltip="true"
+              prop="role_list"
+              label="用户角色"
+              width="280"
+            >
+              <template slot-scope="scope">
+                <span v-if="scope.row.role_list.length == 1">{{
+                  scope.row.role_list[0].role_list
+                }}</span>
+                <el-popover
+                  ref="popover"
+                  placement="right"
+                  title=""
+                  width="150"
+                  trigger="hover"
+                  v-else
+                >
+                  <div class="popover-content" v-html="content2"></div>
+                  <span @mouseover="orglisthover2(scope.row)" slot="reference"
+                    >{{ scope.row.role_list.length==0?"暂无组织":scope.row.role_list[0].role_list }}...</span
+                  >
+                </el-popover>
               </template>
             </el-table-column>
             <el-table-column prop="state" label="状态" width="120">
@@ -399,6 +436,8 @@ export default {
 
       isClick: true, // 防止重复弹框
       submitBtn: false, // 防止弹框确定按钮重复请求
+      content:"",
+      content2:""
     };
   },
   //监听属性 类似于data概念
@@ -531,11 +570,11 @@ export default {
           }).then((res) => {
             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,
+                });
               }
               this.userListData();
             }
@@ -543,10 +582,10 @@ export default {
         })
         .catch(() => {
           if (document.getElementsByClassName("el-message").length == 0) {
-          this.$message({
-            type: "info",
-            message: "已取消",
-          });
+            this.$message({
+              type: "info",
+              message: "已取消",
+            });
           }
         });
     },
@@ -584,11 +623,11 @@ export default {
           }).then((res) => {
             if (res.data.data == true) {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                message: "成功!",
-                type: "success",
-                duration: 1500,
-              });
+                this.$message({
+                  message: "成功!",
+                  type: "success",
+                  duration: 1500,
+                });
               }
             }
             this.userListData();
@@ -596,10 +635,10 @@ export default {
         })
         .catch(() => {
           if (document.getElementsByClassName("el-message").length == 0) {
-          this.$message({
-            type: "info",
-            message: "取消输入",
-          });
+            this.$message({
+              type: "info",
+              message: "取消输入",
+            });
           }
         });
     },
@@ -621,19 +660,19 @@ export default {
           }).then((res) => {
             if (res.data.data == true) {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                message: "成功!",
-                type: "success",
-                duration: 1500,
-              });
+                this.$message({
+                  message: "成功!",
+                  type: "success",
+                  duration: 1500,
+                });
               }
             } else {
               if (document.getElementsByClassName("el-message").length == 0) {
-              this.$message({
-                message: "失败!",
-                type: "error",
-                duration: 1500,
-              });
+                this.$message({
+                  message: "失败!",
+                  type: "error",
+                  duration: 1500,
+                });
               }
             }
             this.loading2 = true;
@@ -642,10 +681,10 @@ export default {
         })
         .catch(() => {
           if (document.getElementsByClassName("el-message").length == 0) {
-          this.$message({
-            type: "info",
-            message: "已取消删除",
-          });
+            this.$message({
+              type: "info",
+              message: "已取消删除",
+            });
           }
         });
     },
@@ -659,6 +698,7 @@ export default {
 
     // 搜索
     searchData() {
+      this.page = 1
       this.loading2 = true;
       this.userListData();
     },
@@ -723,11 +763,11 @@ export default {
             .then((res) => {
               if (res.data.data == true) {
                 if (document.getElementsByClassName("el-message").length == 0) {
-                this.$message({
-                  message: "成功!",
-                  type: "success",
-                  duration: 1500,
-                });
+                  this.$message({
+                    message: "成功!",
+                    type: "success",
+                    duration: 1500,
+                  });
                 }
                 this.$refs["form"].resetFields();
                 this.userVisible = false;
@@ -773,7 +813,7 @@ export default {
               list.push(item);
             });
             this.tableData = list;
-            this.pageSum = res.data.data.page_item;
+            this.pageSum = res.data.data.total_item;
           }
           this.loading2 = false;
         })
@@ -835,6 +875,22 @@ export default {
     roleChange(item) {
       this.form.role = item;
     },
+    orglisthover(e) {
+      console.log(e);
+      var str = ``;
+      for (var i = 0; i < e.org_list.length; i++) {
+        str += `<p>` + e.org_list[i].org_name + `</p>`;
+      }
+      this.content = str;
+    },
+    orglisthover2(e){
+      console.log(e);
+      var str = ``;
+      for (var i = 0; i < e.role_list.length; i++) {
+        str += `<p>` + e.role_list[i].role_list + `</p>`;
+      }
+      this.content2 = str;
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},

+ 1 - 1
minggao/src/util/http.js

@@ -41,7 +41,7 @@ axios.interceptors.request.use(req => {
   //   }
   // }
   url = req.url.split('=')[1]
-  if (url !== 'sysmenage.usermanager.user_login' && url !== 'monitor_manage.cbd_manage.add_img' && req.url.indexOf('trap_export') == -1 && url !== "monitor_manage.home_map.home_theme") {
+  if (url !== 'sysmenage.usermanager.user_login' && url !== 'monitor_manage.cbd_manage.add_img' && req.url.indexOf('trap_export') == -1 && url !== "monitor_manage.home_map.home_theme"&& req.url.indexOf('monitor_point_export') == -1) {
     req.data = req.data ? req.data + '&token=' + session : 'token=' + session;
   }
   return req