Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-baoshen-excel
Project
Project
Details
Activity
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
何远江
topsun-baoshen-excel
Commits
d02f8e7b
Commit
d02f8e7b
authored
Oct 18, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加文件链接跳转
parent
d656e85e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
index.vue
src/components/PreviewExcel/index.vue
+5
-2
FileList.vue
src/views/var/file/FileList.vue
+2
-2
No files found.
src/components/PreviewExcel/index.vue
View file @
d02f8e7b
...
...
@@ -11,6 +11,7 @@ import { Download } from '@element-plus/icons-vue'
import
{
onMounted
,
onUnmounted
,
ref
,
watch
}
from
'vue'
import
LuckyExcel
from
'luckyexcel'
import
{
getOrderFileById
}
from
'@/api/order'
import
{
getOrderFileById
as
getVarOrderFileById
}
from
'@/api/var'
import
{
cellRightClickConfig
,
sheetRightClickConfig
,
...
...
@@ -21,7 +22,7 @@ import { useRoute } from 'vue-router'
import
{
isFunction
}
from
'@/utils/is'
const
filePath
=
ref
(
''
)
const
props
=
defineProps
([
'fileId'
])
const
props
=
defineProps
([
'fileId'
,
'type'
])
const
luckysheet
=
(
window
as
any
).
luckysheet
const
loading
=
ref
(
false
)
const
route
=
useRoute
()
...
...
@@ -60,8 +61,10 @@ const getFilePath = async () => {
try
{
loading
.
value
=
true
const
fileId
=
props
.
fileId
||
route
.
query
.
fileId
const
type
=
props
.
type
||
route
.
query
.
type
if
(
fileId
)
{
const
{
data
}
=
await
getOrderFileById
(
fileId
)
const
{
data
}
=
type
===
'var'
?
await
getVarOrderFileById
(
fileId
)
:
await
getOrderFileById
(
fileId
)
if
(
data
.
code
==
200
)
{
generateExcel
(
data
.
result
.
mergeFilePath
)
}
...
...
src/views/var/file/FileList.vue
View file @
d02f8e7b
...
...
@@ -32,14 +32,14 @@
v-for=
"item in row.filePath.split(';')"
:key=
"item"
target=
"_blank"
:href=
"'/preview-excel?filePath=' + item"
:href=
"'/preview-excel?filePath=' + item
+ '&type=var'
"
>
{{
item
}}
</el-link
>
</
template
>
</vxe-column>
<vxe-column
title=
"标注文件地址"
>
<
template
#
default=
"{ row }"
>
<el-link
target=
"_blank"
:href=
"'/preview-excel?fileId=' + row.orderFileId"
>
{{
<el-link
target=
"_blank"
:href=
"'/preview-excel?fileId=' + row.orderFileId
+ '&type=var'
"
>
{{
row
.
mergeFilePath
}}
</el-link>
</
template
>
...
...
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