| | |
| | | <script setup lang="ts"> |
| | | import { ProTableV2, LoadingLayout, AppContainer, useTable } from '@bole-core/components'; |
| | | import { UsageDetailColumns } from '../constants'; |
| | | import * as taskServices from '@/services/api/task'; |
| | | import { usePersonalUserTransactions } from '../hooks/financeHooks'; |
| | | import * as userServices from '@/services/api/user'; |
| | | |
| | | defineOptions({ |
| | | name: 'UsageDetailView', |
| | |
| | | }; |
| | | |
| | | const state = reactive({ ...BaseState }); |
| | | const { getList, proTableProps } = usePersonalUserTransactions({ |
| | | type: EnumUserWalletTransactionType.Income, |
| | | }); |
| | | const { |
| | | getDataSource: getList, |
| | | proTableProps, |
| | | paginationState, |
| | | extraParamState, |
| | | reset, |
| | | } = useTable( |
| | | async ({ pageIndex, pageSize }, extraParamState) => { |
| | | try { |
| | | let params: API.GetPersonalUserTransactionsQuery = { |
| | | pageModel: { |
| | | rows: pageSize, |
| | | page: pageIndex, |
| | | orderInput: extraParamState.orderInput, |
| | | }, |
| | | type: EnumUserWalletTransactionType.Income, |
| | | }; |
| | | let res = await userServices.getPersonalUserTransactions(params); |
| | | return res; |
| | | } catch (error) {} |
| | | }, |
| | | { |
| | | defaultExtraParams: { |
| | | orderInput: [{ property: 'id', order: EnumPagedListOrder.Asc }], |
| | | }, |
| | | columnsRenderProps: {}, |
| | | } |
| | | ); |
| | | |
| | | onMounted(async () => { |
| | | await getList(); |