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
3c694e2a
Commit
3c694e2a
authored
Feb 06, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '物联配置跳转网关'
parent
ed7bc3c8
Pipeline
#67022
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
6 deletions
+71
-6
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+64
-3
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+7
-3
No files found.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
3c694e2a
...
...
@@ -14,8 +14,10 @@ import {
Switch
,
Progress
,
Tooltip
,
Modal
,
Space
,
}
from
'antd'
;
import
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
{
CloseCircleFilled
,
InfoCircleFilled
}
from
'@ant-design/icons'
;
import
styles
from
'./IotConfig.less'
;
import
Internet
from
'../../../../assets/images/icons/物联.svg'
;
import
EMQ
from
'../../../../assets/images/icons/EMQ.svg'
;
...
...
@@ -34,6 +36,7 @@ import {
AddDB
,
// 添加数据库
DepositServiceDisable
,
// 停止数据库服务
DepositServiceEnable
,
// 启动数据库服务
GetGateWay
,
}
from
'@/services/hostmanager/hostmanager'
;
import
{
GetDbProduct
,
// 获取产品方案配置
...
...
@@ -46,7 +49,8 @@ const tailLayout = {
wrapperCol
:
{
offset
:
9
,
span
:
15
},
};
let
time
=
null
;
const
IotConfig
=
()
=>
{
const
IotConfig
=
props
=>
{
const
{
setActiveKey
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
show1
,
setShow1
]
=
useState
(
'none'
);
const
[
show2
,
setShow2
]
=
useState
(
'none'
);
...
...
@@ -75,8 +79,18 @@ const IotConfig = () => {
const
[
dbStatus
,
setDbStatus
]
=
useState
(
''
);
// 数据库状态
const
[
buStatus
,
setBuStatus
]
=
useState
(
''
);
// 按钮状态
const
[
keep
,
setKeep
]
=
useState
(
''
);
const
[
getWay
,
setGetWay
]
=
useState
(
''
);
const
[
getWayVisible
,
setGetWayVisible
]
=
useState
(
false
);
useEffect
(()
=>
{
GetGateWay
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setGetWay
(
res
.
data
);
if
(
res
.
data
===
false
)
{
setGetWayVisible
(
true
);
}
}
});
HealthCheck
().
then
(
res
=>
{
if
(
res
.
success
)
{
setFlag
(
1
);
...
...
@@ -380,6 +394,9 @@ const IotConfig = () => {
}
};
const
submit
=
()
=>
{
window
.
location
.
href
=
`/civmanage/platform/host`
;
};
return
(
<
div
className=
{
styles
.
iot_container
}
>
<
Card
...
...
@@ -403,6 +420,22 @@ const IotConfig = () => {
>
<
img
src=
{
Internet
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
物联网统一接入平台
</
span
>
{
/* <div>
{getWay === false ? (
<>
<InfoCircleFilled
style={{
color: '#faad14',
fontSize: '18px',
marginLeft: '10px',
}}
/>
<span style={{ marginLeft: '5px' }}>请开启网关!</span>
</>
) : (
<></>
)}
</div> */
}
</
div
>
<
Divider
/>
<
Form
.
Item
style=
{
{
marginLeft
:
'20px'
,
marginBottom
:
'0px'
}
}
>
...
...
@@ -449,7 +482,6 @@ const IotConfig = () => {
}
}
/>
</
span
>
</
div
>
</
Form
.
Item
>
...
...
@@ -543,6 +575,35 @@ const IotConfig = () => {
</
Form
>
</
Spin
>
</
Card
>
<
Modal
visible=
{
getWayVisible
}
title=
"提示"
width=
"350px"
closable=
{
false
}
footer=
{
<
Space
>
<
Button
onClick=
{
()
=>
{
setGetWayVisible
(
false
);
setActiveKey
(
'5'
);
}
}
type=
"primary"
>
好的,去开启
</
Button
>
</
Space
>
}
>
<
InfoCircleFilled
style=
{
{
color
:
'#faad14'
,
fontSize
:
'18px'
,
marginRight
:
'10px'
,
}
}
/>
<
span
>
当前网关暂未打开,请前往开启!
</
span
>
</
Modal
>
</
div
>
);
};
...
...
src/pages/platformCenter/hostmanager/index.jsx
View file @
3c694e2a
...
...
@@ -11,16 +11,20 @@ import GateConfig from './gateWay/gateWay';
const
{
TabPane
}
=
Tabs
;
const
HostManager
=
()
=>
{
const
callback
=
()
=>
{};
const
[
activeKey
,
setActiveKey
]
=
useState
(
'1'
)
// 修改选中的tab
const
handleChange
=
key
=>
{
setActiveKey
(
key
);
};
return
(
<
PageContainer
>
<
Tabs
onChange=
{
callback
}
type=
"card"
destroyInactiveTabPane
>
<
Tabs
onChange=
{
handleChange
}
type=
"card"
destroyInactiveTabPane
activeKey=
{
activeKey
}
>
<
TabPane
tab=
"基础配置"
key=
"1"
>
<
BaseConfig
/>
</
TabPane
>
<
TabPane
tab=
"物联配置"
key=
"2"
>
<
IotConfig
/>
<
IotConfig
setActiveKey=
{
setActiveKey
}
/>
</
TabPane
>
<
TabPane
tab=
"消息配置"
key=
"3"
>
<
MessageConfig
/>
...
...
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