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
6332dc2a
Commit
6332dc2a
authored
Jul 13, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '宿主管理默认值清除'
parent
38268dd3
Pipeline
#75860
passed with stages
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
68 additions
and
58 deletions
+68
-58
index.jsx
src/components/PersonnelSelector/index.jsx
+31
-21
index.jsx
src/pages/platformCenter/hostmanager/ETLConfig/index.jsx
+4
-1
IotConfig.jsx
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
+9
-8
index.jsx
src/pages/platformCenter/hostmanager/gckConfig/index.jsx
+6
-15
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+6
-6
messageConfig.jsx
...latformCenter/hostmanager/messageConfig/messageConfig.jsx
+11
-7
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+1
-0
No files found.
src/components/PersonnelSelector/index.jsx
View file @
6332dc2a
...
...
@@ -7,7 +7,7 @@ import styles from './index.less';
import
CardCheck
from
'./CardCheck'
;
const
SelectUser
=
props
=>
{
const
{
callBackSubmit
,
onCancel
,
visible
,
itemObj
}
=
props
;
const
{
callBackSubmit
,
onCancel
,
visible
,
itemObj
,
aftercare
}
=
props
;
const
[
allList
,
setAllist
]
=
useState
([]);
// 用于展示得数据
const
[
checkList
,
setCheckList
]
=
useState
([]);
// 选中得数据集合
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
...
@@ -54,27 +54,37 @@ const SelectUser = props => {
if
(
res
[
0
].
code
===
0
)
{
setTotal
(
res
[
0
].
data
.
count
);
let
checkedListAll
=
[];
if
(
itemObj
)
{
res
[
0
].
data
.
data
.
map
(
item
=>
{
item
.
users
.
map
(
val
=>
{
itemObj
.
length
>
0
&&
itemObj
.
forEach
(
i
=>
{
if
(
val
.
userId
===
i
)
{
checkedListAll
.
push
({
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
level
.
split
(
'/'
)[
1
],
level
:
item
.
level
,
});
}
});
console
.
log
(
itemObj
);
if
(
aftercare
!==
'请勾选不显示售后服务的用户'
)
{
itemObj
.
length
>
0
&&
itemObj
.
forEach
((
i
,
j
)
=>
{
checkedListAll
.
push
({
label
:
aftercare
.
split
(
','
)[
j
],
value
:
i
,
});
});
});
setCheckList
(
checkedListAll
);
console
.
log
(
checkedListAll
);
debugger
;
}
setCheckList
(
checkedListAll
);
// if (itemObj) {
// res[0].data.data.map(item => {
// item.users.map(val => {
// itemObj.length > 0 &&
// itemObj.forEach(i => {
// if (Number(val.userId) == Number(i)) {
// checkedListAll.push({
// label: val.userName,
// value: val.userId,
// groupName: item.level.split('/')[1],
// level: item.level,
// });
// }
// });
// });
// });
// setCheckList(checkedListAll);
// }
// 数据处理成checkbox组件需要得形式
let
list
=
res
[
0
].
data
.
data
.
map
(
item
=>
{
let
indeterminate
=
false
;
...
...
@@ -214,8 +224,8 @@ const SelectUser = props => {
},
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}
(${record.level})
`
}
>
{
record
.
label
}
(
{
record
.
level
}
)
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}`
}
>
{
record
.
label
}
</
Tooltip
>
</
span
>
),
...
...
src/pages/platformCenter/hostmanager/ETLConfig/index.jsx
View file @
6332dc2a
...
...
@@ -26,6 +26,9 @@ const ETCConfig = props => {
message
.
error
(
res
.
msg
);
}
});
return
()
=>
{
form
.
resetFields
();
};
},
[]);
const
onFinish
=
()
=>
{
...
...
@@ -78,7 +81,7 @@ const ETCConfig = props => {
>
<
Input
style=
{
{
width
:
'300px'
}
}
placeholder=
"请填写服务地址"
//
placeholder="请填写服务地址"
rules=
{
[
{
validator
:
(
rule
,
value
)
=>
{
...
...
src/pages/platformCenter/hostmanager/IotConfig/IotConfig.jsx
View file @
6332dc2a
...
...
@@ -100,6 +100,7 @@ const IotConfig = props => {
clearTimeout
(
time
);
time
=
null
;
}
form
.
resetFields
();
};
},
[]);
...
...
@@ -211,7 +212,7 @@ const IotConfig = props => {
obj
[
k
]
=
res
.
data
[
k
];
});
GetIotVersion
({
ip
:
obj
.
IotAddress
?
obj
.
IotAddress
:
'127.0.0.1'
,
ip
:
obj
.
IotAddress
,
}).
then
(
resdata
=>
{
if
(
resdata
.
code
===
0
)
{
if
(
resdata
.
data
===
'BS'
)
{
...
...
@@ -248,12 +249,12 @@ const IotConfig = props => {
}
});
form
.
setFieldsValue
(
obj
);
if
(
!
obj
.
IotAddress
||
obj
.
IotAddress
==
null
)
{
form
.
setFieldsValue
({
IotAddress
:
'127.0.0.1'
});
}
if
(
!
obj
.
TcpAddress
||
obj
.
TcpAddress
==
null
)
{
form
.
setFieldsValue
({
TcpAddress
:
'127.0.0.1:8083'
});
}
//
if (!obj.IotAddress || obj.IotAddress == null) {
//
form.setFieldsValue({ IotAddress: '127.0.0.1' });
//
}
//
if (!obj.TcpAddress || obj.TcpAddress == null) {
//
form.setFieldsValue({ TcpAddress: '127.0.0.1:8083' });
//
}
if
(
!
obj
.
SSLSafe
||
obj
.
SSLSafe
==
null
)
{
form
.
setFieldsValue
({
SSLSafe
:
'否'
});
}
...
...
@@ -492,7 +493,7 @@ const IotConfig = props => {
>
<
Input
style=
{
{
width
:
'300px'
,
marginLeft
:
'15px'
}
}
placeholder=
"请输入服务地址"
//
placeholder="请输入服务地址"
/>
</
Form
.
Item
>
<
Button
onClick=
{
()
=>
PingIot1
()
}
style=
{
{
marginLeft
:
'-88px'
}
}
>
...
...
src/pages/platformCenter/hostmanager/gckConfig/index.jsx
View file @
6332dc2a
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Card
,
Form
,
Input
,
Button
,
Select
,
message
,
Divider
,
Spin
,
Row
,
Col
}
from
'antd'
;
import
{
GetMessageConfigInfo
,
SaveSystemInfo
,
ConnectMessPlatform
,
GetBasicInfo
,
GetDataBaseConfig
,
SysConfiguration
,
SaveSysConfigurate
,
}
from
'@/services/hostmanager/hostmanager'
;
import
{
GetMessageVersion
}
from
'@/services/messagemanage/messagemanage'
;
import
{
SysConfiguration
,
SaveSysConfigurate
}
from
'@/services/hostmanager/hostmanager'
;
import
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
CryptoJS
from
'crypto-js'
;
import
message11
from
'../../../../assets/images/icons/消息.svg'
;
...
...
@@ -25,9 +16,6 @@ const tailLayout = {
};
const
MessageConfig
=
()
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 加载
const
[
currentAddress
,
setCurrentAddress
]
=
useState
(
''
);
const
[
currentDataBase
,
setCurrentDataBase
]
=
useState
({});
const
[
currentSiteInfo
,
setcurrentSiteInfo
]
=
useState
(
''
);
const
[
show1
,
setShow1
]
=
useState
(
'none'
);
const
[
show2
,
setShow2
]
=
useState
(
'none'
);
...
...
@@ -72,7 +60,7 @@ const MessageConfig = () => {
};
useEffect
(()
=>
{
form
.
setFieldsValue
({
messageAddress
:
'127.0.0.1:8231'
});
//
form.setFieldsValue({ messageAddress: '127.0.0.1:8231' });
SysConfiguration
({
moduleName
:
'GCK平台地址'
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
...
...
@@ -80,6 +68,9 @@ const MessageConfig = () => {
message
.
info
(
res
.
msg
);
}
});
return
()
=>
{
form
.
resetFields
();
};
},
[]);
return
(
...
...
@@ -116,7 +107,7 @@ const MessageConfig = () => {
>
<
Input
style=
{
{
width
:
'300px'
,
marginLeft
:
'15px'
}
}
placeholder=
"请输入服务地址"
//
placeholder="请输入服务地址"
/>
</
Form
.
Item
>
<
span
style=
{
{
display
:
show1
}
}
>
...
...
src/pages/platformCenter/hostmanager/index.jsx
View file @
6332dc2a
...
...
@@ -22,25 +22,25 @@ const HostManager = () => {
<
PageContainer
>
<
Tabs
onChange=
{
handleChange
}
type=
"card"
destroyInactiveTabPane
activeKey=
{
activeKey
}
>
<
TabPane
tab=
"基础配置"
key=
"1"
>
<
BaseConfig
/>
{
activeKey
===
'1'
?
<
BaseConfig
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"GCK平台配置"
key=
"2"
>
<
GCKConfig
/>
{
activeKey
===
'2'
?
<
GCKConfig
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"物联配置"
key=
"3"
>
<
IotConfig
setActiveKey=
{
setActiveKey
}
/>
{
activeKey
===
'3'
?
<
IotConfig
setActiveKey=
{
setActiveKey
}
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"消息配置"
key=
"4"
>
<
MessageConfig
/>
{
activeKey
===
'4'
?
<
MessageConfig
/>
:
null
}
</
TabPane
>
{
/* <TabPane tab="代理配置" key="4">
<ProxyConfig />
</TabPane> */
}
<
TabPane
tab=
"中台配置"
key=
"5"
>
<
ETLConfig
setActiveKey=
{
setActiveKey
}
/>
{
activeKey
===
'5'
?
<
ETLConfig
setActiveKey=
{
setActiveKey
}
/>
:
null
}
</
TabPane
>
<
TabPane
tab=
"网关配置"
key=
"6"
>
<
GateConfig
/>
{
activeKey
===
'6'
?
<
GateConfig
/>
:
null
}
</
TabPane
>
</
Tabs
>
</
PageContainer
>
...
...
src/pages/platformCenter/hostmanager/messageConfig/messageConfig.jsx
View file @
6332dc2a
...
...
@@ -121,15 +121,16 @@ const MessageConfig = () => {
};
useEffect
(()
=>
{
form
.
setFieldsValue
({
messageAddress
:
'127.0.0.1:8231'
});
//
form.setFieldsValue({ messageAddress: '127.0.0.1:8231' });
GetMessageConfigInfo
().
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
setCurrentAddress
(
res
.
data
);
if
(
!
res
.
data
||
res
.
data
==
null
)
{
form
.
setFieldsValue
({
messageAddress
:
'127.0.0.1:8231'
});
}
else
{
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
}
// if (!res.data || res.data == null) {
// form.setFieldsValue({ messageAddress: '127.0.0.1:8231' });
// } else {
// form.setFieldsValue({ messageAddress: res.data });
// }
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
GetDataBaseConfig
().
then
(
resdata
=>
{
if
(
resdata
.
code
===
0
)
{
...
...
@@ -147,6 +148,9 @@ const MessageConfig = () => {
}
});
getMessageVersion
();
return
()
=>
{
form
.
resetFields
();
};
},
[
flag
]);
const
getMessageVersion
=
()
=>
{
...
...
@@ -231,7 +235,7 @@ const MessageConfig = () => {
>
<
Input
style=
{
{
width
:
'300px'
,
marginLeft
:
'15px'
}
}
placeholder=
"请输入服务地址"
//
placeholder="请输入服务地址"
/>
</
Form
.
Item
>
<
span
style=
{
{
display
:
show1
}
}
>
...
...
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
6332dc2a
...
...
@@ -797,6 +797,7 @@ export default props => {
}}
callBackSubmit
=
{
roleList
=>
rolCallBack
(
roleList
)}
itemObj
=
{
checkValue
&&
checkValue
.
toString
().
split
(
','
)}
// 单选框中的值
aftercare
=
{
aftercare
}
/
>
<
/Drawer
>
);
...
...
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