|
|
|
@ -161,6 +161,7 @@ const Completed: FC<ICompletedProps> = ({
|
|
|
|
|
|
|
|
|
|
|
|
const resetList = useCallback(() => {
|
|
|
|
const resetList = useCallback(() => {
|
|
|
|
setSegments([])
|
|
|
|
setSegments([])
|
|
|
|
|
|
|
|
setSelectedSegmentIds([])
|
|
|
|
refreshSegmentList()
|
|
|
|
refreshSegmentList()
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
|
}, [])
|
|
|
|
}, [])
|
|
|
|
@ -188,6 +189,7 @@ const Completed: FC<ICompletedProps> = ({
|
|
|
|
seg.enabled = enable
|
|
|
|
seg.enabled = enable
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setSegments([...segments])
|
|
|
|
setSegments([...segments])
|
|
|
|
|
|
|
|
!segId && setSelectedSegmentIds([])
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onError: () => {
|
|
|
|
onError: () => {
|
|
|
|
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
|
|
|
|
notify({ type: 'error', message: t('common.actionMsg.modifiedUnsuccessfully') })
|
|
|
|
@ -256,8 +258,8 @@ const Completed: FC<ICompletedProps> = ({
|
|
|
|
seg.keywords = res.data.keywords
|
|
|
|
seg.keywords = res.data.keywords
|
|
|
|
seg.word_count = res.data.word_count
|
|
|
|
seg.word_count = res.data.word_count
|
|
|
|
seg.hit_count = res.data.hit_count
|
|
|
|
seg.hit_count = res.data.hit_count
|
|
|
|
seg.index_node_hash = res.data.index_node_hash
|
|
|
|
|
|
|
|
seg.enabled = res.data.enabled
|
|
|
|
seg.enabled = res.data.enabled
|
|
|
|
|
|
|
|
seg.updated_at = res.data.updated_at
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
setSegments([...segments])
|
|
|
|
setSegments([...segments])
|
|
|
|
@ -396,9 +398,9 @@ const Completed: FC<ICompletedProps> = ({
|
|
|
|
&& <BatchAction
|
|
|
|
&& <BatchAction
|
|
|
|
className='absolute left-0 bottom-16 z-20'
|
|
|
|
className='absolute left-0 bottom-16 z-20'
|
|
|
|
selectedIds={selectedSegmentIds}
|
|
|
|
selectedIds={selectedSegmentIds}
|
|
|
|
onBatchEnable={onChangeSwitch.bind(null, true)}
|
|
|
|
onBatchEnable={onChangeSwitch.bind(null, true, '')}
|
|
|
|
onBatchDisable={onChangeSwitch.bind(null, false)}
|
|
|
|
onBatchDisable={onChangeSwitch.bind(null, false, '')}
|
|
|
|
onBatchDelete={onDelete}
|
|
|
|
onBatchDelete={onDelete.bind(null, '')}
|
|
|
|
onCancel={onCancelBatchOperation}
|
|
|
|
onCancel={onCancelBatchOperation}
|
|
|
|
/>}
|
|
|
|
/>}
|
|
|
|
</SegmentListContext.Provider>
|
|
|
|
</SegmentListContext.Provider>
|
|
|
|
|