Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_vue
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
胡宝山
template_vue
Commits
571e53f7
Commit
571e53f7
authored
Sep 20, 2023
by
shifangwuji
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'project9-8' of
http://gitlab.91isoft.com:90/yangshuo/template_vue
into project9-8
parents
83d92631
cef9d101
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
gxlog.js
src/api/production/gxlog.js
+9
-1
index.vue
src/views/production/gxlog/index.vue
+13
-6
No files found.
src/api/production/gxlog.js
View file @
571e53f7
...
@@ -55,6 +55,14 @@ export function exporTable(params) {
...
@@ -55,6 +55,14 @@ export function exporTable(params) {
responseType
:
'blob'
responseType
:
'blob'
})
})
}
}
export
function
lotExportTable
(
params
)
{
return
request
({
url
:
'/ysgxlog/export'
,
method
:
'get'
,
params
,
responseType
:
'blob'
})
}
// 根据key值查询数据字典数据
// 根据key值查询数据字典数据
export
function
getDictData
(
params
)
{
export
function
getDictData
(
params
)
{
...
...
src/views/production/gxlog/index.vue
View file @
571e53f7
...
@@ -69,6 +69,16 @@
...
@@ -69,6 +69,16 @@
@
click=
"resetQuery"
@
click=
"resetQuery"
>
重置
</el-button>
>
重置
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
style=
"float: right"
>
<el-button
style=
"padding: 8px 7px"
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button
>
</el-form-item>
<!--
<div
style=
"float: right"
>
<!--
<div
style=
"float: right"
>
<el-form-item>
<el-form-item>
<el-button
<el-button
...
@@ -318,8 +328,7 @@ import {
...
@@ -318,8 +328,7 @@ import {
getDetailById
,
getDetailById
,
updataInfo
,
updataInfo
,
deleteLogical
,
deleteLogical
,
exporTable
,
getDictData
,
lotExportTable
getDictData
}
from
'@/api/production/gxlog'
}
from
'@/api/production/gxlog'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
...
@@ -535,21 +544,19 @@ export default {
...
@@ -535,21 +544,19 @@ export default {
}
,
}
,
handleExport
()
{
handleExport
()
{
const
obj
=
{
const
obj
=
{
page
:
this
.
queryParams
.
page
,
rows
:
this
.
queryParams
.
rows
,
pn
:
this
.
queryParams
.
pn
,
pn
:
this
.
queryParams
.
pn
,
ptype
:
this
.
queryParams
.
ptype
,
ptype
:
this
.
queryParams
.
ptype
,
lot
:
this
.
queryParams
.
lot
,
lot
:
this
.
queryParams
.
lot
,
gx
:
this
.
queryParams
.
gx
gx
:
this
.
queryParams
.
gx
}
}
expor
Table
(
obj
).
then
(
response
=>
{
lotExport
Table
(
obj
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
// TODO: 创建下载的链接
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
downloadElement
.
href
=
href
downloadElement
.
href
=
href
// TODO: 下载后文件名
// TODO: 下载后文件名
downloadElement
.
download
=
'
样品库记录
'
+
'.xls'
downloadElement
.
download
=
'
工序日志
'
+
'.xls'
document
.
body
.
appendChild
(
downloadElement
)
document
.
body
.
appendChild
(
downloadElement
)
// TODO: 点击下载
// TODO: 点击下载
downloadElement
.
click
()
downloadElement
.
click
()
...
...
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