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
fcacc12b
Commit
fcacc12b
authored
May 12, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '追加新产品图标'
parent
f2289ced
Pipeline
#72310
waiting for manual action with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
9 deletions
+32
-9
new.png
src/assets/images/icons/new.png
+0
-0
AppendModal.jsx
src/pages/database/databaseInitialization/AppendModal.jsx
+32
-9
No files found.
src/assets/images/icons/new.png
0 → 100644
View file @
fcacc12b
This diff was suppressed by a .gitattributes entry.
src/pages/database/databaseInitialization/AppendModal.jsx
View file @
fcacc12b
/* eslint-disable indent */
/* eslint-disable guard-for-in */
/* eslint-disable no-restricted-syntax */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
...
...
@@ -9,9 +10,10 @@ import {
PlusOutlined
,
CheckOutlined
,
}
from
'@ant-design/icons'
;
import
styles
from
'./DatabaseInitialization.less'
;
import
CryptoJS
from
'crypto-js'
;
import
styles
from
'./DatabaseInitialization.less'
;
import
{
GetLicenseDifference
,
InitEditDataBase
,
GetProductList
}
from
'@/services/database/api'
;
import
New
from
'../../../assets/images/icons/new.png'
;
const
AppendModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
visible
,
onCancel
,
value
,
keepHistroy
}
=
props
;
...
...
@@ -29,6 +31,7 @@ const AppendModal = props => {
const
[
name1
,
setName1
]
=
useState
(
''
);
const
[
number1
,
setNumber1
]
=
useState
(
''
);
const
[
allValue
,
setAllValue
]
=
useState
([]);
const
[
keepData
,
setKeepData
]
=
useState
([]);
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1p2a3n4d5a6o7m8s9a10n1e2t3c4o5re'
);
// 十六位十六进制数作为密钥
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
'1234567890000000'
);
...
...
@@ -36,11 +39,9 @@ const AppendModal = props => {
useEffect
(()
=>
{
if
(
visible
)
{
getProduct
();
console
.
log
(
value
);
console
.
log
(
keepHistroy
);
let
aa
=
[];
keepHistroy
.
map
((
i
,
j
)
=>
{
if
(
i
.
license
!=
'已使用'
&&
j
!
=
keepHistroy
.
length
-
1
)
{
if
(
i
.
license
!=
=
'已使用'
&&
j
!=
=
keepHistroy
.
length
-
1
)
{
aa
.
push
(
i
);
}
});
...
...
@@ -98,6 +99,7 @@ const AppendModal = props => {
GetLicenseDifference
({
...
value
,
password
:
Encrypt
(
value
.
password
)
}).
then
(
res
=>
{
setLoading
(
false
);
if
(
res
.
code
===
0
)
{
setKeepData
(
res
.
data
);
let
aab
=
[];
res
.
data
.
map
(
k
=>
{
if
(
k
.
status
==
0
)
{
...
...
@@ -114,7 +116,6 @@ const AppendModal = props => {
});
arr
[
i
]
=
list
;
});
console
.
log
(
arr
);
setData
(
arr
);
if
(
res
.
data
.
length
==
0
)
{
setFlag
(
1
);
...
...
@@ -183,7 +184,6 @@ const AppendModal = props => {
aa
.
push
(
i
);
}
});
console
.
log
(
aa
);
return
aa
.
length
;
};
...
...
@@ -224,7 +224,7 @@ const AppendModal = props => {
}
>
<
Spin
spinning=
{
loading
}
>
{
flag
==
1
?
(
{
flag
==
=
1
?
(
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
description=
{
<
span
>
当前授权码下产品已全部初始化,无需再次追加
</
span
>
}
...
...
@@ -342,9 +342,20 @@ const AppendModal = props => {
marginBottom
:
'20px'
,
}
}
>
{
allValue
.
indexOf
(
j
)
!=
-
1
?
(
{
allValue
.
indexOf
(
j
)
!=
=
-
1
?
(
<
span
>
{
' '
}
{
keepData
.
length
>
0
&&
keepData
.
find
(
item
=>
item
.
name
===
j
).
version
!==
2022
&&
(
<
img
src=
{
New
}
style=
{
{
height
:
'24px'
,
marginTop
:
'-12px'
,
marginRight
:
'3px'
,
}
}
alt=
""
/>
)
}
<
PlusOutlined
style=
{
{
color
:
'rgb(24, 144, 255)'
,
marginRight
:
'5px'
}
}
/>
...
...
@@ -352,6 +363,18 @@ const AppendModal = props => {
</
span
>
)
:
(
<
span
>
{
keepData
.
length
>
0
&&
keepData
.
find
(
item
=>
item
.
name
===
j
).
version
!==
2022
&&
(
<
img
src=
{
New
}
style=
{
{
height
:
'24px'
,
marginTop
:
'-12px'
,
marginRight
:
'3px'
,
}
}
alt=
""
/>
)
}
<
CheckOutlined
style=
{
{
color
:
'green'
,
marginRight
:
'5px'
}
}
/>
{
j
}
</
span
>
...
...
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