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
4fee2922
Commit
4fee2922
authored
Mar 15, 2023
by
邓超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 数据库连接保存传入desc
parent
3c79a291
Pipeline
#69190
passed with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
InitDataBase.jsx
src/pages/database/InitDataBase/InitDataBase.jsx
+4
-1
No files found.
src/pages/database/InitDataBase/InitDataBase.jsx
View file @
4fee2922
...
...
@@ -86,6 +86,7 @@ const InitDataBase = props => {
const
[
keep
,
setKeep
]
=
useState
([]);
const
[
flag
,
setFlag
]
=
useState
(
0
);
const
[
keepData
,
setKeepData
]
=
useState
({});
const
chooseDb
=
useRef
({});
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'
);
//十六位十六进制数作为密钥
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1234567890000000'
);
...
...
@@ -254,12 +255,13 @@ const InitDataBase = props => {
const
onFinish
=
values
=>
{
setCardLoading
(
true
);
const
obj
=
values
;
console
.
log
(
chooseDb
.
current
,
'obj'
);
saveConnectionNew
({
ip
:
obj
.
ip
,
dbName
:
obj
.
dbName
,
userName
:
obj
.
userName
,
password
:
Encrypt
(
obj
.
password
),
desc
:
chooseDb
.
current
.
desc
,
})
.
then
(
resnew
=>
{
setCardLoading
(
false
);
...
...
@@ -361,6 +363,7 @@ const InitDataBase = props => {
Object
.
keys
(
obj
).
forEach
(
k
=>
{
obj
[
k
]
=
item
[
k
];
});
chooseDb
.
current
=
item
;
form
.
setFieldsValue
({
...
obj
,
password
:
Decrypt
(
obj
.
password
)
});
};
// 产品方案选择框回调
...
...
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