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
3087d3c4
Commit
3087d3c4
authored
Jul 29, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '数据库初始化功能'
parent
0533f22c
Pipeline
#56516
passed with stages
Changes
7
Pipelines
1
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
116 additions
and
8 deletions
+116
-8
InitDataBase.less
src/pages/database/InitDataBase/InitDataBase.less
+30
-5
initModal.jsx
src/pages/database/InitDataBase/initModal.jsx
+2
-2
DatabaseInitialization.jsx
...atabase/databaseInitialization/DatabaseInitialization.jsx
+0
-0
DatabaseInitialization.less
...tabase/databaseInitialization/DatabaseInitialization.less
+60
-0
productConfig.jsx
src/pages/productCenter/productConfig/productConfig.jsx
+5
-1
config.js
src/routes/config.js
+7
-0
api.js
src/services/database/api.js
+12
-0
No files found.
src/pages/database/InitDataBase/InitDataBase.less
View file @
3087d3c4
...
@@ -6,15 +6,16 @@
...
@@ -6,15 +6,16 @@
}
}
.tCenter {
.tCenter {
text-align: center;
text-align: center;
.btnBox {
display: flex !important;
justify-content: space-between;
}
}
}
.decsBox {
.decsBox {
height: 32px;
height: 32px;
line-height: 32px;
line-height: 32px;
}
}
.btnBox {
display: flex !important;
justify-content: space-between;
}
.ant-modal-header {
.ant-modal-header {
height: 70px;
height: 70px;
}
}
...
@@ -28,6 +29,7 @@ InitDataBaseContainer {
...
@@ -28,6 +29,7 @@ InitDataBaseContainer {
margin-top: 10px;
margin-top: 10px;
border: 1px solid #ecf0fa;
border: 1px solid #ecf0fa;
border-top: none;
border-top: none;
.ant-tabs-nav {
.ant-tabs-nav {
background-color: #f4f6fc;
background-color: #f4f6fc;
.ant-tabs-tab {
.ant-tabs-tab {
...
@@ -48,9 +50,32 @@ InitDataBaseContainer {
...
@@ -48,9 +50,32 @@ InitDataBaseContainer {
}
}
}
}
.initItemData1 {
height: calc(100vh - 190px);
overflow: scroll;
.btnBox {
display: flex !important;
justify-content: flex-end;
}
.ant-checkbox-wrapper {
width: 298px;
margin-bottom: 10px;
margin-left: 8px;
}
.view:hover {
cursor: not-allowed;
}
}
.initItemData {
.initItemData {
height: calc(100vh - 190px);
overflow: scroll;
.btnBox {
display: flex !important;
justify-content: flex-end;
}
.ant-checkbox-wrapper {
.ant-checkbox-wrapper {
width: 3
0
0px;
width: 3
5
0px;
margin-bottom: 10px;
margin-bottom: 10px;
margin-left: 8px;
margin-left: 8px;
}
}
...
...
src/pages/database/InitDataBase/initModal.jsx
View file @
3087d3c4
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* @Description:
* @Description:
* @Author: leizhe
* @Author: leizhe
* @Date: 2022-07-13 16:13:03
* @Date: 2022-07-13 16:13:03
* @LastEditTime: 2022-07-2
6 13:35:37
* @LastEditTime: 2022-07-2
8 19:24:59
* @LastEditors: leizhe
* @LastEditors: leizhe
*/
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
...
@@ -323,7 +323,7 @@ const InitModal = props => {
...
@@ -323,7 +323,7 @@ const InitModal = props => {
<
/Button>
,
<
/Button>
,
]
}
]
}
>
>
<
div
className=
{
styles
.
initItemData
}
>
<
div
className=
{
styles
.
initItemData
1
}
>
{
visible
&&
(
{
visible
&&
(
<
div
>
<
div
>
{
title
&&
{
title
&&
...
...
src/pages/database/databaseInitialization/DatabaseInitialization.jsx
0 → 100644
View file @
3087d3c4
This diff is collapsed.
Click to expand it.
src/pages/database/databaseInitialization/DatabaseInitialization.less
0 → 100644
View file @
3087d3c4
.tableTitle {
font-size: 16px;
}
.mgTop20 {
// height: calc(100vh - 170px);
}
.tCenter {
text-align: center;
}
.decsBox {
height: 32px;
line-height: 32px;
}
.btnBox {
display: flex !important;
justify-content: flex-end;
}
.ant-modal-header {
height: 70px;
}
InitDataBaseContainer {
.ant-card-body {
padding-bottom: 0px !important;
}
}
.cardContainer {
margin-top: 10px;
border: 1px solid #ecf0fa;
border-top: none;
.ant-tabs-nav {
background-color: #f4f6fc;
.ant-tabs-tab {
background-color: transparent;
border: none;
border-top: 2px solid transparent;
box-sizing: content-box;
}
.ant-tabs-tab-active {
border: none;
background-color: #fff;
border-top: 2px solid #1685ff;
}
}
.tabContainer {
padding-left: 20px;
box-sizing: border-box;
}
}
.initItemData {
.ant-checkbox-wrapper {
width: 300px;
margin-bottom: 10px;
margin-left: 8px;
}
.view:hover {
cursor: not-allowed;
}
}
src/pages/productCenter/productConfig/productConfig.jsx
View file @
3087d3c4
...
@@ -12,6 +12,7 @@ const ProductConfig = props => {
...
@@ -12,6 +12,7 @@ const ProductConfig = props => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
flag
,
setFlag
]
=
useState
(
1
);
const
[
flag
,
setFlag
]
=
useState
(
1
);
const
[
list
,
setList
]
=
useState
(
new
Set
());
const
[
list
,
setList
]
=
useState
(
new
Set
());
const
[
keepData
,
setKeepData
]
=
useState
(
false
);
// 默认展示第一项
// 默认展示第一项
// useEffect(() => {
// useEffect(() => {
// setLoading(true);
// setLoading(true);
...
@@ -60,6 +61,8 @@ const ProductConfig = props => {
...
@@ -60,6 +61,8 @@ const ProductConfig = props => {
data
:
{
AllProducts
,
UserProducts
},
data
:
{
AllProducts
,
UserProducts
},
}
=
res
;
}
=
res
;
// setProductList(AllProducts);
// setProductList(AllProducts);
console
.
log
(
res
.
data
.
IsAuthorize
);
setKeepData
(
res
.
data
.
IsAuthorize
);
setUserProductsList
(
UserProducts
);
setUserProductsList
(
UserProducts
);
console
.
log
(
UserProducts
);
console
.
log
(
UserProducts
);
console
.
log
(
userProductsList
);
console
.
log
(
userProductsList
);
...
@@ -185,6 +188,7 @@ const ProductConfig = props => {
...
@@ -185,6 +188,7 @@ const ProductConfig = props => {
console
.
log
(
value
);
console
.
log
(
value
);
setProductObj
({
...
value
});
setProductObj
({
...
value
});
};
};
const
renderListItem
=
arr
=>
(
const
renderListItem
=
arr
=>
(
<
div
style=
{
{
marginBottom
:
'25px'
,
borderBottom
:
'1px solid #ccc'
,
paddingBottom
:
'25px'
}
}
>
<
div
style=
{
{
marginBottom
:
'25px'
,
borderBottom
:
'1px solid #ccc'
,
paddingBottom
:
'25px'
}
}
>
{
arr
.
map
(
item
=>
(
{
arr
.
map
(
item
=>
(
...
@@ -199,7 +203,7 @@ const ProductConfig = props => {
...
@@ -199,7 +203,7 @@ const ProductConfig = props => {
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
div
onClick=
{
e
=>
e
.
stopPropagation
()
}
>
<
Switch
<
Switch
checked=
{
item
.
IsUsed
}
checked=
{
item
.
IsUsed
}
// disabled
disabled=
{
keepData
?
true
:
false
}
checkedChildren=
"启用"
checkedChildren=
"启用"
unCheckedChildren=
"关闭"
unCheckedChildren=
"关闭"
onClick=
{
e
=>
{
onClick=
{
e
=>
{
...
...
src/routes/config.js
View file @
3087d3c4
...
@@ -22,6 +22,7 @@ import Login from '@/pages/user/login';
...
@@ -22,6 +22,7 @@ import Login from '@/pages/user/login';
import
CurrentSolution
from
'@/pages/currentSolution/CurrentSolution'
;
import
CurrentSolution
from
'@/pages/currentSolution/CurrentSolution'
;
// 数据库管理
// 数据库管理
import
InitDataBase
from
'@/pages/database/InitDataBase/InitDataBase'
;
import
InitDataBase
from
'@/pages/database/InitDataBase/InitDataBase'
;
import
DatabaseInitialization
from
'@/pages/database/databaseInitialization/DatabaseInitialization'
;
import
ManagementDataBase
from
'@/pages/database/ManagementDataBase/ManagementDataBase'
;
import
ManagementDataBase
from
'@/pages/database/ManagementDataBase/ManagementDataBase'
;
import
DatabaseConnectConfig
from
'@/pages/database/databaseConfig/DatabaseConfig'
;
import
DatabaseConnectConfig
from
'@/pages/database/databaseConfig/DatabaseConfig'
;
// 用户中心
// 用户中心
...
@@ -102,6 +103,12 @@ export default {
...
@@ -102,6 +103,12 @@ export default {
component
:
BlankLayout
,
component
:
BlankLayout
,
authority
:
superAuthority
,
authority
:
superAuthority
,
routes
:
[
routes
:
[
{
path
:
'/dbm/dbInitializa'
,
name
:
'数据库初始化'
,
authority
:
superAuthority
,
component
:
DatabaseInitialization
,
},
{
{
path
:
'/dbm/dbInit'
,
path
:
'/dbm/dbInit'
,
name
:
'数据库连接'
,
name
:
'数据库连接'
,
...
...
src/services/database/api.js
View file @
3087d3c4
...
@@ -216,3 +216,15 @@ export const DeleteMainServer = params =>
...
@@ -216,3 +216,15 @@ export const DeleteMainServer = params =>
// 测试主站连接
// 测试主站连接
export
const
GetUrlConnectionTest
=
params
=>
export
const
GetUrlConnectionTest
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetUrlConnectionTest`
,
params
);
get
(
`
${
PUBLISH_SERVICE
}
/DBManager/GetUrlConnectionTest`
,
params
);
export
const
CheckConnection
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DBManager/CheckConnection`
,
params
);
export
const
CheckDatabaseIsExist
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DBManager/CheckDatabaseIsExist`
,
params
);
// 给平台管理员赋值所有菜单权限
export
const
SetAdminMenuToRole
=
params
=>
get
(
`
${
PUBLISH_SERVICE
}
/UserCenter/SetAdminMenuToRole`
,
params
);
export
const
NewInitAddDataBase
=
params
=>
post
(
`
${
PUBLISH_SERVICE
}
/DBManager/NewInitAddDataBase`
,
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