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
1d38186e
Commit
1d38186e
authored
Mar 01, 2024
by
罗超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.0' of
http://gitlab.oytour.com/viitto/pptist
into 1.2.0
parents
dbca814a
907add6f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
26 deletions
+46
-26
resolve.ts
src/utils/psdParser/resolve.ts
+8
-3
index.vue
src/views/Editor/Thumbnails/index.vue
+11
-3
journeyAdsList.vue
src/views/SellTemplate/components/journeyAdsList.vue
+27
-20
No files found.
src/utils/psdParser/resolve.ts
View file @
1d38186e
...
...
@@ -27,7 +27,11 @@ export const ResolveThumbHandler = async (psd:any)=>{
return
imgs
}
export
const
generateUniqueId
=
()
=>
{
const
timestamp
=
new
Date
().
getTime
()
const
randomNum
=
Math
.
floor
(
Math
.
random
()
*
1000
)
return
'-'
+
timestamp
+
'-'
+
randomNum
}
export
const
ResolvePsdToSliderHandler
=
async
(
psd
:
any
)
=>
{
const
{
slides
}
=
storeToRefs
(
useSlidesStore
())
const
ID_PREV
=
"import-slide-"
...
...
@@ -39,9 +43,10 @@ export const ResolvePsdToSliderHandler = async (psd:any) => {
for
(
let
i
=
0
;
i
<
items
.
length
;
i
++
)
{
const
x
=
items
[
i
];
let
randomNum
=
Math
.
floor
(
Math
.
random
()
*
100
)
+
i
// let t =CreateDefaultSlider(ID_PREV+i)
let
t
=
CreateDefaultSlider
(
ID_PREV
+
randomNum
)
// let randomNum = Math.floor(Math.random()*100)+i
// let t =CreateDefaultSlider(ID_PREV+randomNum)
let
t
=
CreateDefaultSlider
(
ID_PREV
+
i
+
generateUniqueId
())
t
.
isTripItems
=
x
.
name
.
indexOf
(
'trip_item'
)
!=-
1
const
{
_children
}
=
x
...
...
src/views/Editor/Thumbnails/index.vue
View file @
1d38186e
...
...
@@ -452,10 +452,12 @@ const GetTripTemplate = async () =>{
let
existId
=
IDs
.
findIndex
(
y
=>
{
y
==
x
.
id
})
==
-
1
if
(
existId
)
IDs
.
push
(
x
.
id
)
else
{
let
id
=
Math
.
floor
(
Math
.
random
()
*
newSlides
.
length
)
//Math.floor(Math.random())+index
x
.
id
=
`
${
ids
[
0
]}
-
${
ids
[
1
]}
-
${
id
}
`
//Math.floor(Math.random() * newSlides.length)
//Math.floor(Math.random())+index
let
id
=
generateUniqueId
()
x
.
id
=
`
${
ids
[
0
]}
-
${
ids
[
1
]}${
id
}
`
}
console
.
log
(
existId
,
x
.
id
,
'----newSlides ID'
)
console
.
log
(
existId
,
'-----'
,
x
.
id
,
'----newSlides ID'
)
x
.
elements
.
forEach
(
y
=>
{
if
(
x
.
pageType
!=
1
&&
y
.
TemplateDataSource
&&
y
.
TemplateDataSource
.
index
==
null
){
Reflect
.
set
(
y
.
TemplateDataSource
,
'index'
,
null
)
...
...
@@ -507,6 +509,12 @@ const GetTripTemplate = async () =>{
}
}
const
generateUniqueId
=
()
=>
{
const
timestamp
=
new
Date
().
getTime
()
const
randomNum
=
Math
.
floor
(
Math
.
random
()
*
1000
)
return
'-'
+
timestamp
+
'-'
+
randomNum
}
// 销售模版数据
const
sellGetTripTemplate
=
async
()
=>
{
try
{
...
...
src/views/SellTemplate/components/journeyAdsList.vue
View file @
1d38186e
...
...
@@ -55,32 +55,39 @@
</div>
</template>
</el-table-column>
<el-table-column
label=
""
width=
"25"
prop=
""
>
<
template
#
default=
"scope"
>
<span
class=
"q-pr-sm q-pt-xs pointer"
v-if=
"scope.row.FileType&&datas.loggedder==scope.row.CreateName&¤tMenu!=-1"
>
<el-tooltip
effect=
"dark"
v-if=
"scope.row.UpdateStatus"
>
<template
#
content
>
<span
v-if=
"scope.row.UpdateStatus==1||scope.row.UpdateStatus==2"
@
click
.
stop=
"OffEdit()"
>
{{
scope
.
row
.
UpdateStatus
==
1
?
'同步中'
:
scope
.
row
.
UpdateStatus
==
2
?
'同步成功'
:
'同步失败'
}}
</span>
<div
v-if=
"scope.row.UpdateStatus==3"
class=
"row flex-end"
>
<el-button
type=
"primary"
icon=
"Refresh"
size=
"small"
@
click
.
stop=
"OffEdit(),SynchronousUpdate(scope.row)"
>
更新
</el-button>
</div>
</
template
>
<el-icon
@
click
.
stop=
"OffEdit()"
>
<Clock
:class=
"[scope.row.UpdateStatus==1?'text-info':'']"
v-if=
"scope.row.UpdateStatus==1"
/>
<CircleCheck
:class=
"[scope.row.UpdateStatus==2?'text-el-primary':'']"
v-if=
"scope.row.UpdateStatus==2"
/>
<CircleClose
:class=
"[scope.row.UpdateStatus==3?'text-waring':'']"
v-if=
"scope.row.UpdateStatus==3"
/>
</el-icon>
</el-tooltip>
</span>
</template>
</el-table-column>
<el-table-column
:label=
"datas.Title"
width=
"150"
sortable=
"custom"
prop=
"CreateTime"
>
<
template
#
default=
"scope"
>
{{
formatDateTimeToRead
(
scope
.
row
.
UpdateTime
&&
scope
.
row
.
UpdateTime
!=
''
?
scope
.
row
.
UpdateTime
:
scope
.
row
.
CreateTime
)
}}
<span
@
click
.
stop=
"scope.row.FileType?OffEdit():editDelete(scope.row,2)"
>
{{
formatDateTimeToRead
(
scope
.
row
.
UpdateTime
&&
scope
.
row
.
UpdateTime
!=
''
?
scope
.
row
.
UpdateTime
:
scope
.
row
.
CreateTime
)
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"创建人"
prop=
""
width=
"180"
>
<
template
#
default=
"scope"
>
<span
class=
"row items-center"
>
<span
class=
"q-pr-sm q-pt-xs pointer"
v-if=
"scope.row.FileType&&datas.loggedder==scope.row.CreateName&¤tMenu!=-1"
>
<el-tooltip
effect=
"dark"
v-if=
"scope.row.UpdateStatus"
>
<template
#
content
>
<span
v-if=
"scope.row.UpdateStatus==1||scope.row.UpdateStatus==2"
>
{{
scope
.
row
.
UpdateStatus
==
1
?
'同步中'
:
scope
.
row
.
UpdateStatus
==
2
?
'同步成功'
:
'同步失败'
}}
</span>
<div
v-if=
"scope.row.UpdateStatus==3"
class=
"row flex-end"
>
<el-button
type=
"primary"
icon=
"Refresh"
size=
"small"
@
click
.
stop=
"SynchronousUpdate(scope.row)"
>
更新
</el-button>
</div>
</
template
>
<el-icon>
<Clock
:class=
"[scope.row.UpdateStatus==1?'text-info':'']"
v-if=
"scope.row.UpdateStatus==1"
/>
<CircleCheck
:class=
"[scope.row.UpdateStatus==2?'text-el-primary':'']"
v-if=
"scope.row.UpdateStatus==2"
/>
<CircleClose
:class=
"[scope.row.UpdateStatus==3?'text-waring':'']"
v-if=
"scope.row.UpdateStatus==3"
/>
</el-icon>
</el-tooltip>
</span>
<span
class=
"row items-center"
@
click
.
stop=
"scope.row.FileType?OffEdit():editDelete(scope.row,2)"
>
<span>
{{
scope
.
row
.
CreateName
}}
</span>
<span
class=
"text-info q-pl-sm"
v-if=
"datas.loggedder!=scope.row.CreateName"
>
分享的
</span>
</span>
...
...
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