feat: add HTTPS subdomains, shared cookie, templates and wiki docs
CI / check (push) Waiting to run

Signed-off-by: 南通一次元科技有限公司 <guwangtu@icimeta.com>
This commit is contained in:
guwangtu committed 2026-12-06 13:29:25 +00:00
1 parent b91954df4a
commit 4b5b119c18
23 files changed
+510 -37

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
---
name: 缺陷报告
about: 报告系统运行中的缺陷或异常
title: "[Bug] "
labels: bug
assignees: ''
---
### 问题描述
请简要说明问题。
### 复现步骤
1.
2.
3.
### 期望结果
### 实际结果
### 环境
- 版本:
- 部署方式:Docker / 源码
- 浏览器:
- 操作系统:
### 补充信息
日志、截图(请先脱敏,不要包含患者信息、合同原文或医院内部数据)。
+21
View File
@@ -0,0 +1,21 @@
---
name: 功能建议
about: 提出新功能或改进建议
title: "[Feature] "
labels: enhancement
assignees: ''
---
### 使用场景
请说明哪个科室、什么业务场景需要这个功能。
### 期望功能
请描述期望的操作和结果。
### 现状与痛点
### 是否愿意参与实现
- [ ] 我可以提交代码
- [ ] 我可以提供测试环境
- [ ] 我可以参与需求评审
+23
View File
@@ -0,0 +1,23 @@
## 变更说明
请说明这个 PR 做了什么,以及为什么需要。
## 关联 Issue
Closes #
## 测试情况
- [ ] 已运行 `python deploy/自检.py`
- [ ] 已运行 `python deploy/冒烟测试.py`
- [ ] 涉及前端页面已手工验证
## 数据与许可证
- [ ] 不包含数据库、上传文件、合同、报告、患者数据或密钥
- [ ] 新增依赖已确认许可证兼容
- [ ] 提交已使用 `git commit -s` 签署 DCO
## 截图(可选)
请先脱敏。
+1
View File
@@ -2,6 +2,7 @@ name: CI
on: on:
push: push:
pull_request: pull_request:
workflow_dispatch:
jobs: jobs:
check: check:
runs-on: ubuntu-latest runs-on: ubuntu-latest
+43
View File
@@ -0,0 +1,43 @@
# 医院智能审计管理平台 v1.0.0 发布说明(草案)
发布日期:2026-12-05
## 代码仓库
- 官方仓库:https://git.icimeta.com/upstream/audit-platform
- 标签:v1.0.0
## 发布内容
- 干净源码包:`医院智能审计管理平台-v1.0.0-src.zip`
- 合成演示数据:`医院智能审计管理平台-v1.0.0-demo-data.zip`
- 许可证:Apache License 2.0
- 依赖调整:PyMuPDF 已替换为 PyPDF2 + pypdfium2 + Pillow
## 功能
- 统一门户、统一登录、全局搜索、待办中心、服务状态
- 审计项目、资料、分析、报告
- 智能解析:文档解析、OCR 批量任务、合同要素抽取、单据信息提取
- 规则引擎:高级规则、模拟运行、发布审批、任务调度
- 审计作业:底稿、取证、报告
- 整改闭环:派发、反馈、审核、初验六必问、专项评估、批量导入导出、整改地图与报表
- 风险管理、合同审核、知识库
- 多用户与角色权限、真实操作人留痕
## 验证
- 本地/线上自检 0 错误
- 冒烟测试全部通过
- PDF 文本提取、扫描件 OCR、页面预览、合同解析回归通过
- 4 个容器 healthy
## 已知说明
- 医院内网离线环境请使用离线升级包流程(见 `docs/离线发布与升级指南.md`)
- 演示数据为虚构数据,导入前请备份
- Gitea 托管与官方仓库初始化待管理员邮箱/访问方式确定后执行
## SHA256
待正式发布时写入 `dist/SHA256SUMS.txt`。
+22
View File
@@ -0,0 +1,22 @@
# 医院智能审计管理平台 v1.0.1 发布说明
发布日期:2026-12-06
## 本次更新
- 增加 HTTPS 域名与统一入口:
- sj.icimeta.com(统一入口)
- audit.sj.icimeta.com(审计项目管理)
- risk.sj.icimeta.com(风险管理)
- contract.sj.icimeta.com(合同审核)
- 统一入口模块链接改为 HTTPS 子域名,不再暴露端口
- 登录 Cookie 支持 `.sj.icimeta.com` 跨子域共享
- 未登录访问子域名自动跳转统一登录页
- 增加 Issue / PR 模板、Wiki 首页和 CI 工作流
- 修复部署 compose 环境变量缩进问题
## 说明
- 本次版本以部署与协作配置更新为主,业务功能与 v1.0.0 一致
- 证书由 Let's Encrypt 签发,acme.sh 自动续期
- 医院内网离线升级仍按离线升级包流程执行
+22 -9
View File
@@ -1,11 +1,21 @@
031e1682474075a02f018407d659d1dc7b0065027e4c62553d0684741dde48f5 .gitea/ISSUE_TEMPLATE/bug.md
53320bab626f464974a848d9327a311439eb5e92454e16bd32107b9da21c54b1 .gitea/ISSUE_TEMPLATE/feature.md
a70a218dc24a576442ec810c75cda995dcead39e56607a13efa03e6a1f8fa06c .gitea/PULL_REQUEST_TEMPLATE.md
1fdb3975d9a204fc57bf3ac220a014f6dc404777114686ad1afb132b388e882d .gitea/workflows/ci.yml
af93a653cb58d2686550db1ab18dba96cae86b297a1c32b21f9ea808516df3b8 .gitignore af93a653cb58d2686550db1ab18dba96cae86b297a1c32b21f9ea808516df3b8 .gitignore
f0fbe9bfd5c7a93c0ae6618fa45a87676068425a4719269db7f6d2a813ada2f1 CHANGELOG.md f0fbe9bfd5c7a93c0ae6618fa45a87676068425a4719269db7f6d2a813ada2f1 CHANGELOG.md
439d955a86637a6b026b06a6a929364bd052df6ac927c72479e6ad4a2e7efd4b CODE_OF_CONDUCT.md 439d955a86637a6b026b06a6a929364bd052df6ac927c72479e6ad4a2e7efd4b CODE_OF_CONDUCT.md
694a4966bfdc61b3d1c54266f36555b35db4164902573fefe4055bec47232b93 CONTRIBUTING.md 694a4966bfdc61b3d1c54266f36555b35db4164902573fefe4055bec47232b93 CONTRIBUTING.md
8382ca6e3b7d98e375cbc6e1af802d3d03ba960afdcd685a10357db28f1673a1 deploy/.dockerignore 8382ca6e3b7d98e375cbc6e1af802d3d03ba960afdcd685a10357db28f1673a1 deploy/.dockerignore
d57294e50d0dea951378299c4cf9c543606f3b0e8afb6e1df0f3da23158882a9 deploy/.env.example d57294e50d0dea951378299c4cf9c543606f3b0e8afb6e1df0f3da23158882a9 deploy/.env.example
02928bb6ffbd50deff58035e78649f1a63c57b25b28be599827ad7696a709e3a deploy/docker-compose.yml 5551867b3b24fdd536183d833062bc9063183c27f4ebf1b19e8c919cce8091bf deploy/docker-compose.yml
60dad02408ef2e9398634a8e813686502758dd6d969036187d84a1ab2b982013 deploy/Dockerfile 60dad02408ef2e9398634a8e813686502758dd6d969036187d84a1ab2b982013 deploy/Dockerfile
03c5d1fa536dfb760faba1cd07f71599a2e58794a8a233ecb3a2584801d7a94d deploy/nginx/audit.sj.icimeta.com.conf
3cacae2042d05aad6f4af7604d52ec442b16c023f53ecd76a82aacb8059dcc11 deploy/nginx/contract.sj.icimeta.com.conf
a39311e1545994f157578f14bb6a133fc7effbe9d91ce069736b9946b0de26ca deploy/nginx/git.icimeta.com.conf
8f6a78320d20449b0317594068ae7f9cf8c39b77346cb95754ba4b16f01c100f deploy/nginx/README.md
772acac4b770113b6a18d9a360689deb1b70426ec050fc3d7d0d35f1c4bb00e7 deploy/nginx/risk.sj.icimeta.com.conf
310cb529c2b169d1f9b973087955f3fcfd12d4c65fe54143a46edaa426791118 deploy/nginx/sj.icimeta.com.conf
7d0666926db89157779d24794e01b1f7f4439347e1ed01fbf48b30cc9291afa5 deploy/requirements.txt 7d0666926db89157779d24794e01b1f7f4439347e1ed01fbf48b30cc9291afa5 deploy/requirements.txt
56852d0917810543f55d4fb09200487eb573adc9fd8a765ef30b8eb1c872dd3b deploy/冒烟测试.py 56852d0917810543f55d4fb09200487eb573adc9fd8a765ef30b8eb1c872dd3b deploy/冒烟测试.py
87a35eb3a91c18bd0c47178903401785d604f782684a1c26433ea6ceb5d74f9c deploy/同步公共模块.py 87a35eb3a91c18bd0c47178903401785d604f782684a1c26433ea6ceb5d74f9c deploy/同步公共模块.py
@@ -13,6 +23,7 @@ d57294e50d0dea951378299c4cf9c543606f3b0e8afb6e1df0f3da23158882a9 deploy/.env.ex
1edf80d0ebe323061ea89ba8f35abc45dcd2908a9d0de73fab5eeb5fd44ae0d9 deploy/生成演示数据.py 1edf80d0ebe323061ea89ba8f35abc45dcd2908a9d0de73fab5eeb5fd44ae0d9 deploy/生成演示数据.py
8f0c6daa430497af31d1c4a347641df931c34b55717034aa797a839402024710 deploy/自检.py 8f0c6daa430497af31d1c4a347641df931c34b55717034aa797a839402024710 deploy/自检.py
a13b39d104277a41b3940d19328138d07f7906fc211b1ae86012199bf3d184cd docs/Git仓库初始化指南.md a13b39d104277a41b3940d19328138d07f7906fc211b1ae86012199bf3d184cd docs/Git仓库初始化指南.md
a7580f544a6517fae6e34bcd0cde916d1d4b5e56e1964ce524465aa47af705dd docs/Wiki首页.md
e9618150cb9f86754d7724bbd8d6fcac330e7a9561f35592223f71b66e27d4df docs/合成演示数据说明.md e9618150cb9f86754d7724bbd8d6fcac330e7a9561f35592223f71b66e27d4df docs/合成演示数据说明.md
924a0dbe2a683943f5ded7a31e539891ee992d486c6ef94e315e169d67a0a74c docs/平台建设与协作方案.md 924a0dbe2a683943f5ded7a31e539891ee992d486c6ef94e315e169d67a0a74c docs/平台建设与协作方案.md
efb5d4cc5a2e3e6e187c14d9845dbc9a629847c04f7f026d783aa153a1e70f55 docs/开源合规清单.md efb5d4cc5a2e3e6e187c14d9845dbc9a629847c04f7f026d783aa153a1e70f55 docs/开源合规清单.md
@@ -20,12 +31,14 @@ efb5d4cc5a2e3e6e187c14d9845dbc9a629847c04f7f026d783aa153a1e70f55 docs/开源合
cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE
bb9f1e4ad9d7b88f4cd8b83e2ec149744631a94334948d9106c075f3313e4eca NOTICE bb9f1e4ad9d7b88f4cd8b83e2ec149744631a94334948d9106c075f3313e4eca NOTICE
377dc475b6709537963d86274f9e979d9ca778d61878b48cbe8d52dbd814eec3 README.md 377dc475b6709537963d86274f9e979d9ca778d61878b48cbe8d52dbd814eec3 README.md
f48b81799de301bb0e9fba7f923eaf181234b922a644413b42f7cc9886d84202 RELEASE_NOTES_v1.0.0.md
3c5eb749f0f837b2171870ab7a91c8b300dd1e90159783956084dd5ea554be69 RELEASE_NOTES_v1.0.1.md
2fa1eb1ea37c62ee3c6e2b7e113654e6ba77a23b742bd7d64bae081349631e5a SECURITY.md 2fa1eb1ea37c62ee3c6e2b7e113654e6ba77a23b742bd7d64bae081349631e5a SECURITY.md
e3f99dd6f109e422f5e8606167e1889c586e9f5505bded6b35371699e34fef54 shared/auth_guard.py 1e6785f64bf724a462ac3e0aff87b95dced881a072cdccd8d209c3ece956292a shared/auth_guard.py
ab718191b5ba0c78328c49926b3d91ee5f7cb9c1dcfe47ed91634a992bf4cfed shared/embed_theme.css ab718191b5ba0c78328c49926b3d91ee5f7cb9c1dcfe47ed91634a992bf4cfed shared/embed_theme.css
091eeaf53989638005f86295bd9b85f361884c46352e6dac68c76269cd005cf5 shared/pdf_tools.py 091eeaf53989638005f86295bd9b85f361884c46352e6dac68c76269cd005cf5 shared/pdf_tools.py
d86cb3ec38545af95b415c1d74b0d1a6d4d970307c0aeac00c1103f38ce80daf TRADEMARK.md d86cb3ec38545af95b415c1d74b0d1a6d4d970307c0aeac00c1103f38ce80daf TRADEMARK.md
e3f99dd6f109e422f5e8606167e1889c586e9f5505bded6b35371699e34fef54 合同审核管理平台/auth_guard.py 1e6785f64bf724a462ac3e0aff87b95dced881a072cdccd8d209c3ece956292a 合同审核管理平台/auth_guard.py
e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 合同审核管理平台/chart.umd.min.js e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 合同审核管理平台/chart.umd.min.js
03f6827c86e1dffff1b2d1e190afe1b56462751f974fc8bdf8efca2fbc8459fc 合同审核管理平台/contract_service.py 03f6827c86e1dffff1b2d1e190afe1b56462751f974fc8bdf8efca2fbc8459fc 合同审核管理平台/contract_service.py
bd8293d3a70cfca681c36f881ce39735b0da202902bedde1256da75b25c3a576 合同审核管理平台/index.html bd8293d3a70cfca681c36f881ce39735b0da202902bedde1256da75b25c3a576 合同审核管理平台/index.html
@@ -33,7 +46,7 @@ bd8293d3a70cfca681c36f881ce39735b0da202902bedde1256da75b25c3a576 合同审核
d79309b693265e78606bfdb57388f1dd19ca6e3092d16f8216a5133ffad53752 合同审核管理平台/portal_server.py d79309b693265e78606bfdb57388f1dd19ca6e3092d16f8216a5133ffad53752 合同审核管理平台/portal_server.py
2b98dde283539393d37e49f8c19fcfe15dd1e732c77eaadb5bb631853f121dcf 合同审核管理平台/requirements.txt 2b98dde283539393d37e49f8c19fcfe15dd1e732c77eaadb5bb631853f121dcf 合同审核管理平台/requirements.txt
a609267279b86556a41c6f9822171f6be028188e55574ab205538ea25f15cb0c 合同审核管理平台/启动合同审核.bat a609267279b86556a41c6f9822171f6be028188e55574ab205538ea25f15cb0c 合同审核管理平台/启动合同审核.bat
e3f99dd6f109e422f5e8606167e1889c586e9f5505bded6b35371699e34fef54 审计项目管理平台/auth_guard.py 1e6785f64bf724a462ac3e0aff87b95dced881a072cdccd8d209c3ece956292a 审计项目管理平台/auth_guard.py
1139ace4df8f2c08a612e5a81b3e3a5510072460632c7fa02ed50734c0ac0315 审计项目管理平台/check_att.py 1139ace4df8f2c08a612e5a81b3e3a5510072460632c7fa02ed50734c0ac0315 审计项目管理平台/check_att.py
4433b88cd793045202094cbad55ccc61095afae71c46fc4e9a1152859d6a109b 审计项目管理平台/config.py 4433b88cd793045202094cbad55ccc61095afae71c46fc4e9a1152859d6a109b 审计项目管理平台/config.py
6fafb770c558ef74e6f9c810956df0ec2726535fbac240a15ca4f9ed7c6350a5 审计项目管理平台/main.py 6fafb770c558ef74e6f9c810956df0ec2726535fbac240a15ca4f9ed7c6350a5 审计项目管理平台/main.py
@@ -51,14 +64,14 @@ b9c78f5f4e1b0dc6e6d736bcddaf0e455172bf7a8cc63957934042949721026d 审计项目
a187ce03135b3469a03f37cbb9c0473db66da383e857b282895fb6a7039cc3a3 审计项目管理平台/sync_wiki_content.py a187ce03135b3469a03f37cbb9c0473db66da383e857b282895fb6a7039cc3a3 审计项目管理平台/sync_wiki_content.py
aaed320fee68b79441c9b405bdbf2f323e4f2bfda9f2d7ce6ffe6665f1496bfd 审计项目管理平台/templates/index.html aaed320fee68b79441c9b405bdbf2f323e4f2bfda9f2d7ce6ffe6665f1496bfd 审计项目管理平台/templates/index.html
0378d4b184be2de1df4d0db8326f92a3e74864bcc5ac6e6ca41a93d7eb06d1ed 审计项目管理平台/启动审计系统.bat 0378d4b184be2de1df4d0db8326f92a3e74864bcc5ac6e6ca41a93d7eb06d1ed 审计项目管理平台/启动审计系统.bat
e3f99dd6f109e422f5e8606167e1889c586e9f5505bded6b35371699e34fef54 综合管理平台/auth_guard.py 1e6785f64bf724a462ac3e0aff87b95dced881a072cdccd8d209c3ece956292a 综合管理平台/auth_guard.py
e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 综合管理平台/chart.umd.min.js e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 综合管理平台/chart.umd.min.js
ac585dfbc05ada0a6f6cedbea33f39b0979c09df5d3ffc420cd740de2938dafa 综合管理平台/digital_audit.css ac585dfbc05ada0a6f6cedbea33f39b0979c09df5d3ffc420cd740de2938dafa 综合管理平台/digital_audit.css
b3f4ba9ba3717f4422ad5deb3572e0f16d598974bf657c0e64a25d986c9e02f1 综合管理平台/digital_audit.html b3f4ba9ba3717f4422ad5deb3572e0f16d598974bf657c0e64a25d986c9e02f1 综合管理平台/digital_audit.html
ab922341fb6dcc03be9d3dec23b703bbddaeef1a955f04987725b3c46175e59f 综合管理平台/digital_audit_service.py ab922341fb6dcc03be9d3dec23b703bbddaeef1a955f04987725b3c46175e59f 综合管理平台/digital_audit_service.py
d0eeb3f1ddc4e81914e0c1b2bd9409c2669a1cd59832ad6f6983c61bf9c4acfd 综合管理平台/extract_service.py d0eeb3f1ddc4e81914e0c1b2bd9409c2669a1cd59832ad6f6983c61bf9c4acfd 综合管理平台/extract_service.py
5e8b249a6e4674eb6486a7077902318b84ec1ac93f7beda0763f7c603d41b8f7 综合管理平台/js/boot.js 5e8b249a6e4674eb6486a7077902318b84ec1ac93f7beda0763f7c603d41b8f7 综合管理平台/js/boot.js
a2cb6485684db60c688b4713f0caf3fe51aab785f60a187d8f6335083ad96a44 综合管理平台/js/core.js 380ea9d65d455b3f0626e4dbb18b8e10a5f6c07c3c6c19230ea08351f498c0dc 综合管理平台/js/core.js
fd811b6ca424333362ce32d1940b665b19b051791bf9b3c81304a6024428c85f 综合管理平台/js/dashboard.js fd811b6ca424333362ce32d1940b665b19b051791bf9b3c81304a6024428c85f 综合管理平台/js/dashboard.js
059c2e1a6bda29deb2b568455ff589f5704bba2c30c2d5dedc80fc986187658f 综合管理平台/js/data.js 059c2e1a6bda29deb2b568455ff589f5704bba2c30c2d5dedc80fc986187658f 综合管理平台/js/data.js
a690fa55c807683d7b9175e40521157669bb60eac341278ebcda20e366795f39 综合管理平台/js/extract.js a690fa55c807683d7b9175e40521157669bb60eac341278ebcda20e366795f39 综合管理平台/js/extract.js
@@ -76,15 +89,15 @@ efa6a1fa771f0ecd57b99f23f6013d77170730b955b5c61d31c2e1835ebdd73d 综合管理
e4ab4db2d855d2498da5a001a6c2c014372d4663aa28b41fe73e15f4b8e00760 综合管理平台/policy_news_cache.json e4ab4db2d855d2498da5a001a6c2c014372d4663aa28b41fe73e15f4b8e00760 综合管理平台/policy_news_cache.json
cc538ae17c46c7c9a0668d883fb27f93cfa6e8ff465965dc8028af047553bec8 综合管理平台/portal.html cc538ae17c46c7c9a0668d883fb27f93cfa6e8ff465965dc8028af047553bec8 综合管理平台/portal.html
dfe9db9e53a5a3bcbcc242394e7b170e864d430a541afb9aa24f17f93af511a5 综合管理平台/portal_icon.ico dfe9db9e53a5a3bcbcc242394e7b170e864d430a541afb9aa24f17f93af511a5 综合管理平台/portal_icon.ico
7ed6ac752e6ffa848de8c0e76e4343e6fdba8a50724d3490be825d3862d60837 综合管理平台/portal_server.py 88f5407f423ae98f0af32061eda61632a4235097248e2fbf461e29bc43ea6f75 综合管理平台/portal_server.py
ff251619d7cbf4b29d51cb5537e4c831bfc60c59772aebca48c2f852ead22493 综合管理平台/rectification_service.py ff251619d7cbf4b29d51cb5537e4c831bfc60c59772aebca48c2f852ead22493 综合管理平台/rectification_service.py
2b98dde283539393d37e49f8c19fcfe15dd1e732c77eaadb5bb631853f121dcf 综合管理平台/requirements.txt 2b98dde283539393d37e49f8c19fcfe15dd1e732c77eaadb5bb631853f121dcf 综合管理平台/requirements.txt
1935711070bc261224f8f6c05da9f1a28ad996f0b1bccd70351d1cba9bd84358 综合管理平台/settings.html 1935711070bc261224f8f6c05da9f1a28ad996f0b1bccd70351d1cba9bd84358 综合管理平台/settings.html
04f67298a9489c438d48213ed3a7f304d9190a5b490221f57de2b19a014de0bb 综合管理平台/shell.html 6adb9f803f16bcc3daa346d7a58c6563a0114e48a00deec43b61b676ddffe9b1 综合管理平台/shell.html
34134068bd9e0a006ccd3375c9edd975edeba22a6c7ae5e163db07b8903606ba 综合管理平台/workflow_service.py 34134068bd9e0a006ccd3375c9edd975edeba22a6c7ae5e163db07b8903606ba 综合管理平台/workflow_service.py
085246aab8005d1e99ea850397a5ab99c9491af6cb6523348d9fa7217d94c330 综合管理平台/write_bat.py 085246aab8005d1e99ea850397a5ab99c9491af6cb6523348d9fa7217d94c330 综合管理平台/write_bat.py
8543cb29ee32e2f147485def9e50b5615587d7feff661eda1f07169bea61341c 综合管理平台/启动平台.bat 8543cb29ee32e2f147485def9e50b5615587d7feff661eda1f07169bea61341c 综合管理平台/启动平台.bat
e3f99dd6f109e422f5e8606167e1889c586e9f5505bded6b35371699e34fef54 风险管理项目/auth_guard.py 1e6785f64bf724a462ac3e0aff87b95dced881a072cdccd8d209c3ece956292a 风险管理项目/auth_guard.py
e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 风险管理项目/chart.umd.min.js e9b0f875106021fb3d58120ad8ebdd3e7d32135a4452fd8918c72ac6475f2bd3 风险管理项目/chart.umd.min.js
547f6882d45337933b6cb3cb01325f02afea5f68e40298ca6c42fd5d8ec6e800 风险管理项目/config.py 547f6882d45337933b6cb3cb01325f02afea5f68e40298ca6c42fd5d8ec6e800 风险管理项目/config.py
b4fdda2a289ac5c8309fd314ead70fddbc7c366ac45dce2a4840b17c5b311168 风险管理项目/database.py b4fdda2a289ac5c8309fd314ead70fddbc7c366ac45dce2a4840b17c5b311168 风险管理项目/database.py
+4
View File
@@ -18,6 +18,8 @@ x-common: &common
AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD} AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD}
# Cookie 会话签名密钥(四个服务必须一致) # Cookie 会话签名密钥(四个服务必须一致)
SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET} SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET}
PORTAL_LOGIN_URL: ${PORTAL_LOGIN_URL:-}
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN:-}
services: services:
# ===== 审计项目管理平台 :8000 ===== # ===== 审计项目管理平台 :8000 =====
@@ -81,6 +83,8 @@ services:
AUTH_USER: ${AUTH_USER:?请在 .env 中设置 AUTH_USER} AUTH_USER: ${AUTH_USER:?请在 .env 中设置 AUTH_USER}
AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD} AUTH_PASSWORD: ${AUTH_PASSWORD:?请在 .env 中设置 AUTH_PASSWORD}
SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET} SESSION_SECRET: ${SESSION_SECRET:?请在 .env 中设置 SESSION_SECRET}
PORTAL_LOGIN_URL: ${PORTAL_LOGIN_URL:-}
PUBLIC_DOMAIN: ${PUBLIC_DOMAIN:-}
# 容器内用服务名互相访问,门户的健康检查依赖这三个地址 # 容器内用服务名互相访问,门户的健康检查依赖这三个地址
AUDIT_URL: http://audit:8000 AUDIT_URL: http://audit:8000
RISK_URL: http://risk:8001 RISK_URL: http://risk:8001
+58
View File
@@ -0,0 +1,58 @@
# Nginx 反向代理与 HTTPS 配置
## 域名与服务映射
| 域名 | 后端 |
|------|------|
| git.icimeta.com | 127.0.0.1:3000(Gitea) |
| sj.icimeta.com | 127.0.0.1:8080(审计系统统一入口) |
| audit.sj.icimeta.com | 127.0.0.1:8000(审计项目管理) |
| risk.sj.icimeta.com | 127.0.0.1:8001(风险管理) |
| contract.sj.icimeta.com | 127.0.0.1:8090(合同审核) |
- HTTP 80 自动 301 到 HTTPS
- 证书:`/www/server/panel/vhost/cert/icimeta-sub/`(Let's Encrypt,acme.sh 自动续期)
- 证书 SAN:git.icimeta.com、sj.icimeta.com、audit/risk/contract.sj.icimeta.com
## 服务器配置路径
```
/www/server/panel/vhost/nginx/git.icimeta.com.conf
/www/server/panel/vhost/nginx/sj.icimeta.com.conf
/www/server/panel/vhost/nginx/audit.sj.icimeta.com.conf
/www/server/panel/vhost/nginx/risk.sj.icimeta.com.conf
/www/server/panel/vhost/nginx/contract.sj.icimeta.com.conf
```
原有 `yicimeta.com.conf`(icimeta.com / www.icimeta.com)未修改。本次修改前已备份到:
`/opt/backup/nginx/vhost_nginx_20261206_204408.tar.gz`
## 证书申请/续期
使用 acme.sh:
```bash
/root/.acme.sh/acme.sh --issue --webroot /www/wwwroot/icimeta.com \
-d git.icimeta.com -d sj.icimeta.com \
-d audit.sj.icimeta.com -d risk.sj.icimeta.com -d contract.sj.icimeta.com \
--keylength ec-256
```
安装到 Nginx 并 reload:
```bash
/root/.acme.sh/acme.sh --install-cert -d git.icimeta.com --ecc \
--key-file /www/server/panel/vhost/cert/icimeta-sub/privkey.pem \
--fullchain-file /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem \
--reloadcmd "nginx -s reload"
```
## 验证
```bash
curl -I https://git.icimeta.com/
curl -I https://sj.icimeta.com/
curl -I https://audit.sj.icimeta.com/
curl -I https://risk.sj.icimeta.com/
curl -I https://contract.sj.icimeta.com/
```
+36
View File
@@ -0,0 +1,36 @@
server {
listen 80;
server_name audit.sj.icimeta.com;
location ^~ /.well-known/acme-challenge/ {
root /www/wwwroot/icimeta.com;
default_type text/plain;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name audit.sj.icimeta.com;
ssl_certificate /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/icimeta-sub/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES256:!MD5;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 200m;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 900s;
}
}
+36
View File
@@ -0,0 +1,36 @@
server {
listen 80;
server_name contract.sj.icimeta.com;
location ^~ /.well-known/acme-challenge/ {
root /www/wwwroot/icimeta.com;
default_type text/plain;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name contract.sj.icimeta.com;
ssl_certificate /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/icimeta-sub/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES256:!MD5;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 200m;
location / {
proxy_pass http://127.0.0.1:8090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 900s;
}
}
+39
View File
@@ -0,0 +1,39 @@
server {
listen 80;
server_name git.icimeta.com;
location ^~ /.well-known/acme-challenge/ {
root /www/wwwroot/icimeta.com;
default_type text/plain;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name git.icimeta.com;
ssl_certificate /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/icimeta-sub/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES256:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 200m;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 600s;
}
}
+36
View File
@@ -0,0 +1,36 @@
server {
listen 80;
server_name risk.sj.icimeta.com;
location ^~ /.well-known/acme-challenge/ {
root /www/wwwroot/icimeta.com;
default_type text/plain;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name risk.sj.icimeta.com;
ssl_certificate /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/icimeta-sub/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES256:!MD5;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 200m;
location / {
proxy_pass http://127.0.0.1:8001;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 900s;
}
}
+37
View File
@@ -0,0 +1,37 @@
server {
listen 80;
server_name sj.icimeta.com;
location ^~ /.well-known/acme-challenge/ {
root /www/wwwroot/icimeta.com;
default_type text/plain;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl http2;
server_name sj.icimeta.com;
ssl_certificate /www/server/panel/vhost/cert/icimeta-sub/fullchain.pem;
ssl_certificate_key /www/server/panel/vhost/cert/icimeta-sub/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers EECDH+CHACHA20:EECDH+AESGCM:EECDH+AES256:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
add_header Strict-Transport-Security "max-age=31536000" always;
client_max_body_size 200m;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_read_timeout 600s;
}
}
+28
View File
@@ -0,0 +1,28 @@
# 医院智能审计管理平台 Wiki
## 快速入口
- [源码仓库](https://git.icimeta.com/upstream/audit-platform)
- [版本发布](https://git.icimeta.com/upstream/audit-platform/releases)
- [问题反馈](https://git.icimeta.com/upstream/audit-platform/issues)
- [合并请求](https://git.icimeta.com/upstream/audit-platform/pulls)
## 文档
- 部署与离线升级:`docs/离线发布与升级指南.md`
- 开源合规:`docs/开源合规清单.md`
- 演示数据:`docs/合成演示数据说明.md`
- 平台建设方案:`docs/平台建设与协作方案.md`
## 医院协作流程
1. 医院 fork 官方仓库或使用官方源码包
2. 本地修改后提交 Issue / PR,或导出离线 patch
3. 维护方评审并合并
4. 打 tag 发布新版本
5. 医院升级官方版本或继续维护自己的 fork
## 安全要求
- 不要提交患者数据、合同原文、数据库、上传文件或密钥
- 安全漏洞请私下报告,不要公开提 Issue
+8 -3
View File
@@ -33,6 +33,7 @@ FAIL_WINDOW_SECONDS = 600
# 门户登录地址(默认按访问的 Host 推导,指向 8080 端口) # 门户登录地址(默认按访问的 Host 推导,指向 8080 端口)
PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "") PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "")
PUBLIC_DOMAIN = os.getenv("PUBLIC_DOMAIN", "").strip().lower().lstrip(".")
ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET) ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET)
@@ -441,9 +442,13 @@ def safe_next(next_url: str, request) -> str:
return next_url return next_url
try: try:
parsed = urlparse(next_url) parsed = urlparse(next_url)
host = (request.headers.get("host") or "").split(":")[0] host = (request.headers.get("host") or "").split(":")[0].lower()
if parsed.scheme == "http" and parsed.hostname == host: target = (parsed.hostname or "").lower()
return next_url if parsed.scheme in ("http", "https"):
if target == host:
return next_url
if PUBLIC_DOMAIN and (target == PUBLIC_DOMAIN or target.endswith("." + PUBLIC_DOMAIN)):
return next_url
except Exception: except Exception:
pass pass
return "/" return "/"
+8 -3
View File
@@ -33,6 +33,7 @@ FAIL_WINDOW_SECONDS = 600
# 门户登录地址(默认按访问的 Host 推导,指向 8080 端口) # 门户登录地址(默认按访问的 Host 推导,指向 8080 端口)
PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "") PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "")
PUBLIC_DOMAIN = os.getenv("PUBLIC_DOMAIN", "").strip().lower().lstrip(".")
ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET) ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET)
@@ -441,9 +442,13 @@ def safe_next(next_url: str, request) -> str:
return next_url return next_url
try: try:
parsed = urlparse(next_url) parsed = urlparse(next_url)
host = (request.headers.get("host") or "").split(":")[0] host = (request.headers.get("host") or "").split(":")[0].lower()
if parsed.scheme == "http" and parsed.hostname == host: target = (parsed.hostname or "").lower()
return next_url if parsed.scheme in ("http", "https"):
if target == host:
return next_url
if PUBLIC_DOMAIN and (target == PUBLIC_DOMAIN or target.endswith("." + PUBLIC_DOMAIN)):
return next_url
except Exception: except Exception:
pass pass
return "/" return "/"
+8 -3
View File
@@ -33,6 +33,7 @@ FAIL_WINDOW_SECONDS = 600
# 门户登录地址(默认按访问的 Host 推导,指向 8080 端口) # 门户登录地址(默认按访问的 Host 推导,指向 8080 端口)
PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "") PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "")
PUBLIC_DOMAIN = os.getenv("PUBLIC_DOMAIN", "").strip().lower().lstrip(".")
ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET) ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET)
@@ -441,9 +442,13 @@ def safe_next(next_url: str, request) -> str:
return next_url return next_url
try: try:
parsed = urlparse(next_url) parsed = urlparse(next_url)
host = (request.headers.get("host") or "").split(":")[0] host = (request.headers.get("host") or "").split(":")[0].lower()
if parsed.scheme == "http" and parsed.hostname == host: target = (parsed.hostname or "").lower()
return next_url if parsed.scheme in ("http", "https"):
if target == host:
return next_url
if PUBLIC_DOMAIN and (target == PUBLIC_DOMAIN or target.endswith("." + PUBLIC_DOMAIN)):
return next_url
except Exception: except Exception:
pass pass
return "/" return "/"
+8 -3
View File
@@ -33,6 +33,7 @@ FAIL_WINDOW_SECONDS = 600
# 门户登录地址(默认按访问的 Host 推导,指向 8080 端口) # 门户登录地址(默认按访问的 Host 推导,指向 8080 端口)
PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "") PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "")
PUBLIC_DOMAIN = os.getenv("PUBLIC_DOMAIN", "").strip().lower().lstrip(".")
ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET) ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET)
@@ -441,9 +442,13 @@ def safe_next(next_url: str, request) -> str:
return next_url return next_url
try: try:
parsed = urlparse(next_url) parsed = urlparse(next_url)
host = (request.headers.get("host") or "").split(":")[0] host = (request.headers.get("host") or "").split(":")[0].lower()
if parsed.scheme == "http" and parsed.hostname == host: target = (parsed.hostname or "").lower()
return next_url if parsed.scheme in ("http", "https"):
if target == host:
return next_url
if PUBLIC_DOMAIN and (target == PUBLIC_DOMAIN or target.endswith("." + PUBLIC_DOMAIN)):
return next_url
except Exception: except Exception:
pass pass
return "/" return "/"
+2 -1
View File
@@ -107,7 +107,8 @@ async function switchTab(tab, el){
function openAuditSystem(){ function openAuditSystem(){
const url = `${location.protocol}//${location.hostname}:8000/`; const h = location.hostname;
const url = /(^|\.)sj\.icimeta\.com$/.test(h) ? 'https://audit.sj.icimeta.com/' : `${location.protocol}//${h}:8000/`;
try { try {
if (window.self !== window.top) { window.top.location.hash = '#/audit'; return; } if (window.self !== window.top) { window.top.location.hash = '#/audit'; return; }
} catch(e) {} } catch(e) {}
+22 -9
View File
@@ -134,6 +134,17 @@ async def login_page(request: Request, next: str = "/"):
) )
def _cookie_domain(request: Request):
host = (request.headers.get("host") or "").split(":")[0].lower()
if host == "sj.icimeta.com" or host.endswith(".sj.icimeta.com"):
return ".sj.icimeta.com"
return None
def _cookie_secure(request: Request) -> bool:
return (request.headers.get("x-forwarded-proto") or "").lower() == "https"
@app.post("/api/login") @app.post("/api/login")
async def login_submit( async def login_submit(
request: Request, request: Request,
@@ -154,20 +165,22 @@ async def login_submit(
auth.clear_fails(ip) auth.clear_fails(ip)
resp = RedirectResponse(auth.safe_next(next, request), status_code=303) resp = RedirectResponse(auth.safe_next(next, request), status_code=303)
resp.set_cookie( cookie_kwargs = dict(max_age=auth.SESSION_MAX_AGE, httponly=True, samesite="lax", path="/")
auth.SESSION_COOKIE, domain = _cookie_domain(request)
auth.session_token_for(claims), if domain:
max_age=auth.SESSION_MAX_AGE, cookie_kwargs["domain"] = domain
httponly=True, if _cookie_secure(request):
samesite="lax", cookie_kwargs["secure"] = True
path="/", resp.set_cookie(auth.SESSION_COOKIE, auth.session_token_for(claims), **cookie_kwargs)
)
return resp return resp
@app.get("/logout") @app.get("/logout")
async def logout(): async def logout(request: Request):
resp = RedirectResponse("/login", status_code=303) resp = RedirectResponse("/login", status_code=303)
domain = _cookie_domain(request)
if domain:
resp.delete_cookie(auth.SESSION_COOKIE, path="/", domain=domain)
resp.delete_cookie(auth.SESSION_COOKIE, path="/") resp.delete_cookie(auth.SESSION_COOKIE, path="/")
return resp return resp
+10 -3
View File
@@ -209,12 +209,19 @@ body{font-family:"Microsoft YaHei","PingFang SC",sans-serif;background:
</div> </div>
<script> <script>
function moduleUrl(prefix, port, embed){
const h = location.hostname;
if(/(^|\.)sj\.icimeta\.com$/.test(h)){
return `https://${prefix}.sj.icimeta.com/${embed ? '?embed=1' : ''}`;
}
return `${location.protocol}//${h}:${port}/${embed ? '?embed=1' : ''}`;
}
const MODULES = { const MODULES = {
home: {name:'工作台', icon:'◈', native:true}, home: {name:'工作台', icon:'◈', native:true},
digital: {name:'数字化审计', icon:'🧭', url:()=>'/digital-audit?embed=1', standalone:()=>'/digital-audit'}, digital: {name:'数字化审计', icon:'🧭', url:()=>'/digital-audit?embed=1', standalone:()=>'/digital-audit'},
audit: {name:'审计管理', icon:'📋', url:()=>`${location.protocol}//${location.hostname}:8000/?embed=1`, standalone:()=>`${location.protocol}//${location.hostname}:8000/`}, audit: {name:'审计管理', icon:'📋', url:()=>moduleUrl('audit',8000,true), standalone:()=>moduleUrl('audit',8000,false)},
risk: {name:'风险管理', icon:'⚠️', url:()=>`${location.protocol}//${location.hostname}:8001/?embed=1`, standalone:()=>`${location.protocol}//${location.hostname}:8001/`}, risk: {name:'风险管理', icon:'⚠️', url:()=>moduleUrl('risk',8001,true), standalone:()=>moduleUrl('risk',8001,false)},
contract: {name:'合同审核', icon:'📑', url:()=>`${location.protocol}//${location.hostname}:8090/?embed=1`, standalone:()=>`${location.protocol}//${location.hostname}:8090/`}, contract: {name:'合同审核', icon:'📑', url:()=>moduleUrl('contract',8090,true), standalone:()=>moduleUrl('contract',8090,false)},
knowledge:{name:'知识库', icon:'📚', url:()=>'/knowledge?embed=1', standalone:()=>'/knowledge'}, knowledge:{name:'知识库', icon:'📚', url:()=>'/knowledge?embed=1', standalone:()=>'/knowledge'},
settings: {name:'系统设置', icon:'⚙️', url:()=>'/settings?embed=1', standalone:()=>'/settings'} settings: {name:'系统设置', icon:'⚙️', url:()=>'/settings?embed=1', standalone:()=>'/settings'}
}; };
+8 -3
View File
@@ -33,6 +33,7 @@ FAIL_WINDOW_SECONDS = 600
# 门户登录地址(默认按访问的 Host 推导,指向 8080 端口) # 门户登录地址(默认按访问的 Host 推导,指向 8080 端口)
PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "") PORTAL_LOGIN_URL = os.getenv("PORTAL_LOGIN_URL", "")
PUBLIC_DOMAIN = os.getenv("PUBLIC_DOMAIN", "").strip().lower().lstrip(".")
ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET) ENABLED = bool(AUTH_USER and AUTH_PASSWORD and SESSION_SECRET)
@@ -441,9 +442,13 @@ def safe_next(next_url: str, request) -> str:
return next_url return next_url
try: try:
parsed = urlparse(next_url) parsed = urlparse(next_url)
host = (request.headers.get("host") or "").split(":")[0] host = (request.headers.get("host") or "").split(":")[0].lower()
if parsed.scheme == "http" and parsed.hostname == host: target = (parsed.hostname or "").lower()
return next_url if parsed.scheme in ("http", "https"):
if target == host:
return next_url
if PUBLIC_DOMAIN and (target == PUBLIC_DOMAIN or target.endswith("." + PUBLIC_DOMAIN)):
return next_url
except Exception: except Exception:
pass pass
return "/" return "/"