删除文件上传离开页面的提示信息
This commit is contained in:
@@ -81,7 +81,7 @@ export function Breadcrumb({ items = [], className = '' }: BreadcrumbProps) {
|
||||
|
||||
return (
|
||||
<nav className={finalClassName} aria-label="面包屑导航">
|
||||
<ol className="flex items-center space-x-2 text-sm text-gray-500">
|
||||
<ol className="flex items-center space-x-2 text-sm text-gray-500 mb-0">
|
||||
<li>
|
||||
<Link to="/" className="hover:text-primary-600 flex items-center">
|
||||
<i className="ri-home-line mr-1" />
|
||||
|
||||
@@ -720,7 +720,7 @@ export function ReviewPointsList({
|
||||
if (rule.type === 'consistency') {
|
||||
// if (rule.res === true && reviewPoint.result === true) {
|
||||
return <div key={`rule-${index}`}>
|
||||
<div key="line" className=" bg-gray-50 rounded border border-gray-200 text-xs mb-3"></div>
|
||||
{otherRules.length > 0 && <div key="line" className=" bg-gray-50 rounded border border-gray-200 text-xs mb-3"></div>}
|
||||
{renderConsistencyRule(rule, reviewPoint)}
|
||||
</div>;
|
||||
// }else {
|
||||
@@ -730,94 +730,11 @@ export function ReviewPointsList({
|
||||
|
||||
if (rule.type === 'ai') {
|
||||
return <div key={`rule-${index}`}>
|
||||
<div key="line" className=" bg-gray-50 rounded border border-gray-200 text-xs mb-3"></div>
|
||||
{otherRules.length > 0 && <div key="line" className=" bg-gray-50 rounded border border-gray-200 text-xs mb-3"></div>}
|
||||
{renderModelRule(rule, reviewPoint)}
|
||||
</div>;
|
||||
}
|
||||
|
||||
|
||||
// return (
|
||||
// <>
|
||||
// {/* 渲染组内内容 */}
|
||||
// {entries.map(([key, value], index) =>
|
||||
// !(result && value.value?.toString().trim() == '') && (
|
||||
// <div
|
||||
// key={`${groupKey}_${index}`}
|
||||
// className="mb-2 pb-2 border-b border-gray-100 last:border-b-0 last:mb-0 cursor-pointer hover:bg-gray-100 transition-colors duration-200 rounded p-1 group"
|
||||
// onClick={(e) => {
|
||||
// e.stopPropagation();
|
||||
// console.log(`单独点击${key}----`, reviewPoint);
|
||||
// const valuePage = parseInt(value.page as string);
|
||||
// const contentPage = parseInt(reviewPoint.contentPage?.[key] as string);
|
||||
// // 检查value中的page属性是否存在,优先取value中的page
|
||||
// if (valuePage > 0) {
|
||||
// console.log(`存在page且不为空:单独点击${key}---------->evaluated_results内的页码:`, valuePage);
|
||||
// onReviewPointSelect(reviewPoint.id, valuePage);
|
||||
|
||||
// } else if(contentPage && contentPage > 0) {
|
||||
// console.log(`存在page且为空:单独点击${key}---------->ocr_result内的页码:`, contentPage);
|
||||
// onReviewPointSelect(reviewPoint.id, contentPage);
|
||||
// }else {
|
||||
// toastService.error(`无法找到"${key}"对应的索引内容`);
|
||||
// console.log(`单独点击${key}--------没有对应页码`);
|
||||
// }
|
||||
// }}
|
||||
// onKeyDown={(e) => {
|
||||
// if (e.key === 'Enter' || e.key === ' ') {
|
||||
// e.preventDefault();
|
||||
// const valuePage = parseInt(value.page as string);
|
||||
// const contentPage = parseInt(reviewPoint.contentPage?.[key] as string);
|
||||
// // 检查value中的page属性是否存在,优先取value中的page
|
||||
// if (valuePage > 0) {
|
||||
// onReviewPointSelect(reviewPoint.id, valuePage);
|
||||
// } else if(contentPage && contentPage > 0) {
|
||||
// onReviewPointSelect(reviewPoint.id, contentPage);
|
||||
// } else {
|
||||
// toastService.error(`无法找到"${key}"对应的索引内容`);
|
||||
// console.log(`单独点击${key}--------没有对应页码`);
|
||||
// }
|
||||
// }
|
||||
// }}
|
||||
// role="button"
|
||||
// tabIndex={0}
|
||||
// aria-label={`查看${key}内容详情`}
|
||||
// onMouseLeave={(e) => {
|
||||
// // 获取容器内的滚动区域元素
|
||||
// const scrollContainer = e.currentTarget.querySelector('.text-container');
|
||||
// if (scrollContainer) {
|
||||
// // 在文本缩回之前重置滚动位置
|
||||
// scrollContainer.scrollTop = 0;
|
||||
// }
|
||||
// }}
|
||||
// >
|
||||
// {/* <div className="flex justify-between items-center mb-1"> */}
|
||||
// <div className="flex items-center mb-1">
|
||||
// <span className="text-xs pr-5">
|
||||
// {key}
|
||||
// </span>
|
||||
// <span className={`flex-shrink-0 text-xs w-15 ${value.value?.toString().trim() ? 'text-error' : 'text-warning'}`}>
|
||||
// {parseInt(value.page as string)>0 || parseInt(reviewPoint.contentPage?.[key] as string)>0 ? '' : <i title="无法找到索引内容" className="ri-alert-line text-red-500 mr-2"></i>}
|
||||
// {value.value?.toString().trim() ? '' : '缺失'}
|
||||
// </span>
|
||||
// </div>
|
||||
|
||||
// <div className="relative text-container max-h-96 group-hover:overflow-auto overflow-hidden">
|
||||
// <p
|
||||
// className="text-xs text-left select-text block overflow-hidden !line-clamp-2
|
||||
// group-hover:!line-clamp-none group-hover:bg-white group-hover:shadow-md
|
||||
// group-hover:z-10 group-hover:relative px-1 rounded transition-all duration-300 ease-in-out cursor-text"
|
||||
// // title={value.value?.toString() || ''}
|
||||
// // style={{ userSelect: 'all' }}
|
||||
// >
|
||||
// {(value.value?.toString().trim() === '')
|
||||
// ? ""
|
||||
// : value.value?.toString() || ''}
|
||||
// </p>
|
||||
// </div>
|
||||
// </div>
|
||||
// ))}
|
||||
// </>
|
||||
// );
|
||||
})}
|
||||
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user