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
89f2dd41
Commit
89f2dd41
authored
4 years ago
by
mayongxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf:物联配置优化
parent
56454852
Pipeline
#26325
passed with stages
in 24 minutes 14 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
54 deletions
+63
-54
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+4
-3
IotConfig.less
...pages/platformCenter/hostmanager/IotConfig/IotConfig.less
+7
-0
BaseConfig.jsx
...ages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
+51
-49
ProxyConfig.jsx
...es/platformCenter/hostmanager/proxyConfig/ProxyConfig.jsx
+1
-2
No files found.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
89f2dd41
...
...
@@ -70,7 +70,7 @@ const IotConfig = () => {
}
)
}
const
PingIot
=
(
ip
,
values
)
=>
{
const
PingIot
=
(
{
ip
,
values
}
)
=>
{
PingIOTPlatform
({
ip
:
ip
}).
then
(
...
...
@@ -100,7 +100,7 @@ const IotConfig = () => {
return
(
<
div
className=
{
styles
.
iot_container
}
>
<
Card
title=
{
`物联平台
[${currentIotVersion.data}]
`
}
style=
{
{
width
:
430
}
}
>
<
Card
title=
{
`物联平台
${currentIotVersion.data?`
[
$
{
currentIotVersion
.
data
}]
`:""}
`
}
style=
{
{
width
:
430
}
}
>
<
Form
{
...
layout
}
...
...
@@ -110,6 +110,7 @@ const IotConfig = () => {
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
div
className=
{
styles
.
section
}
>
物联平台
</
div
>
<
Form
.
Item
label=
"服务器地址(平台)"
name=
"IotAddress"
...
...
@@ -118,7 +119,7 @@ const IotConfig = () => {
>
<
Input
/>
</
Form
.
Item
>
<
div
className=
{
styles
.
section
}
>
EMQ
</
div
>
<
Form
.
Item
label=
"服务器地址(EMQ)"
name=
"TcpAddress"
...
...
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.less
View file @
89f2dd41
...
...
@@ -4,4 +4,10 @@
width: 100%;
flex-direction: row;
justify-content: flex-start;
.section{
background-color: #F5F7FA;
width: 100%;
height: 20px;
margin-bottom: 10px;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/baseConfig/BaseConfig.jsx
View file @
89f2dd41
import
React
,
{
useState
,
useEffect
}
from
'react'
import
{
Card
}
from
'antd'
import
{
Descriptions
}
from
'antd'
import
styles
from
'./BaseConfig.less'
import
{
S_GetDataBaseConfig
,
GetTCPConfigInfo
,
GetDataBaseConfig
,
GetBasicInfo
}
from
'../../../..
/services/platform/hostmanager'
import
{
S_GetDataBaseConfig
,
GetTCPConfigInfo
,
GetDataBaseConfig
,
GetBasicInfo
}
from
'@
/services/platform/hostmanager'
...
...
@@ -9,77 +9,79 @@ import { S_GetDataBaseConfig, GetTCPConfigInfo,GetDataBaseConfig,GetBasicInfo }
const
BaseConfig
=
()
=>
{
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({});
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({
userName
:
""
,
password
:
""
,
dbName
:
""
,
ip
:
""
});
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
""
);
useEffect
(()
=>
{
getCurrentConfig
()
getSiteCode
()
},[])
},
[])
const
getCurrentConfig
=
()
=>
{
// S_GetDataBaseConfig({
// _version: 9999,
// _dc: new Date().getTime(),
// }).then(
// res => {
// if (res.success === true) {
// setCurrentDataBase(res)
// }
// }
// )
GetDataBaseConfig
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
res
=>
{
if
(
res
.
code
===
0
)
{
setCurrentDataBase
(
res
.
data
)
}
}
)
}
const
getSiteCode
=
()
=>
{
// GetTCPConfigInfo({
// _version: 9999,
// _dc: new Date().getTime(),
// }).then(
// res => {
// if (res.say.statusCode === '0000') {
// setcurrentSiteInfo(res)
// }
// }
// )
GetBasicInfo
().
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
res
=>
{
if
(
res
.
code
===
0
)
{
setcurrentSiteInfo
(
res
.
data
)
}
}
)
}
// 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}
// </Card>
// </Card>
// </div>
// )
const
encrypt
=
(
word
)
=>
{
let
encryptStr
=
""
for
(
let
i
=
0
;
i
<
word
.
length
;
i
++
){
encryptStr
+=
"*"
}
return
encryptStr
}
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
>
<
div
style=
{
{
backgroundColor
:
"white"
,
padding
:
"10px"
,
width
:
"400px"
}
}
>
<
Descriptions
title=
""
bordered
>
<
Descriptions
.
Item
label=
"站点编号"
span=
{
3
}
>
{
currentSiteInfo
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"服务器IP"
span=
{
3
}
>
{
currentDataBase
.
ip
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"数据库名称"
span=
{
3
}
>
{
currentDataBase
.
dbName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"登录名"
span=
{
1
}
>
{
currentDataBase
.
userName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"密码"
span=
{
1
}
>
{
encrypt
(
currentDataBase
.
password
)
}
</
Descriptions
.
Item
>
</
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
}
</
Card
>
</
Card
>
</
Descriptions
>
</
div
>
</
div
>
)
...
...
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/proxyConfig/ProxyConfig.jsx
View file @
89f2dd41
...
...
@@ -200,8 +200,7 @@ const ProxyConfig = () => {
label=
"地址(IIS)"
name=
"IISIPProt"
rules=
{
[{
required
:
true
,
message
:
'请输入服务器地址!'
}]
}
hasFeedback
>
<
Input
/>
</
Form
.
Item
>
...
...
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