体系搜索-添加排序
This commit is contained in:
@@ -105,6 +105,7 @@
|
|||||||
border
|
border
|
||||||
:height="300"
|
:height="300"
|
||||||
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',fontWeight: 'bold', height: '48px'}"
|
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',fontWeight: 'bold', height: '48px'}"
|
||||||
|
@sort-change="sortChange"
|
||||||
@selection-change="selectionChange">
|
@selection-change="selectionChange">
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -137,11 +138,13 @@
|
|||||||
<el-table-column
|
<el-table-column
|
||||||
prop="releaseDate"
|
prop="releaseDate"
|
||||||
width="120"
|
width="120"
|
||||||
|
sortable
|
||||||
label="发布日期">
|
label="发布日期">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="implementDate"
|
prop="implementDate"
|
||||||
width="120"
|
width="120"
|
||||||
|
sortable="custom"
|
||||||
label="实施日期">
|
label="实施日期">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@@ -228,6 +231,8 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: this.$store.getters.userInfo.configContent,
|
pageSize: this.$store.getters.userInfo.configContent,
|
||||||
total: 0,
|
total: 0,
|
||||||
|
sortField: '',
|
||||||
|
sortMode: '',
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
visible: false,
|
visible: false,
|
||||||
@@ -304,6 +309,18 @@ export default {
|
|||||||
selectionChange (row) {
|
selectionChange (row) {
|
||||||
this.selected = row
|
this.selected = row
|
||||||
},
|
},
|
||||||
|
sortChange ({ column, prop, order }) {
|
||||||
|
this.searchForm.sortField = prop
|
||||||
|
this.searchForm.sortMode = 'asc'
|
||||||
|
if (order === 'descending') {
|
||||||
|
this.searchForm.sortMode = 'desc'
|
||||||
|
}
|
||||||
|
if (!order) {
|
||||||
|
this.searchForm.sortField = ''
|
||||||
|
this.searchForm.sortMode = ''
|
||||||
|
}
|
||||||
|
this.onSearch()
|
||||||
|
},
|
||||||
// 导出
|
// 导出
|
||||||
exportData () {
|
exportData () {
|
||||||
this.$refs.exportDialogRef.openModel()
|
this.$refs.exportDialogRef.openModel()
|
||||||
|
|||||||
Reference in New Issue
Block a user