Skip to content

Commit

Permalink
code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mayswind committed Jul 4, 2024
1 parent 09fb474 commit c827675
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/router/desktop.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ const router = createRouter({
initMaxTime: route.query.maxTime,
initMinTime: route.query.minTime,
initType: route.query.type,
initCategoryId: route.query.categoryId,
initAccountId: route.query.accountId,
initCategoryIds: route.query.categoryIds,
initAccountIds: route.query.accountIds,
initAmountFilter: route.query.amountFilter,
initKeyword: route.query.keyword
})
Expand Down
4 changes: 2 additions & 2 deletions src/stores/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ export const useTransactionsStore = defineStore('transactions', {
}

if (this.transactionsFilter.accountId && this.transactionsFilter.accountId !== '0') {
querys.push('accountId=' + this.transactionsFilter.accountId);
querys.push('accountIds=' + this.transactionsFilter.accountId);
}

if (this.transactionsFilter.categoryId && this.transactionsFilter.categoryId !== '0') {
querys.push('categoryId=' + this.transactionsFilter.categoryId);
querys.push('categoryIds=' + this.transactionsFilter.categoryId);
}

querys.push('dateType=' + this.transactionsFilter.dateType);
Expand Down
16 changes: 8 additions & 8 deletions src/views/desktop/transactions/ListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,8 @@ export default {
'initMaxTime',
'initMinTime',
'initType',
'initCategoryId',
'initAccountId',
'initCategoryIds',
'initAccountIds',
'initAmountFilter',
'initKeyword'
],
Expand Down Expand Up @@ -714,8 +714,8 @@ export default {
minTime: this.initMinTime,
maxTime: this.initMaxTime,
type: this.initType,
categoryId: this.initCategoryId,
accountId: this.initAccountId,
categoryIds: this.initCategoryIds,
accountIds: this.initAccountIds,
amountFilter: this.initAmountFilter,
keyword: this.initKeyword
});
Expand Down Expand Up @@ -743,8 +743,8 @@ export default {
minTime: to.query.minTime,
maxTime: to.query.maxTime,
type: to.query.type,
categoryId: to.query.categoryId,
accountId: to.query.accountId,
categoryIds: to.query.categoryIds,
accountIds: to.query.accountIds,
amountFilter: to.query.amountFilter,
keyword: to.query.keyword
});
Expand All @@ -769,8 +769,8 @@ export default {
maxTime: dateRange ? dateRange.maxTime : undefined,
minTime: dateRange ? dateRange.minTime : undefined,
type: parseInt(query.type) > 0 ? parseInt(query.type) : undefined,
categoryId: query.categoryId,
accountId: query.accountId,
categoryId: query.categoryIds,
accountId: query.accountIds,
amountFilter: query.amountFilter || '',
keyword: query.keyword || ''
});
Expand Down

0 comments on commit c827675

Please sign in to comment.