添加新的骨架屏,将评查点列表和评查文件列表,文档列表进行数据分类
This commit is contained in:
@@ -114,7 +114,7 @@ export default function ChatMessage({
|
|||||||
className="question-button text-left"
|
className="question-button text-left"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// 这里可以添加点击建议问题的处理逻辑
|
// 这里可以添加点击建议问题的处理逻辑
|
||||||
console.log('Suggested question clicked:', question);
|
// console.log('Suggested question clicked:', question);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{question}
|
{question}
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ export default function Chat() {
|
|||||||
} = useChatMessage({
|
} = useChatMessage({
|
||||||
onUpdateConversationList: updateConversationInList,
|
onUpdateConversationList: updateConversationInList,
|
||||||
onConversationIdChange: async (conversationId: string) => {
|
onConversationIdChange: async (conversationId: string) => {
|
||||||
console.log('🔄 收到会话ID变更通知:', conversationId);
|
// console.log('🔄 收到会话ID变更通知:', conversationId);
|
||||||
|
|
||||||
// 设置当前会话ID(这会触发localStorage更新)
|
// 设置当前会话ID(这会触发localStorage更新)
|
||||||
setCurrConversationId(conversationId, CHAT_CONFIG.APP_ID);
|
setCurrConversationId(conversationId, CHAT_CONFIG.APP_ID);
|
||||||
@@ -67,7 +67,7 @@ export default function Chat() {
|
|||||||
// 如果是新会话,添加到会话列表
|
// 如果是新会话,添加到会话列表
|
||||||
const existingConversation = conversationList.find(item => item.id === conversationId);
|
const existingConversation = conversationList.find(item => item.id === conversationId);
|
||||||
if (!existingConversation) {
|
if (!existingConversation) {
|
||||||
console.log('🆕 添加新会话到列表:', conversationId);
|
// console.log('🆕 添加新会话到列表:', conversationId);
|
||||||
const newConversation = {
|
const newConversation = {
|
||||||
id: conversationId,
|
id: conversationId,
|
||||||
name: '新对话',
|
name: '新对话',
|
||||||
@@ -78,7 +78,7 @@ export default function Chat() {
|
|||||||
|
|
||||||
// 检查是否需要自动重命名(新对话的第一条消息)
|
// 检查是否需要自动重命名(新对话的第一条消息)
|
||||||
if (!newConversationFirstMessageSent.has(conversationId)) {
|
if (!newConversationFirstMessageSent.has(conversationId)) {
|
||||||
console.log('🏷️ 新对话第一条消息,准备自动重命名:', conversationId);
|
// console.log('🏷️ 新对话第一条消息,准备自动重命名:', conversationId);
|
||||||
|
|
||||||
// 标记该对话已发送第一条消息
|
// 标记该对话已发送第一条消息
|
||||||
setNewConversationFirstMessageSent(prev => new Set(prev).add(conversationId));
|
setNewConversationFirstMessageSent(prev => new Set(prev).add(conversationId));
|
||||||
@@ -88,7 +88,7 @@ export default function Chat() {
|
|||||||
try {
|
try {
|
||||||
if (sidebarRef.current) {
|
if (sidebarRef.current) {
|
||||||
await sidebarRef.current.autoRename(conversationId);
|
await sidebarRef.current.autoRename(conversationId);
|
||||||
console.log('✅ 新对话自动重命名完成:', conversationId);
|
// console.log('✅ 新对话自动重命名完成:', conversationId);
|
||||||
} else {
|
} else {
|
||||||
console.warn('⚠️ 侧边栏引用不可用,无法自动重命名');
|
console.warn('⚠️ 侧边栏引用不可用,无法自动重命名');
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ export default function Chat() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('🔄 处理会话切换:', { currConversationId, isNewConversation });
|
// console.log('🔄 处理会话切换:', { currConversationId, isNewConversation });
|
||||||
|
|
||||||
// 更新当前会话的输入
|
// 更新当前会话的输入
|
||||||
let notSyncToStateIntroduction = '';
|
let notSyncToStateIntroduction = '';
|
||||||
@@ -193,11 +193,11 @@ export default function Chat() {
|
|||||||
// 更新当前会话的聊天列表
|
// 更新当前会话的聊天列表
|
||||||
if (!isNewConversation && !conversationIdChangeBecauseOfNew && !isResponding) {
|
if (!isNewConversation && !conversationIdChangeBecauseOfNew && !isResponding) {
|
||||||
try {
|
try {
|
||||||
console.log('📨 获取会话历史消息:', currConversationId);
|
// console.log('📨 获取会话历史消息:', currConversationId);
|
||||||
|
|
||||||
// 调用API获取历史消息
|
// 调用API获取历史消息
|
||||||
const response = await fetchChatList(currConversationId);
|
const response = await fetchChatList(currConversationId);
|
||||||
console.log('📋 历史消息响应:', response);
|
// console.log('📋 历史消息响应:', response);
|
||||||
|
|
||||||
if (response && (response as any).data) {
|
if (response && (response as any).data) {
|
||||||
const { data: historyMessages } = response as any;
|
const { data: historyMessages } = response as any;
|
||||||
@@ -226,7 +226,7 @@ export default function Chat() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log('✅ 设置历史聊天列表:', newChatList.length, '条消息');
|
// console.log('✅ 设置历史聊天列表:', newChatList.length, '条消息');
|
||||||
setChatList(newChatList);
|
setChatList(newChatList);
|
||||||
} else {
|
} else {
|
||||||
console.warn('⚠️ 获取历史消息失败或无数据');
|
console.warn('⚠️ 获取历史消息失败或无数据');
|
||||||
@@ -251,7 +251,7 @@ export default function Chat() {
|
|||||||
* 处理会话ID变化
|
* 处理会话ID变化
|
||||||
*/
|
*/
|
||||||
const handleConversationIdChange = (id: string) => {
|
const handleConversationIdChange = (id: string) => {
|
||||||
console.log('🔄 会话ID变化:', { id, currentId: currConversationId });
|
// console.log('🔄 会话ID变化:', { id, currentId: currConversationId });
|
||||||
|
|
||||||
if (id === '-1') {
|
if (id === '-1') {
|
||||||
createNewChat();
|
createNewChat();
|
||||||
@@ -352,7 +352,7 @@ export default function Chat() {
|
|||||||
* 处理会话删除后的状态更新
|
* 处理会话删除后的状态更新
|
||||||
*/
|
*/
|
||||||
const handleConversationDeleted = (conversationId: string) => {
|
const handleConversationDeleted = (conversationId: string) => {
|
||||||
console.log('🗑️ 处理会话删除后的状态更新:', conversationId);
|
// console.log('🗑️ 处理会话删除后的状态更新:', conversationId);
|
||||||
|
|
||||||
// 如果删除的是当前会话,切换到新会话
|
// 如果删除的是当前会话,切换到新会话
|
||||||
if (conversationId === currConversationId) {
|
if (conversationId === currConversationId) {
|
||||||
@@ -362,19 +362,19 @@ export default function Chat() {
|
|||||||
// 从列表中移除会话
|
// 从列表中移除会话
|
||||||
removeConversationFromList(conversationId);
|
removeConversationFromList(conversationId);
|
||||||
|
|
||||||
console.log('✅ 会话删除状态更新完成:', conversationId);
|
// console.log('✅ 会话删除状态更新完成:', conversationId);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理会话重命名后的状态更新
|
* 处理会话重命名后的状态更新
|
||||||
*/
|
*/
|
||||||
const handleConversationRenamed = (conversationId: string, newName: string) => {
|
const handleConversationRenamed = (conversationId: string, newName: string) => {
|
||||||
console.log('✏️ 处理会话重命名后的状态更新:', { conversationId, newName });
|
// console.log('✏️ 处理会话重命名后的状态更新:', { conversationId, newName });
|
||||||
|
|
||||||
// 更新本地会话列表中的名称
|
// 更新本地会话列表中的名称
|
||||||
updateConversationInList(conversationId, { name: newName });
|
updateConversationInList(conversationId, { name: newName });
|
||||||
|
|
||||||
console.log('✅ 会话重命名状态更新完成:', conversationId, '->', newName);
|
// console.log('✅ 会话重命名状态更新完成:', conversationId, '->', newName);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -397,7 +397,7 @@ export default function Chat() {
|
|||||||
fetchAppParams()
|
fetchAppParams()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
console.log('📋 获取到的数据:', { conversationData, appParams });
|
// console.log('📋 获取到的数据:', { conversationData, appParams });
|
||||||
|
|
||||||
// 处理会话数据
|
// 处理会话数据
|
||||||
const conversations = (conversationData as any).data || [];
|
const conversations = (conversationData as any).data || [];
|
||||||
@@ -410,8 +410,8 @@ export default function Chat() {
|
|||||||
const _conversationId = getConversationIdFromStorage(CHAT_CONFIG.APP_ID);
|
const _conversationId = getConversationIdFromStorage(CHAT_CONFIG.APP_ID);
|
||||||
const isNotNewConversation = conversations.some((item: ConversationItem) => item.id === _conversationId);
|
const isNotNewConversation = conversations.some((item: ConversationItem) => item.id === _conversationId);
|
||||||
|
|
||||||
console.log('💾 本地存储的会话ID:', _conversationId);
|
// console.log('💾 本地存储的会话ID:', _conversationId);
|
||||||
console.log('🔍 是否为已存在的会话:', isNotNewConversation);
|
// console.log('🔍 是否为已存在的会话:', isNotNewConversation);
|
||||||
|
|
||||||
// 获取新会话信息
|
// 获取新会话信息
|
||||||
const { user_input_form, opening_statement: introduction } = (appParams as any).data || {};
|
const { user_input_form, opening_statement: introduction } = (appParams as any).data || {};
|
||||||
@@ -432,7 +432,7 @@ export default function Chat() {
|
|||||||
|
|
||||||
// 如果存在有效的会话ID,则设置为当前会话
|
// 如果存在有效的会话ID,则设置为当前会话
|
||||||
if (isNotNewConversation) {
|
if (isNotNewConversation) {
|
||||||
console.log('🎯 设置当前会话ID:', _conversationId);
|
// console.log('🎯 设置当前会话ID:', _conversationId);
|
||||||
setCurrConversationId(_conversationId, CHAT_CONFIG.APP_ID, false);
|
setCurrConversationId(_conversationId, CHAT_CONFIG.APP_ID, false);
|
||||||
} else {
|
} else {
|
||||||
// 如果localStorage为空或会话不存在,自动创建新会话
|
// 如果localStorage为空或会话不存在,自动创建新会话
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useMatches, useLocation } from '@remix-run/react';
|
|||||||
import type { UserRole } from '~/root';
|
import type { UserRole } from '~/root';
|
||||||
|
|
||||||
// 定义应用模块类型
|
// 定义应用模块类型
|
||||||
type AppModule = 'contract' | 'record' | 'model';
|
type AppModule = 'contract' | 'record' | 'model' | '';
|
||||||
|
|
||||||
// 应用模块与reviewType的映射
|
// 应用模块与reviewType的映射
|
||||||
const REVIEW_TYPE_TO_APP: Record<string, AppModule> = {
|
const REVIEW_TYPE_TO_APP: Record<string, AppModule> = {
|
||||||
@@ -34,7 +34,7 @@ interface Match {
|
|||||||
|
|
||||||
export function Layout({ children, userRole = 'developer' }: LayoutProps) {
|
export function Layout({ children, userRole = 'developer' }: LayoutProps) {
|
||||||
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
|
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
|
||||||
const [selectedApp, setSelectedApp] = useState<AppModule>('contract');
|
const [selectedApp, setSelectedApp] = useState<AppModule>('');
|
||||||
const matches = useMatches() as Match[];
|
const matches = useMatches() as Match[];
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
@@ -102,6 +102,7 @@ export function Layout({ children, userRole = 'developer' }: LayoutProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="layout-container">
|
<div className="layout-container">
|
||||||
|
{/* 侧边栏始终保留,不再使用条件渲染 */}
|
||||||
<Sidebar
|
<Sidebar
|
||||||
collapsed={sidebarCollapsed}
|
collapsed={sidebarCollapsed}
|
||||||
onToggle={toggleSidebar}
|
onToggle={toggleSidebar}
|
||||||
|
|||||||
@@ -40,24 +40,42 @@ const APP_ICON_MAP: Record<string, string> = {
|
|||||||
'model': 'ri-robot-2-fill'
|
'model': 'ri-robot-2-fill'
|
||||||
};
|
};
|
||||||
|
|
||||||
export function Sidebar({ onToggle, collapsed, userRole, selectedApp = 'contract' }: SidebarProps) {
|
export function Sidebar({ onToggle, collapsed, userRole, selectedApp = '' }: SidebarProps) {
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const [expandedMenus, setExpandedMenus] = useState<Record<string, boolean>>({});
|
const [expandedMenus, setExpandedMenus] = useState<Record<string, boolean>>({});
|
||||||
const [currentApp, setCurrentApp] = useState<string>(selectedApp);
|
const [currentApp, setCurrentApp] = useState<string>(''); // 初始设置为空字符串而不是selectedApp
|
||||||
|
const [isLoading, setIsLoading] = useState<boolean>(true); // 添加加载状态
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
// 组件挂载后从 sessionStorage 读取初始 reviewType
|
// 组件挂载后从 sessionStorage 读取初始 reviewType
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
let mounted = true;
|
||||||
|
setIsLoading(true); // 设置加载状态
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const reviewType = sessionStorage.getItem('reviewType');
|
const reviewType = sessionStorage.getItem('reviewType');
|
||||||
// console.log('初始 reviewType:', reviewType);
|
// console.log('初始 reviewType:', reviewType);
|
||||||
if (reviewType) {
|
if (reviewType && mounted) {
|
||||||
setCurrentApp(reviewType);
|
setCurrentApp(reviewType);
|
||||||
|
} else if (selectedApp && mounted) {
|
||||||
|
// 如果没有reviewType,但有selectedApp,使用selectedApp
|
||||||
|
setCurrentApp(selectedApp);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('读取 reviewType 失败:', error);
|
console.error('读取 reviewType 失败:', error);
|
||||||
|
} finally {
|
||||||
|
// 使用setTimeout确保状态在DOM更新后再变化,避免闪烁
|
||||||
|
setTimeout(() => {
|
||||||
|
if (mounted) {
|
||||||
|
setIsLoading(false); // 数据加载完成
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}, []);
|
|
||||||
|
return () => {
|
||||||
|
mounted = false;
|
||||||
|
};
|
||||||
|
}, [selectedApp]);
|
||||||
|
|
||||||
// 从 sessionStorage 获取 reviewType 并设置当前应用模块
|
// 从 sessionStorage 获取 reviewType 并设置当前应用模块
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -78,23 +96,44 @@ export function Sidebar({ onToggle, collapsed, userRole, selectedApp = 'contract
|
|||||||
|
|
||||||
// 监听路由变化,重新检查 reviewType
|
// 监听路由变化,重新检查 reviewType
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
let mounted = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const reviewType = sessionStorage.getItem('reviewType');
|
const reviewType = sessionStorage.getItem('reviewType');
|
||||||
// console.log('路由变化, 检查 reviewType:', reviewType, '路径:', location.pathname);
|
// 只有当reviewType变化时才设置加载状态和更新currentApp
|
||||||
if (reviewType) {
|
if (reviewType && reviewType !== currentApp && mounted) {
|
||||||
|
setIsLoading(true); // 路由变化时设置加载状态
|
||||||
setCurrentApp(reviewType);
|
setCurrentApp(reviewType);
|
||||||
|
// 使用setTimeout确保状态在DOM更新后再变化,避免闪烁
|
||||||
|
setTimeout(() => {
|
||||||
|
if (mounted) {
|
||||||
|
setIsLoading(false);
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('路由变化时读取 reviewType 失败:', error);
|
console.error('路由变化时读取 reviewType 失败:', error);
|
||||||
|
if (mounted) {
|
||||||
|
setIsLoading(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [location.pathname]);
|
|
||||||
|
return () => {
|
||||||
|
mounted = false;
|
||||||
|
};
|
||||||
|
}, [location.pathname, currentApp]);
|
||||||
|
|
||||||
// 监听 selectedApp 属性变化
|
// 监听 selectedApp 属性变化
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (selectedApp) {
|
if (selectedApp && selectedApp !== currentApp) {
|
||||||
|
setIsLoading(true); // 设置加载状态
|
||||||
setCurrentApp(selectedApp);
|
setCurrentApp(selectedApp);
|
||||||
|
// 使用setTimeout确保状态在DOM更新后再变化,避免闪烁
|
||||||
|
setTimeout(() => {
|
||||||
|
setIsLoading(false); // 数据加载完成
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}, [selectedApp]);
|
}, [selectedApp, currentApp]);
|
||||||
|
|
||||||
const menuItems: MenuItem[] = [
|
const menuItems: MenuItem[] = [
|
||||||
{
|
{
|
||||||
@@ -270,6 +309,7 @@ export function Sidebar({ onToggle, collapsed, userRole, selectedApp = 'contract
|
|||||||
|
|
||||||
// 获取当前应用模式下应显示的菜单ID列表
|
// 获取当前应用模式下应显示的菜单ID列表
|
||||||
const visibleMenuIds = APP_MENU_MAP[currentApp as keyof typeof APP_MENU_MAP] || APP_MENU_MAP['contract'];
|
const visibleMenuIds = APP_MENU_MAP[currentApp as keyof typeof APP_MENU_MAP] || APP_MENU_MAP['contract'];
|
||||||
|
// const visibleMenuIds = APP_MENU_MAP[currentApp as keyof typeof APP_MENU_MAP]
|
||||||
// console.log('当前应用模式:', currentApp, '可见菜单ID:', visibleMenuIds);
|
// console.log('当前应用模式:', currentApp, '可见菜单ID:', visibleMenuIds);
|
||||||
|
|
||||||
// 根据用户角色和当前应用模式过滤菜单项
|
// 根据用户角色和当前应用模式过滤菜单项
|
||||||
@@ -319,80 +359,105 @@ export function Sidebar({ onToggle, collapsed, userRole, selectedApp = 'contract
|
|||||||
{!collapsed && (
|
{!collapsed && (
|
||||||
<div className="px-4 py-3 border-b border-gray-100">
|
<div className="px-4 py-3 border-b border-gray-100">
|
||||||
<div className="flex items-center text-green-700">
|
<div className="flex items-center text-green-700">
|
||||||
<i className={`${APP_ICON_MAP[currentApp] || 'ri-file-list-2-fill'} mr-2 text-xl`}></i>
|
{isLoading ? (
|
||||||
<span className="font-medium">{APP_NAME_MAP[currentApp] || '合同管理'}</span>
|
// 加载中状态,只显示加载图标,保留布局
|
||||||
|
<div className="flex items-center">
|
||||||
|
<div className="animate-spin rounded-full h-4 w-4 border-b-2 border-green-700 mr-2"></div>
|
||||||
|
<span className="font-medium text-gray-500">加载中...</span>
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<i className={`${APP_ICON_MAP[currentApp] || ''} mr-2 text-xl`}></i>
|
||||||
|
<span className="font-medium">{APP_NAME_MAP[currentApp] || ''}</span>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="py-4 px-[10px]">
|
<div className="py-4 px-[10px]">
|
||||||
{filteredMenuItems.map((item) => (
|
{isLoading ? (
|
||||||
<div key={item.id} className={`${collapsed ? 'px-0' : ''}`}>
|
// 加载中状态显示,保留菜单布局结构
|
||||||
{!item.children ? (
|
<div className="py-2">
|
||||||
<Link
|
{Array(5).fill(0).map((_, index) => (
|
||||||
to={item.path}
|
<div key={index} className="sidebar-menu-item-skeleton mb-2">
|
||||||
className={`sidebar-menu-item ${isActive(item.path) ? 'active' : ''} flex items-center ${collapsed ? 'justify-center' : ''}`}
|
<div className="flex items-center">
|
||||||
onClick={(e) => {
|
<div className="bg-gray-200 rounded-md h-5 w-5 mr-3 animate-pulse"></div>
|
||||||
// 只阻止冒泡,不阻止默认行为
|
{!collapsed && <div className="bg-gray-200 rounded-md h-4 w-24 animate-pulse"></div>}
|
||||||
e.stopPropagation();
|
</div>
|
||||||
// console.log('单级菜单点击:', item.title, '路径:', item.path);
|
</div>
|
||||||
}}
|
))}
|
||||||
>
|
</div>
|
||||||
<i className={`${item.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
) : (
|
||||||
{!collapsed && <span>{item.title}</span>}
|
// 数据加载完成后显示菜单
|
||||||
</Link>
|
filteredMenuItems.map((item) => (
|
||||||
) : (
|
<div key={item.id} className={`${collapsed ? 'px-0' : ''}`}>
|
||||||
<>
|
{!item.children ? (
|
||||||
<div
|
<Link
|
||||||
className={`sidebar-menu-item flex items-center ${collapsed ? 'justify-center' : 'justify-between'} cursor-pointer z-10`}
|
to={item.path}
|
||||||
|
className={`sidebar-menu-item ${isActive(item.path) ? 'active' : ''} flex items-center ${collapsed ? 'justify-center' : ''}`}
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
// console.log('%c父菜单点击 ===> ', 'background: #722ed1; color: white; padding: 2px 4px; border-radius: 2px;', item.title);
|
// 只阻止冒泡,不阻止默认行为
|
||||||
toggleMenu(item.id, e);
|
e.stopPropagation();
|
||||||
}}
|
// console.log('单级菜单点击:', item.title, '路径:', item.path);
|
||||||
role="button"
|
|
||||||
tabIndex={0}
|
|
||||||
aria-expanded={expandedMenus[item.id] || false}
|
|
||||||
aria-controls={`submenu-${item.id}`}
|
|
||||||
onKeyDown={(e) => {
|
|
||||||
if (e.key === 'Enter' || e.key === ' ') {
|
|
||||||
e.preventDefault();
|
|
||||||
toggleMenu(item.id, e as unknown as React.MouseEvent);
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<i className={`${item.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
||||||
<i className={`${item.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
{!collapsed && <span>{item.title}</span>}
|
||||||
{!collapsed && <span>{item.title}</span>}
|
</Link>
|
||||||
</div>
|
) : (
|
||||||
{!collapsed && (
|
<>
|
||||||
<i className={`ri-arrow-${expandedMenus[item.id] ? 'down' : 'right'}-s-line`}></i>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{(expandedMenus[item.id] || collapsed) && (
|
|
||||||
<div
|
<div
|
||||||
className={`submenu-container ${collapsed ? 'border-l-0 pl-0' : 'border-l border-gray-100 ml-4 pl-3'} z-20`}
|
className={`sidebar-menu-item flex items-center ${collapsed ? 'justify-center' : 'justify-between'} cursor-pointer z-10`}
|
||||||
id={`submenu-${item.id}`}
|
onClick={(e) => {
|
||||||
|
// console.log('%c父菜单点击 ===> ', 'background: #722ed1; color: white; padding: 2px 4px; border-radius: 2px;', item.title);
|
||||||
|
toggleMenu(item.id, e);
|
||||||
|
}}
|
||||||
|
role="button"
|
||||||
|
tabIndex={0}
|
||||||
|
aria-expanded={expandedMenus[item.id] || false}
|
||||||
|
aria-controls={`submenu-${item.id}`}
|
||||||
|
onKeyDown={(e) => {
|
||||||
|
if (e.key === 'Enter' || e.key === ' ') {
|
||||||
|
e.preventDefault();
|
||||||
|
toggleMenu(item.id, e as unknown as React.MouseEvent);
|
||||||
|
}
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{item.children
|
<div className="flex items-center">
|
||||||
.filter(child => !child.requiredRole || child.requiredRole === userRole)
|
<i className={`${item.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
||||||
.map((child) => (
|
{!collapsed && <span>{item.title}</span>}
|
||||||
<Link
|
</div>
|
||||||
key={child.id}
|
{!collapsed && (
|
||||||
to={child.path}
|
<i className={`ri-arrow-${expandedMenus[item.id] ? 'down' : 'right'}-s-line`}></i>
|
||||||
className={`sidebar-menu-item ${isActive(child.path) ? 'active' : ''} flex items-center ${collapsed ? 'justify-center' : ''}`}
|
)}
|
||||||
onClick={(e) => handleSubMenuClick(child, e)}
|
|
||||||
>
|
|
||||||
<i className={`${child.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
|
||||||
{!collapsed && <span>{child.title}</span>}
|
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
|
||||||
</>
|
{(expandedMenus[item.id] || collapsed) && (
|
||||||
)}
|
<div
|
||||||
</div>
|
className={`submenu-container ${collapsed ? 'border-l-0 pl-0' : 'border-l border-gray-100 ml-4 pl-3'} z-20`}
|
||||||
))}
|
id={`submenu-${item.id}`}
|
||||||
|
>
|
||||||
|
{item.children
|
||||||
|
.filter(child => !child.requiredRole || child.requiredRole === userRole)
|
||||||
|
.map((child) => (
|
||||||
|
<Link
|
||||||
|
key={child.id}
|
||||||
|
to={child.path}
|
||||||
|
className={`sidebar-menu-item ${isActive(child.path) ? 'active' : ''} flex items-center ${collapsed ? 'justify-center' : ''}`}
|
||||||
|
onClick={(e) => handleSubMenuClick(child, e)}
|
||||||
|
>
|
||||||
|
<i className={`${child.icon} ${collapsed ? 'text-xl' : 'mr-3'}`}></i>
|
||||||
|
{!collapsed && <span>{child.title}</span>}
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1564,8 +1564,8 @@ export function ReviewSettings({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<option value="deepseek">DeepSeek</option>
|
<option value="deepseek">DeepSeek</option>
|
||||||
<option value="qwen72b">Qwen72B-VL</option>
|
{/* <option value="qwen72b">Qwen72B-VL</option> */}
|
||||||
<option value="qwen14b">Qwen14B</option>
|
{/* <option value="qwen14b">Qwen14B</option> */}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -0,0 +1,128 @@
|
|||||||
|
// import React from 'react';
|
||||||
|
|
||||||
|
interface SkeletonBarProps {
|
||||||
|
width?: string;
|
||||||
|
height?: string;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 基础骨架条
|
||||||
|
export function SkeletonBar({ width = 'w-full', height = 'h-5', className = '' }: SkeletonBarProps) {
|
||||||
|
return (
|
||||||
|
<div className={`${width} ${height} bg-gray-200 rounded-md animate-pulse ${className}`}></div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 通用骨架屏
|
||||||
|
export function SkeletonScreen() {
|
||||||
|
return (
|
||||||
|
<div className="flex flex-col gap-4">
|
||||||
|
<SkeletonBar height="h-10" />
|
||||||
|
<SkeletonBar height="h-10" />
|
||||||
|
<SkeletonBar height="h-10" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 数字统计骨架
|
||||||
|
export function NumberSkeleton({ className = '' }: { className?: string }) {
|
||||||
|
return (
|
||||||
|
<SkeletonBar width="w-12" height="h-5" className={className} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表格行骨架屏
|
||||||
|
interface TableRowSkeletonProps {
|
||||||
|
count?: number;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function TableRowSkeleton({ count = 5, className = '' }: TableRowSkeletonProps) {
|
||||||
|
return (
|
||||||
|
<div className={`py-2 ${className}`}>
|
||||||
|
{Array(count).fill(0).map((_, index) => (
|
||||||
|
<div key={index} className="flex items-center p-4 border-b border-gray-100">
|
||||||
|
<div className="w-[30%] flex">
|
||||||
|
<SkeletonBar width="w-10" height="h-10" />
|
||||||
|
<div className="ml-2">
|
||||||
|
<SkeletonBar width="w-48" className="mb-2" />
|
||||||
|
<SkeletonBar width="w-32" height="h-3" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="w-[12%]">
|
||||||
|
<SkeletonBar width="w-20" height="h-6" />
|
||||||
|
</div>
|
||||||
|
<div className="w-[12%]">
|
||||||
|
<SkeletonBar width="w-24" className="mb-1" />
|
||||||
|
<SkeletonBar width="w-16" height="h-3" />
|
||||||
|
</div>
|
||||||
|
<div className="w-[12%]">
|
||||||
|
<SkeletonBar width="w-16" height="h-5" className="mb-1" />
|
||||||
|
<SkeletonBar width="w-16" height="h-5" />
|
||||||
|
</div>
|
||||||
|
<div className="w-[20%]">
|
||||||
|
<SkeletonBar width="w-32" className="mb-1" />
|
||||||
|
<SkeletonBar width="w-24" />
|
||||||
|
</div>
|
||||||
|
<div className="w-[14%]">
|
||||||
|
<SkeletonBar width="w-16" height="h-8" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 自定义列宽的表格行骨架屏
|
||||||
|
interface CustomTableRowSkeletonProps {
|
||||||
|
count?: number;
|
||||||
|
columns: Array<{
|
||||||
|
width: string;
|
||||||
|
rows?: Array<{
|
||||||
|
width: string;
|
||||||
|
height?: string;
|
||||||
|
className?: string;
|
||||||
|
}>;
|
||||||
|
}>;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function CustomTableRowSkeleton({ count = 5, columns, className = '' }: CustomTableRowSkeletonProps) {
|
||||||
|
return (
|
||||||
|
<div className={`py-2 ${className}`}>
|
||||||
|
{Array(count).fill(0).map((_, rowIndex) => (
|
||||||
|
<div key={rowIndex} className="flex items-center p-4 border-b border-gray-100">
|
||||||
|
{columns.map((column, colIndex) => (
|
||||||
|
<div key={colIndex} className={`${column.width}`}>
|
||||||
|
{column.rows ? (
|
||||||
|
column.rows.map((row, rowIdx) => (
|
||||||
|
<SkeletonBar
|
||||||
|
key={rowIdx}
|
||||||
|
width={row.width}
|
||||||
|
height={row.height || 'h-4'}
|
||||||
|
className={`${rowIdx < column.rows!.length - 1 ? 'mb-1' : ''} ${row.className || ''}`}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
) : (
|
||||||
|
<SkeletonBar width="w-full" />
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载指示器
|
||||||
|
export function LoadingIndicator({ text = '正在加载数据...' }: { text?: string }) {
|
||||||
|
return (
|
||||||
|
<div className="py-4 flex justify-center items-center">
|
||||||
|
<div className="animate-spin rounded-full h-6 w-6 border-b-2 border-green-700 mr-2"></div>
|
||||||
|
<span className="text-sm text-gray-500">{text}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+39
-42
@@ -138,54 +138,51 @@ export default function Index() {
|
|||||||
|
|
||||||
{/* 主要内容 */}
|
{/* 主要内容 */}
|
||||||
<main className="index-main-content">
|
<main className="index-main-content">
|
||||||
<h1 className="welcome-text">- 欢迎来到智慧法务平台 -</h1>
|
<div className="index-main-content-container">
|
||||||
|
<h1 className="welcome-text">- 欢迎来到智慧法务平台 -</h1>
|
||||||
|
|
||||||
<div className="modules-container">
|
<div className="modules-container">
|
||||||
{/* 合同管理模块 */}
|
{/* 合同管理模块 */}
|
||||||
<div
|
<div
|
||||||
className="module-card"
|
className="module-card"
|
||||||
onClick={() => handleModuleClick('/contract-template/search', 'contract')}
|
onClick={() => handleModuleClick('/contract-template/search', 'contract')}
|
||||||
onKeyDown={(e) => handleKeyDown('/contract-template/search', 'contract', e)}
|
onKeyDown={(e) => handleKeyDown('/contract-template/search', 'contract', e)}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
aria-label="合同管理"
|
aria-label="合同管理"
|
||||||
>
|
>
|
||||||
<i className="ri-file-list-2-fill text-[3rem] text-[#269b6c]"></i>
|
<i className="ri-file-list-2-fill text-[3rem] text-[#269b6c]"></i>
|
||||||
<span className="module-name">合同管理</span>
|
<span className="module-name">合同管理</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 案卷智能评查模块 */}
|
{/* 案卷智能评查模块 */}
|
||||||
<div
|
<div
|
||||||
className="module-card"
|
className="module-card"
|
||||||
onClick={() => handleModuleClick('/home', 'record')}
|
onClick={() => handleModuleClick('/home', 'record')}
|
||||||
onKeyDown={(e) => handleKeyDown('/home', 'record', e)}
|
onKeyDown={(e) => handleKeyDown('/home', 'record', e)}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
aria-label="案卷智能评查"
|
aria-label="案卷智能评查"
|
||||||
>
|
>
|
||||||
<i className="ri-folder-shared-fill text-[3rem] text-[#269b6c]"></i>
|
<i className="ri-folder-shared-fill text-[3rem] text-[#269b6c]"></i>
|
||||||
<span className="module-name">案卷智能评查</span>
|
<span className="module-name">案卷智能评查</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 智慧法务大模型模块 */}
|
{/* 智慧法务大模型模块 */}
|
||||||
<div
|
<div
|
||||||
className="module-card"
|
className="module-card"
|
||||||
onClick={() => handleModuleClick('/chat-with-llm', 'model')}
|
onClick={() => handleModuleClick('/chat-with-llm', 'model')}
|
||||||
onKeyDown={(e) => handleKeyDown('/chat-with-llm', 'model', e)}
|
onKeyDown={(e) => handleKeyDown('/chat-with-llm', 'model', e)}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
aria-label="智慧法务大模型"
|
aria-label="智慧法务大模型"
|
||||||
>
|
>
|
||||||
<i className="ri-robot-2-fill text-[3rem] text-[#269b6c]"></i>
|
<i className="ri-robot-2-fill text-[3rem] text-[#269b6c]"></i>
|
||||||
<span className="module-name">智慧法务大模型</span>
|
<span className="module-name">智慧法务大模型</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
{/* 底部山水背景 */}
|
|
||||||
<footer className="footer">
|
|
||||||
<div className="mountains-bg"></div>
|
|
||||||
</footer>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import { Pagination } from "~/components/ui/Pagination";
|
|||||||
import { FileTypeTag } from "~/components/ui/FileTypeTag";
|
import { FileTypeTag } from "~/components/ui/FileTypeTag";
|
||||||
import { FileTag } from "~/components/ui/FileTag";
|
import { FileTag } from "~/components/ui/FileTag";
|
||||||
import { FilterPanel, FilterSelect, SearchFilter, DateRangeFilter } from "~/components/ui/FilterPanel";
|
import { FilterPanel, FilterSelect, SearchFilter, DateRangeFilter } from "~/components/ui/FilterPanel";
|
||||||
|
import { TableRowSkeleton, LoadingIndicator, NumberSkeleton } from '~/components/ui/SkeletonScreen';
|
||||||
import documentsIndexStyles from "~/styles/pages/documents_index.css?url";
|
import documentsIndexStyles from "~/styles/pages/documents_index.css?url";
|
||||||
import { getDocuments, deleteDocument, type DocumentUI } from "~/api/files/documents";
|
import { getDocuments, deleteDocument, type DocumentUI } from "~/api/files/documents";
|
||||||
import { getDocumentTypes } from "~/api/document-types/document-types";
|
import { getDocumentTypes } from "~/api/document-types/document-types";
|
||||||
@@ -833,7 +834,18 @@ export default function DocumentsIndex() {
|
|||||||
<div className={isLoadingData ? "opacity-70 pointer-events-none transition-opacity" : "transition-opacity"}>
|
<div className={isLoadingData ? "opacity-70 pointer-events-none transition-opacity" : "transition-opacity"}>
|
||||||
{/* 页面头部 */}
|
{/* 页面头部 */}
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-4">
|
||||||
<h2 className="text-xl font-medium">文档列表</h2>
|
<div className="flex items-center">
|
||||||
|
<h2 className="text-xl font-medium">文档列表</h2>
|
||||||
|
{isLoadingData ? (
|
||||||
|
<div className="ml-4">
|
||||||
|
<NumberSkeleton />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="ml-4 text-sm text-secondary">
|
||||||
|
共 <span className="font-medium text-primary">{total}</span> 条记录
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
type="primary"
|
type="primary"
|
||||||
@@ -917,6 +929,8 @@ export default function DocumentsIndex() {
|
|||||||
|
|
||||||
{/* 数据表格 */}
|
{/* 数据表格 */}
|
||||||
<Card>
|
<Card>
|
||||||
|
{isLoadingData && <LoadingIndicator />}
|
||||||
|
|
||||||
<div className="mb-3 flex items-center justify-between">
|
<div className="mb-3 flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button
|
||||||
@@ -942,12 +956,16 @@ export default function DocumentsIndex() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="overflow-x-auto">
|
<div className="overflow-x-auto">
|
||||||
<Table
|
{isLoadingData && documents.length === 0 ? (
|
||||||
columns={columns}
|
<TableRowSkeleton count={5} />
|
||||||
dataSource={documents}
|
) : (
|
||||||
rowKey="id"
|
<Table
|
||||||
emptyText="暂无数据"
|
columns={columns}
|
||||||
/>
|
dataSource={documents}
|
||||||
|
rowKey="id"
|
||||||
|
emptyText={isLoadingData ? "加载中..." : "暂无数据"}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* 分页 */}
|
{/* 分页 */}
|
||||||
|
|||||||
+4
-4
@@ -304,9 +304,9 @@ export default function Home() {
|
|||||||
<div className="avatar w-10 h-10 rounded-full bg-primary text-white flex items-center justify-center">
|
<div className="avatar w-10 h-10 rounded-full bg-primary text-white flex items-center justify-center">
|
||||||
<span>{userRole === 'developer' ? '管' : '用'}</span>
|
<span>{userRole === 'developer' ? '管' : '用'}</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="ml-3">
|
<div className="ml-1">
|
||||||
<p className="text-sm font-medium">{userRole === 'developer' ? '系统管理员' : '普通用户'}</p>
|
<p className="text-sm font-medium mb-0">{userRole === 'developer' ? '系统管理员' : '普通用户'}</p>
|
||||||
<p className="text-xs text-gray-500">{userRole === 'developer' ? '超级管理员' : '标准权限'}</p>
|
<p className="text-xs text-gray-500 mb-0">{userRole === 'developer' ? '超级管理员' : '标准权限'}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/* 登出操作 */}
|
{/* 登出操作 */}
|
||||||
@@ -430,7 +430,7 @@ function StatCard({ title, value, icon, trend }: StatCardProps) {
|
|||||||
<div className="stat-title">{title}</div>
|
<div className="stat-title">{title}</div>
|
||||||
<div className="stat-value">{value}</div>
|
<div className="stat-value">{value}</div>
|
||||||
{trend && (
|
{trend && (
|
||||||
<div className={`stat-trend ${trend.isUp ? 'trend-up' : 'trend-down'}`}>
|
<div className={`stat-trend ${title === '本月问题检出数' ? !trend.isUp? 'trend-up':'trend-down' : trend.isUp ? 'trend-up' : 'trend-down'}`}>
|
||||||
<i className={`mr-1 ${trend.isUp ? 'ri-arrow-up-s-line' : 'ri-arrow-down-s-line'}`}></i>
|
<i className={`mr-1 ${trend.isUp ? 'ri-arrow-up-s-line' : 'ri-arrow-down-s-line'}`}></i>
|
||||||
<span>{trend.value}%</span>
|
<span>{trend.value}%</span>
|
||||||
<span className="ml-1 text-gray-500">较上月</span>
|
<span className="ml-1 text-gray-500">较上月</span>
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import { Pagination } from "~/components/ui/Pagination";
|
|||||||
import { Table } from "~/components/ui/Table";
|
import { Table } from "~/components/ui/Table";
|
||||||
import { StatusBadge } from "~/components/ui/StatusBadge";
|
import { StatusBadge } from "~/components/ui/StatusBadge";
|
||||||
import { FileTypeTag, links as fileTypeTagLinks } from "~/components/ui/FileTypeTag";
|
import { FileTypeTag, links as fileTypeTagLinks } from "~/components/ui/FileTypeTag";
|
||||||
|
import { NumberSkeleton, TableRowSkeleton, LoadingIndicator } from "~/components/ui/SkeletonScreen";
|
||||||
import rulesFilesStyles from "~/styles/pages/rules-files.css?url";
|
import rulesFilesStyles from "~/styles/pages/rules-files.css?url";
|
||||||
import {
|
import {
|
||||||
getReviewFiles,
|
getReviewFiles,
|
||||||
@@ -541,7 +542,11 @@ export default function RulesFiles() {
|
|||||||
<div className="flex items-center ml-4 bg-white px-3 py-1 rounded-md">
|
<div className="flex items-center ml-4 bg-white px-3 py-1 rounded-md">
|
||||||
<i className="ri-file-list-3-line text-primary text-lg mr-1"></i>
|
<i className="ri-file-list-3-line text-primary text-lg mr-1"></i>
|
||||||
<span className="text-sm text-secondary">总文件数:</span>
|
<span className="text-sm text-secondary">总文件数:</span>
|
||||||
<span className="text-base font-normal text-primary ml-1">{totalCount}</span>
|
{isLoading ? (
|
||||||
|
<NumberSkeleton className="ml-1" />
|
||||||
|
) : (
|
||||||
|
<span className="text-base font-normal text-primary ml-1">{totalCount}</span>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Button type="primary" icon="ri-file-upload-line" to="/files/upload">
|
<Button type="primary" icon="ri-file-upload-line" to="/files/upload">
|
||||||
@@ -622,13 +627,19 @@ export default function RulesFiles() {
|
|||||||
{/* 文件列表 */}
|
{/* 文件列表 */}
|
||||||
<Card>
|
<Card>
|
||||||
<div className={isLoading ? "opacity-70 pointer-events-none transition-opacity" : ""}>
|
<div className={isLoading ? "opacity-70 pointer-events-none transition-opacity" : ""}>
|
||||||
<Table
|
{isLoading && <LoadingIndicator />}
|
||||||
columns={columns}
|
|
||||||
dataSource={files}
|
{isLoading && files.length === 0 ? (
|
||||||
rowKey="id"
|
<TableRowSkeleton count={5} />
|
||||||
emptyText="暂无文件数据"
|
) : (
|
||||||
className="files-table table-auto-height"
|
<Table
|
||||||
/>
|
columns={columns}
|
||||||
|
dataSource={files}
|
||||||
|
rowKey="id"
|
||||||
|
emptyText={isLoading ? "加载中..." : "暂无文件数据"}
|
||||||
|
className="files-table table-auto-height"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 分页组件 */}
|
{/* 分页组件 */}
|
||||||
{totalCount > 0 && (
|
{totalCount > 0 && (
|
||||||
|
|||||||
+138
-103
@@ -1,10 +1,11 @@
|
|||||||
import React, { useState, useEffect, useCallback } from 'react';
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
import { type MetaFunction, type LoaderFunctionArgs } from "@remix-run/node";
|
import { type MetaFunction, type LoaderFunctionArgs } from "@remix-run/node";
|
||||||
import { useLoaderData, useSearchParams, Link, useNavigate, useFetcher, useRouteLoaderData } from "@remix-run/react";
|
import { useLoaderData, useSearchParams, Link, useNavigate, useFetcher, useRouteLoaderData, useLocation } from "@remix-run/react";
|
||||||
import { Button } from '~/components/ui/Button';
|
import { Button } from '~/components/ui/Button';
|
||||||
import { Card } from '~/components/ui/Card';
|
import { Card } from '~/components/ui/Card';
|
||||||
import { Tag } from '~/components/ui/Tag';
|
import { Tag } from '~/components/ui/Tag';
|
||||||
import { StatusDot } from '~/components/ui/StatusDot';
|
import { StatusDot } from '~/components/ui/StatusDot';
|
||||||
|
import { TableRowSkeleton, LoadingIndicator, NumberSkeleton } from '~/components/ui/SkeletonScreen';
|
||||||
import rulesStyles from "~/styles/pages/rules_index.css?url";
|
import rulesStyles from "~/styles/pages/rules_index.css?url";
|
||||||
import type { Rule, RuleType, RulePriority } from '~/models/rule';
|
import type { Rule, RuleType, RulePriority } from '~/models/rule';
|
||||||
import { RULE_TYPE_COLORS, RULE_PRIORITY_LABELS, RULE_PRIORITY_COLORS } from '~/models/rule';
|
import { RULE_TYPE_COLORS, RULE_PRIORITY_LABELS, RULE_PRIORITY_COLORS } from '~/models/rule';
|
||||||
@@ -171,6 +172,7 @@ export default function RulesIndex() {
|
|||||||
const [searchParams, setSearchParams] = useSearchParams();
|
const [searchParams, setSearchParams] = useSearchParams();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const fetcher = useFetcher<ActionResponse>();
|
const fetcher = useFetcher<ActionResponse>();
|
||||||
|
const location = useLocation();
|
||||||
|
|
||||||
// 状态管理
|
// 状态管理
|
||||||
const [ruleGroups, setRuleGroups] = useState<RuleGroup[]>([]);
|
const [ruleGroups, setRuleGroups] = useState<RuleGroup[]>([]);
|
||||||
@@ -181,9 +183,18 @@ export default function RulesIndex() {
|
|||||||
const [filteredTotalCount, setFilteredTotalCount] = useState<number>(initialTotalCount);
|
const [filteredTotalCount, setFilteredTotalCount] = useState<number>(initialTotalCount);
|
||||||
const [ruleTypes, setRuleTypes] = useState<ApiRuleType[]>(initialRuleTypes);
|
const [ruleTypes, setRuleTypes] = useState<ApiRuleType[]>(initialRuleTypes);
|
||||||
|
|
||||||
|
// 添加一个路由变化计数器
|
||||||
|
const [routeChangeCount, setRouteChangeCount] = useState(0);
|
||||||
|
|
||||||
// 获取当前的ruleType值
|
// 获取当前的ruleType值
|
||||||
const ruleTypeParam = searchParams.get('ruleType');
|
const ruleTypeParam = searchParams.get('ruleType');
|
||||||
|
|
||||||
|
// 追踪路由变化
|
||||||
|
useEffect(() => {
|
||||||
|
// console.log("路由变化:", location.key);
|
||||||
|
setRouteChangeCount(prev => prev + 1);
|
||||||
|
}, [location]);
|
||||||
|
|
||||||
// 判断是否禁用规则组选择
|
// 判断是否禁用规则组选择
|
||||||
const isRuleGroupSelectDisabled = loadingGroups || !ruleTypeParam || ruleGroups.length === 0;
|
const isRuleGroupSelectDisabled = loadingGroups || !ruleTypeParam || ruleGroups.length === 0;
|
||||||
|
|
||||||
@@ -197,30 +208,6 @@ export default function RulesIndex() {
|
|||||||
setFilteredTotalCount(initialTotalCount);
|
setFilteredTotalCount(initialTotalCount);
|
||||||
setRuleTypes(initialRuleTypes);
|
setRuleTypes(initialRuleTypes);
|
||||||
}, [initialRules, initialTotalCount, initialRuleTypes]);
|
}, [initialRules, initialTotalCount, initialRuleTypes]);
|
||||||
|
|
||||||
// 在组件挂载时从 sessionStorage 获取 reviewType
|
|
||||||
useEffect(() => {
|
|
||||||
try {
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
const storedReviewType = sessionStorage.getItem('reviewType');
|
|
||||||
if (storedReviewType !== reviewType) {
|
|
||||||
setReviewType(storedReviewType);
|
|
||||||
|
|
||||||
if (initialLoad) {
|
|
||||||
// 如果是初始加载,立即加载数据
|
|
||||||
// 不需要更新 URL 参数,因为下一步的 loadRulesData 会处理
|
|
||||||
} else {
|
|
||||||
// 如果不是初始加载,更新 URL 参数
|
|
||||||
const newParams = new URLSearchParams(searchParams);
|
|
||||||
newParams.set('page', '1'); // 回到第一页
|
|
||||||
setSearchParams(newParams);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取 sessionStorage 中的 reviewType 失败:', error);
|
|
||||||
}
|
|
||||||
}, [reviewType, searchParams, setSearchParams, initialLoad]);
|
|
||||||
|
|
||||||
// 使用useEffect监听loaderData.error变化并显示Toast
|
// 使用useEffect监听loaderData.error变化并显示Toast
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -230,6 +217,61 @@ export default function RulesIndex() {
|
|||||||
toastService.error("评查点类型数据为空");
|
toastService.error("评查点类型数据为空");
|
||||||
}
|
}
|
||||||
}, [loaderData.error,loaderData.ruleTypes]);
|
}, [loaderData.error,loaderData.ruleTypes]);
|
||||||
|
|
||||||
|
// 客户端数据加载函数
|
||||||
|
const fetchData = useCallback(async () => {
|
||||||
|
try {
|
||||||
|
// 从sessionStorage获取reviewType
|
||||||
|
const storedReviewType = typeof window !== 'undefined' ? sessionStorage.getItem('reviewType') : null;
|
||||||
|
const typeToUse = reviewType || storedReviewType;
|
||||||
|
|
||||||
|
if (!typeToUse) {
|
||||||
|
console.warn('无法加载评查点数据:未找到reviewType');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// console.log("fetchData被调用,加载评查点数据", typeToUse);
|
||||||
|
setLoading(true);
|
||||||
|
|
||||||
|
// 获取评查点类型
|
||||||
|
try {
|
||||||
|
const typeResponse = await getRuleTypes(typeToUse);
|
||||||
|
if (typeResponse.data) {
|
||||||
|
setRuleTypes(typeResponse.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('加载评查点类型失败:', error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 构建查询参数
|
||||||
|
const queryParams = {
|
||||||
|
ruleType: ruleTypeParam || undefined,
|
||||||
|
groupId: searchParams.get('groupId') || undefined,
|
||||||
|
isActive: searchParams.get('isActive') ? searchParams.get('isActive') === 'true' : undefined,
|
||||||
|
keyword: searchParams.get('keyword') || undefined,
|
||||||
|
page: currentPage,
|
||||||
|
pageSize,
|
||||||
|
reviewType: typeToUse
|
||||||
|
};
|
||||||
|
|
||||||
|
// 调用 API 获取数据
|
||||||
|
const response = await getRulesList(queryParams);
|
||||||
|
|
||||||
|
if (response.data) {
|
||||||
|
const apiRules = response.data.rules || [];
|
||||||
|
const total = response.data.totalCount || 0;
|
||||||
|
const mappedRules = apiRules.map((apiRule: ApiRule) => mapApiRuleToModel(apiRule));
|
||||||
|
|
||||||
|
setFilteredRules(mappedRules);
|
||||||
|
setFilteredTotalCount(total);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('客户端加载评查点列表失败:', error);
|
||||||
|
toastService.error('加载评查点列表失败');
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
}, [reviewType, ruleTypeParam, searchParams, currentPage, pageSize]);
|
||||||
|
|
||||||
// 当评查点类型变化时,加载对应的规则组
|
// 当评查点类型变化时,加载对应的规则组
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -261,7 +303,12 @@ export default function RulesIndex() {
|
|||||||
loadRuleGroups();
|
loadRuleGroups();
|
||||||
}, [ruleTypeParam]);
|
}, [ruleTypeParam]);
|
||||||
|
|
||||||
// 使用useEffect监听fetcher状态变化并显示Toast
|
// 使用useEffect监听fetcher状态变化并显示Toast fetcher.state有以下几种状态: 通过fetcher提交数据后,action返回结果,fetcher.state会发生变化
|
||||||
|
// idle: 空闲状态
|
||||||
|
// loading: 加载中状态
|
||||||
|
// submittting: 提交中状态
|
||||||
|
// loading: 加载中状态
|
||||||
|
// idle: 空闲状态
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (fetcher.data && fetcher.state === 'idle') {
|
if (fetcher.data && fetcher.state === 'idle') {
|
||||||
if (fetcher.data.result) {
|
if (fetcher.data.result) {
|
||||||
@@ -276,86 +323,55 @@ export default function RulesIndex() {
|
|||||||
}
|
}
|
||||||
}, [fetcher.data,fetcher.state]);
|
}, [fetcher.data,fetcher.state]);
|
||||||
|
|
||||||
// 添加客户端数据加载函数
|
// 在组件挂载时从 sessionStorage 获取 reviewType 并加载数据
|
||||||
const loadRulesData = useCallback(async () => {
|
useEffect(() => {
|
||||||
if (!reviewType) return;
|
|
||||||
|
|
||||||
setLoading(true);
|
|
||||||
try {
|
try {
|
||||||
// 构建查询参数
|
if (typeof window !== 'undefined') {
|
||||||
const queryParams = {
|
const storedReviewType = sessionStorage.getItem('reviewType');
|
||||||
ruleType: ruleTypeParam || undefined,
|
// console.log("组件挂载,从sessionStorage获取reviewType:", storedReviewType);
|
||||||
groupId: searchParams.get('groupId') || undefined,
|
|
||||||
isActive: searchParams.get('isActive') ? searchParams.get('isActive') === 'true' : undefined,
|
|
||||||
keyword: searchParams.get('keyword') || undefined,
|
|
||||||
page: currentPage,
|
|
||||||
pageSize,
|
|
||||||
reviewType
|
|
||||||
};
|
|
||||||
|
|
||||||
// 调用 API 获取数据
|
|
||||||
const response = await getRulesList(queryParams);
|
|
||||||
|
|
||||||
if (response.data) {
|
|
||||||
const apiRules = response.data.rules || [];
|
|
||||||
const total = response.data.totalCount || 0;
|
|
||||||
const mappedRules = apiRules.map((apiRule: ApiRule) => mapApiRuleToModel(apiRule));
|
|
||||||
|
|
||||||
setFilteredRules(mappedRules);
|
if (storedReviewType !== reviewType) {
|
||||||
setFilteredTotalCount(total);
|
setReviewType(storedReviewType);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 无论如何,都加载数据,不依赖于reviewType的变化
|
||||||
|
if (storedReviewType) {
|
||||||
|
// 使用setTimeout确保该操作在其他状态更新之后执行
|
||||||
|
setTimeout(() => {
|
||||||
|
fetchData();
|
||||||
|
}, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('客户端加载评查点列表失败:', error);
|
console.error('获取 sessionStorage 中的 reviewType 失败:', error);
|
||||||
toastService.error('加载评查点列表失败');
|
|
||||||
} finally {
|
|
||||||
setLoading(false);
|
|
||||||
}
|
}
|
||||||
}, [reviewType, ruleTypeParam, searchParams, currentPage, pageSize]);
|
}, [initialLoad, fetchData]);
|
||||||
|
|
||||||
// 添加加载评查点类型的函数
|
// 监听路由变化,每次路由到此页面时刷新数据
|
||||||
const loadRuleTypes = useCallback(async () => {
|
useEffect(() => {
|
||||||
if (!reviewType) return;
|
if (routeChangeCount > 0) {
|
||||||
|
// console.log("路由变化触发数据刷新,计数:", routeChangeCount);
|
||||||
try {
|
const storedReviewType = typeof window !== 'undefined' ? sessionStorage.getItem('reviewType') : null;
|
||||||
// 调用 API 获取评查点类型,传递 reviewType 参数
|
// console.log("storedReviewType:", storedReviewType);
|
||||||
const response = await getRuleTypes(reviewType);
|
if (storedReviewType) {
|
||||||
|
if (storedReviewType !== reviewType) {
|
||||||
if (response.data) {
|
setReviewType(storedReviewType);
|
||||||
const typesData = response.data;
|
}
|
||||||
// 这里可以添加类型过滤的逻辑,但实际上 API 中已经根据 reviewType 进行了过滤
|
|
||||||
|
|
||||||
// 更新状态
|
// 使用setTimeout确保该操作在其他状态更新之后执行
|
||||||
const updatedTypes = typesData;
|
setTimeout(() => {
|
||||||
// 替换掉 loaderData 中的 ruleTypes
|
fetchData();
|
||||||
setRuleTypes(updatedTypes);
|
}, 0);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
|
||||||
console.error('加载评查点类型失败:', error);
|
|
||||||
toastService.error('加载评查点类型失败');
|
|
||||||
}
|
}
|
||||||
}, [reviewType]);
|
}, [routeChangeCount, fetchData]);
|
||||||
|
|
||||||
// 在 reviewType 变化时加载评查点类型
|
// 监听 URL 参数变化,重新获取数据
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (reviewType) {
|
if (reviewType) {
|
||||||
loadRuleTypes();
|
fetchData();
|
||||||
}
|
}
|
||||||
}, [reviewType, loadRuleTypes]);
|
}, [searchParams, fetchData, reviewType]);
|
||||||
|
|
||||||
// 在 reviewType 变化或其他参数变化时加载数据
|
|
||||||
useEffect(() => {
|
|
||||||
if (reviewType) {
|
|
||||||
loadRulesData();
|
|
||||||
}
|
|
||||||
}, [reviewType, loadRulesData]);
|
|
||||||
|
|
||||||
// 在初始加载完成后,如果有 reviewType,立即加载数据
|
|
||||||
useEffect(() => {
|
|
||||||
if (initialLoad && reviewType) {
|
|
||||||
loadRuleTypes();
|
|
||||||
loadRulesData();
|
|
||||||
}
|
|
||||||
}, [initialLoad, reviewType, loadRuleTypes, loadRulesData]);
|
|
||||||
|
|
||||||
// 筛选评查点
|
// 筛选评查点
|
||||||
const handleFilterChange = (e: React.ChangeEvent<HTMLSelectElement | HTMLInputElement>) => {
|
const handleFilterChange = (e: React.ChangeEvent<HTMLSelectElement | HTMLInputElement>) => {
|
||||||
@@ -563,7 +579,20 @@ export default function RulesIndex() {
|
|||||||
<div className="rules-page">
|
<div className="rules-page">
|
||||||
{/* 页面头部 */}
|
{/* 页面头部 */}
|
||||||
<div className="flex justify-between items-center mb-4">
|
<div className="flex justify-between items-center mb-4">
|
||||||
<h2 className="text-xl font-medium">评查点管理</h2>
|
<div className="flex items-center">
|
||||||
|
<h2 className="text-xl font-medium">评查点管理</h2>
|
||||||
|
{loading ? (
|
||||||
|
<div className="flex items-center ml-4 bg-white px-3 py-1 rounded-md">
|
||||||
|
<NumberSkeleton className="ml-1" />
|
||||||
|
</div>
|
||||||
|
) : (
|
||||||
|
<div className="flex items-center ml-4 bg-white px-3 py-1 rounded-md">
|
||||||
|
<i className="ri-file-list-3-line text-primary text-lg mr-1"></i>
|
||||||
|
<span className="text-sm text-secondary">总评查点数:</span>
|
||||||
|
<span className="text-base font-normal text-primary ml-1">{filteredTotalCount}</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{isDeveloper && (
|
{isDeveloper && (
|
||||||
<Button type="primary" icon="ri-add-line" to="/rules-new" className="btn-add-rule">
|
<Button type="primary" icon="ri-add-line" to="/rules-new" className="btn-add-rule">
|
||||||
新增评查点
|
新增评查点
|
||||||
@@ -635,20 +664,26 @@ export default function RulesIndex() {
|
|||||||
|
|
||||||
{/* 评查点列表 - 使用Table组件 */}
|
{/* 评查点列表 - 使用Table组件 */}
|
||||||
<Card className="ant-card">
|
<Card className="ant-card">
|
||||||
|
{loading && <LoadingIndicator />}
|
||||||
<div className={loading ? "opacity-70 pointer-events-none transition-opacity" : ""}>
|
<div className={loading ? "opacity-70 pointer-events-none transition-opacity" : ""}>
|
||||||
<Table
|
|
||||||
columns={columns}
|
{loading && filteredRules.length === 0 ? (
|
||||||
dataSource={filteredRules.length > 0 ? filteredRules : initialRules}
|
<TableRowSkeleton count={5} />
|
||||||
rowKey="id"
|
) : (
|
||||||
emptyText="暂无评查点数据"
|
<Table
|
||||||
className="rules-table"
|
columns={columns}
|
||||||
/>
|
dataSource={filteredRules}
|
||||||
|
rowKey="id"
|
||||||
|
// emptyText={loading ? "正在加载数据..." : "暂无评查点数据"}
|
||||||
|
className="rules-table"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{/* 分页 */}
|
{/* 分页 */}
|
||||||
{filteredTotalCount > 0 && (
|
{filteredTotalCount > 0 && (
|
||||||
<Pagination
|
<Pagination
|
||||||
currentPage={currentPage}
|
currentPage={currentPage}
|
||||||
total={filteredTotalCount > 0 ? filteredTotalCount : initialTotalCount}
|
total={filteredTotalCount}
|
||||||
pageSize={pageSize}
|
pageSize={pageSize}
|
||||||
onChange={handlePageChange}
|
onChange={handlePageChange}
|
||||||
onPageSizeChange={handlePageSizeChange}
|
onPageSizeChange={handlePageSizeChange}
|
||||||
|
|||||||
+16
-15
@@ -81,17 +81,27 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 1rem;
|
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
background-color: #f0f7f4;
|
background-color: #f0f7f4;
|
||||||
|
background-image: url('/images/主页背景-min.png');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index-main-content-container {
|
||||||
|
padding: 2rem 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
width: 90%;
|
||||||
|
max-width: 1200px;
|
||||||
|
transform: translateY(-7rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.welcome-text {
|
.welcome-text {
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #333;
|
color: #333;
|
||||||
margin-bottom: 3rem;
|
margin-bottom: 5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,13 +120,14 @@
|
|||||||
background: linear-gradient(to bottom, #ebebeb, #ffffff);
|
background: linear-gradient(to bottom, #ebebeb, #ffffff);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||||
transition: transform 0.2s, box-shadow 0.2s;
|
transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-card:hover {
|
.module-card:hover {
|
||||||
transform: translateY(-5px);
|
transform: translateY(-5px);
|
||||||
border: 1px solid #269b6c;
|
border-color: #269b6c;
|
||||||
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,16 +150,6 @@
|
|||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 底部山水背景 */
|
|
||||||
.footer {
|
|
||||||
height: 200px;
|
|
||||||
margin: 1rem;
|
|
||||||
margin-top: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
background-color: #f0f7f4;
|
|
||||||
border-radius: 0 0 0.5rem 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mountains-bg {
|
.mountains-bg {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -4,7 +4,10 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
background: linear-gradient(135deg, #f0f7f4 0%, #c5e8e0 100%);
|
background-image: url('/images/登录页背景-min.png');
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-container {
|
.login-container {
|
||||||
|
|||||||
Generated
+3
-1
@@ -34,6 +34,7 @@
|
|||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-pdf": "^5.7.2",
|
"react-pdf": "^5.7.2",
|
||||||
"remixicon": "^4.6.0",
|
"remixicon": "^4.6.0",
|
||||||
|
"tslib": "^2.8.1",
|
||||||
"uuid": "^11.1.0"
|
"uuid": "^11.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -14660,7 +14661,8 @@
|
|||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.8.1",
|
"version": "2.8.1",
|
||||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
|
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz",
|
||||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
|
"license": "0BSD"
|
||||||
},
|
},
|
||||||
"node_modules/turbo-stream": {
|
"node_modules/turbo-stream": {
|
||||||
"version": "2.4.0",
|
"version": "2.4.0",
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-pdf": "^5.7.2",
|
"react-pdf": "^5.7.2",
|
||||||
"remixicon": "^4.6.0",
|
"remixicon": "^4.6.0",
|
||||||
|
"tslib": "^2.8.1",
|
||||||
"uuid": "^11.1.0"
|
"uuid": "^11.1.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 498 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
Reference in New Issue
Block a user