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
9bf4df9c
Commit
9bf4df9c
authored
Nov 03, 2020
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(pages/usercenter/sitemanage): 站点管理
parent
4332da74
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
262 additions
and
6 deletions
+262
-6
BasicLayout.js
src/layouts/BasicLayout.js
+2
-2
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+1
-0
ManagementDataBase.jsx
src/pages/database/ManagementDataBase.jsx
+10
-1
DefaultComponent.jsx
src/pages/orgnazation/DefaultComponent.jsx
+24
-0
ListCard.jsx
src/pages/orgnazation/ListCard.jsx
+8
-2
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+64
-0
SiteManage.less
src/pages/userCenter/siteManage/SiteManage.less
+4
-0
config.js
src/routes/config.js
+1
-1
menuConfig.js
src/routes/menuConfig.js
+137
-0
api.js
src/services/database/api.js
+0
-0
api.js
src/services/userCenter/siteManage/api.js
+11
-0
No files found.
src/layouts/BasicLayout.js
View file @
9bf4df9c
...
@@ -48,9 +48,9 @@ const BasicLayout = props => {
...
@@ -48,9 +48,9 @@ const BasicLayout = props => {
style
=
{{
height
:
'100vh'
}}
style
=
{{
height
:
'100vh'
}}
onCollapse
=
{
handleMenuCollapse
}
onCollapse
=
{
handleMenuCollapse
}
onMenuHeaderClick
=
{()
=>
{}}
onMenuHeaderClick
=
{()
=>
{}}
footerRender
=
{()
=>
defaultFooterDom
}
//
footerRender={() => defaultFooterDom}
rightContentRender
=
{()
=>
<
RightContent
/>
}
rightContentRender
=
{()
=>
<
RightContent
/>
}
title
=
"熊猫运维
系统
"
title
=
"熊猫运维
平台
"
route
=
{
route
=
{
{
{
// routes: config.routes,
// routes: config.routes,
...
...
src/pages/database/InitDataBase.jsx
View file @
9bf4df9c
...
@@ -196,6 +196,7 @@ const InitDataBase = props => {
...
@@ -196,6 +196,7 @@ const InitDataBase = props => {
};
};
// 点击表格回显到表单
// 点击表格回显到表单
const
tableClick
=
item
=>
{
const
tableClick
=
item
=>
{
console
.
log
(
item
)
let
obj
=
{
...
dbForm
};
let
obj
=
{
...
dbForm
};
Object
.
keys
(
obj
).
forEach
(
k
=>
{
Object
.
keys
(
obj
).
forEach
(
k
=>
{
obj
[
k
]
=
item
[
k
];
obj
[
k
]
=
item
[
k
];
...
...
src/pages/database/ManagementDataBase.jsx
View file @
9bf4df9c
...
@@ -77,6 +77,11 @@ const ManagementDataBase = () => {
...
@@ -77,6 +77,11 @@ const ManagementDataBase = () => {
console
.
log
(
'updatedb'
);
console
.
log
(
'updatedb'
);
};
};
const
handleLog
=
text
=>
{
const
handleLog
=
text
=>
{
let
arr
=
[]
arr
.
push
(
text
.
split
(
/
[
(
\r\n
)
\r\n]
+/
).
map
(
item
=>
{
return
(<
p
>
$
{
item
}
</
p
>)
}))
setModalVisible
(
true
);
setModalVisible
(
true
);
setContent
(
text
);
setContent
(
text
);
};
};
...
@@ -155,6 +160,7 @@ const ManagementDataBase = () => {
...
@@ -155,6 +160,7 @@ const ManagementDataBase = () => {
key
:
'content'
,
key
:
'content'
,
ellipsis
:
true
,
ellipsis
:
true
,
render
:
text
=>
{
render
:
text
=>
{
return
(
return
(
<
Button
<
Button
size=
'small'
size=
'small'
...
@@ -226,8 +232,11 @@ const ManagementDataBase = () => {
...
@@ -226,8 +232,11 @@ const ManagementDataBase = () => {
onCancel=
{
()
=>
setModalVisible
(
false
)
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
width=
"1000px"
width=
"1000px"
bodyStyle=
{
{
bodyStyle=
{
{
minHeight
:
'100px'
minHeight
:
'100px'
,
maxHeight
:
'600px'
,
overflowY
:
'scroll'
}
}
}
}
style=
{
{
top
:
"40px"
}
}
footer=
{
[
footer=
{
[
<
Button
type=
'primary'
onClick=
{
()
=>
setModalVisible
(
false
)
}
>
关闭窗口
</
Button
>,
<
Button
type=
'primary'
onClick=
{
()
=>
setModalVisible
(
false
)
}
>
关闭窗口
</
Button
>,
]
}
]
}
...
...
src/pages/orgnazation/DefaultComponent.jsx
View file @
9bf4df9c
...
@@ -182,6 +182,11 @@ const DefaultComponent = ()=> {
...
@@ -182,6 +182,11 @@ const DefaultComponent = ()=> {
const
btnLable
=
[
const
btnLable
=
[
{
label
:
'查找用户'
,
handle
:
handleSearch
,
config
:{
type
:
'primary'
,
danger
:
true
}
},
{
label
:
'查找用户'
,
handle
:
handleSearch
,
config
:{
type
:
'primary'
,
danger
:
true
}
},
{
label
:
'用户导入'
,
handle
:
handleImport
,
config
:{
type
:
'info'
,}},
{
label
:
'用户导入'
,
handle
:
handleImport
,
config
:{
type
:
'info'
,}},
<
<<<<<<
Updated
upstream
=======
{
label
:'新建用户',
handle
:'
newHandle
'},
{
label
:'批量关联',
handle
:'
relHandle
'}
>
>>>>>>
Stashed changes
]
]
return (
return (
...
@@ -189,7 +194,11 @@ const DefaultComponent = ()=> {
...
@@ -189,7 +194,11 @@ const DefaultComponent = ()=> {
<
PageContainer
>
<
PageContainer
>
<
Card
>
<
Card
>
<
Row
>
<
Row
>
<
<<<<<<
Updated
upstream
<
Col
span
={1}
>
<
Col
span
={1}
>
=======
<
Col
span
={2}
>
>>>>>>>
Stashed changes
<
div
style=
{
{
height
:
"30px"
,
lineHeight
:
"30px"
}
}
>
<
div
style=
{
{
height
:
"30px"
,
lineHeight
:
"30px"
}
}
>
机构选择
机构选择
</
div
>
</
div
>
...
@@ -211,6 +220,7 @@ const DefaultComponent = ()=> {
...
@@ -211,6 +220,7 @@ const DefaultComponent = ()=> {
/> */
}
/> */
}
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
<<<<<<
Updated
upstream
<
div
style=
{
{
marginTop
:
'20px'
,
textAlign
:
'center'
}
}
>
<
div
style=
{
{
marginTop
:
'20px'
,
textAlign
:
'center'
}
}
>
<
Space
>
<
Space
>
{
{
...
@@ -223,6 +233,20 @@ const DefaultComponent = ()=> {
...
@@ -223,6 +233,20 @@ const DefaultComponent = ()=> {
}
}
</
Space
>
</
Space
>
</
div
>
</
div
>
=======
</
Card
>
<
Card
>
<
Space
>
{
btnLable
&&
btnLable
.
map
(
(
item
,
index
)
=>
{
const
{
config
}
=
item
return
(
<
Button
key=
{
index
}
{
...
config
}
onClick
={
()=
>
{
item
.
handle
&&
typeof
item
.
handle
===
'function'
&&
item
.
handle
()
}
}
>
{
item
.
label
}
</
Button
>
)
})
}
</
Space
>
>>>>>>>
Stashed changes
<
TestModal
<
TestModal
title=
'用户选择'
title=
'用户选择'
visible
=
{
modalVisible
}
visible
=
{
modalVisible
}
...
...
src/pages/orgnazation/ListCard.jsx
View file @
9bf4df9c
...
@@ -3,6 +3,8 @@ import ListCardItem from './listCardItem'
...
@@ -3,6 +3,8 @@ import ListCardItem from './listCardItem'
import
{
get
,
post
}
from
'../../services'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
orgTest
}
from
'../../services/orgnazation/api'
import
{
orgTest
}
from
'../../services/orgnazation/api'
const
ListCard
=
(
props
)
=>
{
const
ListCard
=
(
props
)
=>
{
const
{
ouid
}
=
props
console
.
log
(
ouid
)
const
[
valueList
,
setValueList
]
=
useState
([])
const
[
valueList
,
setValueList
]
=
useState
([])
const
[
testList
,
setTestList
]
=
useState
([])
const
[
testList
,
setTestList
]
=
useState
([])
const
{
optionsList
}
=
props
const
{
optionsList
}
=
props
...
@@ -19,7 +21,11 @@ const ListCard = (props) =>{
...
@@ -19,7 +21,11 @@ const ListCard = (props) =>{
title
:
'默认组'
,
title
:
'默认组'
,
id
:
''
,
id
:
''
,
}
}
get
(
"/Cityinterface/rest/services/OMS.svc/U_GetUserListForBatchOper?OUID=24&_version=9999&_dc=1603781551787"
).
then
(
res
=>
{
get
(
"/Cityinterface/rest/services/OMS.svc/U_GetUserListForBatchOper"
,{
OUID
:
ouid
||
''
,
_version
:
9999
,
_dc
:
new
Date
().
getTime
()
}).
then
(
res
=>
{
const
list
=
[]
const
list
=
[]
res
&&
res
.
map
(
item
=>
{
res
&&
res
.
map
(
item
=>
{
list
.
push
({...
defaultConfig
,...
item
})
list
.
push
({...
defaultConfig
,...
item
})
...
@@ -30,7 +36,7 @@ const ListCard = (props) =>{
...
@@ -30,7 +36,7 @@ const ListCard = (props) =>{
orgTest
().
then
(
res
=>
{
orgTest
().
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
console
.
log
(
res
,
'res'
)
})
})
},[])
},[
ouid
])
return
(
return
(
<>
<>
{
{
...
...
src/pages/userCenter/siteManage/SiteManage.jsx
0 → 100644
View file @
9bf4df9c
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Row
,
Col
,
Tree
,
Card
}
from
'antd'
;
import
{
DownOutlined
}
from
'@ant-design/icons'
;
import
{
PageContainer
,
GridContent
}
from
'@ant-design/pro-layout'
;
import
{
getOUTree
}
from
'@/services/userCenter/siteManage/api'
;
import
ListCard
from
'@/pages/orgnazation/ListCard'
;
import
styles
from
'@/pages/userCenter/siteManage/SiteManage.less'
const
SiteManage
=
()
=>
{
const
[
treeData
,
setTreeData
]
=
useState
([])
const
[
ouid
,
setOuid
]
=
useState
(
''
)
//点击树的回调
const
handleTreeSelect
=
(
e
)
=>
{
console
.
log
(
e
)
let
id
=
e
[
0
]
setOuid
(
id
)
}
useEffect
(()
=>
{
getOUTree
().
then
(
res
=>
{
let
arr
=
transTree
(
res
)
setTreeData
(
arr
)
})
},[])
const
transTree
=
(
val
)
=>
{
let
arr
=
val
return
arr
.
map
(
item
=>
{
item
.
title
=
item
.
text
item
.
key
=
item
.
id
let
obj
=
{}
if
(
Array
.
isArray
(
item
.
children
)
&&
item
.
children
.
length
>
0
){
transTree
(
item
.
children
)
return
obj
=
item
}
else
{
return
item
}
})
}
return
(
<
PageContainer
>
<
GridContent
>
<
Row
gutter=
{
12
}
>
<
Col
lg=
{
6
}
md=
{
24
}
>
<
Card
className=
{
styles
.
cardBox
}
>
<
Tree
showLine
showIcon=
{
<
DownOutlined
/>
}
onSelect=
{
(
e
)
=>
handleTreeSelect
(
e
)
}
treeData=
{
treeData
}
/>
</
Card
>
</
Col
>
<
Col
lg=
{
18
}
md=
{
24
}
>
<
Card
className=
{
styles
.
cardBox
}
>
<
ListCard
ouid=
{
ouid
}
></
ListCard
>
</
Card
>
</
Col
>
</
Row
>
</
GridContent
>
</
PageContainer
>
)
}
export
default
SiteManage
src/pages/userCenter/siteManage/SiteManage.less
0 → 100644
View file @
9bf4df9c
.cardBox{
min-height: calc(100vh - 200px);
}
\ No newline at end of file
src/routes/config.js
View file @
9bf4df9c
...
@@ -18,7 +18,7 @@ import InitDataBase from '../pages/database/InitDataBase';
...
@@ -18,7 +18,7 @@ import InitDataBase from '../pages/database/InitDataBase';
import
ManagementDataBase
from
'../pages/database/ManagementDataBase'
;
import
ManagementDataBase
from
'../pages/database/ManagementDataBase'
;
import
UserManage
from
'../pages/userCenter/UserManage'
;
import
UserManage
from
'../pages/userCenter/UserManage'
;
import
RoleManage
from
'../pages/userCenter/RoleManage'
;
import
RoleManage
from
'../pages/userCenter/RoleManage'
;
import
SiteManage
from
'../pages/userCenter/SiteManage'
;
import
SiteManage
from
'../pages/userCenter/
siteManage/
SiteManage'
;
// import DefaultComponent from '../pages/orgnazation/DefaultComponent';
// import DefaultComponent from '../pages/orgnazation/DefaultComponent';
import
TestTable
from
'../pages/orgnazation/TestTable'
;
import
TestTable
from
'../pages/orgnazation/TestTable'
;
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
...
...
src/routes/menuConfig.js
0 → 100644
View file @
9bf4df9c
import
React
from
'react'
;
import
{
DatabaseOutlined
,
UsergroupAddOutlined
,
SettingOutlined
,
HomeOutlined
,
// AndroidOutlined,
// CommentOutlined,
CopyOutlined
,
}
from
'@ant-design/icons'
;
const
iconStyle
=
{
verticalAlign
:
'0.125em'
};
const
menuConfig
=
[
{
path
:
'/dbm'
,
component
:
'BasicLayout'
,
name
:
'数据库管理'
,
icon
:
<
DatabaseOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/dbm/dbInit'
,
name
:
'数据库初始化'
,
},
{
path
:
'/dbm/dbsm'
,
name
:
'数据库标准化管理'
,
},
],
},
{
path
:
'/userCenter'
,
component
:
'BasicLayout'
,
name
:
'用户中心'
,
icon
:
<
UsergroupAddOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/userCenter/UserManage'
,
name
:
'用户管理'
,
},
{
path
:
'/userCenter/RoleManage'
,
name
:
'角色管理'
,
},
{
path
:
'/userCenter/SiteManage'
,
name
:
'站点管理'
,
},
{
path
:
'/userCenter/testTable'
,
name
:
'测试表格'
,
},
],
},
{
path
:
'/platformCenter'
,
component
:
'BasicLayout'
,
name
:
'平台中心'
,
icon
:
<
SettingOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/platformCenter/gis'
,
name
:
'GIS平台'
,
},
{
path
:
'/platformCenter/order'
,
name
:
'工单平台'
,
},
{
path
:
'/platformCenter/notify'
,
name
:
'消息平台'
,
},
{
path
:
'/platformCenter/iot'
,
name
:
'物联平台'
,
},
{
path
:
'/platformCenter/vedio'
,
name
:
'视频管理'
,
},
{
path
:
'/platformCenter/emq'
,
name
:
'宿主管理'
,
},
{
path
:
'/platformCenter/dictionary'
,
name
:
'数据字典'
,
},
],
},
{
path
:
'/productCenter'
,
component
:
'BasicLayout'
,
name
:
'产品中心'
,
icon
:
<
HomeOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/productCenter/web'
,
name
:
'web配置'
,
},
{
path
:
'/productCenter/app'
,
name
:
'app配置'
,
},
{
path
:
'/productCenter/miniProgram'
,
name
:
'小程序配置'
,
},
],
},
{
path
:
'/log'
,
component
:
'BasicLayout'
,
name
:
'日志管理'
,
icon
:
<
CopyOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
{
path
:
'/log/service'
,
name
:
'服务日志'
,
},
{
path
:
'/log/login'
,
name
:
'登录日志'
,
},
{
path
:
'/log/omsOperation'
,
name
:
'运维操作日志'
,
},
{
path
:
'/log/omsError'
,
name
:
'运维错误日志'
,
},
],
},
];
export
default
menuConfig
;
src/services/database/api.js
0 → 100644
View file @
9bf4df9c
src/services/userCenter/siteManage/api.js
0 → 100644
View file @
9bf4df9c
import
{
get
,
post
}
from
'@/services/index'
;
/*
** params
*/
// 获取机构树
export
const
getOUTree
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/U_GetOUTree?_version=9999&node=-1'
,
params
,
);
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