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
c5c7aad3
Commit
c5c7aad3
authored
Dec 22, 2023
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/viitto/pptist
# Conflicts: # src/views/Editor/Thumbnails/index.vue
parents
769b925d
48f6a350
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
172 additions
and
93 deletions
+172
-93
index.html
public/index.html
+1
-0
imageClip.ts
src/configs/imageClip.ts
+20
-0
sellTemplate.ts
src/store/sellTemplate.ts
+6
-2
index.vue
src/views/Editor/EditorHeader/index.vue
+46
-30
index.vue
src/views/Editor/Thumbnails/index.vue
+39
-35
ElementTemplateData.vue
src/views/Editor/Toolbar/ElementTemplateData.vue
+10
-3
Index.vue
src/views/Market/Index.vue
+44
-17
SellTemplate.vue
src/views/SellTemplate/SellTemplate.vue
+2
-2
index.vue
src/views/SellTemplate/index.vue
+3
-3
index.vue
src/views/components/sellNavs/index.vue
+1
-1
No files found.
public/index.html
View file @
c5c7aad3
...
...
@@ -2,6 +2,7 @@
<html
lang=
"zh-CN"
>
<head>
<meta
charset=
"utf-8"
/>
<meta
name=
"referrer"
content=
"no-referrer"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"renderer"
content=
"webkit"
>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
...
...
src/configs/imageClip.ts
View file @
c5c7aad3
...
...
@@ -47,6 +47,26 @@ export const CLIPPATHS: ClipPath = {
return
`M 0 0 L
${
width
*
0.8
}
0 L
${
width
}
${
height
*
0.2
}
L
${
width
}
${
height
}
L
${
width
*
0.2
}
${
height
}
L 0
${
height
*
0.8
}
Z`
},
},
rect4
:
{
name
:
'圆角矩形1'
,
type
:
ClipPathTypes
.
RECT
,
style
:
'inset(0 0 0 0 round 0px 0px 0px 150px)'
,
},
rect5
:
{
name
:
'圆角矩形2'
,
type
:
ClipPathTypes
.
RECT
,
style
:
'inset(0 0 0 0 round 0px 0px 150px 0px)'
,
},
rect6
:
{
name
:
'圆角矩形3'
,
type
:
ClipPathTypes
.
RECT
,
style
:
'inset(0 0 0 0 round 150px 0px 0px 0px)'
,
},
rect7
:
{
name
:
'圆角矩形4'
,
type
:
ClipPathTypes
.
RECT
,
style
:
'inset(0 0 0 0 round 0px 150px 0px 0px)'
,
},
roundRect
:
{
name
:
'圆角矩形'
,
type
:
ClipPathTypes
.
RECT
,
...
...
src/store/sellTemplate.ts
View file @
c5c7aad3
import
{
fa
}
from
'element-plus/es/locale'
import
{
defineStore
}
from
'pinia'
export
interface
SalesState
{
SalesEditor
:
number
,
SalesBack
:
number
,
}
export
const
useSellTemplate
=
defineStore
(
'sales'
,
{
state
:
():
SalesState
=>
({
SalesEditor
:
0
,
// 1 新增 2编辑
SalesEditor
:
0
,
// 1 新增 2编辑
SalesBack
:
0
,
// 0
}),
actions
:
{
setSalesEditor
(
SalesEditor
:
number
)
{
this
.
SalesEditor
=
SalesEditor
},
setSalesBack
(
SalesBack
:
number
)
{
this
.
SalesBack
=
SalesBack
},
},
})
\ No newline at end of file
src/views/Editor/EditorHeader/index.vue
View file @
c5c7aad3
...
...
@@ -39,16 +39,16 @@
<Input
class=
"title-input"
ref=
"titleInputRef"
v-model:value=
"
queryObj.Titl
e"
v-model:value=
"
titleValu
e"
@
blur=
"handleUpdateTitle()"
v-if=
"editingTitle"
></Input>
<div
class=
"title-text"
@
click=
"startEditTitle()"
:title=
"
queryObj.T
itle"
:title=
"
t
itle"
v-else
>
{{
queryObj.T
itle }}
</div>
>
{{
t
itle }}
</div>
</div>
</div>
...
...
@@ -139,8 +139,9 @@ const mainStore = useMainStore()
const
slidesStore
=
useSlidesStore
()
const
layoutsStore
=
useSlidesStore
()
const
{
title
,
slides
,
slideIndex
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
{
SalesEditor
}
=
storeToRefs
(
useSellTemplate
())
const
{
SalesEditor
,
SalesBack
}
=
storeToRefs
(
useSellTemplate
())
const
SalesEditorStore
=
useSellTemplate
()
const
SalesBackStore
=
useSellTemplate
()
const
{
enterScreening
,
enterScreeningFromStart
}
=
useScreening
()
const
{
importSpecificFile
,
importPPTXFile
,
exporting
}
=
useImport
()
const
{
resetSlides
}
=
useSlideHandler
()
...
...
@@ -176,28 +177,12 @@ const thumbnails = ref<string[]>()
const
psdVisibleStatus
=
ref
(
false
)
const
{
market
,
model
,
ConfigId
,
CoverImg
,
dataLoading
,
TempId
,
SourceLoading
}
=
storeToRefs
(
useScreenStore
())
// 返回到首页
// 返回到首页
type 1 模版列表页 0 销售在线模版页
const
goBack
=
(
type
:
any
)
=>
{
mainBackVisible
.
value
=
false
let
list
=
[
{
id
:
'test-slide-1'
,
pageType
:
1
,
elements
:
[],
background
:
{
type
:
'solid'
,
color
:
'#ffffff'
,
},
}
]
if
((
model
.
value
&&
model
.
value
!=
2
)
||!
type
)
{
if
(
model
.
value
&&
model
.
value
!=
2
)
{
setTimeout
(()
=>
{
searchData
.
value
.
TempId
=
0
if
(
type
)
marketStore
.
setMarket
(
true
)
if
(
!
type
)
SalesEditorStore
.
setSalesEditor
(
0
)
slidesStore
.
setSlides
(
list
)
layoutsStore
.
setLayouts
([])
CoverImgStore
.
setCoverImg
(
null
)
setNewDatas
(
type
,
1
)
},
200
)
return
}
...
...
@@ -210,16 +195,45 @@ const goBack = (type:any) =>{
type
:
'warning'
,
}
).
then
(()
=>
{
searchData
.
value
.
TempId
=
0
if
(
type
)
marketStore
.
setMarket
(
true
)
if
(
!
type
)
SalesEditorStore
.
setSalesEditor
(
0
)
slidesStore
.
setSlides
(
list
)
slidesStore
.
setThumbnails
([])
layoutsStore
.
setLayouts
([])
CoverImgStore
.
setCoverImg
(
null
)
setNewDatas
(
type
,
0
)
}).
catch
(()
=>
{})
}
// 返回是否清空数据
const
setNewDatas
=
(
type
,
i
)
=>
{
let
list
=
[
{
id
:
'test-slide-1'
,
pageType
:
1
,
elements
:
[],
background
:
{
type
:
'solid'
,
color
:
'#ffffff'
,
},
}
]
if
(
type
)
{
marketStore
.
setMarket
(
true
)
if
(
model
.
value
==
2
)
{
if
(
searchData
.
value
.
TempId
)
searchData
.
value
.
TempId2
=
searchData
.
value
.
TempId
SalesBackStore
.
setSalesBack
(
1
)
}
}
else
{
searchData
.
value
.
TempId2
=
0
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
SalesBackStore
.
setSalesBack
(
0
)
SalesEditorStore
.
setSalesEditor
(
0
)
}
searchData
.
value
.
TempId
=
0
// i 1模版权限 0无模版权限
if
(
SalesBack
.
value
==
0
&&
model
.
value
!=
2
){
slidesStore
.
setSlides
(
list
)
if
(
!
i
)
slidesStore
.
setThumbnails
([])
layoutsStore
.
setLayouts
([])
CoverImgStore
.
setCoverImg
(
null
)
}
}
// 导入PSD
const
UploadPsdHandler
=
()
=>
{
psdVisibleStatus
.
value
=
true
...
...
@@ -383,6 +397,7 @@ const SetTripTemplateConfig = async () => {
}
// 保存
const
setTemplate
=
async
()
=>
{
queryObj
.
value
.
Title
=
title
.
value
datas
.
loading
=
true
if
(
SourceLoading
.
value
)
setNewDatasList
(
datas
.
DataSource
)
...
...
@@ -464,6 +479,7 @@ const startEditTitle = () => {
const
handleUpdateTitle
=
()
=>
{
slidesStore
.
setTitle
(
titleValue
.
value
)
editingTitle
.
value
=
false
queryObj
.
value
.
Title
=
titleValue
.
value
}
const
goLink
=
(
url
:
string
)
=>
{
...
...
src/views/Editor/Thumbnails/index.vue
View file @
c5c7aad3
...
...
@@ -51,7 +51,7 @@
<
script
lang=
"ts"
setup
>
import
{
computed
,
nextTick
,
ref
,
reactive
,
watch
,
inject
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
useMainStore
,
useSlidesStore
,
useKeyboardStore
,
useScreenStore
}
from
'@/store'
import
{
useMainStore
,
useSlidesStore
,
useKeyboardStore
,
useScreenStore
,
useSellTemplate
}
from
'@/store'
import
{
fillDigit
}
from
'@/utils/common'
import
{
isElementInViewport
}
from
'@/utils/element'
import
type
{
ContextmenuItem
}
from
'@/components/Contextmenu/types'
...
...
@@ -70,7 +70,6 @@ import Draggable from 'vuedraggable'
import
{
ElLoading
,
ElMessageBox
}
from
'element-plus'
import
FileService
from
'@/services/FileService'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
{
Slide
}
from
'@/types/slides'
const
mainStore
=
useMainStore
()
const
slidesStore
=
useSlidesStore
()
...
...
@@ -79,6 +78,7 @@ const keyboardStore = useKeyboardStore()
const
{
selectedSlidesIndex
:
_selectedSlidesIndex
,
thumbnailsFocus
}
=
storeToRefs
(
mainStore
)
const
{
slides
,
currentSlide
,
slideIndex
,
layoutSlides
}
=
storeToRefs
(
slidesStore
)
const
{
ctrlKeyState
,
shiftKeyState
}
=
storeToRefs
(
keyboardStore
)
const
{
SalesEditor
,
SalesBack
}
=
storeToRefs
(
useSellTemplate
())
const
{
slidesLoadLimit
}
=
useLoadSlides
()
const
TemplateTypeStore
=
useScreenStore
()
...
...
@@ -337,7 +337,8 @@ const ResolveTripDaysHandler = (items)=>{
// 获取行程模版数据
const
GetTripTemplate
=
async
()
=>
{
if
(
!
searchData
.
value
.
TempId
&&!
TempId
.
value
&&!
searchData
.
value
.
sellTempId
)
{
// console.log(searchData.value.TempId,searchData.value.TempId2,TempId.value,searchData.value.sellTempId)
if
(
!
searchData
.
value
.
TempId
&&!
searchData
.
value
.
TempId2
&&!
TempId
.
value
&&!
searchData
.
value
.
sellTempId
)
{
let
list
=
[
{
id
:
'test-slide-1'
,
...
...
@@ -349,6 +350,7 @@ const GetTripTemplate = async () =>{
},
}
]
slidesStore
.
setTitle
(
'模版名称'
)
return
slidesStore
.
setSlides
(
list
)
}
try
{
...
...
@@ -356,45 +358,48 @@ const GetTripTemplate = async () =>{
TempId
:
0
}
if
(
searchData
.
value
.
TempId
)
queryMsg
.
TempId
=
searchData
.
value
.
TempId
else
if
(
searchData
.
value
.
TempId2
&&!
searchData
.
value
.
TempId
)
queryMsg
.
TempId
=
searchData
.
value
.
TempId2
else
if
(
searchData
.
value
.
sellTempId
)
queryMsg
.
TempId
=
searchData
.
value
.
sellTempId
else
if
(
TempId
.
value
)
queryMsg
.
TempId
=
TempId
.
value
let
dataRes
=
await
ConfigService
.
GetTripTemplateSlide
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
let
viewportRatio
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
slidesStore
.
setViewportRatio
(
viewportRatio
)
if
(
SalesBack
.
value
==
0
||
(
SalesBack
.
value
==
1
&&
searchData
.
value
.
TempId
)){
let
viewportRatio
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
slidesStore
.
setViewportRatio
(
viewportRatio
)
let
SlidesData
=
JSON
.
parse
(
dataRes
.
data
.
data
.
TempData
)
let
newSlides
=
[]
if
(
typeof
SlidesData
==
'object'
&&!
SlidesData
.
length
){
let
obj
=
{
pageType
:
1
,
...
SlidesData
}
newSlides
.
push
(
obj
)
}
else
if
(
SlidesData
.
length
>
0
){
newSlides
=
SlidesData
}
newSlides
.
forEach
(
x
=>
{
x
.
elements
.
forEach
(
y
=>
{
if
(
x
.
pageType
!=
1
&&
y
.
TemplateDataSource
&&
y
.
TemplateDataSource
.
index
==
null
){
Reflect
.
set
(
y
.
TemplateDataSource
,
'index'
,
null
)
let
SlidesData
=
JSON
.
parse
(
dataRes
.
data
.
data
.
TempData
)
let
newSlides
=
[]
if
(
typeof
SlidesData
==
'object'
&&!
SlidesData
.
length
){
let
obj
=
{
pageType
:
1
,
...
SlidesData
}
newSlides
.
push
(
obj
)
}
else
if
(
SlidesData
.
length
>
0
){
newSlides
=
SlidesData
}
newSlides
.
forEach
(
x
=>
{
x
.
elements
.
forEach
(
y
=>
{
if
(
x
.
pageType
!=
1
&&
y
.
TemplateDataSource
&&
y
.
TemplateDataSource
.
index
==
null
){
Reflect
.
set
(
y
.
TemplateDataSource
,
'index'
,
null
)
}
})
})
})
console
.
log
(
newSlides
,
'=======模版数据newSlides'
)
if
(
ConfigId
.
value
>
0
){
newSlides
=
newSlides
.
filter
((
x
:
Slide
)
=>!
x
.
isTripItems
)
console
.
log
(
newSlides
,
'=======模版数据newSlides'
)
slidesStore
.
setSlides
(
newSlides
)
layoutsStore
.
setLayouts
(
JSON
.
parse
(
JSON
.
stringify
(
newSlides
)))
CoverImgStore
.
setCoverImg
(
dataRes
.
data
.
data
.
CoverImg
)
slidesStore
.
updateSlideIndex
(
0
)
datas
.
DataSource
.
pageType
=
newSlides
[
0
].
pageType
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
}
slidesStore
.
setSlides
(
newSlides
)
layoutsStore
.
setLayouts
(
JSON
.
parse
(
JSON
.
stringify
(
newSlides
)))
CoverImgStore
.
setCoverImg
(
dataRes
.
data
.
data
.
CoverImg
)
queryObj
.
value
.
TempId
=
dataRes
.
data
.
data
.
TempId
queryObj
.
value
.
LineId
=
dataRes
.
data
.
data
.
LineId
queryObj
.
value
.
LineName
=
dataRes
.
data
.
data
.
LineName
queryObj
.
value
.
LtId
=
dataRes
.
data
.
data
.
LtId
queryObj
.
value
.
Title
=
dataRes
.
data
.
data
.
Title
queryObj
.
value
.
TempData
=
dataRes
.
data
.
data
.
TempData
queryObj
.
value
.
CoverImg
=
dataRes
.
data
.
data
.
CoverImg
queryObj
.
value
.
CountryName
=
dataRes
.
data
.
data
.
CountryName
...
...
@@ -402,8 +407,8 @@ const GetTripTemplate = async () =>{
queryObj
.
value
.
ColorName
=
dataRes
.
data
.
data
.
ColorName
queryObj
.
value
.
ColorStr
=
dataRes
.
data
.
data
.
ColorStr
queryObj
.
value
.
TempType
=
dataRes
.
data
.
data
.
TempType
slidesStore
.
updateSlideIndex
(
0
)
datas
.
DataSource
.
pageType
=
newSlides
[
0
].
pageType
if
(
searchData
.
value
.
sellId
)
sellGetTripTemplate
()
if
(
ConfigId
.
value
==
0
)
return
if
(
TempId
.
value
&&!
searchData
.
value
.
TempId
)
await
GetTripConfig
()
...
...
@@ -425,8 +430,8 @@ const sellGetTripTemplate = async () =>{
let
dataRes
=
await
ConfigService
.
sellGetTemplateDetails
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
let
dataObj
=
dataRes
.
data
.
data
queryObj
.
value
.
Title
=
dataRes
.
data
.
data
.
Title
if
(
!
searchData
.
value
.
TempId
){
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
&&
searchData
.
value
.
sell
TempId
){
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
newSlides
=
[]
await
SlidesData
.
forEach
((
x
,
i
)
=>
{
...
...
@@ -627,7 +632,6 @@ const contextmenusThumbnailItem = (): ContextmenuItem[] => {
},
]
}
GetTripTemplate
()
</
script
>
...
...
src/views/Editor/Toolbar/ElementTemplateData.vue
View file @
c5c7aad3
...
...
@@ -37,7 +37,8 @@
<p
class=
"q-mt-md"
><span
class=
"Required q-mr-md"
>
*
</span>
模版名称:
</p>
<div
class=
"row wrap q-mt-md"
>
<el-input
v-model=
"queryObj.Title"
placeholder=
"输入模板名称"
class=
"input-with-select"
></el-input>
<el-input
v-model=
"titleValue"
@
blur=
"handleUpdateTitle()"
placeholder=
"输入模板名称"
class=
"input-with-select"
></el-input>
</div>
<p
class=
"q-mt-md"
><span
class=
"Required q-mr-md"
>
*
</span>
国家:
</p>
<div
class=
"row wrap q-mt-md"
>
...
...
@@ -237,8 +238,9 @@
}
const
slidesStore
=
useSlidesStore
()
const
{
slides
,
slideIndex
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
{
title
,
slides
,
slideIndex
,
viewportRatio
}
=
storeToRefs
(
slidesStore
)
const
titleValue
=
ref
(
''
)
titleValue
.
value
=
title
.
value
const
coverImgStore
=
useScreenStore
()
const
isCoverImgStore
=
useScreenStore
()
const
{
model
,
ConfigId
,
TemplateDataSource
,
TemplateType
,
CoverImg
,
isCoverImg
,
TempId
,
SourceLoading
}
=
storeToRefs
(
useScreenStore
())
...
...
@@ -254,6 +256,11 @@
})
const
handleUpdateTitle
=
()
=>
{
slidesStore
.
setTitle
(
titleValue
.
value
)
queryObj
.
value
.
Title
=
titleValue
.
value
}
const
CancelAddColor
=
()
=>
{
datas
.
addColorsShow
=
false
datas
.
addColor
=
{
...
...
src/views/Market/Index.vue
View file @
c5c7aad3
...
...
@@ -18,7 +18,7 @@
size=
"small"
icon=
"Plus"
@
click=
"addTemplate()"
style=
"color: #ffff;"
></el-button>
<el-button
v-if=
"SalesEditor>0"
v-tooltip=
"'返回到首页'"
type=
"primary"
v-tooltip=
"
SalesBack==1?'返回到上页':
'返回到首页'"
type=
"primary"
size=
"small"
@
click=
"CloseTemplate()"
style=
"color: #ffff;"
>
返回
<el-icon
class=
"el-icon--right"
><ArrowRightBold
/></el-icon>
...
...
@@ -34,7 +34,7 @@
class=
"text-small q-mr-md"
v-for=
"x in lines"
:key=
"x.LineID"
>
{{x.LineName}}
</el-check-tag>
</div>
<el-divider
style=
"margin:12px 0;border-top-color:#f3f6fb;"
></el-divider>
<div
class=
"row wrap q-pb-md"
>
<div
class=
"row wrap
items-center
q-pb-md"
>
<div
class=
"q-pb-md"
>
<div
class=
"row text-small items-center wrap"
>
<span
style=
"margin-right: 50px;"
>
适用国家:
</span>
...
...
@@ -43,6 +43,29 @@
<el-check-tag
:checked=
"queryObj.CountryName == x.CountryName"
@
change=
"onCountryNameChangeHandler(x.CountryName)"
class=
"text-small q-mr-md"
v-for=
"(x,i) in countries"
:key=
"i"
>
{{x.CountryName}}
</el-check-tag>
<Popover
v-if=
"colorArrOther.length>0"
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"MenuCountryVisible"
>
<
template
#
content
>
<el-check-tag
:checked=
"queryObj.CountryName == x.CountryName"
@
change=
"onCountryNameChangeHandler(x.CountryName,1),MenuCountryVisible=false"
class=
"text-small q-mr-md"
v-for=
"(x,i) in countriesOther"
:key=
"i"
>
{{
x
.
CountryName
}}
</el-check-tag>
</
template
>
<div
class=
"row items-center"
>
<div
v-if=
"CountryOtherName"
>
<el-check-tag
:checked=
"queryObj.CountryName"
class=
"text-small q-mr-md"
>
{{queryObj.CountryName}}
</el-check-tag>
</div>
<el-check-tag
:checked=
"CountryOtherName"
class=
"text-small q-mr-md q-ml-sm"
>
<el-icon
class=
"pointer"
v-if=
"!MenuCountryVisible"
>
<ArrowDownBold
@
click=
"MenuCountryVisible = false"
/>
</el-icon>
<el-icon
class=
"pointer"
v-else
>
<ArrowUpBold
@
click=
"MenuCountryVisible = true"
/>
</el-icon>
</el-check-tag>
</div>
</Popover>
</div>
</div>
<div
class=
"q-pb-md"
>
...
...
@@ -89,7 +112,7 @@
<div
class=
"colorMark reactive"
:style=
"
{'background':x.ColorValue,'border-color':x.ColorName==queryObj.ColorName?'black':'#eee'}">
<div
class=
"absolute ColorNameBox"
>
<span
class=
"ColorName"
>
{{
x
.
ColorName
}}
</span>
<span
class=
"ColorName"
style=
"white-space: nowrap;"
>
{{
x
.
ColorName
}}
</span>
<span
class=
"ColorNameBJ"
></span>
</div>
</div>
...
...
@@ -178,7 +201,7 @@
import
LineService
from
'@/services/LineService'
import
ConfigService
from
'@/services/ConfigService'
import
{
userStore
}
from
"@/store/user"
;
import
{
useSlidesStore
,
useSellTemplate
}
from
'@/store'
import
{
useSlidesStore
,
useSellTemplate
}
from
'@/store'
import
{
useScreenStore
}
from
"@/store/screen"
;
import
{
storeToRefs
}
from
"pinia"
;
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
...
...
@@ -191,6 +214,7 @@
userInfo
}
=
storeToRefs
(
userStore
())
const
lines
=
ref
([]
as
Array
<
any
>
)
//线路
const
countriesOther
=
ref
([
'日本'
,
'韩国'
,
'老挝'
,
'法国'
,
'意大利'
]
as
Array
<
any
>
)
//国家
const
countries
=
ref
([
'日本'
,
'韩国'
,
'老挝'
,
'法国'
,
'意大利'
]
as
Array
<
any
>
)
//国家
const
colorArrOther
=
ref
([]
as
Array
<
any
>
);
//颜色
const
colorArr
=
ref
([]
as
Array
<
any
>
);
//颜色
...
...
@@ -198,6 +222,8 @@
const
dataList
=
ref
([]
as
Array
<
any
>
);
//模板数据列表
const
marketRef
=
ref
<
any
>
()
const
MenuColorVisible
=
ref
(
false
)
const
MenuCountryVisible
=
ref
(
false
)
const
CountryOtherName
=
ref
(
false
)
const
currentPage
=
ref
(
1
as
Number
);
const
showCurrentTemplate
=
ref
<
any
>
()
...
...
@@ -230,7 +256,7 @@
const
{
screening
,
market
,
model
,
isModel
,
ConfigId
,
TempId
}
=
storeToRefs
(
useScreenStore
())
const
SalesEditorStore
=
useSellTemplate
()
const
{
SalesEditor
}
=
storeToRefs
(
useSellTemplate
())
const
{
SalesEditor
,
SalesBack
}
=
storeToRefs
(
useSellTemplate
())
const
addTemplate
=
()
=>
{
marketStore
.
setMarket
(
!
market
)
...
...
@@ -238,7 +264,11 @@
}
const
CloseTemplate
=
()
=>
{
SalesEditorStore
.
setSalesEditor
(
0
)
if
(
SalesBack
.
value
==
1
){
marketStore
.
setMarket
(
false
)
SalesEditorStore
.
setSalesEditor
(
SalesEditor
.
value
)
}
else
SalesEditorStore
.
setSalesEditor
(
0
)
}
// 删除模版
const
deleteTemplate
=
(
item
:
any
)
=>
{
...
...
@@ -334,7 +364,9 @@
queryTemplateBySearchHandler
();
}
//国家切换
const
onCountryNameChangeHandler
=
(
CountryName
:
string
)
=>
{
const
onCountryNameChangeHandler
=
(
CountryName
:
string
,
type
:
Number
)
=>
{
if
(
type
)
CountryOtherName
.
value
=
true
else
CountryOtherName
.
value
=
false
queryObj
.
CountryName
=
CountryName
;
queryObj
.
pageIndex
=
1
queryTemplateBySearchHandler
();
...
...
@@ -381,18 +413,13 @@
var
tempData
=
res
.
data
.
data
;
//国家
if
(
tempData
&&
tempData
.
CountryList
)
{
countries
.
value
=
tempData
.
CountryList
;
countriesOther
.
value
=
tempData
.
CountryList
.
filter
((
x
,
index
)
=>
{
return
index
>=
3
})
countries
.
value
=
tempData
.
CountryList
.
filter
((
x
,
index
)
=>
{
return
index
<
3
})
}
//颜色
if
(
tempData
&&
tempData
.
ColorList
)
{
let
arrList
=
function
(
list
){
list
.
forEach
(
x
=>
{
x
.
Visible
=
false
});
}
arrList
(
tempData
.
ColorList
)
colorArrOther
.
value
=
tempData
.
ColorList
.
filter
((
x
,
index
)
=>
{
return
index
>=
6
})
colorArr
.
value
=
tempData
.
ColorList
.
filter
((
x
,
index
)
=>
{
return
index
<
6
})
colorArrOther
.
value
=
tempData
.
ColorList
.
filter
((
x
,
index
)
=>
{
return
index
>=
3
})
colorArr
.
value
=
tempData
.
ColorList
.
filter
((
x
,
index
)
=>
{
return
index
<
3
})
}
//季节
if
(
tempData
&&
tempData
.
SeasonList
)
{
...
...
@@ -438,7 +465,7 @@
display
:
block
;
}
.ColorNameBox
{
width
:
100px
;
width
:
0
;
display
:
none
;
left
:
0
;
top
:
-30px
;
...
...
src/views/SellTemplate/SellTemplate.vue
View file @
c5c7aad3
...
...
@@ -14,7 +14,7 @@
<div
style=
"margin-top: 20px;"
>
<div
v-if=
"dataList.length>0"
class=
"column"
>
<div
class=
"row flex-between nowrap sellHeader"
>
<div>
PDF
名称
</div>
<div>
名称
</div>
<div>
创建人
</div>
<div>
更新时间
</div>
<div>
操作
</div>
...
...
@@ -52,7 +52,7 @@
<el-empty
description=
"暂无数据"
/>
</div>
<el-divider
class=
"no-bg q-mt-lg"
v-if=
'queryObj.pageCount == queryObj.pageIndex && !loading'
>
<span
class=
"text-samll
"
style=
"background: #f3f6fb;
padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
<span
class=
"text-samll
bg-white"
style=
"
padding: 0 10px;color:#a3a3a3"
>
已加载完成所有数据
</span>
</el-divider>
<div
style=
"height:40px;"
class=
"q-mt-md no-bg"
background=
"transparent"
v-loading=
"loading"
element-loading-text=
"正在加载中"
></div>
</div>
...
...
src/views/SellTemplate/index.vue
View file @
c5c7aad3
...
...
@@ -2,11 +2,11 @@
<div
class=
"common-layout"
style=
"background: #f3f6fb;height:100vh;overflow: auto;"
>
<div
style=
"padding: 30px; max-width:1440px; margin:0 auto;height: 100%;"
>
<el-container
class=
"SellTemplate-form bg-white"
>
<el-aside
width=
"200px"
style=
"background: #F5F5F5;"
>
<el-aside
width=
"200px"
>
<sellNavs
/>
</el-aside>
<el-container>
<el-main>
<el-main
class=
"bg-white rounded-bottom rounded-top"
>
<SellTemplate
/>
</el-main>
</el-container>
...
...
@@ -30,7 +30,7 @@
<
style
lang=
"scss"
scoped
>
.SellTemplate-form
{
height
:
100%
;
b
order-radius
:
5px
;
b
ackground
:
none
;
}
</
style
>
\ No newline at end of file
src/views/components/sellNavs/index.vue
View file @
c5c7aad3
<
template
>
<div
class=
"navs-form"
>
<el-button
class=
"navs-Button"
type=
"primary"
@
click=
"sellAdd(1)"
>
+ 新建
<span
style=
"font-size: 23px;margin-right: 10px;"
>
+
</span>
<span>
新建
</span>
</el-button>
<div
class=
"q-mt-lg"
>
<div
v-for=
"(item,index) in datas.navs"
class=
"q-mb-md"
>
...
...
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