Skip to content

Commit

Permalink
feat: 修改任务历史默认时间范围
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 29319
  • Loading branch information
hyunfa committed Jan 15, 2025
1 parent ad70bb8 commit 7a5fcba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions frontend/src/views/task/task-list-filter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:type="'datetimerange'"
:shortcut-close="true"
:use-shortcut-text="true"
:shortcut-selected-index="3"
:shortcut-selected-index="1"
:value="dateTimeRange"
:placeholder="$t('选择日期范围')"
@change="handlePickerChange"
Expand Down Expand Up @@ -57,7 +57,7 @@ export default class PluginRule extends Vue {
@Prop({ type: Array, default: () => {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - (3600 * 1000 * 24 * 30));
start.setTime(start.getTime() - (3600 * 1000 * 24 * 7));
return [start, end];
} }) private readonly dateTimeRange!: Date[];
@Prop({ type: Array, default: () => [
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/task/task-list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export default class TaskList extends Mixins(PollMixin, HeaderFilterMixins)<Dict
private storageKey = 'task_filter_autoDeploy';
private date: Date[] = [];
private dateType: 'date' | Dictionary = {
text: window.i18n.t('近30天'),
text: window.i18n.t('近7天'),
value() {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - (3600 * 1000 * 24 * 30));
start.setTime(start.getTime() - (3600 * 1000 * 24 * 7));
return [start, end];
},
};
Expand Down

0 comments on commit 7a5fcba

Please sign in to comment.