Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 22f736b4
authored
May 18, 2023
by
怪兽?别跑
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
质检周报接口
1 parent
970c7550
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
linkwe-pc/src/views/conversation/quality/api.js
linkwe-pc/src/views/conversation/quality/records-statistic.vue
linkwe-pc/src/views/conversation/quality/api.js
View file @
22f736b
...
@@ -88,3 +88,11 @@ export function qualityWeeklyTable(id, data) {
...
@@ -88,3 +88,11 @@ export function qualityWeeklyTable(id, data) {
params
:
data
params
:
data
})
})
}
}
// 质检周报 详情列表导出
export
function
getTableExport
(
data
)
{
return
request
({
url
:
service
+
'/qi/weekly/detail/list/export/'
+
id
,
params
:
data
})
}
linkwe-pc/src/views/conversation/quality/records-statistic.vue
View file @
22f736b
...
@@ -153,20 +153,20 @@
...
@@ -153,20 +153,20 @@
})
})
.
then
(()
=>
{
.
then
(()
=>
{
this
.
exportLoading
=
true
this
.
exportLoading
=
true
return
getTableExport
(
Object
.
assign
({},
this
.
tableSearch
))
return
getTableExport
(
this
.
id
,
Object
.
assign
({},
this
.
query
))
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
!
res
)
return
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'
商品分析
'
)
navigator
.
msSaveBlob
(
blob
,
'
质检详情
'
)
}
else
{
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
a
.
style
.
display
=
'none'
a
.
style
.
display
=
'none'
a
.
href
=
href
// 指定下载链接
a
.
href
=
href
// 指定下载链接
a
.
download
=
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
)
+
'
_商品分析
.xlsx'
//指定下载文件名
a
.
download
=
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
)
+
'
-质检详情
.xlsx'
//指定下载文件名
a
.
click
()
//触发下载
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
}
...
@@ -243,7 +243,6 @@
...
@@ -243,7 +243,6 @@
})
})
},
},
getTableFn
(
data
)
{
getTableFn
(
data
)
{
this
.
tableSearch
=
data
this
.
loading
=
true
this
.
loading
=
true
// this.query.id = this.id
// this.query.id = this.id
this
.
query
.
beginTime
=
data
.
beginTime
this
.
query
.
beginTime
=
data
.
beginTime
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment