|
@@ -81,6 +81,7 @@
|
|
|
@selection-change="selectionChange"
|
|
|
@select="selectHandle"
|
|
|
@select-all="selectAllHandle"
|
|
|
+ @sort-change="handleSortChange"
|
|
|
>
|
|
|
<!-- 多选 -->
|
|
|
<el-table-column
|
|
@@ -197,7 +198,9 @@ export default {
|
|
|
classify:'',//分类
|
|
|
state:'',//状态
|
|
|
terminalCode:'',//终端编码
|
|
|
- keyWord:''//关键字
|
|
|
+ keyWord:'',//关键字
|
|
|
+ sortType:'',//升序降序
|
|
|
+ sortParam:'',//排序字段
|
|
|
},
|
|
|
hasSelectOption:false,
|
|
|
selectOptionLoading:false,
|
|
@@ -205,7 +208,7 @@ export default {
|
|
|
columns: [
|
|
|
{key: 'EdbInfoId',label: '指标编码'},
|
|
|
{key: 'IndexName',label: '指标全称'},
|
|
|
- {key: 'EndDate',label: '最新日期'},
|
|
|
+ {key: 'EndDate',label: '最新日期',sortable:'custom'},
|
|
|
{key: 'EndValue',label: '最新值'},
|
|
|
{key: 'SysUserRealName',label: '创建人'},
|
|
|
{key: 'Frequency',label: '频度'},
|
|
@@ -362,7 +365,7 @@ export default {
|
|
|
this.getTableData()
|
|
|
},
|
|
|
async getTableData(type){
|
|
|
- const {frequency,user,classify,state,terminalCode,keyWord} = this.selectOption
|
|
|
+ const {frequency,user,classify,state,terminalCode,keyWord,sortParam,sortType} = this.selectOption
|
|
|
const res = await dataRefreshInterface.getEdbTableList({
|
|
|
Source:Number(this.Source),
|
|
|
SubSource:Number(this.SubSource),
|
|
@@ -372,6 +375,8 @@ export default {
|
|
|
Frequency:frequency,
|
|
|
Keyword:keyWord,
|
|
|
Status:state,
|
|
|
+ SortParam:sortParam,
|
|
|
+ SortType:sortType,
|
|
|
PageSize:Number(this.pageSize),
|
|
|
CurrentIndex:Number(this.currentPage)
|
|
|
})
|
|
@@ -574,6 +579,16 @@ export default {
|
|
|
this.getTableData('optionChange')
|
|
|
this.isSetStateDialogShow = false
|
|
|
})
|
|
|
+ },
|
|
|
+ handleSortChange({prop,order}){
|
|
|
+ if(order){
|
|
|
+ this.selectOption.sortParam = 'end_date'
|
|
|
+ this.selectOption.sortType = order==='ascending'?'asc':'desc'
|
|
|
+ }else{
|
|
|
+ this.selectOption.sortParam = ''
|
|
|
+ this.selectOption.sortType = ''
|
|
|
+ }
|
|
|
+ this.selectOptionChange()
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|