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
a4ee9fcb
Commit
a4ee9fcb
authored
Nov 24, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a6a686d3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
40 deletions
+14
-40
main.ts
src/main.ts
+1
-1
slides.ts
src/store/slides.ts
+8
-3
index.vue
src/views/Editor/EditorHeader/index.vue
+1
-0
LayoutPool.vue
src/views/Editor/Thumbnails/LayoutPool.vue
+0
-1
index.vue
src/views/Editor/Thumbnails/index.vue
+3
-33
index.vue
src/views/Editor/index.vue
+0
-1
Index.vue
src/views/Market/Index.vue
+1
-1
No files found.
src/main.ts
View file @
a4ee9fcb
...
...
@@ -3,7 +3,7 @@ import { createPinia } from 'pinia'
import
App
from
'./App.vue'
import
'./registerServiceWorker'
import
{
ElMessage
}
from
'element-plus'
import
{
ElMessage
,
ElMessageBox
}
from
'element-plus'
import
'element-plus/dist/index.css'
import
'@icon-park/vue-next/styles/index.css'
...
...
src/store/slides.ts
View file @
a4ee9fcb
...
...
@@ -28,6 +28,7 @@ export interface SlidesState {
slides
:
Slide
[]
slideIndex
:
number
viewportRatio
:
number
layoutSlides
:
Slide
[]
}
export
const
useSlidesStore
=
defineStore
(
'slides'
,
{
...
...
@@ -37,6 +38,7 @@ export const useSlidesStore = defineStore('slides', {
slides
:
slides
,
// 幻灯片页面数据
slideIndex
:
0
,
// 当前页面索引
viewportRatio
:
0.75
,
// 可视区域比例,默认16:9 0.5625
layoutSlides
:
slides
,
// 所有模版数据
}),
getters
:
{
...
...
@@ -92,10 +94,9 @@ export const useSlidesStore = defineStore('slides', {
fontName
,
backgroundColor
,
}
=
state
.
theme
const
subColor
=
tinycolor
(
fontColor
).
isDark
()
?
'rgba(230, 230, 230, 0.5)'
:
'rgba(180, 180, 180, 0.5)'
const
layoutsString
=
JSON
.
stringify
(
layout
s
)
console
.
log
(
'layouts,-----'
)
const
layoutsString
=
JSON
.
stringify
(
state
.
layoutSlide
s
)
.
replaceAll
(
'{{themeColor}}'
,
themeColor
)
.
replaceAll
(
'{{fontColor}}'
,
fontColor
)
.
replaceAll
(
'{{fontName}}'
,
fontName
)
...
...
@@ -123,6 +124,10 @@ export const useSlidesStore = defineStore('slides', {
setSlides
(
slides
:
Slide
[])
{
this
.
slides
=
slides
},
setLayouts
(
layoutSlides
:
Slide
[])
{
this
.
layoutSlides
=
layoutSlides
},
addSlide
(
slide
:
Slide
|
Slide
[])
{
const
slides
=
Array
.
isArray
(
slide
)
?
slide
:
[
slide
]
...
...
src/views/Editor/EditorHeader/index.vue
View file @
a4ee9fcb
...
...
@@ -132,6 +132,7 @@ const marketStore = useScreenStore()
const
{
market
,
model
,
ConfigId
}
=
storeToRefs
(
useScreenStore
())
const
goBack
=
()
=>
{
if
(
model
.
value
)
return
marketStore
.
setMarket
(
true
)
ElMessageBox
.
confirm
(
'退出此页面将清空当前数据,请谨慎操作?'
,
'提示'
,
...
...
src/views/Editor/Thumbnails/LayoutPool.vue
View file @
a4ee9fcb
...
...
@@ -23,7 +23,6 @@ const emit = defineEmits<{
}
>
()
const
{
layouts
}
=
storeToRefs
(
useSlidesStore
())
const
selectSlideTemplate
=
(
slide
:
Slide
)
=>
{
emit
(
'select'
,
slide
)
}
...
...
src/views/Editor/Thumbnails/index.vue
View file @
a4ee9fcb
...
...
@@ -66,6 +66,7 @@ import Popover from '@/components/Popover.vue'
import
Draggable
from
'vuedraggable'
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
const
layoutsStore
=
useSlidesStore
()
const
keyboardStore
=
useKeyboardStore
()
const
{
selectedSlidesIndex
:
_selectedSlidesIndex
,
thumbnailsFocus
}
=
storeToRefs
(
mainStore
)
const
{
slides
,
slideIndex
}
=
storeToRefs
(
slidesStore
)
...
...
@@ -97,18 +98,6 @@ const searchData = ref({} as any)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
// 模版市场分页数据
const
SearchqueryObj
=
reactive
({
pageIndex
:
1
,
pageSize
:
10
,
LineId
:
0
,
//线路Id
Title
:
''
,
//模板名称
CountryName
:
''
,
//国家名称
SeasonName
:
''
,
//季节名称
ColorName
:
''
,
//颜色名称
totalCount
:
0
,
//总调试
pageCount
:
0
,
//总页数
})
watch
(()
=>
slideIndex
.
value
,
()
=>
{
// 清除多选状态的幻灯片
if
(
selectedSlidesIndex
.
value
.
length
)
{
...
...
@@ -129,23 +118,6 @@ watch(() => slideIndex.value, () => {
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
/***
* 获取模板市场分页列表
*/
const
queryTemplateBySearchHandler
=
async
()
=>
{
try
{
let
pageRes
=
await
ConfigService
.
GetTemplagePageAsync
(
SearchqueryObj
);
console
.
log
(
"queryTemplateBySearchHandler"
,
pageRes
);
if
(
pageRes
.
data
.
resultCode
==
1
)
{
datas
.
DataSource
.
dataList
=
pageRes
.
data
.
data
.
pageData
;
SearchqueryObj
.
totalCount
=
pageRes
.
data
.
data
.
count
;
SearchqueryObj
.
pageCount
=
pageRes
.
data
.
data
.
pageCount
;
}
}
catch
(
error
)
{
console
.
log
(
"queryTemplateBySearchHandler"
,
error
);
}
}
// 获取行程团数据
const
GetTripFiledData
=
async
()
=>
{
if
(
queryObj
.
value
.
TempId
)
return
...
...
@@ -229,12 +201,12 @@ const GetTripTemplate = async () =>{
pageType
:
1
,
...
SlidesData
}
newSlides
.
push
(
obj
)
slidesStore
.
setSlides
(
newSlides
)
newSlides
.
push
(
obj
)
}
else
if
(
SlidesData
.
length
>
0
){
newSlides
=
SlidesData
}
slidesStore
.
setSlides
(
newSlides
)
layoutsStore
.
setLayouts
(
JSON
.
parse
(
JSON
.
stringify
(
newSlides
)))
queryObj
.
value
.
TempId
=
dataRes
.
data
.
data
.
TempId
queryObj
.
value
.
LineId
=
dataRes
.
data
.
data
.
LineId
queryObj
.
value
.
LineName
=
dataRes
.
data
.
data
.
LineName
...
...
@@ -436,8 +408,6 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
]
}
queryTemplateBySearchHandler
()
GetTripTemplate
()
</
script
>
...
...
src/views/Editor/index.vue
View file @
a4ee9fcb
...
...
@@ -54,7 +54,6 @@ import ConfigService from '@/services/ConfigService'
const
datas
=
reactive
({
DataSource
:{
dataList
:
[],
ConfigId
:
inject
(
injectKeyTemplate
).
ConfigId
?
inject
(
injectKeyTemplate
).
ConfigId
:
0
,
pageType
:
1
,
//1基础 2酒店 3景 4餐
DataSourceOverlay
:
false
,
...
...
src/views/Market/Index.vue
View file @
a4ee9fcb
...
...
@@ -116,7 +116,7 @@
const
currentPage
=
ref
(
1
as
Number
);
const
queryObj
=
reactive
({
pageIndex
:
1
,
pageSize
:
1
0
,
pageSize
:
2
0
,
LineId
:
0
,
//线路Id
Title
:
''
,
//模板名称
CountryName
:
''
,
//国家名称
...
...
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