From 937e564d84601226d26757dfa9aa668bac2311ea Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Wed, 15 May 2024 15:26:11 +0800 Subject: [PATCH 1/5] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89catch=E6=8B=A6?= =?UTF-8?q?=E6=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/renewal-notice/index.vue | 26 +++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/frontend/src/views/renewal-notice/index.vue b/frontend/src/views/renewal-notice/index.vue index ea48e9a53..05ea9e910 100644 --- a/frontend/src/views/renewal-notice/index.vue +++ b/frontend/src/views/renewal-notice/index.vue @@ -326,27 +326,29 @@ return; } this.submitLoading = true; - try { - const typeMap = { - submit: async () => { + const typeMap = { + submit: async () => { + try { if (JSON.stringify(this.noticeForm) !== JSON.stringify(this.noticeFormReset)) { await this.fetchSuperNoticeConfig(true, false, false); } await this.$store.dispatch('renewalNotice/updateSuperNoticeConfig', this.noticeForm); this.messageSuccess(this.$t(`m.info['保存成功']`), 3000); - }, - status: async () => { + } finally { + this.submitLoading = false; + } + }, + status: async () => { + try { await this.$store.dispatch('renewalNotice/updateSuperNoticeConfig', this.noticeForm); const msg = this.noticeForm.enable ? this.$t(`m.renewalNotice['开启成功']`) : this.$t(`m.renewalNotice['关闭成功']`); this.messageSuccess(msg, 3000); + } finally { + this.submitLoading = false; } - }; - typeMap[payload](); - } catch (e) { - this.messageAdvancedError(e); - } finally { - this.submitLoading = false; - } + } + }; + return typeMap[payload](); }, handleSelectNoticeType (payload) { From 569b234b1dd52b38c536d4b4a739ebe9c8fc90f3 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Thu, 16 May 2024 10:35:15 +0800 Subject: [PATCH 2/5] =?UTF-8?q?fix:=20=E7=AE=A1=E7=90=86=E7=A9=BA=E9=97=B4?= =?UTF-8?q?=E3=80=81=E7=94=A8=E6=88=B7=E7=BB=84=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E7=9B=B4=E6=8E=A5=E8=AE=BF=E9=97=AE=E4=BC=9A?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E5=90=91=E5=88=B0=E5=AF=B9=E5=BA=94=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/router/index.js | 43 ++++++++++++------------------------ 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/frontend/src/router/index.js b/frontend/src/router/index.js index 44bdd651d..fc2814042 100644 --- a/frontend/src/router/index.js +++ b/frontend/src/router/index.js @@ -200,8 +200,8 @@ export const beforeEach = async (to, from, next) => { if (existValue('externalApp') || to.query.noFrom) { next(); } else { - // next(); - next({ path: `${SITE_URL}${defaultRoute[navIndex]}` }); + next(); + // next({ path: `${SITE_URL}${defaultRoute[navIndex]}` }); } } else { next(); @@ -295,35 +295,20 @@ export const beforeEach = async (to, from, next) => { // next(); } else { const noFrom = !from.name; - // permTemplateCreate if (['permTemplateDetail', 'permTemplateEdit', 'permTemplateDiff'].includes(to.name) && noFrom) { next({ path: `${SITE_URL}perm-template` }); - // } else if (['createUserGroup', 'userGroupDetail'].includes(to.name) && noFrom) { - // } else if (['createUserGroup'].includes(to.name) && noFrom) { - } else if (['createUserGroup'].includes(to.name)) { - if (noFrom) { - if (existValue('externalApp')) { - next(); - } else { - next({ path: `${SITE_URL}${defaultRoute[navIndex]}` }); - } - } else { - next(); - } - // if (existValue('externalApp')) { // 如果是外部嵌入的页面 - // next(); - // } else { - // next({ path: `${SITE_URL}user-group` }); - // } - // 这里刷新staff菜单会跳转分级管理员列表,所以单独处理 - } else if (['gradingAdminDetail', 'gradingAdminCreate'].includes(to.name) && !['', 'staff'].includes(curRole)) { - if (noFrom) { - next({ path: `${SITE_URL}rating-manager` }); - } else { - next(); - } - } else if (['gradingAdminEdit', 'myPerm'].includes(to.name)) { - next(); + // } else if (['createUserGroup'].includes(to.name)) { + // if (noFrom) { + // if (existValue('externalApp')) { + // next(); + // } else { + // next({ path: `${SITE_URL}${defaultRoute[navIndex]}` }); + // } + // } else { + // next(); + // } + // } else if (['myPerm'].includes(to.name)) { + // next(); } else { next(); } From 4b47265614a83c95b38400d46e3e574de6d067b8 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Tue, 21 May 2024 16:53:36 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feature;=20=E5=AE=A1=E8=AE=A1=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E5=A2=9E=E5=8A=A0=E7=BB=AD=E6=9C=9F=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E4=B8=9A=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/language/lang/en.js | 1 + frontend/src/language/lang/zh.js | 1 + frontend/src/views/audit/index.vue | 117 +++++++++++++++++------------ 3 files changed, 69 insertions(+), 50 deletions(-) diff --git a/frontend/src/language/lang/en.js b/frontend/src/language/lang/en.js index d84ccdc20..796075f5a 100644 --- a/frontend/src/language/lang/en.js +++ b/frontend/src/language/lang/en.js @@ -1182,6 +1182,7 @@ export const m = { '管理类API白名单创建': 'Management class API whitelist create', '管理类API白名单删除': 'Management class API whitelist delete', '操作敏感等级更新': 'Action sensitivity level update', + '续期通知更新': 'Renewal notice update', '回滚事件': 'Rollback event', '管理空间用户组成员续期': 'Management space group members renew', '用户组成员续期': 'Group members renew', diff --git a/frontend/src/language/lang/zh.js b/frontend/src/language/lang/zh.js index e44f22ff9..82dbcdb8b 100644 --- a/frontend/src/language/lang/zh.js +++ b/frontend/src/language/lang/zh.js @@ -1177,6 +1177,7 @@ export const m = { '管理类API白名单创建': '管理类API白名单创建', '管理类API白名单删除': '管理类API白名单删除', '操作敏感等级更新': '操作敏感等级更新', + '续期通知更新': '续期通知更新', '回滚事件': '回滚事件', '管理空间用户组成员续期': '管理空间用户组成员续期', '用户组成员续期': '用户组成员续期', diff --git a/frontend/src/views/audit/index.vue b/frontend/src/views/audit/index.vue index 906db38d3..a41168dcb 100644 --- a/frontend/src/views/audit/index.vue +++ b/frontend/src/views/audit/index.vue @@ -27,6 +27,7 @@ ref="tableRef" row-key="id" v-bkloading="{ isLoading: tableLoading, opacity: 1 }" + :cell-class-name="getCellClass" @page-change="pageChange" @page-limit-change="limitChange" @expand-change="handleExpandChange"> @@ -399,7 +400,8 @@ 'management.api.allow.list.config.create': this.$t(`m.audit['管理类API白名单创建']`), 'management.api.allow.list.config.delete': this.$t(`m.audit['管理类API白名单删除']`), 'group.transfer': this.$t(`m.audit['用户组权限交接']`), - 'action.sensitivity.level.update': this.$t(`m.audit['操作敏感等级更新']`) + 'action.sensitivity.level.update': this.$t(`m.audit['操作敏感等级更新']`), + 'role.update.notification.config': this.$t(`m.audit['续期通知更新']`) }, currentMonth: '', noDetailType: NO_DETAIL_TYPE, @@ -541,6 +543,14 @@ await this.fetchAuditList(); }, + getCellClass ({ row, column, rowIndex, columnIndex }) { + console.log(row); + if (columnIndex === 0 && ['role.update.notification.config'].includes(row.type)) { + return 'audit-renewal-notice-cell-cls'; + } + return ''; + }, + refreshCurrentQuery () { const { limit, current } = this.pagination; const params = {}; @@ -548,7 +558,7 @@ limit, current, month: this.currentMonth, - ...this.searchParams + ...this.searchParams }; window.history.replaceState({}, '', `?${buildURLParams(queryParams)}`); for (const key in this.searchParams) { @@ -564,10 +574,10 @@ } } return { - ...params, - limit, - current, - month: this.currentMonth + ...params, + limit, + current, + month: this.currentMonth }; }, @@ -591,7 +601,7 @@ object_type: '', object_id: '', status: '', - ...this.searchParams + ...this.searchParams }; try { const { code, data } = await this.$store.dispatch('audit/getAuditList', params); @@ -704,7 +714,8 @@ { id: 'authorization.api.allow.list.config.delete', name: this.$t(`m.audit['授权类API白名单删除']`) }, { id: 'management.api.allow.list.config.create', name: this.$t(`m.audit['管理类API白名单创建']`) }, { id: 'management.api.allow.list.config.delete', name: this.$t(`m.audit['管理类API白名单删除']`) }, - { id: 'action.sensitivity.level.update', name: this.$t(`m.audit['操作敏感等级更新']`) } + { id: 'action.sensitivity.level.update', name: this.$t(`m.audit['操作敏感等级更新']`) }, + { id: 'role.update.notification.config', name: this.$t(`m.audit['续期通知更新']`) } ]; if (value === '') { return Promise.resolve(list); @@ -786,7 +797,7 @@ }); } if (this.onlyExtraInfoType.includes(row.detail.type)) { - if (row.detail.type !== 'role.group.renew' && row.detail.type !== 'template.version.sync') { + if (!['role.group.renew', 'template.version.sync'].includes(row.detail.type)) { row.detail.extra_info.policies.forEach(item => { item.system_id = row.detail.extra_info.system.id; item.system_name = row.detail.extra_info.system.name; @@ -804,48 +815,54 @@ } }; - From 7e18c90d059952a08579fba1e2948101ed444aa4 Mon Sep 17 00:00:00 2001 From: lhzzforever Date: Tue, 21 May 2024 16:55:00 +0800 Subject: [PATCH 4/5] =?UTF-8?q?fix:=20=E5=8E=BB=E6=8E=89log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/views/audit/index.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/views/audit/index.vue b/frontend/src/views/audit/index.vue index a41168dcb..60d2d9575 100644 --- a/frontend/src/views/audit/index.vue +++ b/frontend/src/views/audit/index.vue @@ -544,7 +544,6 @@ }, getCellClass ({ row, column, rowIndex, columnIndex }) { - console.log(row); if (columnIndex === 0 && ['role.update.notification.config'].includes(row.type)) { return 'audit-renewal-notice-cell-cls'; } From f62e26e8114df36a723ccc2a40eccb64a7f84202 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=8D=E9=81=A5=E5=B0=8A=E8=80=85?= <46641918+lhzzforever@users.noreply.github.com> Date: Wed, 22 May 2024 12:00:38 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=E9=82=AE=E4=BB=B6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E8=A1=A8=E6=A0=BC=E6=96=87=E5=AD=97=E4=BF=AE=E6=94=B9=20(#2671?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- saas/resources/templates/group_expired_mail.html | 2 +- saas/resources/templates/user_expired_mail.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/saas/resources/templates/group_expired_mail.html b/saas/resources/templates/group_expired_mail.html index f66a7e347..5ce722175 100644 --- a/saas/resources/templates/group_expired_mail.html +++ b/saas/resources/templates/group_expired_mail.html @@ -231,7 +231,7 @@ 过期成员 - 到期时间 + 有效期 diff --git a/saas/resources/templates/user_expired_mail.html b/saas/resources/templates/user_expired_mail.html index 2a3c0691b..ec4f72af4 100644 --- a/saas/resources/templates/user_expired_mail.html +++ b/saas/resources/templates/user_expired_mail.html @@ -240,7 +240,7 @@ 所属系统 - 到期时间 + 有效期 @@ -298,7 +298,7 @@ 描述 - 到期时间 + 有效期