Showing
1 changed file
with
5 additions
and
2 deletions
| ... | ... | @@ -33,6 +33,9 @@ |
| 33 | 33 | submitFunc: async () => { |
| 34 | 34 | getDataSource(); |
| 35 | 35 | }, |
| 36 | + resetFunc: async () => { | |
| 37 | + getDataSource({}); | |
| 38 | + }, | |
| 36 | 39 | }); |
| 37 | 40 | |
| 38 | 41 | const paginationChange = (page: number, pageSize: number) => { |
| ... | ... | @@ -54,10 +57,10 @@ |
| 54 | 57 | |
| 55 | 58 | const dataSource = ref<TaskRecordType[]>([]); |
| 56 | 59 | const loading = ref(false); |
| 57 | - const getDataSource = async () => { | |
| 60 | + const getDataSource = async (params?: Recordable) => { | |
| 58 | 61 | try { |
| 59 | 62 | loading.value = true; |
| 60 | - const params = getFieldsValue(); | |
| 63 | + params = params || getFieldsValue(); | |
| 61 | 64 | const { items, total } = await getTaskCenterList({ |
| 62 | 65 | page: pagination.current, |
| 63 | 66 | pageSize: pagination.pageSize, | ... | ... |