Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pptist
Project
Project
Details
Activity
Releases
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
viitto
pptist
Commits
71493e12
Commit
71493e12
authored
Jun 05, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logo
parent
2acaddfb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
9 deletions
+18
-9
index.vue
src/views/Editor/Thumbnails/index.vue
+10
-5
PreviewCover.vue
src/views/Preview/PreviewCover.vue
+8
-4
No files found.
src/views/Editor/Thumbnails/index.vue
View file @
71493e12
...
...
@@ -549,18 +549,22 @@ const generateUniqueId = () => {
const
getColorShade
=
async
(
newSlides
:
any
)
=>
{
let
dark
=
false
let
day
=
0
// 根据集团渲染logo
// 根据集团渲染logo
if
(
tempDatas
.
value
.
GId
!=
userInfo
.
value
.
gid
&&!
searchData
.
value
.
isTeamManage
){
for
(
let
j
=
0
;
j
<
colorList
.
value
.
length
;
j
++
){
if
(
getRgbLevel
(
colorList
.
value
[
j
].
Color
)
>
50
)
dark
=
true
}
for
(
let
i
=
0
;
i
<
newSlides
.
length
;
i
++
){
day
=
0
if
(
i
>
colorList
.
value
.
length
-
2
)
{
dark
=
false
day
=
1
}
let
x
=
newSlides
[
i
]
let
eles
=
x
.
elements
.
filter
(
y
=>
y
.
layerName
&&
y
.
layerName
.
indexOf
(
'logo'
)
!=-
1
)
let
layerNames
=
x
.
elements
.
filter
(
z
=>
{
if
(
z
.
layerName
&&
z
.
layerName
.
indexOf
(
'DAY'
)
!=-
1
)
return
z
})
day
=
layerNames
&&
layerNames
.
length
>
0
?
1
:
0
let
newElementsImg
=
await
ResolveTripLogoHandler
(
eles
,
i
,
dark
,
day
)
let
newElements
=
[]
x
.
elements
.
forEach
(
y
=>
{
...
...
@@ -594,9 +598,9 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let
Colors
=
templateObj
[
i
].
layerName
.
split
(
','
)
let
y
=
templateObj
[
i
]
let
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
templateObj
[
i
].
src
)
let
scale
=
parseInt
(
tempSize
.
width
/
tempSize
.
height
)
let
scale
=
parseInt
(
y
.
width
/
y
.
height
)
let
url
=
''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
console
.
log
()
if
(
scale
>=
1
&&
scale
<
3
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
0
]:
acquiesceLogo
.
value
[
3
]
if
(
scale
>=
1
&&
scale
<
3
&&
day
)
url
=
acquiesceLogo
.
value
[
6
]
if
(
scale
<
1
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
1
]:
acquiesceLogo
.
value
[
4
]
...
...
@@ -610,7 +614,7 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let
ratio
=
newTempSize
.
width
/
y
.
width
width
=
y
.
width
height
=
newTempSize
.
height
/
ratio
if
(
height
<
y
.
height
){
if
(
height
>
y
.
height
){
ratio
=
height
/
y
.
height
height
=
y
.
height
width
=
width
/
ratio
...
...
@@ -618,6 +622,7 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
y
.
height
=
height
y
.
width
=
width
y
.
lock
=
false
delete
y
.
clip
templateObj
[
i
].
src
=
url
if
(
tempNewSlide
){
tempNewSlide
.
elements
.
push
(...
templateObj
)
...
...
src/views/Preview/PreviewCover.vue
View file @
71493e12
...
...
@@ -135,12 +135,16 @@ const getColorShade = async (newSlides:any) => {
if
(
getRgbLevel
(
colorList
.
value
[
j
].
Color
)
>
50
)
dark
=
true
}
for
(
let
i
=
0
;
i
<
newSlides
.
length
;
i
++
){
day
=
0
if
(
i
>
colorList
.
value
.
length
-
2
)
{
dark
=
false
day
=
1
}
let
x
=
newSlides
[
i
]
let
eles
=
x
.
elements
.
filter
(
y
=>
y
.
layerName
&&
y
.
layerName
.
indexOf
(
'logo'
)
!=-
1
)
let
layerNames
=
x
.
elements
.
filter
(
z
=>
{
if
(
z
.
layerName
&&
z
.
layerName
.
indexOf
(
'DAY'
)
!=-
1
)
return
z
})
day
=
layerNames
&&
layerNames
.
length
>
0
?
1
:
0
let
newElementsImg
=
await
ResolveTripLogoHandler
(
eles
,
i
,
dark
,
day
)
let
newElements
=
[]
x
.
elements
.
forEach
(
y
=>
{
...
...
@@ -168,9 +172,8 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let
Colors
=
templateObj
[
i
].
layerName
.
split
(
','
)
let
y
=
templateObj
[
i
]
let
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
templateObj
[
i
].
src
)
let
scale
=
parseInt
(
tempSize
.
width
/
tempSize
.
height
)
let
scale
=
parseInt
(
y
.
width
/
y
.
height
)
let
url
=
''
// if(Colors[1]||scale==6) templateObj[i].filters.invert = '20%'
if
(
scale
>=
1
&&
scale
<
3
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
0
]:
acquiesceLogo
.
value
[
3
]
if
(
scale
>=
1
&&
scale
<
3
&&
day
)
url
=
acquiesceLogo
.
value
[
6
]
if
(
scale
<
1
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
1
]:
acquiesceLogo
.
value
[
4
]
...
...
@@ -184,13 +187,14 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let
ratio
=
newTempSize
.
width
/
y
.
width
width
=
y
.
width
height
=
newTempSize
.
height
/
ratio
if
(
height
<
y
.
height
){
if
(
height
>
y
.
height
){
ratio
=
height
/
y
.
height
height
=
y
.
height
width
=
width
/
ratio
}
y
.
height
=
height
y
.
width
=
width
delete
y
.
clip
templateObj
[
i
].
src
=
url
if
(
tempNewSlide
){
tempNewSlide
.
elements
.
push
(...
templateObj
)
...
...
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