Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
seeta-device
/
deviceManage
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fc27b493
authored
Sep 27, 2021
by
温丽香
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录过期跳转到登录页
1 parent
6afe77a7
Pipeline
#4725
passed
in 2 minutes 11 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
src/http.ts
src/views/DataList/index.vue
src/views/ParamsModel/index.vue
src/http.ts
View file @
fc27b49
...
@@ -62,6 +62,9 @@ Axios.interceptors.response.use(res => {
...
@@ -62,6 +62,9 @@ Axios.interceptors.response.use(res => {
if
(
res
&&
res
.
data
&&
res
.
data
.
code
!==
0
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
code
!==
0
)
{
notificationError
(
'提示'
,
res
.
data
.
msg
)
notificationError
(
'提示'
,
res
.
data
.
msg
)
}
}
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
22
&&
res
.
data
.
msg
===
'user do not login'
)
{
Router
.
push
(
'/login'
)
}
return
res
return
res
},
error
=>
{
},
error
=>
{
error
.
response
&&
error
.
response
.
data
&&
notificationError
(
'提示'
,
error
.
response
.
data
.
message
)
error
.
response
&&
error
.
response
.
data
&&
notificationError
(
'提示'
,
error
.
response
.
data
.
message
)
...
...
src/views/DataList/index.vue
View file @
fc27b49
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<st-button
type=
"primary"
id=
"btn"
@
click=
"showDialog = true"
>
<st-button
type=
"primary"
id=
"btn"
@
click=
"showDialog = true"
>
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'创建数据表'
}}
</span></st-button>
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'创建数据表'
}}
</span></st-button>
<div
class=
"search"
>
<div
class=
"search"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"inputVal"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"inputVal"
@
input=
"getData"
>
<i
class=
"el-input__icon el-icon-search"
></i>
<i
class=
"el-input__icon el-icon-search"
></i>
</div>
</div>
</div>
</div>
...
@@ -129,7 +129,7 @@ export default {
...
@@ -129,7 +129,7 @@ export default {
methods
:
{
methods
:
{
async
getData
()
{
async
getData
()
{
this
.
loadingStatus
=
true
this
.
loadingStatus
=
true
const
res
=
await
getTable
({
pages
:
this
.
currentPage
-
1
,
pagesize
:
this
.
currentSize
})
const
res
=
await
getTable
({
pages
:
this
.
currentPage
-
1
,
pagesize
:
this
.
currentSize
,
name
:
this
.
inputVal
})
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
0
)
{
if
(
res
&&
res
.
data
&&
res
.
data
.
code
===
0
)
{
this
.
tokenList
=
res
.
data
.
data
.
tables
.
map
((
item
,
index
)
=>
{
this
.
tokenList
=
res
.
data
.
data
.
tables
.
map
((
item
,
index
)
=>
{
item
.
order
=
index
+
1
+
(
this
.
currentPage
-
1
)
*
this
.
currentSize
item
.
order
=
index
+
1
+
(
this
.
currentPage
-
1
)
*
this
.
currentSize
...
...
src/views/ParamsModel/index.vue
View file @
fc27b49
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<st-button
type=
"primary"
@
click=
"$router.push(
{ path: '/params/add', query: { level: 1 } })">
<st-button
type=
"primary"
@
click=
"$router.push(
{ path: '/params/add', query: { level: 1 } })">
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'添加'
}}
</span></st-button>
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'添加'
}}
</span></st-button>
<div
class=
"search"
>
<div
class=
"search"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"oneVal"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"oneVal"
@
input=
"getOneData"
>
<i
class=
"el-input__icon el-icon-search"
></i>
<i
class=
"el-input__icon el-icon-search"
></i>
</div>
</div>
</div>
</div>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
<st-button
type=
"primary"
@
click=
"$router.push(
{ path: '/params/add', query: { level: 2 } })">
<st-button
type=
"primary"
@
click=
"$router.push(
{ path: '/params/add', query: { level: 2 } })">
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'添加'
}}
</span></st-button>
<i
class=
"iconfont icon-tianjia"
></i><span
class=
"text"
>
{{
'添加'
}}
</span></st-button>
<div
class=
"search"
>
<div
class=
"search"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"twoVal"
>
<input
type=
"text"
class=
"search-input"
placeholder=
"请输入搜索内容"
v-model=
"twoVal"
@
input=
"getTwoData"
>
<i
class=
"el-input__icon el-icon-search"
></i>
<i
class=
"el-input__icon el-icon-search"
></i>
</div>
</div>
</div>
</div>
...
@@ -130,7 +130,7 @@ export default {
...
@@ -130,7 +130,7 @@ export default {
methods
:
{
methods
:
{
async
getOneData
()
{
async
getOneData
()
{
this
.
loadingOne
=
true
this
.
loadingOne
=
true
const
oneLevel
=
await
getParameter
({
base
:
1
,
pages
:
this
.
oneCurrentPage
-
1
,
pagesize
:
10
})
const
oneLevel
=
await
getParameter
({
base
:
1
,
pages
:
this
.
oneCurrentPage
-
1
,
pagesize
:
10
,
name
:
this
.
oneVal
})
if
(
oneLevel
&&
oneLevel
.
data
&&
oneLevel
.
data
.
code
===
0
)
{
if
(
oneLevel
&&
oneLevel
.
data
&&
oneLevel
.
data
.
code
===
0
)
{
this
.
oneList
=
oneLevel
.
data
.
parameters
.
datas
.
map
((
item
,
index
)
=>
{
this
.
oneList
=
oneLevel
.
data
.
parameters
.
datas
.
map
((
item
,
index
)
=>
{
item
.
order
=
index
+
1
+
(
this
.
oneCurrentPage
-
1
)
*
10
item
.
order
=
index
+
1
+
(
this
.
oneCurrentPage
-
1
)
*
10
...
@@ -142,7 +142,7 @@ export default {
...
@@ -142,7 +142,7 @@ export default {
},
},
async
getTwoData
()
{
async
getTwoData
()
{
this
.
loadingTwo
=
true
this
.
loadingTwo
=
true
const
twoLevel
=
await
getParameter
({
parent
:
this
.
parentLevel
===
''
?
0
:
this
.
parentLevel
,
pages
:
this
.
twoCurrentPage
-
1
,
pagesize
:
10
})
const
twoLevel
=
await
getParameter
({
parent
:
this
.
parentLevel
===
''
?
0
:
this
.
parentLevel
,
pages
:
this
.
twoCurrentPage
-
1
,
pagesize
:
10
,
name
:
this
.
twoVal
})
if
(
twoLevel
&&
twoLevel
.
data
&&
twoLevel
.
data
.
code
===
0
)
{
if
(
twoLevel
&&
twoLevel
.
data
&&
twoLevel
.
data
.
code
===
0
)
{
this
.
twoList
=
twoLevel
.
data
.
parameters
.
datas
.
map
((
item
,
index
)
=>
{
this
.
twoList
=
twoLevel
.
data
.
parameters
.
datas
.
map
((
item
,
index
)
=>
{
item
.
order
=
index
+
1
+
(
this
.
twoCurrentPage
-
1
)
*
10
item
.
order
=
index
+
1
+
(
this
.
twoCurrentPage
-
1
)
*
10
...
...
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