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
ef3d95ba
Commit
ef3d95ba
authored
Jun 06, 2024
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/pptist
parents
b0fe50ab
69568884
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
76 additions
and
32 deletions
+76
-32
index.vue
src/components/CloudDisk/index.vue
+3
-2
useCreateElement.ts
src/hooks/useCreateElement.ts
+9
-5
router.ts
src/router/router.ts
+2
-2
UploadPicture.vue
src/views/Editor/CanvasTool/UploadPicture.vue
+5
-2
index.vue
src/views/Editor/EditorHeader/index.vue
+25
-8
Index.vue
src/views/Market/Index.vue
+1
-0
Workspace.vue
src/views/SellTemplate/Workspace.vue
+1
-1
InviteMember.vue
src/views/components/Team/InviteMember.vue
+30
-12
No files found.
src/components/CloudDisk/index.vue
View file @
ef3d95ba
...
...
@@ -62,7 +62,7 @@
<
template
v-for=
"(item,index) in dataList"
>
<div
class=
"CloudDisk-R-Box cursor-pointer"
:class=
"[ImgId==item.DetailsId?'active':'']"
@
click=
"setImg(item)"
>
:class=
"[ImgId==item.DetailsId?'active':'
active2
']"
@
click=
"setImg(item)"
>
<div
class=
"CloudDisk-R-Img"
>
<el-image
:src=
"item.FilePath"
style=
"width: 80px; height: 80px;"
fit=
"cover"
/>
...
...
@@ -183,6 +183,7 @@ watch(() => props.active, () => {
watch
(()
=>
props
.
show
,
()
=>
{
if
(
!
props
.
show
)
ImgId
.
value
=
''
})
const
setImg
=
(
item
:
any
)
=>
{
ImgId
.
value
=
item
.
DetailsId
emit
(
'getImg'
,
item
.
FilePath
)
...
...
@@ -504,7 +505,7 @@ onMounted(()=>{
z-index
:
3
;
opacity
:
0
;
}
.CloudDisk-R-Box
:hover
.close-btn
{
.CloudDisk-R-Box
.active2
:hover
.close-btn
{
opacity
:
1
;
}
</
style
>
\ No newline at end of file
src/hooks/useCreateElement.ts
View file @
ef3d95ba
...
...
@@ -51,10 +51,9 @@ export default () => {
* 创建图片元素
* @param src 图片地址
*/
const
createImageElement
=
(
src
:
string
)
=>
{
const
createImageElement
=
(
src
:
string
,
TemplateType
?:
Number
)
=>
{
getImageSize
(
src
).
then
(({
width
,
height
})
=>
{
const
scale
=
height
/
width
if
(
scale
<
viewportRatio
.
value
&&
width
>
VIEWPORT_SIZE
.
Value
)
{
width
=
VIEWPORT_SIZE
.
Value
height
=
width
*
scale
...
...
@@ -63,15 +62,20 @@ export default () => {
height
=
VIEWPORT_SIZE
.
Value
*
viewportRatio
.
value
width
=
height
/
scale
}
let
left
=
0
let
top
=
0
if
(
!
TemplateType
){
left
=
(
VIEWPORT_SIZE
.
Value
-
width
)
/
2
top
=
(
VIEWPORT_SIZE
.
Value
*
viewportRatio
.
value
-
height
)
/
2
}
createElement
({
type
:
'image'
,
id
:
nanoid
(
10
),
src
,
width
,
height
,
left
:
(
VIEWPORT_SIZE
.
Value
-
width
)
/
2
,
top
:
(
VIEWPORT_SIZE
.
Value
*
viewportRatio
.
value
-
height
)
/
2
,
left
:
left
,
top
:
top
,
fixedRatio
:
true
,
rotate
:
0
,
})
...
...
src/router/router.ts
View file @
ef3d95ba
...
...
@@ -103,14 +103,14 @@ const routes: RouteRecordRaw[] = [
}
},
{
path
:
'/market/create/ad'
,
path
:
'/market/create/ad
/:current?
'
,
component
:
()
=>
import
(
'@/views/Market/Index.vue'
),
meta
:{
title
:
'选择广告模板'
}
},
{
path
:
'/market/create/trip'
,
path
:
'/market/create/trip
/:current?
'
,
component
:
()
=>
import
(
'@/views/Market/Index.vue'
),
meta
:{
title
:
'选择行程模板'
...
...
src/views/Editor/CanvasTool/UploadPicture.vue
View file @
ef3d95ba
...
...
@@ -98,7 +98,7 @@ import useCreateElement from '@/hooks/useCreateElement'
import
useHistorySnapshot
from
'@/hooks/useHistorySnapshot'
import
{
getImageDataURL
}
from
'@/utils/image'
import
{
useMainStore
,
useSlidesStore
,
useScreenStore
,
useUserStore
}
from
'@/store'
import
{
injectKeyDataSource
}
from
'@/types/injectKey'
import
{
injectKeyDataSource
,
injectKeyTemplate
}
from
'@/types/injectKey'
import
ConfigService
from
'@/services/ConfigService'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
FileService
from
'@/services/FileService'
...
...
@@ -160,6 +160,9 @@ const { handleElement, handleElementId } = storeToRefs(mainStore)
const
handleImageElement
=
handleElement
as
Ref
<
PPTImageElement
>
const
{
imgPoolVisible
}
=
storeToRefs
(
useScreenStore
())
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
watch
(()
=>
imgPoolVisible
.
value
,
()
=>
{
if
(
imgPoolVisible
.
value
)
showVisible
.
value
=
true
})
...
...
@@ -231,7 +234,7 @@ const setImgs = async () => {
}
if
(
imgType
.
value
==
1
){
createImageElement
(
url
)
createImageElement
(
url
,
searchData
.
value
.
TemplateType
)
close
()
}
if
(
imgType
.
value
==
2
){
...
...
src/views/Editor/EditorHeader/index.vue
View file @
ef3d95ba
...
...
@@ -176,6 +176,8 @@ import { ElLoading, ElMessage } from 'element-plus'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
CopyFile
from
"@/views/SellTemplate/components/CopyFile.vue"
;
import
router
from
'@/router'
import
{
useRouter
}
from
"vue-router"
;
import
{
managerTemplateLink
,
openNewBlank
}
from
'@/utils/common'
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
...
...
@@ -221,9 +223,10 @@ const journeyAdsDetails = ref<Object>()
const
psdVisibleStatus
=
ref
(
false
)
const
{
market
,
model
,
ConfigId
,
CoverImg
,
dataLoading
,
TempId
,
TempType
,
SourceLoading
}
=
storeToRefs
(
useScreenStore
())
const
routers
=
useRouter
();
// 返回到首页 type 1 模版列表页 0 销售在线模版页
const
goBack
=
(
type
:
any
)
=>
{
console
.
log
(
model
.
value
,
searchData
.
value
.
currentMenu
)
mainBackVisible
.
value
=
false
ElMessageBox
.
confirm
(
'退出此页面将清空当前数据,请谨慎操作?'
,
...
...
@@ -242,7 +245,7 @@ const goBack = (type:any) =>{
path
=
`/market/op/
${
ConfigId
.
value
}
/
${
TempType
.
value
}
`
router
.
push
({
path
})
}
else
if
(
model
.
value
==
2
&&
searchData
.
value
.
currentMenu
>=
0
){
if
(
type
)
path
=
`/market/create`
if
(
type
==
1
)
path
=
`/market/create`
else
{
path
=
`/space/
${
searchData
.
value
.
currentMenu
}
`
searchData
.
value
.
currentMenu
=
null
...
...
@@ -321,10 +324,16 @@ const SetSellTemplate = async (type:Number,FolderId:Number) => {
if
(
type
==
1
)
setTimeout
(()
=>
{
SalesEditorStore
.
setSalesEditor
(
0
)
},
100
)
if
(
autoSave
.
value
==
1
)
autoSave
.
value
=
2
if
(
type
==
0
&&
Id
==
0
){
searchData
.
value
.
sellId
=
TemplateRes
.
data
.
data
.
Id
let
FileId
=
searchData
.
value
.
sellId
=
TemplateRes
.
data
.
data
.
Id
let
FileType
=
TemplateRes
.
data
.
data
.
FileType
?
TemplateRes
.
data
.
data
.
FileType
:
0
//@TODO:返回字段中缺少CreateBy,
const
url
=
createSaleEditorLink
(
FileId
,
TempId
,
queryObj
.
value
.
TempType
,
queryMsg
.
FolderId
,
1
,
1
)
router
.
push
({
path
:
url
})
}
if
(
autoSave
.
value
==
1
)
autoSave
.
value
=
2
}
else
{
ElMessage
({
showClose
:
true
,
...
...
@@ -343,10 +352,6 @@ const SetTripTemplateSlide = async () => {
try
{
let
TemplateRes
=
await
ConfigService
.
SetTripTemplateSlide
(
queryObj
.
value
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
!
queryObj
.
value
.
TempId
){
queryObj
.
value
.
TempId
=
TemplateRes
.
data
.
data
.
TempId
searchData
.
value
.
TempId
=
TemplateRes
.
data
.
data
.
TempId
}
ElMessage
({
showClose
:
true
,
message
:
'操作成功'
,
...
...
@@ -355,6 +360,18 @@ const SetTripTemplateSlide = async () => {
datas
.
DataSource
.
DataSourceOverlay
=
false
dataLoadingStore
.
setDataLoading
(
1
)
useSlidesStore
().
setThumbnails
([])
if
(
!
queryObj
.
value
.
TempId
){
queryObj
.
value
.
TempId
=
TemplateRes
.
data
.
data
.
TempId
searchData
.
value
.
TempId
=
TemplateRes
.
data
.
data
.
TempId
let
url
=
''
url
=
managerTemplateLink
(
queryObj
.
value
.
TempId
,
queryObj
.
value
.
TemplateType
)
if
(
url
!=
''
)
{
routers
.
push
({
path
:
url
})
}
}
}
else
{
ElMessage
({
showClose
:
true
,
...
...
src/views/Market/Index.vue
View file @
ef3d95ba
...
...
@@ -290,6 +290,7 @@ if(router.currentRoute.value.path.includes('create')) {
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/ad'
)
!=-
1
)
TemplateType
=
2
else
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/trip'
)
!=-
1
)
TemplateType
=
1
else
if
(
searchData
.
value
.
TemplateType
)
TemplateType
=
searchData
.
value
.
TemplateType
if
(
router
.
currentRoute
.
value
.
params
.
current
>=
0
)
searchData
.
value
.
currentMenu
=
router
.
currentRoute
.
value
.
params
.
current
}
else
if
(
router
.
currentRoute
.
value
.
path
.
includes
(
'op'
))
{
model
.
value
=
0
}
...
...
src/views/SellTemplate/Workspace.vue
View file @
ef3d95ba
...
...
@@ -66,7 +66,7 @@ const searchData = ref({} as any)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
openMarketHandler
=
(
type
:
string
=
''
)
=>
{
openNewBlank
(
`/market/create
${
type
}
`
)
openNewBlank
(
`/market/create
${
type
}
/
${
currentMenu
.
value
}
`
)
}
const
setCurrentMenuHandler
=
(
i
:
number
)
=>
{
...
...
src/views/components/Team/InviteMember.vue
View file @
ef3d95ba
...
...
@@ -57,12 +57,15 @@
<div
class=
"col text-dark"
style=
"font-size: 16px"
>
上传文件
</div>
</div>
<div
class=
"q-mt-lg"
>
<el-upload
class=
"
full-height full-width
text-primary"
drag
accept=
".xls,.xlsx"
<el-upload
class=
" text-primary"
drag
accept=
".xls,.xlsx"
:action=
"getUploadActionUrl()"
:on-success=
"handleAvatarSuccess"
:before-upload=
"beforeAvatarUpload"
:file-list=
"fileList"
:limit=
"1"
ref=
"upload"
:on-exceed=
"handleExceed"
>
<
template
#
trigger
>
<IconUpload
size=
"54"
class=
""
></IconUpload>
<div
class=
"el-upload__text"
>
<div
style=
"font-size: 16px;"
class=
"q-my-lg"
>
成员名单仅支持 .xls .xlsx
</div>
...
...
@@ -70,11 +73,14 @@
<el-button
class=
"ppt-button"
type=
"primary"
size=
"target"
>
导入成员名单
</el-button>
</div>
</div>
<
template
#
tip
></
template
>
</
template
>
<
template
#
tip
>
<div></div>
</
template
>
</el-upload>
</div>
<
template
v-if=
"dialogVisible"
>
<div
class=
"
q-mt-lg
text-primary"
style=
"font-weight: bold;"
>
提示
</div>
<div
class=
"text-primary"
style=
"font-weight: bold;"
>
提示
</div>
<div
class=
"q-mt-xs row flex-between items-center"
style=
"position: relative;"
>
<div>
<el-alert
show-icon
title=
"人员总数"
type=
"info"
:closable=
"false"
>
...
...
@@ -162,7 +168,7 @@ import { ElMessage } from "element-plus"
import
{
storeToRefs
}
from
"pinia"
import
{
ref
,
unref
}
from
"vue"
import
{
domainManager
}
from
'@/utils/domainManager'
import
{
ElAlert
,
UploadUser
File
}
from
'element-plus'
;
import
type
{
ElAlert
,
UploadUserFile
,
UploadInstance
,
UploadProps
,
UploadRaw
File
}
from
'element-plus'
;
const
props
=
defineProps
({
showType
:
{
...
...
@@ -195,6 +201,14 @@ const closeUploadRes = () => {
const
closed
=
()
=>
{
emit
(
'close'
)
}
const
upload
=
ref
<
UploadInstance
>
()
const
handleExceed
:
UploadProps
[
'onExceed'
]
=
(
files
)
=>
{
upload
.
value
!
.
clearFiles
()
const
file
=
files
[
0
]
as
UploadRawFile
upload
.
value
!
.
handleStart
(
file
)
upload
.
value
.
submit
()
}
const
goDownload
=
(
type
:
any
)
=>
{
if
(
type
==
1
)
window
.
location
.
href
=
UploadResults
.
value
.
DownloadUrl
...
...
@@ -209,22 +223,23 @@ const getUploadActionUrl=()=>{
}
const
handleAvatarSuccess
=
(
res
:
any
)
=>
{
console
.
log
(
"handleAvatarSuccess_res"
,
res
);
if
(
res
.
data
){
UploadResults
.
value
=
res
.
data
if
(
res
.
data
.
successNum
>
0
)
emit
(
'imported'
)
if
(
res
.
data
.
failUrl
)
UploadResults
.
value
.
DownloadUrl
=
domainManager
().
DownloadUrl
.
replace
(
"common"
,
"file"
)
+
`
${
res
.
data
.
failUrl
}
`
}
console
.
log
(
"handleAvatarSuccess_res"
,
res
);
}
const
beforeAvatarUpload
=
async
(
res
:
any
)
=>
{
console
.
log
(
"beforeAvatarUpload_res"
,
res
);
const
beforeAvatarUpload
=
(
res
:
any
)
=>
{
closeUploadRes
()
fileList
.
value
.
push
({
name
:
res
.
name
,
url
:
''
})
dialogVisible
.
value
=
true
console
.
log
(
"beforeAvatarUpload_res"
,
res
);
// fileList.value.unshift({
// name: res.name+new Date().getTime(),
// url: ''
// })
}
const
copyInviteUrlHandler
=
async
(
e
:
MouseEvent
)
=>
{
...
...
@@ -255,6 +270,9 @@ const setIsAdminHandler = (isa: number) => {
</
script
>
<
style
scoped
>
.InviteMember
::v-deep
(
.el-upload-dragger
)
{
padding
:
15px
0
;
}
.InviteMember
.content-item
{
display
:
flex
;
flex-direction
:
row
;
...
...
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