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
9e996e6a
Commit
9e996e6a
authored
Nov 15, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增宿主管理消息平台连接提示
parent
cce514ac
Pipeline
#37841
passed with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
75 additions
and
31 deletions
+75
-31
WebDic.js
src/pages/dataCenter/dictionary1/WebDic.js
+1
-0
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+3
-3
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+1
-0
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+2
-2
messageConfig.jsx
...latformCenter/hostmanager/messageConfig/messageConfig.jsx
+68
-26
No files found.
src/pages/dataCenter/dictionary1/WebDic.js
View file @
9e996e6a
...
@@ -613,6 +613,7 @@ const WebDic = () => {
...
@@ -613,6 +613,7 @@ const WebDic = () => {
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
console
.
log
(
1
);
console
.
log
(
1
);
message
.
success
(
`
${
info
.
file
.
name
}
导入成功`
);
message
.
success
(
`
${
info
.
file
.
name
}
导入成功`
);
setFlag
(
flag
+
1
)
}
else
if
(
info
.
file
.
status
===
'error'
)
{
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
导入失败.`
);
message
.
error
(
`
${
info
.
file
.
name
}
导入失败.`
);
}
}
...
...
src/pages/database/InitDataBase.jsx
View file @
9e996e6a
...
@@ -402,7 +402,7 @@ const InitDataBase = props => {
...
@@ -402,7 +402,7 @@ const InitDataBase = props => {
notification
.
error
({
notification
.
error
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
15
,
duration
:
15
,
description
:
res
.
m
essage
,
description
:
res
.
m
sg
,
});
});
}
}
})
})
...
@@ -568,7 +568,7 @@ const InitDataBase = props => {
...
@@ -568,7 +568,7 @@ const InitDataBase = props => {
notification
.
success
({
notification
.
success
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
3
,
duration
:
3
,
description
:
'
操作
成功'
,
description
:
'
数据库初始化
成功'
,
});
});
}
else
{
}
else
{
notification
.
error
({
notification
.
error
({
...
@@ -586,7 +586,7 @@ const InitDataBase = props => {
...
@@ -586,7 +586,7 @@ const InitDataBase = props => {
notification
.
success
({
notification
.
success
({
message
:
'提示'
,
message
:
'提示'
,
duration
:
3
,
duration
:
3
,
description
:
'
操作
成功'
,
description
:
'
数据库初始化
成功'
,
});
});
}
else
{
}
else
{
notification
.
error
({
notification
.
error
({
...
...
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
9e996e6a
...
@@ -183,6 +183,7 @@ const AddModal = props => {
...
@@ -183,6 +183,7 @@ const AddModal = props => {
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
))
arr
.
push
(
evt
.
from
.
children
[
i
].
getAttribute
(
'drag-id'
))
}
}
console
.
log
(
arr
)
setSelectData
(
arr
)
setSelectData
(
arr
)
}
}
});
});
...
...
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
9e996e6a
...
@@ -170,8 +170,8 @@ const IotConfig = () => {
...
@@ -170,8 +170,8 @@ const IotConfig = () => {
<
Button
type=
"primary"
onClick=
{
()
=>
PingIot1
()
}
>
连接
</
Button
>
<
Button
type=
"primary"
onClick=
{
()
=>
PingIot1
()
}
>
连接
</
Button
>
</
Col
>
</
Col
>
<
Col
span=
{
3
}
>
<
Col
span=
{
3
}
>
<
span
style=
{
{
display
:
show1
}
}
><
img
src=
{
Yes
}
style=
{
{
height
:
'32px'
,
marginRight
:
'20px'
}
}
alt=
""
/>
已连接
</
span
>
<
span
style=
{
{
display
:
show1
}
}
><
img
src=
{
Yes
}
style=
{
{
height
:
'32px'
,
marginRight
:
'20px'
,
marginTop
:
'5px'
}
}
alt=
""
/><
span
style=
{
{
verticalAlign
:
'text-bottom'
}
}
>
已连接
</
span
>
</
span
>
<
span
style=
{
{
display
:
show2
}
}
><
CloseCircleFilled
style=
{
{
fontSize
:
'32px'
,
marginRight
:
'20px'
}
}
/>
未连接
</
span
>
<
span
style=
{
{
display
:
show2
}
}
><
CloseCircleFilled
style=
{
{
fontSize
:
'32px'
,
marginRight
:
'20px'
,
marginTop
:
'5px'
}
}
/><
span
style=
{
{
verticalAlign
:
'text-bottom'
}
}
>
未连接
</
span
>
</
span
>
</
Col
>
</
Col
>
<
div
style=
{
{
marginTop
:
'40px'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginLeft
:
'15px'
}
}
>
<
div
style=
{
{
marginTop
:
'40px'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginLeft
:
'15px'
}
}
>
...
...
src/pages/platformCenter/hostmanager/messageConfig/messageConfig.jsx
View file @
9e996e6a
import
React
,
{
useEffect
,
useState
}
from
'react'
import
React
,
{
useEffect
,
useState
}
from
'react'
import
{
Card
,
Form
,
Input
,
Button
,
Select
,
message
,
Divider
,
Spin
}
from
'antd'
import
{
Card
,
Form
,
Input
,
Button
,
Select
,
message
,
Divider
,
Spin
,
Row
,
Col
}
from
'antd'
import
styles
from
'./messageConfig.less'
;
import
styles
from
'./messageConfig.less'
;
import
{
GetMessageConfigInfo
,
SaveSystemInfo
,
ConnectMessPlatform
,
GetBasicInfo
,
GetDataBaseConfig
}
from
'@/services/platform/hostmanager'
import
{
GetMessageConfigInfo
,
SaveSystemInfo
,
ConnectMessPlatform
,
GetBasicInfo
,
GetDataBaseConfig
}
from
'@/services/platform/hostmanager'
import
message11
from
'../../../../assets/images/icons/消息.svg'
import
message11
from
'../../../../assets/images/icons/消息.svg'
import
Yes
from
'../../../../assets/images/icons/正确.svg'
;
import
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
const
layout
=
{
const
layout
=
{
labelCol
:
{
span
:
3
},
labelCol
:
{
span
:
3
},
...
@@ -19,6 +21,8 @@ const MessageConfig = () => {
...
@@ -19,6 +21,8 @@ const MessageConfig = () => {
const
[
currentAddress
,
setCurrentAddress
]
=
useState
(
""
)
const
[
currentAddress
,
setCurrentAddress
]
=
useState
(
""
)
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({});
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({});
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
""
);
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
""
);
const
[
show1
,
setShow1
]
=
useState
(
'none'
)
const
[
show2
,
setShow2
]
=
useState
(
'none'
)
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
const
onFinish
=
(
values
)
=>
{
const
onFinish
=
(
values
)
=>
{
...
@@ -35,6 +39,8 @@ const MessageConfig = () => {
...
@@ -35,6 +39,8 @@ const MessageConfig = () => {
}).
then
(
res
=>
{
}).
then
(
res
=>
{
setLoading
(
false
)
setLoading
(
false
)
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
setShow1
(
'block'
)
setShow2
(
'none'
)
//2.保存连接
//2.保存连接
SaveSystemInfo
({
SaveSystemInfo
({
configName
:
"消息平台连接地址"
,
configName
:
"消息平台连接地址"
,
...
@@ -49,12 +55,36 @@ const MessageConfig = () => {
...
@@ -49,12 +55,36 @@ const MessageConfig = () => {
}
}
)
)
}
else
{
}
else
{
setShow1
(
'none'
)
setShow2
(
'block'
)
message
.
error
(
res
.
msg
)
message
.
error
(
res
.
msg
)
}
}
})
})
};
};
const
getMessageConfig
=
(
CurrentAddress
,
CurrentDataBase
,
currentSiteInfo
)
=>
{
setLoading
(
true
)
ConnectMessPlatform
({
messAddress
:
CurrentAddress
,
sqlServerIP
:
CurrentDataBase
.
ip
,
loginName
:
CurrentDataBase
.
userName
,
password
:
CurrentDataBase
.
password
,
sqlName
:
CurrentDataBase
.
dbName
,
siteCode
:
currentSiteInfo
}).
then
(
res
=>
{
setLoading
(
false
)
if
(
res
.
code
===
0
)
{
setShow1
(
'block'
)
setShow2
(
'none'
)
}
else
{
setShow1
(
'none'
)
setShow2
(
'block'
)
message
.
error
(
res
.
msg
)
}
})
}
const
onFinishFailed
=
(
errorInfo
)
=>
{
const
onFinishFailed
=
(
errorInfo
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
);
console
.
log
(
'Failed:'
,
errorInfo
);
};
};
...
@@ -65,16 +95,20 @@ const MessageConfig = () => {
...
@@ -65,16 +95,20 @@ const MessageConfig = () => {
GetMessageConfigInfo
().
then
(
GetMessageConfigInfo
().
then
(
res
=>
{
res
=>
{
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
let
CurrentAddress
=
res
.
data
setCurrentAddress
(
res
.
data
)
setCurrentAddress
(
res
.
data
)
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
GetDataBaseConfig
().
then
(
GetDataBaseConfig
().
then
(
res
=>
{
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
let
CurrentDataBase
=
res
.
data
setCurrentDataBase
(
res
.
data
)
setCurrentDataBase
(
res
.
data
)
GetBasicInfo
().
then
(
GetBasicInfo
().
then
(
res
=>
{
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
let
currentSiteInfo
=
res
.
data
setcurrentSiteInfo
(
res
.
data
)
setcurrentSiteInfo
(
res
.
data
)
getMessageConfig
(
CurrentAddress
,
CurrentDataBase
,
currentSiteInfo
)
}
}
}
}
)
)
...
@@ -96,32 +130,40 @@ const MessageConfig = () => {
...
@@ -96,32 +130,40 @@ const MessageConfig = () => {
return
(
return
(
<
div
className=
{
styles
.
message_container
}
>
<
div
className=
{
styles
.
message_container
}
>
<
Card
style=
{
{
width
:
"100%"
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Card
style=
{
{
width
:
"100%"
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
Form
<
Form
{
...
layout
}
{
...
layout
}
form=
{
form
}
form=
{
form
}
name=
"basic"
name=
"basic"
initialValues=
{
{
remember
:
true
}
}
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
onFinishFailed=
{
onFinishFailed
}
>
<
div
style=
{
{
marginTop
:
'10px'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginLeft
:
'15px'
}
}
>
<
img
src=
{
message11
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/><
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
消息平台
</
span
>
</
div
>
<
Divider
/>
<
Form
.
Item
label=
"服务地址(平台)"
name=
"messageAddress"
rules=
{
[{
required
:
true
,
pattern
:
new
RegExp
(
/^
(([
1-9
]?\d
|1
\d
{2}|2
[
0-4
]\d
|25
[
0-5
])\.)
{3}
([
1-9
]?\d
|1
\d
{2}|2
[
0-4
]\d
|25
[
0-5
])(
:
\d
*
)
$/
,
"g"
),
message
:
'请输入正确的IP例如:192.168.12.231:8231'
}]
}
>
>
<
Input
style=
{
{
width
:
'94%'
}
}
/>
<
div
style=
{
{
marginTop
:
'10px'
,
display
:
'flex'
,
alignItems
:
'center'
,
marginLeft
:
'15px'
}
}
>
</
Form
.
Item
>
<
img
src=
{
message11
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/><
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
消息平台
</
span
>
<
Form
.
Item
{
...
tailLayout
}
>
</
div
>
<
Button
type=
"primary"
htmlType=
"submit"
disabled=
{
currentSiteInfo
.
length
>
0
?
false
:
true
}
>
<
Divider
/>
保存连接
<
Row
>
</
Button
>
<
Col
span=
{
21
}
>
</
Form
.
Item
>
<
Form
.
Item
</
Form
>
label=
"服务地址(平台)"
name=
"messageAddress"
rules=
{
[{
required
:
true
,
pattern
:
new
RegExp
(
/^
(([
1-9
]?\d
|1
\d
{2}|2
[
0-4
]\d
|25
[
0-5
])\.)
{3}
([
1-9
]?\d
|1
\d
{2}|2
[
0-4
]\d
|25
[
0-5
])(
:
\d
*
)
$/
,
"g"
),
message
:
'请输入正确的IP例如:192.168.12.231:8231'
}]
}
>
<
Input
style=
{
{
width
:
'94%'
}
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
span=
{
3
}
>
<
span
style=
{
{
display
:
show1
}
}
><
img
src=
{
Yes
}
style=
{
{
height
:
'32px'
,
marginRight
:
'20px'
}
}
alt=
""
/><
span
>
已连接
</
span
></
span
>
<
span
style=
{
{
display
:
show2
}
}
><
CloseCircleFilled
style=
{
{
fontSize
:
'32px'
,
marginRight
:
'20px'
,
marginTop
:
'5px'
}
}
/><
span
style=
{
{
verticalAlign
:
'text-bottom'
}
}
>
未连接
</
span
></
span
>
</
Col
>
</
Row
>
<
Form
.
Item
{
...
tailLayout
}
>
<
Button
type=
"primary"
htmlType=
"submit"
disabled=
{
currentSiteInfo
.
length
>
0
?
false
:
true
}
>
保存连接
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Spin
>
</
Spin
>
</
Card
>
</
Card
>
</
div
>
</
div
>
...
...
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