Просмотр исходного кода

林木害虫统计完成 任务完成

zhangsijie 1 год назад
Родитель
Сommit
de4bad10eb

+ 3 - 2
minggao/config/index.js

@@ -2,7 +2,7 @@
  * @Author: zhangsijie 1935241421@qq.com
  * @Date: 2023-06-05 08:51:07
  * @LastEditors: lin
- * @LastEditTime: 2024-04-03 10:33:12
+ * @LastEditTime: 2024-04-15 09:38:54
  * @FilePath: \project\minggao_vue\MingGao_vue\minggao\config\index.js
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -24,7 +24,8 @@ module.exports = {
         //  target: 'https://www.yhswjc.com', //线上
         // target: 'http://192.168.1.77:12345', //曹世祥
         // target: 'http://114.115.147.140:12345',
-         target: 'http://192.168.0.117:8001', //闫自林本地服务
+        //  target: 'http://192.168.0.117:8001', //闫自林本地服务
+         target: 'http://192.168.0.120:8001', //孙夹克本地服务
         changeOrigin: true,
         pathRewrite: {
           '^/api': '/api' //重写接口

minggao/src/assets/images/newHome/Frame 801@2x.png → minggao/src/assets/images/newHome/bigBanner.png


minggao/src/assets/images/newHome/hover=false, 图表类型=折线图@2x.png → minggao/src/assets/images/newHome/detailBtn.png


minggao/src/assets/images/newHome/hover=true, 图表类型=折线图@2x.png → minggao/src/assets/images/newHome/detailBtnHover.png


+ 535 - 18
minggao/src/page/home/newHome/newHome.vue

@@ -3,11 +3,12 @@
  * @Autor: lin
  * @Date: 2024-04-09 14:26:07
  * @LastEditors: lin
- * @LastEditTime: 2024-04-12 17:06:28
+ * @LastEditTime: 2024-04-15 18:43:55
 -->
 <template>
   <div class="box">
     <div class="mapBox" id="newHome"></div>
+    <!-- 左侧统计图 -->
     <transition leave-active-class='animate__animated animate__bounceOutLeft'
       enter-active-class="animate__animated animate__bounceInLeft">
       <div class="smallChar deviceInfo" v-if="defaultInfo">
@@ -23,14 +24,50 @@
               </div>
               <div class="leftInfo">
                 <span>{{ item.device_count }}台</span>
-                <img class="markerIcon" :src="`${markerObj[item.device_type_id].length == 0 ? eyeClose : eyeOpen}`" alt=""
-                  @click="setMarker(item.devices_info, item.device_type_id)" />
+                <img class="markerIcon" :src="`${markerObj[item.device_type_id].length == 0 ? eyeClose : eyeOpen}`"
+                  alt="" @click="setMarker(item.devices_info, item.device_type_id)" />
               </div>
             </div>
           </div>
         </div>
       </div>
     </transition>
+    <!-- 右侧统计图 -->
+    <transition leave-active-class='animate__animated animate__bounceOutRight'
+      enter-active-class="animate__animated animate__bounceInRight">
+      <div>
+        <div class="smallChar lineBox" v-if="defaultInfo">
+          <div class="charBox">
+            <div class="charTitle">
+              <Title class="smallTitle" text="有害生物发生趋势"></Title>
+              <el-select class="selectThem" v-model="rightLineCategory" size="mini" placeholder="请选择分类"
+                @change="changeCate">
+                <el-option v-for="typeItem in typeList" :label="typeItem.label" :value="typeItem.value"
+                  :key="typeItem.value"></el-option>
+              </el-select>
+              <div class="detailBanner" @click="getBannerInfo(bannerYear, bannerBarCategory)"></div>
+            </div>
+            <div class="charContent">
+              <div class="chartDetail" id="chartDetailId"></div>
+            </div>
+          </div>
+        </div>
+        <div class="smallChar lineBox bottomBox" v-if="defaultInfo">
+          <div class="charBox">
+            <div class="charTitle">
+              <Title class="smallTitle" text="任务统计"></Title>
+              <el-date-picker :pickerOptions="pickerOptions" :clearable="false" size="mini" v-model="taskYear"
+                type="year" placeholder="选择年" format="yyyy" value-format="yyyy"
+                @change="getTaskInfo(taskYear)">
+              </el-date-picker>
+            </div>
+            <div class="charContent">
+              <div class="chartDetail" id="chartTaskId"></div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </transition>
     <!-- 点击地图圆圈的详情 -->
     <transition leave-active-class='animate__animated animate__bounceOutUp'
       enter-active-class="animate__animated animate__bounceInDown">
@@ -101,10 +138,60 @@
         </div>
       </div>
     </transition>
+    <!-- 点击林木虫害信息右侧放大图标 -->
+    <transition leave-active-class='animate__animated animate__bounceOutDown'
+      enter-active-class="animate__animated animate__bounceInUp">
+      <div v-if="showBanner" class="dialog bigBanner">
+        <div class="dialog_content">
+          <!-- 关闭按钮 -->
+          <div class="dialog_close" @click="initBanner"></div>
+          <div class="contentInfo">
+            <Title text="有害生物发生趋势"></Title>
+            <div class="barContent">
+              <div class="searchBox">
+                <el-date-picker :pickerOptions="pickerOptions" :clearable="false" size="mini" v-model="bannerYear"
+                  type="year" placeholder="选择年" format="yyyy" value-format="yyyy" @change="getBannerInfo(bannerYear, bannerBarCategory)">
+                </el-date-picker>
+                <el-select class="selectThem" v-model="bannerBarCategory" size="mini" placeholder="请选择分类"
+                  @change="getBannerInfo(bannerYear, bannerBarCategory)">
+                  <el-option v-for="typeItem in typeList" :label="typeItem.label" :value="typeItem.value"
+                    :key="typeItem.value"></el-option>
+                </el-select>
+              </div>
+              <div class="leftContent" v-loading="bannerLoading">
+                <div class="bannerBarBox" id="bannerBarBoxId"></div>
+                <div class="bannerBarBox bottomBar" id="bannerBarBottomId"></div>
+              </div>
+              <div class="rightContent" v-loading="bannerLoading">
+                <div class="table">
+                  <div class="item header">
+                    <div>害虫名称</div>
+                    <div>当前总数量</div>
+                    <div>发现月份</div>
+                    <div>是否新增</div>
+                  </div>
+                  <div class="item" v-for="(item, index) in bannerData.data" :key="`pest${index}`">
+                    <div :class="item.is_new ? 'orangeText' : ''">{{ item.name }}</div>
+                    <div :class="item.is_new ? 'orangeText' : ''">{{ item.num }}头</div>
+                    <div :class="item.is_new ? 'orangeText' : ''">{{ item.month }}月</div>
+                    <div :class="item.is_new ? 'orangeText' : ''">{{ item.is_new ? '是' : '否' }}</div>
+                  </div>
+                </div>
+                <div class="info">
+                  <div>总数:<span>{{ bannerData.count }}</span></div>
+                  <div>种类:<span>{{ bannerData.cg_count }}</span></div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </transition>
   </div>
 </template>
 
 <script>
+import * as echarts from 'echarts';
 import Title from './components/Title.vue';
 export default {
   name: 'newHome',
@@ -128,7 +215,7 @@ export default {
       marker8: require('../../../assets/images/newHome/8.png'),
       marker9: require('../../../assets/images/newHome/9.png'),
       marker10: require('../../../assets/images/newHome/10.png'),
-      defaultInfo: false,
+      defaultInfo: true,
       colorObject: {
         0: '#3ACD9C',
         1: '#FF5951',
@@ -170,16 +257,33 @@ export default {
       deviceInfo: [], // 设备信息
       markerObj: {
         2: [],
-        3:[],
-        4:[],
-        8:[],
-        9:[],
-        10:[],
+        3: [],
+        4: [],
+        8: [],
+        9: [],
+        10: [],
       }, //设备点位记录
       groupDialog: false, // 圈圈 设备点位 告警 共用弹框
       checkType: 'circle',
-      deviceDialogInfo:{}, //设备弹框内容
-      groupInfo: {}  // 圈圈弹框内容
+      deviceDialogInfo: {}, //设备弹框内容
+      groupInfo: {},  // 圈圈弹框内容
+      typeList: [],
+      rightLineCategory: '',// 有害生物发生趋势 下拉框
+      pestLineObj: {}, // 有害生物发生趋势 类型-》数据
+      pestChart: null, // 有害生物发生趋势 折线图
+      showBanner: false, // 有害生物发生趋势 是否放大
+      bannerBarCategory: '', // 有害生物发生趋势 放大害虫种类
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > Date.now();
+        }
+      },
+      bannerYear: new Date().getFullYear() + '',
+      bannerCountChar: null, // 新增害虫个数柱状图
+      bannerTypeChar: null, // 新增害虫种类柱状图
+      bannerLoading: true,
+      bannerData: [],
+      taskYear: new Date().getFullYear() + '', // 任务统计年份
     };
   },
   computed: {
@@ -193,8 +297,13 @@ export default {
     this.clerrTimmerFun('circle');
   },
   mounted() {
+    this.typeList = this.$store.state.pestTypeList; // 害虫分类
+    this.bannerBarCategory = this.typeList[0].value;
+    this.rightLineCategory = this.typeList[0].value;
     this.initMap();
     this.getDeviceInfo();
+    this.getPestLineInfo();
+    this.getTaskInfo(this.taskYear)
   },
   watch: {
 
@@ -244,6 +353,254 @@ export default {
         console.log(this.markerObj);
       })
     },
+    // 获取任务统计图
+    getTaskInfo(year) {
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=data_report.screen.task_count',
+        data: this.qs.stringify({
+          year
+        })
+      }).then(res => {
+        if (!res.data.data) {
+          this.$message.error('网络连接出错或服务报错,请刷新页面重试');
+          return
+        }
+        console.log(res.data.data);
+        let charData = res.data.data;
+        // let pestLineObj = {};
+        // 害虫个数
+        let taskCountChar = echarts.init(document.getElementById('chartTaskId'));
+        this.setAddBanner(taskCountChar, charData.month, [charData.month_kong, charData.month_task], ['#60B0FA', '#BFE0FE'], ['监督任务', '监测任务']);
+      })
+    },
+    // 初始化筛选框数据
+    initBanner() {
+      this.bannerYear = new Date().getFullYear() + '';
+      this.bannerBarCategory = this.typeList[0].value;
+      this.showBanner = false;
+    },
+    // 获取林木害虫的详情
+    getBannerInfo(year, category) {
+      this.showBanner = true;
+      this.bannerLoading = true;
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=data_report.screen.pest_going_up',
+        data: this.qs.stringify({
+          year,
+          category
+        })
+      }).then(res => {
+        this.bannerLoading = false;
+        if (!res.data.data) {
+          this.$message.error('网络连接出错或服务报错,请刷新页面重试');
+          return
+        }
+        console.log(res.data.data);
+        this.bannerData = res.data.data.table;
+        let charData = res.data.data.lines[0];
+        // let pestLineObj = {};
+        // 害虫个数
+        this.bannerCountChar = echarts.init(document.getElementById('bannerBarBoxId'));
+        this.setAddBanner(this.bannerCountChar, charData.month, [charData.count, charData.new_count], ['#60B0FA', '#BFE0FE'], ['害虫总数', '新增害虫数']);
+        // 害虫种类
+        this.bannerTypeChar = echarts.init(document.getElementById('bannerBarBottomId'));
+        this.setAddBanner(this.bannerTypeChar, charData.month, [charData.cg_name, charData.new_cg_name], ['#F4A72F', '#FEE0AE'], ['总害虫种类', '新增种类数']);
+      })
+    },
+    setAddBanner(char, xData, yData, colorList, nameList) {
+      let xDataNew = [];
+      xData.forEach(item => {
+        xDataNew.push(item + '月')
+      })
+      let optionsPestLine = {
+        grid: {
+          top: '50',
+          left: '2%',
+          bottom: '2%',
+          right: '0%',
+          containLabel: true
+        },
+        legend: {
+          data: [{
+            name: nameList[0],
+            textStyle: {
+              color: '#ffffff'
+            }
+          }, {
+            name: nameList[1],
+            textStyle: {
+              color: '#ffffff'
+            }
+          }]
+        },
+        tooltip: {
+          trigger: 'axis'
+        },
+        color: colorList,
+        xAxis: {
+          type: 'category',
+          axisLine: {
+            lineStyle: {
+              color: '#ffffff'  // 设置 x 轴轴线颜色为白色
+            }
+          },
+          axisLabel: {
+            color: '#ffffff'  // 设置 x 轴标签字体颜色为白色
+          },
+          splitLine: {
+            show: false  // 不显示 x 轴分隔线
+          },
+          data: xDataNew
+        },
+        yAxis: {
+          type: 'value',
+          name: '个数',
+          nameTextStyle: {
+            color: '#fff'
+          },
+          axisLine: {
+            show: false  // 不显示 y 轴轴线
+          },
+          axisLabel: {
+            color: '#ffffff'  // 设置 y 轴标签字体颜色为白色
+          },
+          splitLine: {
+            lineStyle: {
+              type: 'dotted',  // 设置分隔线为点线
+              color: '#ffffff88'
+            }
+          }
+        },
+        series: [
+          {
+            data: yData[0],
+            type: 'bar',
+            stack: 'Ad',
+            name: nameList[0]
+          },
+          {
+            data: yData[1],
+            type: 'bar',
+            stack: 'Ad',
+            name: nameList[1]
+          }
+        ]
+      }; // 有害生物发生趋势 折线图
+
+      char.setOption(optionsPestLine)
+    },
+    // 林木害虫折线图配置
+    setLineOption(char, xData, yData) {
+      let xDataNew = [];
+      xData.forEach(item => {
+        xDataNew.push(item + '月')
+      })
+      let optionsPestLine = {
+        grid: {
+          left: '0%',
+          bottom: '0%',
+          right: '0%',
+          containLabel: true
+        },
+        legend: {
+          data: [{
+            name: '害虫数量',
+            textStyle: {
+              color: '#ffffff'
+            }
+          }]
+        },
+        tooltip: {
+          trigger: 'axis'
+        },
+        color: '#1890FF',
+        xAxis: {
+          type: 'category',
+          axisLine: {
+            lineStyle: {
+              color: '#ffffff'  // 设置 x 轴轴线颜色为白色
+            }
+          },
+          axisLabel: {
+            color: '#ffffff'  // 设置 x 轴标签字体颜色为白色
+          },
+          splitLine: {
+            show: false  // 不显示 x 轴分隔线
+          },
+          data: xDataNew
+        },
+        yAxis: {
+          type: 'value',
+          name: '个数',
+          nameTextStyle: {
+            color: '#fff'
+          },
+          axisLine: {
+            show: false  // 不显示 y 轴轴线
+          },
+          axisLabel: {
+            color: '#ffffff'  // 设置 y 轴标签字体颜色为白色
+          },
+          splitLine: {
+            lineStyle: {
+              type: 'dotted',  // 设置分隔线为点线
+              color: '#ffffff88'
+            }
+          }
+        },
+        series: [
+          {
+            data: yData,
+            type: 'line',
+            smooth: true,
+            name: '害虫数量',
+            areaStyle: {
+              opacity: 0.8,
+              color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
+                {
+                  offset: 0,
+                  color: '#1890FF'
+                },
+                {
+                  offset: 1,
+                  color: '#1890FF33'
+                }
+              ])
+            }
+          }
+        ]
+      }; // 有害生物发生趋势 折线图
+
+      char.setOption(optionsPestLine)
+    },
+    // 切换有害生物下拉框
+    changeCate(type) {
+      this.setLineOption(this.pestChart, this.pestLineObj[type].month, this.pestLineObj[type].count)
+    },
+    // 获取有害生物列表折线图
+    getPestLineInfo() {
+      this.$axios({
+        method: 'POST',
+        url: '/api/api_gateway?method=data_report.screen.pest_going',
+        data: this.qs.stringify({})
+      }).then(res => {
+        if (!res.data.data) {
+          this.$message.error('网络连接出错或服务报错,请刷新页面重试');
+          return
+        }
+        this.defaultInfo = true;
+        let pestLineObj = {};
+        res.data.data.forEach(pest => {
+          pestLineObj[pest.category] = pest.data
+        })
+        this.$set(this, 'pestLineObj', pestLineObj)
+        console.log(this.pestLineObj);
+        this.pestChart = echarts.init(document.getElementById('chartDetailId'));
+        this.setLineOption(this.pestChart, pestLineObj[this.rightLineCategory].month, pestLineObj[this.rightLineCategory].count)
+      })
+    },
     // 点击某类设备,打点/取消打点
     setMarker(list, type) {
       let icon = this[`marker${type}`];
@@ -257,7 +614,7 @@ export default {
           });
           var marker = new AMap.Marker({
             position: item.lng_lat, // 设置标记点的位置
-            icon:  customIcon// 设置自定义图标的URL
+            icon: customIcon// 设置自定义图标的URL
           });
           // 将标记点添加到地图上
           marker.setMap(this.map);
@@ -500,6 +857,21 @@ export default {
   width: 100%;
   height: 100vh;
 
+  /deep/ .el-select,
+  /deep/ .el-date-editor {
+    width: 16rem;
+
+    .el-input {
+      width: 100%;
+    }
+
+    .el-input__inner {
+      background: #ffffff1a;
+      color: #ffffffcc;
+      border: none;
+    }
+  }
+
   .mapBox {
     position: absolute;
     top: 0;
@@ -523,14 +895,41 @@ export default {
     .charBox {
       position: relative;
       overflow: hidden;
+      width: 100%;
 
       .charTitle {
         position: relative;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        width: 100%;
+
+        .smallTitle {
+          width: 50%;
+        }
+
+        .detailBanner {
+          width: 2.4rem;
+          height: 2.4rem;
+          background: url('./../.././../assets/images/newHome/detailBtn.png') center center no-repeat;
+          background-size: 100% 100%;
+          cursor: pointer;
+
+          &:hover {
+            background: url('./../.././../assets/images/newHome/detailBtnHover.png') center center no-repeat;
+            background-size: 100% 100%;
+          }
+        }
       }
 
       .charContent {
         margin-top: 1rem;
 
+        .chartDetail {
+          width: 100%;
+          height: 19.8vh;
+        }
+
         .charList {
           display: flex;
           justify-content: space-between;
@@ -568,6 +967,15 @@ export default {
     }
   }
 
+  .lineBox {
+    right: 6.2vw;
+    left: auto;
+  }
+
+  .bottomBox {
+    top: 46.5vh;
+  }
+
   .dialog {
     position: absolute;
     top: 12.72vh;
@@ -584,11 +992,12 @@ export default {
       width: 100%;
       height: 100%;
       box-sizing: border-box;
+      padding-top: 3.7vh;
 
       .contentInfo {
         width: 90%;
         height: 100%;
-        margin: 4% auto 0 auto;
+        margin: 0 auto;
 
         .title {
           font-weight: 600;
@@ -640,7 +1049,8 @@ export default {
             }
           }
         }
-        .deviceInfo{
+
+        .deviceInfo {
           display: flex;
           align-items: center;
           height: 3.7vh;
@@ -648,12 +1058,14 @@ export default {
           color: #ffffffcc;
           font-size: 1.4rem;
           border-bottom: 1px solid #ffffff4d;
-          .leftInfo{
+
+          .leftInfo {
             display: flex;
             width: 50%;
             height: 100%;
             align-items: center;
-            img{
+
+            img {
               width: 2rem;
               height: 2rem;
               margin-right: 1rem;
@@ -665,8 +1077,8 @@ export default {
 
     &_close {
       position: absolute;
-      right: 2rem;
-      top: 0;
+      right: 1.85vw;
+      top: 3vh;
       z-index: 201;
       width: 4.8rem;
       height: 4.8rem;
@@ -680,5 +1092,110 @@ export default {
       }
     }
   }
+
+  .bigBanner {
+    position: absolute;
+    width: 87.3vw;
+    height: 78vh;
+    left: 6vw;
+    background: url('../../../assets/images/newHome/bigBanner.png') center center no-repeat;
+    background-size: 100% 100%;
+
+    .contentInfo {
+      width: 100%;
+      box-sizing: border-box;
+      padding: 0 3.125vw 9.4vh 3.125vw;
+      overflow: hidden;
+
+      .searchBox {
+        display: flex;
+        align-items: center;
+        margin: 1rem 0;
+
+        .el-select {
+          margin-left: 1rem;
+        }
+      }
+
+      .leftContent {
+        width: 51vw;
+        float: left;
+
+        .bannerBarBox {
+          width: 100%;
+          border-radius: 2px;
+          height: 28.38vh;
+          background: #ffffff1a;
+        }
+
+        .bottomBar {
+          margin-top: 2.4vh;
+        }
+      }
+
+      .rightContent {
+        float: left;
+        width: 27.76vw;
+        height: 59.16vh;
+        margin-left: 1.77vw;
+        border-radius: 2px;
+        background: #ffffff1a;
+        box-sizing: border-box;
+        padding-top: 5vh;
+
+        .table {
+          height: 42.5vh;
+          overflow: auto;
+          width: 95%;
+          margin: 0 auto;
+
+          .item {
+            display: flex;
+            align-items: center;
+            justify-content: space-between;
+            color: #fff;
+            font-size: 1.4rem;
+
+            &:nth-child(even) {
+              background: #ffffff14;
+              /* 设置奇数列的背景颜色 */
+            }
+
+            div {
+              width: 25%;
+              box-sizing: border-box;
+              padding: 1vh;
+              text-align: center;
+            }
+
+            .orangeText {
+              color: #F4A72F;
+            }
+          }
+
+          .header {
+            color: #33CCCC;
+          }
+        }
+
+        .info {
+          float: right;
+          display: flex;
+          font-size: 1.6rem;
+          padding-right: 2.5%;
+
+          div {
+            color: #ffffff80;
+            margin-left: 1rem;
+
+            span {
+              color: #fff;
+              font-size: 2.5rem;
+            }
+          }
+        }
+      }
+    }
+  }
 }
 </style>

+ 2 - 12
minggao/src/page/recordForm/harmfulRecord.vue

@@ -171,18 +171,7 @@ export default {
       pestLibrary: [], //害虫名称列表
       dialogVisible: false,
       dialogSubmitLoading: false,
-      typeList: [{
-        label: '林木害虫',
-        value: '林木害虫',
-      },
-      {
-        label: '实蝇',
-        value: '实蝇',
-      },
-      {
-        label: '外来有害杂草',
-        value: '外来有害杂草',
-      }],
+      typeList: [],
       uploadForm: {
         category: '',
         file: null
@@ -465,6 +454,7 @@ export default {
   beforeMount() { }, //生命周期 - 挂载之前
   //生命周期 - 挂载完成(可以访问DOM元素)
   mounted() {
+    this.typeList = this.$store.state.pestTypeList;
     this.getOrganizationList();
     this.getDataList();
   },

+ 2 - 12
minggao/src/page/warning/warninglist.vue

@@ -117,18 +117,7 @@ export default {
       dataList: [],
       loading: true,
       total: 0,
-      typeList: [{
-        label: '林木害虫',
-        value: '林木害虫',
-      },
-      {
-        label: '实蝇',
-        value: '实蝇',
-      },
-      {
-        label: '外来有害杂草',
-        value: '外来有害杂草',
-      }],
+      typeList: [],
       lavalList: [{
         label: 'Ⅰ级(红)',
         value: '1',
@@ -200,6 +189,7 @@ export default {
 
   },
   mounted() {
+    this.typeList = this.$store.state.pestTypeList;
     this.getOrganizationList();
     this.getDataList();
   },

+ 13 - 1
minggao/src/store/store.js

@@ -34,7 +34,19 @@ const store = new Vuex.Store({
     selfRoomInfo: null,
     pendingVideoConnect: false,
     isVideoTalking: false,
-    isVideoCallRefused: false
+    isVideoCallRefused: false,
+    pestTypeList: [{
+      label: '林木害虫',
+      value: '林木害虫',
+    },
+    {
+      label: '实蝇',
+      value: '实蝇',
+    },
+    {
+      label: '外来有害杂草',
+      value: '外来有害杂草',
+    }], // 林木害虫类别分类
   },
   getters: {
     btnRight(state) {

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

@@ -1,3 +1,10 @@
+/*
+ * @Description:
+ * @Autor: lin
+ * @Date: 2023-06-05 08:51:07
+ * @LastEditors: lin
+ * @LastEditTime: 2024-04-15 09:21:51
+ */
 import axios from 'axios';
 import { DOMIN, mapJson, wsUrl } from './server.js';
 import router from '@/router';
@@ -14,7 +21,7 @@ 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.timeout = 120000;
 axios.defaults.withCredentials = true; //axios请求时携带session
 axios.defaults.crossDomain = true;
 axios.defaults.baseURL = DOMIN;