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
9cd0811c
Commit
9cd0811c
authored
Dec 20, 2023
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化首页 城市 及 颜色,优化编辑页 返回是否清空数据
parent
8ce7b529
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
52 deletions
+70
-52
index.vue
src/views/Editor/EditorHeader/index.vue
+31
-38
index.vue
src/views/Editor/Thumbnails/index.vue
+4
-2
Index.vue
src/views/Market/Index.vue
+35
-12
No files found.
src/views/Editor/EditorHeader/index.vue
View file @
9cd0811c
...
...
@@ -177,38 +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
)
{
if
(
model
.
value
&&
model
.
value
!=
2
)
{
setTimeout
(()
=>
{
if
(
type
)
{
searchData
.
value
.
TempId2
=
searchData
.
value
.
TempId
searchData
.
value
.
TempId
=
0
marketStore
.
setMarket
(
true
)
SalesBackStore
.
setSalesBack
(
1
)
}
else
{
searchData
.
value
.
TempId
=
0
SalesBackStore
.
setSalesBack
(
0
)
SalesEditorStore
.
setSalesEditor
(
0
)
}
if
(
SalesBack
.
value
==
0
){
slidesStore
.
setSlides
(
list
)
layoutsStore
.
setLayouts
([])
CoverImgStore
.
setCoverImg
(
null
)
}
setNewDatas
(
type
,
1
)
},
200
)
return
}
...
...
@@ -221,25 +195,44 @@ const goBack = (type:any) =>{
type
:
'warning'
,
}
).
then
(()
=>
{
searchData
.
value
.
TempId
=
0
setNewDatas
(
type
,
0
)
}).
catch
(()
=>
{})
}
// 返回是否清空数据
const
setNewDatas
=
(
type
,
i
)
=>
{
let
list
=
[
{
id
:
'test-slide-1'
,
pageType
:
1
,
elements
:
[],
background
:
{
type
:
'solid'
,
color
:
'#ffffff'
,
},
}
]
if
(
type
)
{
searchData
.
value
.
TempId2
=
searchData
.
value
.
TempId
searchData
.
value
.
TempId
=
0
marketStore
.
setMarket
(
true
)
SalesBackStore
.
setSalesBack
(
1
)
if
(
model
.
value
==
2
)
{
if
(
searchData
.
value
.
TempId
)
searchData
.
value
.
TempId2
=
searchData
.
value
.
TempId
SalesBackStore
.
setSalesBack
(
1
)
}
}
else
{
searchData
.
value
.
TempId
=
0
searchData
.
value
.
TempId2
=
0
searchData
.
value
.
sellId
=
0
searchData
.
value
.
sellTempId
=
0
SalesBackStore
.
setSalesBack
(
0
)
SalesEditorStore
.
setSalesEditor
(
0
)
}
if
(
SalesBack
.
value
==
0
){
searchData
.
value
.
TempId
=
0
// i 1模版权限 0无模版权限
if
(
SalesBack
.
value
==
0
&&
model
.
value
!=
2
){
slidesStore
.
setSlides
(
list
)
slidesStore
.
setThumbnails
([])
if
(
!
i
)
slidesStore
.
setThumbnails
([])
layoutsStore
.
setLayouts
([])
CoverImgStore
.
setCoverImg
(
null
)
}
}).
catch
(()
=>
{})
}
// 导入PSD
const
UploadPsdHandler
=
()
=>
{
...
...
src/views/Editor/Thumbnails/index.vue
View file @
9cd0811c
...
...
@@ -337,6 +337,7 @@ const ResolveTripDaysHandler = (items)=>{
// 获取行程模版数据
const
GetTripTemplate
=
async
()
=>
{
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
=
[
{
...
...
@@ -349,6 +350,7 @@ const GetTripTemplate = async () =>{
},
}
]
slidesStore
.
setTitle
(
'模版名称'
)
return
slidesStore
.
setSlides
(
list
)
}
try
{
...
...
@@ -390,7 +392,7 @@ const GetTripTemplate = async () =>{
CoverImgStore
.
setCoverImg
(
dataRes
.
data
.
data
.
CoverImg
)
slidesStore
.
updateSlideIndex
(
0
)
datas
.
DataSource
.
pageType
=
newSlides
[
0
].
pageType
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
}
queryObj
.
value
.
TempId
=
dataRes
.
data
.
data
.
TempId
...
...
@@ -428,7 +430,7 @@ const sellGetTripTemplate = async () =>{
let
dataRes
=
await
ConfigService
.
sellGetTemplateDetails
(
queryMsg
);
if
(
dataRes
.
data
.
resultCode
==
1
)
{
let
dataObj
=
dataRes
.
data
.
data
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
)
slidesStore
.
setTitle
(
dataRes
.
data
.
data
.
Title
)
if
(
SalesBack
.
value
==
0
&&
searchData
.
value
.
sellTempId
){
let
SlidesData
=
JSON
.
parse
(
dataObj
.
TempData
)
let
newSlides
=
[]
...
...
src/views/Market/Index.vue
View file @
9cd0811c
...
...
@@ -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>
...
...
@@ -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
>
()
...
...
@@ -338,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
();
...
...
@@ -385,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
)
{
...
...
@@ -442,7 +465,7 @@
display
:
block
;
}
.ColorNameBox
{
width
:
100px
;
width
:
0
;
display
:
none
;
left
:
0
;
top
:
-30px
;
...
...
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