mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 15:07:33 +08:00
add keyword parameters to the URL when searching for transaction descriptions in the desktop transaction list
This commit is contained in:
@@ -99,7 +99,8 @@ const router = createRouter({
|
||||
initMinTime: route.query.minTime,
|
||||
initType: route.query.type,
|
||||
initCategoryId: route.query.categoryId,
|
||||
initAccountId: route.query.accountId
|
||||
initAccountId: route.query.accountId,
|
||||
initKeyword: route.query.keyword
|
||||
})
|
||||
},
|
||||
{
|
||||
|
||||
@@ -473,6 +473,10 @@ export const useTransactionsStore = defineStore('transactions', {
|
||||
querys.push('minTime=' + this.transactionsFilter.minTime);
|
||||
}
|
||||
|
||||
if (this.transactionsFilter.keyword) {
|
||||
querys.push('keyword=' + encodeURIComponent(this.transactionsFilter.keyword));
|
||||
}
|
||||
|
||||
return querys.join('&');
|
||||
},
|
||||
loadTransactions({ reload, count, page, withCount, autoExpand, defaultCurrency }) {
|
||||
|
||||
@@ -405,7 +405,8 @@ export default {
|
||||
'initMinTime',
|
||||
'initType',
|
||||
'initCategoryId',
|
||||
'initAccountId'
|
||||
'initAccountId',
|
||||
'initKeyword'
|
||||
],
|
||||
data() {
|
||||
const { mdAndUp } = useDisplay();
|
||||
@@ -636,7 +637,8 @@ export default {
|
||||
maxTime: this.initMaxTime,
|
||||
type: this.initType,
|
||||
categoryId: this.initCategoryId,
|
||||
accountId: this.initAccountId
|
||||
accountId: this.initAccountId,
|
||||
keyword: this.initKeyword
|
||||
});
|
||||
},
|
||||
setup() {
|
||||
@@ -663,7 +665,8 @@ export default {
|
||||
maxTime: to.query.maxTime,
|
||||
type: to.query.type,
|
||||
categoryId: to.query.categoryId,
|
||||
accountId: to.query.accountId
|
||||
accountId: to.query.accountId,
|
||||
keyword: to.query.keyword
|
||||
});
|
||||
}
|
||||
},
|
||||
@@ -688,9 +691,11 @@ export default {
|
||||
type: parseInt(query.type) > 0 ? parseInt(query.type) : undefined,
|
||||
categoryId: query.categoryId,
|
||||
accountId: query.accountId,
|
||||
keyword: this.searchKeyword
|
||||
keyword: query.keyword || ''
|
||||
});
|
||||
|
||||
this.searchKeyword = query.keyword || '';
|
||||
|
||||
this.currentPage = 1;
|
||||
this.reload(false);
|
||||
},
|
||||
@@ -874,7 +879,9 @@ export default {
|
||||
});
|
||||
|
||||
this.currentPage = 1;
|
||||
this.reload(false);
|
||||
this.currentPageTransactions = [];
|
||||
this.transactionsStore.clearTransactions();
|
||||
this.$router.push(this.getFilterLinkUrl());
|
||||
},
|
||||
add() {
|
||||
const self = this;
|
||||
|
||||
Reference in New Issue
Block a user