zkl 4 lat temu
rodzic
commit
d2375c57b6

+ 3 - 3
minggao/config/index.js

@@ -12,8 +12,8 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable: {
       '/api': {
-        // target: 'http://192.168.1.17:12345', //翟毅飞
-        target: 'http://192.168.1.77: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: {
@@ -23,7 +23,7 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: '192.168.1.29', // can be overwritten by process.env.HOST
+    host: '192.168.1.4', // 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,

+ 2 - 1
minggao/src/main.js

@@ -53,7 +53,8 @@ Vue.config.productionTip = false
 const axios = require('axios')
 const Qs = require('qs')
 
-Vue.prototype.$imghost = 'http://www.hnyfwlw.com:8006/projectimg' // 线上图片服务器路径常量
+Vue.prototype.$imghost = 'http://192.168.1.17:12345' // 翟毅飞本地图片服务器路径常量
+// Vue.prototype.$imghost = 'http://www.hnyfwlw.com:8006/projectimg' // 线上图片服务器路径常量
 Vue.prototype.$insectHost = 'https://images.weserv.nl/?url=' // 线上图片服务器路径常量
 Vue.prototype.$wsUrl = Vue.prototype.wsUrl  // 实时通信服务器url 
 Vue.prototype.$deriveData = Vue.prototype.DOMIN // 导出

+ 40 - 29
minggao/src/page/commandCenter/laboratory.vue

@@ -423,7 +423,7 @@ export default {
       this.startTime = "";
       this.endTime = "";
       this.loading = true;
-      this.page = 1
+      this.page = 1;
       this.tableList();
     },
 
@@ -599,16 +599,7 @@ export default {
               list.push(obj);
             }
             this.options2 = list;
-            console.log(this.fillList, this.options2);
-            for (var i = 0; i < this.fillList.length; i++) {
-              for (var j = 0; j < this.options2.length; j++) {
-                if (this.fillList[i].label == this.options2[j].label) {
-                  this.options2[j].disabled = true;
-                } else {
-                  this.options2[j].disabled = false;
-                }
-              }
-            }
+            this.indexRedact(); // 有害生物删除添加
           }
         })
         .catch((err) => {
@@ -639,15 +630,16 @@ export default {
           item.ind = index;
           this.fillList.push(item);
         });
-        for (var i = 0; i < this.fillList.length; i++) {
-          for (var j = 0; j < this.options2.length; j++) {
-            if (this.fillList[i].label == this.options2[j].label) {
-              this.options2[j].disabled = true;
-            } else {
-              this.options2[j].disabled = false;
-            }
-          }
-        }
+        // for (var i = 0; i < this.fillList.length; i++) {
+        //   for (var j = 0; j < this.options2.length; j++) {
+        //     if (this.fillList[i].label == this.options2[j].label) {
+        //       this.options2[j].disabled = true;
+        //     } else {
+        //       this.options2[j].disabled = false;
+        //     }
+        //   }
+        // }
+        this.indexRedact(); // 有害生物添加
       } else {
         if (document.getElementsByClassName("el-message").length == 0) {
           this.$message({
@@ -670,15 +662,11 @@ export default {
       });
       this.fillList = [];
       this.fillList = list;
-      for (var i = 0; i < this.fillList.length; i++) {
-        for (var j = 0; j < this.options2.length; j++) {
-          if (this.fillList[i].label == this.options2[j].label) {
-            this.options2[j].disabled = true;
-          } else {
-            this.options2[j].disabled = false;
-          }
-        }
-      }
+
+      this.options2.forEach((item) => {
+        item.disabled = false
+      })
+      this.indexRedactA(); // 有害生物删除
     },
 
     // 添加、删除确定事件
@@ -774,6 +762,29 @@ export default {
         e.target.value = 0;
       }
     },
+
+    // 有害生物添加
+    indexRedact() {
+      this.fillList.forEach((item) => {
+        this.options2.forEach((e) => {
+          if (item.label == e.label) {
+            e.disabled = true;
+            // console.log(e.label, e.disabled);
+          }
+        });
+      });
+    },
+    // 有害生物删除
+    indexRedactA() {
+      this.fillList.forEach((item) => {
+        this.options2.forEach((e) => {
+          if (item.label == e.label) {
+            // console.log(e.label, e.disabled)
+            e.disabled = true;
+          }
+        });
+      });
+    }
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   created() {},

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

@@ -549,7 +549,7 @@ export default {
         })
       })
         .then(res => {
-          if (res.data.data.page_item !== 0) {
+          if (res.data.data.total_item !== 0) {
             var data = res.data.data.page_list;
             var list = [];
             data.forEach((item, index) => {
@@ -557,7 +557,7 @@ export default {
               list.push(item);
             });
             this.tableData = list;
-            this.pageSum = res.data.data.page_item;
+            this.pageSum = res.data.data.total_item;
             this.loading = false;
           }
         })

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

@@ -231,10 +231,10 @@ export default {
       },
       rules2: {
         region: [
-          { required: true, message: "请选择监督单位", trigger: "change" },
+          { required: true, message: "请输入监督单位", trigger: "change" },
         ],
         resource: [
-          { required: true, message: "请输入监督形式", trigger: "change" },
+          { required: true, message: "请选择监督形式", trigger: "change" },
         ],
         desc: [{ required: true, message: "请输入监督情况", trigger: "blur" }],
       },

+ 4 - 2
minggao/src/page/commandCenter/superviseLogDetails.vue

@@ -62,12 +62,14 @@
                   <el-table-column prop="img_list" label="图像信息">
                     <template slot-scope="scope">
                       <span
+                        v-viewer
                         class="span_img"
                         v-if="scope.row.img_list.length !== 0"
                       >
                         <img
-                          :src="item"
+                          :src="$imghost + item"
                           alt=""
+                          style="width: 50px; height: 50px; margin: 0 10px 0 0;"
                           v-for="item in scope.row.img_list"
                           :key="item"
                         />
@@ -98,7 +100,7 @@ export default {
       superviseList: {},
       // 监测内容
       tableData: [],
-      loading: false // 加载
+      loading: false, // 加载
     };
   },
   //监听属性 类似于data概念

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

@@ -720,6 +720,13 @@ export default {
       }
       console.log(this.ruleForm.checkList);
     },
+
+    "ruleForm.type"(newVal, oldVal) {
+      if (newVal == '有害生物监测' && oldVal !== "") {
+        this.ybqCheckList = []; // 清空
+        this.checkList = []
+      }
+    }
   },
   //方法集合
   methods: {

+ 1 - 1
minggao/src/page/superviseModule/superviseModule.vue

@@ -256,7 +256,7 @@ export default {
     searchData(e) {
       if (this.value) {
         this.startTime = this.tabtime(e[0]);
-        this.startTime = this.tabtime(e[1]);
+        this.endTime = this.tabtime(e[1]);
       } else {
         this.startTime = "";
         this.endTime = "";

+ 1 - 0
minggao/src/page/systemmanger/customsManger.vue

@@ -402,6 +402,7 @@ export default {
 
     // 搜索
     searchData() {
+      this.page = 1; // 当前页码归默认
       this.tabListData();
     }
   },

+ 1 - 0
minggao/src/page/systemmanger/harmfulBiology.vue

@@ -297,6 +297,7 @@ export default {
 
     // 搜索
     searchData() {
+      this.page = 1; // 当前页码归默认
       this.harmfulBiologyList();
     },
 

+ 1 - 0
minggao/src/page/systemmanger/role.vue

@@ -306,6 +306,7 @@ export default {
 
     // 搜索
     searchData() {
+      this.page = 1; // 当前页码归默认
       this.tabListData();
     },
 

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

@@ -15,11 +15,11 @@ Vue.prototype.DOMIN = DOMIN
 Vue.prototype.wsUrl = wsUrl // 实时通信Url
 Vue.prototype.mapJson = mapJson //请求地图json,不带端口号
 // console.log(DOMIN)
-axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
-axios.defaults.timeout = 30000;
-axios.defaults.withCredentials = true //axios请求时携带session
-axios.defaults.crossDomain = true
-axios.defaults.baseURL = DOMIN
+// axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
+// axios.defaults.timeout = 30000;
+// axios.defaults.withCredentials = true //axios请求时携带session
+// axios.defaults.crossDomain = true
+// axios.defaults.baseURL = DOMIN
 
 
 // axios请求前的拦截