From de18cca83738bdf6b279046e34b910ccd5b73a84 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 07 三月 2024 08:17:50 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override

---
 north-glass-erp/northglass-erp/src/hook/mouseMove.ts |   45 +++++++++++++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 16 deletions(-)

diff --git a/north-glass-erp/northglass-erp/src/hook/mouseMove.ts b/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
index d4e0696..c681de7 100644
--- a/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
+++ b/north-glass-erp/northglass-erp/src/hook/mouseMove.ts
@@ -399,17 +399,17 @@
 
 
             // //杩欓噷闇�瑕佹槸visibleData
-            // let tableData = getTablexGrid().getTableData().visibleData//鑾峰彇澶勭悊鏉′欢涔嬪悗鐨勫叏閲忚〃浣撴暟鎹�
-            // let rowStart = selectionStart.rowIndex//鑾峰彇閫変腑璧峰琛岀储寮�
-            // let rowEnd = selectionEnd.rowIndex//鑾峰彇閫変腑缁撴潫琛岀储寮�
-            // let selectRows = tableData.filter((col, index: number) => {//col鍙傛暟涓嶈兘鏀瑰惁鍒欎細鑾峰彇涓嶅埌鏁版嵁
-            //     //杩欓噷淇敼浠庡彸涓嬪線宸︿笂鎷栧姩鐨勬暟鎹樉绀�
-            //     if (rowStart <= rowEnd) {
-            //         return rowStart <= index && rowEnd >= index
-            //     } else {
-            //         return rowStart >= index && rowEnd <= index
-            //     }
-            // })
+            let tableData = getTablexGrid().getTableData().visibleData//鑾峰彇澶勭悊鏉′欢涔嬪悗鐨勫叏閲忚〃浣撴暟鎹�
+            let rowStart = selectionStart.rowIndex//鑾峰彇閫変腑璧峰琛岀储寮�
+            let rowEnd = selectionEnd.rowIndex//鑾峰彇閫変腑缁撴潫琛岀储寮�
+            let selectRows = tableData.filter((col, index: number) => {//col鍙傛暟涓嶈兘鏀瑰惁鍒欎細鑾峰彇涓嶅埌鏁版嵁
+                //杩欓噷淇敼浠庡彸涓嬪線宸︿笂鎷栧姩鐨勬暟鎹樉绀�
+                if (rowStart <= rowEnd) {
+                    return rowStart <= index && rowEnd >= index
+                } else {
+                    return rowStart >= index && rowEnd <= index
+                }
+            })
             // console.log("榧犳爣閫変腑琛�:", JSON.stringify(selectRows))
 
             //杩欓噷闇�瑕佹槸visibleColumn
@@ -423,13 +423,26 @@
                 } else {
                     return colStart >= index && colEnd <= index
                 }
-
             })
-            return  {
-                start:selectionStart.rowIndex,//寮�濮嬭
-                end : selectionEnd.rowIndex,//缁撴潫琛�
-                cell:selectCols[0].field//閫変腑鍒�
+
+
+            let result=null
+            if(selectRows.length===0){
+                return false
             }
+            result =  {
+                start:selectionStart.rowIndex,//寮�濮嬭
+                end: selectionEnd.rowIndex,//缁撴潫琛�
+                cell:selectCols[0].field,//閫変腑鍒楋紝
+                row:selectRows
+            }
+
+            selectionStart.rowIndex=-1
+            selectionStart.cellIndex=-1
+            selectionEnd.rowIndex=-1
+            selectionEnd.cellIndex=-1
+
+            return  result
             //console.log("榧犳爣閫変腑鍒�:", JSON.stringify(selectCols))
 
 

--
Gitblit v1.8.0