fix: remove duplicate permissionMap declaration and eliminate infinite polling interval in stocktake page

This commit is contained in:
DXC
2026-03-23 11:03:55 +08:00
parent 6dfc540dc1
commit 2574da03e5
2 changed files with 0 additions and 48 deletions

View File

@ -473,9 +473,6 @@ const inputQty = ref<number | undefined>(undefined)
const inputRemark = ref('')
const qtyInputRef = ref()
// ★ 新增: 多人协同心跳刷新定时器
let syncTimer: any = null
// ★ 新增: 静默刷新数据不弹loading
const syncData = async () => {
try {
@ -592,19 +589,8 @@ async function fetchBorrowedQuantities(items: StockItem[]): Promise<void> {
onMounted(async () => {
await checkServerDraft()
// ★ 启动多人协同心跳轮询每5秒静默刷新
syncTimer = setInterval(() => {
syncData()
}, 5000)
})
// ★ 新增: 组件卸载时清除定时器
onUnmounted(() => {
if (syncTimer) {
clearInterval(syncTimer)
syncTimer = null
}
})
const checkServerDraft = async () => {
try {