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
5e5d4f2a
Commit
5e5d4f2a
authored
Jan 04, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
广告 功能
parent
a3602cc7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
180 additions
and
104 deletions
+180
-104
Index.vue
src/components/PSD/Index.vue
+3
-0
index.vue
src/views/Editor/EditorHeader/index.vue
+15
-13
index.vue
src/views/Editor/Thumbnails/index.vue
+22
-11
SlideDesignPanel.vue
src/views/Editor/Toolbar/SlideDesignPanel.vue
+30
-26
index.vue
src/views/Editor/index.vue
+6
-2
Index.vue
src/views/Market/Index.vue
+57
-35
SellTemplate.vue
src/views/SellTemplate/SellTemplate.vue
+43
-13
index.vue
src/views/components/sellNavs/index.vue
+4
-4
No files found.
src/components/PSD/Index.vue
View file @
5e5d4f2a
...
@@ -124,6 +124,9 @@ const handleChange: UploadProps['onChange'] = (uploadFile, uploadFiles) => {
...
@@ -124,6 +124,9 @@ const handleChange: UploadProps['onChange'] = (uploadFile, uploadFiles) => {
let
DrawingBoardSize
=
await
getDrawingBoardSize
(
psd
)
let
DrawingBoardSize
=
await
getDrawingBoardSize
(
psd
)
queryObj
.
value
.
Width
=
DrawingBoardSize
.
Width
queryObj
.
value
.
Width
=
DrawingBoardSize
.
Width
queryObj
.
value
.
Height
=
DrawingBoardSize
.
Height
queryObj
.
value
.
Height
=
DrawingBoardSize
.
Height
queryObj
.
value
.
TempType
=
queryObj
.
value
.
Width
>
queryObj
.
value
.
Height
?
1
:
2
let
viewportRatio
=
queryObj
.
value
.
Height
/
queryObj
.
value
.
Width
useSlidesStore
().
setViewportRatio
(
viewportRatio
)
}
}
fonts
.
value
=
getFonts
(
psd
)
fonts
.
value
=
getFonts
(
psd
)
if
(
fonts
.
value
){
if
(
fonts
.
value
){
...
...
src/views/Editor/EditorHeader/index.vue
View file @
5e5d4f2a
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
@
click=
"setTemplate"
style=
"color: #ffff;margin-left: 10px;"
>
@
click=
"setTemplate"
style=
"color: #ffff;margin-left: 10px;"
>
<
template
v-if=
"userInfo.IsEditTripTemplate==1&&model==1"
>
<
template
v-if=
"userInfo.IsEditTripTemplate==1&&model==1"
>
{{
searchData
.
TemplateType
!=
2
?
'保存模板'
:
'保存
广告'
}}
保存
{{
searchData
.
TemplateType
!=
2
?
'模板'
:
'
广告'
}}
</
template
>
</
template
>
<
template
v-if=
"ConfigId>0&&model!=2"
>
<
template
v-if=
"ConfigId>0&&model!=2"
>
保存行程
保存行程
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
style=
"color: #ffff;"
style=
"color: #ffff;"
@
click=
"setTemplate(0)"
>
@
click=
"setTemplate(0)"
>
保存
模板
保存
{{
searchData
.
TemplateType
!=
2
?
'模板'
:
'广告'
}}
</el-button>
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<el-dropdown-item>
<el-dropdown-item>
...
@@ -103,7 +103,7 @@
...
@@ -103,7 +103,7 @@
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
style=
"color: #ffff;"
style=
"color: #ffff;"
@
click=
"setTemplate(1)"
>
@
click=
"setTemplate(1)"
>
另存
模板
另存
{{
searchData
.
TemplateType
!=
2
?
'模板'
:
'广告'
}}
</el-button>
</el-button>
</el-dropdown-item>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
style=
"color: #ffff;margin-left: 10px;"
style=
"color: #ffff;margin-left: 10px;"
@
click=
"setTemplate(0)"
>
@
click=
"setTemplate(0)"
>
保存
模板
保存
{{searchData.TemplateType!=2?'模板':'广告'}}
</el-button>
</el-button>
</template>
</template>
...
@@ -282,7 +282,7 @@ const SetSellTemplate = async (type) => {
...
@@ -282,7 +282,7 @@ const SetSellTemplate = async (type) => {
if
(
!
TempId
){
if
(
!
TempId
){
return
ElMessage
({
return
ElMessage
({
showClose
:
true
,
showClose
:
true
,
message
:
'模版不存在, 请重选'
,
message
:
`
${
queryObj
.
value
.
TemplateType
==
2
?
'广告'
:
'模版'
}
不存在, 请重选`
,
type
:
'warning'
,
type
:
'warning'
,
})
})
}
}
...
@@ -293,7 +293,13 @@ const SetSellTemplate = async (type) => {
...
@@ -293,7 +293,13 @@ const SetSellTemplate = async (type) => {
Id
:
Id
,
Id
:
Id
,
TempId
:
TempId
,
TempId
:
TempId
,
TempData
:
queryObj
.
value
.
TempData
,
TempData
:
queryObj
.
value
.
TempData
,
Title
:
queryObj
.
value
.
Title
Title
:
queryObj
.
value
.
Title
,
OWidth
:
0
,
OHeight
:
0
,
}
if
(
queryObj
.
value
.
TemplateType
==
2
){
queryMsg
.
OWidth
=
queryObj
.
value
.
Width
queryMsg
.
OHeight
=
queryObj
.
value
.
Height
}
}
let
TemplateRes
=
await
ConfigService
.
sellSetTemplate
(
queryMsg
);
let
TemplateRes
=
await
ConfigService
.
sellSetTemplate
(
queryMsg
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
...
@@ -320,8 +326,6 @@ const SetSellTemplate = async (type) => {
...
@@ -320,8 +326,6 @@ const SetSellTemplate = async (type) => {
// 新增修改模版
// 新增修改模版
const
SetTripTemplateSlide
=
async
()
=>
{
const
SetTripTemplateSlide
=
async
()
=>
{
try
{
try
{
console
.
log
(
queryObj
.
value
,
'======'
)
return
let
TemplateRes
=
await
ConfigService
.
SetTripTemplateSlide
(
queryObj
.
value
);
let
TemplateRes
=
await
ConfigService
.
SetTripTemplateSlide
(
queryObj
.
value
);
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
TemplateRes
.
data
.
resultCode
==
1
)
{
if
(
!
queryObj
.
value
.
TempId
){
if
(
!
queryObj
.
value
.
TempId
){
...
@@ -450,7 +454,6 @@ const SetTripTemplateConfig = async () => {
...
@@ -450,7 +454,6 @@ const SetTripTemplateConfig = async () => {
}
}
// 保存
// 保存
const
setTemplate
=
async
(
type
)
=>
{
const
setTemplate
=
async
(
type
)
=>
{
if
(
searchData
.
value
.
TemplateType
)
queryObj
.
value
.
TemplateType
=
searchData
.
value
.
TemplateType
queryObj
.
value
.
Title
=
title
.
value
queryObj
.
value
.
Title
=
title
.
value
datas
.
loading
=
true
datas
.
loading
=
true
if
(
SourceLoading
.
value
)
setNewDatasList
(
datas
.
DataSource
)
if
(
SourceLoading
.
value
)
setNewDatasList
(
datas
.
DataSource
)
...
@@ -474,7 +477,7 @@ const setTemplate = async (type) =>{
...
@@ -474,7 +477,7 @@ const setTemplate = async (type) =>{
message
:
'请生成封面图'
,
message
:
'请生成封面图'
,
type
:
'warning'
,
type
:
'warning'
,
})
})
}
else
if
(
queryObj
.
value
.
CoverImg
==
''
&&
CoverImg
.
value
.
startsWith
(
"data:image"
)){
}
else
if
(
queryObj
.
value
.
CoverImg
==
''
&&
CoverImg
.
value
&&
CoverImg
.
value
.
startsWith
(
"data:image"
)){
let
name
=
new
Date
().
getTime
()
+
".jpg"
let
name
=
new
Date
().
getTime
()
+
".jpg"
const
file
=
dataURLtoFile
(
CoverImg
.
value
,
name
)
const
file
=
dataURLtoFile
(
CoverImg
.
value
,
name
)
let
url
=
await
AliyunUpload
.
UploadAsync
(
file
,
`Feature/CoverImg_
${
name
}
`
)
let
url
=
await
AliyunUpload
.
UploadAsync
(
file
,
`Feature/CoverImg_
${
name
}
`
)
...
@@ -511,15 +514,14 @@ const setTemplate = async (type) =>{
...
@@ -511,15 +514,14 @@ const setTemplate = async (type) =>{
})
})
}
}
}
}
// console.log(arr,'-------tttt')
queryObj
.
value
.
TempData
=
JSON
.
stringify
(
arr
)
queryObj
.
value
.
TempData
=
JSON
.
stringify
(
arr
)
// console.log(JSON.stringify(queryObj.value))
if
(
model
.
value
==
1
&&
userInfo
.
value
.
IsEditTripTemplate
==
1
){
if
(
model
.
value
==
1
&&
userInfo
.
value
.
IsEditTripTemplate
==
1
){
await
SetTripTemplateSlide
()
await
SetTripTemplateSlide
()
}
else
if
(
ConfigId
.
value
&&
model
.
value
!=
2
){
}
else
if
(
ConfigId
.
value
&&
model
.
value
!=
2
){
await
SetTripTemplateConfig
()
await
SetTripTemplateConfig
()
}
else
if
(
model
.
value
==
2
&&
SalesEditor
.
value
>
0
&&
(
SalesEditor
.
value
==
1
||
SalesEditor
.
value
==
2
)
){
}
else
if
(
model
.
value
==
2
&&
SalesEditor
.
value
>
0
){
await
SetSellTemplate
(
type
)
await
SetSellTemplate
(
type
)
}
}
}
}
...
...
src/views/Editor/Thumbnails/index.vue
View file @
5e5d4f2a
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
v-click-outside=
"() => setThumbnailsFocus(false)"
v-click-outside=
"() => setThumbnailsFocus(false)"
v-contextmenu=
"contextmenusThumbnails"
v-contextmenu=
"contextmenusThumbnails"
>
>
<div
class=
"add-slide"
>
<div
class=
"add-slide"
v-if=
"queryObj.TemplateType!=2"
>
<div
class=
"btn"
@
click=
"createSlide()"
><IconPlus
class=
"icon"
/>
添加幻灯片
</div>
<div
class=
"btn"
@
click=
"createSlide()"
><IconPlus
class=
"icon"
/>
添加幻灯片
</div>
<Popover
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"presetLayoutPopoverVisible"
center
>
<Popover
trigger=
"click"
placement=
"bottom-start"
v-model:value=
"presetLayoutPopoverVisible"
center
>
<template
#
content
>
<template
#
content
>
<LayoutPool
@
select=
"slide =>
{ createSlideByTemplate(slide); presetLayoutPopoverVisible = false }" />
<LayoutPool
@
select=
"slide =>
{ createSlideByTemplate(slide); presetLayoutPopoverVisible = false }" />
</
template
>
</
template
>
<div
class=
"select-btn"
v-if=
"layoutSlides.length>0"
><IconDown
/></div>
<div
class=
"select-btn"
v-if=
"layoutSlides.length>0"
><IconDown
/></div>
</Popover>
</Popover>
</div>
</div>
<Draggable
<Draggable
...
@@ -147,7 +147,6 @@ queryObj.value = inject(injectKeyDataSource).queryObj
...
@@ -147,7 +147,6 @@ queryObj.value = inject(injectKeyDataSource).queryObj
* 行程保存成功获取行程详情
* 行程保存成功获取行程详情
*/
*/
const
GetTripConfig
=
async
()
=>
{
const
GetTripConfig
=
async
()
=>
{
console
.
log
(
'行程详情--------'
)
try
{
try
{
let
queryMsg
=
{
let
queryMsg
=
{
ConfigId
:
ConfigId
.
value
ConfigId
:
ConfigId
.
value
...
@@ -390,7 +389,11 @@ const GetTripTemplate = async () =>{
...
@@ -390,7 +389,11 @@ const GetTripTemplate = async () =>{
if
(
SalesBack
.
value
==
0
||
(
SalesBack
.
value
==
1
&&
searchData
.
value
.
TempId
)){
if
(
SalesBack
.
value
==
0
||
(
SalesBack
.
value
==
1
&&
searchData
.
value
.
TempId
)){
let
viewportRatio
=
1.414
let
viewportRatio
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
viewportRatio
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
if
(
dataRes
.
data
.
data
.
TemplateType
==
2
&&
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
{
viewportRatio
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
queryObj
.
value
.
Width
=
dataRes
.
data
.
data
.
Width
queryObj
.
value
.
Height
=
dataRes
.
data
.
data
.
Height
}
slidesStore
.
setViewportRatio
(
viewportRatio
)
slidesStore
.
setViewportRatio
(
viewportRatio
)
let
SlidesData
=
JSON
.
parse
(
dataRes
.
data
.
data
.
TempData
)
let
SlidesData
=
JSON
.
parse
(
dataRes
.
data
.
data
.
TempData
)
...
@@ -434,6 +437,7 @@ const GetTripTemplate = async () =>{
...
@@ -434,6 +437,7 @@ const GetTripTemplate = async () =>{
queryObj
.
value
.
ColorName
=
dataRes
.
data
.
data
.
ColorName
queryObj
.
value
.
ColorName
=
dataRes
.
data
.
data
.
ColorName
queryObj
.
value
.
ColorStr
=
dataRes
.
data
.
data
.
ColorStr
queryObj
.
value
.
ColorStr
=
dataRes
.
data
.
data
.
ColorStr
queryObj
.
value
.
TempType
=
dataRes
.
data
.
data
.
TempType
queryObj
.
value
.
TempType
=
dataRes
.
data
.
data
.
TempType
queryObj
.
value
.
TemplateType
=
dataRes
.
data
.
data
.
TemplateType
...
@@ -466,8 +470,12 @@ const sellGetTripTemplate = async () =>{
...
@@ -466,8 +470,12 @@ const sellGetTripTemplate = async () =>{
let
dataObj
=
dataRes
.
data
.
data
let
dataObj
=
dataRes
.
data
.
data
let
viewportRatio
=
1.414
let
viewportRatio
=
1.414
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataRes
.
data
.
data
.
TempType
==
1
)
viewportRatio
=
0.7069
if
(
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
viewportRatio
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
if
(
dataRes
.
data
.
data
.
TemplateType
==
2
&&
dataRes
.
data
.
data
.
Width
&&
dataRes
.
data
.
data
.
Height
)
{
viewportRatio
=
dataRes
.
data
.
data
.
Height
/
dataRes
.
data
.
data
.
Width
}
queryObj
.
value
.
TemplateType
=
dataRes
.
data
.
data
.
TemplateType
slidesStore
.
setViewportRatio
(
viewportRatio
)
slidesStore
.
setViewportRatio
(
viewportRatio
)
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
&&
searchData
.
value
.
sellId
){
if
(
SalesBack
.
value
==
0
&&
searchData
.
value
.
sellId
){
console
.
log
(
JSON
.
parse
(
dataObj
.
TempData
))
console
.
log
(
JSON
.
parse
(
dataObj
.
TempData
))
...
@@ -721,6 +729,9 @@ else GetTripTemplate()
...
@@ -721,6 +729,9 @@ else GetTripTemplate()
font-size
:
14px
;
font-size
:
14px
;
}
}
}
}
.add-slide.borderBottom0
{
border-bottom
:
0
;
}
.thumbnail-list
{
.thumbnail-list
{
padding
:
5px
0
;
padding
:
5px
0
;
flex
:
1
;
flex
:
1
;
...
...
src/views/Editor/Toolbar/SlideDesignPanel.vue
View file @
5e5d4f2a
...
@@ -99,32 +99,34 @@
...
@@ -99,32 +99,34 @@
<div
class=
"row"
>
<div
class=
"row"
>
<Button
style=
"flex: 1;"
@
click=
"applyBackgroundAllSlide()"
>
应用背景到全部
</Button>
<Button
style=
"flex: 1;"
@
click=
"applyBackgroundAllSlide()"
>
应用背景到全部
</Button>
</div>
</div>
<
template
v-if=
"queryObj.TemplateType!=2"
>
<Divider
/>
<Divider
/>
<div
class=
"row"
>
<div
class=
"row"
>
<div
style=
"width: 40%;"
>
画布尺寸:
</div>
<div
style=
"width: 40%;"
>
画布尺寸:
</div>
<!-- <Select
<!--
<Select
style="width: 60%;"
style=
"width: 60%;"
:value="viewportRatio"
:value=
"viewportRatio"
@update:value="value => updateViewportRatio(value as number)"
@
update:value=
"value => updateViewportRatio(value as number)"
:options="[
:options=
"[
{ label: '宽屏 16 : 9', value: 0.5625 },
{ label: '宽屏 16 : 9', value: 0.5625 },
{ label: '宽屏 16 : 10', value: 0.625 },
{ label: '宽屏 16 : 10', value: 0.625 },
{ label: '标准 4 : 3', value: 0.75 },
{ label: '标准 4 : 3', value: 0.75 },
{ label: '纸张 A3 / A4', value: 0.70710678 },
{ label: '纸张 A3 / A4', value: 0.70710678 },
]"
]"
/> -->
/> -->
<Select
<Select
style=
"width: 60%;"
style=
"width: 60%;"
:value=
"viewportRatio"
:value=
"viewportRatio"
@
update:value=
"value => updateViewportRatio(value as number)"
@
update:value=
"value => updateViewportRatio(value as number)"
:options=
"[
:options=
"[
{ label: '横屏', value: 0.7069 },
{ label: '横屏', value: 0.7069 },
{ label: '竖屏', value: 1.414 },
{ label: '竖屏', value: 1.414 },
]"
]"
/>
/>
</div>
</div>
</
template
>
<Divider
/>
<Divider
/>
...
@@ -309,7 +311,7 @@ import { WEB_FONTS } from '@/configs/font'
...
@@ -309,7 +311,7 @@ import { WEB_FONTS } from '@/configs/font'
import
useHistorySnapshot
from
'@/hooks/useHistorySnapshot'
import
useHistorySnapshot
from
'@/hooks/useHistorySnapshot'
import
useSlideTheme
from
'@/hooks/useSlideTheme'
import
useSlideTheme
from
'@/hooks/useSlideTheme'
import
{
getImageDataURL
}
from
'@/utils/image'
import
{
getImageDataURL
}
from
'@/utils/image'
import
{
injectKeyDataSource
}
from
'@/types/injectKey'
import
{
injectKeyDataSource
,
injectKeyTemplate
}
from
'@/types/injectKey'
import
ColorButton
from
'./common/ColorButton.vue'
import
ColorButton
from
'./common/ColorButton.vue'
import
FileInput
from
'@/components/FileInput.vue'
import
FileInput
from
'@/components/FileInput.vue'
...
@@ -329,6 +331,8 @@ const datas = reactive({
...
@@ -329,6 +331,8 @@ const datas = reactive({
const
queryObj
=
ref
({}
as
any
)
const
queryObj
=
ref
({}
as
any
)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
datas
.
DataSource
=
inject
(
injectKeyDataSource
)
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
queryObj
.
value
=
inject
(
injectKeyDataSource
).
queryObj
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
const
slidesStore
=
useSlidesStore
()
const
slidesStore
=
useSlidesStore
()
const
{
availableFonts
}
=
storeToRefs
(
useMainStore
())
const
{
availableFonts
}
=
storeToRefs
(
useMainStore
())
const
{
slides
,
currentSlide
,
viewportRatio
,
theme
,
slideIndex
}
=
storeToRefs
(
slidesStore
)
const
{
slides
,
currentSlide
,
viewportRatio
,
theme
,
slideIndex
}
=
storeToRefs
(
slidesStore
)
...
...
src/views/Editor/index.vue
View file @
5e5d4f2a
...
@@ -87,8 +87,11 @@ searchData.value = inject(injectKeyTemplate)
...
@@ -87,8 +87,11 @@ searchData.value = inject(injectKeyTemplate)
let
TempIds
=
0
let
TempIds
=
0
let
TemplatesType
=
0
if
(
searchData
.
value
.
TempId
)
TempIds
=
searchData
.
value
.
TempId
if
(
searchData
.
value
.
TempId
)
TempIds
=
searchData
.
value
.
TempId
else
if
(
TempId
.
value
)
TempIds
=
TempId
.
value
else
if
(
TempId
.
value
)
TempIds
=
TempId
.
value
if
(
searchData
.
value
.
TemplateType
)
TemplatesType
=
searchData
.
value
.
TemplateType
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
=
ref
(
""
)
param
.
value
=
query
()
param
.
value
=
query
()
...
@@ -113,7 +116,7 @@ const datas = reactive({
...
@@ -113,7 +116,7 @@ const datas = reactive({
ColorStr
:
null
,
//颜色值 是 [string]
ColorStr
:
null
,
//颜色值 是 [string]
TempType
:
1
,
// 版面类型(1-横版,2-竖版)
TempType
:
1
,
// 版面类型(1-横版,2-竖版)
TagJsonStr
:
''
,
// 标签
TagJsonStr
:
''
,
// 标签
TemplateType
:
0
,
TemplateType
:
TemplatesType
,
// 1行程模版 2广告模版
Width
:
0
,
Width
:
0
,
Height
:
0
,
Height
:
0
,
}
}
...
@@ -162,7 +165,8 @@ const GetTripFiled = async () =>{
...
@@ -162,7 +165,8 @@ const GetTripFiled = async () =>{
console
.
log
(
"TemplateGetTripFiled"
,
error
);
console
.
log
(
"TemplateGetTripFiled"
,
error
);
}
}
}
}
GetTripFiled
()
if
(
searchData
.
value
.
TemplateType
!=
2
)
GetTripFiled
()
const
mainStore
=
useMainStore
()
const
mainStore
=
useMainStore
()
const
{
dialogForExport
,
showSelectPanel
,
showSearchPanel
}
=
storeToRefs
(
mainStore
)
const
{
dialogForExport
,
showSelectPanel
,
showSearchPanel
}
=
storeToRefs
(
mainStore
)
...
...
src/views/Market/Index.vue
View file @
5e5d4f2a
This diff is collapsed.
Click to expand it.
src/views/SellTemplate/SellTemplate.vue
View file @
5e5d4f2a
...
@@ -2,19 +2,24 @@
...
@@ -2,19 +2,24 @@
<div
ref=
"SellTemplateRef"
>
<div
ref=
"SellTemplateRef"
>
<el-row
justify=
"space-between"
class=
"items-center"
>
<el-row
justify=
"space-between"
class=
"items-center"
>
<el-col
:span=
"6"
class=
"row items-center"
>
<el-col
:span=
"6"
class=
"row items-center"
>
<!--
<el-button-group
class=
"ml-4"
>
<el-button-group
class=
"ml-4"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"querySearchHandler"
>
模版
</el-button>
<template
v-for=
"item in TemplateTypeList"
>
<el-button
type=
"primary"
size=
"small"
@
click=
"querySearchHandler"
>
广告
</el-button>
<el-button
type=
"primary"
</el-button-group>
-->
:plain=
"queryObj.TemplateType==item.Id?false:true"
size=
"small"
@
click=
"queryObj.TemplateType=item.Id,querySearchHandler()"
>
{{
item
.
Name
}}
</el-button>
</
template
>
</el-button-group>
</el-col>
</el-col>
<el-col
:span=
"
8
"
>
<el-col
:span=
"
6
"
>
<el-input
v-model=
"queryObj.Title"
placeholder=
"输入关键字快速查找"
class=
"input-with-select"
>
<el-input
v-model=
"queryObj.Title"
placeholder=
"输入关键字快速查找"
class=
"input-with-select"
>
<
template
#
append
>
<
template
#
append
>
<el-button
type=
"primary"
@
click=
"querySearchHandler"
>
搜索
</el-button>
<el-button
type=
"primary"
@
click=
"querySearchHandler"
>
搜索
</el-button>
</
template
>
</
template
>
</el-input>
</el-input>
</el-col>
</el-col>
<el-col
:span=
"
4
"
class=
"row flex-end"
>
<el-col
:span=
"
6
"
class=
"row flex-end"
>
<sellNavs
/>
<sellNavs
/>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -28,7 +33,10 @@
...
@@ -28,7 +33,10 @@
</div>
</div>
<div
class=
"row flex-between nowrap sellList pointer"
v-for=
"(item,index) in dataList"
>
<div
class=
"row flex-between nowrap sellList pointer"
v-for=
"(item,index) in dataList"
>
<div>
<div>
<span
class=
"iconfont icon-pdf sellPdf"
></span>
<el-tag
class=
"mx-1 q-mr-md"
effect=
"dark"
v-if=
"item.TemplateType==2"
size=
"small"
>
广告
</el-tag>
<span
v-else
class=
"iconfont icon-pdf sellPdf"
></span>
<span>
{{item.Title}}
</span>
<span>
{{item.Title}}
</span>
</div>
</div>
<div>
<div>
...
@@ -92,7 +100,7 @@
...
@@ -92,7 +100,7 @@
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
ElLoading
,
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
injectKeyTemplate
}
from
'@/types/injectKey'
import
{
useSellTemplateStore
,
useScreenStore
}
from
'@/store'
import
{
useSellTemplateStore
,
useScreenStore
,
useSlidesStore
}
from
'@/store'
import
ConfigService
from
'@/services/ConfigService'
import
ConfigService
from
'@/services/ConfigService'
import
{
query
}
from
'@/utils/common'
import
{
query
}
from
'@/utils/common'
...
@@ -112,9 +120,15 @@
...
@@ -112,9 +120,15 @@
pageIndex
:
1
,
pageIndex
:
1
,
pageSize
:
20
,
pageSize
:
20
,
pageCount
:
0
,
//总页数
pageCount
:
0
,
//总页数
TemplateType
:
0
,
})
})
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellId
=
0
const
dataList
=
ref
([]
as
Array
<
any
>
);
const
dataList
=
ref
([]
as
Array
<
any
>
);
const
TemplateTypeList
=
ref
([
{
Name
:
'不限'
,
Id
:
0
},
{
Name
:
'模版'
,
Id
:
1
},
{
Name
:
'广告'
,
Id
:
2
},
]);
const
loading
=
ref
(
false
as
any
)
const
loading
=
ref
(
false
as
any
)
const
SellTemplateRef
=
ref
<
any
>
()
const
SellTemplateRef
=
ref
<
any
>
()
const
datas
=
reactive
({
const
datas
=
reactive
({
...
@@ -122,7 +136,7 @@
...
@@ -122,7 +136,7 @@
activeId
:
1
,
activeId
:
1
,
}
}
})
})
const
DeleteTemplate
=
async
(
Id
:
Number
)
=>
{
const
DeleteTemplate
=
async
(
item
:
any
)
=>
{
ElMessageBox
.
confirm
(
ElMessageBox
.
confirm
(
'此操作将删除该模版,是否确定?'
,
'此操作将删除该模版,是否确定?'
,
'提示'
,
'提示'
,
...
@@ -134,7 +148,7 @@
...
@@ -134,7 +148,7 @@
).
then
(
async
()
=>
{
).
then
(
async
()
=>
{
try
{
try
{
let
queryMsg
=
{
let
queryMsg
=
{
Id
:
Id
Id
:
item
.
Id
}
}
deleteLoading
.
value
=
ElLoading
.
service
({
deleteLoading
.
value
=
ElLoading
.
service
({
lock
:
true
,
lock
:
true
,
...
@@ -145,14 +159,14 @@
...
@@ -145,14 +159,14 @@
queryObj
.
pageIndex
=
1
queryObj
.
pageIndex
=
1
ElMessage
({
ElMessage
({
showClose
:
true
,
showClose
:
true
,
message
:
'删除模版成功'
,
message
:
`删除
${
item
.
TemplateType
==
2
?
'广告'
:
'模版'
}
成功`
,
type
:
'success'
,
type
:
'success'
,
})
})
querySearchHandler
()
querySearchHandler
()
}
else
{
}
else
{
ElMessage
({
ElMessage
({
showClose
:
true
,
showClose
:
true
,
message
:
'删除模版失败'
,
message
:
`删除
${
item
.
TemplateType
==
2
?
'广告'
:
'模版'
}
失败`
,
type
:
'warning'
,
type
:
'warning'
,
})
})
}
}
...
@@ -164,10 +178,23 @@
...
@@ -164,10 +178,23 @@
}
}
const
editDelete
=
async
(
row
:
any
,
type
:
Number
)
=>
{
const
editDelete
=
async
(
row
:
any
,
type
:
Number
)
=>
{
if
(
type
==
1
){
if
(
type
==
1
){
DeleteTemplate
(
row
.
Id
)
DeleteTemplate
(
row
)
}
else
{
}
else
{
let
list
=
[
{
id
:
'test-slide-1'
,
pageType
:
0
,
elements
:
[],
background
:
{
type
:
'solid'
,
color
:
'#ffffff'
,
},
}
]
useSlidesStore
().
setSlides
(
list
)
searchData
.
value
.
sellId
=
row
.
Id
searchData
.
value
.
sellId
=
row
.
Id
searchData
.
value
.
sellTempId
=
row
.
TempId
searchData
.
value
.
sellTempId
=
row
.
TempId
searchData
.
value
.
TemplateType
=
row
.
TemplateType
SalesEditorStore
.
setSalesEditor
(
2
)
SalesEditorStore
.
setSalesEditor
(
2
)
marketStore
.
setMarket
(
false
)
marketStore
.
setMarket
(
false
)
}
}
...
@@ -226,6 +253,9 @@
...
@@ -226,6 +253,9 @@
margin-right
:
15px
;
margin-right
:
15px
;
color
:
$themeHoverColor
;
color
:
$themeHoverColor
;
}
}
.sellPdf.sellAd
{
color
:
$textColor
;
}
.sellHeader
{
.sellHeader
{
font-size
:
14px
;
font-size
:
14px
;
padding
:
10px
8px
10px
8px
;
padding
:
10px
8px
10px
8px
;
...
...
src/views/components/sellNavs/index.vue
View file @
5e5d4f2a
...
@@ -9,18 +9,18 @@
...
@@ -9,18 +9,18 @@
<el-button
type=
"primary"
<el-button
type=
"primary"
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
style=
"color: #ffff;"
style=
"color: #ffff;"
@
click=
"sellAdd(1)"
>
@
click=
"se
archData.TemplateType=1,se
llAdd(1)"
>
新建模版
新建模版
</el-button>
</el-button>
</el-dropdown-item>
</el-dropdown-item>
<
!--
<el-dropdown-item
>
<
el-dropdown-item
v-if=
"true"
>
<el-button
type=
"primary"
<el-button
type=
"primary"
size=
"small"
:loading=
"datas.loading"
size=
"small"
:loading=
"datas.loading"
style=
"color: #ffff;"
style=
"color: #ffff;"
@
click=
"se
tTemplate
(3)"
>
@
click=
"se
archData.TemplateType=2,sellAdd
(3)"
>
新建广告
新建广告
</el-button>
</el-button>
</el-dropdown-item>
-->
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown-menu>
</
template
>
</
template
>
</el-dropdown>
</el-dropdown>
...
...
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