From 2574da03e5136dedc99217f61ee90e4bdeaeee2b Mon Sep 17 00:00:00 2001 From: DXC Date: Mon, 23 Mar 2026 11:03:55 +0800 Subject: [PATCH] fix: remove duplicate permissionMap declaration and eliminate infinite polling interval in stocktake page --- .../src/views/stock/inbound/semi.vue | 34 ------------------- .../src/views/stock/stocktake/index.vue | 14 -------- 2 files changed, 48 deletions(-) diff --git a/inventory-web/src/views/stock/inbound/semi.vue b/inventory-web/src/views/stock/inbound/semi.vue index eb7e641..f38c136 100644 --- a/inventory-web/src/views/stock/inbound/semi.vue +++ b/inventory-web/src/views/stock/inbound/semi.vue @@ -808,40 +808,6 @@ const stockColumns = [ ] const allColumns = [...baseColumns, ...stockColumns] -// 列与权限Code的映射关系(数据库中的code) -const permissionMap: Record = { - id: 'inbound_semi:id', - base_id: 'inbound_semi:base_id', - company_name: 'inbound_semi:company_name', - material_name: 'inbound_semi:material_name', - category: 'inbound_semi:category', - material_type: 'inbound_semi:material_type', - spec_model: 'inbound_semi:spec_model', - unit: 'inbound_semi:unit', - sku: 'inbound_semi:sku', - inbound_date: 'inbound_semi:inbound_date', - barcode: 'inbound_semi:barcode', - sn_bn: 'inbound_semi:sn_bn', - status: 'inbound_semi:status', - quality_status: 'inbound_semi:quality_status', - qty_inbound: 'inbound_semi:qty_inbound', - qty_stock: 'inbound_semi:qty_stock', - qty_available: 'inbound_semi:qty_available', - warehouse_loc: 'inbound_semi:warehouse_loc', - bom_code: 'inbound_semi:bom_code', - bom_version: 'inbound_semi:bom_version', - work_order_code: 'inbound_semi:work_order_code', - raw_material_cost: 'inbound_semi:raw_material_cost', - unit_total_cost: 'inbound_semi:unit_total_cost', - total_price: 'inbound_semi:total_price', - production_manager: 'inbound_semi:production_manager', - production_start_time: 'inbound_semi:production_start_time', - production_end_time: 'inbound_semi:production_end_time', - arrival_photo: 'inbound_semi:arrival_photo', - quality_report_link: 'inbound_semi:quality_report_link', - detail_link: 'inbound_semi:detail_link', -} - // 根据用户权限初始化列显示状态 // 初始化列显示状态(移除权限限制,添加 localStorage 支持) const initColumnPermissions = () => { diff --git a/inventory-web/src/views/stock/stocktake/index.vue b/inventory-web/src/views/stock/stocktake/index.vue index 957df10..a6cd010 100644 --- a/inventory-web/src/views/stock/stocktake/index.vue +++ b/inventory-web/src/views/stock/stocktake/index.vue @@ -473,9 +473,6 @@ const inputQty = ref(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 { onMounted(async () => { await checkServerDraft() - // ★ 启动多人协同心跳轮询(每5秒静默刷新) - syncTimer = setInterval(() => { - syncData() - }, 5000) }) -// ★ 新增: 组件卸载时清除定时器 -onUnmounted(() => { - if (syncTimer) { - clearInterval(syncTimer) - syncTimer = null - } -}) const checkServerDraft = async () => { try {