wenhongquan 1 year ago
parent
commit
623ed32321
3 changed files with 9 additions and 9 deletions
  1. 2 2
      src/utils/request.js
  2. 3 3
      src/views/qdtl/incident/index.vue
  3. 4 4
      vue.config.js

+ 2 - 2
src/utils/request.js

@@ -17,7 +17,7 @@ const service = axios.create({
     // axios中请求配置有baseURL选项,表示请求URL公共部分
     baseURL: process.env.VUE_APP_BASE_API,
     // 超时
-    timeout: 10000
+    timeout: 100000
 })
 
 // request拦截器
@@ -180,4 +180,4 @@ export function downloadGet(url, params, filename) {
     })
 }
 
-export default service
+export default service

+ 3 - 3
src/views/qdtl/incident/index.vue

@@ -298,7 +298,7 @@ export default {
   methods: {
     getincidentExport() {
       var beginTime = this.value1[0] + " 00:00:00";
-      var endTime = this.value1[1] + " 24:00:00";
+      var endTime = this.value1[1] + " 23:59:59";
       let days = (new Date(endTime) - new Date(beginTime)) / 1000 / 60 / 60 / 24
       console.log(days);
       var obj = {
@@ -306,13 +306,13 @@ export default {
         endTime: endTime
       }
       console.log(obj)
-      if (days < 60) {
+      if (days < 366) {
         this.download('/qdtl/incident/export', obj, `location_${new Date().getTime()}.xlsx`)
         getincidentExport(this.queryParams).then(response => {
           // console.log(response);
         })
       }else{
-        this.$modal.msgError("时间跨度不得超过两月");
+        this.$modal.msgError("时间跨度不得超过1年");
       }
     },
     selectImg(index) {

+ 4 - 4
vue.config.js

@@ -38,16 +38,16 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://58.221.168.61:9000/api`,
-        // target: `http://localhost:8080/`,
+        // target: `http://58.221.168.61:9000/api`,
+        target: `http://localhost:8080/`,
         changeOrigin: true,
         pathRewrite: {
           ["^" + process.env.VUE_APP_BASE_API]: "",
         },
       },
       "/openUrl": {
-        target: `http://58.221.168.61:9000/openUrl`,
-        // target: `http://localhost:8080/`,
+        // target: `http://58.221.168.61:9000/openUrl`,
+        target: `http://localhost:8080/`,
         changeOrigin: true,
         pathRewrite: {
           ["^/openUrl"]: "",