فهرست منبع

测试问题修复

yf_zhb 2 سال پیش
والد
کامیت
d02ec2e7f8

+ 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' //重写接口

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

@@ -1195,7 +1195,7 @@ export default {
         .then(res => {
           if (res.data.data.total_item !== 0) {
             var data = res.data.data;
-            this.listSum = data.total_item;
+
             var list = [];
             data.page_list.forEach(item => {
               var obj = {};
@@ -1206,6 +1206,7 @@ export default {
             this.ybqData = list;
             console.log(this.ybqData);
           }
+          this.listSum = res.data.data.total_item;
           this.loading5 = false;
         })
         .catch(err => {

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

@@ -529,7 +529,7 @@
     </el-dialog>
     <!-- 管理员操作弹框 -->
     <el-dialog
-      title="测报灯设置"
+      title="智能测报灯设置"
       :visible.sync="operationDialogVisible"
       width="580px"
       :close-on-click-modal="false"

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

@@ -112,7 +112,7 @@
           </el-form-item>
           <el-form-item label="监测点类型" prop="point_type">
             <el-select
-              v-model="point_type"
+              v-model="ruleForm.point_type"
               placeholder="请选择监测点类型"
               size="mini"
             >
@@ -288,7 +288,7 @@ export default {
       },
       rules: {
         point_name: [
-          { required: true, message: '请输入诱捕器名称', trigger: 'blur' }
+          { required: true, message: '请输入监测点名称', trigger: 'blur' }
         ],
         point_type: [
           { required: true, message: '请选择监测点类型', trigger: 'change' }

+ 18 - 8
minggao/src/page/home/index.vue

@@ -123,7 +123,8 @@
             <el-breadcrumb-item
               v-for="(item, index) in routerinfo"
               :key="item.pur_id"
-              ><a
+            >
+              <!-- <a
                 v-if="
                   index == routerinfo.length - 2 &&
                     item.menu != '' &&
@@ -132,7 +133,8 @@
                 :href="'/#/index/' + item.menu"
                 style="cursor: pointer"
                 >{{ item.purview_name }}</a
-              ><span v-else>{{ item.purview_name }}</span></el-breadcrumb-item
+              > -->
+              <span>{{ item.purview_name }}</span></el-breadcrumb-item
             >
           </el-breadcrumb>
         </div>
@@ -410,8 +412,8 @@ export default {
     },
     routemap(routerdata) {
       var newrouter = this.$route.path;
-      const pathList = newrouter.split('/').filter(item=>!!item);
-      console.log(routerdata,'route map',newrouter,pathList)
+      const pathList = newrouter.split('/').filter(item => !!item);
+      // console.log(routerdata, 'route map', newrouter, pathList);
       var tf = routerdata.filter(item => {
         if (item.menu != '') {
           if (pathList.includes(item.menu)) {
@@ -432,9 +434,9 @@ export default {
           }
         }
       });
-      console.log(tf,'route map -----')
+      // console.log(tf, 'route map -----');
       if (tf.length != 0) {
-        console.log(tf);
+        // console.log(tf);
         // this.menuActiveId = tf[0].pur_id.toString();
         this.routerinfo = [];
         this.routerinfo.unshift(tf[0]);
@@ -485,9 +487,9 @@ export default {
         });
         // console.log(newpath)
         this.routerinfo.unshift(newpath[0]);
-        console.log(this.routerinfo);
-      } else {
         // console.log(this.routerinfo);
+      } else {
+        // console.log(this.routerinfo, 'home');
         var obj = {
           menu: '',
           parent_perm_id: '88',
@@ -504,6 +506,14 @@ export default {
           } else if (this.$route.path == '/index/superviseLogDetails') {
             this.routerinfo.push(obj);
           }
+        } else if (
+          this.routerinfo.length === 3 &&
+          this.$route.path === '/index/fillinrecord'
+        ) {
+          this.routerinfo.push({
+            menu: '',
+            purview_name: '填报记录'
+          });
         }
       }
     },

+ 39 - 24
minggao/src/page/homepage/facilitydistribute.vue

@@ -15,6 +15,20 @@
     <div class="amap-demo" id="mapContainer2"></div>
     <div class="searchbox">
       <el-select
+        v-model="point_type"
+        placeholder="请选择"
+        size="mini"
+        @change="handlePointTypeChange"
+      >
+        <el-option
+          v-for="item in pointTypeOptions"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id"
+        >
+        </el-option>
+      </el-select>
+      <el-select
         v-model="typevalue"
         placeholder="请选择设备类型"
         size="mini"
@@ -56,20 +70,7 @@
         >
         </el-option>
       </el-select>
-      <el-select
-        v-model="point_type"
-        placeholder="请选择监测点类型"
-        size="mini"
-        @change="handlePointTypeChange"
-      >
-        <el-option
-          v-for="item in pointTypeOptions"
-          :key="item.id"
-          :label="item.name"
-          :value="item.id"
-        >
-        </el-option>
-      </el-select>
+
       <el-select
         v-model="inoffvalue"
         placeholder="请选择所在监测点"
@@ -216,7 +217,8 @@
         style="cursor: pointer"
       ></p>
       <div class="tishi" :style="{ width: width }" v-if="baseinfo.length == 0">
-        <p>请点击设备标点,查看设备详情</p>
+        <!-- <p>请点击设备标点,查看设备详情</p> -->
+        <p>暂无数据</p>
       </div>
       <div
         v-else
@@ -357,7 +359,7 @@ export default {
     return {
       pietf: false,
       width: '0px',
-      point_type: '1', //监测点类型 1 表示 林木害虫监测点。2 表示 实蝇监测点
+      point_type: '', //监测点类型 1 表示 林木害虫监测点。2 表示 实蝇监测点
       pointTypeOptions: pointTypeOptions,
       inoffvalue: '', //监测点 选择
       inoffoptions: [], //监测点列表
@@ -508,7 +510,7 @@ export default {
       }
     },
     initmap() {
-      // console.log();
+      console.log('----------- init map');
       var map = new AMap.Map(document.getElementById('mapContainer2'), {
         center: this.center,
         resizeEnable: true,
@@ -533,7 +535,7 @@ export default {
       //   console.log(e);
       // });
       this.map = map;
-      this.pestboxloading = false;
+      this.getbaselist();
     },
     getbaselist() {
       // this.pestboxloading = true
@@ -549,6 +551,7 @@ export default {
           type_id: this.typevalue //                   非必传(num)                  3测报灯  4诱捕器  6监控 搜索项
         })
       }).then(res => {
+        this.pestboxloading = false;
         // this.init(res.data.data);
         console.log(res.data.data);
         var resdata = res.data.data;
@@ -592,7 +595,10 @@ export default {
       }
     },
     setmak(data) {
-      if (data.device_type_id === 6) {
+      if (
+        data.device_type_id === 6 ||
+        !this.deviceTypeDataSource[data.device_type_id]
+      ) {
         return;
       }
 
@@ -636,7 +642,7 @@ export default {
       // }
 
       var iconInstance = new AMap.Icon({
-        size: new AMap.Size(200, 200), // 图标尺寸
+        size: new AMap.Size(20, 20), // 图标尺寸
         imageSize: new AMap.Size(20, 20),
         image: icon // Icon的图像
       });
@@ -666,6 +672,8 @@ export default {
     },
     handlePointTypeChange() {
       this.inoffvalue = '';
+      this.typevalue = '';
+      this.gettype();
       this.getmon2();
       this.search();
     },
@@ -705,7 +713,10 @@ export default {
       this.$axios({
         method: 'POST',
         url:
-          '/api/api_gateway?method=monitor_manage.home_map.home_map_device_type'
+          '/api/api_gateway?method=monitor_manage.home_map.home_map_device_type',
+        data: this.qs.stringify({
+          point_type: this.point_type
+        })
       }).then(res => {
         // console.log(res.data.data);
         this.typeoptions =
@@ -719,9 +730,6 @@ export default {
         );
 
         this.deviceTypeDataSource = normalization(deviceData, 'type_id');
-
-        this.initmap();
-        this.getbaselist();
       });
     },
     getbaseinfo(d_id) {
@@ -737,6 +745,10 @@ export default {
         // console.log(res.data.data);
         this.loading = false;
         this.baseinfo = res.data.data;
+        if (!this.baseinfo.length) {
+          return;
+        }
+
         if (this.baseinfo[0].device_info) {
           // console.log(this.baseinfo[0].device_info.hlsHd)
           let hlsHd = this.baseinfo[0].device_info.hlsHd;
@@ -1059,6 +1071,9 @@ export default {
     this.gettype();
     this.getmon2();
     this.gettracklist_data();
+    setTimeout(() => {
+      this.initmap();
+    }, 1000);
   },
   beforeUpdate() {}, //生命周期 - 更新之前
   updated() {}, //生命周期 - 更新之后

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

@@ -70,11 +70,20 @@
         >
         </el-option>
       </el-select>
-      <DateSearch
-        ref="timeCirculation"
-        @dateChange="dateChange"
-        @timeScreen="timeScreen"
-      />
+      <div style="margin-bottom:10px;">
+        <DateSearch
+          ref="timeCirculation"
+          @dateChange="dateChange"
+          @timeScreen="timeScreen"
+        />
+      </div>
+      <div style="margin-bottom:10px;margin-left:10px;">
+        <el-button type="info" @click="search" size="mini">搜索</el-button>
+        <el-button @click="reset" size="mini">重置</el-button>
+        <el-button type="warning" @click="dialogVisible = true" size="mini"
+          >设置</el-button
+        >
+      </div>
       <!-- <el-date-picker
         v-model="timevalue"
         type="daterange"
@@ -86,11 +95,6 @@
         :editable="false"
       >
       </el-date-picker> -->
-      <el-button type="info" @click="search" size="mini">搜索</el-button>
-      <el-button @click="reset" size="mini">重置</el-button>
-      <el-button type="warning" @click="dialogVisible = true" size="mini"
-        >设置</el-button
-      >
     </div>
     <div class="piebox">
       <p
@@ -700,7 +704,6 @@ export default {
         }
         // this.versionsoptions2 = res.data.data.org_list;
         this.inoffoptions = res.data.data.point_data;
-        this.initmap();
       });
     },
     submitForm(formName) {
@@ -931,6 +934,10 @@ export default {
   mounted() {
     this.getmon2();
     this.getwornlistflex();
+
+    setTimeout(() => {
+      this.initmap();
+    }, 1000);
     // this.getmon();
   },
   beforeUpdate() {}, //生命周期 - 更新之前