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
45397db2
Commit
45397db2
authored
May 31, 2024
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
销售导出PDF 及IMG 后台处理
parent
021e4512
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
9 deletions
+28
-9
ExportImage.vue
src/views/Editor/ExportDialog/ExportImage.vue
+4
-3
ExportPDF.vue
src/views/Editor/ExportDialog/ExportPDF.vue
+7
-5
journeyAdsList.vue
src/views/SellTemplate/components/journeyAdsList.vue
+17
-1
No files found.
src/views/Editor/ExportDialog/ExportImage.vue
View file @
45397db2
...
...
@@ -65,11 +65,11 @@
<div
class=
"tip"
style=
"color:red"
v-if=
"searchData.sellId==0"
>
当前设计文档没有保存,无法生成图片,请先保存文档。
</div>
</div>
<a
ref=
"downloadLink"
target=
"_blank"
:href=
"fileUrl"
style=
"display:none"
v-if=
"
param.model=='2'
&& searchData.sellId!=0"
></a>
<a
ref=
"downloadLink"
target=
"_blank"
:href=
"fileUrl"
style=
"display:none"
v-if=
"
model==2
&& searchData.sellId!=0"
></a>
<div
class=
"btns"
>
<Button
class=
"btn export"
type=
"primary"
@
click=
"expImage()"
v-if=
"
param.model!='2'
"
>
导出图片
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"exportOnlineImage()"
v-if=
"
param.model=='2'
&& searchData.sellId!=0"
>
导出图片
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"expImage()"
v-if=
"
model!=2
"
>
导出图片
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"exportOnlineImage()"
v-if=
"
model==2
&& searchData.sellId!=0"
>
导出图片
</Button>
<Button
class=
"btn close"
@
click=
"emit('close')"
>
关闭
</Button>
</div>
...
...
@@ -99,6 +99,7 @@ const emit = defineEmits<{
}
>
()
const
{
slides
,
currentSlide
,
viewportRatio
,
slideIndex
}
=
storeToRefs
(
useSlidesStore
())
const
{
model
}
=
storeToRefs
(
useScreenStore
())
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
...
...
src/views/Editor/ExportDialog/ExportPDF.vue
View file @
45397db2
...
...
@@ -54,12 +54,12 @@
</div>
<div
class=
"tip"
style=
"color:red"
v-if=
"searchData.sellId==0"
>
当前设计文档没有保存,无法下载PDF,请先保存文档。
</div>
</div>
<a
ref=
"downloadLink"
target=
"_blank"
:href=
"fileUrl"
style=
"display:none"
v-if=
"
param.model=='2'
&&searchData.sellId!=0"
></a>
<a
ref=
"downloadLink"
target=
"_blank"
:href=
"fileUrl"
style=
"display:none"
v-if=
"
model==2
&&searchData.sellId!=0"
></a>
<!-- <a ref="downloadLink" :href="fileUrl" @click.prevent="downloadFile" style="display:none" v-else></a> -->
<div
class=
"btns"
>
<Button
class=
"btn export"
type=
"primary"
@
click=
"expPDF()"
v-if=
"
param.model!='2'
"
>
导出PDF
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"exportOnlinePdf()"
v-if=
"
param.model=='2'
&& searchData.sellId!=0"
>
导出PDF
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"expPDF()"
v-if=
"
model!=2
"
>
导出PDF
</Button>
<Button
class=
"btn export"
type=
"primary"
@
click=
"exportOnlinePdf()"
v-if=
"
model==2
&& searchData.sellId!=0"
>
导出PDF
</Button>
<Button
class=
"btn close"
@
click=
"emit('close')"
>
关闭
</Button>
</div>
...
...
@@ -69,7 +69,7 @@
<
script
lang=
"ts"
setup
>
import
{
Ref
,
ref
,
inject
}
from
'vue'
import
{
storeToRefs
}
from
'pinia'
import
{
useSellTemplateStore
,
useSlidesStore
}
from
'@/store'
import
{
useSellTemplateStore
,
useSlidesStore
,
useScreenStore
}
from
'@/store'
import
{
print
}
from
'@/utils/print'
import
{
VIEWPORT_SIZE
,
VIEWPORT_VER_SIZE
}
from
'@/configs/canvas'
import
{
query
}
from
'@/utils/common'
...
...
@@ -90,6 +90,8 @@ const emit = defineEmits<{
}
>
()
const
{
slides
,
currentSlide
,
viewportRatio
}
=
storeToRefs
(
useSlidesStore
())
const
{
model
}
=
storeToRefs
(
useScreenStore
())
const
newSlides
=
ref
<
Array
<
any
>>
([])
const
searchData
=
ref
({}
as
any
)
searchData
.
value
=
inject
(
injectKeyTemplate
)
...
...
@@ -97,7 +99,7 @@ const pdfThumbnailsRef = ref<HTMLElement>()
const
rangeType
=
ref
<
'all'
|
'current'
>
(
'all'
)
const
count
=
ref
(
1
)
const
padding
=
ref
(
false
)
let
param
=
query
()
const
autoSave
=
inject
(
'SellTravelSave'
)
as
Ref
<
number
>
const
loadingObj
=
ref
<
any
>
()
const
downloadLink
=
ref
()
...
...
src/views/SellTemplate/components/journeyAdsList.vue
View file @
45397db2
...
...
@@ -119,7 +119,8 @@
</el-dropdown-item>
<el-dropdown-item
icon=
"Delete"
@
click=
"editDelete(scope.row,1)"
>
删除
</el-dropdown-item>
</
template
>
<el-dropdown-item
v-if=
"(datas.loggedder==scope.row.CreateName&&scope.row.FileType&¤tMenu!=-1)||scope.row.IsDownLoad"
icon=
"Download"
@
click=
"exportDocument(scope.row)"
>
导出
</el-dropdown-item>
<el-dropdown-item
v-if=
"(datas.loggedder==scope.row.CreateName&&scope.row.FileType&¤tMenu!=-1)||scope.row.IsDownLoad"
icon=
"Download"
@
click=
"exportDocument(scope.row)"
>
导出PDF
</el-dropdown-item>
<el-dropdown-item
v-if=
"(datas.loggedder==scope.row.CreateName&&scope.row.FileType&¤tMenu!=-1)||scope.row.IsDownLoad"
icon=
"Download"
@
click=
"exportOnlineImage(scope.row)"
>
导出IMG
</el-dropdown-item>
<el-dropdown-item
v-if=
"(datas.loggedder==scope.row.CreateName&&scope.row.FileType&¤tMenu!=-1)||scope.row.IsView"
icon=
"CopyDocument"
@
click
.
stop=
"CopyTo(scope.row)"
>
复制到
</el-dropdown-item>
</el-dropdown-menu>
...
...
@@ -178,6 +179,8 @@
journeyAdsDetails = '';
isTreeFileRecover=false;
emit('success')}"
></TreeFileRecover>
<a
ref=
"downloadLink"
target=
"_blank"
:href=
"fileUrl"
style=
"display:none"
></a>
</template>
<
script
setup
lang=
"ts"
>
import
{
useUserStore
}
from
'@/store/user'
;
...
...
@@ -301,6 +304,18 @@ import { useRouter } from 'vue-router';
datas
.
Title
=
'删除时间'
datas
.
emptyTitle
=
'没有删除文档'
}
const
downloadLink
=
ref
()
const
fileUrl
=
ref
(
""
)
// 导出img
const
exportOnlineImage
=
(
row
:
any
)
=>
{
let
rangeArray
:
number
[]
=
[]
rangeArray
.
push
(
0
)
fileUrl
.
value
=
`https://fileservice.oytour.com/api/img/
${
row
.
FileId
}
/
${
rangeArray
.
join
(
','
)}
/png/1/
${
row
.
HashInfo
}
`
nextTick
(()
=>
{
downloadLink
.
value
.
click
()
})
}
const
SynchronousUpdate
=
async
(
row
:
any
)
=>
{
ElMessageBox
.
confirm
(
`此操作将更新行程
${
row
.
FileName
}
,是否确定?`
,
"提示"
,
{
...
...
@@ -687,6 +702,7 @@ import { useRouter } from 'vue-router';
watch
(()
=>
props
.
navigations
,
(
n
,
o
)
=>
{
Navigations
.
value
=
n
})
setCurrentRow
()
</
script
>
<
style
lang=
"scss"
>
...
...
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