1. 开启交叉评查的显示/隐藏(开启生产环境的配置),优化不同端口的显示/隐藏交叉评查入口的效果。

2. 优化评查结果的AI建议修改的文本输入框的显示效果。
3. 提交17正式环境的api-config.ts,备份一个wafIP的配置api-config-wafIP.ts。
This commit is contained in:
2025-12-16 17:47:15 +08:00
parent d2346aad70
commit d04882bf51
10 changed files with 293 additions and 149 deletions
@@ -2100,10 +2100,11 @@ export function ReviewPointsList({
value={suggestionValue.suggested_value || ''}
readOnly
disabled={!hasSuggestedValue}
rows={Math.min(Math.max(Math.ceil((suggestionValue.suggested_value || '').length / 30), 1), 5)}
className={`flex-1 p-2 border rounded text-xs resize-none overflow-y-auto focus:outline-none ${
hasSuggestedValue
? 'border-gray-200 bg-gray-50 text-gray-700 cursor-not-allowed'
: 'border-gray-200 bg-gray-100 text-gray-400 cursor-not-allowed'
? 'border-gray-200 bg-gray-50 text-gray-700'
: 'border-gray-200 bg-gray-100 text-gray-400'
}`}
aria-label={`${key}的AI建议内容`}
placeholder={!hasSuggestedValue ? '暂无建议值' : ''}
+19 -1
View File
@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
import { Link, useLocation, useNavigate } from '@remix-run/react';
import type { UserRole } from '~/root';
import { getUserRoutesByRole, mapUserRoleToRoleKey, type MenuItem } from '~/api/auth/user-routes';
import { DOCUMENT_URL } from '~/config/api-config';
import { DOCUMENT_URL, CROSS_CHECKING_ONLY_PORT, CROSS_CHECKING_ONLY_MODE } from '~/config/api-config';
interface SidebarProps {
onToggle: () => void;
@@ -95,6 +95,15 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid
const [isSettingsMode, setIsSettingsMode] = useState<boolean>(false);
const [isCrossCheckingMode, setIsCrossCheckingMode] = useState<boolean>(false);
// 🔒 检测当前端口,用于控制交叉评查入口的显示
const [currentPort, setCurrentPort] = useState<string>('');
useEffect(() => {
if (typeof window !== 'undefined') {
setCurrentPort(window.location.port || '');
}
}, []);
// 从 sessionStorage 读取当前选中的模块名称和图片路径,以及各种模式标志
useEffect(() => {
if (typeof window !== 'undefined') {
@@ -200,6 +209,15 @@ export function Sidebar({ onToggle, collapsed, userRole, frontendJWT = '' }: Sid
return false;
}
// 🔒 交叉评查访问控制:
// - CROSS_CHECKING_ONLY_MODE=false 时,所有端口都可访问(根据后端权限)
// - CROSS_CHECKING_ONLY_MODE=true 时,只有 51707 端口可访问
if (CROSS_CHECKING_ONLY_MODE && currentPort && currentPort !== CROSS_CHECKING_ONLY_PORT) {
if (item.path === '/cross-checking' || item.path?.startsWith('/cross-checking/')) {
return false;
}
}
// 🔑 重要:非交叉评查模式下,隐藏所有 /cross-checking 相关菜单
if (item.path === '/cross-checking' || item.path?.startsWith('/cross-checking/')) {
return false;
+4 -3
View File
@@ -1760,7 +1760,7 @@ export function ReviewPointsList({
{/* 字段名称标签 */}
<div className="text-xs text-gray-600 mb-2 font-medium">
<i className="ri-lightbulb-line text-yellow-500 mr-1"></i>
AI建议修改 - {key}
AI修改建议 - {key}
</div>
{/* 原因说明 */}
@@ -1785,10 +1785,11 @@ export function ReviewPointsList({
value={suggestionValue.suggested_value || ''}
readOnly
disabled={!hasSuggestedValue}
rows={Math.min(Math.max(Math.ceil((suggestionValue.suggested_value || '').length / 30), 1), 5)}
className={`flex-1 p-2 border rounded text-xs resize-none overflow-y-auto focus:outline-none ${
hasSuggestedValue
? 'border-gray-200 bg-gray-50 text-gray-700 cursor-not-allowed'
: 'border-gray-200 bg-gray-100 text-gray-400 cursor-not-allowed'
? 'border-gray-200 bg-gray-50 text-gray-700'
: 'border-gray-200 bg-gray-100 text-gray-400'
}`}
aria-label={`${key}的AI建议内容`}
placeholder={!hasSuggestedValue ? '暂无建议值' : ''}
@@ -338,7 +338,7 @@ export function PdfPreview({
fill="#00AA00"
fillOpacity="0.1"
stroke="#00684a"
strokeWidth="1"
strokeWidth="0.5"
rx="2"
>
<title>{`高亮文本: ${highlight.text}`}</title>