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
4cc667ee
Commit
4cc667ee
authored
Jan 17, 2021
by
Maofei94
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 数据库初始化log
parent
f0efdd11
Pipeline
#22533
passed with stages
in 18 minutes 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
26 deletions
+22
-26
InitDataBase.jsx
src/pages/database/InitDataBase.jsx
+22
-26
No files found.
src/pages/database/InitDataBase.jsx
View file @
4cc667ee
...
...
@@ -116,13 +116,19 @@ const InitDataBase = props => {
})
.
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
);
if
(
res
.
content
)
{
let
arr
=
[];
arr
.
push
(
res
.
content
.
split
(
/
(\r\n)
|
(\n)
/
)
.
map
((
item
,
index
)
=>
<
p
key=
{
index
}
>
{
item
}
</
p
>),
);
setInitContent
(
arr
);
scroll
.
current
.
scrollTop
=
scroll
.
current
.
scrollHeight
;
}
if
(
!
res
.
finish
)
{
doInitLog
();
}
}
})
.
catch
(
err
=>
{
...
...
@@ -136,12 +142,6 @@ const InitDataBase = props => {
setInitVisible
(
true
);
let
obj
=
form
.
getFieldsValue
();
doInitLog
();
for
(
let
i
=
0
;
i
<
10
;
i
++
)
{
setTimeout
(()
=>
{
doInitLog
();
},
1000
);
}
initDBv4
({
_version
:
9999
,
_dc
:
Date
.
now
(),
...
...
@@ -163,21 +163,11 @@ const InitDataBase = props => {
setCardLoading
(
false
);
console
.
log
(
err
);
});
const
timer
=
setInterval
(()
=>
{
if
(
scroll
.
current
.
scrollHeight
===
scroll
.
current
.
clientHeight
+
scroll
.
current
.
scrollTop
)
{
clearInterval
(
timer
);
}
scroll
.
current
.
scrollTo
(
0
,
scroll
.
current
.
scrollHeight
-
570
);
},
1000
);
};
const
onValuesChange
=
(
value
,
b
)
=>
{
form
.
setFieldsValue
(
value
);
};
const
onChange
=
value
=>
{
console
.
log
(
value
);
const
{
length
}
=
value
;
form
.
setFieldsValue
({
dbName
:
value
[
length
-
1
],
...
...
@@ -280,7 +270,6 @@ const InitDataBase = props => {
};
// 点击表格回显到表单
const
tableClick
=
item
=>
{
console
.
log
(
item
);
let
obj
=
{
...
dbForm
};
Object
.
keys
(
obj
).
forEach
(
k
=>
{
obj
[
k
]
=
item
[
k
];
...
...
@@ -346,7 +335,6 @@ const InitDataBase = props => {
desc
,
})
.
then
(
res
=>
{
console
.
log
(
res
);
setModalVisible
(
false
);
setUpData
(
upData
+
1
);
})
...
...
@@ -588,6 +576,10 @@ const InitDataBase = props => {
onCancel=
{
()
=>
{
setInitVisible
(
false
);
setInitContent
(
''
);
deleteInitDBLog
({
_version
:
9999
,
_dc
:
Date
.
now
(),
});
}
}
width=
{
800
}
maskClosable=
{
false
}
...
...
@@ -615,7 +607,11 @@ const InitDataBase = props => {
}
}
>
{
initContent
||
(
<
Spin
spinning
style=
{
{
width
:
'100%'
,
marginTop
:
'40px'
}
}
/>
<
Spin
spinning
tip=
"loading..."
style=
{
{
width
:
'100%'
,
marginTop
:
'40px'
}
}
/>
)
}
</
div
>
</
Modal
>
...
...
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