Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
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
CivManage
Commits
59262a79
Commit
59262a79
authored
Sep 27, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修复集成登录无法提交bug'
parent
28a5aebf
Pipeline
#61088
passed with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
122 additions
and
122 deletions
+122
-122
AddModal.jsx
src/pages/platformCenter/integratedLogin/AddModal.jsx
+122
-122
No files found.
src/pages/platformCenter/integratedLogin/AddModal.jsx
View file @
59262a79
...
...
@@ -233,128 +233,128 @@ const AddModal = props => {
};
// 提交
const
onSubmit
=
()
=>
{
console
.
log
(
form
.
getFieldsValue
().
siteDescription
);
console
.
log
(
form
.
getFieldsValue
().
siteDescription
.
textContent
);
//
form.validateFields().then(validate => {
//
if (validate) {
//
setLoading(true);
//
let obj = form.getFieldsValue();
//
console.log(obj.siteDescription);
//
if (obj.internetAddress || obj.intranetAddress) {
//
if (obj.accountParamValue == '熊猫ticket') {
//
obj.accountParamValue = 1;
//
} else if (obj.accountParamValue == '熊猫token') {
//
obj.accountParamValue = 2;
//
}
//
let aa = { key: obj.accountParamKey, value: obj.accountParamValue };
//
let bb = [];
//
bb.push(aa);
//
if (obj.iconUrl.file) {
//
obj.iconUrl = obj.iconUrl.file.response.data;
//
}
//
let data = [];
//
if (obj.coordinate) {
//
data = obj.coordinate.split(',');
//
}
//
let dataList = [];
//
if (fileList.length > 0) {
//
fileList.map(i => {
//
if (i.submitUrl) {
//
dataList.push(i.submitUrl);
//
} else {
//
dataList.push(i.response.data);
//
}
//
});
//
}
//
if (type === 'add') {
//
AddIntegratedLogin({
//
systemName: obj.systemName,
//
subtitle: obj.subtitle,
//
internetAddress: obj.internetAddress,
//
intranetAddress: obj.intranetAddress,
//
accountParam: bb,
//
iconUrl: obj.iconUrl,
//
accountType: 'Panda',
//
isHide: false,
//
target: obj.target,
//
isMaster: obj.isMaster,
//
images: dataList,
//
mapSetting: obj.mapSetting,
//
coordinate: data,
//
siteDescription: obj.siteDescription,
//
})
//
.then(res => {
//
if (res.code === 0) {
//
onCancel();
//
setLoading(false);
//
callBackSubmit();
//
notification.success({
//
message: '提示',
//
duration: 3,
//
description: res.msg || '新增成功',
//
});
//
} else {
//
setLoading(false);
//
notification.error({
//
message: '提示',
//
duration: 3,
//
description: res.msg || '新增失败',
//
});
//
}
//
})
//
.catch(err => {
//
setLoading(false);
//
});
//
} else {
//
EditIntegratedLogin({
//
systemName: obj.systemName,
//
subtitle: obj.subtitle,
//
internetAddress: obj.internetAddress,
//
intranetAddress: obj.intranetAddress,
//
accountParam: bb,
//
iconUrl: obj.iconUrl,
//
accountType: 'Panda',
//
target: obj.target,
//
isMaster: obj.isMaster,
//
images: dataList,
//
clients: pickItem.clients,
//
isHide: pickItem.isHide,
//
mapSetting: obj.mapSetting,
//
coordinate: data,
//
siteDescription: obj.siteDescription,
//
})
//
.then(res => {
//
if (res.code === 0) {
//
onCancel();
//
setLoading(false);
//
callBackSubmit();
//
notification.success({
//
message: '提示',
//
duration: 3,
//
description: res.msg || '编辑成功',
//
});
//
} else {
//
setLoading(false);
//
notification.error({
//
message: '提示',
//
duration: 3,
//
description: res.msg || '编辑失败',
//
});
//
}
//
})
//
.catch(err => {
//
setLoading(false);
//
});
//
}
//
} else {
//
notification.warning({
//
message: '提示',
//
duration: 3,
//
description: '内网地址或外网地址必须填写一项',
//
});
//
}
//
}
//
});
//
console.log(form.getFieldsValue().siteDescription);
//
console.log(form.getFieldsValue().siteDescription.textContent);
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
setLoading
(
true
);
let
obj
=
form
.
getFieldsValue
();
console
.
log
(
obj
.
siteDescription
);
if
(
obj
.
internetAddress
||
obj
.
intranetAddress
)
{
if
(
obj
.
accountParamValue
==
'熊猫ticket'
)
{
obj
.
accountParamValue
=
1
;
}
else
if
(
obj
.
accountParamValue
==
'熊猫token'
)
{
obj
.
accountParamValue
=
2
;
}
let
aa
=
{
key
:
obj
.
accountParamKey
,
value
:
obj
.
accountParamValue
};
let
bb
=
[];
bb
.
push
(
aa
);
if
(
obj
.
iconUrl
.
file
)
{
obj
.
iconUrl
=
obj
.
iconUrl
.
file
.
response
.
data
;
}
let
data
=
[];
if
(
obj
.
coordinate
)
{
data
=
obj
.
coordinate
.
split
(
','
);
}
let
dataList
=
[];
if
(
fileList
.
length
>
0
)
{
fileList
.
map
(
i
=>
{
if
(
i
.
submitUrl
)
{
dataList
.
push
(
i
.
submitUrl
);
}
else
{
dataList
.
push
(
i
.
response
.
data
);
}
});
}
if
(
type
===
'add'
)
{
AddIntegratedLogin
({
systemName
:
obj
.
systemName
,
subtitle
:
obj
.
subtitle
,
internetAddress
:
obj
.
internetAddress
,
intranetAddress
:
obj
.
intranetAddress
,
accountParam
:
bb
,
iconUrl
:
obj
.
iconUrl
,
accountType
:
'Panda'
,
isHide
:
false
,
target
:
obj
.
target
,
isMaster
:
obj
.
isMaster
,
images
:
dataList
,
mapSetting
:
obj
.
mapSetting
,
coordinate
:
data
,
siteDescription
:
obj
.
siteDescription
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
onCancel
();
setLoading
(
false
);
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'新增成功'
,
});
}
else
{
setLoading
(
false
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'新增失败'
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
});
}
else
{
EditIntegratedLogin
({
systemName
:
obj
.
systemName
,
subtitle
:
obj
.
subtitle
,
internetAddress
:
obj
.
internetAddress
,
intranetAddress
:
obj
.
intranetAddress
,
accountParam
:
bb
,
iconUrl
:
obj
.
iconUrl
,
accountType
:
'Panda'
,
target
:
obj
.
target
,
isMaster
:
obj
.
isMaster
,
images
:
dataList
,
clients
:
pickItem
.
clients
,
isHide
:
pickItem
.
isHide
,
mapSetting
:
obj
.
mapSetting
,
coordinate
:
data
,
siteDescription
:
obj
.
siteDescription
,
})
.
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
onCancel
();
setLoading
(
false
);
callBackSubmit
();
notification
.
success
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑成功'
,
});
}
else
{
setLoading
(
false
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
res
.
msg
||
'编辑失败'
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
});
}
}
else
{
notification
.
warning
({
message
:
'提示'
,
duration
:
3
,
description
:
'内网地址或外网地址必须填写一项'
,
});
}
}
});
};
const
layout
=
{
...
...
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