Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zentao-view
Project
Project
Details
Activity
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
zentao
zentao-view
Commits
e3a3aaf5
Commit
e3a3aaf5
authored
Mar 07, 2021
by
王鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 节假日模块表格排序
parent
9c395bf2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
HolidaysList.vue
src/views/holidays/HolidaysList.vue
+12
-3
No files found.
src/views/holidays/HolidaysList.vue
View file @
e3a3aaf5
...
...
@@ -26,6 +26,7 @@
</div>
<a-table
size=
"middle"
@
change=
"sortChange"
:columns=
"columns"
:dataSource=
"dataSource"
:row-selection=
"
{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
...
...
@@ -90,12 +91,13 @@
import
{
getCommonCode
}
from
"@api/system/sysCode"
;
import
{
getPage
,
synchronousVacation
,
deleteHoliday
,
batchDeleteHoliday
}
from
"@api/holidays/holidays"
;
import
HolidaysDetail
from
"@views/holidays/HolidaysDetail"
;
import
{
humpToLine
,
setOrder
}
from
"@util/util"
;
const
columns
=
[
{
title
:
'名称'
,
width
:
100
,
dataIndex
:
'name'
}
,
{
title
:
'类型'
,
width
:
80
,
dataIndex
:
'dayCode'
,
scopedSlots
:
{
customRender
:
'dayCode'
}}
,
{
title
:
'开始日期'
,
width
:
100
,
dataIndex
:
'startDate'
,
scopedSlots
:
{
customRender
:
'startDate'
}}
,
{
title
:
'开始日期'
,
sorter
:
true
,
width
:
100
,
dataIndex
:
'startDate'
,
scopedSlots
:
{
customRender
:
'startDate'
}}
,
{
title
:
'结束日期'
,
width
:
100
,
dataIndex
:
'endDate'
,
scopedSlots
:
{
customRender
:
'startDate'
}}
,
{
title
:
'时长'
,
width
:
6
0
,
dataIndex
:
'duration'
,
scopedSlots
:
{
customRender
:
'duration'
}}
,
{
title
:
'时长'
,
sorter
:
true
,
width
:
7
0
,
dataIndex
:
'duration'
,
scopedSlots
:
{
customRender
:
'duration'
}}
,
{
title
:
'详情'
,
dataIndex
:
'vacation'
}
,
{
title
:
'操作'
,
key
:
'operation'
,
width
:
90
,
scopedSlots
:
{
customRender
:
'action'
}}
]
...
...
@@ -109,7 +111,9 @@ export default {
query
:
{
year
:
0
,
page
:
1
,
size
:
10
size
:
10
,
order
:
""
,
sort
:
""
,
}
,
yearList
:[],
loading
:
false
,
...
...
@@ -165,6 +169,11 @@ export default {
}
,
pageChange
(
page
)
{
this
.
query
.
page
=
page
;
}
,
sortChange
(
pagination
,
filters
,
sorter
){
console
.
log
(
sorter
)
this
.
query
.
sort
=
humpToLine
(
sorter
.
field
);
this
.
query
.
order
=
setOrder
(
sorter
.
order
);
this
.
loadData
();
}
,
sizeChange
(
current
,
size
)
{
...
...
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