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
2d071160
Commit
2d071160
authored
Nov 16, 2020
by
张烨
Browse files
Options
Browse Files
Download
Plain Diff
feat: global header breadCrumb
parents
42bc3ca8
2aae7b09
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
291 additions
and
125 deletions
+291
-125
index.js
src/components/BasePageContainer/index.js
+1
-1
RightContent.js
src/components/GlobalHeader/RightContent.js
+10
-7
index.less
src/components/GlobalHeader/index.less
+6
-0
global.less
src/global.less
+4
-0
BasicLayout.js
src/layouts/BasicLayout.js
+1
-1
AppMenu.js
src/pages/appConfig/AppMenu.js
+1
-0
AppMenu.less
src/pages/appConfig/AppMenu.less
+1
-1
CurrentSolution.jsx
src/pages/database/CurrentSolution.jsx
+2
-6
CurrentSolution.less
src/pages/database/CurrentSolution.less
+2
-1
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+83
-43
ManagementDataBase.jsx
src/pages/database/ManagementDataBase.jsx
+54
-38
MongDBTable.jsx
src/pages/database/databaseConfig/mongDB/MongDBTable.jsx
+12
-1
MySQLTable.jsx
src/pages/database/databaseConfig/mysqltable/MySQLTable.jsx
+10
-0
OracleTable.jsx
src/pages/database/databaseConfig/oracle/OracleTable.jsx
+8
-0
SQLServerTable.jsx
...ages/database/databaseConfig/sqlServer/SQLServerTable.jsx
+10
-0
UserManage.js
src/pages/userCenter/UserManage.js
+0
-0
UserManage.less
src/pages/userCenter/UserManage.less
+24
-15
RoleManage.jsx
src/pages/userCenter/roleManage/RoleManage.jsx
+2
-3
RoleManage.less
src/pages/userCenter/roleManage/RoleManage.less
+5
-4
SiteManage.jsx
src/pages/userCenter/siteManage/SiteManage.jsx
+2
-1
SiteManage.less
src/pages/userCenter/siteManage/SiteManage.less
+3
-2
api.js
src/services/database/api.js
+50
-1
No files found.
src/components/BasePageContainer/index.js
View file @
2d071160
...
...
@@ -5,7 +5,7 @@ const BasePageContainer = props => {
const
{
children
,
...
rest
}
=
props
;
return
(
<
PageContainer
{...
rest
}
title
=
{
false
}
>
<
PageContainer
{...
rest
}
pageHeaderRender
=
{()
=>
null
}
>
{
children
}
<
/PageContainer
>
);
...
...
src/components/GlobalHeader/RightContent.js
View file @
2d071160
import
React
from
'react'
;
import
{
Tooltip
}
from
'antd'
;
import
React
,
{
useContext
}
from
'react'
;
import
{
RouteContext
}
from
'@ant-design/pro-layout'
;
import
{
Tooltip
,
Breadcrumb
}
from
'antd'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
...
...
@@ -12,15 +12,18 @@ import styles from './index.less';
const
GlobalHeaderRight
=
props
=>
{
const
{
theme
,
layout
}
=
props
;
let
className
=
styles
.
right
;
const
value
=
useContext
(
RouteContext
);
if
(
theme
===
'dark'
&&
layout
===
'top'
)
{
className
=
`
${
styles
.
right
}
${
styles
.
dark
}
`
;
}
return
(
<
div
className
=
{
className
}
>
{
/* <span className={styles.left}>{value.title}</span> */
}
<
Breadcrumb
{...
value
.
breadcrumb
}
className
=
{
styles
.
lineHeight
}
/
>
<
div
style
=
{{
flex
:
1
}}
/
>
<
HeaderSearch
className
=
{
`
${
styles
.
action
}
${
styles
.
search
}
`
}
className
=
{
`
${
styles
.
action
}
${
styles
.
search
}
${
styles
.
toRight
}
`
}
placeholder
=
"站内搜索"
defaultValue
=
""
options
=
{
...
...
@@ -57,8 +60,8 @@ const GlobalHeaderRight = props => {
<QuestionCircleOutlined />
</a>
</Tooltip> */
}
<
NoticeIcon
className
=
{
styles
.
action
}
/
>
<
Avatar
/>
<
NoticeIcon
className
=
{
`
${
styles
.
action
}
${
styles
.
toRight
}
`
}
/
>
<
Avatar
className
=
{
styles
.
toRight
}
/
>
{
/* <SelectLang className={styles.action} /> */
}
<
/div
>
);
...
...
src/components/GlobalHeader/index.less
View file @
2d071160
...
...
@@ -10,8 +10,14 @@
}
}
.lineHeight{
line-height: 48px;
}
.right {
display: flex;
// flex: 100;
width: 100%;
float: right;
height: 48px;
margin-left: auto;
...
...
src/global.less
View file @
2d071160
...
...
@@ -51,4 +51,7 @@ ol {
body .ant-design-pro > .ant-layout {
min-height: 100vh;
}
}
.ant-pro-global-header-layout-side>div:first-child /deep/{
flex: 0 !important;
}
\ No newline at end of file
src/layouts/BasicLayout.js
View file @
2d071160
...
...
@@ -68,7 +68,7 @@ const BasicLayout = props => {
return
<
Link
to
=
{
menuItemProps
.
path
}
>
{
defaultDom
}
<
/Link>
;
}}
itemRender
=
{(
route
,
params
,
routes
,
paths
)
=>
{
const
first
=
routes
.
indexOf
(
route
)
===
0
;
const
first
=
false
;
//
routes.indexOf(route) === 0;
return
first
?
(
<
Link
to
=
{
paths
.
join
(
'/'
)}
>
{
route
.
breadcrumbName
}
<
/Link
>
)
:
(
...
...
src/pages/appConfig/AppMenu.js
View file @
2d071160
...
...
@@ -162,6 +162,7 @@ const AppMenu = () => {
// 获取当前菜单详细
const
onSelect
=
(
props
,
e
)
=>
{
// e.node.pos节点类型,根据这个渲染不同的编辑表单item,0-x一级菜单,0-0-x二级,0-0-0-x三级
console
.
log
(
e
);
if
(
e
)
{
if
(
e
.
node
.
pos
.
lastIndexOf
(
'-'
)
===
1
)
{
setNodeType
(
1
);
...
...
src/pages/appConfig/AppMenu.less
View file @
2d071160
.contentContainer{
// min-height: calc(100vh -
194
px);
// min-height: calc(100vh -
48
px);
overflow-x: auto;
display: flex;
.menuContainer{
...
...
src/pages/database/CurrentSolution.jsx
View file @
2d071160
...
...
@@ -50,17 +50,13 @@ const CurrentSolution = () => {
notification
.
error
({
message
:
'提示'
,
description
:
res
.
message
||
'切换失败'
,
duration
:
1
0
,
duration
:
1
5
,
});
}
})
.
catch
(
err
=>
{
setLoading
(
false
);
notification
.
error
({
message
:
'提示'
,
description
:
err
,
duration
:
3
,
});
console
.
error
(
err
);
});
};
return
(
...
...
src/pages/database/CurrentSolution.less
View file @
2d071160
...
...
@@ -3,12 +3,13 @@
align-items: center;
}
.cardbox{
min-height:
2
00px;
min-height:
1
00px;
}
.btnBox{
margin-top: 40px;
display: flex;
justify-content: center;
align-items: center;
}
.tAlign{
text-align: center;
...
...
src/pages/database/InitDataBase.jsx
View file @
2d071160
...
...
@@ -16,12 +16,18 @@ import {
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
connect
}
from
'react-redux'
;
import
{
get
,
post
}
from
'../../services'
;
import
{
setTableSQLDirName
,
deleteConn
,
initDBv4
,
getInitDBLog
,
getConnRecord
,
getDataBaseConfig
,
saveConnection
,
getConnectionTest
,
getDataBaseList
,
updateConnDesc
,
deleteInitDBLog
,
connectionTest
,
}
from
'@/services/database/api'
;
import
styles
from
'./InitDataBase.less'
;
...
...
@@ -52,14 +58,15 @@ const InitDataBase = props => {
const
[
modalVisible
,
setModalVisible
]
=
useState
(
false
);
// 修改秒速弹窗
const
[
initVisible
,
setInitVisible
]
=
useState
(
false
);
// 数据库初始化弹窗
const
[
initContent
,
setInitContent
]
=
useState
(
''
);
// 数据库初始化内容
const
[
initLoading
,
setInitLoading
]
=
useState
(
false
);
const
[
cardLoading
,
setCardLoading
]
=
useState
(
false
);
// 初始化card Loading
const
[
finish
,
setFinish
]
=
useState
(
false
);
// 获取数据库链接记录
useEffect
(()
=>
{
setTableLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/S_GetConnRecord`
,
{
get
ConnRecord
(
{
_version
:
9999
,
dc
:
1603334559186
,
dc
:
Date
.
now
()
,
})
.
then
(
res
=>
{
setTableLoading
(
false
);
...
...
@@ -79,9 +86,9 @@ const InitDataBase = props => {
// 获取数据库配置信息
useEffect
(()
=>
{
setCardLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/S_GetDataBaseConfig`
,
{
get
DataBaseConfig
(
{
_version
:
9999
,
dc
:
1603334559186
,
dc
:
Date
.
now
()
,
})
.
then
(
res
=>
{
setCardLoading
(
false
);
...
...
@@ -101,38 +108,58 @@ const InitDataBase = props => {
console
.
error
(
err
);
});
},
[]);
// 获取日志
const
doInitLog
=
()
=>
{
getInitDBLog
({
_version
:
9999
,
_dc
:
Date
.
now
(),
})
.
then
(
res
=>
{
if
(
res
.
success
)
{
let
arr
=
[];
arr
.
push
(
res
.
content
.
split
(
/
(\r\n)
|
(\n)
/
)
.
map
((
item
,
index
)
=>
<
p
key=
{
index
}
>
{
item
}
</
p
>),
);
setInitContent
(
arr
);
}
})
.
catch
(
err
=>
{
setFinish
(
true
);
});
};
// 数据库初始化
const
initClick
=
()
=>
{
setInitLoading
(
true
);
setInitContent
(
''
);
setCardLoading
(
true
);
setInitVisible
(
true
);
let
obj
=
form
.
getFieldsValue
();
doInitLog
();
for
(
let
i
=
0
;
i
<
9
;
i
++
)
{
setTimeout
(()
=>
{
doInitLog
();
},
100
);
}
initDBv4
({
_version
:
9999
,
_dc
:
Date
.
now
(),
...
obj
,
})
.
then
(
res
=>
{
set
Init
Loading
(
false
);
set
Card
Loading
(
false
);
if
(
res
.
GetMe
)
{
getInitDBLog
({
_version
:
9999
,
_dc
:
Date
.
now
(),
}).
then
(
res
=>
{
if
(
res
.
success
)
{
setInitVisible
(
true
);
setInitContent
(
res
.
content
);
}
console
.
log
(
res
.
content
.
split
(
/
[
(
\r\n
)
\r\n]
+/
));
});
console
.
log
(
res
);
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
Say
.
Message
||
'初始化失败'
,
});
}
})
.
catch
(
err
=>
{
set
Init
Loading
(
false
);
set
Card
Loading
(
false
);
console
.
log
(
err
);
});
};
...
...
@@ -150,7 +177,7 @@ const InitDataBase = props => {
const
onFinish
=
values
=>
{
setCardLoading
(
true
);
const
obj
=
values
;
get
(
'/Cityinterface/rest/services/OMS.svc/S_SaveConnection'
,
{
saveConnection
(
{
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
ip
:
obj
.
ip
,
...
...
@@ -170,7 +197,7 @@ const InitDataBase = props => {
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
Say
.
Message
||
'保存失败'
,
});
}
...
...
@@ -185,7 +212,7 @@ const InitDataBase = props => {
console
.
log
(
dbForm
);
setCardLoading
(
true
);
const
obj
=
form
.
getFieldsValue
();
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetConnectionTest'
,
{
get
ConnectionTest
(
{
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
ip
:
obj
.
ip
,
...
...
@@ -204,7 +231,7 @@ const InitDataBase = props => {
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
Say
.
Message
||
'连接失败'
,
});
}
...
...
@@ -212,19 +239,15 @@ const InitDataBase = props => {
.
catch
(
err
=>
{
setCardLoading
(
false
);
console
.
log
(
err
);
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
description
:
err
||
'连接失败'
,
});
});
};
// 获取数据库列表
const
selectFocus
=
e
=>
{
setOption
([]);
let
params
=
form
.
getFieldsValue
();
get
(
`/Cityinterface/rest/services/OMS.svc/S_GetDataBaseList`
,
{
get
DataBaseList
(
{
_version
:
9999
,
_dc
:
1603334559186
,
_dc
:
Date
.
now
()
,
userName
:
params
.
userName
||
''
,
password
:
params
.
password
||
''
,
ip
:
params
.
ip
||
''
,
...
...
@@ -235,12 +258,11 @@ const InitDataBase = props => {
}
else
{
notification
.
error
({
message
:
'通知'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
message
,
});
setOption
([]);
}
console
.
log
(
res
);
})
.
catch
(
err
=>
{
console
.
error
(
err
);
...
...
@@ -272,7 +294,7 @@ const InitDataBase = props => {
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
message
,
});
}
...
...
@@ -283,7 +305,6 @@ const InitDataBase = props => {
};
// 展示修改描述
const
changeDesc
=
val
=>
{
console
.
log
(
val
);
setDesc
(
val
);
setModalVisible
(
true
);
};
...
...
@@ -291,12 +312,22 @@ const InitDataBase = props => {
const
{
value
}
=
e
.
target
;
setDesc
(
value
);
};
// 关闭弹窗
const
handleClick
=
()
=>
{
setInitVisible
(
false
);
setInitContent
(
''
);
setFinish
(
false
);
deleteInitDBLog
({
_version
:
9999
,
_dc
:
Date
.
now
(),
});
};
// 弹窗确认回调
const
modalOkCallback
=
()
=>
{
console
.
log
(
form
.
getFieldsValue
());
const
obj
=
form
.
getFieldsValue
();
// 更新描述
get
(
'/Cityinterface/rest/services/OMS.svc/S_UpdateConnDesc'
,
{
updateConnDesc
(
{
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
ip
:
obj
.
ip
,
...
...
@@ -336,7 +367,7 @@ const InitDataBase = props => {
}
else
{
notification
.
error
({
message
:
'提示'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
message
,
});
}
...
...
@@ -351,31 +382,42 @@ const InitDataBase = props => {
title
:
'服务器名或IP地址'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
width
:
180
,
ellipsis
:
true
,
},
{
title
:
'数据库名称'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
width
:
180
,
ellipsis
:
true
,
},
{
title
:
'数据库用户名称'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
180
,
ellipsis
:
true
,
},
{
title
:
'保存时间'
,
dataIndex
:
'saveTime'
,
key
:
'saveTime'
,
width
:
180
,
ellipsis
:
true
,
},
{
title
:
'描述'
,
dataIndex
:
'desc'
,
key
:
'desc'
,
ellipsis
:
true
,
},
{
title
:
'操作'
,
dataIndex
:
'action'
,
key
:
'action'
,
width
:
250
,
ellipsis
:
true
,
render
:
(
text
,
record
)
=>
(
<
Space
>
<
Button
...
...
@@ -481,9 +523,7 @@ const InitDataBase = props => {
initClick
();
}
}
>
<
Button
type=
"primary"
loading=
{
initLoading
}
>
数据库初始化
</
Button
>
<
Button
type=
"primary"
>
数据库初始化
</
Button
>
</
Popconfirm
>
{
defaultSqlDir
&&
(
<
Select
...
...
@@ -541,8 +581,7 @@ const InitDataBase = props => {
footer=
{
[
<
Button
onClick=
{
()
=>
{
setInitVisible
(
false
);
setInitContent
(
''
);
handleClick
();
}
}
type=
"primary"
>
...
...
@@ -563,13 +602,14 @@ const InitDataBase = props => {
minHeight
:
'100px'
,
}
}
cancelText=
"取消"
okText=
"确认
修改
"
okText=
"确认"
destroyOnClose
>
<
Row
>
<
Col
span=
{
2
}
className=
{
styles
.
decsBox
}
>
描述:
</
Col
>
<
Col
span=
{
22
}
>
<
Input
placeholder=
"请输入描述"
...
...
src/pages/database/ManagementDataBase.jsx
View file @
2d071160
...
...
@@ -7,11 +7,15 @@ import {
Modal
,
Popconfirm
,
notification
,
Spin
,
}
from
'antd'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
get
}
from
'../../services'
;
import
styles
from
'./ManagementDataBase.less'
;
import
{
updateDateBase
}
from
'@/services/database/api'
;
import
{
tableCheck
,
updateDateBase
,
databaseStandardGetLog
,
}
from
'@/services/database/api'
;
const
ManagementDataBase
=
()
=>
{
const
[
autoCheckList
,
setAutoCheckList
]
=
useState
([]);
// 自动列表
...
...
@@ -26,7 +30,7 @@ const ManagementDataBase = () => {
// 检查数据库表
useEffect
(()
=>
{
setCheckLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/TableCheck`
,
{
tableCheck
(
{
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
})
...
...
@@ -58,7 +62,7 @@ const ManagementDataBase = () => {
// 获取数据库升级记录
useEffect
(()
=>
{
setLogLoading
(
true
);
get
(
`/Cityinterface/rest/services/OMS.svc/DatabaseStandard_GetLog`
,
{
databaseStandardGetLog
(
{
_version
:
9999
,
_dc
:
new
Date
().
getTime
(),
})
...
...
@@ -102,7 +106,7 @@ const ManagementDataBase = () => {
}
else
{
notification
.
error
({
message
:
'通知'
,
duration
:
3
,
duration
:
15
,
description
:
res
.
message
,
});
}
...
...
@@ -113,21 +117,27 @@ const ManagementDataBase = () => {
});
};
const
handleLog
=
text
=>
{
console
.
log
(
text
);
let
arr
=
[];
arr
.
push
(
text
.
split
(
/
[
(
\r\n
)
\r\n]
+/
).
map
(
item
=>
<
p
>
$
{
item
}
</
p
>));
arr
.
push
(
text
.
split
(
/
(\r\n)
|
(\n)
/
).
map
(
item
=>
<
p
>
{
item
}
</
p
>));
setModalVisible
(
true
);
setContent
(
text
);
// setContent(text);
setContent
(
arr
);
};
const
autoCheckColumns
=
[
{
title
:
'表名称'
,
dataIndex
:
'tableName'
,
key
:
'tableName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
180
,
ellipsis
:
true
,
},
{
title
:
'差异比较'
,
...
...
@@ -141,6 +151,7 @@ const ManagementDataBase = () => {
dataIndex
:
'tableName'
,
key
:
'tableName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'差异比较'
,
...
...
@@ -154,21 +165,29 @@ const ManagementDataBase = () => {
title
:
'登录名'
,
dataIndex
:
'updateBy'
,
key
:
'updateBy'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'数据库名称'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'数据库版本'
,
dataIndex
:
'version'
,
key
:
'version'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'升级时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'版本日志'
,
...
...
@@ -209,38 +228,35 @@ const ManagementDataBase = () => {
<
PageContainer
>
<
Card
>
<
div
className=
{
styles
.
tableTitle
}
>
表结构自动化修复
</
div
>
<
Table
className=
{
styles
.
mgTop20
}
columns=
{
autoCheckColumns
}
dataSource=
{
autoCheckList
}
bordered
loading=
{
checkLoading
}
size=
"small"
/>
<
div
className=
{
styles
.
btnBox
}
>
<
Space
>
<
Button
type=
"primary"
onClick=
{
handleCheck
}
loading=
{
checkLoading
}
>
检查
</
Button
>
<
Popconfirm
title=
"
是否升级当前连接数据库?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
handleUpdate
();
}
}
>
<
Button
danger
type=
"primary"
loading=
{
checkLoading
}
>
升级
<
Spin
tip=
"loading..."
spinning=
{
checkLoading
}
>
<
Table
className=
{
styles
.
mgTop20
}
columns=
{
autoCheckColumns
}
dataSource=
{
autoCheckList
}
bordered
size=
"small"
/>
<
div
className=
{
styles
.
btnBox
}
>
<
Space
>
<
Button
type=
"primary"
onClick=
{
handleCheck
}
>
检查
</
Button
>
</
Popconfirm
>
</
Space
>
</
div
>
<
Popconfirm
title=
"
是否升级当前连接数据库?"
okText=
"确认"
cancelText=
"取消"
onConfirm=
{
()
=>
{
handleUpdate
();
}
}
>
<
Button
danger
type=
"primary"
>
升级
</
Button
>
</
Popconfirm
>
</
Space
>
</
div
>
</
Spin
>
</
Card
>
<
Card
className=
{
styles
.
mgTop20
}
>
<
div
className=
{
styles
.
tableTitle
}
>
数据库升级记录
</
div
>
...
...
src/pages/database/databaseConfig/mongDB/MongDBTable.jsx
View file @
2d071160
...
...
@@ -111,31 +111,43 @@ const MongDBTable = props => {
title
:
'标签'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
'200px'
,
ellipsis
:
true
,
},
{
title
:
'ip'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'端口'
,
dataIndex
:
'port'
,
key
:
'port'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'数据库名'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'类型'
,
dataIndex
:
'type'
,
key
:
'type'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'复制集'
,
dataIndex
:
'replicaSet'
,
key
:
'replicaSet'
,
width
:
200
,
ellipsis
:
true
,
},
// {
// title: '用户名',
...
...
@@ -151,7 +163,6 @@ const MongDBTable = props => {
title
:
'操作'
,
dataIndex
:
'options'
,
key
:
'options'
,
width
:
300
,
render
:
(
val
,
item
)
=>
[
<
Tag
color=
"#2db7f5"
onClick=
{
()
=>
handleCon
(
val
,
item
)
}
>
测试连接
...
...
src/pages/database/databaseConfig/mysqltable/MySQLTable.jsx
View file @
2d071160
...
...
@@ -107,26 +107,36 @@ const MySQLTable = props => {
title
:
'标签'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'IP'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'数据库名'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'用户名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'密码'
,
dataIndex
:
'password'
,
key
:
'password'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'操作'
,
...
...
src/pages/database/databaseConfig/oracle/OracleTable.jsx
View file @
2d071160
...
...
@@ -107,21 +107,29 @@ const OracleTable = props => {
title
:
'标签'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'网络服务名/(ip:port/实例名)'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
width
:
400
,
ellipsis
:
true
,
},
{
title
:
'用户名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'密码'
,
dataIndex
:
'password'
,
key
:
'password'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'操作'
,
...
...
src/pages/database/databaseConfig/sqlServer/SQLServerTable.jsx
View file @
2d071160
...
...
@@ -107,26 +107,36 @@ const SQLServerTable = props => {
title
:
'标签'
,
dataIndex
:
'name'
,
key
:
'name'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'ip'
,
dataIndex
:
'ip'
,
key
:
'ip'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'数据库名'
,
dataIndex
:
'dbName'
,
key
:
'dbName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'用户名'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'密码'
,
dataIndex
:
'password'
,
key
:
'password'
,
width
:
200
,
ellipsis
:
true
,
},
{
title
:
'操作'
,
...
...
src/pages/userCenter/UserManage.js
View file @
2d071160
This diff is collapsed.
Click to expand it.
src/pages/userCenter/UserManage.less
View file @
2d071160
...
...
@@ -18,14 +18,6 @@
}
}
}
.freeze{
color:gray;
}
.freezeGray{
color:#1890FF;
}
.ant-tree-treenode:hover{
.iconWraper1>span{
margin-left: 12px;
...
...
@@ -34,14 +26,13 @@
}
}
.contentContainer{
min-height: calc(100vh -
194
px);
min-height: calc(100vh -
48
px);
display: flex;
.orgContainer{
width: 20%;
height: calc(100vh - 194px);
min-height: calc(100vh - 48px);
float: left;
padding: 10px;
min-width:
30
0px;
min-width:
24
0px;
background: white;
.ant-tree{
padding-top: 6px;
...
...
@@ -51,15 +42,33 @@
}
}
}
.hide{
display: none;
// width:0;
transition: 1s;
}
.userContainer{
padding: 12px;
margin-left: 12px;
margin-left: 10px;
flex: 1;
height: calc(100vh -
194
px);
height: calc(100vh -
48
px);
background: white;
.ant-table-pagination-right{
padding-right: 12px;
}
.ant-btn-primary{
margin-left: 30px;
background: #50aefc;
}
.ant-table-thead tr th{
font-weight: 600;
color:rgba(0,0,0,0.85);
}
.ant-table-cell{
text-align:center;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
}
}
...
...
src/pages/userCenter/roleManage/RoleManage.jsx
View file @
2d071160
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Row
,
Col
,
Tree
,
Card
,
Input
,
Tooltip
,
Spin
,
notification
}
from
'antd'
;
import
{
FileAddTwoTone
,
EditTwoTone
,
DeleteTwoTone
}
from
'@ant-design/icons'
;
import
{
PageContainer
,
GridContent
}
from
'@ant-design/pro-layout'
;
import
{
GridContent
}
from
'@ant-design/pro-layout'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
getWebModuleTree
,
chooseUserToStation
,
getUserRelationList
,
setMenuToRole
,
}
from
'@/services/userCenter/roleManage/api'
;
...
...
src/pages/userCenter/roleManage/RoleManage.less
View file @
2d071160
.cardBox{
min-height: calc(100vh -
20
0px);
max-height: calc(100vh -
20
0px);
min-height: calc(100vh -
8
0px);
max-height: calc(100vh -
8
0px);
overflow-y: scroll;
}
.ant-tree-node-content-wrapper-open{
...
...
@@ -26,7 +26,7 @@
align-items: center;
}
.cardBoxR{
min-height: calc(100vh -
29
2px);
max-height: calc(100vh -
29
2px);
min-height: calc(100vh -
17
2px);
max-height: calc(100vh -
17
2px);
overflow-y: scroll;
}
\ No newline at end of file
src/pages/userCenter/siteManage/SiteManage.jsx
View file @
2d071160
...
...
@@ -12,7 +12,8 @@ import {
Space
,
}
from
'antd'
;
import
{
FileAddTwoTone
,
EditTwoTone
,
DeleteTwoTone
}
from
'@ant-design/icons'
;
import
{
PageContainer
,
GridContent
}
from
'@ant-design/pro-layout'
;
import
{
GridContent
}
from
'@ant-design/pro-layout'
;
import
PageContainer
from
'@/components/BasePageContainer'
;
import
{
getWebModuleTree
,
chooseUserToStation
,
...
...
src/pages/userCenter/siteManage/SiteManage.less
View file @
2d071160
.cardBox{
height: calc(100vh -
20
0px);
height: calc(100vh -
8
0px);
overflow: auto;
}
.cardBoxR{
min-height: calc(100vh -
29
2px);
min-height: calc(100vh -
17
2px);
}
.ant-tree-node-content-wrapper-open{
display: flex;
...
...
@@ -29,6 +29,7 @@
}
.listItem{
padding-left: 5px;
cursor: pointer;
}
.selected{
background-color: #bae7ff;
...
...
src/services/database/api.js
View file @
2d071160
...
...
@@ -17,12 +17,43 @@ import { get, post } from '@/services/index';
export
const
connectionTest
=
params
=>
get
(
'/DBManager/ConnectionTest'
,
params
);
// 获取数据库配置信息
export
const
getDataBaseConfig
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetDataBaseConfig'
,
params
);
// 获取数据库连接记录
export
const
getConnRecord
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetConnRecord'
,
params
);
// 测试连接
export
const
getConnectionTest
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetConnectionTest'
,
params
);
// 保存数据库连接
export
const
saveConnection
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_SaveConnection'
,
params
);
// 获取数据库列表
export
const
getDataBaseList
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetDataBaseList'
,
params
);
// 数据库初始化
export
const
initDBv4
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_InitDBv4'
,
params
);
// 更新描述
export
const
updateConnDesc
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_UpdateConnDesc'
,
params
);
// 获取日志
export
const
getInitDBLog
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_GetInitDBLog'
,
params
);
// 删除初始化日志
export
const
deleteInitDBLog
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_DeleteInitDBLog'
,
params
);
// 修改产品解决方案
export
const
setTableSQLDirName
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_SetTableSQLDirName'
,
params
);
...
...
@@ -31,13 +62,31 @@ export const setTableSQLDirName = params =>
export
const
deleteConn
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/S_DeleteConn'
,
params
);
/**
*
* @解决方案管理
*/
// 切换解决方案配置
export
const
getSolutionList
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/W4_GetSolutionList'
,
params
);
// 切换解决方案
export
const
changeSolution
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/W4_ChangeSolution'
,
params
);
// 更新站点人员
/**
*
* @数据库标准化管理
*/
// 检查数据库表
export
const
tableCheck
=
params
=>
get
(
`/Cityinterface/rest/services/OMS.svc/TableCheck`
,
params
);
// 获取数据库升级记录
export
const
databaseStandardGetLog
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/DatabaseStandard_GetLog'
,
params
);
// 更新
export
const
updateDateBase
=
params
=>
get
(
'/Cityinterface/rest/services/OMS.svc/DatabaseStandard_UpdateDateBase'
,
...
...
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