|
@@ -1,6 +1,6 @@
|
|
import T from 'ant-design-vue/es/table/Table'
|
|
import T from 'ant-design-vue/es/table/Table'
|
|
import get from 'lodash.get'
|
|
import get from 'lodash.get'
|
|
-
|
|
|
|
|
|
+import BaseTool from '@/utils/tool'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -194,18 +194,21 @@ export default {
|
|
*/
|
|
*/
|
|
loadData (pagination, filters, sorter) {
|
|
loadData (pagination, filters, sorter) {
|
|
this.localLoading = true
|
|
this.localLoading = true
|
|
|
|
+ const dataScope = {
|
|
|
|
+ }
|
|
|
|
+ sorter && sorter.field && (dataScope.sortName = BaseTool.String.underlineToHump(sorter.field))
|
|
|
|
+
|
|
|
|
+ sorter && sorter.order && (dataScope.sortBy = sorter.order.slice(0, -3))
|
|
const parameter = Object.assign({
|
|
const parameter = Object.assign({
|
|
pageNum: (pagination && pagination.current) ||
|
|
pageNum: (pagination && pagination.current) ||
|
|
this.showPagination && this.localPagination.current || this.pageNum,
|
|
this.showPagination && this.localPagination.current || this.pageNum,
|
|
pageSize: (pagination && pagination.pageSize) ||
|
|
pageSize: (pagination && pagination.pageSize) ||
|
|
this.showPagination && this.localPagination.pageSize || this.pageSize
|
|
this.showPagination && this.localPagination.pageSize || this.pageSize
|
|
},
|
|
},
|
|
- (sorter && sorter.field && {
|
|
|
|
- sortField: sorter.field
|
|
|
|
- }) || {},
|
|
|
|
- (sorter && sorter.order && {
|
|
|
|
- sortOrder: sorter.order
|
|
|
|
- }) || {}, {
|
|
|
|
|
|
+ {
|
|
|
|
+ dataScope: dataScope
|
|
|
|
+ },
|
|
|
|
+ {
|
|
...filters
|
|
...filters
|
|
}
|
|
}
|
|
)
|
|
)
|