Commit Graph

442 Commits

Author SHA1 Message Date
TanWenyan 5d3cb2ba34 fix: unwrap PostgREST proxy response format for pointCode 2026-03-23 20:56:27 +08:00
TanWenyan 138cb5c606 fix: fetch pointCode directly via PostgREST in route loader
Vite tree-shakes pointCode from intermediate data objects. Fix by
querying evaluation_points.code directly in the route loader with
postgrestGet, then patching pointCode onto reviewPoints before
returning to the client. Works for both legacy and GraphRAG paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:49:45 +08:00
TanWenyan 2694eeb011 fix: bypass Vite tree-shake for pointCode via pointCodeMap
Vite's SSR build strips pointCode from ReviewPointResult return objects.
Workaround: pass a separate pointCodeMap from reviews.ts and apply it
in the route loader (reviews.tsx) which Vite preserves.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:39:08 +08:00
TanWenyan 20a8ed4466 fix: use String() instead of 'as string' for pointCode to survive Vite build 2026-03-23 20:36:21 +08:00
TanWenyan 7ad9e479cd fix: add pointCode to ReviewPointResult interface to survive build
Vite/Remix tree-shaking was stripping pointCode from the return object
because it wasn't declared in the ReviewPointResult interface.
Also removed debug console.logs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:33:38 +08:00
TanWenyan ca1cc23c99 debug: log all keys to find pointCode issue 2026-03-23 20:28:21 +08:00
TanWenyan 38a43133c0 debug: add server-side point.code logging and enlarge badge 2026-03-23 20:25:30 +08:00
TanWenyan daca126ee2 debug: add pointCode fallback and console log 2026-03-23 20:11:53 +08:00
TanWenyan 2fe773909e feat(ui): display evaluation point code and support code search
- Add pointCode field to ReviewPoint interface and data pipeline
- Show code badge (e.g., JZ-DJ-001) before evaluation point name
- Search bar now matches against point code in addition to name
- Updated placeholder to indicate code search support

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 20:02:35 +08:00
TanWenyan 13e16f4046 fix(ui): increase table tooltip max height to 80vh
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:51:02 +08:00
TanWenyan 9f9cfea0e6 fix(ui): dynamic tooltip width/height based on table dimensions
Table tooltip now calculates maxWidth from column count (140px/col,
min 400, max 85vw) and maxHeight from row count (30px/row, min 150,
max 70vh) for better readability of large tables.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:48:53 +08:00
TanWenyan cbe9a0f74e fix(ui): show table summary with hover tooltip for full table view
Table fields now show a compact summary (first row preview + table icon)
with the full rendered table appearing on hover via Tooltip component,
consistent with the existing overflow tooltip behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:45:00 +08:00
TanWenyan 93b8673363 fix(ui): handle single-line markdown tables and pipe-delimited tables
- parseMarkdownTable now handles tables stored as single line by
  counting columns from separator row and grouping cells accordingly
- Added isPipeTable detection for pipe-delimited data without header
  (e.g., "1 | name | qty\n2 | name | qty")
- Added renderPipeTable for headerless pipe tables

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:30:44 +08:00
TanWenyan d0124b0121 feat(ui): support markdown table rendering in evaluation field values
ReactTableTooltip now detects and renders markdown tables (| delimited)
in addition to existing tab-delimited tables. Table content is rendered
directly as an HTML table instead of showing raw markdown text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:19:53 +08:00
DocAuditAI Dev ebcaf05625 revert: reset to 32bee87 for clean text_bbox baseline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:14:11 +08:00
DocAuditAI Dev e1ac39cb3a chore: revert broken text_bbox integration changes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 18:03:34 +08:00
DocAuditAI Dev 61fdfec3d0 fix(api): disable HTTP keep-alive to prevent ECONNRESET on reused sockets
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 17:01:32 +08:00
LiangShiyong 702b7d3e3a fix: 修复甲方和乙方的公司名称是用第一个key内的value值来进行查询。 2026-03-23 16:45:35 +08:00
LiangShiyong 519287c7f4 feat: 渲染大模型的评查结果也添加上true和false的判断 2026-03-23 16:45:35 +08:00
LiangShiyong 4de16d66da fix: 添加湛江的地区选择 2026-03-23 16:45:35 +08:00
DocAuditAI Dev 33fbd6b860 feat(pdf): support GraphRAG text_bbox highlighting in PDF viewer
When documents are processed through GraphRAG pipeline, coordinate
enrichment produces text_bbox (paragraph-level coordinates) instead of
char_positions (character-level OCR coordinates). Added resolveCharPositions()
helper that converts text_bbox to CharPosition[] format, enabling PDF
highlight rendering for GraphRAG-processed documents.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 16:44:22 +08:00
TanWenyan 32bee87998 fix(reviews): show field value when res=false instead of showing '缺失'
Second rendering path (entity fields) incorrectly hid values when
res=false, showing '缺失' even for fields with extracted values.
Fixed to match first rendering path: only show '缺失' when both
res=false AND value is empty. Values always display when present.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 01:05:48 +08:00
TanWenyan c0f8004278 feat(reviews): display not-applicable evaluation points in review list
- Create placeholder reviewPoints from not_applicable unified results
- Merge with existing reviewPoints for display
- Count notApplicable from reviewPoints for accurate statistics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:29:48 +08:00
TanWenyan 0d8b9b1976 fix(reviews): make not-applicable button clickable with filter toggle
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:16:35 +08:00
TanWenyan b13e758db1 fix(reviews): map failed_count to warning, always show not-applicable badge
- failed_count should be 'warning' not 'error' for scored eval
- Show '未涉及' badge always, not only when count > 0

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:08:33 +08:00
TanWenyan 401097536e fix(reviews): use correct key 'data' from getReviewPoints_fromApi response
- getReviewPoints_fromApi returns {data, stats, ...} not {reviewPoints, ...}
- Fixed key check from 'reviewPoints' to 'data'

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 19:05:39 +08:00
TanWenyan b2e8d3299c fix(reviews): use legacy reviewPoints for graphrag mode to prevent content null crash
- reviewPoints from unified API lacks 'content' field expected by ReviewPointsList
- Use reviewData.reviewPoints (from /api/v3/review-points) which has proper content structure
- Scored data still available via scoredResults prop

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:53:31 +08:00
TanWenyan 48f605a5c4 feat(reviews): add not-applicable count display in evaluation statistics
- Add notApplicable field to Statistics interface
- Show blue "未涉及" badge when count > 0 (display only, no filter)
- Map backend not_applicable_count to frontend statistics

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 18:27:41 +08:00
TanWenyan 60d7d9a33b fix(frontend): fix loader try-catch syntax error
- Add missing closing brace for unified API error check
- Properly wrap catch block around error handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:44:34 +08:00
TanWenyan 306cb24c70 feat(frontend): integrate GraphRAG scored evaluation results
- Add getUnifiedEvaluationResults API function
- Extend ReviewPointsListProps with flowType, scoredResults, scoredSummary
- Add ScoredResultCard rendering for graphrag flow_type
- Modify reviews.tsx loader to call unified API
- Add scored evaluation component imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 09:42:30 +08:00
TanWenyan 11c00d34bc fix(ReviewPointsList): 读取后端传入的 per-field res 替代前端自行判定
renderModelRule 对 AI 评查点的 res 计算改为优先使用后端写入
config.fields[key].res 的值,fallback 到原来的 value 非空判定。

解决了评查点不通过但所有细项都显示绿色的问题。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 15:50:12 +08:00
TanWenyan d82d537971 fix(upload): 传递 attributeType 参数到 uploadDocumentToServer 2026-03-18 23:15:05 +08:00
TanWenyan df02ed79c2 fix(upload): 子类型下拉框始终显示,不限于合同类型 2026-03-18 22:51:19 +08:00
TanWenyan 62a8f4b13d feat(cross-checking): 交叉评查上传支持合同类型选择 2026-03-18 22:00:26 +08:00
TanWenyan 9fd222ef3d feat(upload): 添加合同类型选择器,用户必须手动选择 2026-03-18 21:57:07 +08:00
TanWenyan 1a2ce367af feat(api): uploadDocumentToServer 增加 attribute_type 参数 2026-03-18 21:55:04 +08:00
TanWenyan 737040fc3a feat(constants): 添加合同类型常量定义 2026-03-18 21:53:25 +08:00
TanWenyan 0a436311c8 新增上传队列显示 2026-01-29 16:54:45 +08:00
TanWenyan 7e6424e9ac fix: 修复知识库配置管理的权限检查和错误提示
1. 权限检查优化
   - 使用 hasPermission('dify:bind:update') 替代硬编码的角色判断
   - 支持细粒度的权限控制,市级管理员可以通过授权获得编辑权限
   - 保留降级方案,provincial_admin 角色自动拥有所有权限

2. 错误处理优化
   - 新增统一的 handleApiError 错误处理函数
   - 优先显示后端返回的具体错误信息(error.response.data.msg)
   - 支持多种错误格式的提取(axios、fetch、自定义格式)
   - 简化 handleCreate、handleUpdate、handleDelete 的错误处理代码

3. 调试支持
   - 添加权限检查的调试日志,便于排查问题
   - 输出当前路由、用户角色、权限列表等关键信息

修复问题:
- 市级管理员被授予 dify:bind:update 权限后,编辑按钮仍不显示
- 403 错误只显示通用提示,无法看到后端返回的具体错误原因

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 19:02:44 +08:00
LiangShiyong cbdffc9b2e fix:隐藏交叉评查的负责人的按钮 2026-01-22 18:09:41 +08:00
LiangShiyong b97d0e1a0b 1. 登录返回总公司,分公司,部门信息。
2. 修改角色权限管理的分配用户的数据渲染和接口。
3. 交叉评查任务的创建的组织架构组件的重构。
2026-01-21 10:04:04 +08:00
LiangShiyong 9951f16e50 1.同步包版本。
2.交叉评查的任务中上传文件。
3.添加dify库名解决保存配置失败的问题。
2026-01-20 17:29:55 +08:00
LiangShiyong 1fca1a2e2e 1. 添加新的正式环境的secret配置信息。
2. 动态回调地址,如果是钉钉应用则用对应的回调地址。
3. 高频错误评查点改成显示出错次数。
4. 添加开关的通用组件,评查点列表方便修改状态。
2026-01-19 16:22:21 +08:00
LiangShiyong e332d05e5d 评查点规则编辑中添加多实体开关控制。
修复文档类型删除失败的bug
2026-01-16 10:11:53 +08:00
LiangShiyong ea896f98fd 添加开关组件,在评查点规则列表中添加单个状态控制的开关 2026-01-16 09:59:38 +08:00
LiangShiyong ae89b377b7 添加甲方,乙方的企查查入口按钮 2026-01-16 09:52:11 +08:00
LiangShiyong 66d2f7cef4 1.添加移动端用户的检测工具类,移动端用户只能访问对话页面。
2.评查点列表添加文档属性类型字段。
3.优化dify的对话侧边栏的显示效果。
4.评查点规则添加使用文档属性类型的输入框。添加多实体开关的操作开关。
2025-12-30 18:35:48 +08:00
LiangShiyong d2aba899cc 更改配置部署在nas上 2025-12-19 00:31:42 +08:00
LiangShiyong 616f059f1e feat: 1. 完善评查点分组的删除逻辑,会涉及文档类型绑定的一级分组,分组绑定的评查点规则。新增一个评查点分组换绑的。
2. 修复交叉评查的任务中的文档列表的历史文档的查看跳转路径。
3. 修复评查点新增中评查点类型只能显示当前文档类型绑定的这几个一级分组。评查点类型=一级分组。
4. 修复文档列表关于pdf的下载失败的问题。
2025-12-19 00:21:49 +08:00
LiangShiyong 38f17fb3ed fix: 修复api-config的省局端口配置 2025-12-17 11:26:55 +08:00