|
|
@ -229,6 +229,10 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => { |
|
|
|
const readHandle = (row,isAll)=>{ |
|
|
|
let rows:any = [] |
|
|
|
if(isAll){ |
|
|
|
//全部已读 |
|
|
|
if(selectionRows.value==0){ |
|
|
|
return |
|
|
|
} |
|
|
|
selectionRows.value.forEach(item=>{ |
|
|
|
let itemSelectionRows = item.selectionRows.filter(item1=>item1.isRead==0) |
|
|
|
console.log('itemSelectionRows',itemSelectionRows) |
|
|
@ -237,17 +241,19 @@ const readHandle = (row,isAll)=>{ |
|
|
|
console.log('selectionRows',selectionRows) |
|
|
|
console.log('全部已读',rows.join(',')) |
|
|
|
}else{ |
|
|
|
//单行 |
|
|
|
if(row.isRead==1){ |
|
|
|
return |
|
|
|
} |
|
|
|
rows = [row.mainId] |
|
|
|
console.log('已读',rows.join(',')) |
|
|
|
} |
|
|
|
|
|
|
|
let getLoading = ElLoading.service({ |
|
|
|
lock: true, |
|
|
|
text: 'loading...', |
|
|
|
background: 'rgba(0, 0, 0, 0.7)' |
|
|
|
}) |
|
|
|
if(selectionRows.value==0){ |
|
|
|
return |
|
|
|
} |
|
|
|
DemandforecastingMainApi.updateIsRead({isReadMainIds:rows.join(',')}).then(res => { |
|
|
|
console.log('res',res); |
|
|
|
getLoading?.close() |
|
|
|