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/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(); } diff --git a/frontend/src/views/audit/index.vue b/frontend/src/views/audit/index.vue index 906db38d3..60d2d9575 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,13 @@ await this.fetchAuditList(); }, + getCellClass ({ row, column, rowIndex, columnIndex }) { + 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 +557,7 @@ limit, current, month: this.currentMonth, - ...this.searchParams + ...this.searchParams }; window.history.replaceState({}, '', `?${buildURLParams(queryParams)}`); for (const key in this.searchParams) { @@ -564,10 +573,10 @@ } } return { - ...params, - limit, - current, - month: this.currentMonth + ...params, + limit, + current, + month: this.currentMonth }; }, @@ -591,7 +600,7 @@ object_type: '', object_id: '', status: '', - ...this.searchParams + ...this.searchParams }; try { const { code, data } = await this.$store.dispatch('audit/getAuditList', params); @@ -704,7 +713,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 +796,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 +814,54 @@ } }; - 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) { 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 @@ 过期成员