Browse Source

锅炉检验,上下移动报告功能

liyuhui_ex 4 ngày trước cách đây
mục cha
commit
167248fe08

+ 2 - 1
yudao-ui-admin-vue3/src/views/pressure2/boilerchecker/components/InspectionItemList.vue

@@ -569,7 +569,8 @@ const canSyncReport = (item: ReportItemVO): boolean => {
 // 处理报告移动
 const handleMoveReport = async (item: ReportItemVO, direction: 'up' | 'down') => {
   try {
-    const sortList = activeTab.value === 'inspection' ? inspectionItems.value : documentItems.value
+    const groupedList = activeTab.value === 'inspection' ? inspectionItems.value : documentItems.value
+    const sortList = Object.values(groupedList).flat()
     const currentIndex = sortList.findIndex((report) => report.id === item.id)
     if (currentIndex === -1) return