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
23602c5d
Commit
23602c5d
authored
Jul 29, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '数据库初始化'
parent
3087d3c4
Pipeline
#56534
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
DatabaseInitialization.jsx
...atabase/databaseInitialization/DatabaseInitialization.jsx
+37
-5
No files found.
src/pages/database/databaseInitialization/DatabaseInitialization.jsx
View file @
23602c5d
...
...
@@ -96,6 +96,7 @@ const DatabaseInitialization = props => {
const
[
secordColor
,
setsecordColor
]
=
useState
(
'gray'
);
const
[
lastColor
,
setLastColor
]
=
useState
(
'gray'
);
const
[
totalProduct
,
setTotalProduct
]
=
useState
(
''
);
const
[
simpleProduct
,
setSimpleProduct
]
=
useState
(
''
);
// 获取数据库配置信息
useEffect
(()
=>
{
...
...
@@ -438,6 +439,12 @@ const DatabaseInitialization = props => {
duration
:
5
,
description
:
'数据库初始化成功'
,
});
setkeepNumber
(
''
);
setkeepNa
(
''
);
setkeepMsg
(
''
);
setkeepCo
(
''
);
setTotalProduct
(
res
.
data
.
productPackageSumCount
);
setSimpleProduct
(
res
.
data
.
productPackageCount
);
}
else
{
setFinish
(
true
);
setfirstColor
(
'red'
);
...
...
@@ -454,6 +461,8 @@ const DatabaseInitialization = props => {
const
flagChange
=
()
=>
{
console
.
log
(
888
);
setSimpleProduct
(
''
);
setTotalProduct
(
''
);
setValue
(
''
);
setKeepProduct
([]);
// GetDb(1);
...
...
@@ -477,6 +486,7 @@ const DatabaseInitialization = props => {
if
(
arr
&&
bb
!=
-
1
)
{
console
.
log
(
arr
);
}
else
{
console
.
log
(
keepValue
);
let
aa
=
keepValue
;
aa
[
item
]
=
e
;
let
a
=
Object
.
keys
(
aa
);
...
...
@@ -514,6 +524,7 @@ const DatabaseInitialization = props => {
console
.
log
(
99999999
);
let
obj
=
form
.
getFieldsValue
();
CheckDatabaseIsExist
({
...
obj
}).
then
(
res
=>
{
if
(
res
.
code
==
0
)
{
// 数据库不存在
if
(
res
.
data
===
false
)
{
console
.
log
(
555
);
...
...
@@ -547,6 +558,14 @@ const DatabaseInitialization = props => {
description
:
'当前数据库已存在不可初始化'
,
});
}
}
else
{
setMsg
(
res
.
msg
);
notification
.
warning
({
message
:
'提示'
,
duration
:
5
,
description
:
res
.
msg
,
});
}
});
};
...
...
@@ -654,7 +673,7 @@ const DatabaseInitialization = props => {
},
]
}
>
<
Input
placeholder=
"请输入服务器名或IP地址"
onBlur=
{
save
}
/>
<
Input
placeholder=
"请输入服务器名或IP地址"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.userName}:`
}
...
...
@@ -681,7 +700,7 @@ const DatabaseInitialization = props => {
},
]
}
>
<
Input
placeholder=
"请输入用户名称"
onBlur=
{
save
}
/>
<
Input
placeholder=
"请输入用户名称"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.password}:`
}
...
...
@@ -709,7 +728,7 @@ const DatabaseInitialization = props => {
},
]
}
>
<
Input
placeholder=
"请输入用户密码"
type=
"password"
onBlur=
{
save
}
/>
<
Input
placeholder=
"请输入用户密码"
type=
"password"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
{
`${formLables.dbName}:`
}
...
...
@@ -740,7 +759,7 @@ const DatabaseInitialization = props => {
},
]
}
>
<
Input
placeholder=
"请输入数据库名称"
onBlur=
{
save
}
/>
<
Input
placeholder=
"请输入数据库名称"
/>
{
/* <Select
showSearch
mode="tags"
...
...
@@ -771,11 +790,24 @@ const DatabaseInitialization = props => {
</Select> */
}
</
Form
.
Item
>
</
Form
>
<
div
style=
{
{
marginTop
:
'50px'
,
transform
:
'scal(1.5)'
}
}
>
<
div
style=
{
{
float
:
'right'
}
}
>
<
Button
onClick=
{
save
}
>
环境检查
</
Button
>
</
div
>
<
div
style=
{
{
marginTop
:
'100px'
,
transform
:
'scal(1.5)'
}
}
>
<
Timeline
>
<
Timeline
.
Item
color=
{
firstColor
}
>
数据库初始化完成
</
Timeline
.
Item
>
<
Timeline
.
Item
color=
{
secordColor
}
>
<
p
>
产品授权打开已初始化的产品
</
p
>
{
/* {console.log(simpleProduct)}
{console.log(totalProduct)} */
}
{
/* {simpleProduct ? ( */
}
<
p
>
已打开
<
span
style=
{
{
color
:
'rgb(24 144 255)'
}
}
>
{
simpleProduct
}
</
span
>
/
<
span
style=
{
{
color
:
'rgb(24 144 255)'
}
}
>
{
totalProduct
}
</
span
>
个产品
</
p
>
{
/* ) : (
<></>
)} */
}
</
Timeline
.
Item
>
<
Timeline
.
Item
color=
{
lastColor
}
>
<
p
>
平台管理员勾选所有菜单权限
</
p
>
...
...
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