Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4c6832e2
authored
Dec 26, 2022
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
优化
1 parent
53b5ad63
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
4 deletions
src/Request/PublicAxiosInstance.js
src/views/equipmentDataRetransmission/equipmentDataRetransmission.vue
src/Request/PublicAxiosInstance.js
View file @
4c6832e
...
...
@@ -7,14 +7,14 @@ import {ElMessage} from 'element-plus'
let
baseURL
=
[
'localhost'
,
'192.168.1.28'
].
includes
(
window
.
location
.
hostname
)
?
''
:
window
.
_baseUrl
const
axiosInstance
=
axios
.
create
(
{
baseURL
:
baseURL
baseURL
:
baseURL
,
timeout
:
10000
}
)
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
config
=>
{
// Cookies.set('atoken','a2393446-3372-45ea-8ee3-0a45140855cf
')
Cookies
.
set
(
'atoken'
,
'9b478c52-37e2-451e-8b71-5338f0b0f0e3
'
)
if
(
!
Cookies
.
get
(
'atoken'
)){
ElMessage
({
message
:
`登录过期,请重新登录`
,
...
...
src/views/equipmentDataRetransmission/equipmentDataRetransmission.vue
View file @
4c6832e
...
...
@@ -61,6 +61,7 @@
const
accountList
=
ref
([])
const
plazaList
=
ref
([])
const
deviceList
=
ref
([])
const
isLoading
=
ref
(
false
)
const
columns
=
ref
([
{
title
:
'序号'
,
...
...
@@ -159,6 +160,7 @@
}
api
.
getDeviceList
(
data
).
then
(
(
r
)
=>
{
isLoading
.
value
=
false
if
(
isArray
(
r
))
{
for
(
var
i
=
0
;
i
<
r
.
length
;
i
++
)
{
...
...
@@ -174,6 +176,7 @@
const
confirmSearch
=
function
(){
queryForm
.
device_id
=
[]
deviceList
.
value
=
[]
isLoading
.
value
=
true
getDevice
()
}
const
implement
=
function
(){
...
...
@@ -193,8 +196,23 @@
startTime
:
moment
(
queryForm
.
date
).
format
(
'YYYY-MM-DD'
)
+
' '
+
moment
(
queryForm
.
startTime
).
format
(
'HH:mm:ss'
),
endTime
:
moment
(
queryForm
.
date
).
format
(
'YYYY-MM-DD'
)
+
' '
+
moment
(
queryForm
.
endTime
).
format
(
'HH:mm:ss'
),
}
isLoading
.
value
=
true
api
.
getResultresend
(
parmas
).
then
(
(
r
)
=>
{
console
.
log
(
r
)
isLoading
.
value
=
false
if
(
r
&&
r
.
success
){
item
.
retransmission
=
'重传成功'
api
.
getReboot
({
ip
:
item
.
localIp
}).
then
(
(
r
)
=>
{
if
(
r
&&
r
.
success
){
item
.
restart
=
'重启成功'
}
else
{
item
.
restart
=
'重启失败'
}
console
.
log
(
deviceList
.
value
)
}
)
}
else
{
item
.
retransmission
=
'重传失败'
}
}
)
}
...
...
@@ -212,6 +230,7 @@
accountList
,
plazaList
,
columns
,
isLoading
,
queryForm
,
onAccountChange
,
confirmSearch
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment