|
@@ -59,6 +59,8 @@
|
|
|
class="search-table"
|
|
|
:data="tableData"
|
|
|
style="width: 100%"
|
|
|
+ @sort-change="handleSort"
|
|
|
+ :default-sort = dataSort
|
|
|
:max-height="tableHeight">
|
|
|
<el-table-column
|
|
|
type="index"
|
|
@@ -283,7 +285,8 @@ export default {
|
|
|
pageSize: window.localStorage.getItem('pageSize')?Number(window.localStorage.getItem('pageSize')):10,
|
|
|
pageNumber: window.localStorage.getItem('pageNumber')?Number(window.localStorage.getItem('pageNumber')):1,
|
|
|
tableHeight: "", // 表格高度
|
|
|
- total_count: 0
|
|
|
+ total_count: 0,
|
|
|
+ dataSort: {}
|
|
|
}
|
|
|
},
|
|
|
//计算属性 类似于data概念
|
|
@@ -294,6 +297,14 @@ export default {
|
|
|
watch: {},
|
|
|
//方法集合
|
|
|
methods: {
|
|
|
+ handleSort(value){
|
|
|
+ let dataSort = {
|
|
|
+ prop: value.prop,
|
|
|
+ order: value.order
|
|
|
+ }
|
|
|
+ this.dataSort = dataSort
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
// 处理学段
|
|
|
formatterStudy(row){
|
|
|
let studyCn = ''
|
|
@@ -419,13 +430,28 @@ export default {
|
|
|
this.pageNumber = val
|
|
|
}
|
|
|
let MethodName = "/PaperServer/Manager/IssueManager/PageQueryIssue"
|
|
|
+ let order_column_list = []
|
|
|
+ if(this.dataSort != {}){
|
|
|
+ if(this.dataSort.order=='descending'){
|
|
|
+ order_column_list.push({
|
|
|
+ name: this.dataSort.prop,
|
|
|
+ asc: false
|
|
|
+ })
|
|
|
+ }else if(this.dataSort.order=='ascending'){
|
|
|
+ order_column_list.push({
|
|
|
+ name: this.dataSort.prop,
|
|
|
+ asc: true
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
let data = {
|
|
|
key_word: this.searchInput.trim(),
|
|
|
iss_status: this.searchStatus===-1?null:this.searchStatus,
|
|
|
study_phase: this.searchStudy===-1?null:this.searchStudy,
|
|
|
release_year: this.searchYear===-1?null:this.searchYear,
|
|
|
page_capacity:this.pageSize,
|
|
|
- cur_page:this.pageNumber
|
|
|
+ cur_page:this.pageNumber,
|
|
|
+ order_bys: order_column_list
|
|
|
}
|
|
|
getLogin(MethodName, data)
|
|
|
.then((res) => {
|