feat(签署文书): 统一签署态文书样式并精简演示种子为单份麻精同意书

This commit is contained in:
yelan
2026-09-24 17:08:12 +08:00
parent 9a6ac93e21
commit 5ea79178cb
30 changed files with 3787 additions and 2878 deletions
+12 -5
View File
@@ -10,7 +10,6 @@ import { useLoginStore } from '@/stores/login'
const loginStore = useLoginStore()
const route = useRoute()
const router = useRouter()
let authorizationTimer: ReturnType<typeof setInterval> | undefined
let authorizationRefreshing = false
async function redirectIfUnauthorized() {
@@ -44,16 +43,24 @@ function handleWindowFocus() {
void refreshAuthorization()
}
/**
* 切标签页回来时浏览器不一定派发 window focus(窗口本身没失焦),
* 所以补一条 visibilitychange,保证「离开页面期间别人改了权限」能立刻收敛。
*/
function handleVisibilityChange() {
if (document.visibilityState === 'visible') {
void refreshAuthorization()
}
}
onMounted(() => {
authorizationTimer = setInterval(() => void refreshAuthorization(), 15_000)
window.addEventListener('focus', handleWindowFocus)
document.addEventListener('visibilitychange', handleVisibilityChange)
})
onUnmounted(() => {
if (authorizationTimer) {
clearInterval(authorizationTimer)
}
window.removeEventListener('focus', handleWindowFocus)
document.removeEventListener('visibilitychange', handleVisibilityChange)
})
watch(