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
3d96d180
Commit
3d96d180
authored
Oct 14, 2024
by
何远江
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
c110d83e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
export-excel.ts
src/utils/export-excel.ts
+3
-0
Variables.vue
src/views/var/variables/Variables.vue
+1
-1
No files found.
src/utils/export-excel.ts
View file @
3d96d180
...
...
@@ -2,6 +2,9 @@ import * as XLSX from 'xlsx'
import
{
saveAs
}
from
'file-saver'
export
function
exportExcel
(
data
:
any
[],
filename
?:
string
)
{
data
.
forEach
(
row
=>
{
delete
row
[
'_X_ROW_KEY'
]
})
const
worksheet
=
XLSX
.
utils
.
json_to_sheet
(
data
)
const
workbook
=
XLSX
.
utils
.
book_new
()
...
...
src/views/var/variables/Variables.vue
View file @
3d96d180
...
...
@@ -232,7 +232,7 @@ const submitImport = async () => {
}
const
download
=
()
=>
{
exportExcel
(
detailVariable
.
value
.
data
,
`
${
new
Date
().
getTime
()}
_
${
currentRow
.
value
.
orderNo
}
.xlsx`
)
exportExcel
(
detailVariable
.
value
.
data
,
`
${
currentRow
.
value
.
orderNo
}
.xlsx`
)
}
const
onReset
=
()
=>
{
...
...
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