feat(公告推送):配置中心-推送管理中增加一个手动推送功能
deploy-hxtesting / build-and-deploy (push) Successful in 1m19s

目的:为和信智汇学院有重要通知时可随时向用户手动推送重要信息使用
推送内容:标题、内容、落地页(均可自定义配置),默认值标题为“和信智汇学院”、内容为“重要通知”、落地页默认系统登录页如果已登录默认登录后系统页面
推送人员:默认全员通知,可根据部门、职位、具体人员进行自定义人员
推送时间:可立即推送也可设定定时推送!
This commit is contained in:
runny committed 2026-11-29 13:41:05 +08:00
1 parent 78e9787793
commit 61fb94744a
14 files changed
+1451 -2

No files matched your search

@@ -139,9 +139,11 @@ const readCount = ref(0)
const trainingItems = ref<TrainingNotification[]>([])
const TRAINING_NOTIFICATION_LIMIT = 50
const trainingUnread = computed(() => trainingItems.value.filter(n => !n.read_at).length)
// 培训通知按 ref_type 定位跳转页面(需求收集通知直达培训计划-年度需求收集)
// 培训通知按 ref_type 定位跳转页面(需求收集通知直达培训计划-年度需求收集;
// 手动推送落地页自定义,点击打开通知行 link_url,缺省回培训首页)
const trainingLinkOf = (n: TrainingNotification) => {
if (n.ref_type === 'plan') return '/platform/training/plan'
if (n.ref_type === 'manual_push' && n.link_url) return n.link_url
return '/platform/training'
}
const toTrainingAppNotification = (n: TrainingNotification): AppNotification => ({
@@ -375,6 +377,8 @@ const openInvitations = () => { panelVisible.value = false; dialogVisible.value
function navigate(link: string) {
panelVisible.value = false
if (link.startsWith('/') && !link.startsWith('//')) void router.push(link)
// 绝对地址(手动推送自定义落地页可指向外部系统):新窗口打开,不打断当前会话
else if (/^https?:\/\//i.test(link)) window.open(link, '_blank', 'noopener')
}
function openPending(item: PendingNotification) { navigate(item.link) }