Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
c5efa399
Commit
c5efa399
authored
Sep 06, 2024
by
周宏民
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改集成登录配置获取 不到数据的问题
parent
95e6307f
Pipeline
#92420
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
22 deletions
+47
-22
Master.js
src/pages/integratedLogin/components/Master.js
+1
-1
index.js
src/pages/integratedLogin/index.js
+46
-21
No files found.
src/pages/integratedLogin/components/Master.js
View file @
c5efa399
...
...
@@ -156,7 +156,7 @@ const Master = props => {
.then(res => {
if (res.code === 0) {
onCancel();
callBackSubmit();
callBackSubmit(
obj
);
notification.success({
message: '
提示
',
duration: 3,
...
...
src/pages/integratedLogin/index.js
View file @
c5efa399
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Tooltip
,
Spin
,
Modal
,
Input
,
Space
,
Button
,
Popconfirm
,
Table
,
Image
,
Tag
,
message
,
Popover
}
from
'antd'
;
import
{
appService
}
from
'@/api'
;
import
{
SaveIntegrationIndex
}
from
'@/api/service/base'
;
...
...
@@ -21,6 +21,7 @@ const path = require('path');
const
IntegratedLogin
=
props
=>
{
let
isPanda
=
props
.
params
?.
isPanda
||
'false'
;
isPanda
=
isPanda
===
'true'
;
const
configSetting
=
useRef
({});
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
tableData
,
setTableData
]
=
useState
([]);
const
[
showSearchStyle
,
setShowSearchStyle
]
=
useState
(
false
);
// 是否显示模糊查询样式
...
...
@@ -205,7 +206,7 @@ const IntegratedLogin = props => {
id
:
e
.
id
,
})
.
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
=
0
)
{
getData
();
message
.
success
(
'设置成功'
);
}
else
{
...
...
@@ -227,24 +228,28 @@ const IntegratedLogin = props => {
const
getData
=
()
=>
{
setLoading
(
true
);
appService
.
GetIntegrationConfig
().
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
const
_allName
=
[];
const
_groupList
=
[];
appService
.
GetIntegrationConfig
({
client
:
configSetting
.
current
?.
client
||
'city'
,
})
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
const
_allName
=
[];
const
_groupList
=
[];
res
.
data
.
forEach
(
item
=>
{
const
_name
=
item
.
name
;
_allName
.
push
(
_name
);
_groupList
.
push
({
value
:
_name
,
label
:
_name
});
});
setGroupList
(
_groupList
);
setKeepSystemName
(
_allName
);
setTableData
(
res
.
data
.
sort
((
a
,
b
)
=>
a
.
index
-
b
.
index
));
}
else
{
res
.
msg
&&
message
.
error
(
res
.
msg
);
}
});
res
.
data
.
forEach
(
item
=>
{
const
_name
=
item
.
name
;
_allName
.
push
(
_name
);
_groupList
.
push
({
value
:
_name
,
label
:
_name
});
});
setGroupList
(
_groupList
);
setKeepSystemName
(
_allName
);
setTableData
(
res
.
data
.
sort
((
a
,
b
)
=>
a
.
index
-
b
.
index
));
}
else
{
res
.
msg
&&
message
.
error
(
res
.
msg
);
}
});
};
const
add
=
e
=>
{
...
...
@@ -350,8 +355,22 @@ const IntegratedLogin = props => {
const
handleMenuClick
=
e
=>
{
add
(
e
.
key
);
};
const
onMasterBack
=
data
=>
{
if
(
data
)
configSetting
.
current
=
data
;
};
const
getConfig
=
()
=>
{
appService
.
GetIntegratedloginSetting
()
.
then
(
res
=>
{
configSetting
.
current
=
res
.
data
||
{};
getData
();
})
.
catch
(
err
=>
{
getData
();
});
};
useEffect
(()
=>
{
get
Data
();
get
Config
();
},
[]);
return
(
<
div
className
=
{
styles
.
Integrate
}
>
...
...
@@ -439,7 +458,13 @@ const IntegratedLogin = props => {
''
)}
{
masterVisible
?
(
<
Master
visible
=
{
masterVisible
}
onCancel
=
{()
=>
setMasterVisible
(
false
)}
type
=
{
type
}
isPanda
=
{
isPanda
}
/
>
<
Master
visible
=
{
masterVisible
}
onCancel
=
{()
=>
setMasterVisible
(
false
)}
type
=
{
type
}
isPanda
=
{
isPanda
}
callBackSubmit
=
{
onMasterBack
}
/
>
)
:
(
''
)}
...
...
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