1
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<!-- 表格区域 -->
|
<!-- 表格区域 -->
|
||||||
<template #table>
|
<template #table>
|
||||||
<el-table :data="list" v-loading="loading" border stripe :default-sort="{prop: 'createTime', order: 'descending'}">
|
<el-table :data="list" v-loading="loading" border stripe :default-sort="{prop: 'createTime', order: 'descending'}" @sort-change="handleSortChange">
|
||||||
<el-table-column label="ID" prop="id" width="80" />
|
<el-table-column label="ID" prop="id" width="80" />
|
||||||
<el-table-column label="内部单号" prop="remark" width="160" sortable/>
|
<el-table-column label="内部单号" prop="remark" width="160" sortable/>
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="赔付金额" prop="proPriceAmount" width="140"/>
|
<el-table-column label="赔付金额" prop="proPriceAmount" width="140"/>
|
||||||
|
|
||||||
<el-table-column label="创建时间" prop="createTime" width="160">
|
<el-table-column label="创建时间" prop="createTime" width="160" sortable="custom">
|
||||||
<template slot-scope="scope">{{ parseTime(scope.row.createTime) }}</template>
|
<template slot-scope="scope">{{ parseTime(scope.row.createTime) }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="完成时间" prop="finishTime" width="160">
|
<el-table-column label="完成时间" prop="finishTime" width="160">
|
||||||
@@ -182,7 +182,9 @@ export default {
|
|||||||
address: undefined,
|
address: undefined,
|
||||||
status: undefined,
|
status: undefined,
|
||||||
beginTime: null,
|
beginTime: null,
|
||||||
endTime: null
|
endTime: null,
|
||||||
|
orderBy: 'create_time',
|
||||||
|
isAsc: 'desc'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -281,6 +283,9 @@ export default {
|
|||||||
beginTime: null,
|
beginTime: null,
|
||||||
endTime: null
|
endTime: null
|
||||||
}
|
}
|
||||||
|
// 重置排序为默认降序
|
||||||
|
this.queryParams.orderBy = 'create_time'
|
||||||
|
this.queryParams.isAsc = 'desc'
|
||||||
// 重置后重新设置默认日期为今天
|
// 重置后重新设置默认日期为今天
|
||||||
this.setDefaultDateRange()
|
this.setDefaultDateRange()
|
||||||
this.getListWithFallback()
|
this.getListWithFallback()
|
||||||
@@ -295,6 +300,25 @@ export default {
|
|||||||
this.queryParams.endTime = null
|
this.queryParams.endTime = null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/** 表格排序变化处理 */
|
||||||
|
handleSortChange(sortInfo) {
|
||||||
|
if (sortInfo && sortInfo.prop === 'createTime') {
|
||||||
|
if (sortInfo.order === 'ascending') {
|
||||||
|
this.queryParams.orderBy = 'create_time'
|
||||||
|
this.queryParams.isAsc = 'asc'
|
||||||
|
} else if (sortInfo.order === 'descending') {
|
||||||
|
this.queryParams.orderBy = 'create_time'
|
||||||
|
this.queryParams.isAsc = 'desc'
|
||||||
|
} else {
|
||||||
|
// 取消排序,恢复默认
|
||||||
|
this.queryParams.orderBy = 'create_time'
|
||||||
|
this.queryParams.isAsc = 'desc'
|
||||||
|
}
|
||||||
|
// 重新查询数据
|
||||||
|
this.queryParams.pageNum = 1
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
toYuan(n) {
|
toYuan(n) {
|
||||||
if (n == null || n === '') return ''
|
if (n == null || n === '') return ''
|
||||||
const num = Number(n)
|
const num = Number(n)
|
||||||
|
|||||||
Reference in New Issue
Block a user