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
2565e509
Commit
2565e509
authored
3 years ago
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复宿主管理物联配置无法保存问题
parent
42548322
Pipeline
#40138
passed with stages
in 26 minutes 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
11 deletions
+12
-11
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+12
-11
No files found.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
2565e509
/* eslint-disable react/jsx-no-undef */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Card
,
...
...
@@ -11,6 +12,7 @@ import {
Col
,
Spin
,
}
from
'antd'
;
import
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
styles
from
'./IotConfig.less'
;
import
Internet
from
'../../../../assets/images/icons/物联.svg'
;
import
EMQ
from
'../../../../assets/images/icons/EMQ.svg'
;
...
...
@@ -21,7 +23,6 @@ import {
PingIOTPlatform
,
SaveTcpAddress
,
}
from
'@/services/platform/hostmanager'
;
import
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
const
layout
=
{
labelCol
:
{
span
:
4
},
wrapperCol
:
{
span
:
20
},
...
...
@@ -44,20 +45,20 @@ const IotConfig = () => {
const
[
form
]
=
Form
.
useForm
();
const
onFinish
=
values
=>
{
if
(
values
.
IotAddress
!=
null
&&
values
.
IotAddress
.
length
>
0
)
{
if
(
values
.
SSLSafe
==
'是'
)
{
values
.
SSLSafe
=
0
;
}
if
(
values
.
SSLSafe
==
'否'
)
{
if
(
values
.
SSLSafe
===
'是'
)
{
values
.
SSLSafe
=
1
;
}
PingIot
({
ip
:
values
.
IotAddress
,
values
:
values
});
}
else
{
if
(
values
.
SSLSafe
==
'是'
)
{
if
(
values
.
SSLSafe
===
'否'
)
{
values
.
SSLSafe
=
0
;
}
if
(
values
.
SSLSafe
==
'否'
)
{
PingIot
({
ip
:
values
.
IotAddress
,
values
});
}
else
{
if
(
values
.
SSLSafe
===
'是'
)
{
values
.
SSLSafe
=
1
;
}
if
(
values
.
SSLSafe
===
'否'
)
{
values
.
SSLSafe
=
0
;
}
SaveIotConfig
({
tcpAddress
:
values
.
TcpAddress
,
iotAddress
:
values
.
IotAddress
,
...
...
@@ -262,8 +263,8 @@ const IotConfig = () => {
rules=
{
[{
required
:
true
,
message
:
'请选择是否!'
}]
}
>
<
Select
placeholder=
"请选择是否!"
style=
{
{
width
:
'95%'
}
}
>
<
Option
value=
"
0
"
>
是
</
Option
>
<
Option
value=
"
1
"
>
否
</
Option
>
<
Option
value=
"
1
"
>
是
</
Option
>
<
Option
value=
"
0
"
>
否
</
Option
>
</
Select
>
</
Form
.
Item
>
</
Col
>
...
...
This diff is collapsed.
Click to expand it.
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