From b8391ed22b5724816e31c373751824b6b13c1a87 Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Mon, 8 Apr 2024 09:30:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?bug:=20=E4=BB=A3=E7=A0=81=E5=BA=93-?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?ID=E6=90=9C=E7=B4=A2=20#10114=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=205285?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CodeLibDetail/trigger-event.vue | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue index 1395953e4ce..603ae69ddf9 100644 --- a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue +++ b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue @@ -12,6 +12,7 @@ :shortcuts="shortcuts" :key="repoId" @change="handleChangeDaterange" + @pick-success="handlePickSuccess" > { - this.handleRefresh() + this.daterange = this.setDefaultDaterange() }, 1000) } } @@ -394,8 +399,8 @@ cursor: pointer; } .date-picker { - max-width: 300px; - min-width: 200px; + max-width: 400px; + min-width: 340px; } .search-select { width: 100%; From f9ba36149d311fbb24f5b4bcd31af87dc0c5588a Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Mon, 8 Apr 2024 09:48:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?bug:=20=E4=BB=A3=E7=A0=81=E5=BA=93-?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?ID=E6=90=9C=E7=B4=A2=20#10114=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=205295?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/CodeLibDetail/trigger-event.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue index 603ae69ddf9..4da4065a23a 100644 --- a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue +++ b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue @@ -11,6 +11,7 @@ }" :shortcuts="shortcuts" :key="repoId" + @clear="handleClearDaterange" @change="handleChangeDaterange" @pick-success="handlePickSuccess" > @@ -354,11 +355,16 @@ this.getListData() }, + handleClearDaterange () { + this.daterange = ['', ''] + }, + handleChangeDaterange (date, type) { const startTime = new Date(date[0]).getTime() || '' const endTime = new Date(date[1]).getTime() || '' this.daterangeCache = [startTime, endTime] }, + handlePickSuccess () { this.daterange = this.daterangeCache }, From 094d0e230b59678fb599a658c98b40056aadaf13 Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Mon, 8 Apr 2024 12:06:23 +0800 Subject: [PATCH 3/5] =?UTF-8?q?bug:=20=E4=BB=A3=E7=A0=81=E5=BA=93-?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?ID=E6=90=9C=E7=B4=A2=20#10114=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=205320?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/CodeLibDetail/trigger-event.vue | 2 ++ .../devops-codelib/src/views/Index.vue | 18 ++++-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue index 4da4065a23a..6b0f59b6a7e 100644 --- a/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue +++ b/src/frontend/devops-codelib/src/components/CodeLibDetail/trigger-event.vue @@ -58,6 +58,7 @@ @@ -370,6 +371,7 @@ }, async handleRefresh () { + this.page = 1 this.pageLoading = true this.hasLoadEnd = false await this.getListData() diff --git a/src/frontend/devops-codelib/src/views/Index.vue b/src/frontend/devops-codelib/src/views/Index.vue index af2ae6c96c2..f9f8edc72d6 100755 --- a/src/frontend/devops-codelib/src/views/Index.vue +++ b/src/frontend/devops-codelib/src/views/Index.vue @@ -281,13 +281,6 @@ sortType = this.sortType ) { if (!this.userId) this.isLoading = true - this.$router.push({ - query: { - ...this.$route.query, - sortBy, - sortType - } - }) await this.requestList({ projectId, aliasName, @@ -352,13 +345,10 @@ this.sortBy = sortBy this.sortType = sortType this.refreshCodelibList() - if (sortBy && sortType) { - localStorage.setItem('codelibSortType', sortType) - localStorage.setItem('codelibSortBy', sortBy) - } else { - localStorage.removeItem('codelibSortType') - localStorage.removeItem('codelibSortBy') - } + localStorage.setItem('codelibSortType', sortType) + localStorage.setItem('codelibSortBy', sortBy) + const queryKeys = Object.keys((this.$route?.query)) + if (!queryKeys.length) return this.$router.push({ query: { ...this.$route.query, From ddb08cf8330ed2a62166e3394220eb99d860573a Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Mon, 8 Apr 2024 17:41:56 +0800 Subject: [PATCH 4/5] =?UTF-8?q?bug:=20=E4=BB=A3=E7=A0=81=E5=BA=93-?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?ID=E6=90=9C=E7=B4=A2=20#10114=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=205375?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/devops-codelib/src/views/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/devops-codelib/src/views/Index.vue b/src/frontend/devops-codelib/src/views/Index.vue index f9f8edc72d6..6a5abce7e30 100755 --- a/src/frontend/devops-codelib/src/views/Index.vue +++ b/src/frontend/devops-codelib/src/views/Index.vue @@ -347,7 +347,7 @@ this.refreshCodelibList() localStorage.setItem('codelibSortType', sortType) localStorage.setItem('codelibSortBy', sortBy) - const queryKeys = Object.keys((this.$route?.query)) + const queryKeys = Object.keys(this.$route?.query) if (!queryKeys.length) return this.$router.push({ query: { From a275d3e8487b303c8b4f4858602995fb197e03a1 Mon Sep 17 00:00:00 2001 From: v_hwweng Date: Mon, 8 Apr 2024 17:51:16 +0800 Subject: [PATCH 5/5] =?UTF-8?q?bug:=20=E4=BB=A3=E7=A0=81=E5=BA=93-?= =?UTF-8?q?=E8=A7=A6=E5=8F=91=E4=BA=8B=E4=BB=B6=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=94=B9=E6=88=90=E6=B5=81=E6=B0=B4=E7=BA=BF?= =?UTF-8?q?ID=E6=90=9C=E7=B4=A2=20#10114=20#=20Reviewed,=20transaction=20i?= =?UTF-8?q?d:=205377?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/frontend/devops-codelib/src/views/Index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/devops-codelib/src/views/Index.vue b/src/frontend/devops-codelib/src/views/Index.vue index 6a5abce7e30..9b922ed20ce 100755 --- a/src/frontend/devops-codelib/src/views/Index.vue +++ b/src/frontend/devops-codelib/src/views/Index.vue @@ -347,7 +347,7 @@ this.refreshCodelibList() localStorage.setItem('codelibSortType', sortType) localStorage.setItem('codelibSortBy', sortBy) - const queryKeys = Object.keys(this.$route?.query) + const queryKeys = Object.keys(this.$route?.query || {}) if (!queryKeys.length) return this.$router.push({ query: {