|
|
|
@ -16,6 +16,7 @@ |
|
|
|
@size-change="sizeChange" |
|
|
|
@size-change="sizeChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@refresh-change="refreshChange" |
|
|
|
@on-load="onLoad" |
|
|
|
@on-load="onLoad" |
|
|
|
|
|
|
|
@sort-change="sortChange" |
|
|
|
> |
|
|
|
> |
|
|
|
<template #menu-left> </template> |
|
|
|
<template #menu-left> </template> |
|
|
|
<template #menu-right> </template> |
|
|
|
<template #menu-right> </template> |
|
|
|
@ -240,6 +241,20 @@ export default { |
|
|
|
this.query = { taskStatus: '1' }; |
|
|
|
this.query = { taskStatus: '1' }; |
|
|
|
this.onLoad(this.page); |
|
|
|
this.onLoad(this.page); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
// 排序 |
|
|
|
|
|
|
|
sortChange({ prop, order }) { |
|
|
|
|
|
|
|
if (!prop) { |
|
|
|
|
|
|
|
// 如果取消排序,清空排序参数 |
|
|
|
|
|
|
|
this.query.orderByField = undefined; |
|
|
|
|
|
|
|
this.query.isAsc = undefined; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
const orderByField = prop.replace(/([a-z])([A-Z0-9])/g, '$1_$2').toUpperCase(); |
|
|
|
|
|
|
|
this.query.orderByField = orderByField; |
|
|
|
|
|
|
|
this.query.isAsc = order === 'ascending' ? true : false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
// // 重新加载数据 |
|
|
|
|
|
|
|
this.onLoad(this.page, this.query); |
|
|
|
|
|
|
|
}, |
|
|
|
// 加载页面数据 |
|
|
|
// 加载页面数据 |
|
|
|
onLoad(page, params = {}) { |
|
|
|
onLoad(page, params = {}) { |
|
|
|
this.loading = true; |
|
|
|
this.loading = true; |
|
|
|
|