duy 1 year ago
parent
commit
98466fefca

+ 0 - 20
src/views/debit-pay/admin/components/middlepay/addModal.vue

@@ -667,19 +667,6 @@ const closeQual = ()=>{
     qualityMoadal.value = false
 }
 const finishModal = (rows, cancelcheck)=>{
-    // 使用reduce方法进行去重
-    const uniqueArray = rows.reduce((acc, current) => {
-    // 检查当前对象的某个字段是否已存在于累积数组中
-    const x = acc.find(item => item.selectId === current.selectId)
-    
-    // 如果不存在,则将其添加到累积数组中
-    if (!x) {
-        return acc.concat([current])
-    } else {
-        return acc
-    }
-    }, [])
-    rows = uniqueArray
     let fileList = []
     rows.forEach(ele => {
         const isPush = isArrIndex( baseForm.value.fileList, 'selectId', ele.selectId)
@@ -699,22 +686,15 @@ const finishModal = (rows, cancelcheck)=>{
    })
 
 //表格取消勾选回显
-
 cancelcheck.forEach((ele)=>{
     baseForm.value.fileList.forEach((ele1)=>{
         if (ele === ele1.selectId) {
-           console.log(ele, 'ele')
           let arr = arrDelKey(baseForm.value.fileList, 'selectId', ele)
-          console.log(arr, 'arr')
           baseForm.value.fileList = arr
         }
     })
 })
-
-// arrDelKey([{id:1},{id:2}], 'id', 2) // [{id:1}]
-
    selectId.value = arrToKey( baseForm.value.fileList, 'selectId', ',')
-   console.log(baseForm.value.fileList, 'baseForm.value.fileList')
 
 }
 </script>

+ 1 - 0
src/views/debit-pay/admin/components/middlepay/qualityRleation.vue

@@ -146,6 +146,7 @@ const tableColumn = [
 const qulModalClose = ()=>{
     qualityMoadal.value = false
     setStoreValue('checkRows', [])
+    cancelcheck.value = []
     emit('close')
 }