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 970c7550
authored
May 18, 2023
by
怪兽?别跑
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
质检调试
1 parent
6401fa2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
20 deletions
linkwe-pc/src/views/conversation/quality/records-statistic.vue
linkwe-pc/src/views/conversation/quality/records-statistic.vue
View file @
970c755
...
...
@@ -3,26 +3,29 @@
<CardGroupIndex
:data=
"cardData"
></CardGroupIndex>
<div
class=
"g-card"
>
<div
class=
"g-card-title"
>
数据报表
</div>
<div
style=
"display: flex; align-items: center;"
>
<search-title
:showMore=
"true"
@
search=
"getTableFn"
>
</search-title>
<el-input
style=
"width: 150px;"
:value=
"userName"
readonly
size=
"mini"
@
focus=
"dialogVisible = true"
placeholder=
"请选择成员"
/>
<el-input
style=
"width: 150px; margin: 0 20px;"
:value=
"deptName"
readonly
size=
"mini"
@
focus=
"dialogDeptVisible = true"
placeholder=
"请选择部门"
/>
<el-button
size=
"mini"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
<div
style=
"display: flex; align-items: center; justify-content: space-between;"
>
<div
style=
"display: flex; align-items: center;"
>
<search-title
:showMore=
"true"
@
search=
"getTableFn"
>
</search-title>
<el-input
style=
"width: 150px;"
:value=
"userName"
readonly
size=
"mini"
@
focus=
"dialogVisible = true"
placeholder=
"请选择成员"
/>
<el-input
style=
"width: 150px; margin: 0 20px;"
:value=
"deptName"
readonly
size=
"mini"
@
focus=
"dialogDeptVisible = true"
placeholder=
"请选择部门"
/>
<el-button
size=
"mini"
type=
"primary"
@
click=
"handleSearch"
>
查询
</el-button>
<el-button
size=
"mini"
@
click=
"resetQuery"
>
重置
</el-button>
</div>
<el-button
type=
"primary"
size=
"mini"
@
click=
"exportFn"
v-loading=
"exportLoading"
>
导出Excel
</el-button>
</div>
<el-table
v-loading=
"loading"
:data=
"tableList"
style=
"width: 100%;"
>
<el-table-column
...
...
@@ -142,6 +145,39 @@
}
},
methods
:
{
exportFn
()
{
this
.
$confirm
(
'确认导出吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
})
.
then
(()
=>
{
this
.
exportLoading
=
true
return
getTableExport
(
Object
.
assign
({},
this
.
tableSearch
))
})
.
then
((
res
)
=>
{
if
(
!
res
)
return
const
blob
=
new
Blob
([
res
],
{
type
:
'application/vnd.ms-excel'
})
// 构造一个blob对象来处理数据,并设置文件类型
if
(
window
.
navigator
.
msSaveOrOpenBlob
)
{
//兼容IE10
navigator
.
msSaveBlob
(
blob
,
'商品分析'
)
}
else
{
const
href
=
URL
.
createObjectURL
(
blob
)
//创建新的URL表示指定的blob对象
const
a
=
document
.
createElement
(
'a'
)
//创建a标签
a
.
style
.
display
=
'none'
a
.
href
=
href
// 指定下载链接
a
.
download
=
dateFormat
(
new
Date
(),
'yyyy-MM-dd'
)
+
'_商品分析.xlsx'
//指定下载文件名
a
.
click
()
//触发下载
URL
.
revokeObjectURL
(
a
.
href
)
//释放URL对象
}
})
.
catch
((
error
)
=>
{
console
.
error
(
error
)
})
.
finally
(()
=>
{
this
.
exportLoading
=
false
})
},
handleSearch
()
{
this
.
getTableChangeSize
()
},
...
...
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