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
f117a12a
Commit
f117a12a
authored
Aug 14, 2023
by
王飞龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备地区修改
parent
16eb6618
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
5 deletions
+20
-5
equipment-management.vue
...-management/equipment-management/equipment-management.vue
+20
-5
No files found.
src/views/equipment-management/equipment-management/equipment-management.vue
View file @
f117a12a
...
...
@@ -87,12 +87,14 @@
>
新增设备
</el-button>
<el-button
v-hasPermi=
"['business:device:export']"
icon=
"el-icon-finished"
class=
"fourWordswhiteBtn"
@
click=
"selectAll()"
>
选择全部
</el-button>
<el-button
v-hasPermi=
"['business:device:export']"
icon=
"el-icon-back"
class=
"fourWordswhiteBtn"
@
click=
"reverseSelect(deviceList)"
...
...
@@ -685,19 +687,32 @@ export default {
this
.
$modal
.
msgSuccess
(
'删除成功'
)
}).
catch
(()
=>
{})
},
// 导出日期格式化
exportFormatTime
(
date
)
{
// 获取年月日
var
year
=
date
.
getFullYear
()
var
month
=
date
.
getMonth
()
+
1
// 月份从0开始,需要加1
var
day
=
date
.
getDate
()
// 将年月日格式化为字符串
if
(
month
<
10
)
{
month
=
'0'
+
month
}
if
(
day
<
10
)
{
day
=
'0'
+
day
}
const
formattedDate
=
year
.
toString
()
+
month
.
toString
()
+
day
.
toString
()
return
formattedDate
},
/** 导出按钮操作 */
handleExport
()
{
// this.download('business/device/export', {
// ...this.queryParams
// }, `device_${new Date().getTime()}.xlsx`)
if
(
this
.
ids
.
length
!==
0
)
{
const
exportTable
=
{}
exportTable
.
deviceIdList
=
this
.
ids
this
.
download
(
'business/device/export'
,
exportTable
,
`
use_
${
new
Date
().
getTime
(
)}
.xlsx`
).
then
(
res
=>
{
this
.
download
(
'business/device/export'
,
exportTable
,
`
设备管理_
${
this
.
exportFormatTime
(
new
Date
()
)}
.xlsx`
).
then
(
res
=>
{
this
.
$refs
.
table
.
clearSelection
()
})
}
else
{
this
.
$modal
.
msg
Error
(
'请选择至少一条数据导出'
)
this
.
$modal
.
msg
Warning
(
'请选择至少一条数据导出'
)
return
}
}
...
...
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