feat: 1. 添加axios全局路由拦截进行自动添加请求jwt。 2.重新整理路由表。 3. 文档列表新增版本差异对比。 4.菜单路由可访问列表通过对接接口返回,添加全局路由检测。

5. 修改统一认证登录和管理员登录是通过接口形式进行,存储返回的accessToken。    6. 修改交叉评查的部分样式
This commit is contained in:
2025-11-18 11:06:24 +08:00
parent 8a50671c39
commit bfe39e45a9
53 changed files with 9503 additions and 2796 deletions
+59
View File
@@ -0,0 +1,59 @@
/**
* 问题数量差异显示组件
* 用于显示文档版本之间的问题数量对比
*/
interface IssuesDiffProps {
currentIssues: number | null;
previousIssues?: number | null;
issuesDiff?: number;
issuesDiffType?: 'increase' | 'decrease' | 'same';
className?: string;
}
export function IssuesDiff({
currentIssues,
previousIssues,
issuesDiff,
issuesDiffType,
className = ''
}: IssuesDiffProps) {
// 如果当前问题数量为 null,显示 "-"
if (currentIssues === null) {
return <span className={`issues-number ${className}`}>-</span>;
}
// 如果没有上一个版本或上一个版本问题数量为 null,只显示当前数量
if (previousIssues === null || previousIssues === undefined || issuesDiffType === undefined) {
return <span className={`issues-number ${className}`}>{currentIssues}</span>;
}
// 显示当前数量 + 差异
return (
<div className={`issues-count-wrapper ${className}`}>
<span className="issues-number">{currentIssues}</span>
{issuesDiff !== undefined && issuesDiffType && (
<span className={`issues-diff ${issuesDiffType}`}>
{issuesDiffType === 'increase' && (
<>
<i className="ri-arrow-up-line"></i>
<span>+{issuesDiff}</span>
</>
)}
{issuesDiffType === 'decrease' && (
<>
<i className="ri-arrow-down-line"></i>
<span>-{issuesDiff}</span>
</>
)}
{issuesDiffType === 'same' && (
<>
<i className="ri-subtract-line"></i>
<span>0</span>
</>
)}
</span>
)}
</div>
);
}
+8 -3
View File
@@ -113,19 +113,24 @@ const MultiCascader: React.FC<MultiCascaderProps> = ({
<div className="flex items-center py-1">
<input
type="checkbox"
className="form-checkbox h-4 w-4 text-[var(--color-primary,#00684a)] rounded border-gray-300 focus:ring-[var(--color-primary,#00684a)]"
className="h-4 w-4 rounded border-gray-300"
style={{
accentColor: '#00684a', // 固定为绿色(烟草企业绿)
cursor: 'pointer'
}}
checked={allChecked}
ref={el => { if (el) el.indeterminate = !allChecked && someChecked; }}
onChange={e => handleItemCheck(option, e.target.checked)}
id={`cascader-${option.value}`}
/>
<label htmlFor={`cascader-${option.value}`} className="ml-2 text-sm flex-1">
<label htmlFor={`cascader-${option.value}`} className="ml-2 text-sm flex-1 cursor-pointer">
{option.label}
</label>
{hasChildren && (
<button
type="button"
className="ml-2 text-gray-400 hover:text-gray-600"
className="ml-2"
style={{ color: 'gray' }} // 展开图标固定为绿色
onClick={(e) => {
e.stopPropagation();
toggleExpand(option.value);
+1 -4
View File
@@ -29,7 +29,4 @@ export { MessageModal } from './MessageModal';
export { LoadingBar } from './LoadingBar';
export { RouteChangeLoader } from './RouteChangeLoader';
export { FileProgress } from './FileProgress';
export { ProcessingSteps } from './ProcessingSteps';
// 示例组件(开发环境使用)
export { TooltipExample } from '../../routes/examples/TooltipExample';
export { ProcessingSteps } from './ProcessingSteps';