# 调整下载超时
This commit is contained in:
parent
392ad2a2b0
commit
b2ac5951f2
|
@ -11,6 +11,7 @@ export function fetchDeviceList(query) {
|
|||
|
||||
// device log list api
|
||||
export function fetchDeviceLogs(query) {
|
||||
request.defaults.timeout = 5000 * 6
|
||||
return request({
|
||||
url: '/api/counter/logs/',
|
||||
method: 'get',
|
||||
|
@ -18,6 +19,9 @@ export function fetchDeviceLogs(query) {
|
|||
})
|
||||
}
|
||||
|
||||
// reset timeout
|
||||
request.defaults.timeout = 5000
|
||||
|
||||
// device logs history api
|
||||
export function fetchDeviceLogsHistory(query) {
|
||||
return request({
|
||||
|
|
|
@ -6,7 +6,7 @@ import { getToken } from '@/utils/auth'
|
|||
// create an axios instance
|
||||
const service = axios.create({
|
||||
baseURL: process.env.BASE_API, // api的base_url
|
||||
timeout: 5000 * 2 // request timeout
|
||||
timeout: 5000 // request timeout
|
||||
})
|
||||
|
||||
// request interceptor
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="filter-container">
|
||||
<el-input @keyup.enter.native="handleFilter" size="small" style="width: 220px;" class="filter-item" :placeholder="$t('counter.logSeachContent')" v-model="logsListQuery.device">
|
||||
<el-input
|
||||
@keyup.enter.native="handleFilter"
|
||||
@keyup.esc.native="handleEsc"
|
||||
size="small" style="width: 220px;"
|
||||
class="filter-item"
|
||||
:placeholder="$t('counter.logSeachContent')" v-model="logsListQuery.device">
|
||||
</el-input>
|
||||
<div class="date-selector filter-item">
|
||||
<el-date-picker
|
||||
|
@ -141,6 +146,11 @@ export default {
|
|||
this.logsListQuery.page = 1
|
||||
this.getDeviceLogs(this.logsListQuery)
|
||||
},
|
||||
handleEsc() {
|
||||
this.logsListQuery.page = 1
|
||||
this.logsListQuery.device = undefined
|
||||
this.getDeviceLogs(this.logsListQuery)
|
||||
},
|
||||
handleDateSelect(value) {
|
||||
if (value === null) {
|
||||
this.logsListQuery.start = undefined
|
||||
|
|
Loading…
Reference in New Issue