Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
74ba681f
Commit
74ba681f
authored
Nov 15, 2022
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复回显数据字典数组异常问题(I60UYQ)
parent
8f2b3ac4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
32 deletions
+16
-32
ruoyi-ui/src/utils/request.js
ruoyi-ui/src/utils/request.js
+11
-30
ruoyi-ui/src/utils/ruoyi.js
ruoyi-ui/src/utils/ruoyi.js
+5
-2
No files found.
ruoyi-ui/src/utils/request.js
View file @
74ba681f
...
...
@@ -78,37 +78,24 @@ service.interceptors.response.use(res => {
if
(
code
===
401
)
{
if
(
!
isRelogin
.
show
)
{
isRelogin
.
show
=
true
;
MessageBox
.
confirm
(
'
登录状态已过期,您可以继续留在该页面,或者重新登录
'
,
'
系统提示
'
,
{
confirmButtonText
:
'
重新登录
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}
).
then
(()
=>
{
isRelogin
.
show
=
false
;
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
location
.
href
=
'
/index
'
;
})
MessageBox
.
confirm
(
'
登录状态已过期,您可以继续留在该页面,或者重新登录
'
,
'
系统提示
'
,
{
confirmButtonText
:
'
重新登录
'
,
cancelButtonText
:
'
取消
'
,
type
:
'
warning
'
}).
then
(()
=>
{
isRelogin
.
show
=
false
;
store
.
dispatch
(
'
LogOut
'
).
then
(()
=>
{
location
.
href
=
'
/index
'
;
})
}).
catch
(()
=>
{
isRelogin
.
show
=
false
;
});
}
return
Promise
.
reject
(
'
无效的会话,或者会话已过期,请重新登录。
'
)
}
else
if
(
code
===
500
)
{
Message
({
message
:
msg
,
type
:
'
error
'
})
Message
({
message
:
msg
,
type
:
'
error
'
})
return
Promise
.
reject
(
new
Error
(
msg
))
}
else
if
(
code
===
601
)
{
Message
({
message
:
msg
,
type
:
'
warning
'
})
Message
({
message
:
msg
,
type
:
'
warning
'
})
return
Promise
.
reject
(
'
error
'
)
}
else
if
(
code
!==
200
)
{
Notification
.
error
({
title
:
msg
})
Notification
.
error
({
title
:
msg
})
return
Promise
.
reject
(
'
error
'
)
}
else
{
return
res
.
data
...
...
@@ -119,18 +106,12 @@ service.interceptors.response.use(res => {
let
{
message
}
=
error
;
if
(
message
==
"
Network Error
"
)
{
message
=
"
后端接口连接异常
"
;
}
else
if
(
message
.
includes
(
"
timeout
"
))
{
}
else
if
(
message
.
includes
(
"
timeout
"
))
{
message
=
"
系统接口请求超时
"
;
}
else
if
(
message
.
includes
(
"
Request failed with status code
"
))
{
}
else
if
(
message
.
includes
(
"
Request failed with status code
"
))
{
message
=
"
系统接口
"
+
message
.
substr
(
message
.
length
-
3
)
+
"
异常
"
;
}
Message
({
message
:
message
,
type
:
'
error
'
,
duration
:
5
*
1000
})
Message
({
message
:
message
,
type
:
'
error
'
,
duration
:
5
*
1000
})
return
Promise
.
reject
(
error
)
}
)
...
...
ruoyi-ui/src/utils/ruoyi.js
View file @
74ba681f
...
...
@@ -86,11 +86,14 @@ export function selectDictLabel(datas, value) {
return
actions
.
join
(
''
);
}
// 回显数据字典(字符串数组)
// 回显数据字典(字符串
、
数组)
export
function
selectDictLabels
(
datas
,
value
,
separator
)
{
if
(
value
===
undefined
)
{
if
(
value
===
undefined
||
value
.
length
===
0
)
{
return
""
;
}
if
(
Array
.
isArray
(
value
))
{
value
=
value
.
join
(
"
,
"
);
}
var
actions
=
[];
var
currentSeparator
=
undefined
===
separator
?
"
,
"
:
separator
;
var
temp
=
value
.
split
(
currentSeparator
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment