|
|
@ -198,11 +198,15 @@ export default {
|
|
|
|
return this.$route.query.searchText || "";
|
|
|
|
return this.$route.query.searchText || "";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
set(value) {
|
|
|
|
set(value) {
|
|
|
|
|
|
|
|
const newQuery = {
|
|
|
|
|
|
|
|
...this.$route.query,
|
|
|
|
|
|
|
|
searchText: value,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!value) {
|
|
|
|
|
|
|
|
delete newQuery.searchText;
|
|
|
|
|
|
|
|
}
|
|
|
|
this.$router.replace({
|
|
|
|
this.$router.replace({
|
|
|
|
query: {
|
|
|
|
query: newQuery,
|
|
|
|
...this.$route.query,
|
|
|
|
|
|
|
|
searchText: value,
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -286,13 +290,22 @@ export default {
|
|
|
|
* @returns {void}
|
|
|
|
* @returns {void}
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
updateFilter(newFilter) {
|
|
|
|
updateFilter(newFilter) {
|
|
|
|
|
|
|
|
let newQuery = {
|
|
|
|
|
|
|
|
...this.$route.query,
|
|
|
|
|
|
|
|
...newFilter,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
if (!newFilter.status || newFilter.status.length === 0) {
|
|
|
|
|
|
|
|
delete newQuery.status;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!newFilter.active || newFilter.active.length === 0) {
|
|
|
|
|
|
|
|
delete newQuery.active;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!newFilter.tags || newFilter.tags.length === 0) {
|
|
|
|
|
|
|
|
delete newQuery.tags;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$router.replace({
|
|
|
|
this.$router.replace({
|
|
|
|
query: {
|
|
|
|
query: newQuery,
|
|
|
|
...this.$route.query,
|
|
|
|
|
|
|
|
status: newFilter.status,
|
|
|
|
|
|
|
|
active: newFilter.active,
|
|
|
|
|
|
|
|
tags: newFilter.tags,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|