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
8e187385
Commit
8e187385
authored
1 year ago
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '宿主管理增加GCK配置'
parent
9a63b1f1
Pipeline
#75834
canceled with stages
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
786 additions
and
6 deletions
+786
-6
CardCheck.jsx
src/components/PersonnelSelector/CardCheck.jsx
+109
-0
index.jsx
src/components/PersonnelSelector/index.jsx
+320
-0
index.less
src/components/PersonnelSelector/index.less
+107
-0
index.jsx
src/pages/platformCenter/hostmanager/gckConfig/index.jsx
+148
-0
index.less
src/pages/platformCenter/hostmanager/gckConfig/index.less
+8
-0
index.jsx
src/pages/platformCenter/hostmanager/index.jsx
+8
-4
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+82
-2
hostmanager.js
src/services/hostmanager/hostmanager.js
+2
-0
api.js
src/services/webConfig/api.js
+2
-0
No files found.
src/components/PersonnelSelector/CardCheck.jsx
0 → 100644
View file @
8e187385
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Checkbox
,
Tooltip
}
from
'antd'
;
import
styles
from
'./index.less'
;
const
CheckboxGroup
=
Checkbox
.
Group
;
const
CardCheck
=
props
=>
{
const
{
cardMsg
,
callback
,
checkList
,
deleKey
,
delFlag
}
=
props
;
const
[
checkedList
,
setCheckedList
]
=
useState
([]);
// 选中列表
const
[
indeterminate
,
setIndeterminate
]
=
useState
(
false
);
const
[
checkAll
,
setCheckAll
]
=
useState
(
false
);
const
[
plainOptions
,
setPlainOptions
]
=
useState
([]);
useEffect
(()
=>
{
let
list
=
[...
checkedList
];
if
(
list
.
some
(
item
=>
item
===
deleKey
))
{
let
newList
=
list
.
filter
(
item
=>
item
!==
deleKey
);
setCheckedList
(
newList
);
setIndeterminate
(
!!
newList
.
length
&&
newList
.
length
<
plainOptions
.
length
);
setCheckAll
(
newList
.
length
===
plainOptions
.
length
);
}
},
[
delFlag
]);
useEffect
(()
=>
{
console
.
log
(
cardMsg
);
setPlainOptions
(
cardMsg
.
plainOptions
);
setCheckedList
(
cardMsg
.
checkedList
);
setIndeterminate
(
cardMsg
.
indeterminate
);
setCheckAll
(
cardMsg
.
checkAll
);
},
[
cardMsg
]);
// 获取勾选新增得数据
const
addData
=
(
arr1
,
arr2
)
=>
arr2
.
filter
(
val
=>
arr1
.
indexOf
(
val
)
===
-
1
);
// 获取勾选删除得数据
const
delData
=
(
arr1
,
arr2
)
=>
arr1
.
filter
(
val
=>
arr2
.
indexOf
(
val
)
===
-
1
);
// 单选监听
const
onChange
=
list
=>
{
let
newCheckList
=
[...
checkList
];
let
arr
;
if
(
checkedList
.
length
>
list
.
length
)
{
// 取消勾选
arr
=
delData
(
checkedList
,
list
);
arr
.
forEach
(
item
=>
{
newCheckList
.
splice
(
newCheckList
.
findIndex
(
ele
=>
ele
.
value
===
item
),
1
);
});
}
else
{
// 勾选元素
arr
=
addData
(
checkedList
,
list
);
arr
.
forEach
(
item
=>
{
let
checkName
=
plainOptions
.
find
(
ele
=>
ele
.
value
===
item
);
newCheckList
.
push
(
checkName
);
});
}
callback
(
newCheckList
);
setCheckedList
(
list
);
setIndeterminate
(
!!
list
.
length
&&
list
.
length
<
plainOptions
.
length
);
setCheckAll
(
list
.
length
===
plainOptions
.
length
);
};
// 全选监听
const
onCheckAllChange
=
e
=>
{
let
newCheckList
=
[...
checkList
];
let
arr
;
if
(
e
.
target
.
checked
)
{
// 全选
arr
=
addData
(
checkedList
,
plainOptions
.
map
(
item
=>
item
.
value
));
arr
.
forEach
(
item
=>
{
let
checkName
=
plainOptions
.
find
(
ele
=>
ele
.
value
===
item
);
newCheckList
.
push
(
checkName
);
});
}
else
{
arr
=
delData
(
checkedList
,
[]);
arr
.
forEach
(
item
=>
{
newCheckList
.
splice
(
newCheckList
.
findIndex
(
ele
=>
ele
.
value
===
item
),
1
);
});
}
callback
(
newCheckList
);
setCheckedList
(
e
.
target
.
checked
?
plainOptions
.
map
(
item
=>
item
.
value
)
:
[]);
setIndeterminate
(
false
);
setCheckAll
(
e
.
target
.
checked
);
};
return
(
<
div
className=
{
styles
.
checkContent
}
>
<
div
className=
{
styles
.
topCheckbox
}
>
<
Checkbox
indeterminate=
{
indeterminate
}
onChange=
{
e
=>
onCheckAllChange
(
e
)
}
checked=
{
checkAll
}
>
{
cardMsg
.
level
}
</
Checkbox
>
</
div
>
<
div
className=
{
styles
.
bottomCheckbox
}
>
<
CheckboxGroup
value=
{
checkedList
}
onChange=
{
list
=>
onChange
(
list
)
}
style=
{
{
display
:
'flex'
,
flexWrap
:
'wrap'
}
}
>
{
plainOptions
.
map
(
item
=>
(
<
Checkbox
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
/* <Tooltip placement="topLeft" title={item.label}> */
}
<
span
className=
{
styles
.
fontlabel
}
>
{
item
.
label
}
</
span
>
{
/* </Tooltip> */
}
</
Checkbox
>
))
}
</
CheckboxGroup
>
</
div
>
</
div
>
);
};
export
default
CardCheck
;
This diff is collapsed.
Click to expand it.
src/components/PersonnelSelector/index.jsx
0 → 100644
View file @
8e187385
import
React
,
{
useState
,
useEffect
,
useCallback
,
useRef
}
from
'react'
;
import
{
Modal
,
Input
,
Button
,
message
,
Spin
,
Pagination
,
Table
,
Tooltip
,
Space
}
from
'antd'
;
import
{
GetGroupUserTree
}
from
'@/services/messagemanage/messagemanage'
;
import
{
getStationUsers
,
chooseUserToStation
}
from
'@/services/siteManage/api'
;
import
{
DeleteOutlined
}
from
'@ant-design/icons'
;
import
styles
from
'./index.less'
;
import
CardCheck
from
'./CardCheck'
;
const
SelectUser
=
props
=>
{
const
{
callBackSubmit
,
onCancel
,
visible
,
itemObj
}
=
props
;
const
[
allList
,
setAllist
]
=
useState
([]);
// 用于展示得数据
const
[
checkList
,
setCheckList
]
=
useState
([]);
// 选中得数据集合
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
total
,
setTotal
]
=
useState
();
const
[
currentPage
,
setCurrentPage
]
=
useState
(
1
);
const
[
pageSize
,
setPageSize
]
=
useState
(
10
);
const
[
searchName
,
setSearchName
]
=
useState
();
const
[
deleKey
,
setDeleKey
]
=
useState
();
// 删除用户的key值
const
[
delFlag
,
setDelFlag
]
=
useState
(
0
);
// 删除标识每次删除后加一
useEffect
(()
=>
{
if
(
visible
)
{
setCurrentPage
(
1
);
getInitialData
();
// getData(searchName, 1, pageSize);
}
else
{
setCheckList
([]);
setAllist
([]);
setSearchName
(
''
);
}
},
[
visible
]);
// 选中后得回调函数
const
checkCallBack
=
useCallback
(
newCheckList
=>
{
if
(
newCheckList
)
{
setCheckList
(
newCheckList
);
}
});
// 监听分页
const
paginationChange
=
(
page
,
pageSizes
)
=>
{
setCurrentPage
(
page
);
setPageSize
(
pageSizes
);
getData
(
searchName
,
page
,
pageSizes
);
};
// 获取初始数据
const
getInitialData
=
()
=>
{
let
p2
=
GetGroupUserTree
({
key
:
''
,
pageSize
:
10
,
PageIndex
:
1
,
});
setLoading
(
true
);
Promise
.
all
([
p2
]).
then
(
res
=>
{
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
,
});
}
});
});
});
setCheckList
(
checkedListAll
);
console
.
log
(
checkedListAll
);
debugger
;
}
// 数据处理成checkbox组件需要得形式
let
list
=
res
[
0
].
data
.
data
.
map
(
item
=>
{
let
indeterminate
=
false
;
let
checkedList
=
[];
let
checkAll
=
false
;
let
options
=
item
.
users
.
map
(
val
=>
{
checkedListAll
.
forEach
(
ele
=>
{
if
(
val
.
userId
===
ele
.
value
)
{
checkedList
.
push
(
ele
.
value
);
}
});
return
{
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
level
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
checkAll
=
true
;
}
if
(
checkedList
.
length
<
options
.
length
&&
checkedList
.
length
>
0
)
{
indeterminate
=
true
;
}
return
{
groupName
:
item
.
groupName
,
level
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
checkedList
,
plainOptions
:
options
,
};
});
setAllist
(
list
);
setLoading
(
false
);
}
});
};
// 提交勾选人员
const
onFinish
=
()
=>
{
let
ids
=
String
(
checkList
.
map
(
item
=>
item
.
value
));
let
text
=
String
(
checkList
.
map
(
item
=>
item
.
label
));
callBackSubmit
({
text
,
ids
,
});
};
// 搜索
const
onSearch
=
()
=>
{
setCurrentPage
(
1
);
getData
(
searchName
,
1
,
pageSize
);
};
// 重置
const
onReset
=
()
=>
{
setCurrentPage
(
1
);
getData
(
''
,
1
,
pageSize
);
setSearchName
(
''
);
};
// 搜索框监听
const
searchChange
=
e
=>
{
setSearchName
(
e
.
target
.
value
);
};
// 获取数据
const
getData
=
(
username
,
page
,
pageSizes
)
=>
{
setLoading
(
true
);
GetGroupUserTree
({
key
:
username
,
pageSize
:
pageSizes
,
PageIndex
:
page
,
})
.
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setTotal
(
res
.
data
.
count
);
// 数据处理成checkbox组件需要得形式
let
list
=
res
.
data
.
data
.
map
(
item
=>
{
let
indeterminate
=
false
;
let
checkedList
=
[];
let
checkAll
=
false
;
let
options
=
item
.
users
.
map
(
val
=>
{
checkList
.
forEach
(
ele
=>
{
if
(
val
.
userId
===
ele
.
value
)
{
checkedList
.
push
(
ele
.
value
);
}
});
return
{
label
:
val
.
userName
,
value
:
val
.
userId
,
groupName
:
item
.
groupName
,
level
:
item
.
level
,
};
});
if
(
checkedList
.
length
===
options
.
length
&&
checkedList
.
length
>
0
)
{
checkAll
=
true
;
}
if
(
checkedList
.
length
<
options
.
length
&&
checkedList
.
length
>
0
)
{
indeterminate
=
true
;
}
console
.
log
(
item
.
level
);
return
{
groupName
:
item
.
groupName
,
level
:
item
.
level
,
groupId
:
item
.
groupId
,
indeterminate
,
checkAll
,
checkedList
,
plainOptions
:
options
,
};
});
console
.
log
(
list
);
setAllist
(
list
);
}
else
{
message
.
error
(
res
.
msg
);
}
})
.
catch
(()
=>
{
setLoading
(
false
);
message
.
error
(
'网络异常,请稍后再试'
);
});
};
// 删除角色
const
deleteRol
=
key
=>
{
const
dataSource
=
[...
checkList
];
setCheckList
(
dataSource
.
filter
(
item
=>
item
.
value
!==
key
));
setDeleKey
(
key
);
setDelFlag
(
delFlag
+
1
);
};
const
columns
=
[
{
title
:
'已选用户'
,
dataIndex
:
'label'
,
key
:
'label'
,
width
:
220
,
ellipsis
:
{
showTitle
:
true
,
},
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}(${record.level})`
}
>
{
record
.
label
}
(
{
record
.
level
}
)
</
Tooltip
>
</
span
>
),
},
{
title
:
'操作'
,
align
:
'center'
,
ellipsis
:
true
,
width
:
80
,
render
:
record
=>
(
<>
<
Space
>
<
Tooltip
title=
"清除关联用户"
>
<
DeleteOutlined
onClick=
{
()
=>
deleteRol
(
record
.
value
)
}
style=
{
{
fontSize
:
'16px'
,
color
:
'#e86060'
}
}
/>
</
Tooltip
>
</
Space
>
</>
),
},
];
console
.
log
(
allList
,
'allList'
);
return
(
<>
<
Modal
title=
"用户选择"
visible=
{
visible
}
onOk=
{
onFinish
}
width=
"900px"
onCancel=
{
onCancel
}
maskClosable=
{
false
}
destroyOnClose
>
{
/* 头部搜索框 */
}
<
div
className=
{
styles
.
searchHeader
}
>
<
Input
.
Search
value=
{
searchName
}
placeholder=
"请输入部门或用户"
onChange=
{
searchChange
}
onSearch=
{
onSearch
}
enterButton
style=
{
{
width
:
'300px'
,
marginRight
:
'15px'
}
}
allowClear
/>
</
div
>
<
div
className=
{
styles
.
pushTestContent
}
>
<
div
className=
{
styles
.
leftContent
}
>
{
/* 复选框模块 */
}
<
div
className=
{
styles
.
checkScrollBox
}
>
<
Spin
spinning=
{
loading
}
>
<
div
className=
{
styles
.
checkContainer
}
>
{
allList
.
map
((
item
,
index
)
=>
(
<
div
className=
{
styles
.
checkBoxContent
}
key=
{
item
.
groupId
}
>
<
CardCheck
cardMsg=
{
item
}
cardIndex=
{
index
}
callback=
{
(
val
,
newCheckList
)
=>
checkCallBack
(
val
,
newCheckList
)
}
checkList=
{
checkList
}
deleKey=
{
deleKey
}
delFlag=
{
delFlag
}
/>
</
div
>
))
}
</
div
>
</
Spin
>
</
div
>
</
div
>
<
div
className=
{
styles
.
tableRight
}
>
<
Table
bordered
style=
{
{
width
:
'400px'
,
height
:
'100%'
}
}
rowKey=
{
record
=>
record
.
value
}
columns=
{
columns
}
dataSource=
{
checkList
}
pagination=
{
false
}
size=
"small"
scroll=
{
{
y
:
'calc(100% - 40px)'
}
}
/>
</
div
>
</
div
>
{
/* 分页 */
}
<
Pagination
total=
{
total
}
showTotal=
{
(
totals
,
range
)
=>
`第${range[0]}-${range[1]} 条/共 ${totals} 条`
}
defaultPageSize=
{
pageSize
}
pageSizeOptions=
{
[
10
,
20
,
50
,
100
]
}
defaultCurrent=
{
1
}
current=
{
currentPage
}
onChange=
{
paginationChange
}
style=
{
{
marginBottom
:
'10px'
,
width
:
'70%'
}
}
size=
"small"
showQuickJumper
showSizeChanger
/>
</
Modal
>
</>
);
};
export
default
SelectUser
;
This diff is collapsed.
Click to expand it.
src/components/PersonnelSelector/index.less
0 → 100644
View file @
8e187385
.searchHeader {
display: flex;
justify-content: space-between;
}
.pushTestContent {
display: flex;
height:500px;
.checkScrollBox {
overflow-y: scroll;
height: calc(100% - 25px);
margin: 10px 0px 0px 0px;
padding-right: 5px;
.checkContainer {
width: 100%;
overflow: hidden;
.checkContent {
display: flex;
width: 100%;
flex-direction: column;
border: 1px solid #c2cdfd;
border-radius: 5px;
margin-top: 20px;
min-height: 50px;
padding: 0 10px 10px 20px;
.ant-checkbox-wrapper {
background-color: #fff;
}
.topCheckbox {
height: 20px;
margin: -10px 0 0 0px;
line-height: 20px;
}
.topCheckbox>label :hover {
font-weight: 600;
}
.bottomCheckbox {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
.ant-checkbox-wrapper {
display: flex;
margin-left: 0;
width: 160px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top:10px;
.ant-checkbox + span {
display: flex;
}
}
.fontlabel {
display: inline-block;
width:130px;
overflow: hidden;
text-overflow: ellipsis;
// white-space: nowrap;
}
// .ant-checkbox-group-item {
// min-width: 150px !important;
// }
// .ant-checkbox-wrapper {
// min-width: 150px !important;
// }
}
.checkdiv {
display: flex;
flex-wrap: wrap;
}
}
}
}
.leftContent {
width: 100%;
}
.tableRight {
margin-left: 10px;
margin-top:10px;
.ant-spin-nested-loading {
.ant-table {
.ant-table-container {
}
}
}
}
.ant-table-body {
// height: calc(100vh - 290px);
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/gckConfig/index.jsx
0 → 100644
View file @
8e187385
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
{
CloseCircleFilled
}
from
'@ant-design/icons'
;
import
CryptoJS
from
'crypto-js'
;
import
message11
from
'../../../../assets/images/icons/消息.svg'
;
import
Yes
from
'../../../../assets/images/icons/正确.svg'
;
import
styles
from
'./index.less'
;
const
layout
=
{
labelCol
:
{
span
:
2
},
wrapperCol
:
{
span
:
21
},
};
const
tailLayout
=
{
wrapperCol
:
{
offset
:
11
,
span
:
13
},
};
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'
);
const
[
form
]
=
Form
.
useForm
();
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'
);
// 十六位十六进制数作为密钥
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1234567890000000'
);
// 解密
const
Decrypt
=
word
=>
{
let
encryptedHexStr
=
CryptoJS
.
enc
.
Hex
.
parse
(
word
);
let
srcs
=
CryptoJS
.
enc
.
Base64
.
stringify
(
encryptedHexStr
);
let
decrypt
=
CryptoJS
.
AES
.
decrypt
(
srcs
,
key
,
{
iv
,
mode
:
CryptoJS
.
mode
.
CBC
,
padding
:
CryptoJS
.
pad
.
Pkcs7
,
});
let
decryptedStr
=
decrypt
.
toString
(
CryptoJS
.
enc
.
Utf8
);
return
decryptedStr
.
toString
();
};
// 加密
const
Encrypt
=
word
=>
{
let
srcs
=
CryptoJS
.
enc
.
Utf8
.
parse
(
word
);
let
encrypted
=
CryptoJS
.
AES
.
encrypt
(
srcs
,
key
,
{
iv
,
mode
:
CryptoJS
.
mode
.
CBC
,
padding
:
CryptoJS
.
pad
.
Pkcs7
,
});
return
encrypted
.
ciphertext
.
toString
().
toUpperCase
();
};
const
onFinish
=
values
=>
{
SaveSysConfigurate
({
configName
:
'GCK平台地址'
,
configValue
:
values
.
messageAddress
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
message
.
success
(
'配置保存成功'
);
}
else
{
message
.
error
(
res
.
msg
);
}
},
);
};
useEffect
(()
=>
{
form
.
setFieldsValue
({
messageAddress
:
'127.0.0.1:8231'
});
SysConfiguration
({
moduleName
:
'GCK平台地址'
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
form
.
setFieldsValue
({
messageAddress
:
res
.
data
});
}
else
{
message
.
info
(
res
.
msg
);
}
});
},
[]);
return
(
<
div
className=
{
styles
.
gck_container
}
>
<
Card
style=
{
{
width
:
'100%'
,
height
:
'calc(100vh - 130px)'
}
}
>
<
Spin
spinning=
{
loading
}
tip=
"loading"
>
<
Form
form=
{
form
}
name=
"basic"
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
>
<
div
style=
{
{
marginTop
:
'10px'
,
display
:
'flex'
,
alignItems
:
'center'
,
}
}
>
<
img
src=
{
message11
}
style=
{
{
height
:
'16px'
}
}
alt=
""
/>
<
span
style=
{
{
marginLeft
:
'10px'
,
fontWeight
:
'bold'
}
}
>
GCK平台
</
span
>
</
div
>
<
Divider
/>
<
Form
.
Item
style=
{
{
marginLeft
:
'20px'
,
marginBottom
:
'0px'
}
}
>
<
div
style=
{
{
display
:
'flex'
,
justifyContent
:
'flex-start'
}
}
>
<
Form
.
Item
label=
"GCK平台地址"
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
:
'300px'
,
marginLeft
:
'15px'
}
}
placeholder=
"请输入服务地址"
/>
</
Form
.
Item
>
<
span
style=
{
{
display
:
show1
}
}
>
<
img
src=
{
Yes
}
style=
{
{
height
:
'24px'
,
marginLeft
:
'26px'
,
marginTop
:
'10px'
}
}
alt=
""
/>
</
span
>
<
span
style=
{
{
display
:
show2
}
}
>
<
CloseCircleFilled
style=
{
{
fontSize
:
'24px'
,
marginLeft
:
'26px'
,
marginTop
:
'10px'
}
}
/>
</
span
>
</
div
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
style=
{
{
marginLeft
:
'152px'
}
}
>
保存连接
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Spin
>
</
Card
>
</
div
>
);
};
export
default
MessageConfig
;
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/gckConfig/index.less
0 → 100644
View file @
8e187385
.gck_container{
display: flex;
height: 100%;
width: 100%;
flex-direction: row;
justify-content: flex-start;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/pages/platformCenter/hostmanager/index.jsx
View file @
8e187385
...
...
@@ -4,6 +4,7 @@ import PageContainer from '@/components/BasePageContainer';
import
BaseConfig
from
'./baseConfig/BaseConfig'
;
import
IotConfig
from
'./IotConfig/IotConfig'
;
import
MessageConfig
from
'./messageConfig/messageConfig'
;
import
GCKConfig
from
'./gckConfig/index'
;
import
ETLConfig
from
'./ETLConfig/index'
;
import
ProxyConfig
from
'./proxyConfig/ProxyConfig'
;
import
GateConfig
from
'./gateWay/gateWay'
;
...
...
@@ -23,19 +24,22 @@ const HostManager = () => {
<
TabPane
tab=
"基础配置"
key=
"1"
>
<
BaseConfig
/>
</
TabPane
>
<
TabPane
tab=
"物联配置"
key=
"2"
>
<
TabPane
tab=
"GCK平台配置"
key=
"2"
>
<
GCKConfig
/>
</
TabPane
>
<
TabPane
tab=
"物联配置"
key=
"3"
>
<
IotConfig
setActiveKey=
{
setActiveKey
}
/>
</
TabPane
>
<
TabPane
tab=
"消息配置"
key=
"
3
"
>
<
TabPane
tab=
"消息配置"
key=
"
4
"
>
<
MessageConfig
/>
</
TabPane
>
{
/* <TabPane tab="代理配置" key="4">
<ProxyConfig />
</TabPane> */
}
<
TabPane
tab=
"中台配置"
key=
"
6
"
>
<
TabPane
tab=
"中台配置"
key=
"
5
"
>
<
ETLConfig
setActiveKey=
{
setActiveKey
}
/>
</
TabPane
>
<
TabPane
tab=
"网关配置"
key=
"
5
"
>
<
TabPane
tab=
"网关配置"
key=
"
6
"
>
<
GateConfig
/>
</
TabPane
>
</
Tabs
>
...
...
This diff is collapsed.
Click to expand it.
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
8e187385
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
getLoginPage
,
getMapCofigs
,
getWebThemes
,
getProductList
}
from
'@/services/webConfig/api'
;
import
React
,
{
useState
,
useEffect
,
useRef
,
useCallback
}
from
'react'
;
import
{
getLoginPage
,
getMapCofigs
,
getWebThemes
,
getProductList
,
GetUserName
,
}
from
'@/services/webConfig/api'
;
import
{
SketchPicker
}
from
'react-color'
;
import
{
Drawer
,
...
...
@@ -19,6 +25,8 @@ import {
Switch
,
message
,
}
from
'antd'
;
import
RMSComponents
from
'@/components/RolePmSite/index'
;
import
PersonnelSelector
from
'@/components/PersonnelSelector/index'
;
import
{
PlusOutlined
,
InfoCircleOutlined
}
from
'@ant-design/icons'
;
import
TreeSelect
from
'../menuconfig/TreeSelect'
;
import
WebConfigForm
from
'./webConfigForm'
;
...
...
@@ -85,6 +93,9 @@ export default props => {
const
[
visibleChecked7
,
setVisibleChecked7
]
=
useState
(
''
);
// 地图遮罩开关
const
[
homePageConfig
,
setHomePageConfig
]
=
useState
();
const
homepageConfigRef
=
useRef
();
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
const
[
aftercare
,
setAftercare
]
=
useState
(
'请勾选不显示售后服务的用户'
);
useEffect
(()
=>
{
onGetLoginPages
();
let
text
=
[];
...
...
@@ -110,12 +121,15 @@ export default props => {
setCheckAll
(
config
.
topMenu
.
split
(
','
).
length
===
plainOptions
.
length
);
}
}
else
{
setCheckValue
([]);
setAftercare
(
'请勾选不显示售后服务的用户'
);
setCheckedList
(
defaultCheckedList
);
setIndeterminate
(
false
);
setCheckAll
(
true
);
}
if
(
visible
==
false
)
{
setCheckedList
([]);
setCheckValue
([]);
}
},
[
visible
]);
...
...
@@ -148,6 +162,7 @@ export default props => {
setVisibleChecked5
(
false
);
}
console
.
log
(
config
);
setVisibleChecked
(
config
.
navTheme
==
'light'
);
setVisibleChecked2
(
config
.
hideMap
);
setVisibleChecked4
(
config
.
messageVoice
);
...
...
@@ -173,6 +188,17 @@ export default props => {
?
config
.
headerPrimaryColor
:
'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)'
,
);
setCheckValue
(
config
.
afterSales
);
if
(
!
config
.
afterSales
||
config
.
afterSales
===
''
)
{
setAftercare
(
'请勾选不显示售后服务的用户'
);
}
GetUserName
({
userIds
:
config
.
afterSales
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
let
data
=
res
.
data
.
toString
();
setAftercare
(
data
);
form
.
setFieldsValue
({
afterSales
:
data
});
}
});
}
else
{
setColor
(
'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)'
);
setVisibleChecked
(
false
);
...
...
@@ -200,6 +226,8 @@ export default props => {
isCache
:
true
,
headerPrimaryColor
:
'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)'
,
});
setCheckValue
([]);
setAftercare
(
'请勾选不显示售后服务的用户'
);
}
}
else
{
setShowAdvanced
(
false
);
...
...
@@ -211,6 +239,8 @@ export default props => {
setVisibleChecked4
(
''
);
setVisibleChecked5
(
''
);
setHomePageConfig
([]);
setCheckValue
([]);
setAftercare
(
''
);
}
},
[
visible
]);
const
onGetLoginPages
=
()
=>
{
...
...
@@ -270,6 +300,7 @@ export default props => {
validate
.
CloudStyle
=
visibleChecked1
?
'是'
:
'否'
;
validate
.
messageMarking
=
visibleChecked3
?
'All'
:
'One'
;
validate
.
menuState
=
visibleChecked5
?
'open'
:
'close'
;
validate
.
afterSales
=
checkValue
.
toString
();
console
.
log
(
validate
);
if
(
validate
.
homePage
)
{
...
...
@@ -370,6 +401,12 @@ export default props => {
setVisibleChecked7
(
e
);
};
const
rolCallBack
=
useCallback
(
list
=>
{
setAddVisible
(
false
);
setAftercare
(
list
.
text
===
''
?
'请勾选不显示售后服务的用户'
:
list
.
text
);
setCheckValue
(
list
.
ids
);
});
return
(
<
Drawer
title
=
{
isEdit
?
'查看/编辑网站配置'
:
'新增网站'
}
...
...
@@ -631,6 +668,30 @@ export default props => {
</Option>
</Select>
</Form.Item> */
}
<
Form
.
Item
label
=
"售后服务"
>
<
div
style
=
{{
border
:
'2px solid #6A98FA'
,
minHeight
:
'34px'
,
lineHeight
:
'34px'
,
padding
:
'0px 10px'
,
width
:
'100%'
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
}}
onClick
=
{()
=>
{
setAddVisible
(
true
);
}}
>
<
span
style
=
{{
color
:
checkValue
&&
checkValue
.
length
>
0
?
'black'
:
'#dcdcdc'
}}
>
<
Tooltip
title
=
{
checkValue
&&
checkValue
.
length
>
0
?
aftercare
:
''
}
>
{
aftercare
}
<
/Tooltip
>
<
/span
>
<
/div
>
<
/Form.Item
>
<
Form
.
Item
label
=
"二维码地址"
name
=
"qrcode"
>
<
Input
placeholder
=
"请输入二维码地址"
autoComplete
=
"off"
/>
<
/Form.Item
>
...
...
@@ -718,6 +779,25 @@ export default props => {
setShowParmarModal
(
false
);
}}
/
>
{
/* <RMSComponents
visible={addVisible}
onCancel={() => {
setAddVisible(false);
}}
callBackSubmit={roleList => rolCallBack(roleList)}
newCheckedList={checkValue.toString().split(',')} // 单选框中的值
groupName="角色" // 打开组件展示的分组名,用来首次获取数据
chooseGroupName={['角色']} // 可选分组名
dataType="id"
/> */
}
<
PersonnelSelector
visible
=
{
addVisible
}
onCancel
=
{()
=>
{
setAddVisible
(
false
);
}}
callBackSubmit
=
{
roleList
=>
rolCallBack
(
roleList
)}
itemObj
=
{
checkValue
&&
checkValue
.
toString
().
split
(
','
)}
// 单选框中的值
/
>
<
/Drawer
>
);
};
This diff is collapsed.
Click to expand it.
src/services/hostmanager/hostmanager.js
View file @
8e187385
...
...
@@ -104,3 +104,5 @@ export const NginxCacheOLD = param =>
post
(
`
${
CITY_SERVICE
}
/MessagePlatform.svc/MessageManage/NginxCache`
,
param
);
export
const
ReloadNginxOLD
=
param
=>
post
(
`
${
CITY_SERVICE
}
/MessagePlatform.svc/MessageManage/ReloadNginx`
,
param
);
export
const
SysConfiguration
=
param
=>
get
(
`/PandaCore/GCK/Common/SysConfiguration`
,
param
);
export
const
SaveSysConfigurate
=
param
=>
get
(
`/PandaCore/GCK/Common/SaveSysConfigurate`
,
param
);
This diff is collapsed.
Click to expand it.
src/services/webConfig/api.js
View file @
8e187385
...
...
@@ -339,3 +339,5 @@ export const GetWebMenuInfo = param => get(`${PUBLISH_SERVICE}/WebSite/GetWebMen
export
const
SortScheme
=
param
=>
get
(
`
${
PANDA_GIS
}
/MapLayer/SortScheme`
,
param
);
export
const
SortSchemePost
=
param
=>
post
(
`
${
PANDA_GIS
}
/MapLayer/SortSchemePost`
,
param
);
export
const
GetUserName
=
param
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/GetUserName`
,
param
);
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