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
55e0f46b
Commit
55e0f46b
authored
Mar 10, 2021
by
mayongxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:宿主管理
parent
67130ce9
Pipeline
#24249
passed with stages
in 17 minutes 44 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
226 additions
and
1 deletion
+226
-1
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+89
-0
IotConfig.less
...pages/platformCenter/hostmanager/IotConfig/IotConfig.less
+8
-0
BaseConfig.jsx
...ages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
+73
-0
BaseConfig.less
...ges/platformCenter/hostmanager/baseConfig/BaseConfig.less
+8
-0
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+37
-0
index.less
src/pages/platformCenter/hostmanager/index.less
+0
-0
config.js
src/routes/config.js
+2
-1
hostmanager.jsx
src/services/platform/hostmanager.jsx
+9
-0
No files found.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
0 → 100644
View file @
55e0f46b
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Card
,
Form
,
Input
,
Button
,
Select
}
from
'antd'
import
styles
from
'./IotConfig.less'
const
layout
=
{
labelCol
:
{
span
:
8
},
wrapperCol
:
{
span
:
16
},
};
const
tailLayout
=
{
wrapperCol
:
{
offset
:
8
,
span
:
16
},
};
const
IotConfig
=
()
=>
{
const
onFinish
=
(
values
)
=>
{
console
.
log
(
'Success:'
,
values
);
};
const
onFinishFailed
=
(
errorInfo
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
};
return
(
<
div
className=
{
styles
.
iot_container
}
>
<
Card
title=
"物联平台(V2.1.0302)"
style=
{
{
width
:
350
}
}
>
<
Form
{
...
layout
}
name=
"basic"
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
label=
"服务器地址"
name=
"username"
rules=
{
[{
required
:
true
,
message
:
'请输入服务器地址!'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
保存连接
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Card
>
<
Card
title=
"EMQ服务器"
style=
{
{
width
:
350
,
marginLeft
:
15
}
}
>
<
Form
{
...
layout
}
name=
"basic"
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
.
Item
name=
"select"
label=
"SSL"
hasFeedback
rules=
{
[{
required
:
true
,
message
:
'Please select your country!'
}]
}
initialValue=
"否"
>
<
Select
placeholder=
"Please select a country"
>
<
Option
value=
"是"
>
是
</
Option
>
<
Option
value=
"否"
>
否
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"服务器地址"
name=
"username"
rules=
{
[{
required
:
true
,
message
:
'请输入服务器地址!'
}]
}
>
<
Input
/>
</
Form
.
Item
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
保存连接
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Card
>
</
div
>
)
}
export
default
IotConfig
\ No newline at end of file
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.less
0 → 100644
View file @
55e0f46b
.iot_container{
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
justify-content: flex-start;
}
\ No newline at end of file
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
0 → 100644
View file @
55e0f46b
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Card
}
from
'antd'
import
styles
from
'./BaseConfig.less'
import
{
S_GetDataBaseConfig
,
GetTCPConfigInfo
}
from
'../../../../services/platform/hostmanager'
const
BaseConfig
=
()
=>
{
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({});
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
({
getMe
:[{
SiteCode
:
""
}]});
useEffect
(()
=>
{
getCurrentConfig
()
getSiteCode
()
},[])
const
getCurrentConfig
=
()
=>
{
S_GetDataBaseConfig
({
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
}).
then
(
res
=>
{
if
(
res
.
success
===
true
)
{
setCurrentDataBase
(
res
)
}
}
)
}
const
getSiteCode
=
()
=>
{
GetTCPConfigInfo
({
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
}).
then
(
res
=>
{
if
(
res
.
say
.
statusCode
===
'0000'
)
{
setcurrentSiteInfo
(
res
)
}
}
)
}
return
(
<
div
className=
{
styles
.
base_container
}
>
<
Card
title=
"数据库连接"
style=
{
{
width
:
300
}
}
>
<
Card
type=
"inner"
title=
"服务器IP"
style=
{
{
margin
:
10
}
}
>
{
currentDataBase
.
ip
}
</
Card
>
<
Card
type=
"inner"
title=
"数据库名称"
style=
{
{
margin
:
10
}
}
>
{
currentDataBase
.
dbName
}
</
Card
>
</
Card
>
<
Card
title=
"权限验证"
style=
{
{
width
:
300
,
marginLeft
:
15
}
}
>
<
Card
type=
"inner"
title=
"登录名"
style=
{
{
margin
:
10
}
}
>
{
currentDataBase
.
userName
}
</
Card
>
<
Card
type=
"inner"
title=
"密码"
style=
{
{
margin
:
10
}
}
>
{
currentDataBase
.
password
}
</
Card
>
</
Card
>
<
Card
title=
"站点信息"
style=
{
{
width
:
300
,
marginLeft
:
15
}
}
>
<
Card
type=
"inner"
title=
"站点编号"
style=
{
{
margin
:
10
}
}
>
{
currentSiteInfo
.
getMe
[
0
].
SiteCode
}
</
Card
>
</
Card
>
</
div
>
)
}
export
default
BaseConfig
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.less
0 → 100644
View file @
55e0f46b
.base_container{
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
justify-content: flex-start;
}
\ No newline at end of file
src/pages/platformCenter/hostmanager/index.jsx
0 → 100644
View file @
55e0f46b
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Tabs
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
BaseConfig
from
'./baseConfig/BaseConfig'
import
IotConfig
from
'./IotConfig/IotConfig'
const
{
TabPane
}
=
Tabs
;
const
HostManager
=
()
=>
{
const
callback
=
()
=>
{
}
return
(
<
PageContainer
>
<
Tabs
onChange=
{
callback
}
type=
"card"
>
<
TabPane
tab=
"基础配置"
key=
"1"
>
<
BaseConfig
/>
</
TabPane
>
<
TabPane
tab=
"物联配置"
key=
"2"
>
<
IotConfig
/>
</
TabPane
>
<
TabPane
tab=
"消息配置"
key=
"3"
>
Content of Tab Pane 3
</
TabPane
>
<
TabPane
tab=
"代理配置"
key=
"4"
>
Content of Tab Pane 3
</
TabPane
>
</
Tabs
>
</
PageContainer
>
)
}
export
default
HostManager
;
\ No newline at end of file
src/pages/platformCenter/hostmanager/index.less
0 → 100644
View file @
55e0f46b
src/routes/config.js
View file @
55e0f46b
...
...
@@ -35,6 +35,7 @@ import ProductConfig from '@/pages/webConfig/productConfig';
import
{
USER_MODE
}
from
'@/utils/constants'
;
import
BaseFrameContainer
from
'@/components/BaseFrameContainer'
;
import
JumpContainer
from
'@/components/JumpContainer'
;
import
HostManager
from
'@/pages/platformCenter/hostmanager'
// import ColConen from '@/components/Colophon/colContent';
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
...
...
@@ -205,7 +206,7 @@ export default {
name
:
'宿主管理'
,
url
:
'/web4/?widget=product/oms/MqttConfig/MqttConfig.js|hideMap=true'
,
component
:
BaseFrameContain
er
,
component
:
HostManag
er
,
},
],
},
...
...
src/services/platform/hostmanager.jsx
0 → 100644
View file @
55e0f46b
import
{
get
,
post
,
PUBLISH_SERVICE
,
CITY_SERVICE
}
from
'@/services/index'
;
export
const
S_GetDataBaseConfig
=
param
=>
get
(
`
${
CITY_SERVICE
}
/OMS.svc/S_GetDataBaseConfig`
,
param
);
export
const
GetTCPConfigInfo
=
param
=>
get
(
`
${
CITY_SERVICE
}
/MessagePlatform.svc/MessageManage/GetTCPConfigInfo`
,
param
);
\ No newline at end of file
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