Commit Graph

332 Commits

Author SHA1 Message Date
wren 796ce90e32 fix: restore reviews detail layout and leaudit data wiring 2026-05-06 17:31:48 +08:00
wren 63bf3f56ce refactor: align document type page with root groups 2026-05-06 14:20:53 +08:00
wren 8dbacb8bea fix: speed up document type group loading 2026-05-06 11:05:35 +08:00
wren f1d77db79a fix: clarify document type grouping hierarchy 2026-05-06 10:54:42 +08:00
wren 22ef99754c fix: align rules list and review detail flows 2026-05-06 10:35:57 +08:00
wren c3ef4dcefc fix: restore reviewsTest detail rendering 2026-05-06 10:01:21 +08:00
wren c54f84382b feat: align frontend document and rule management flows 2026-05-06 09:40:37 +08:00
wren 8a5044b024 fix: remove document review status postgrest fallback 2026-05-06 09:37:02 +08:00
wren 37e1611ed4 fix: cut reviewsTest over to new review detail apis 2026-05-06 09:19:03 +08:00
jandejang 9e0909ab35 完善规则配置页交互细节 2026-04-30 17:59:43 +08:00
wren 2eb40e8af6 feat: show usable rule counts 2026-04-30 17:59:35 +08:00
wren 3fb7e9f5d0 feat: stabilize document type and upload flows 2026-04-30 17:44:05 +08:00
wren 81c5e98b53 refactor: rewrite document-type management for new backend API
- API client: switch from /api/v3/document-types to /api/document-types,
  replace group_ids with ruleSetIds, add getEntryModules/getRuleSets
- List page: simplified to code/name/entry_module/rule_sets/status columns
- New/Edit page: code + name + description + entry_module dropdown +
  rule_set multi-select checklist
- Fix DocumentType type import collision in documents.ts
2026-04-30 13:18:24 +08:00
wren 73fd8617e1 refactor: switch upload to new POST /api/upload with flat FormData
Replace the old nested upload_info JSON approach with flat
multipart fields (typeId, region, fileRole, createdBy, autoRun,
speed) matching the new leaudit-platform backend.

- uploadDocumentToServer: POST ${API_BASE_URL}/api/upload
- handleFileUpload: pass region from userInfo.area, derive speed
  from priority enum, pass createdBy from JWT user_id
- UploadResult replaces FileUploadResponse with documentId/fileId
  replacing the old nested result.id/result.file_name pattern
2026-04-30 12:16:24 +08:00
wren 185f55cec6 fix: pass through server 403 message instead of hardcoded '无权限'
The axios response interceptor was discarding the server's
permission-denied message (e.g. "缺少「用户列表」权限") and
replacing it with a generic "无权限". Now it reads the server
response body and surfaces the exact permission that's missing.
2026-04-30 11:47:32 +08:00
wren e2ae791fa2 fix: allow admin role to edit in role-permissions page
Previously only provincial_admin could edit roles/permissions in
the UI. Now admin (city-level admin) role can also edit. The
backend already enforces fine-grained permission checks, so the
UI gate just needs to match can_manage semantics.
2026-04-30 11:36:11 +08:00
wren 55e2c6993f fix: tighten entry module rbac flows 2026-04-29 22:25:06 +08:00
wren b544b1a795 fix: support local entry module icons 2026-04-29 19:50:10 +08:00
wren 790b9566e1 feat: restore settings routes for admin modules 2026-04-29 18:39:45 +08:00
wren 3d3d8d6e6b fix: align login and home routing with leaudit backend 2026-04-29 18:02:31 +08:00
wren 7dbeaac5f8 fix: bootstrap session after password login 2026-04-29 15:58:59 +08:00
wren 0369de68cc fix: complete admin login redirect flow 2026-04-29 15:53:10 +08:00
wren 23ab13dd1e feat: hook document list to leaudit list api 2026-04-29 12:20:16 +08:00
jandejang 84d2e0a1a5 对齐规则列表页交互样式 2026-04-29 11:22:20 +08:00
jandejang dce5ac0c9a 保存规则库 YAML 维护改造进展 2026-04-28 22:00:00 +08:00
LiangShiyong a3fd2c7fed feat: 初步完成评查详情页面的work文档和pdf文档的加载的页面三栏设计的重构。 2026-04-21 15:08:14 +08:00
LiangShiyong 4e19672b38 添加pdf的略缩图组件的实现。 2026-04-17 19:01:52 +08:00
LiangShiyong dd94e97f3c Merge branch 'PingChuan' into shiy-login 2026-04-14 09:47:24 +08:00
LiangShiyong cdf1d4f096 fix: 修复首页交叉评查和知识库入口的渲染逻辑。 2026-04-14 09:45:12 +08:00
PingChuan 5bee9288b9 feat:替换 Dify 为自建 RAG去实现
1、修复了若干无权限时的失败提示语
2、新增了一个生成后续建议问题的功能
3、重构了知识问答部分的权限管理模块
4、修复了若干渲染不恰当的样式渲染
2026-04-10 16:20:32 +08:00
TanWenyan cd852ee721 fix(frontend): guard response.error.includes against non-string error values
If the API returns a non-string error (e.g. numeric HTTP status code),
calling .includes() directly on it throws "N.includes is not a function".
Convert to string via JSON.stringify first.

Fixes save button crash on rules/new page.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 17:32:21 +08:00
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 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
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
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 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 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 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 0a436311c8 新增上传队列显示 2026-01-29 16:54:45 +08:00