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
ac33f5ff
Commit
ac33f5ff
authored
Nov 03, 2020
by
张烨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://g.civnet.cn:8443/test/maintenance
parents
3beb940c
96adcb22
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
680 additions
and
123 deletions
+680
-123
panda-logo.svg
src/assets/images/logo/panda-logo.svg
+39
-0
panda-logo2.png
src/assets/images/logo/panda-logo2.png
+0
-0
BasicLayout.js
src/layouts/BasicLayout.js
+7
-4
UserLayout.js
src/layouts/UserLayout.js
+4
-3
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+30
-24
InitDataBase.less
src/pages/database/InitDataBase.less
+10
-0
ManagementDataBase.jsx
src/pages/database/ManagementDataBase.jsx
+27
-18
ManagementDataBase.less
src/pages/database/ManagementDataBase.less
+10
-0
DefaultComponent.jsx
src/pages/orgnazation/DefaultComponent.jsx
+89
-42
ListCard.jsx
src/pages/orgnazation/ListCard.jsx
+5
-7
ListCardItem.less
src/pages/orgnazation/ListCardItem.less
+18
-11
TestTable.jsx
src/pages/orgnazation/TestTable.jsx
+97
-0
listCardItem.jsx
src/pages/orgnazation/listCardItem.jsx
+5
-5
index.js
src/pages/user/login/index.js
+3
-3
RoleManage.js
src/pages/userCenter/RoleManage.js
+24
-0
SiteManage.js
src/pages/userCenter/SiteManage.js
+24
-0
UserManage.js
src/pages/userCenter/UserManage.js
+228
-0
UserManage.less
src/pages/userCenter/UserManage.less
+13
-0
config.js
src/routes/config.js
+23
-4
menuConfig.js
src/routes/menuConfig.js
+10
-2
api.js
src/services/orgnazation/api.js
+14
-0
No files found.
src/assets/images/logo/panda-logo.svg
0 → 100644
View file @
ac33f5ff
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg
version=
"1.1"
id=
"图层_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
width=
"57.468px"
height=
"30px"
viewBox=
"0 0 57.468 30"
enable-background=
"new 0 0 57.468 30"
xml:space=
"preserve"
>
<g>
<g>
<linearGradient
id=
"SVGID_1_"
gradientUnits=
"userSpaceOnUse"
x1=
"-0.0376"
y1=
"9.8105"
x2=
"48.2442"
y2=
"34.4248"
>
<stop
offset=
"0"
style=
"stop-color:#1E99D7"
/>
<stop
offset=
"1"
style=
"stop-color:#49AF86"
/>
</linearGradient>
<path
fill=
"url(#SVGID_1_)"
d=
"M28.733,22.787c-0.76,0-1.485,0.1-2.144,0.271l0,0c-0.003,0-0.009,0.002-0.011,0.004
c-0.133,0.033-0.262,0.076-0.39,0.117c-2.221,0.521-5.448-1.268-2.83-4.58l-0.011-0.006c1.484-2.158,1.97-4.486,1.083-6.425
c-1.697-3.708-7.754-4.566-13.525-1.923c-5.772,2.648-9.072,7.797-7.375,11.502c1.698,3.707,7.753,4.568,13.525,1.918
c0.185-0.082,0.36-0.18,0.538-0.268v0.01c2.9-1.629,5.677,0.705,5.545,2.686c-0.014,0.1-0.023,0.199-0.023,0.303
c0,1.99,2.515,3.604,5.617,3.604c3.103,0,5.617-1.613,5.617-3.604C34.35,24.402,31.836,22.787,28.733,22.787z"
/>
</g>
<g>
<linearGradient
id=
"SVGID_2_"
gradientUnits=
"userSpaceOnUse"
x1=
"3.2749"
y1=
"3.3135"
x2=
"51.5636"
y2=
"27.9313"
>
<stop
offset=
"0"
style=
"stop-color:#1E99D7"
/>
<stop
offset=
"1"
style=
"stop-color:#49AF86"
/>
</linearGradient>
<path
fill=
"url(#SVGID_2_)"
d=
"M7.842,8.285c3.108-1.636,4.775-4.581,3.721-6.576c-1.051-1.997-4.422-2.283-7.528-0.65
c-3.107,1.636-4.771,4.584-3.72,6.578C1.364,9.631,4.737,9.921,7.842,8.285z"
/>
</g>
<g>
<linearGradient
id=
"SVGID_3_"
gradientUnits=
"userSpaceOnUse"
x1=
"8.6138"
y1=
"-7.1582"
x2=
"56.8952"
y2=
"17.4559"
>
<stop
offset=
"0"
style=
"stop-color:#1E99D7"
/>
<stop
offset=
"1"
style=
"stop-color:#49AF86"
/>
</linearGradient>
<path
fill=
"url(#SVGID_3_)"
d=
"M53.433,1.058c-3.106-1.633-6.479-1.346-7.531,0.65c-0.787,1.498-0.047,3.527,1.688,5.145l0,0
c1.232,1.51,0.55,3.728-1.991,2.99c-0.203-0.08-0.406-0.148-0.611-0.217c-0.037-0.018-0.071-0.026-0.11-0.044
c-0.32-0.144-0.554-0.21-0.739-0.231c-4.955-1.445-9.642-0.369-11.102,2.818c-1.699,3.709,1.603,8.855,7.373,11.498
c5.771,2.65,11.827,1.789,13.525-1.918c1.195-2.605-0.09-5.921-2.959-8.583c-0.004-0.002-0.007-0.009-0.012-0.013
c-1.701-1.924-1.368-4.611,0.33-4.18c0.058,0.018,0.117,0.036,0.176,0.053c0.02,0.009,0.04,0.009,0.061,0.018V9.04
c2.475,0.688,4.787,0.188,5.624-1.404C58.205,5.642,56.54,2.694,53.433,1.058z"
/>
</g>
</g>
</svg>
src/assets/images/logo/panda-logo2.png
0 → 100644
View file @
ac33f5ff
This diff was suppressed by a .gitattributes entry.
src/layouts/BasicLayout.js
View file @
ac33f5ff
...
@@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
...
@@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
import
ProLayout
,
{
DefaultFooter
}
from
'@ant-design/pro-layout'
;
import
ProLayout
,
{
DefaultFooter
}
from
'@ant-design/pro-layout'
;
import
menuConfig
from
'../routes/menuConfig'
;
import
menuConfig
from
'../routes/menuConfig'
;
import
logo
from
'../assets/logo.svg'
;
import
logo
from
'../assets/
images/logo/panda-
logo.svg'
;
import
RightContent
from
'../components/GlobalHeader/RightContent'
;
import
RightContent
from
'../components/GlobalHeader/RightContent'
;
// const noMatch = (
// const noMatch = (
...
@@ -22,7 +22,7 @@ import RightContent from '../components/GlobalHeader/RightContent';
...
@@ -22,7 +22,7 @@ import RightContent from '../components/GlobalHeader/RightContent';
const
defaultFooterDom
=
(
const
defaultFooterDom
=
(
<
DefaultFooter
<
DefaultFooter
copyright
=
{
`
${
new
Date
().
getFullYear
()}
熊猫智慧水务技术委员会出品`
}
copyright
=
{
`
${
new
Date
().
getFullYear
()}
熊猫智慧水务技术委员会出品`
}
links
=
{
[]
}
links
=
{
false
}
/
>
/
>
);
);
...
@@ -39,11 +39,14 @@ const BasicLayout = props => {
...
@@ -39,11 +39,14 @@ const BasicLayout = props => {
matchRoutes
(
props
.
route
.
routes
,
props
.
location
.
pathname
);
matchRoutes
(
props
.
route
.
routes
,
props
.
location
.
pathname
);
return
(
return
(
<
ProLayout
<
ProLayout
logo
=
{
logo
}
logo
=
{()
=>
(
<
img
src
=
{
logo
}
style
=
{{
width
:
'32px'
,
height
:
'32px'
}}
alt
=
""
/>
)}
onCollapse
=
{
handleMenuCollapse
}
onCollapse
=
{
handleMenuCollapse
}
onMenuHeaderClick
=
{()
=>
{}}
onMenuHeaderClick
=
{()
=>
{}}
//
footerRender={() => defaultFooterDom}
footerRender
=
{()
=>
defaultFooterDom
}
rightContentRender
=
{()
=>
<
RightContent
/>
}
rightContentRender
=
{()
=>
<
RightContent
/>
}
title
=
"熊猫运维系统"
route
=
{
route
=
{
{
{
// routes: config.routes,
// routes: config.routes,
...
...
src/layouts/UserLayout.js
View file @
ac33f5ff
...
@@ -9,7 +9,7 @@ import {
...
@@ -9,7 +9,7 @@ import {
getPageTitle
,
getPageTitle
,
}
from
'@ant-design/pro-layout'
;
}
from
'@ant-design/pro-layout'
;
import
logo
from
'../assets/logo.svg'
;
import
logo
from
'../assets/
images/logo/panda-
logo.svg'
;
import
styles
from
'./UserLayout.less'
;
import
styles
from
'./UserLayout.less'
;
const
UserLayout
=
props
=>
{
const
UserLayout
=
props
=>
{
...
@@ -40,16 +40,17 @@ const UserLayout = props => {
...
@@ -40,16 +40,17 @@ const UserLayout = props => {
<
div
className
=
{
styles
.
top
}
>
<
div
className
=
{
styles
.
top
}
>
<
div
className
=
{
styles
.
header
}
>
<
div
className
=
{
styles
.
header
}
>
<
img
alt
=
"logo"
className
=
{
styles
.
logo
}
src
=
{
logo
}
/
>
<
img
alt
=
"logo"
className
=
{
styles
.
logo
}
src
=
{
logo
}
/
>
<
span
className
=
{
styles
.
title
}
>
Ant
Design
<
/span
>
<
span
className
=
{
styles
.
title
}
>
熊猫水务运维平台
<
/span
>
<
/div
>
<
/div
>
<
div
className
=
{
styles
.
desc
}
>
<
div
className
=
{
styles
.
desc
}
>
Ant
Design
是西湖区最具影响力的
Web
设计规范
{
/* Ant Design 是西湖区最具影响力的 Web 设计规范 */
}
<
/div
>
<
/div
>
<
/div
>
<
/div
>
{
renderRoutes
(
route
.
routes
)}
{
renderRoutes
(
route
.
routes
)}
<
/div
>
<
/div
>
<
DefaultFooter
<
DefaultFooter
copyright
=
{
`
${
new
Date
().
getFullYear
()}
熊猫智慧水务技术委员会出品`
}
copyright
=
{
`
${
new
Date
().
getFullYear
()}
熊猫智慧水务技术委员会出品`
}
links
=
{[]}
/
>
/
>
<
/div
>
<
/div
>
<
/HelmetProvider
>
<
/HelmetProvider
>
...
...
src/pages/database/InitDataBase.jsx
View file @
ac33f5ff
...
@@ -14,6 +14,7 @@ import {
...
@@ -14,6 +14,7 @@ import {
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
get
,
post
}
from
'../../services'
;
import
styles
from
'./InitDataBase.less'
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
formLables
=
{
const
formLables
=
{
...
@@ -167,15 +168,16 @@ const InitDataBase = props => {
...
@@ -167,15 +168,16 @@ const InitDataBase = props => {
dataIndex
:
'name'
,
dataIndex
:
'name'
,
key
:
'name'
,
key
:
'name'
,
render
:
()
=>
{
render
:
()
=>
{
return
<
button
onClick=
{
()
=>
{
changeDesc
()}
}
>
修改描述
</
b
utton
>;
return
<
Button
type=
'primary'
size=
'small'
onClick=
{
()
=>
{
changeDesc
()}
}
>
修改描述
</
B
utton
>;
},
},
},
},
{
{
title
:
'删除'
,
title
:
'删除'
,
dataIndex
:
'name'
,
dataIndex
:
'name'
,
key
:
'name'
,
key
:
'name'
,
render
:
()
=>
{
render
:
()
=>
{
return
<
button
>
删除
</
b
utton
>;
return
<
Button
size=
'small'
danger
>
删除
</
B
utton
>;
},
},
},
},
];
];
...
@@ -183,9 +185,9 @@ const InitDataBase = props => {
...
@@ -183,9 +185,9 @@ const InitDataBase = props => {
<>
<>
<
PageContainer
>
<
PageContainer
>
<
Card
>
<
Card
>
<
div
>
数据库初始化
</
div
>
<
div
className=
{
styles
.
tableTitle
}
>
数据库初始化
</
div
>
<
div
/>
<
Form
<
Form
className=
{
styles
.
mgTop20
}
layout=
"horizontal"
layout=
"horizontal"
labelAlign=
"left"
labelAlign=
"left"
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
3
}
}
...
@@ -194,18 +196,18 @@ const InitDataBase = props => {
...
@@ -194,18 +196,18 @@ const InitDataBase = props => {
onValuesChange=
{
onValuesChange
}
onValuesChange=
{
onValuesChange
}
>
>
<
Form
.
Item
label=
{
`${formLables.ip}:`
}
name=
"ip"
>
<
Form
.
Item
label=
{
`${formLables.ip}:`
}
name=
"ip"
>
<
Input
placeholder=
"请输入"
/>
<
Input
placeholder=
"请输入
服务器名或IP地址
"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.userName}:`
}
name=
"userName"
>
<
Form
.
Item
label=
{
`${formLables.userName}:`
}
name=
"userName"
>
<
Input
placeholder=
"请输入"
/>
<
Input
placeholder=
"请输入
用户名称
"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.password}:`
}
name=
"password"
>
<
Form
.
Item
label=
{
`${formLables.password}:`
}
name=
"password"
>
<
Input
placeholder=
"请输入"
/>
<
Input
placeholder=
"请输入
用户密码
"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.dbName}:`
}
name=
"dbName"
>
<
Form
.
Item
label=
{
`${formLables.dbName}:`
}
name=
"dbName"
>
<
Select
<
Select
showSearch
showSearch
placeholder=
"请选择"
placeholder=
"请选择
数据库
"
optionFilterProp=
"children"
optionFilterProp=
"children"
onFocus=
{
()
=>
{
onFocus=
{
()
=>
{
selectFocus
();
selectFocus
();
...
@@ -230,27 +232,24 @@ const InitDataBase = props => {
...
@@ -230,27 +232,24 @@ const InitDataBase = props => {
</
Select
>
</
Select
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Form
.
Item
>
<
Space
size=
"large"
>
<
div
className=
{
styles
.
tCenter
}
>
<
Button
onClick=
{
onCheck
}
>
测试连接
</
Button
>
<
Space
size=
"large"
>
<
Button
htmlType=
"submit"
>
保存连接
</
Button
>
<
Button
onClick=
{
onCheck
}
>
测试连接
</
Button
>
<
Button
htmlType=
"reset"
onClick=
{
()
=>
{
initClick
()}
}
>
<
Button
type=
'primary'
htmlType=
"submit"
>
保存连接
</
Button
>
数据库初始化
<
Button
type=
'primary'
danger
htmlType=
"reset"
onClick=
{
()
=>
{
initClick
()}
}
>
</
Button
>
数据库初始化
</
Space
>
</
Button
>
<
span
>
{
dbForm
.
inUse
}
</
span
>
<
span
>
{
dbForm
.
inUse
}
</
span
>
</
Space
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* <div className={`btnBox`}>
<Button onClick={onCheck}>测试连接</Button>
<Button>保存连接</Button>
<Button>数据库初始化</Button>
<span>(产品方案(物联GCK))</span>
</div> */
}
</
Form
>
</
Form
>
</
Card
>
</
Card
>
<
Card
>
<
Card
className=
{
styles
.
mgTop20
}
>
<
div
>
近期保存的数据库连接
</
div
>
<
div
className=
{
styles
.
tableTitle
}
>
近期保存的数据库连接
</
div
>
<
Table
<
Table
style=
{
{
marginTop
:
'20px'
}
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
data
}
dataSource=
{
data
}
bordered
bordered
...
@@ -270,6 +269,13 @@ const InitDataBase = props => {
...
@@ -270,6 +269,13 @@ const InitDataBase = props => {
maskClosable
maskClosable
onOk=
{
()
=>
setModalVisible
(
false
)
}
onOk=
{
()
=>
setModalVisible
(
false
)
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
width=
"1000px"
bodyStyle=
{
{
minHeight
:
'100px'
}
}
footer=
{
<
Button
type=
'primary'
onClick=
{
()
=>
setModalVisible
(
false
)
}
>
关闭窗口
</
Button
>
}
>
>
<
div
>
测试
</
div
>
<
div
>
测试
</
div
>
</
Modal
>
</
Modal
>
...
...
src/pages/database/InitDataBase.less
0 → 100644
View file @
ac33f5ff
.tableTitle{
font-size: 16px;
}
.mgTop20{
margin-top: 20px !important;
}
.tCenter{
text-align: center;
}
\ No newline at end of file
src/pages/database/ManagementDataBase.jsx
View file @
ac33f5ff
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
...
@@ -2,6 +2,7 @@ import React, { useEffect, useState } from 'react';
import
{
Card
,
Button
,
Table
,
Space
,
Modal
}
from
'antd'
;
import
{
Card
,
Button
,
Table
,
Space
,
Modal
}
from
'antd'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
get
}
from
'../../services'
;
import
{
get
}
from
'../../services'
;
import
styles
from
'./ManagementDataBase.less'
const
ManagementDataBase
=
()
=>
{
const
ManagementDataBase
=
()
=>
{
const
[
autoCheckList
,
setAutoCheckList
]
=
useState
([]);
const
[
autoCheckList
,
setAutoCheckList
]
=
useState
([]);
...
@@ -69,8 +70,10 @@ const ManagementDataBase = () => {
...
@@ -69,8 +70,10 @@ const ManagementDataBase = () => {
},
[]);
},
[]);
const
handleCheck
=
()
=>
{
const
handleCheck
=
()
=>
{
console
.
log
(
'check DB'
);
console
.
log
(
'check DB'
);
alert
(
'check DB'
)
};
};
const
handleUpdate
=
()
=>
{
const
handleUpdate
=
()
=>
{
alert
(
'updatedb'
)
console
.
log
(
'updatedb'
);
console
.
log
(
'updatedb'
);
};
};
const
handleLog
=
text
=>
{
const
handleLog
=
text
=>
{
...
@@ -101,17 +104,11 @@ const ManagementDataBase = () => {
...
@@ -101,17 +104,11 @@ const ManagementDataBase = () => {
key
:
'tableName'
,
key
:
'tableName'
,
width
:
200
,
width
:
200
,
},
},
// {
// title:'类型',
// dataIndex: 'type',
// key: 'type',
// },
{
{
title
:
'差异比较'
,
title
:
'差异比较'
,
dataIndex
:
'message'
,
dataIndex
:
'message'
,
key
:
'message'
,
key
:
'message'
,
ellipsis
:
true
,
ellipsis
:
true
,
// width:80
},
},
];
];
const
logColumns
=
[
const
logColumns
=
[
...
@@ -141,13 +138,14 @@ const ManagementDataBase = () => {
...
@@ -141,13 +138,14 @@ const ManagementDataBase = () => {
key
:
'despersion'
,
key
:
'despersion'
,
render
:
text
=>
{
render
:
text
=>
{
return
(
return
(
<
button
<
Button
size=
'small'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
handleLog
(
text
);
handleLog
(
text
);
}
}
}
}
>
>
日志
日志
</
b
utton
>
</
B
utton
>
);
);
},
},
},
},
...
@@ -158,13 +156,15 @@ const ManagementDataBase = () => {
...
@@ -158,13 +156,15 @@ const ManagementDataBase = () => {
ellipsis
:
true
,
ellipsis
:
true
,
render
:
text
=>
{
render
:
text
=>
{
return
(
return
(
<
button
<
Button
size=
'small'
type=
'primary'
onClick=
{
()
=>
{
onClick=
{
()
=>
{
handleLog
(
text
);
handleLog
(
text
);
}
}
}
}
>
>
升级内容
升级内容
</
b
utton
>
</
B
utton
>
);
);
},
},
},
},
...
@@ -174,33 +174,38 @@ const ManagementDataBase = () => {
...
@@ -174,33 +174,38 @@ const ManagementDataBase = () => {
<>
<>
<
PageContainer
>
<
PageContainer
>
<
Card
>
<
Card
>
<
div
>
表结构自动化修复
</
div
>
<
div
className=
{
styles
.
tableTitle
}
>
表结构自动化修复
</
div
>
<
Table
<
Table
className=
{
styles
.
mgTop20
}
columns=
{
autoCheckColumns
}
columns=
{
autoCheckColumns
}
dataSource=
{
autoCheckList
}
dataSource=
{
autoCheckList
}
bordered
bordered
loading=
{
checkLoading
}
loading=
{
checkLoading
}
/>
/>
<
div
className=
{
styles
.
tCenter
}
>
<
Space
>
<
Space
>
<
Button
onClick=
{
handleCheck
}
>
检查
</
Button
>
<
Button
type=
'primary'
onClick=
{
handleCheck
}
>
检查
</
Button
>
<
Button
onClick=
{
handleUpdate
}
>
升级
</
Button
>
<
Button
danger
type=
'primary'
onClick=
{
handleUpdate
}
>
升级
</
Button
>
</
Space
>
</
Space
>
</
div
>
</
Card
>
</
Card
>
<
Card
>
<
Card
className=
{
styles
.
mgTop20
}
>
<
div
>
<
div
className=
{
styles
.
tableTitle
}
>
表字段手动修复
表字段手动修复
(字段长度不统一,请手动修改差异,数据可能会截断,请谨慎操作)
(字段长度不统一,请手动修改差异,数据可能会截断,请谨慎操作)
</
div
>
</
div
>
<
Table
<
Table
className=
{
styles
.
mgTop20
}
columns=
{
checkColumns
}
columns=
{
checkColumns
}
dataSource=
{
checkList
}
dataSource=
{
checkList
}
bordered
bordered
loading=
{
checkLoading
}
loading=
{
checkLoading
}
/>
/>
</
Card
>
</
Card
>
<
Card
>
<
Card
className=
{
styles
.
mgTop20
}
>
<
div
>
数据库升级记录
</
div
>
<
div
className=
{
styles
.
tableTitle
}
>
数据库升级记录
</
div
>
<
Table
<
Table
className=
{
styles
.
mgTop20
}
columns=
{
logColumns
}
columns=
{
logColumns
}
dataSource=
{
logList
}
dataSource=
{
logList
}
bordered
bordered
...
@@ -216,8 +221,12 @@ const ManagementDataBase = () => {
...
@@ -216,8 +221,12 @@ const ManagementDataBase = () => {
maskClosable
maskClosable
onOk=
{
()
=>
setModalVisible
(
false
)
}
onOk=
{
()
=>
setModalVisible
(
false
)
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
onCancel=
{
()
=>
setModalVisible
(
false
)
}
width=
"1000px"
bodyStyle=
{
{
minHeight
:
'100px'
}
}
footer=
{
[
footer=
{
[
<
Button
onClick=
{
()
=>
setModalVisible
(
false
)
}
>
关闭窗口
</
Button
>,
<
Button
type=
'primary'
onClick=
{
()
=>
setModalVisible
(
false
)
}
>
关闭窗口
</
Button
>,
]
}
]
}
>
>
{
content
}
{
content
}
...
...
src/pages/database/ManagementDataBase.less
0 → 100644
View file @
ac33f5ff
.tableTitle{
font-size: 16px;
}
.mgTop20{
margin-top: 20px !important;
}
.tCenter{
text-align: center;
}
\ No newline at end of file
src/pages/orgnazation/DefaultComponent.jsx
View file @
ac33f5ff
...
@@ -14,29 +14,29 @@ import { connect } from 'react-redux';
...
@@ -14,29 +14,29 @@ import { connect } from 'react-redux';
import
TestModal
from
'./ModalComponent'
;
import
TestModal
from
'./ModalComponent'
;
import
ListCard
from
'./ListCard'
;
import
ListCard
from
'./ListCard'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
orgGet
,
orgTest
}
from
'../../services/orgnazation/api'
const
{
Search
}
=
Input
const
{
Search
}
=
Input
const
{
TreeNode
}
=
TreeSelect
;
const
{
TreeNode
}
=
TreeSelect
;
const
treeData
=
[
//
const treeData = [
{
//
{
title
:
'Node1'
,
//
title: 'Node1',
value
:
'0-0'
,
//
value: '0-0',
children
:
[
//
children: [
{
//
{
title
:
'Child Node1'
,
//
title: 'Child Node1',
value
:
'0-0-1'
,
//
value: '0-0-1',
},
//
},
{
//
{
title
:
'Child Node2'
,
//
title: 'Child Node2',
value
:
'0-0-2'
,
//
value: '0-0-2',
},
//
},
],
//
],
},
//
},
{
//
{
title
:
'Node2'
,
//
title: 'Node2',
value
:
'0-1'
,
//
value: '0-1',
},
//
},
];
//
];
const
DefaultComponent
=
()
=>
{
const
DefaultComponent
=
()
=>
{
...
@@ -44,8 +44,8 @@ const DefaultComponent = ()=> {
...
@@ -44,8 +44,8 @@ const DefaultComponent = ()=> {
const
[
tableData
,
setTableData
]
=
useState
([])
//table的值
const
[
tableData
,
setTableData
]
=
useState
([])
//table的值
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([])
//table表格checkbox配置
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
([])
//table表格checkbox配置
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
)
//展示Modal弹窗
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
)
//展示Modal弹窗
const
[
modalVisible2
,
setModalVisible2
]
=
useState
(
false
)
//展示Modal弹窗
const
[
testPeoList
,
setTestPeoList
]
=
useState
([])
//测试card数组
const
[
testPeoList
,
setTestPeoList
]
=
useState
([])
//测试card数组
const
[
treeData
,
setTreeData
]
=
useState
([])
//树节点选中的值
//树节点选中的值
const
treeChange
=
(
e
)
=>
{
const
treeChange
=
(
e
)
=>
{
setTreeValue
(
e
)
setTreeValue
(
e
)
...
@@ -95,6 +95,49 @@ const DefaultComponent = ()=> {
...
@@ -95,6 +95,49 @@ const DefaultComponent = ()=> {
key
:
'wxid'
key
:
'wxid'
}
}
]
]
useEffect
(
()
=>
{
orgGet
().
then
(
res
=>
{
console
.
log
(
res
,
'orgGet'
)
if
(
res
){
let
arr
=
transTree
(
res
)
console
.
log
(
transTree
(
res
),
'arr'
)
setTreeData
(
arr
)
}
})
},[])
//处理返回的树形结构
const
transTree
=
(
value
,
isChild
=
false
)
=>
{
let
arr
=
value
if
(
arr
.
length
<
0
){
return
}
let
obj
=
{}
return
arr
.
map
(
item
=>
{
// item.title = item.text
// item.value = item.id
// if( item.children && item.children.length > 0){
// transTree(item.children)
// return obj=item
// }else{
// return item
// }
if
(
isChild
){
item
.
title
=
item
.
userName
item
.
value
=
item
.
userID
}
else
{
item
.
title
=
item
.
text
item
.
value
=
item
.
id
}
if
(
item
.
children
&&
item
.
children
.
length
>
0
){
transTree
(
item
.
children
,
false
)
return
obj
=
item
}
else
{
return
item
}
})
}
useEffect
(
()
=>
{
useEffect
(
()
=>
{
get
(
'/Cityinterface/rest/services/OMS.svc/U_GetOneOUUserListNew'
,{
get
(
'/Cityinterface/rest/services/OMS.svc/U_GetOneOUUserListNew'
,{
OUID
:
24
,
OUID
:
24
,
...
@@ -104,7 +147,6 @@ const DefaultComponent = ()=> {
...
@@ -104,7 +147,6 @@ const DefaultComponent = ()=> {
if
(
res
.
success
){
if
(
res
.
success
){
setTableData
(
res
.
root
)
setTableData
(
res
.
root
)
}
}
console
.
log
(
res
)
})
})
const
testData
=
[]
const
testData
=
[]
const
test2list
=
[]
const
test2list
=
[]
...
@@ -136,10 +178,8 @@ const DefaultComponent = ()=> {
...
@@ -136,10 +178,8 @@ const DefaultComponent = ()=> {
onChange
:
selectChange
,
onChange
:
selectChange
,
}
}
const
btnLable
=
[
const
btnLable
=
[
{
label
:
'查找用户'
,
handle
:
handleSearch
},
{
label
:
'查找用户'
,
handle
:
handleSearch
,
config
:{
type
:
'primary'
,
danger
:
true
}
},
{
label
:
'用户导入'
,
handle
:
handleImport
},
{
label
:
'用户导入'
,
handle
:
handleImport
,
config
:{
type
:
'info'
,}},
{
label
:
'新建用户'
,
handle
:
'newHandle'
},
{
label
:
'批量关联'
,
handle
:
'relHandle'
}
]
]
return
(
return
(
...
@@ -147,7 +187,11 @@ const DefaultComponent = ()=> {
...
@@ -147,7 +187,11 @@ const DefaultComponent = ()=> {
<
PageContainer
>
<
PageContainer
>
<
Card
>
<
Card
>
<
Row
>
<
Row
>
机构选择
<
Col
span
={1}
>
<
div
style=
{
{
height
:
"30px"
,
lineHeight
:
"30px"
}
}
>
机构选择
</
div
>
</
Col
>
<
Col
span=
{
12
}
>
<
Col
span=
{
12
}
>
<
TreeSelect
<
TreeSelect
style=
{
{
"width"
:
"50%"
}
}
style=
{
{
"width"
:
"50%"
}
}
...
@@ -157,27 +201,28 @@ const DefaultComponent = ()=> {
...
@@ -157,27 +201,28 @@ const DefaultComponent = ()=> {
/>
/>
</
Col
>
</
Col
>
<
Col
span=
{
8
}
>
<
Col
span=
{
8
}
>
<
Search
{
/*
<Search
placeholder="请输入"
placeholder="请输入"
onSearch={(e) =>{inputSearch(e)}}
onSearch={(e) =>{inputSearch(e)}}
style={{ width: "50%" }}
style={{ width: "50%" }}
enterButton
enterButton
/>
/>
*/
}
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</
Card
>
<
div
style=
{
{
marginTop
:
'20px'
,
textAlign
:
'center'
}
}
>
<
Card
>
<
Space
>
<
Space
>
{
{
btnLable
&&
btnLable
.
map
(
(
item
,
index
)
=>
{
btnLable
&&
btnLable
.
map
(
(
item
,
index
)
=>
{
const
{
config
}
=
item
return
(
return
(
<
Button
key=
{
index
}
onClick
={
()=
>
{
item
.
handle
&&
typeof
item
.
handle
===
'function'
&&
item
.
handle
()
}
}
>
{
item
.
label
}
</
Button
>
<
Button
key=
{
index
}
{
...
config
}
onClick
={
()=
>
{
item
.
handle
&&
typeof
item
.
handle
===
'function'
&&
item
.
handle
()
}
}
>
{
item
.
label
}
</
Button
>
)
)
})
})
}
}
</
Space
>
</
Space
>
</
div
>
<
TestModal
<
TestModal
title=
'
测试title
'
title=
'
用户选择
'
visible
=
{
modalVisible
}
visible
=
{
modalVisible
}
maskClosable
maskClosable
onOk=
{
()
=>
confirmModal
()
}
onOk=
{
()
=>
confirmModal
()
}
...
@@ -186,6 +231,8 @@ const DefaultComponent = ()=> {
...
@@ -186,6 +231,8 @@ const DefaultComponent = ()=> {
style=
{
{
top
:
20
}
}
style=
{
{
top
:
20
}
}
width=
"1000px"
width=
"1000px"
destroyOnClose=
{
true
}
destroyOnClose=
{
true
}
cancelText=
'取消'
okText=
'确认选择'
>
>
<
ListCard
optionsList
={
testPeoList
}
></
ListCard
>
<
ListCard
optionsList
={
testPeoList
}
></
ListCard
>
</
TestModal
>
</
TestModal
>
...
...
src/pages/orgnazation/ListCard.jsx
View file @
ac33f5ff
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
import
ListCardItem
from
'./listCardItem'
import
ListCardItem
from
'./listCardItem'
import
{
get
,
post
}
from
'../../services'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
orgTest
}
from
'../../services/orgnazation/api'
const
ListCard
=
(
props
)
=>
{
const
ListCard
=
(
props
)
=>
{
const
[
valueList
,
setValueList
]
=
useState
([])
const
[
valueList
,
setValueList
]
=
useState
([])
const
[
testList
,
setTestList
]
=
useState
([])
const
[
testList
,
setTestList
]
=
useState
([])
const
{
optionsList
}
=
props
const
{
optionsList
}
=
props
// const getValueCallback = (value,index) => {
// console.log(value,index)
// console.log(valueList,'valueList1```')
// setValueList(valueList[index]=value)
// console.log(valueList,'valueList')
// }
const
getValueCallback
=
useCallback
(
const
getValueCallback
=
useCallback
(
(
value
,
index
)
=>
{
(
value
,
index
)
=>
{
console
.
log
(
value
,
index
)
console
.
log
(
value
,
index
)
...
@@ -32,6 +26,10 @@ const ListCard = (props) =>{
...
@@ -32,6 +26,10 @@ const ListCard = (props) =>{
})
})
setTestList
(
list
)
setTestList
(
list
)
})
})
//多级嵌套测试
orgTest
().
then
(
res
=>
{
console
.
log
(
res
,
'res'
)
})
},[])
},[])
return
(
return
(
<>
<>
...
...
src/pages/orgnazation/ListCardItem.less
View file @
ac33f5ff
@import '~antd/es/style/themes/default.less';
.divBox {
.test {
display: flex;
display: flex;
flex-wrap: wrap;
flex-wrap: wrap;
border: 1px solid
chartreuse
;
border: 1px solid
#b5b8c8
;
margin-top: 20px;
margin-top: 20px;
min-height: 40px;
.topCheckbox{
height: 20px;
background-color: #fff;
margin: -10px 0 0 20px;
}
.checkdiv {
display: flex;
margin-left: 20px;
justify-content: space-between;
.check {
margin: 10px 0 ;
flex: 1;
}
}
}
}
.checkdiv {
display: flex;
justify-content: space-between;
.check {
flex: 1;
}
}
\ No newline at end of file
src/pages/orgnazation/TestTable.jsx
0 → 100644
View file @
ac33f5ff
import
React
,{
useState
,
useEffect
,
}
from
'react'
import
{
Card
,
Input
,
Button
}
from
'antd'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
connect
}
from
'react-redux'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
{
get
,
post
}
from
'../../services'
;
const
TestTable
=
()
=>
{
const
[
data
,
setData
]
=
useState
([])
//搜索框时间
useEffect
(()
=>
{
get
(
`/Cityinterface/rest/services/OMS.svc/S_GetConnRecord`
,
{
_version
:
9999
,
dc
:
1603334559186
,
}).
then
(
res
=>
{
if
(
res
){
setData
(
res
)
}
console
.
log
(
res
)
}).
catch
(
err
=>
{
console
.
error
(
err
)
})
},[])
const
columns
=
[
{
title
:
'服务器名或IP地址'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
},
{
title
:
'数据库名称'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
},
{
title
:
'数据库用户名称'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
},
{
title
:
'保存时间'
,
dataIndex
:
'saveTime'
,
key
:
'saveTime'
,
},
{
title
:
'描述'
,
dataIndex
:
'desc'
,
key
:
'desc'
,
},
{
title
:
'修改描述'
,
dataIndex
:
'name'
,
key
:
'name'
,
filters
:
true
,
valueType
:
'dateTime'
// render: () => {
// return <Button type='primary' onClick={ ()=>{changeDesc()}}>修改描述</Button>;
// },
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
valueType
:
'option'
,
render
:
(
_
,
record
)
=>
(
<>
<
Button
>
修改描述
</
Button
>
<
Button
href=
""
>
删除
</
Button
>
</>
),
},
];
return
(
<>
<
PageContainer
>
<
Card
></
Card
>
<
ProTable
style=
{
{
marginTop
:
'20px'
}
}
headerTitle=
'表格'
rowKey=
"key"
search=
{
{
labelWidth
:
100
}
}
columns=
{
columns
}
bordered
dataSource=
{
data
}
/>
</
PageContainer
>
</>
)
}
export
default
connect
()(
TestTable
)
\ No newline at end of file
src/pages/orgnazation/listCardItem.jsx
View file @
ac33f5ff
...
@@ -15,8 +15,8 @@ const ListCardItem = (props) =>{
...
@@ -15,8 +15,8 @@ const ListCardItem = (props) =>{
const
[
checkList
,
setCheckList
]
=
useState
([])
//复选框列表
const
[
checkList
,
setCheckList
]
=
useState
([])
//复选框列表
const
{
getValueCallback
,
itemid
,
userList
,
OUName
}
=
props
const
{
getValueCallback
,
itemid
,
userList
,
OUName
}
=
props
const
defaultList
=
userList
&&
userList
.
map
(
(
item
,
index
)
=>
{
const
defaultList
=
userList
&&
userList
.
map
(
(
item
,
index
)
=>
{
item
.
label
=
item
.
userName
||
item
.
label
||
index
item
.
label
=
item
.
userName
||
item
.
label
item
.
value
=
item
.
userID
||
item
.
label
||
index
item
.
value
=
item
.
userID
||
item
.
label
return
item
return
item
})
||
[]
})
||
[]
...
@@ -43,9 +43,9 @@ const ListCardItem = (props) =>{
...
@@ -43,9 +43,9 @@ const ListCardItem = (props) =>{
}
}
return
(
return
(
<>
<>
<
div
className
={`
$
{
styles
.
test
}`}
>
<
div
className
={`
$
{
styles
.
divBox
}`}
>
<
div
style=
{
{
width
:
"100%"
}
}
>
<
div
className=
{
styles
.
topCheckbox
}
>
<
Checkbox
<
Checkbox
indeterminate
=
{
indeterminate
}
indeterminate
=
{
indeterminate
}
checked=
{
allChecked
}
checked=
{
allChecked
}
onChange=
{
(
e
)
=>
{
handleAllChecked
(
e
)}
}
onChange=
{
(
e
)
=>
{
handleAllChecked
(
e
)}
}
...
...
src/pages/user/login/index.js
View file @
ac33f5ff
...
@@ -28,9 +28,9 @@ const Login = props => {
...
@@ -28,9 +28,9 @@ const Login = props => {
console
.
log
(
values
);
// eg:{userName: "123", password: "123"}
console
.
log
(
values
);
// eg:{userName: "123", password: "123"}
const
{
userName
:
loginName
,
password
}
=
values
;
const
{
userName
:
loginName
,
password
}
=
values
;
login
({
loginName
,
password
}).
then
(
result
=>
{
login
({
loginName
,
password
}).
then
(
result
=>
{
console
.
log
(
result
.
data
);
console
.
log
(
result
);
if
(
result
.
data
.
success
===
true
&&
result
.
data
.
pass
===
true
)
{
if
(
result
.
success
===
true
&&
result
.
pass
===
true
)
{
const
{
userMode
}
=
result
.
data
;
const
{
userMode
}
=
result
;
localStorage
.
setItem
(
'userMode'
,
userMode
);
localStorage
.
setItem
(
'userMode'
,
userMode
);
if
(
userMode
===
USER_MODE
.
ADMIN
||
userMode
===
USER_MODE
.
SUPER
)
{
if
(
userMode
===
USER_MODE
.
ADMIN
||
userMode
===
USER_MODE
.
SUPER
)
{
window
.
location
.
href
=
'/dbm/dbInit/'
;
window
.
location
.
href
=
'/dbm/dbInit/'
;
...
...
src/pages/userCenter/RoleManage.js
0 → 100644
View file @
ac33f5ff
import
React
from
'react'
;
import
{
Alert
,
Card
}
from
'antd'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
connect
}
from
'react-redux'
;
// eslint-disable-next-line no-unused-vars
const
mapState
=
store
=>
store
;
export
default
connect
(
mapState
)(()
=>
(
<
PageContainer
>
<
Card
>
<
Alert
message
=
"更快更强的重型组件,已经发布。"
type
=
"success"
showIcon
banner
style
=
{{
margin
:
-
12
,
marginBottom
:
24
,
}}
/
>
<
/Card
>
<
/PageContainer
>
));
src/pages/userCenter/SiteManage.js
0 → 100644
View file @
ac33f5ff
import
React
from
'react'
;
import
{
Alert
,
Card
}
from
'antd'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
import
{
connect
}
from
'react-redux'
;
// eslint-disable-next-line no-unused-vars
const
mapState
=
store
=>
store
;
export
default
connect
(
mapState
)(()
=>
(
<
PageContainer
>
<
Card
>
<
Alert
message
=
"更快更强的重型组件,已经发布。"
type
=
"success"
showIcon
banner
style
=
{{
margin
:
-
12
,
marginBottom
:
24
,
}}
/
>
<
/Card
>
<
/PageContainer
>
));
src/pages/userCenter/UserManage.js
0 → 100644
View file @
ac33f5ff
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Tree
,
Table
,
Space
,
message
,
Modal
,
Form
,
Input
}
from
'antd'
;
import
{
UserAddOutlined
,
UsergroupAddOutlined
,
FileAddTwoTone
,
FolderAddTwoTone
,
EditTwoTone
,
DeleteTwoTone
,
}
from
'@ant-design/icons'
;
import
{
PageContainer
}
from
'@ant-design/pro-layout'
;
// import classnames from 'classnames';
import
{
get
,
post
}
from
'../../services'
;
import
styles
from
'./UserManage.less'
;
const
columns
=
[
{
title
:
'登录名'
,
dataIndex
:
'loginName'
,
key
:
'loginName'
,
},
{
title
:
'用户姓名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
},
{
title
:
'手机号码'
,
dataIndex
:
'phone'
,
key
:
'phone'
,
},
{
title
:
'钉钉账户'
,
dataIndex
:
'ddid'
,
key
:
'ddid'
,
},
{
title
:
'微信账户'
,
dataIndex
:
'wxid'
,
key
:
'wxid'
,
},
{
title
:
'操作'
,
key
:
'action'
,
render
:
(
text
,
record
)
=>
(
<
Space
size
=
"middle"
>
<
a
>
关联角色
{
record
.
name
}
<
/a
>
<
a
>
更改机构
<
/a
>
<
a
>
编辑
<
/a
>
<
a
>
冻结
<
/a
>
<
a
>
删除
<
/a
>
<
/Space
>
),
},
];
const
UserManage
=
()
=>
{
const
[
tableLoading
,
setTableLoading
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
([]);
// 用户机构树
const
[
tableData
,
setTableData
]
=
useState
([]);
// 用户表
const
[
userVisible
,
setUserVisible
]
=
useState
(
false
);
const
[
orgTitle
,
setOrgTitle
]
=
useState
(
'机构'
);
const
[
orgID
,
setOrgID
]
=
useState
(
'机构'
);
const
mapTree
=
org
=>
{
const
haveChildren
=
Array
.
isArray
(
org
.
children
)
&&
org
.
children
.
length
>
0
;
return
{
title
:
(
<
div
className
=
{
styles
.
iconWraper1
}
>
{
org
.
text
}
<
FileAddTwoTone
onClick
=
{
e
=>
addUser
(
e
,
org
.
text
,
org
.
id
)}
title
=
"添加用户"
/>
<
FolderAddTwoTone
onClick
=
{
addUser
}
title
=
"添加下级机构"
/>
<
EditTwoTone
onClick
=
{
addUser
}
title
=
"编辑"
/>
<
DeleteTwoTone
onClick
=
{
addUser
}
title
=
"删除"
/>
<
/div
>
),
key
:
org
.
id
,
// icon: <CaretDownOutlined />,
// 判断它是否存在子集,若果存在就进行再次进行遍历操作,知道不存在子集便对其他的元素进行操作
children
:
haveChildren
?
org
.
children
.
map
(
i
=>
mapTree
(
i
))
:
[],
};
};
// 获取用户机构列表
useEffect
(()
=>
{
setTableLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/U_GetOUTree`
,
{
_version
:
9999
,
node
:
-
1
,
})
.
then
(
res
=>
{
setTableLoading
(
false
);
if
(
res
.
length
>
0
)
{
const
orgTree
=
res
.
map
(
org
=>
mapTree
(
org
));
setTreeData
(
orgTree
);
}
})
.
catch
(
err
=>
{
setTableLoading
(
false
);
message
.
error
(
err
);
});
},
[]);
// 获取当前机构下所有用户
const
onSelect
=
props
=>
{
setTableLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/U_GetOneOUUserListNew`
,
{
_version
:
9999
,
OUID
:
props
[
0
],
})
.
then
(
res
=>
{
setTableLoading
(
false
);
if
(
res
.
root
.
length
>
0
)
{
setTableData
(
res
.
root
);
}
})
.
catch
(
err
=>
{
setTableLoading
(
false
);
message
.
error
(
err
);
});
};
const
addUser
=
(
e
,
title
,
id
)
=>
{
e
.
stopPropagation
();
setUserVisible
(
true
);
setOrgTitle
(
`在
${
title
}
下添加用户`
);
setOrgID
(
id
);
};
const
submitAddUser
=
props
=>
{
setUserVisible
(
false
);
};
return
(
<
PageContainer
>
<
div
style
=
{{
width
:
'20%'
,
height
:
'calc(100vh - 194px)'
,
background
:
'white'
,
float
:
'left'
,
}}
>
<
div
style
=
{{
padding
:
'8px'
}}
>
机构列表
<
UsergroupAddOutlined
style
=
{{
color
:
'#1890ff'
,
float
:
'right'
}}
/
>
<
/div
>
<
Tree
showLine
=
"true"
showIcon
=
"true"
loading
=
{
tableLoading
}
onSelect
=
{
onSelect
}
treeData
=
{
treeData
}
/
>
<
/div
>
<
div
style
=
{{
width
:
'79%'
,
height
:
'calc(100vh - 194px)'
,
background
:
'white'
,
float
:
'right'
,
}}
>
<
Table
columns
=
{
columns
}
dataSource
=
{
tableData
}
loading
=
{
tableLoading
}
/
>
<
/div
>
<
Modal
title
=
{
orgTitle
}
visible
=
{
userVisible
}
onOk
=
{
submitAddUser
}
onCancel
=
{()
=>
setUserVisible
(
false
)}
okText
=
"确认"
cancelText
=
"取消"
>
{
/* <div style={{ width: '20%', float: 'left' }}>
<UserAddOutlined style={{ color: 'blue', width: '40px' }} />
</div> */
}
{
/* <div style={{ width: '80%', float: 'right' }}> */
}
<
Form
>
<
Form
.
Item
name
=
"loginName"
label
=
"登录名称"
rules
=
{[
{
required
:
true
,
},
]}
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"password"
label
=
"账户密码"
rules
=
{[
{
required
:
true
,
},
]}
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"userName"
label
=
"用 户 姓 名"
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"phone"
label
=
"手 机 号 码"
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"email"
label
=
"电 子 邮 件"
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"ddid"
label
=
"钉 钉 账 户"
>
<
Input
/>
<
/Form.Item
>
<
Form
.
Item
name
=
"wxid"
label
=
"微 信 账 户"
>
<
Input
/>
<
/Form.Item
>
<
/Form
>
{
/* </div> */
}
<
/Modal
>
<
/PageContainer
>
);
};
export
default
UserManage
;
src/pages/userCenter/UserManage.less
0 → 100644
View file @
ac33f5ff
.iconWraper1{
span{
display: none;
}
}
.iconWraper1:hover{
span{
margin-left: 12px;
display: inline-block;
}
// display: block;
}
\ No newline at end of file
src/routes/config.js
View file @
ac33f5ff
...
@@ -5,7 +5,11 @@ import Welcome from '../pages/Welcome';
...
@@ -5,7 +5,11 @@ import Welcome from '../pages/Welcome';
import
RequestTest
from
'../pages/testPages/request'
;
import
RequestTest
from
'../pages/testPages/request'
;
import
InitDataBase
from
'../pages/database/InitDataBase'
;
import
InitDataBase
from
'../pages/database/InitDataBase'
;
import
ManagementDataBase
from
'../pages/database/ManagementDataBase'
;
import
ManagementDataBase
from
'../pages/database/ManagementDataBase'
;
import
DefaultComponent
from
'../pages/orgnazation/DefaultComponent'
;
import
UserManage
from
'../pages/userCenter/UserManage'
;
import
RoleManage
from
'../pages/userCenter/RoleManage'
;
import
SiteManage
from
'../pages/userCenter/SiteManage'
;
// import DefaultComponent from '../pages/orgnazation/DefaultComponent';
import
TestTable
from
'../pages/orgnazation/TestTable'
;
export
default
{
export
default
{
routes
:
[
routes
:
[
{
{
...
@@ -38,9 +42,24 @@ export default {
...
@@ -38,9 +42,24 @@ export default {
component
:
ManagementDataBase
,
component
:
ManagementDataBase
,
},
},
{
{
path
:
'/userCenter/orgList'
,
path
:
'/userCenter/UserManage'
,
name
:
'机构列表'
,
name
:
'用户管理'
,
component
:
DefaultComponent
,
component
:
UserManage
,
},
{
path
:
'/userCenter/RoleManage'
,
name
:
'角色管理'
,
component
:
RoleManage
,
},
{
path
:
'/userCenter/SiteManage'
,
name
:
'站点管理'
,
component
:
SiteManage
,
},
{
path
:
'/userCenter/testTable'
,
name
:
'测试表格'
,
component
:
TestTable
,
},
},
{
{
path
:
'/platformCenter/gis'
,
path
:
'/platformCenter/gis'
,
...
...
src/routes/menuConfig.js
View file @
ac33f5ff
...
@@ -35,8 +35,16 @@ const menuConfig = [
...
@@ -35,8 +35,16 @@ const menuConfig = [
icon
:
<
UsergroupAddOutlined
style
=
{
iconStyle
}
/>
,
icon
:
<
UsergroupAddOutlined
style
=
{
iconStyle
}
/>
,
routes
:
[
routes
:
[
{
{
path
:
'/userCenter/orgList'
,
path
:
'/userCenter/UserManage'
,
name
:
'机构列表'
,
name
:
'用户管理'
,
},
{
path
:
'/userCenter/RoleManage'
,
name
:
'角色管理'
,
},
{
path
:
'/userCenter/SiteManage'
,
name
:
'站点管理'
,
},
},
],
],
},
},
...
...
src/services/orgnazation/api.js
0 → 100644
View file @
ac33f5ff
import
{
get
,
post
}
from
'../index'
;
export
const
orgTest
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/W4_GetMenuByRoleWithLevel?roleID=6&subSystemValue=city&subSystemName=city&_version=9999&_dc=1604051878230'
,
params
,
);
// 获取组织结构树
export
const
orgGet
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/U_GetOUTree?_version=9999&_dc=1604304482575&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