Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
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
刘怀志
pet-business-web
Commits
eef62b2a
Commit
eef62b2a
authored
Jun 23, 2023
by
小费同学阿
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
63970
parent
95bb0165
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
request.js
src/utils/request.js
+1
-1
article-management.vue
src/views/article-management/article-management.vue
+12
-2
No files found.
src/utils/request.js
View file @
eef62b2a
...
@@ -121,7 +121,7 @@ export function download(url, params, filename, config) {
...
@@ -121,7 +121,7 @@ export function download(url, params, filename, config) {
downloadLoadingInstance
=
Loading
.
service
({
text
:
"正在下载数据,请稍候"
,
spinner
:
"el-icon-loading"
,
background
:
"rgba(0, 0, 0, 0.7)"
,
})
downloadLoadingInstance
=
Loading
.
service
({
text
:
"正在下载数据,请稍候"
,
spinner
:
"el-icon-loading"
,
background
:
"rgba(0, 0, 0, 0.7)"
,
})
return
service
.
post
(
url
,
params
,
{
return
service
.
post
(
url
,
params
,
{
transformRequest
:
[(
params
)
=>
{
return
tansParams
(
params
)
}],
transformRequest
:
[(
params
)
=>
{
return
tansParams
(
params
)
}],
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
},
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
,
repeatSubmit
:
false
},
responseType
:
'blob'
,
responseType
:
'blob'
,
...
config
...
config
}).
then
(
async
(
data
)
=>
{
}).
then
(
async
(
data
)
=>
{
...
...
src/views/article-management/article-management.vue
View file @
eef62b2a
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
class=
"fourWordsBtn"
class=
"fourWordsBtn"
icon=
"el-icon-upload2"
icon=
"el-icon-upload2"
size=
"mini"
size=
"mini"
:loading=
"exportLoading"
@
click=
"handleExport"
@
click=
"handleExport"
>
批量导出
>
批量导出
</el-button>
</el-button>
...
@@ -253,6 +254,8 @@
...
@@ -253,6 +254,8 @@
<
script
>
<
script
>
import
{
listArticle
,
delArticle
,
addArticle
,
updateArticle
,
listAllArticle
}
from
'@/api/business/article'
import
{
listArticle
,
delArticle
,
addArticle
,
updateArticle
,
listAllArticle
}
from
'@/api/business/article'
import
{
parseTime
}
from
'../../utils/ruoyi'
import
{
parseTime
}
from
'../../utils/ruoyi'
import
fa
from
'element-ui/src/locale/lang/fa'
import
moment
from
'moment'
export
default
{
export
default
{
name
:
'Article'
,
name
:
'Article'
,
...
@@ -284,6 +287,8 @@ export default {
...
@@ -284,6 +287,8 @@ export default {
loading
:
true
,
loading
:
true
,
// 选中数组
// 选中数组
ids
:
[],
ids
:
[],
// 导出加载状态
exportLoading
:
false
,
// 非单个禁用
// 非单个禁用
single
:
true
,
single
:
true
,
// 非多个禁用
// 非多个禁用
...
@@ -496,15 +501,20 @@ export default {
...
@@ -496,15 +501,20 @@ export default {
/** 功能按钮--导出按钮操作 */
/** 功能按钮--导出按钮操作 */
handleExport
()
{
handleExport
()
{
console
.
log
(
'queryParams'
,
this
.
queryParams
)
console
.
log
(
'queryParams'
,
this
.
queryParams
)
// 开始loading
this
.
exportLoading
=
true
this
.
download
(
'business/article/export'
,
{
this
.
download
(
'business/article/export'
,
{
...
this
.
queryParams
,
...
this
.
queryParams
,
params
:
{
params
:
{
sort
:
this
.
queryParams
.
params
.
sort
,
sort
:
this
.
queryParams
.
params
.
sort
,
idList
:
this
.
ids
idList
:
this
.
ids
}
}
}
,
`
article_${new Date().getTime(
)
}
.xlsx`
)
}
,
`
文章管理-${moment().format('YYYY-MM-DD'
)
}
.xlsx`
)
// 重置选择
// 重置选择
.
then
(
_
=>
this
.
effectTableSelect
([]))
.
then
(
_
=>
{
this
.
effectTableSelect
([])
this
.
$nextTick
(
_
=>
this
.
exportLoading
=
false
)
}
)
}
,
}
,
/** 列表区--多选框选中数据 */
/** 列表区--多选框选中数据 */
handleSelectionChange
(
selection
)
{
handleSelectionChange
(
selection
)
{
...
...
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