Explorar o código

测试问题修复

yf_zhb %!s(int64=2) %!d(string=hai) anos
pai
achega
401817d8e6

+ 2 - 2
minggao/config/index.js

@@ -12,10 +12,10 @@ module.exports = {
     proxyTable: {
       '/api': {
         ws: false,
-        // target: 'http://192.168.1.52:12345', //翟毅飞
+        target: 'http://192.168.1.52:12345', //翟毅飞
         //  target: 'https://www.yhswjc.com', //线上
         // target: 'http://192.168.1.77:12345', //曹世祥
-        target: 'http://114.115.147.140:12345',
+        // target: 'http://114.115.147.140:12345',
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api' //重写接口

+ 74 - 58
minggao/src/page/forecasting/maintain/maintain.vue

@@ -2,7 +2,7 @@
 <template>
   <div class="maintainbox">
     <div class="maintainbox_search">
-      <el-select
+      <!-- <el-select
         v-model="point_type"
         placeholder="请选择监测点类型"
         size="mini"
@@ -16,7 +16,7 @@
           :value="item.id"
         >
         </el-option>
-      </el-select>
+      </el-select> -->
       <el-input
         v-model="monitorname"
         placeholder="请输入监测点名称"
@@ -51,10 +51,10 @@
             prop="point_name"
             label="监测点名称"
           ></el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             prop="point_type_name"
             label="监测点类型"
-          ></el-table-column>
+          ></el-table-column> -->
           <el-table-column prop="lng" label="经度">
             <template slot-scope="scope">
               <span>{{ ToDegrees(scope.row.lng, 'lng') }}</span>
@@ -110,7 +110,7 @@
           <el-form-item label="监测点名称" prop="point_name">
             <el-input v-model="ruleForm.point_name"></el-input>
           </el-form-item>
-          <el-form-item label="监测点类型" prop="point_type">
+          <!-- <el-form-item label="监测点类型" prop="point_type">
             <el-select
               v-model="ruleForm.point_type"
               placeholder="请选择监测点类型"
@@ -124,7 +124,7 @@
               >
               </el-option>
             </el-select>
-          </el-form-item>
+          </el-form-item> -->
           <div class="addtrapbox">
             <el-form-item label="所在经度" prop="lng">
               <el-input v-model="ruleForm.lng"></el-input>
@@ -272,7 +272,7 @@ export default {
     };
     //这里存放数据
     return {
-      point_type: '',
+      // point_type: '',
       monitorname: '', //搜索 监测点名称
       addtraptf: false, //添加框
       loading: false, //加载框
@@ -281,7 +281,7 @@ export default {
       tableData: [],
       ruleForm: {
         point_name: '',
-        point_type: '',
+        // point_type: '',
         lng: '',
         lat: '',
         messages: ''
@@ -290,9 +290,9 @@ export default {
         point_name: [
           { required: true, message: '请输入监测点名称', trigger: 'blur' }
         ],
-        point_type: [
-          { required: true, message: '请选择监测点类型', trigger: 'change' }
-        ],
+        // point_type: [
+        //   { required: true, message: '请选择监测点类型', trigger: 'change' }
+        // ],
         lng: [
           { required: true, message: '请输入经度', trigger: 'blur' }
           //   { validator: checklnglat, trigger: "blur" },
@@ -334,7 +334,7 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=monitor_manage.maintain.checkpoint_list',
         data: this.qs.stringify({
-          point_type: this.point_type,
+          // point_type: this.point_type,
           page_item: 20,
           page: this.page,
           point_name: this.monitorname //              非必传(string)     诱剂名称 搜索项
@@ -376,32 +376,40 @@ export default {
                 point_name: this.ruleForm.point_name, //                  非必传(num)                诱捕器id 修改项
                 lat: this.ToDegrees(this.ruleForm.lat, 'lat'), //                       必传(string)               纬度
                 lng: this.ToDegrees(this.ruleForm.lng, 'lng'), //                       必传(string)               经度
-                messages: this.ruleForm.messages,
-                point_type: this.ruleForm.point_type
+                messages: this.ruleForm.messages
+                // point_type: this.ruleForm.point_type
               })
-            }).then(res => {
-              console.log(res);
-              if (res.data.data) {
-                if (document.getElementsByClassName('el-message').length == 0) {
-                  this.$message({
-                    showClose: true,
-                    message: '添加成功!',
-                    type: 'success'
-                  });
-                }
-                this.addtraptf = false;
-                this.getmaintainlist();
-              } else {
-                if (document.getElementsByClassName('el-message').length == 0) {
-                  this.$message({
-                    showClose: true,
-                    message: '添加失败' + res.data.message,
-                    type: 'warning'
-                  });
+            })
+              .then(res => {
+                console.log(res);
+                if (res.data.data) {
+                  if (
+                    document.getElementsByClassName('el-message').length == 0
+                  ) {
+                    this.$message({
+                      showClose: true,
+                      message: '添加成功!',
+                      type: 'success'
+                    });
+                  }
+                  this.addtraptf = false;
+                  this.getmaintainlist();
+                } else {
+                  if (
+                    document.getElementsByClassName('el-message').length == 0
+                  ) {
+                    this.$message({
+                      showClose: true,
+                      message: '添加失败' + res.data.message,
+                      type: 'warning'
+                    });
+                  }
                 }
-              }
-              this.releaseTF = false;
-            });
+                this.releaseTF = false;
+              })
+              .finally(() => {
+                this.releaseTF = false;
+              });
           } else if (this.addtitle == '修改监测点') {
             this.releaseTF = true;
             this.$axios({
@@ -415,29 +423,37 @@ export default {
                 lng: this.ToDegrees(this.ruleForm.lng, 'lng'), //                       必传(string)               经度
                 messages: this.ruleForm.messages
               })
-            }).then(res => {
-              console.log(res);
-              if (res.data.data) {
-                if (document.getElementsByClassName('el-message').length == 0) {
-                  this.$message({
-                    showClose: true,
-                    message: '修改成功!',
-                    type: 'success'
-                  });
-                }
-                this.addtraptf = false;
-                this.getmaintainlist();
-              } else {
-                if (document.getElementsByClassName('el-message').length == 0) {
-                  this.$message({
-                    showClose: true,
-                    message: '修改失败' + res.data.message,
-                    type: 'warning'
-                  });
+            })
+              .then(res => {
+                console.log(res);
+                if (res.data.data) {
+                  if (
+                    document.getElementsByClassName('el-message').length == 0
+                  ) {
+                    this.$message({
+                      showClose: true,
+                      message: '修改成功!',
+                      type: 'success'
+                    });
+                  }
+                  this.addtraptf = false;
+                  this.getmaintainlist();
+                } else {
+                  if (
+                    document.getElementsByClassName('el-message').length == 0
+                  ) {
+                    this.$message({
+                      showClose: true,
+                      message: '修改失败' + res.data.message,
+                      type: 'warning'
+                    });
+                  }
                 }
-              }
-              this.releaseTF = false;
-            });
+                this.releaseTF = false;
+              })
+              .finally(() => {
+                this.releaseTF = false;
+              });
           }
         } else {
           if (document.getElementsByClassName('el-message').length == 0) {

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

@@ -243,7 +243,7 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=monitor_manage.trap_manage.pest_trap_org',
         data: this.qs.stringify({
-          point_type: this.pointType,
+          // type_id: this.typeID,
           page_item: '1000000'
         })
       }).then(res => {

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

@@ -612,8 +612,7 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=sysmenage.usermanager.org_list',
         data: this.qs.stringify({
-          page_item: '100000000',
-          point_type: this.point_type
+          page_item: '100000000'
         })
       }).then(res => {
         console.log(res.data.data);

+ 1 - 4
minggao/src/page/homepage/facilitydistribute.vue

@@ -538,7 +538,7 @@ export default {
       this.getbaselist();
     },
     getbaselist() {
-      // this.pestboxloading = true
+      this.pestboxloading = true;
       this.$axios({
         method: 'POST',
         url:
@@ -671,10 +671,8 @@ export default {
       this.getbaselist();
     },
     handlePointTypeChange() {
-      this.inoffvalue = '';
       this.typevalue = '';
       this.gettype();
-      this.getmon2();
       this.search();
     },
     reset() {
@@ -700,7 +698,6 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=monitor_manage.trap_manage.trap_org',
         data: this.qs.stringify({
-          point_type: this.point_type,
           page_item: '1000000'
         })
       }).then(res => {

+ 5 - 5
minggao/src/page/homepage/pestdistribute.vue

@@ -216,7 +216,7 @@ export default {
       measure_index: 0,
       mouseTool: null,
       arealistmouse: {},
-      point_type: '1', //监测点类型 1 表示 林木害虫监测点。2 表示 实蝇监测点
+      point_type: '', //监测点类型 1 表示 林木害虫监测点。2 表示 实蝇监测点
       pointTypeOptions
     };
   },
@@ -501,7 +501,8 @@ export default {
           point_name: this.inoffvalue, //               非必传(string)               设备所属监测点 搜索项
           org_name: this.versionsvalue2, //                 非必传(string)               设备所属组织   搜索项
           start_time: this.start_time, //               非必传(string)               开始时间  搜索项 2022-01-20
-          end_time: this.end_time //                 非必传(string)               结束时间  搜索项 2022-01-23
+          end_time: this.end_time, //                 非必传(string)               结束时间  搜索项 2022-01-23
+          point_type: this.point_type
         })
       }).then(res => {
         // console.log(res.data.data);
@@ -681,8 +682,8 @@ export default {
       this.getwornlist();
     },
     handlePointTypeChange() {
-      this.inoffvalue = '';
-      this.getmon2();
+      // this.inoffvalue = '';
+      // this.getmon2();
       this.search();
     },
     getmon2() {
@@ -690,7 +691,6 @@ export default {
         method: 'POST',
         url: '/api/api_gateway?method=monitor_manage.trap_manage.pest_trap_org',
         data: this.qs.stringify({
-          point_type: this.point_type,
           page_item: '1000000'
         })
       }).then(res => {