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
afc2c09a
Commit
afc2c09a
authored
Dec 06, 2023
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/pptist
parents
f299545f
f3a56647
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
11 additions
and
164 deletions
+11
-164
useImport.ts
src/hooks/useImport.ts
+0
-1
useSlideHandler.ts
src/hooks/useSlideHandler.ts
+0
-2
layout.ts
src/mocks/layout.ts
+0
-10
slides.ts
src/mocks/slides.ts
+0
-3
main.ts
src/store/main.ts
+1
-1
slides.ts
src/store/slides.ts
+0
-1
slides.ts
src/types/slides.ts
+0
-2
index.ts
src/utils/Editor/index.ts
+1
-3
domainManager.ts
src/utils/domainManager.ts
+1
-1
resolve.ts
src/utils/psdParser/resolve.ts
+0
-1
UploadPicture.vue
src/views/Editor/CanvasTool/UploadPicture.vue
+4
-4
index.vue
src/views/Editor/EditorHeader/index.vue
+0
-9
index.vue
src/views/Editor/Thumbnails/index.vue
+0
-1
EditDatas.vue
src/views/Editor/Toolbar/EditDatas.vue
+0
-120
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+4
-1
index.vue
src/views/Editor/Toolbar/index.vue
+0
-3
index.vue
src/views/Editor/index.vue
+0
-1
No files found.
src/hooks/useImport.ts
View file @
afc2c09a
...
...
@@ -118,7 +118,6 @@ export default () => {
const
slide
:
Slide
=
{
id
:
nanoid
(
10
),
typeId
:
0
,
elements
:
[],
background
,
pageType
:
1
...
...
src/hooks/useSlideHandler.ts
View file @
afc2c09a
...
...
@@ -30,7 +30,6 @@ export default () => {
const
resetSlides
=
()
=>
{
const
emptySlide
:
Slide
=
{
id
:
nanoid
(
10
),
typeId
:
0
,
elements
:
[],
background
:
{
type
:
'solid'
,
...
...
@@ -81,7 +80,6 @@ export default () => {
const
createSlide
=
()
=>
{
const
emptySlide
:
Slide
=
{
id
:
nanoid
(
10
),
typeId
:
0
,
elements
:
[],
background
:
{
type
:
'solid'
,
...
...
src/mocks/layout.ts
View file @
afc2c09a
...
...
@@ -6,7 +6,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -83,7 +82,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
2
,
typeId
:
0
,
elements
:
[
{
type
:
'text'
,
...
...
@@ -144,7 +142,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
3
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -195,7 +192,6 @@ export const layouts: Slide[] = [
{
id
:
'MZVO1kkj'
,
pageType
:
4
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -282,7 +278,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
4
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -468,7 +463,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
4
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -523,7 +517,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'text'
,
...
...
@@ -588,7 +581,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'text'
,
...
...
@@ -707,7 +699,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'text'
,
...
...
@@ -785,7 +776,6 @@ export const layouts: Slide[] = [
{
id
:
'template'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
src/mocks/slides.ts
View file @
afc2c09a
...
...
@@ -5,7 +5,6 @@ export const slides: Slide[] = [
{
id
:
'test-slide-1'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
@@ -81,7 +80,6 @@ export const slides: Slide[] = [
{
id
:
'test-slide-2'
,
pageType
:
2
,
typeId
:
0
,
elements
:
[
{
type
:
'text'
,
...
...
@@ -142,7 +140,6 @@ export const slides: Slide[] = [
{
id
:
'test-slide-3'
,
pageType
:
3
,
typeId
:
0
,
elements
:
[
{
type
:
'shape'
,
...
...
src/store/main.ts
View file @
afc2c09a
...
...
@@ -59,7 +59,7 @@ export const useMainStore = defineStore('main', {
creatingElement
:
null
,
// 正在插入的元素信息,需要通过绘制插入的元素(文字、形状、线条)
creatingCustomShape
:
false
,
// 正在绘制任意多边形
availableFonts
:
SYS_FONTS
,
// 当前环境可用字体
toolbarState
:
ToolbarStates
.
EDIT_DATAS
,
// 右侧工具栏状态 设计SLIDE_DESIGN 模版数据EL_TEMPLATEDATA 编辑数据EDIT_DATAS
toolbarState
:
ToolbarStates
.
SLIDE_DESIGN
,
// 右侧工具栏状态 设计SLIDE_DESIGN 模版数据EL_TEMPLATEDATA 编辑数据EDIT_DATAS
clipingImageElementId
:
''
,
// 当前正在裁剪的图片ID
richTextAttrs
:
defaultRichTextAttrs
,
// 富文本状态
selectedTableCells
:
[],
// 选中的表格单元格
...
...
src/store/slides.ts
View file @
afc2c09a
...
...
@@ -39,7 +39,6 @@ export const useSlidesStore = defineStore('slides', {
slides
:
[{
id
:
'test-slide-1'
,
pageType
:
1
,
typeId
:
0
,
elements
:
[],
background
:
{
type
:
'solid'
,
...
...
src/types/slides.ts
View file @
afc2c09a
...
...
@@ -691,7 +691,6 @@ export type TurningMode = 'no' | 'fade' | 'slideX' | 'slideY' | 'random' | 'slid
* animations?: 元素动画集合
*
* turningMode?: 翻页方式
* typeId: 类型id 酒店 景点 餐
*/
export
interface
Slide
{
id
:
string
...
...
@@ -701,7 +700,6 @@ export interface Slide {
animations
?:
PPTAnimation
[]
turningMode
?:
TurningMode
pageType
:
number
typeId
:
number
}
/**
...
...
src/utils/Editor/index.ts
View file @
afc2c09a
...
...
@@ -10,8 +10,7 @@ export default () => {
const
{
SourceLoading
}
=
storeToRefs
(
useScreenStore
())
// 数据源更新
const
setNewDatasList
=
(
DataSource
:
any
,
typeObj
:
any
)
=>
{
console
.
log
(
typeObj
,
'----1111'
)
const
setNewDatasList
=
(
DataSource
:
any
)
=>
{
sourceLoadingStore
.
setSourceLoading
(
false
)
const
slidesData
=
slides
.
value
const
cursors
=
[]
as
Array
<
any
>
...
...
@@ -35,7 +34,6 @@ export default () => {
obj
.
elements
=
JSON
.
parse
(
JSON
.
stringify
(
savelides
))
slidesData
.
forEach
((
x
:
any
,
index
)
=>
{
if
(
slideIndex
.
value
==
index
){
x
.
typeId
=
DataSource
.
typeId
x
.
pgaeType
=
DataSource
.
pgaeType
x
.
elements
=
obj
.
elements
}
...
...
src/utils/domainManager.ts
View file @
afc2c09a
...
...
@@ -8,7 +8,7 @@ export const domainManager = () => {
//文件站点
ViittoFileUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://imgfile.oytour.com"
:
'http://192.168.10.214:8130'
,
// 通知erp
notificationUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://
reborn
.oytour.com"
:
"http://localhost:8081"
,
notificationUrl
:
locationName
.
indexOf
(
'oytour'
)
!==
-
1
?
"http://
yx
.oytour.com"
:
"http://localhost:8081"
,
}
return
obj
}
\ No newline at end of file
src/utils/psdParser/resolve.ts
View file @
afc2c09a
...
...
@@ -69,7 +69,6 @@ const CreateDefaultSlider = (id:string):Slide =>{
return
{
id
,
pageType
:
1
,
typeId
:
0
,
elements
:[],
background
:
{
type
:
'solid'
,
...
...
src/views/Editor/CanvasTool/UploadPicture.vue
View file @
afc2c09a
...
...
@@ -5,7 +5,7 @@
<div
class=
"text-title"
>
选择、上传图片
</div>
</
template
>
<el-tabs
v-model=
"activeName"
class=
"demo-tabs"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"
选择图
"
name=
"1"
>
<el-tab-pane
label=
"
erp资料库
"
name=
"1"
>
<div
class=
"q-mb-md"
>
<el-input
v-model=
"datas.queryMsg.Name"
placeholder=
"输入关键字快速查找"
clearable
...
...
@@ -42,7 +42,7 @@
</div>
</el-tab-pane>
<el-tab-pane
label=
"
上传
图"
name=
"2"
>
<el-tab-pane
label=
"
本地
图"
name=
"2"
>
<FileInput
@
change=
"files => insertImageElement(files)"
>
<div
class=
"upload-box"
>
<img
v-if=
"imgPath"
:src=
"imgPath"
style=
"height: 200px;"
/>
...
...
@@ -83,9 +83,9 @@
</el-upload>
</div> -->
</el-tab-pane>
<el-tab-pane
label=
"
输入url
"
name=
"3"
>
<el-tab-pane
label=
"
图片地址
"
name=
"3"
>
<div
class=
"row wrap q-mt-md"
>
<el-input
v-model=
"imgUrl"
placeholder=
"输入图片的
url
地址"
class=
"input-with-select"
></el-input>
<el-input
v-model=
"imgUrl"
placeholder=
"输入图片的地址"
class=
"input-with-select"
></el-input>
</div>
</el-tab-pane>
</el-tabs>
...
...
src/views/Editor/EditorHeader/index.vue
View file @
afc2c09a
...
...
@@ -406,15 +406,6 @@ const setTemplate = async () =>{
})
}
for
(
let
i
=
0
;
i
<
slides
.
value
.
length
;
i
++
){
// if(!slides.value[i].typeId&&slides.value[i].pageType!=1){
// datas.loading = false
// mainStore.setToolbarState(ToolbarStates.EL_STYLE)
// return ElMessage({
// showClose: true,
// message: `请选择 第 ${i+1} 页 的绑定数据`,
// type: 'warning',
// })
// }
if
(
slides
.
value
[
i
].
elements
.
length
==
0
)
{
datas
.
loading
=
false
mainStore
.
setToolbarState
(
ToolbarStates
.
EL_TEMPLATEDATA
)
...
...
src/views/Editor/Thumbnails/index.vue
View file @
afc2c09a
...
...
@@ -324,7 +324,6 @@ const GetTripTemplate = async () =>{
if
(
typeof
SlidesData
==
'object'
&&!
SlidesData
.
length
){
let
obj
=
{
pageType
:
1
,
typeId
:
null
,
...
SlidesData
}
newSlides
.
push
(
obj
)
...
...
src/views/Editor/Toolbar/EditDatas.vue
deleted
100644 → 0
View file @
f299545f
<
template
>
<div
class=
"q-mt-xs bg-white q-pa-xs rounded ElementTemplateData"
>
<div
class=
"column text-mdall"
>
<p
class=
"q-mt-md"
>
当前类型:
<span
class=
"q-ml-xs"
>
{{
getPageType
()
}}
</span>
</p>
</div>
<template
v-if=
"datas.DataSource.pageType!=1"
>
<p
class=
"q-mt-md"
><span
class=
"Required q-mr-md"
>
*
</span>
选择数据:
</p>
<div
class=
"row wrap q-mt-md"
>
<el-select
v-model=
"datas.DataSource.typeId"
class=
"m-2"
placeholder=
"请选择需要绑定的数据"
@
change=
"getPageDatas()"
>
<el-option
v-for=
"item in datas.bindDatas"
:key=
"item.Id"
:label=
"item.Name"
:value=
"item.Id"
/>
</el-select>
</div>
</
template
>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
computed
,
ref
,
reactive
,
watch
,
inject
,
nextTick
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
ElInput
}
from
'element-plus'
import
{
useMainStore
,
useSlidesStore
,
useScreenStore
}
from
'@/store'
import
LineService
from
'@/services/LineService'
import
ConfigService
from
'@/services/ConfigService'
import
{
injectKeyDataSource
}
from
'@/types/injectKey'
import
{
getHtmlPlainText
}
from
'@/utils/common'
import
useExport
from
'@/hooks/useExport'
import
ThumbnailSlide
from
'@/views/components/ThumbnailSlide/index.vue'
import
AliyunUpload
from
'@/utils/upload/aliyun'
import
useEditor
from
'@/utils/Editor/index'
const
datas
=
reactive
({
DataSource
:{},
CountryValue
:
null
,
bindDatas
:
null
})
const
dispositionObj
=
ref
({}
as
any
)
const
queryObj
=
ref
({}
as
any
)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
const
lines
=
ref
([]
as
Array
<
any
>
)
//线路
const
Series
=
ref
([]
as
Array
<
any
>
)
//系列
const
cursors
=
[]
as
Array
<
any
>
const
slidesStore
=
useSlidesStore
()
const
sourceLoadingStore
=
useScreenStore
()
const
{
slides
,
slideIndex
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
{
setNewDatasList
}
=
useEditor
()
const
{
model
,
ConfigId
,
TemplateDataSource
,
TemplateType
,
CoverImg
,
isCoverImg
,
TempId
}
=
storeToRefs
(
useScreenStore
())
watch
(()
=>
datas
.
DataSource
.
DataSourceList
,
(
n
,
o
)
=>
{
getBindDatas
()
})
const
getPageDatas
=
()
=>
{
let
typeObj
=
datas
.
bindDatas
.
find
(
x
=>
{
return
x
.
Id
==
datas
.
DataSource
.
typeId
})
console
.
log
(
datas
.
bindDatas
,
'-------'
)
if
(
typeObj
){
sourceLoadingStore
.
setSourceLoading
(
true
)
setNewDatasList
(
datas
.
DataSource
,
typeObj
)
}
}
const
getPageType
=
()
=>
{
let
obj
=
TemplateType
.
value
.
find
(
x
=>
{
return
x
.
FiledType
==
datas
.
DataSource
.
pageType
})
if
(
obj
&&
obj
.
Name
){
return
obj
.
Name
}
}
const
getBindDatas
=
()
=>
{
let
obj
=
TemplateType
.
value
.
find
(
x
=>
{
return
x
.
FiledType
==
datas
.
DataSource
.
pageType
})
if
(
obj
&&
obj
.
Name
){
let
Path
=
obj
.
Content
.
split
(
'.'
)
TemplateType
.
value
.
forEach
(
x
=>
{
let
dataPath
=
x
.
Content
.
split
(
'.'
)
let
value
=
JSON
.
parse
(
JSON
.
stringify
(
datas
.
DataSource
.
TravelAatas
));
for
(
let
i
=
0
;
i
<
dataPath
.
length
;
i
++
)
{
const
oo
=
dataPath
[
i
];
if
(
oo
==
Path
[
0
]
&&
value
&&
value
[
oo
]){
datas
.
bindDatas
=
value
[
oo
]
}
}
})
}
}
getBindDatas
()
</
script
>
<
style
lang=
"scss"
scoped
>
.origin-image
{
height
:
100px
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
background-position
:
center
;
background-color
:
$lightGray
;
margin-bottom
:
10px
;
}
.ElementTemplateData
{
/* min-height: 500px; */
}
.el-select
{
width
:
100%
;
}
.Required
{
color
:
red
;
}
</
style
>
\ No newline at end of file
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
afc2c09a
...
...
@@ -234,9 +234,12 @@
Content
:
item
.
TemplateDataSource
&&
item
.
TemplateDataSource
.
Content
?
item
.
TemplateDataSource
.
Content
:
''
,
Name
:
item
.
TemplateDataSource
&&
item
.
TemplateDataSource
.
Name
?
item
.
TemplateDataSource
.
Name
:
''
,
Id
:
item
.
TemplateDataSource
&&
item
.
TemplateDataSource
.
Id
?
item
.
TemplateDataSource
.
Id
:
null
as
Number
,
index
:
item
.
TemplateDataSource
&&
item
.
TemplateDataSource
.
index
>=
0
?
item
.
TemplateDataSource
.
index
:
null
as
Number
,
}
}
if
(
slide
.
pageType
!=
1
){
let
index
=
item
.
TemplateDataSource
&&
item
.
TemplateDataSource
.
index
>=
0
?
item
.
TemplateDataSource
.
index
:
null
as
Number
Reflect
.
set
(
Obj
.
TemplateDataSource
,
'index'
,
index
)
}
if
(
Obj
)
datas
.
DataSource
.
DataSourceList
.
push
(
Obj
)
}
})
...
...
src/views/Editor/Toolbar/index.vue
View file @
afc2c09a
...
...
@@ -23,7 +23,6 @@ import ElementStylePanel from './ElementStylePanel/index.vue'
import
ElementPositionPanel
from
'./ElementPositionPanel.vue'
import
ElementAnimationPanel
from
'./ElementAnimationPanel.vue'
import
ElementTemplateData
from
'./ElementTemplateData.vue'
// import EditDatas from './EditDatas.vue'
import
SlideDesignPanel
from
'./SlideDesignPanel.vue'
import
SlideAnimationPanel
from
'./SlideAnimationPanel.vue'
import
MultiPositionPanel
from
'./MultiPositionPanel.vue'
...
...
@@ -43,7 +42,6 @@ const elementTabs = computed<ElementTabs[]>(() => {
if
(
handleElement
.
value
?.
type
===
'text'
)
{
return
[
{
label
:
'样式'
,
key
:
ToolbarStates
.
EL_STYLE
},
// { label: '数据', key: ToolbarStates.EDIT_DATAS },
{
label
:
'符号'
,
key
:
ToolbarStates
.
SYMBOL
},
{
label
:
'位置'
,
key
:
ToolbarStates
.
EL_POSITION
},
{
label
:
'动画'
,
key
:
ToolbarStates
.
EL_ANIMATION
}
...
...
@@ -98,7 +96,6 @@ const currentPanelComponent = computed(() => {
[
ToolbarStates
.
EL_STYLE
]:
ElementStylePanel
,
[
ToolbarStates
.
EL_POSITION
]:
ElementPositionPanel
,
[
ToolbarStates
.
EL_ANIMATION
]:
ElementAnimationPanel
,
// [ToolbarStates.EDIT_DATAS]: EditDatas,
[
ToolbarStates
.
EL_TEMPLATEDATA
]:
ElementTemplateData
,
[
ToolbarStates
.
SLIDE_DESIGN
]:
SlideDesignPanel
,
[
ToolbarStates
.
SLIDE_ANIMATION
]:
SlideAnimationPanel
,
...
...
src/views/Editor/index.vue
View file @
afc2c09a
...
...
@@ -89,7 +89,6 @@ const datas = reactive({
FeatureImgList
:
[],
ConfigId
:
ConfigId
.
value
?
ConfigId
.
value
:
0
,
pageType
:
1
,
//1基础 2酒店 3景 4餐
typeId
:
null
,
//记录当前页面 酒店 景 餐的id
DataSourceOverlay
:
false
,
DataSourceList
:[],
queryObj
:{
...
...
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