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
4172bd48
Commit
4172bd48
authored
Mar 26, 2024
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完成路由功能
parent
45740fd7
Show whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
349 additions
and
47 deletions
+349
-47
.env.development
.env.development
+1
-1
index.ts
src/router/index.ts
+1
-1
router.ts
src/router/router.ts
+56
-0
screen.ts
src/store/screen.ts
+1
-1
common.ts
src/utils/common.ts
+12
-0
AutoLogin.vue
src/views/Auth/AutoLogin.vue
+14
-3
Editor.vue
src/views/Editor/Editor.vue
+75
-2
index.vue
src/views/Editor/EditorHeader/index.vue
+20
-9
PlayView.vue
src/views/Editor/PlayView.vue
+78
-0
Preview.vue
src/views/Editor/Preview.vue
+41
-0
index.vue
src/views/Editor/Thumbnails/index.vue
+1
-0
index.vue
src/views/Editor/index.vue
+7
-4
Index.vue
src/views/Market/Index.vue
+26
-14
PreviewCustomSlider.vue
src/views/Preview/PreviewCustomSlider.vue
+6
-5
Share.vue
src/views/SellTemplate/Share.vue
+2
-2
HistoricalVersion.vue
src/views/SellTemplate/components/HistoricalVersion.vue
+2
-2
journeyAdsList.vue
src/views/SellTemplate/components/journeyAdsList.vue
+2
-2
BaseTextElement.vue
src/views/components/element/TextElement/BaseTextElement.vue
+4
-1
No files found.
.env.development
View file @
4172bd48
VUE_APP_API_URL = 'http
s://reborn.oytour.com
/api/common/post'
VUE_APP_API_URL = 'http
://192.168.10.214
/api/common/post'
VUE_APP_UPLOADURLAPI_URL = 'http://192.168.10.214:8120'
VUE_APP_UPLOADURLAPI_URL = 'http://192.168.10.214:8120'
VUE_APP_SHARE_URL = 'http://127.0.0.1:8080'
VUE_APP_SHARE_URL = 'http://127.0.0.1:8080'
\ No newline at end of file
src/router/index.ts
View file @
4172bd48
...
@@ -21,7 +21,7 @@ router.beforeEach((to:any, from:any, next:any) => {
...
@@ -21,7 +21,7 @@ router.beforeEach((to:any, from:any, next:any) => {
lock
:
true
lock
:
true
})
})
}
}
if
(
whiteList
.
includes
(
to
.
path
)
||
user
.
getUserToken
!=
''
)
{
if
(
(
whiteList
.
includes
(
to
.
path
)
||
user
.
getUserToken
!=
''
)
&&
!
to
.
query
.
uid
)
{
if
(
managerMenu
.
includes
(
to
.
path
)
&&
user
.
getUser
.
IsEditTripTemplate
!=
1
){
if
(
managerMenu
.
includes
(
to
.
path
)
&&
user
.
getUser
.
IsEditTripTemplate
!=
1
){
next
(
'/notfound'
);
next
(
'/notfound'
);
}
}
...
...
src/router/router.ts
View file @
4172bd48
...
@@ -51,6 +51,13 @@ const routes: RouteRecordRaw[] = [
...
@@ -51,6 +51,13 @@ const routes: RouteRecordRaw[] = [
title
:
'选择行程模板'
title
:
'选择行程模板'
}
}
},
},
{
path
:
'/market/op/:configId(
\\
d+)/:temptype(
\\
d+)?'
,
component
:
()
=>
import
(
'@/views/Market/Index.vue'
),
meta
:{
title
:
'选择模板进行创作'
}
},
{
{
path
:
'/editor/:id(
\\
d+)/:tid(
\\
d+)/:type(
\\
d+)/:pid(
\\
d+)/e/:e(
\\
d+)/c/:c(
\\
d+)'
,
path
:
'/editor/:id(
\\
d+)/:tid(
\\
d+)/:type(
\\
d+)/:pid(
\\
d+)/e/:e(
\\
d+)/c/:c(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
...
@@ -64,6 +71,55 @@ const routes: RouteRecordRaw[] = [
...
@@ -64,6 +71,55 @@ const routes: RouteRecordRaw[] = [
meta
:{
meta
:{
title
:
'新建'
title
:
'新建'
}
}
},
{
path
:
'/team_editor/:configId(
\\
d+)/:tid(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
meta
:{
title
:
'设计团队行程'
}
},
{
path
:
'/team_editor/:configId(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
meta
:{
title
:
'修改团队行程'
}
},
{
path
:
'/manager_template/:tid(
\\
d+)/:type(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
meta
:{
title
:
'新建'
}
},
{
path
:
'/create_template/:type(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/Editor.vue'
),
meta
:{
title
:
'新建'
}
},
{
path
:
'/team_preview/:configId(
\\
d+)/:w(
\\
d+)?'
,
component
:
()
=>
import
(
'@/views/Editor/Preview.vue'
),
meta
:{
title
:
'行程生成预览'
}
},
{
path
:
'/preview/:tid(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Preview/PreviewCustomSlider.vue'
),
meta
:{
title
:
'行程生成预览'
}
},
{
path
:
'/play/:id(
\\
d+)/:logId(
\\
d+)/:status(
\\
d+)'
,
component
:
()
=>
import
(
'@/views/Editor/PlayView.vue'
),
meta
:{
title
:
'行程生成预览'
}
}
}
];
];
...
...
src/store/screen.ts
View file @
4172bd48
...
@@ -38,7 +38,7 @@ export const useScreenStore = defineStore('screen', {
...
@@ -38,7 +38,7 @@ export const useScreenStore = defineStore('screen', {
actions
:
{
actions
:
{
setScreening
(
screening
:
boolean
)
{
setScreening
(
screening
:
boolean
)
{
if
(
location
.
href
.
indexOf
(
process
.
env
.
VUE_APP_SHARE_URL
)
!=-
1
&&!
screening
)
return
if
(
location
.
href
.
indexOf
(
"/play/"
)
!=-
1
&&!
screening
)
return
this
.
screening
=
screening
this
.
screening
=
screening
if
(
screening
)
{
if
(
screening
)
{
this
.
market
=
false
this
.
market
=
false
...
...
src/utils/common.ts
View file @
4172bd48
...
@@ -19,6 +19,18 @@ export const openNewBlank = (path:string) => {
...
@@ -19,6 +19,18 @@ export const openNewBlank = (path:string) => {
export
const
createSaleEditorLink
=
(
id
:
number
,
tid
:
number
,
type
:
1
|
2
,
pid
:
number
,
ep
:
0
|
1
,
cp
:
0
|
1
)
=>
{
export
const
createSaleEditorLink
=
(
id
:
number
,
tid
:
number
,
type
:
1
|
2
,
pid
:
number
,
ep
:
0
|
1
,
cp
:
0
|
1
)
=>
{
return
`/editor/
${
id
}
/
${
tid
}
/
${
type
}
/
${
pid
}
/e/
${
ep
}
/c/
${
cp
}
`
return
`/editor/
${
id
}
/
${
tid
}
/
${
type
}
/
${
pid
}
/e/
${
ep
}
/c/
${
cp
}
`
}
}
export
const
createSaleCreateLink
=
(
tid
:
number
,
type
:
1
|
2
)
=>
{
return
`/editor/
${
tid
}
/
${
type
}
`
}
export
const
createOpEditorLink
=
(
configId
:
number
,
tid
:
number
)
=>
{
return
`/team_editor/
${
configId
}
/
${
tid
}
`
}
export
const
managerTemplateLink
=
(
tid
:
number
,
type
:
1
|
2
)
=>
{
return
`/manager_template/
${
tid
}
/
${
type
}
`
}
export
const
createPlayLink
=
(
id
:
number
,
loginId
:
number
,
status
:
1
|
2
)
=>
{
return
`/play/
${
id
}
/
${
loginId
}
/
${
status
}
`
}
/**
/**
* 判断设备
* 判断设备
*/
*/
...
...
src/views/Auth/AutoLogin.vue
View file @
4172bd48
...
@@ -24,9 +24,20 @@ const userLoginHandler = async ()=>{
...
@@ -24,9 +24,20 @@ const userLoginHandler = async ()=>{
if
(
param
.
uid
){
if
(
param
.
uid
){
let
response
=
await
userStore
().
setUserLoginAsync
(
parseInt
(
param
.
uid
))
let
response
=
await
userStore
().
setUserLoginAsync
(
parseInt
(
param
.
uid
))
if
(
response
){
if
(
response
){
if
(
param
.
model
==
'0'
)
{
router
.
push
({
router
.
push
({
path
:
forword
path
:
`/team_editor/
${
param
.
ConfigId
}
`
})
})
}
else
if
(
param
.
model
==
'1'
&&
userStore
().
getUser
.
IsEditTripTemplate
==
1
)
{
router
.
push
({
path
:
`/market`
})
}
else
{
router
.
push
({
path
:
"/"
})
}
return
return
}
}
}
}
...
...
src/views/Editor/Editor.vue
View file @
4172bd48
...
@@ -7,6 +7,8 @@ import EditorHome from './index.vue'
...
@@ -7,6 +7,8 @@ import EditorHome from './index.vue'
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
{
ApiResult
}
from
'@/configs/axios'
;
const
router
=
useRouter
()
const
router
=
useRouter
()
const
currentRoute
=
router
.
currentRoute
.
value
const
currentRoute
=
router
.
currentRoute
.
value
...
@@ -37,14 +39,85 @@ const initSellEditor=()=>{
...
@@ -37,14 +39,85 @@ const initSellEditor=()=>{
//@TODO:注意,这个地方应该替换为接口验证
//@TODO:注意,这个地方应该替换为接口验证
searchData
.
value
.
noExportPermission
=
params
.
e
.
toString
()
!=
'1'
searchData
.
value
.
noExportPermission
=
params
.
e
.
toString
()
!=
'1'
searchData
.
value
.
noCopyPermission
=
params
.
c
.
toString
()
!=
'1'
searchData
.
value
.
noCopyPermission
=
params
.
c
.
toString
()
!=
'1'
SalesEditorStore
.
setSalesEditor
(
2
);
SalesEditorStore
.
setSalesEditor
(
params
.
type
==
'1'
?
2
:
4
);
showEditor
.
value
=
true
}
const
initSellCreate
=
()
=>
{
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
useScreenStore
().
setModel
(
2
)
SalesEditorStore
.
setSalesEditor
(
params
.
type
==
'1'
?
1
:
3
)
searchData
.
value
.
TempId
=
parseInt
(
params
.
tid
.
toString
())
searchData
.
value
.
TemplateType
=
parseInt
(
params
.
type
.
toString
())
showEditor
.
value
=
true
}
const
initOpModify
=
async
()
=>
{
const
ConfigId
=
parseInt
(
params
.
configId
.
toString
())
try
{
const
queryMsg
=
{
ConfigId
}
const
response
=
await
ConfigService
.
triptemplateGetTripConfig
(
queryMsg
);
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
&&
response
.
data
.
data
)
{
let
data
=
response
.
data
.
data
if
(
data
.
TempId
>
0
){
useScreenStore
().
setIsModel
(
true
)
useScreenStore
().
setTempId
(
data
.
TempId
)
useScreenStore
().
setConfigId
(
ConfigId
)
useScreenStore
().
setModel
(
0
)
showEditor
.
value
=
true
return
}
}
}
catch
(
error
)
{
}
const
path
=
`/market/op/
${
ConfigId
}
`
router
.
push
({
path
})
}
const
initOpCreate
=
()
=>
{
console
.
log
(
params
)
const
ConfigId
=
parseInt
(
params
.
configId
.
toString
())
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
useScreenStore
().
setIsModel
(
true
)
useScreenStore
().
setTempId
(
parseInt
(
params
.
tid
.
toString
()))
useScreenStore
().
setModel
(
0
)
useScreenStore
().
setConfigId
(
ConfigId
)
searchData
.
value
.
TempId
=
parseInt
(
params
.
tid
.
toString
())
searchData
.
value
.
TemplateType
=
1
showEditor
.
value
=
true
}
const
initManagerTemplate
=
()
=>
{
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
useScreenStore
().
setTempId
(
parseInt
(
params
.
tid
.
toString
()))
useScreenStore
().
setModel
(
1
)
useScreenStore
().
setConfigId
(
0
)
searchData
.
value
.
TempId
=
parseInt
(
params
.
tid
.
toString
())
searchData
.
value
.
TemplateType
=
parseInt
(
params
.
type
.
toString
())
showEditor
.
value
=
true
}
const
initCreateTemplate
=
()
=>
{
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
useScreenStore
().
setTempId
(
0
)
useScreenStore
().
setModel
(
1
)
useScreenStore
().
setConfigId
(
0
)
searchData
.
value
.
TempId
=
0
searchData
.
value
.
TemplateType
=
parseInt
(
params
.
type
.
toString
())
showEditor
.
value
=
true
showEditor
.
value
=
true
}
}
const
init
=
()
=>
{
const
init
=
()
=>
{
//销售修改行程
//销售修改行程
if
(
currentRoute
.
path
.
includes
(
'/editor/'
)
&&
params
.
id
)
initSellEditor
()
if
(
currentRoute
.
path
.
includes
(
'/editor/'
)
&&
params
.
id
)
initSellEditor
()
else
if
(
currentRoute
.
path
.
includes
(
'/editor/'
))
initSellEditor
()
else
if
(
currentRoute
.
path
.
includes
(
'/editor/'
))
initSellCreate
()
else
if
(
currentRoute
.
path
.
includes
(
'/team_editor/'
)
&&
params
.
tid
)
initOpCreate
()
else
if
(
currentRoute
.
path
.
includes
(
'/team_editor/'
))
initOpModify
()
else
if
(
currentRoute
.
path
.
includes
(
'/manager_template/'
))
initManagerTemplate
()
else
if
(
currentRoute
.
path
.
includes
(
'/create_template/'
))
initCreateTemplate
()
}
}
init
()
init
()
</
script
>
</
script
>
\ No newline at end of file
src/views/Editor/EditorHeader/index.vue
View file @
4172bd48
<
template
>
<
template
>
<div
class=
"editor-header"
>
<div
class=
"editor-header"
>
<div
class=
"left"
>
<div
class=
"left"
>
<div
v-if=
"SalesEditor==0"
class=
"menu-item"
v-tooltip=
"'返回
到
首页'"
@
click=
"goBack(1)"
>
返回
</div>
<div
v-if=
"SalesEditor==0"
class=
"menu-item"
v-tooltip=
"'返回首页'"
@
click=
"goBack(1)"
>
返回
</div>
<Popover
v-if=
"SalesEditor>0"
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"mainBackVisible"
>
<Popover
v-if=
"SalesEditor>0"
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"mainBackVisible"
>
<template
#
content
>
<template
#
content
>
<div
class=
"menu-item"
@
click=
"goBack(1)"
>
去
选
{{
searchData
.
TemplateType
==
2
?
'广告'
:
'模版'
}}
</div>
<div
class=
"menu-item"
@
click=
"goBack(1)"
>
重
选
{{
searchData
.
TemplateType
==
2
?
'广告'
:
'模版'
}}
</div>
<div
class=
"menu-item"
@
click=
"goBack(0)"
>
返回
到
首页
</div>
<div
class=
"menu-item"
@
click=
"goBack(0)"
>
返回首页
</div>
</
template
>
</
template
>
<div
class=
"menu-item"
>
<div
class=
"menu-item"
>
<el-icon
color=
"#d14424"
><ArrowLeftBold
/></el-icon>
<el-icon
color=
"#d14424"
><ArrowLeftBold
/></el-icon>
...
@@ -174,6 +174,7 @@ import AliyunUpload from '@/utils/upload/aliyun'
...
@@ -174,6 +174,7 @@ import AliyunUpload from '@/utils/upload/aliyun'
import
{
ElLoading
,
ElMessage
}
from
'element-plus'
import
{
ElLoading
,
ElMessage
}
from
'element-plus'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
CopyFile
from
"@/views/SellTemplate/components/CopyFile.vue"
;
import
CopyFile
from
"@/views/SellTemplate/components/CopyFile.vue"
;
import
router
from
'@/router'
const
mainStore
=
useMainStore
()
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
...
@@ -222,12 +223,12 @@ const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading }
...
@@ -222,12 +223,12 @@ const { market, model, ConfigId, CoverImg, dataLoading, TempId, SourceLoading }
// 返回到首页 type 1 模版列表页 0 销售在线模版页
// 返回到首页 type 1 模版列表页 0 销售在线模版页
const
goBack
=
(
type
:
any
)
=>
{
const
goBack
=
(
type
:
any
)
=>
{
mainBackVisible
.
value
=
false
mainBackVisible
.
value
=
false
if
(
model
.
value
&&
model
.
value
!=
2
)
{
//
if(model.value&&model.value!=2) {
setTimeout
(()
=>
{
//
setTimeout(()=>{
setNewDatas
(
type
,
1
)
//
setNewDatas(type,1)
},
200
)
//
},200)
return
//
return
}
//
}
ElMessageBox
.
confirm
(
ElMessageBox
.
confirm
(
'退出此页面将清空当前数据,请谨慎操作?'
,
'退出此页面将清空当前数据,请谨慎操作?'
,
'提示'
,
'提示'
,
...
@@ -238,6 +239,15 @@ const goBack = (type:any) =>{
...
@@ -238,6 +239,15 @@ const goBack = (type:any) =>{
}
}
).
then
(()
=>
{
).
then
(()
=>
{
setNewDatas
(
type
,
0
)
setNewDatas
(
type
,
0
)
let
path
=
'/'
const
t
=
useSlidesStore
().
viewportRatio
<
0
?
1
:
2
if
(
type
!=
0
){
if
(
model
.
value
==
2
)
path
=
`/market/create/
${
searchData
.
value
.
TemplateType
==
1
?
'trip'
:
'ad'
}
`
else
if
(
model
.
value
==
0
)
path
=
`/market/op/
${
ConfigId
.
value
}
/
${
t
}
`
else
if
(
model
.
value
==
1
)
path
=
`/market`
}
console
.
log
(
path
)
router
.
push
({
path
})
}).
catch
(()
=>
{})
}).
catch
(()
=>
{})
}
}
...
@@ -587,6 +597,7 @@ watch(()=>autoSave.value,(newVal)=>{
...
@@ -587,6 +597,7 @@ watch(()=>autoSave.value,(newVal)=>{
setTemplate
(
0
)
setTemplate
(
0
)
}
}
})
})
handleUpdateTitle
()
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/views/Editor/PlayView.vue
0 → 100644
View file @
4172bd48
<
template
>
<EditorHome
v-if=
"showEditor"
></EditorHome>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
inject
,
ref
}
from
'vue'
import
EditorHome
from
'./index.vue'
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
import
{
useScreenStore
,
useSlidesStore
}
from
"@/store"
import
{
useRouter
}
from
'vue-router'
import
ConfigService
from
'@/services/ConfigService'
import
{
ApiResult
}
from
'@/configs/axios'
import
{
ElLoading
}
from
'element-plus'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
const
router
=
useRouter
()
const
currentRoute
=
router
.
currentRoute
.
value
const
params
=
currentRoute
.
params
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
showEditor
=
ref
(
false
)
const
slidesStore
=
useSlidesStore
()
const
screenStore
=
useScreenStore
()
const
sellHistoryTripTemplate
=
async
()
=>
{
const
id
=
parseInt
(
params
.
id
.
toString
())
const
logId
=
parseInt
(
params
.
logId
.
toString
())
const
status
=
parseInt
(
params
.
logId
.
toString
())
const
loadingObj
=
ElLoading
.
service
({
text
:
'正在渲染数据'
,
lock
:
true
})
try
{
let
response
if
(
logId
==
0
){
if
(
status
==
0
)
await
ConfigService
.
SetTripBrowse
({
FileId
:
id
});
response
=
await
ConfigService
.
sellGetTemplateDetails
({
Id
:
id
,
Status
:
status
==
1
?
1
:
0
});
}
else
{
response
=
await
ConfigService
.
GetHistoryInfo
({
LogId
:
logId
,
FileId
:
id
,
});
}
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
)
{
let
data
=
response
.
data
.
data
let
viewportRatios
=
0
if
(
data
.
TemplateType
!=
2
)
{
viewportRatios
=
1.414
if
(
data
.
TempType
==
1
)
viewportRatios
=
0.7069
}
searchData
.
value
.
TempId
=
data
.
TempId
searchData
.
value
.
TemplateType
=
data
.
TemplateType
if
(
data
.
TemplateType
==
2
&&
data
.
Width
&&
data
.
Height
)
{
viewportRatios
=
data
.
Height
/
data
.
Width
}
if
(
data
.
Width
&&
data
.
Height
)
{
VIEWPORT_SIZE
.
Value
=
data
.
Height
VIEWPORT_VER_SIZE
.
Value
=
data
.
Width
}
else
{
VIEWPORT_SIZE
.
Value
=
1754
VIEWPORT_VER_SIZE
.
Value
=
1240
}
slidesStore
.
setViewportRatio
(
viewportRatios
)
let
SlidesData
=
JSON
.
parse
(
data
.
TempData
)
slidesStore
.
setSlides
(
SlidesData
)
screenStore
.
setScreening
(
true
)
useScreenStore
().
setModel
(
-
1
)
slidesStore
.
updateSlideIndex
(
0
)
showEditor
.
value
=
true
}
}
catch
(
error
)
{}
loadingObj
.
close
()
}
sellHistoryTripTemplate
()
</
script
>
\ No newline at end of file
src/views/Editor/Preview.vue
0 → 100644
View file @
4172bd48
<
template
>
<EditorHome
v-if=
"showEditor"
></EditorHome>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
inject
,
ref
}
from
'vue'
;
import
EditorHome
from
'./index.vue'
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useRouter
}
from
'vue-router'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
{
ApiResult
}
from
'@/configs/axios'
;
const
router
=
useRouter
()
const
currentRoute
=
router
.
currentRoute
.
value
const
params
=
currentRoute
.
params
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
showEditor
=
ref
(
false
)
const
initOpModify
=
async
()
=>
{
const
ConfigId
=
parseInt
(
params
.
configId
.
toString
())
try
{
const
queryMsg
=
{
ConfigId
}
const
response
=
await
ConfigService
.
triptemplateGetTripConfig
(
queryMsg
);
if
(
response
.
data
.
resultCode
==
ApiResult
.
SUCCESS
&&
response
.
data
.
data
)
{
let
data
=
response
.
data
.
data
if
(
data
.
TempId
>
0
){
useScreenStore
().
setIsModel
(
true
)
useScreenStore
().
setTempId
(
data
.
TempId
)
useScreenStore
().
setConfigId
(
ConfigId
)
useScreenStore
().
setModel
(
3
)
showEditor
.
value
=
true
return
}
}
}
catch
(
error
)
{
}
const
path
=
`/notfound`
router
.
push
({
path
})
}
initOpModify
()
</
script
>
\ No newline at end of file
src/views/Editor/Thumbnails/index.vue
View file @
4172bd48
...
@@ -87,6 +87,7 @@ const TemplateTypeStore = useScreenStore()
...
@@ -87,6 +87,7 @@ const TemplateTypeStore = useScreenStore()
const
CoverImgStore
=
useScreenStore
()
const
CoverImgStore
=
useScreenStore
()
const
dataLoadingStore
=
useScreenStore
()
const
dataLoadingStore
=
useScreenStore
()
const
{
model
,
ConfigId
,
TemplateDataSource
,
TemplateType
,
dataLoading
,
TempId
,
SourceLoading
}
=
storeToRefs
(
TemplateTypeStore
)
const
{
model
,
ConfigId
,
TemplateDataSource
,
TemplateType
,
dataLoading
,
TempId
,
SourceLoading
}
=
storeToRefs
(
TemplateTypeStore
)
console
.
log
(
model
.
value
,
ConfigId
.
value
,
TempId
.
value
)
const
selectedSlidesIndex
=
computed
(()
=>
[...
_selectedSlidesIndex
.
value
,
slideIndex
.
value
])
const
selectedSlidesIndex
=
computed
(()
=>
[...
_selectedSlidesIndex
.
value
,
slideIndex
.
value
])
const
{
setNewDatasList
}
=
useEditor
()
const
{
setNewDatasList
}
=
useEditor
()
...
...
src/views/Editor/index.vue
View file @
4172bd48
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<Screen
v-if=
"screening"
/>
<Screen
v-if=
"screening"
/>
<div
class=
"pptist-editor"
v-show=
"model!=3&&!screening&&!
query().ViewSlides
how"
>
<div
class=
"pptist-editor"
v-show=
"model!=3&&!screening&&!
viewSlideS
how"
>
<EditorHeader
class=
"layout-header"
/>
<EditorHeader
class=
"layout-header"
/>
<div
class=
"layout-content"
>
<div
class=
"layout-content"
>
<Thumbnails
class=
"layout-content-left"
/>
<Thumbnails
class=
"layout-content-left"
/>
...
@@ -78,6 +78,7 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
...
@@ -78,6 +78,7 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '@/configs/canvas'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
Screen
from
'@/views/Screen/index.vue'
import
Screen
from
'@/views/Screen/index.vue'
import
router
from
'@/router'
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
const
TemplateTypeStore
=
useScreenStore
()
const
TemplateTypeStore
=
useScreenStore
()
...
@@ -96,8 +97,9 @@ else if(TempId.value) TempIds = TempId.value
...
@@ -96,8 +97,9 @@ else if(TempId.value) TempIds = TempId.value
if
(
searchData
.
value
.
TemplateType
)
TemplatesType
=
searchData
.
value
.
TemplateType
if
(
searchData
.
value
.
TemplateType
)
TemplatesType
=
searchData
.
value
.
TemplateType
if
(
searchData
.
value
.
TemplateType
!=
2
&&!
searchData
.
value
.
TempId
)
useSlidesStore
().
setViewportRatio
(
1.414
)
if
(
searchData
.
value
.
TemplateType
!=
2
&&!
searchData
.
value
.
TempId
)
useSlidesStore
().
setViewportRatio
(
1.414
)
const
refThumbnails
=
ref
(
null
)
const
refThumbnails
=
ref
(
null
)
const
param
=
ref
(
""
)
const
param
=
router
.
currentRoute
.
value
.
params
param
.
value
=
query
()
const
viewSlideShow
=
param
.
status
const
datas
=
reactive
({
const
datas
=
reactive
({
DataSource
:{
DataSource
:{
TravelAatas
:{},
TravelAatas
:{},
...
@@ -175,7 +177,8 @@ const GetTripFiled = async () =>{
...
@@ -175,7 +177,8 @@ const GetTripFiled = async () =>{
}
catch
(
error
)
{
}
catch
(
error
)
{
}
}
}
}
if
(
searchData
.
value
.
TemplateType
!=
2
&&!
query
().
ViewSlideshow
)
GetTripFiled
()
if
(
searchData
.
value
.
TemplateType
!=
2
&&!
viewSlideShow
)
GetTripFiled
()
const
mainStore
=
useMainStore
()
const
mainStore
=
useMainStore
()
...
...
src/views/Market/Index.vue
View file @
4172bd48
...
@@ -244,7 +244,7 @@ import { useSellTemplateStore } from '@/store'
...
@@ -244,7 +244,7 @@ import { useSellTemplateStore } from '@/store'
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
query
}
from
'@/utils/common'
import
{
createOpEditorLink
,
createSaleCreateLink
,
managerTemplateLink
,
query
}
from
'@/utils/common'
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useRouter
}
from
"vue-router"
;
...
@@ -285,8 +285,14 @@ const datas = reactive({
...
@@ -285,8 +285,14 @@ const datas = reactive({
})
})
let
TemplateType
=
0
let
TemplateType
=
0
if
(
router
.
currentRoute
.
value
.
path
==
'/market'
)
model
.
value
=
1
if
(
router
.
currentRoute
.
value
.
path
==
'/market'
)
model
.
value
=
1
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/ad'
)
!=-
1
)
TemplateType
=
2
if
(
router
.
currentRoute
.
value
.
path
.
includes
(
'create'
))
{
else
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/trip'
)
!=-
1
)
TemplateType
=
1
model
.
value
=
2
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/ad'
)
!=-
1
)
TemplateType
=
2
else
if
(
router
.
currentRoute
.
value
.
fullPath
.
indexOf
(
'/trip'
)
!=-
1
)
TemplateType
=
1
}
else
if
(
router
.
currentRoute
.
value
.
path
.
includes
(
'op'
))
{
model
.
value
=
0
}
marketStore
.
setModel
(
model
.
value
)
const
queryObj
=
reactive
({
const
queryObj
=
reactive
({
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
20
,
pageSize
:
20
,
...
@@ -301,9 +307,12 @@ const queryObj = reactive({
...
@@ -301,9 +307,12 @@ const queryObj = reactive({
type
:
0
,
type
:
0
,
})
})
const
addTemplate
=
(
type
:
number
)
=>
{
const
addTemplate
=
(
type
:
number
)
=>
{
searchData
.
value
.
TemplateType
=
type
// searchData.value.TemplateType = type
marketStore
.
setMarket
(
!
market
)
// marketStore.setMarket(!market)
searchData
.
value
.
TempId
=
0
// searchData.value.TempId = 0
router
.
push
({
path
:
`/create_template/
${
type
}
`
})
}
}
const
CloseTemplate
=
()
=>
{
const
CloseTemplate
=
()
=>
{
...
@@ -372,20 +381,23 @@ const getTemplate = async (item:any) => {
...
@@ -372,20 +381,23 @@ const getTemplate = async (item:any) => {
* 页面跳转
* 页面跳转
*/
*/
const
goToTemplate
=
(
item
:
any
)
=>
{
const
goToTemplate
=
(
item
:
any
)
=>
{
if
(
!
ConfigId
.
value
)
return
let
url
=
''
datas
.
DetailsVisible
=
false
if
(
model
.
value
==
2
)
url
=
createSaleCreateLink
(
item
.
TempId
,
item
.
TemplateType
)
// searchData.value.TempId = item.TempId
else
if
(
model
.
value
==
0
&&
router
.
currentRoute
.
value
.
params
.
configId
)
url
=
createOpEditorLink
(
parseInt
(
router
.
currentRoute
.
value
.
params
.
configId
.
toString
()),
item
.
TempId
)
// searchData.value.TemplateType = item.TemplateType
else
if
(
model
.
value
==
1
)
url
=
managerTemplateLink
(
item
.
TempId
,
item
.
TemplateType
)
marketStore
.
setMarket
(
false
)
if
(
url
!=
''
)
{
datas
.
TemplateRow
=
{}
router
.
push
({
// console.log("item", item.TempId);
path
:
url
})
}
}
}
/***
/***
* 获取模板市场分页列表
* 获取模板市场分页列表
*/
*/
const
queryTemplateBySearchHandler
=
async
()
=>
{
const
queryTemplateBySearchHandler
=
async
()
=>
{
if
(
query
().
TempType
)
queryObj
.
TempType
=
query
().
TempType
const
parmas
=
router
.
currentRoute
.
value
.
params
if
(
parmas
.
temptype
)
queryObj
.
TempType
=
parseInt
(
parmas
.
temptype
.
toString
())
loading
.
value
=
true
loading
.
value
=
true
try
{
try
{
if
(
queryObj
.
pageIndex
==
1
)
dataList
.
value
=
[]
if
(
queryObj
.
pageIndex
==
1
)
dataList
.
value
=
[]
...
...
src/views/Preview/PreviewCustomSlider.vue
View file @
4172bd48
...
@@ -31,9 +31,10 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '../../configs/canvas'
...
@@ -31,9 +31,10 @@ import { VIEWPORT_SIZE, VIEWPORT_VER_SIZE } from '../../configs/canvas'
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
{
query
}
from
'../../utils/common'
import
{
query
}
from
'../../utils/common'
import
{
ElLoading
}
from
'element-plus'
import
{
ElLoading
}
from
'element-plus'
import
{
useRouter
}
from
'vue-router'
const
param
=
ref
<
any
>
(
""
)
const
router
=
useRouter
(
)
param
.
value
=
query
()
const
param
=
router
.
currentRoute
.
value
.
params
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
const
{
slides
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
{
slides
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
w
=
ref
(
0
)
const
w
=
ref
(
0
)
...
@@ -41,7 +42,7 @@ const h = ref(0)
...
@@ -41,7 +42,7 @@ const h = ref(0)
const
loadSliders
=
async
()
=>
{
const
loadSliders
=
async
()
=>
{
const
loadingObj
=
ElLoading
.
service
({
text
:
'正在渲染数据'
,
lock
:
true
})
const
loadingObj
=
ElLoading
.
service
({
text
:
'正在渲染数据'
,
lock
:
true
})
let
response
=
await
ConfigService
.
sellGetTemplateDetails
({
Id
:
par
am
.
value
.
tid
})
let
response
=
await
ConfigService
.
sellGetTemplateDetails
({
Id
:
par
seInt
(
param
.
tid
.
toString
())
})
loadingObj
.
close
()
loadingObj
.
close
()
if
(
response
.
data
.
resultCode
==
1
)
{
if
(
response
.
data
.
resultCode
==
1
)
{
...
@@ -58,14 +59,14 @@ const loadSliders = async ()=>{
...
@@ -58,14 +59,14 @@ const loadSliders = async ()=>{
}
}
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
newSlides
:
any
[]
=
[]
let
newSlides
:
any
[]
=
[]
await
SlidesData
.
forEach
((
x
:
any
,
i
:
number
)
=>
{
SlidesData
.
forEach
((
x
:
any
,
i
:
number
)
=>
{
newSlides
.
push
(
x
)
newSlides
.
push
(
x
)
})
})
slidesStore
.
setSlides
(
newSlides
)
slidesStore
.
setSlides
(
newSlides
)
}
}
}
}
if
(
param
.
value
.
tid
){
if
(
param
.
tid
){
loadSliders
()
loadSliders
()
}
}
</
script
>
</
script
>
\ No newline at end of file
src/views/SellTemplate/Share.vue
View file @
4172bd48
...
@@ -103,7 +103,7 @@ import { ApiResult } from "@/configs/axios";
...
@@ -103,7 +103,7 @@ import { ApiResult } from "@/configs/axios";
import
ConfigService
from
"@/services/ConfigService"
;
import
ConfigService
from
"@/services/ConfigService"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
ElMessage
}
from
"element-plus"
;
import
{
PropType
,
inject
,
reactive
,
ref
,
watch
}
from
"vue"
;
import
{
PropType
,
inject
,
reactive
,
ref
,
watch
}
from
"vue"
;
import
{
formatDateTimeToRead
,
query
}
from
'@/utils/common'
import
{
createPlayLink
,
formatDateTimeToRead
,
query
}
from
'@/utils/common'
import
breadPeeling
from
'./components/breadPeeling.vue'
import
breadPeeling
from
'./components/breadPeeling.vue'
import
CopyFile
from
'./components/CopyFile.vue'
import
CopyFile
from
'./components/CopyFile.vue'
import
{
useScreenStore
,
useSellTemplateStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useScreenStore
,
useSellTemplateStore
,
useSlidesStore
}
from
"@/store"
;
...
@@ -211,7 +211,7 @@ const getDocumentData = async () => {
...
@@ -211,7 +211,7 @@ const getDocumentData = async () => {
}
}
const
openFileDocument
=
(
item
:
any
)
=>
{
const
openFileDocument
=
(
item
:
any
)
=>
{
let
param
=
query
()
let
param
=
query
()
const
url
=
`
${
location
.
origin
}
/?uid=
${
param
.
uid
}
&sellId=
${
item
.
FileId
}
&ViewSlideshow=2`
const
url
=
createPlayLink
(
item
.
FileId
,
0
,
2
)
//
`${location.origin}/?uid=${param.uid}&sellId=${item.FileId}&ViewSlideshow=2`
window
.
open
(
url
);
window
.
open
(
url
);
}
}
const
exportDocument
=
(
item
:
any
)
=>
{
const
exportDocument
=
(
item
:
any
)
=>
{
...
...
src/views/SellTemplate/components/HistoricalVersion.vue
View file @
4172bd48
...
@@ -92,7 +92,7 @@ import { ApiResult } from '@/configs/axios';
...
@@ -92,7 +92,7 @@ import { ApiResult } from '@/configs/axios';
import
{
ref
,
reactive
}
from
'vue'
;
import
{
ref
,
reactive
}
from
'vue'
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
'element-plus'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
ConfigService
from
'@/services/ConfigService'
;
import
{
query
}
from
'@/utils/common'
import
{
createPlayLink
,
query
}
from
'@/utils/common'
import
CopyFile
from
"./CopyFile.vue"
;
import
CopyFile
from
"./CopyFile.vue"
;
const
props
=
defineProps
({
const
props
=
defineProps
({
...
@@ -153,7 +153,7 @@ import CopyFile from "./CopyFile.vue";
...
@@ -153,7 +153,7 @@ import CopyFile from "./CopyFile.vue";
}
}
}
else
{
}
else
{
let
param
=
query
()
let
param
=
query
()
const
url
=
`
${
location
.
origin
}
/?uid=
${
param
.
uid
}
&sellId=
${
row
.
FileId
}
&LogId=
${
row
.
LogId
}
&ViewSlideshow=1`
const
url
=
createPlayLink
(
row
.
FileId
,
row
.
LogId
,
1
)
//
`${location.origin}/?uid=${param.uid}&sellId=${row.FileId}&LogId=${row.LogId}&ViewSlideshow=1`
window
.
open
(
url
);
window
.
open
(
url
);
}
}
}
}
...
...
src/views/SellTemplate/components/journeyAdsList.vue
View file @
4172bd48
...
@@ -191,7 +191,7 @@ import { ElMessage,ElTree,ElLoading, ElMessageBox } from 'element-plus';
...
@@ -191,7 +191,7 @@ import { ElMessage,ElTree,ElLoading, ElMessageBox } from 'element-plus';
import
ConfigService
from
"@/services/ConfigService"
;
import
ConfigService
from
"@/services/ConfigService"
;
import
FolderService
from
"@/services/FolderService"
;
import
FolderService
from
"@/services/FolderService"
;
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
;
import
{
injectKeyTemplate
}
from
"@/types/injectKey"
;
import
{
createSaleEditorLink
,
formatDateTimeToRead
}
from
"@/utils/common"
;
import
{
create
PlayLink
,
create
SaleEditorLink
,
formatDateTimeToRead
}
from
"@/utils/common"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
"@/store"
;
import
{
isPC
,
query
}
from
'@/utils/common'
import
{
isPC
,
query
}
from
'@/utils/common'
...
@@ -347,7 +347,7 @@ import { useRouter } from 'vue-router';
...
@@ -347,7 +347,7 @@ import { useRouter } from 'vue-router';
}
}
const
viewTemplate
=
(
row
:
any
)
=>
{
const
viewTemplate
=
(
row
:
any
)
=>
{
let
param
=
query
()
let
param
=
query
()
const
url
=
`
${
location
.
origin
}
?uid=
${
param
.
uid
}
&sellId=
${
row
.
FileId
}
&ViewSlideshow=
${
props
.
currentMenu
==-
1
?
1
:
2
}
`
const
url
=
createPlayLink
(
row
.
FileId
,
0
,
props
.
currentMenu
==-
1
?
1
:
2
)
//
`${location.origin}?uid=${param.uid}&sellId=${row.FileId}&ViewSlideshow=${props.currentMenu==-1?1:2}`
window
.
open
(
url
);
window
.
open
(
url
);
}
}
const
handleSelectionChange
=
(
val
:
[])
=>
{
const
handleSelectionChange
=
(
val
:
[])
=>
{
...
...
src/views/components/element/TextElement/BaseTextElement.vue
View file @
4172bd48
...
@@ -55,13 +55,16 @@
...
@@ -55,13 +55,16 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
computed
,
onMounted
,
onUnmounted
,
ref
,
watch
}
from
'vue'
import
{
computed
,
onMounted
,
onUnmounted
,
ref
,
watch
}
from
'vue'
import
type
{
PPTTextElement
}
from
'@/types/slides'
import
type
{
PPTTextElement
}
from
'@/types/slides'
import
useElementShadow
from
'@/views/components/element/hooks/useElementShadow'
import
ProsemirrorEditor
from
'@/views/components/element/ProsemirrorEditor.vue'
import
ProsemirrorEditor
from
'@/views/components/element/ProsemirrorEditor.vue'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
elementInfo
:
PPTTextElement
elementInfo
:
PPTTextElement
}
>
()
}
>
()
const
shadow
=
computed
(()
=>
props
.
elementInfo
.
shadow
)
const
{
shadowStyle
}
=
useElementShadow
(
shadow
)
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
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