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
7a6f68c0
Commit
7a6f68c0
authored
Jun 28, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置logo
parent
c3e65c37
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
545 additions
and
10 deletions
+545
-10
router.ts
src/router/router.ts
+7
-0
LOGOService.ts
src/services/LOGOService.ts
+29
-0
menu.ts
src/store/menu.ts
+1
-0
common.ts
src/utils/common.ts
+12
-0
index.vue
src/views/Editor/Thumbnails/index.vue
+17
-8
Layout.vue
src/views/TeamCenter/Layout.vue
+1
-1
LogoDisposition.vue
src/views/TeamCenter/LogoDisposition.vue
+477
-0
WaterMaker.vue
src/views/TeamCenter/WaterMaker.vue
+1
-1
No files found.
src/router/router.ts
View file @
7a6f68c0
...
...
@@ -249,6 +249,13 @@ const routes: RouteRecordRaw[] = [
title
:
'云盘空间'
}
},
{
path
:
'/a/l'
,
component
:
()
=>
import
(
'@/views/TeamCenter/LogoDisposition.vue'
),
meta
:{
title
:
'LOGO设置'
}
},
{
path
:
'/a/order'
,
component
:
()
=>
import
(
'@/views/TeamCenter/Order.vue'
),
...
...
src/services/LOGOService.ts
0 → 100644
View file @
7a6f68c0
import
Api
,{
HttpResponse
,
Result
}
from
'../utils/request'
;
class
LOGOService
{
static
async
EnableGroupLogo
(
IsEnableLogo
:
number
):
Promise
<
HttpResponse
>
{
let
params
=
{
IsEnableLogo
}
return
Api
.
Post
(
"ppt_EnableGroupLogo"
,
params
)
}
static
async
DelGroupLogo
(
TId
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"ppt_DelGroupLogo"
,{
TId
})
}
static
async
SetBatchGroupLogo
(
LogoList
:
any
):
Promise
<
HttpResponse
>
{
let
params
=
{
LogoList
}
return
Api
.
Post
(
"ppt_SetBatchGroupLogo"
,
params
)
}
static
async
SetGroupLogo
(
params
:
any
):
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"ppt_SetGroupLogo"
,
params
)
}
static
async
GetPPTistGroupLogoList
():
Promise
<
HttpResponse
>
{
return
Api
.
Post
(
"ppt_GetPPTistGroupLogoList"
,{})
}
}
export
default
LOGOService
;
\ No newline at end of file
src/store/menu.ts
View file @
7a6f68c0
...
...
@@ -29,6 +29,7 @@ const menus:{menu:Menu,owner:MenuOwner}[] = [
// {menu:{name:'数据统计',icon:'IconDashBoard',url:'/a/d'},owner:'A'},
{
menu
:{
name
:
'水印设置'
,
icon
:
'IconTag'
,
url
:
'/a/w'
},
owner
:
'A'
},
{
menu
:{
name
:
'云盘空间'
,
icon
:
'IconCloudStorage'
,
url
:
'/a/c'
},
owner
:
'A'
},
{
menu
:{
name
:
'LOGO设置'
,
icon
:
'IconPicture'
,
url
:
'/a/l'
},
owner
:
'A'
},
{
menu
:{
name
:
'订单/发票'
,
icon
:
'IconCurrency'
,
url
:
'/a/order'
},
owner
:
'E'
},
{
menu
:{
...
...
src/utils/common.ts
View file @
7a6f68c0
...
...
@@ -210,3 +210,15 @@ export const DominantColour = () =>{
export
const
getRgbLevel
=
(
colorarr
:
any
)
=>
{
return
colorarr
[
0
]
*
0.299
+
colorarr
[
1
]
*
0.587
+
colorarr
[
2
]
*
0.114
}
// base64 图
export
const
dataURLtoFile
=
(
file
:
any
)
=>
{
const
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
(
e
:
any
)
=>
{
const
base64
=
e
.
target
.
result
// 添加 base64 文件,这里假设文件名为 'file'
let
basestr
=
base64
.
split
(
','
)
return
base64
};
}
\ No newline at end of file
src/views/Editor/Thumbnails/index.vue
View file @
7a6f68c0
...
...
@@ -554,7 +554,7 @@ const getColorShade = async (newSlides:any) => {
let
dark
=
false
let
day
=
0
// 根据集团渲染logo
if
(
tempDatas
.
value
.
GId
!=
userInfo
.
value
.
gid
&&!
searchData
.
value
.
isTeamManage
){
if
(
(
tempDatas
.
value
.
GId
!=
userInfo
.
value
.
gid
&&!
searchData
.
value
.
isTeamManage
)
||
userInfo
.
value
.
IsEnableLogo
){
for
(
let
j
=
0
;
j
<
colorList
.
value
.
length
;
j
++
){
if
(
getRgbLevel
(
colorList
.
value
[
j
].
Color
)
>
50
)
dark
=
true
}
...
...
@@ -611,13 +611,22 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let
tempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
templateObj
[
i
].
src
)
let
scale
=
parseInt
(
y
.
width
/
y
.
height
)
let
url
=
''
console
.
log
()
if
(
userInfo
.
value
.
IsEnableLogo
){
let
LOGOS
=
userInfo
.
value
.
GroupLogoList
if
(
scale
>=
1
&&
scale
<
3
&&!
day
)
url
=
dark
==
true
?
LOGOS
[
0
].
FilePath
:
LOGOS
[
3
].
FilePath
if
(
scale
>=
1
&&
scale
<
3
&&
day
)
url
=
acquiesceLogo
.
value
[
6
]
if
(
scale
<
1
)
url
=
dark
==
true
?
LOGOS
[
1
].
FilePath
:
LOGOS
[
4
].
FilePath
if
(
scale
>=
5
)
url
=
dark
==
true
?
LOGOS
[
2
].
FilePath
:
LOGOS
[
5
].
FilePath
if
(
scale
>=
3
&&
scale
<
5
&&!
day
)
url
=
dark
==
true
?
LOGOS
[
2
].
FilePath
:
LOGOS
[
5
].
FilePath
if
(
scale
>=
3
&&
scale
<
5
&&
day
)
url
=
LOGOS
[
2
].
FilePath
}
else
{
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
]
if
(
scale
>=
5
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&!
day
)
url
=
dark
==
true
?
acquiesceLogo
.
value
[
2
]:
acquiesceLogo
.
value
[
5
]
if
(
scale
>=
3
&&
scale
<
5
&&
day
)
url
=
acquiesceLogo
.
value
[
2
]
}
let
newTempSize
=
await
FileService
.
getImageSizeWithoutDownloading
(
url
)
let
width
=
0
let
height
=
0
...
...
src/views/TeamCenter/Layout.vue
View file @
7a6f68c0
...
...
@@ -15,7 +15,7 @@
<el-menu
:default-active=
"activeIndex"
class=
"no-border md-menu col"
router
>
<template
v-for=
"(x,i) in menus"
:key=
"i"
>
<el-sub-menu
:index=
"
i
"
v-if=
"x.children && x.children.length>0"
>
<el-sub-menu
:index=
"
`$
{i}`
" v-if="x.children
&&
x.children.length>0">
<template
#
title
>
<component
:is=
"x.icon"
style=
"font-size: 20px;"
></component>
<span
class=
"q-ml-lg"
>
{{
x
.
name
}}
</span>
...
...
src/views/TeamCenter/LogoDisposition.vue
0 → 100644
View file @
7a6f68c0
This diff is collapsed.
Click to expand it.
src/views/TeamCenter/WaterMaker.vue
View file @
7a6f68c0
...
...
@@ -16,7 +16,7 @@
</div>
</div>
<el-dialog
v-model=
"wmFormVisible"
style=
"width:560px;"
:show-close=
"false"
:close-on-click-modal=
"false"
:close-on-press-escape=
"false"
>
<template
#
title
>
<template
#
header
>
<div
class=
"row items-center"
>
<div
class=
"text-dark col"
style=
"font-size: 18px;"
>
水印信息设置
</div>
<div>
...
...
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