diff --git a/src/views/trials/trials-panel/trial-summary/data-sync/components/FileList.vue b/src/views/trials/trials-panel/trial-summary/data-sync/components/FileList.vue index 8543fb31..e4ffbf13 100644 --- a/src/views/trials/trials-panel/trial-summary/data-sync/components/FileList.vue +++ b/src/views/trials/trials-panel/trial-summary/data-sync/components/FileList.vue @@ -21,6 +21,17 @@ + + + + + @@ -32,6 +43,21 @@ + + + + + + + + + @@ -201,6 +227,11 @@ const searchDataDefault = () => { UploadRegion: null, TargetRegion: null, IsSync: null, + UploadStartTime: null, + UploadEndTime: null, + SyncFinishedStartTime: null, + SyncFinishedEndTime: null, + Priority: null, Asc: false, SortField: 'UpdateTime', PageIndex: 1, @@ -227,7 +258,8 @@ export default { list: [], total: 0, loading: false, - datetimerange: [], + uploadTimeRange: null, + SyncTimeRange: null, regionOptions: [ { value: 'CN', @@ -363,13 +395,22 @@ export default { if (!size) return return (size / Math.pow(1024, 2)).toFixed(3) + 'MB' }, - handleDatetimeChange(val) { + handleUploadtimeChange(val) { if (val) { - this.searchData.BeginDate = val[0] - this.searchData.EndDate = val[1] + this.searchData.UploadStartTime = val[0] + this.searchData.UploadEndTime = val[1] } else { - this.searchData.BeginDate = '' - this.searchData.EndDate = '' + this.searchData.UploadStartTime = '' + this.searchData.UploadEndTime = '' + } + }, + handleSynctimeChange(val) { + if (val) { + this.searchData.SyncFinishedStartTime = val[0] + this.searchData.SyncFinishedEndTime = val[1] + } else { + this.searchData.SyncFinishedStartTime = '' + this.searchData.SyncFinishedEndTime = '' } }, handleSearch() { @@ -378,7 +419,10 @@ export default { }, // 重置列表查询 handleReset() { - this.datetimerange = null + this.uploadTimeRange = null + this.handleUploadtimeChange() + this.SyncTimeRange = null + this.handleSynctimeChange() this.searchData = searchDataDefault() this.getList() }, diff --git a/src/views/trials/trials-panel/trial-summary/data-sync/components/StudyList.vue b/src/views/trials/trials-panel/trial-summary/data-sync/components/StudyList.vue index 45635c5e..b8277cf1 100644 --- a/src/views/trials/trials-panel/trial-summary/data-sync/components/StudyList.vue +++ b/src/views/trials/trials-panel/trial-summary/data-sync/components/StudyList.vue @@ -31,6 +31,17 @@ + + @@ -42,6 +53,17 @@ + + @@ -146,6 +168,10 @@ const searchDataDefault = () => { UploadRegion: '', TargetRegion: '', IsSync: null, + // UploadStartTime: null, + // UploadEndTime: null, + // SyncFinishedStartTime: null, + // SyncFinishedEndTime: null, PageIndex: 1, PageSize: 20, Asc: true, @@ -179,7 +205,9 @@ export default { } ], fileUploadRecordId: '', - path: '' + path: '', + uploadTimeRange: null, + SyncTimeRange: null, } }, mounted() { @@ -231,13 +259,34 @@ export default { console.log(e) } }, + handleUploadtimeChange(val) { + if (val) { + this.searchData.UploadStartTime = val[0] + this.searchData.UploadEndTime = val[1] + } else { + this.searchData.UploadStartTime = '' + this.searchData.UploadEndTime = '' + } + }, + handleSynctimeChange(val) { + if (val) { + this.searchData.SyncFinishedStartTime = val[0] + this.searchData.SyncFinishedEndTime = val[1] + } else { + this.searchData.SyncFinishedStartTime = '' + this.searchData.SyncFinishedEndTime = '' + } + }, handleSearch() { this.searchData.PageIndex = 1 this.getList() }, // 重置列表查询 handleReset() { - this.datetimerange = null + // this.uploadTimeRange = null + // this.handleUploadtimeChange() + // this.SyncTimeRange = null + // this.handleSynctimeChange() this.searchData = searchDataDefault() this.getList() }, diff --git a/src/views/trials/trials-panel/trial-summary/data-sync/components/TaskList.vue b/src/views/trials/trials-panel/trial-summary/data-sync/components/TaskList.vue index 7c3d079a..d4837f0a 100644 --- a/src/views/trials/trials-panel/trial-summary/data-sync/components/TaskList.vue +++ b/src/views/trials/trials-panel/trial-summary/data-sync/components/TaskList.vue @@ -21,6 +21,28 @@ /> + + + + + + + + {{ $t('common:button:search') }} @@ -91,6 +113,8 @@ const searchDataDefault = () => { JobState: null, FileName: '', Path: '', + StartTime: '', + EndTime: '', Asc: false, SortField: '', PageIndex: 1, @@ -122,6 +146,24 @@ export default { total: 0, loading: false, datetimerange: [], + beginPickerOption: { + disabledDate: time => { + if (this.searchData.EndTime) { + return time.getTime() >= new Date(this.searchData.EndTime).getTime() + } else { + return time.getTime() > Date.now() + } + } + }, + endpickerOption: { + disabledDate: time => { + if (this.searchData.StartTime) { + return time.getTime() > Date.now() || time.getTime() <= new Date(this.searchData.StartTime).getTime() - 86400000 + } else { + return time.getTime() > Date.now() + } + } + } } }, mounted() {