Pārlūkot izejas kodu

删除分盒后取消选择数据

duy 2 gadi atpakaļ
vecāks
revīzija
ab4b6e2106
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 7 0
      src/views/file/collection.vue

+ 7 - 0
src/views/file/collection.vue

@@ -732,6 +732,7 @@ const singleCheck=async({row})=>{
   let isCheck=false
     let checkrow=JSON.parse(JSON.stringify(row))
     if(checkrow.checked===false||checkrow.checked===undefined){
+      
         if( checkList.value.length>0){
             let arr=checkList.value.filter(e => e.id === checkrow.id)
             if(arr.length>0){
@@ -744,10 +745,12 @@ const singleCheck=async({row})=>{
                
             }else{
               isCheck=false
+                row.tableindex=tableindex.value
                 checkList.value.push(row)
             }
           
         }else{
+            row.tableindex=tableindex.value
             checkList.value.push(row)
         }
       
@@ -786,6 +789,10 @@ const sortingTableSelection = (rows,list,index) => {
 //删除
 const sortingDelData = (row,index) => {
     sortingItemData.value.splice(index,1);
+    console.log(checkList.value,'checkList.value');
+    // checkList.value=[]
+    //过滤掉当前选择的文件
+    checkList.value= checkList.value.filter(e => e.tableindex !== index)
     if(row.boxNumber){
         delMessage(async () => {
             const { error, code } = await archiveFileApi.removeAllocation({