Переглянути джерело

删除无用文件,文档放到 doc

gengjunfang 3 тижнів тому
батько
коміт
e81a084e58

+ 1 - 1
.env.development

@@ -1,7 +1,7 @@
 # 开发环境配置
 # 项目标题
 #VITE_APP_TITLE=医学影像质控云平台
-VITE_APP_TITLE=十堰市影像云平台
+VITE_APP_TITLE=智能质控管理系统
 # 阅片器调阅地址
 VITE_VIEWER_URL=http://127.0.0.1:19603
 VITE_API_URL=http://localhost:8090

+ 6 - 5
.env.production

@@ -1,11 +1,12 @@
 # 生产环境配置
 # 项目标题
-VITE_APP_TITLE=十堰市影像云平台
+#VITE_APP_TITLE=十堰市影像云平台
+VITE_APP_TITLE=智能质控管理系统
 # 阅片器调阅地址
 #VITE_VIEWER_URL=http://192.168.1.10:9603
 #VITE_API_URL=http://192.168.1.10:9604
-#VITE_VIEWER_URL=http://36.140.148.147:9603
-#VITE_API_URL=http://36.140.148.147:9605
-VITE_VIEWER_URL=http://122.188.65.69:7213
-VITE_API_URL=http://122.188.65.69:7215
+VITE_VIEWER_URL=http://36.140.148.147:9603
+VITE_API_URL=http://36.140.148.147:9605
+#VITE_VIEWER_URL=http://122.188.65.69:7213
+#VITE_API_URL=http://122.188.65.69:7215
 

+ 0 - 0
前端懒加载改造指南.md → doc/前端懒加载改造指南.md


+ 0 - 0
添加截图说明.md → doc/添加截图说明.md


+ 0 - 0
质控任务自动化改造方案.md → doc/质控任务自动化改造方案.md


+ 0 - 176
format_manual.py

@@ -1,176 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-格式化系统操作手册
-"""
-
-from docx import Document
-from docx.shared import Pt, Inches, RGBColor
-from docx.enum.text import WD_ALIGN_PARAGRAPH
-from docx.oxml.ns import qn
-from docx.oxml import OxmlElement
-
-def add_page_break(doc):
-    """添加分页符"""
-    doc.add_page_break()
-
-def set_font(run, font_name='宋体', font_size=12, bold=False):
-    """设置字体"""
-    run.font.name = font_name
-    run.font.size = Pt(font_size)
-    run.font.bold = bold
-    # 设置中文字体
-    run._element.rPr.rFonts.set(qn('w:eastAsia'), font_name)
-
-def format_document(input_path, output_path):
-    """格式化文档"""
-
-    # 读取原文档
-    doc = Document(input_path)
-
-    # 创建新文档
-    new_doc = Document()
-
-    # 设置页边距
-    for section in new_doc.sections:
-        section.top_margin = Inches(1)
-        section.bottom_margin = Inches(1)
-        section.left_margin = Inches(1.25)
-        section.right_margin = Inches(1.25)
-
-    # ===== 第一页:标题页 =====
-    title_para = new_doc.add_paragraph()
-    title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    # 添加一些空行使标题居中
-    for _ in range(8):
-        new_doc.add_paragraph()
-
-    title_para = new_doc.add_paragraph()
-    title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    title_run = title_para.add_run('系统操作手册')
-    set_font(title_run, font_name='黑体', font_size=28, bold=True)
-
-    # 添加分页符
-    add_page_break(new_doc)
-
-    # ===== 第二页:目录 =====
-    toc_title = new_doc.add_paragraph()
-    toc_title.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    toc_run = toc_title.add_run('目  录')
-    set_font(toc_run, font_name='黑体', font_size=18, bold=True)
-    new_doc.add_paragraph()  # 空行
-
-    # 目录内容
-    toc_items = [
-        ('1、系统登录', 2),
-        ('1.1 系统登录', 3),
-        ('1.2 系统首页', 3),
-        ('2、数据管理', 2),
-        ('2.1 检查列表', 3),
-        ('2.1.1 影像上传', 4),
-        ('2.1.2 查看影像数据详情', 4),
-        ('2.2 部位列表', 3),
-        ('2.3 患者信息', 3),
-        ('3、质控管理', 2),
-        ('3.1 全量质控', 3),
-        ('3.2 质控任务', 3),
-        ('3.3 质控结果', 3),
-        ('3.4 部位结果', 3),
-        ('4、字典管理', 2),
-        ('4.1 质控标准', 3),
-        ('4.2 质控因子', 3),
-        ('4.3 检查项目', 3),
-        ('5、系统管理', 2),
-        ('5.1 用户管理', 3),
-        ('5.2 对接设置', 3),
-    ]
-
-    for item_text, level in toc_items:
-        toc_para = new_doc.add_paragraph()
-        indent = (level - 2) * 0.5  # 缩进
-        toc_para.paragraph_format.left_indent = Inches(indent)
-        toc_run = toc_para.add_run(item_text)
-        set_font(toc_run, font_name='宋体', font_size=12)
-
-    # 添加分页符
-    add_page_break(new_doc)
-
-    # ===== 第三页开始:正文内容 =====
-    # 收集原文档中的所有段落和图片
-    content_started = False
-
-    for para in doc.paragraphs:
-        text = para.text.strip()
-
-        # 跳过前面的空段落,直到找到第一个有内容的段落
-        if not content_started and not text:
-            continue
-
-        if text:
-            content_started = True
-
-        # 判断段落类型并应用相应格式
-        new_para = new_doc.add_paragraph()
-
-        # 一级标题 (如: 1、系统登录, 2、数据管理)
-        if text and (text.startswith('1、') or text.startswith('2、') or
-                     text.startswith('3、') or text.startswith('4、') or
-                     text.startswith('5、') or text == '系统登录'):
-            new_para.style = 'Heading 1'
-            run = new_para.add_run(text)
-            set_font(run, font_name='黑体', font_size=16, bold=True)
-            new_para.paragraph_format.space_before = Pt(12)
-            new_para.paragraph_format.space_after = Pt(6)
-
-        # 二级标题 (如: 1.1, 1.2, 2.1)
-        elif text and len(text) > 2 and text[0].isdigit() and '.' in text[:4] and text.split()[0].count('.') == 1:
-            new_para.style = 'Heading 2'
-            run = new_para.add_run(text)
-            set_font(run, font_name='黑体', font_size=14, bold=True)
-            new_para.paragraph_format.space_before = Pt(10)
-            new_para.paragraph_format.space_after = Pt(5)
-            new_para.paragraph_format.left_indent = Inches(0)
-
-        # 三级标题 (如: 2.1.1, 2.1.2)
-        elif text and len(text) > 4 and text[0].isdigit() and text.split()[0].count('.') == 2:
-            new_para.style = 'Heading 3'
-            run = new_para.add_run(text)
-            set_font(run, font_name='黑体', font_size=13, bold=True)
-            new_para.paragraph_format.space_before = Pt(8)
-            new_para.paragraph_format.space_after = Pt(4)
-            new_para.paragraph_format.left_indent = Inches(0)
-
-        # 普通段落
-        else:
-            run = new_para.add_run(text)
-            set_font(run, font_name='宋体', font_size=11)
-            new_para.paragraph_format.space_after = Pt(3)
-            new_para.paragraph_format.line_spacing = 1.15
-
-        # 复制图片
-        if para._element.xpath('.//w:drawing'):
-            # 如果段落包含图片,复制图片
-            for run in para.runs:
-                if 'graphicData' in run._element.xml:
-                    try:
-                        # 获取图片
-                        inline = run._element.xpath('.//w:drawing//wp:inline')
-                        if inline:
-                            # 复制图片到新文档
-                            new_para_img = new_doc.add_paragraph()
-                            new_para_img.alignment = WD_ALIGN_PARAGRAPH.CENTER
-                            # 注意:这里需要从原文档中提取图片数据
-                            # 由于复杂性,我们先保留图片位置的空段落
-                    except:
-                        pass
-
-    # 保存新文档
-    new_doc.save(output_path)
-    print(f"文档格式化完成!已保存到: {output_path}")
-
-
-if __name__ == '__main__':
-    input_file = '/Users/geng/Desktop/系统操作手册.docx'
-    output_file = '/Users/geng/Desktop/系统操作手册_格式化.docx'
-
-    format_document(input_file, output_file)

+ 0 - 229
format_manual_v2.py

@@ -1,229 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-格式化系统操作手册 - 改进版本,支持图片复制
-"""
-
-from docx import Document
-from docx.shared import Pt, Inches
-from docx.enum.text import WD_ALIGN_PARAGRAPH
-from docx.oxml.ns import qn
-import re
-from io import BytesIO
-
-def set_font(run, font_name='宋体', font_size=12, bold=False):
-    """设置字体"""
-    run.font.name = font_name
-    run.font.size = Pt(font_size)
-    run.font.bold = bold
-    run._element.rPr.rFonts.set(qn('w:eastAsia'), font_name)
-
-def is_heading_level_1(text):
-    """判断是否为一级标题"""
-    if not text:
-        return False
-    # 匹配: 1、系统登录, 2、数据管理 等
-    return bool(re.match(r'^\d+、', text)) or text == '系统登录'
-
-def is_heading_level_2(text):
-    """判断是否为二级标题"""
-    if not text or len(text) < 3:
-        return False
-    # 匹配: 1.1, 1.2, 2.1 等
-    match = re.match(r'^\d+\.\d+\s', text)
-    return bool(match)
-
-def is_heading_level_3(text):
-    """判断是否为三级标题"""
-    if not text or len(text) < 5:
-        return False
-    # 匹配: 2.1.1, 2.1.2 等
-    match = re.match(r'^\d+\.\d+\.\d+\s', text)
-    return bool(match)
-
-def copy_paragraph_with_images(source_para, target_doc):
-    """复制段落,包括文本和图片"""
-    text = source_para.text.strip()
-
-    # 创建新段落
-    new_para = target_doc.add_paragraph()
-
-    # 根据文本类型设置格式
-    if is_heading_level_1(text):
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=16, bold=True)
-        new_para.paragraph_format.space_before = Pt(12)
-        new_para.paragraph_format.space_after = Pt(6)
-
-    elif is_heading_level_2(text):
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=14, bold=True)
-        new_para.paragraph_format.space_before = Pt(10)
-        new_para.paragraph_format.space_after = Pt(5)
-
-    elif is_heading_level_3(text):
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=13, bold=True)
-        new_para.paragraph_format.space_before = Pt(8)
-        new_para.paragraph_format.space_after = Pt(4)
-
-    else:
-        # 普通段落
-        if text:
-            run = new_para.add_run(text)
-            set_font(run, font_name='宋体', font_size=11)
-            new_para.paragraph_format.space_after = Pt(3)
-            new_para.paragraph_format.line_spacing = 1.15
-
-    # 检查并复制图片
-    if source_para._element.xpath('.//w:drawing'):
-        img_para = target_doc.add_paragraph()
-        img_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-        for run in source_para.runs:
-            if hasattr(run, '_element') and run._element.xpath('.//a:blip'):
-                # 获取图片的 rId
-                blip = run._element.xpath('.//a:blip')[0]
-                rId = blip.get(qn('r:embed'))
-
-                # 从源文档获取图片
-                image_part = source_para.part.related_parts[rId]
-                image_bytes = image_part.blob
-
-                # 添加到新文档
-                try:
-                    # 获取原始图片尺寸
-                    inline = run._element.xpath('.//wp:inline')[0]
-                    extent = inline.xpath('.//wp:extent')[0]
-                    cx = int(extent.get('cx'))
-                    cy = int(extent.get('cy'))
-
-                    # 转换为英寸
-                    width = Inches(cx / 914400)
-                    height = Inches(cy / 914400)
-
-                    # 添加图片 - 使用 BytesIO 包装字节数据
-                    img_run = img_para.add_run()
-                    image_stream = BytesIO(image_bytes)
-                    img_run.add_picture(image_stream, width=width, height=height)
-                except Exception as e:
-                    print(f"复制图片时出错: {e}")
-                    # 如果失败,尝试不指定尺寸
-                    try:
-                        img_run = img_para.add_run()
-                        image_stream = BytesIO(image_bytes)
-                        img_run.add_picture(image_stream)
-                    except:
-                        pass
-
-def format_document(input_path, output_path):
-    """格式化文档"""
-    print("正在读取文档...")
-    doc = Document(input_path)
-
-    print("创建新文档...")
-    new_doc = Document()
-
-    # 设置页边距
-    for section in new_doc.sections:
-        section.top_margin = Inches(1)
-        section.bottom_margin = Inches(1)
-        section.left_margin = Inches(1.25)
-        section.right_margin = Inches(1.25)
-
-    # ===== 第一页:标题页 =====
-    print("创建标题页...")
-    # 添加空行使标题居中
-    for _ in range(8):
-        new_doc.add_paragraph()
-
-    title_para = new_doc.add_paragraph()
-    title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    title_run = title_para.add_run('系统操作手册')
-    set_font(title_run, font_name='黑体', font_size=28, bold=True)
-
-    # 添加分页符
-    new_doc.add_page_break()
-
-    # ===== 第二页:目录 =====
-    print("创建目录...")
-    toc_title = new_doc.add_paragraph()
-    toc_title.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    toc_run = toc_title.add_run('目  录')
-    set_font(toc_run, font_name='黑体', font_size=18, bold=True)
-    new_doc.add_paragraph()
-
-    # 目录内容
-    toc_items = [
-        ('1、系统登录', 0),
-        ('    1.1 系统登录', 1),
-        ('    1.2 系统首页', 1),
-        ('2、数据管理', 0),
-        ('    2.1 检查列表', 1),
-        ('        2.1.1 影像上传', 2),
-        ('        2.1.2 查看影像数据详情', 2),
-        ('    2.2 部位列表', 1),
-        ('    2.3 患者信息', 1),
-        ('3、质控管理', 0),
-        ('    3.1 全量质控', 1),
-        ('    3.2 质控任务', 1),
-        ('    3.3 质控结果', 1),
-        ('    3.4 部位结果', 1),
-        ('4、字典管理', 0),
-        ('    4.1 质控标准', 1),
-        ('    4.2 质控因子', 1),
-        ('    4.3 检查项目', 1),
-        ('5、系统管理', 0),
-        ('    5.1 用户管理', 1),
-        ('    5.2 对接设置', 1),
-    ]
-
-    for item_text, level in toc_items:
-        toc_para = new_doc.add_paragraph()
-        toc_run = toc_para.add_run(item_text)
-        set_font(toc_run, font_name='宋体', font_size=12)
-        toc_para.paragraph_format.space_after = Pt(2)
-
-    # 添加分页符
-    new_doc.add_page_break()
-
-    # ===== 第三页开始:正文内容 =====
-    print("复制正文内容...")
-    content_started = False
-    para_count = 0
-
-    for para in doc.paragraphs:
-        text = para.text.strip()
-
-        # 跳过前面的空段落
-        if not content_started and not text:
-            continue
-
-        if text:
-            content_started = True
-
-        if content_started:
-            copy_paragraph_with_images(para, new_doc)
-            para_count += 1
-
-            if para_count % 10 == 0:
-                print(f"已处理 {para_count} 个段落...")
-
-    # 保存新文档
-    print("保存文档...")
-    new_doc.save(output_path)
-    print(f"\n✓ 文档格式化完成!")
-    print(f"✓ 已保存到: {output_path}")
-    print(f"✓ 共处理 {para_count} 个段落")
-
-
-if __name__ == '__main__':
-    input_file = '/Users/geng/Desktop/系统操作手册.docx'
-    output_file = '/Users/geng/Desktop/系统操作手册_格式化.docx'
-
-    try:
-        format_document(input_file, output_file)
-    except Exception as e:
-        print(f"\n✗ 错误: {e}")
-        import traceback
-        traceback.print_exc()

+ 0 - 279
format_manual_v3.py

@@ -1,279 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-格式化系统操作手册 - 第3版
-- 添加自动目录
-- 添加页眉页脚(页码)
-"""
-
-from docx import Document
-from docx.shared import Pt, Inches
-from docx.enum.text import WD_ALIGN_PARAGRAPH
-from docx.oxml.ns import qn
-from docx.oxml import OxmlElement
-import re
-from io import BytesIO
-
-def set_font(run, font_name='宋体', font_size=12, bold=False):
-    """设置字体"""
-    run.font.name = font_name
-    run.font.size = Pt(font_size)
-    run.font.bold = bold
-    run._element.rPr.rFonts.set(qn('w:eastAsia'), font_name)
-
-def is_heading_level_1(text):
-    """判断是否为一级标题"""
-    if not text:
-        return False
-    return bool(re.match(r'^\d+、', text)) or text == '系统登录'
-
-def is_heading_level_2(text):
-    """判断是否为二级标题"""
-    if not text or len(text) < 3:
-        return False
-    match = re.match(r'^\d+\.\d+\s', text)
-    return bool(match)
-
-def is_heading_level_3(text):
-    """判断是否为三级标题"""
-    if not text or len(text) < 5:
-        return False
-    match = re.match(r'^\d+\.\d+\.\d+\s', text)
-    return bool(match)
-
-def add_toc(doc):
-    """添加自动目录"""
-    paragraph = doc.add_paragraph()
-    run = paragraph.add_run()
-
-    # 创建 TOC 域代码
-    fldChar1 = OxmlElement('w:fldChar')
-    fldChar1.set(qn('w:fldCharType'), 'begin')
-
-    instrText = OxmlElement('w:instrText')
-    instrText.set(qn('xml:space'), 'preserve')
-    instrText.text = 'TOC \\o "1-3" \\h \\z \\u'
-
-    fldChar2 = OxmlElement('w:fldChar')
-    fldChar2.set(qn('w:fldCharType'), 'end')
-
-    run._r.append(fldChar1)
-    run._r.append(instrText)
-    run._r.append(fldChar2)
-
-    return paragraph
-
-def add_page_number(section):
-    """添加页眉页脚,显示页码"""
-    # 添加页脚
-    footer = section.footer
-    footer.is_linked_to_previous = False
-
-    # 清空现有内容
-    for para in footer.paragraphs:
-        para.clear()
-
-    # 创建页脚段落
-    footer_para = footer.paragraphs[0] if footer.paragraphs else footer.add_paragraph()
-    footer_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-    # 添加 "第X页/共Y页" 格式
-    run = footer_para.add_run('第 ')
-    set_font(run, font_name='宋体', font_size=10)
-
-    # 添加当前页码域
-    fldChar1 = OxmlElement('w:fldChar')
-    fldChar1.set(qn('w:fldCharType'), 'begin')
-
-    instrText1 = OxmlElement('w:instrText')
-    instrText1.set(qn('xml:space'), 'preserve')
-    instrText1.text = 'PAGE'
-
-    fldChar2 = OxmlElement('w:fldChar')
-    fldChar2.set(qn('w:fldCharType'), 'end')
-
-    run._r.append(fldChar1)
-    run._r.append(instrText1)
-    run._r.append(fldChar2)
-
-    run = footer_para.add_run(' 页/共 ')
-    set_font(run, font_name='宋体', font_size=10)
-
-    # 添加总页数域
-    run = footer_para.add_run()
-    fldChar3 = OxmlElement('w:fldChar')
-    fldChar3.set(qn('w:fldCharType'), 'begin')
-
-    instrText2 = OxmlElement('w:instrText')
-    instrText2.set(qn('xml:space'), 'preserve')
-    instrText2.text = 'NUMPAGES'
-
-    fldChar4 = OxmlElement('w:fldChar')
-    fldChar4.set(qn('w:fldCharType'), 'end')
-
-    run._r.append(fldChar3)
-    run._r.append(instrText2)
-    run._r.append(fldChar4)
-
-    run = footer_para.add_run(' 页')
-    set_font(run, font_name='宋体', font_size=10)
-
-def copy_paragraph_with_images(source_para, target_doc, apply_heading_style=False):
-    """复制段落,包括文本和图片"""
-    text = source_para.text.strip()
-
-    # 创建新段落
-    new_para = target_doc.add_paragraph()
-
-    # 根据文本类型设置格式和样式
-    if is_heading_level_1(text):
-        if apply_heading_style:
-            new_para.style = 'Heading 1'
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=16, bold=True)
-        new_para.paragraph_format.space_before = Pt(12)
-        new_para.paragraph_format.space_after = Pt(6)
-
-    elif is_heading_level_2(text):
-        if apply_heading_style:
-            new_para.style = 'Heading 2'
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=14, bold=True)
-        new_para.paragraph_format.space_before = Pt(10)
-        new_para.paragraph_format.space_after = Pt(5)
-
-    elif is_heading_level_3(text):
-        if apply_heading_style:
-            new_para.style = 'Heading 3'
-        run = new_para.add_run(text)
-        set_font(run, font_name='黑体', font_size=13, bold=True)
-        new_para.paragraph_format.space_before = Pt(8)
-        new_para.paragraph_format.space_after = Pt(4)
-
-    else:
-        # 普通段落
-        if text:
-            run = new_para.add_run(text)
-            set_font(run, font_name='宋体', font_size=11)
-            new_para.paragraph_format.space_after = Pt(3)
-            new_para.paragraph_format.line_spacing = 1.15
-
-    # 检查并复制图片
-    if source_para._element.xpath('.//w:drawing'):
-        img_para = target_doc.add_paragraph()
-        img_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-        for run in source_para.runs:
-            if hasattr(run, '_element') and run._element.xpath('.//a:blip'):
-                blip = run._element.xpath('.//a:blip')[0]
-                rId = blip.get(qn('r:embed'))
-                image_part = source_para.part.related_parts[rId]
-                image_bytes = image_part.blob
-
-                try:
-                    inline = run._element.xpath('.//wp:inline')[0]
-                    extent = inline.xpath('.//wp:extent')[0]
-                    cx = int(extent.get('cx'))
-                    cy = int(extent.get('cy'))
-                    width = Inches(cx / 914400)
-                    height = Inches(cy / 914400)
-
-                    img_run = img_para.add_run()
-                    image_stream = BytesIO(image_bytes)
-                    img_run.add_picture(image_stream, width=width, height=height)
-                except Exception as e:
-                    try:
-                        img_run = img_para.add_run()
-                        image_stream = BytesIO(image_bytes)
-                        img_run.add_picture(image_stream)
-                    except:
-                        pass
-
-def format_document(input_path, output_path):
-    """格式化文档"""
-    print("正在读取文档...")
-    doc = Document(input_path)
-
-    print("创建新文档...")
-    new_doc = Document()
-
-    # 设置页边距
-    for section in new_doc.sections:
-        section.top_margin = Inches(1)
-        section.bottom_margin = Inches(1)
-        section.left_margin = Inches(1.25)
-        section.right_margin = Inches(1.25)
-
-    # ===== 第一页:标题页 =====
-    print("创建标题页...")
-    for _ in range(8):
-        new_doc.add_paragraph()
-
-    title_para = new_doc.add_paragraph()
-    title_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    title_run = title_para.add_run('系统操作手册')
-    set_font(title_run, font_name='黑体', font_size=28, bold=True)
-
-    new_doc.add_page_break()
-
-    # ===== 第二页:自动目录 =====
-    print("创建自动目录...")
-    toc_title = new_doc.add_paragraph()
-    toc_title.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    toc_run = toc_title.add_run('目  录')
-    set_font(toc_run, font_name='黑体', font_size=18, bold=True)
-    new_doc.add_paragraph()
-
-    # 添加自动目录
-    add_toc(new_doc)
-    new_doc.add_paragraph()
-    new_doc.add_paragraph()
-
-    new_doc.add_page_break()
-
-    # ===== 第三页开始:正文内容 =====
-    print("复制正文内容...")
-    content_started = False
-    para_count = 0
-
-    for para in doc.paragraphs:
-        text = para.text.strip()
-
-        if not content_started and not text:
-            continue
-
-        if text:
-            content_started = True
-
-        if content_started:
-            # 应用标题样式,以便自动目录可以识别
-            copy_paragraph_with_images(para, new_doc, apply_heading_style=True)
-            para_count += 1
-
-            if para_count % 10 == 0:
-                print(f"已处理 {para_count} 个段落...")
-
-    # ===== 添加页眉页脚 =====
-    print("添加页眉页脚...")
-    for section in new_doc.sections:
-        add_page_number(section)
-
-    # 保存新文档
-    print("保存文档...")
-    new_doc.save(output_path)
-    print(f"\n✓ 文档格式化完成!")
-    print(f"✓ 已保存到: {output_path}")
-    print(f"✓ 共处理 {para_count} 个段落")
-    print("\n提示:打开文档后,请右键点击目录,选择'更新域'来更新目录内容。")
-
-
-if __name__ == '__main__':
-    input_file = '/Users/geng/Desktop/系统操作手册.docx'
-    output_file = '/Users/geng/Desktop/系统操作手册_格式化.docx'
-
-    try:
-        format_document(input_file, output_file)
-    except Exception as e:
-        print(f"\n✗ 错误: {e}")
-        import traceback
-        traceback.print_exc()

+ 0 - 580
generate_manual.py

@@ -1,580 +0,0 @@
-#!/usr/bin/env python3
-# -*- coding: utf-8 -*-
-"""
-医学影像质控系统操作手册生成器
-生成专业的Word格式操作手册
-"""
-
-from docx import Document
-from docx.shared import Pt, RGBColor, Inches, Cm
-from docx.enum.text import WD_ALIGN_PARAGRAPH, WD_LINE_SPACING
-from docx.enum.style import WD_STYLE_TYPE
-from docx.oxml.ns import qn
-from docx.oxml import OxmlElement
-import os
-
-# 设置中文字体
-def set_chinese_font(run, font_name='微软雅黑', font_size=11):
-    """设置中文字体"""
-    run.font.name = font_name
-    run.font.size = Pt(font_size)
-    run._element.rPr.rFonts.set(qn('w:eastAsia'), font_name)
-
-def add_page_number(section):
-    """添加页码"""
-    footer = section.footer
-    paragraph = footer.paragraphs[0]
-    paragraph.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    run = paragraph.add_run()
-    run.font.size = Pt(10)
-    run.text = '第 '
-
-    fldChar1 = OxmlElement('w:fldChar')
-    fldChar1.set(qn('w:fldCharType'), 'begin')
-
-    instrText = OxmlElement('w:instrText')
-    instrText.set(qn('xml:space'), 'preserve')
-    instrText.text = "PAGE"
-
-    fldChar2 = OxmlElement('w:fldChar')
-    fldChar2.set(qn('w:fldCharType'), 'end')
-
-    run._r.append(fldChar1)
-    run._r.append(instrText)
-    run._r.append(fldChar2)
-
-    run = paragraph.add_run(' 页')
-    run.font.size = Pt(10)
-
-def set_cell_background(cell, color_str):
-    """设置表格单元格背景色"""
-    shading_elm = OxmlElement('w:shd')
-    shading_elm.set(qn('w:fill'), color_str)
-    cell._element.get_or_add_tcPr().append(shading_elm)
-
-# 创建文档
-doc = Document()
-
-# 设置页面边距
-section = doc.sections[0]
-section.top_margin = Cm(2.54)
-section.bottom_margin = Cm(2.54)
-section.left_margin = Cm(3.17)
-section.right_margin = Cm(3.17)
-
-# 添加页眉
-header = section.header
-header_para = header.paragraphs[0]
-header_para.alignment = WD_ALIGN_PARAGRAPH.RIGHT
-header_run = header_para.add_run('医学影像质控系统操作手册')
-set_chinese_font(header_run, '微软雅黑', 10)
-
-# 添加页脚(页码)
-add_page_number(section)
-
-# ========== 封面页 ==========
-# 添加分节符,封面页单独一页
-doc.add_page_break()
-
-title_page = doc.add_paragraph()
-title_page.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-# 添加主标题
-title = title_page.add_run('医学影像质控系统\n操作手册')
-set_chinese_font(title, '微软雅黑', 32)
-title.bold = True
-title.font.color.rgb = RGBColor(0, 51, 102)
-
-# 添加副标题
-subtitle = title_page.add_run('\n\n\nUser Manual')
-subtitle_run = subtitle
-subtitle_run.font.name = 'Arial'
-subtitle_run.font.size = Pt(20)
-subtitle_run.font.color.rgb = RGBColor(100, 100, 100)
-
-# 添加版本信息
-version = title_page.add_run('\n\n\n\n\n版本:V1.2.0')
-set_chinese_font(version, '微软雅黑', 14)
-version.font.color.rgb = RGBColor(80, 80, 80)
-
-date = title_page.add_run('\n更新日期:2026年2月')
-set_chinese_font(date, '微软雅黑', 14)
-date.font.color.rgb = RGBColor(80, 80, 80)
-
-# 添加公司信息(占位符)
-company = title_page.add_run('\n\n\n\n\n© 2026 医学影像质控系统 | 保留所有权利')
-set_chinese_font(company, '微软雅黑', 10)
-company.font.color.rgb = RGBColor(150, 150, 150)
-
-# 添加分页
-doc.add_page_break()
-
-# ========== 目录页 ==========
-toc_title = doc.add_heading('目录', 1)
-toc_title.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-# 创建目录表格
-toc_table = doc.add_table(rows=1, cols=3)
-toc_table.style = 'Light Grid Accent 1'
-hdr_cells = toc_table.rows[0].cells
-set_chinese_font(hdr_cells[0].paragraphs[0].add_run('章节'), '微软雅黑', 11)
-hdr_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[0], '4472C4')
-set_chinese_font(hdr_cells[1].paragraphs[0].add_run('标题'), '微软雅黑', 11)
-hdr_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[1], '4472C4')
-set_chinese_font(hdr_cells[2].paragraphs[0].add_run('页码'), '微软雅黑', 11)
-hdr_cells[2].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[2], '4472C4')
-
-# 目录内容
-toc_items = [
-    ('1', '系统概述', '3'),
-    ('1.1', '系统简介', '3'),
-    ('1.2', '核心功能', '3'),
-    ('1.3', '质量等级说明', '4'),
-    ('2', '质控标准管理', '5'),
-    ('2.1', '检查项目管理', '5'),
-    ('2.2', '质控因子管理', '6'),
-    ('2.3', '质控标准配置', '7'),
-    ('2.4', '部位管理', '8'),
-    ('3', '质控任务管理', '9'),
-    ('3.1', '创建质控任务', '9'),
-    ('3.2', '手动执行任务', '11'),
-    ('3.3', '自动执行配置', '12'),
-    ('3.4', '查看任务详情', '13'),
-    ('3.5', '管理任务', '14'),
-    ('4', '质控结果查看', '15'),
-    ('4.1', '质控结果列表', '15'),
-    ('4.2', '查询与筛选', '16'),
-    ('4.3', '结果排序', '17'),
-    ('4.4', '导出结果', '18'),
-    ('5', '部位结果分析', '19'),
-    ('5.1', '部位结果概览', '19'),
-    ('5.2', '查看部位详情', '20'),
-    ('5.3', '部位结果对比', '21'),
-    ('6', '质控结果详情', '22'),
-    ('6.1', '单部位检查结果详情', '22'),
-    ('6.2', '多部位检查结果详情', '25'),
-    ('6.3', '性能优化说明', '28'),
-    ('6.4', '阅片器集成', '29'),
-    ('7', '常见问题', '30'),
-    ('7.1', '任务相关', '30'),
-    ('7.2', '结果相关', '31'),
-    ('7.3', '数据相关', '32'),
-    ('7.4', '系统相关', '33'),
-    ('8', '最佳实践', '34'),
-    ('8.1', '质控标准配置', '34'),
-    ('8.2', '任务执行策略', '35'),
-    ('8.3', '结果分析与改进', '36'),
-    ('9', '附录', '37'),
-    ('9.1', '术语表', '37'),
-    ('9.2', '快捷键', '38'),
-    ('9.3', '系统要求', '39'),
-    ('9.4', '技术支持', '40'),
-    ('10', '更新日志', '41'),
-]
-
-for item in toc_items:
-    row_cells = toc_table.add_row().cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(item[0]), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(item[1]), '微软雅黑', 10)
-    set_chinese_font(row_cells[2].paragraphs[0].add_run(item[2]), '微软雅黑', 10)
-    row_cells[2].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-doc.add_page_break()
-
-# ========== 正文内容 ==========
-
-def add_screenshot_placeholder(doc, description, width=Inches(5)):
-    """添加截图占位符"""
-    p = doc.add_paragraph()
-    p.alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-    # 添加占位框
-    run = p.add_run()
-    run.add_tab()
-    run.font.size = Pt(10)
-
-    # 添加说明文本
-    desc_para = doc.add_paragraph()
-    desc_para.alignment = WD_ALIGN_PARAGRAPH.CENTER
-    desc_run = desc_para.add_run(f'【截图:{description}】')
-    set_chinese_font(desc_run, '微软雅黑', 9)
-    desc_run.font.color.rgb = RGBColor(100, 100, 100)
-    desc_run.italic = True
-
-    # 添加分隔线
-    doc.add_paragraph('_' * 80).alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-# 第1章:系统概述
-doc.add_heading('1. 系统概述', 1)
-
-doc.add_heading('1.1 系统简介', 2)
-p = doc.add_paragraph()
-intro_text = (
-    '医学影像质控系统是针对医学影像检查质量的自动化管理和分析平台。'
-    '系统通过预设的质控标准,对DICOM影像进行自动化分析,生成详细的质控报告,'
-    '帮助医疗机构提升影像质量。'
-)
-set_chinese_font(p.add_run(intro_text), '微软雅黑', 11)
-
-doc.add_heading('1.2 核心功能', 2)
-features = [
-    '✅ 质控标准管理:定义检查项目和质控因子',
-    '✅ 质控任务管理:创建、执行、监控质控任务',
-    '✅ 自动化分析:自动分析影像质量指标',
-    '✅ 结果查询:多维度查询质控结果',
-    '✅ 详情查看:查看详细的质控结果和图像分析',
-    '✅ 部位分析:按检查部位统计分析',
-    '✅ 执行历史:查看任务执行记录',
-]
-
-for feature in features:
-    p = doc.add_paragraph(feature, style='List Bullet')
-    set_chinese_font(p.runs[0], '微软雅黑', 11)
-
-doc.add_heading('1.3 质量等级说明', 2)
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('系统采用5级质量评分标准:'), '微软雅黑', 11)
-
-# 质量等级表格
-table = doc.add_table(rows=6, cols=3)
-table.style = 'Light Grid Accent 1'
-
-# 表头
-hdr_cells = table.rows[0].cells
-set_chinese_font(hdr_cells[0].paragraphs[0].add_run('等级'), '微软雅黑', 11)
-hdr_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[0], '4472C4')
-set_chinese_font(hdr_cells[1].paragraphs[0].add_run('分数范围'), '微软雅黑', 11)
-hdr_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[1], '4472C4')
-set_chinese_font(hdr_cells[2].paragraphs[0].add_run('说明'), '微软雅黑', 11)
-hdr_cells[2].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[2], '4472C4')
-
-# 数据行
-data = [
-    ('优秀', '90-100分', '质量优异,完全符合标准'),
-    ('良好', '80-89分', '质量较好,基本符合标准'),
-    ('中等', '70-79分', '质量一般,部分指标未达标'),
-    ('较差', '60-69分', '质量较差,多项指标未达标'),
-    ('极差', '0-59分', '质量极差,需要重新检查'),
-]
-
-colors = ['70AD47', '5B9BD5', 'FFC000', 'FF5252', '808080']
-
-for i, (level, score, desc) in enumerate(data):
-    row_cells = table.rows[i + 1].cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(level), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(row_cells[0], colors[i])
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(score), '微软雅黑', 10)
-    row_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[2].paragraphs[0].add_run(desc), '微软雅黑', 10)
-
-# 第2章:质控标准管理
-doc.add_page_break()
-doc.add_heading('2. 质控标准管理', 1)
-
-doc.add_heading('2.1 检查项目管理', 2)
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('路径:数据管理 → 检查项目'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('功能:管理医学影像检查类型(如胸部CT、颅脑MRI等)'), '微软雅黑', 11)
-
-# 添加截图占位符
-add_screenshot_placeholder(doc, '检查项目管理界面')
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('操作步骤:'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-steps = [
-    '进入检查项目列表页面',
-    '点击"新增检查项目"按钮',
-    '填写检查项目信息:',
-    '  - 检查项目名称(必填)',
-    '  - 检查类型(CT/MR/DR等)',
-    '  - 检查部位',
-    '  - 检查描述',
-    '点击"保存"完成创建',
-]
-
-for step in steps:
-    p = doc.add_paragraph()
-    set_chinese_font(p.add_run(step), '微软雅黑', 11)
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('注意事项:'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-notes = [
-    '检查项目名称不能重复',
-    '删除检查项目前需确认没有关联的质控标准',
-]
-
-for note in notes:
-    p = doc.add_paragraph(note, style='List Bullet')
-    set_chinese_font(p.runs[0], '微软雅黑', 11)
-
-# 继续添加其他章节...
-# (由于篇幅限制,这里只展示部分章节的完整实现)
-
-doc.add_heading('2.2 质控因子管理', 2)
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('路径:数据管理 → 质控因子'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-add_screenshot_placeholder(doc, '质控因子管理界面')
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('示例因子:'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-example_factors = [
-    ('噪声', '定量测量', 'HU', '< 50'),
-    ('伪影', '定性评估', '-', '无/轻微/中度/重度'),
-    ('空间分辨率', '定量测量', 'lp/mm', '> 5'),
-]
-
-factor_table = doc.add_table(rows=4, cols=4)
-factor_table.style = 'Light Grid Accent 1'
-
-hdr_cells = factor_table.rows[0].cells
-headers = ['因子名称', '因子类型', '单位', '阈值示例']
-for i, header in enumerate(headers):
-    set_chinese_font(hdr_cells[i].paragraphs[0].add_run(header), '微软雅黑', 11)
-    hdr_cells[i].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(hdr_cells[i], '4472C4')
-
-for i, (name, type_, unit, threshold) in enumerate(example_factors):
-    row_cells = factor_table.rows[i + 1].cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(name), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(type_), '微软雅黑', 10)
-    row_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[2].paragraphs[0].add_run(unit), '微软雅黑', 10)
-    row_cells[2].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[3].paragraphs[0].add_run(threshold), '微软雅黑', 10)
-    row_cells[3].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-
-# 第3章:质控任务管理
-doc.add_page_break()
-doc.add_heading('3. 质控任务管理', 1)
-
-doc.add_heading('3.1 创建质控任务', 2)
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('路径:质控任务 → 任务列表'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-add_screenshot_placeholder(doc, '创建任务界面')
-
-# 创建示例任务配置表
-config_table = doc.add_table(rows=7, cols=2)
-config_table.style = 'Light Grid Accent 1'
-
-config_items = [
-    ('任务名称', '2026年1月胸部CT质控'),
-    ('任务类型', '单次任务'),
-    ('检查类型', 'CT'),
-    ('检查项目', '胸部CT平扫、胸部CT增强'),
-    ('执行时间', '2026-02-01 00:00'),
-    ('数据范围', '2026-01-01 至 2026-01-31'),
-]
-
-for i, (label, value) in enumerate(config_items):
-    row_cells = config_table.rows[i].cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(label), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(row_cells[0], 'E7E6E6')
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(value), '微软雅黑', 10)
-
-# 第6章:质控结果详情(重点章节)
-doc.add_page_break()
-doc.add_heading('6. 质控结果详情', 1)
-
-doc.add_heading('6.1 单部位检查结果详情', 2)
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('进入方式:'), '微软雅黑', 11)
-p.runs[0].bold = True
-
-entry_methods = [
-    '从"质控结果"列表点击"查看详情"',
-    '从"部位结果"列表点击"查看详情"',
-]
-
-for method in entry_methods:
-    p = doc.add_paragraph(method, style='List Bullet')
-    set_chinese_font(p.runs[0], '微软雅黑', 11)
-
-# 性能对比表格
-doc.add_heading('6.3 性能优化说明', 2)
-
-p = doc.add_paragraph()
-set_chinese_font(p.add_run('系统采用懒加载机制,大幅提升页面加载速度:'), '微软雅黑', 11)
-
-perf_table = doc.add_table(rows=4, cols=4)
-perf_table.style = 'Light Grid Accent 1'
-
-# 表头
-hdr_cells = perf_table.rows[0].cells
-perf_headers = ['场景', '优化前', '优化后', '提升倍数']
-for i, header in enumerate(perf_headers):
-    set_chinese_font(hdr_cells[i].paragraphs[0].add_run(header), '微软雅黑', 11)
-    hdr_cells[i].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(hdr_cells[i], '4472C4')
-
-# 数据行
-perf_data = [
-    ('打开单部位详情', '10-15秒', '< 0.5秒', '30倍'),
-    ('打开多部位详情', '10-15秒', '< 2秒', '7倍'),
-    ('查看图像结果', '0秒(已加载)', '< 1秒', '按需加载'),
-]
-
-for i, (scene, before, after, improvement) in enumerate(perf_data):
-    row_cells = perf_table.rows[i + 1].cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(scene), '微软雅黑', 10)
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(before), '微软雅黑', 10)
-    row_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[2].paragraphs[0].add_run(after), '微软雅黑', 10)
-    row_cells[2].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_chinese_font(row_cells[3].paragraphs[0].add_run(improvement), '微软雅黑', 10)
-    row_cells[3].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(row_cells[3], 'FFC000')
-
-add_screenshot_placeholder(doc, '单部位检查结果详情界面')
-add_screenshot_placeholder(doc, '多部位检查结果详情界面')
-
-# 第7章:常见问题
-doc.add_page_break()
-doc.add_heading('7. 常见问题', 1)
-
-doc.add_heading('7.1 任务相关', 2)
-
-# 创建FAQ表格
-faq_table = doc.add_table(rows=1, cols=2)
-faq_table.style = 'Light Grid Accent 1'
-
-# 表头
-hdr_cells = faq_table.rows[0].cells
-set_chinese_font(hdr_cells[0].paragraphs[0].add_run('问题'), '微软雅黑', 11)
-set_cell_background(hdr_cells[0], '4472C4')
-set_chinese_font(hdr_cells[1].paragraphs[0].add_run('解答'), '微软雅黑', 11)
-set_cell_background(hdr_cells[1], '4472C4')
-
-# FAQ数据
-faqs = [
-    ('任务创建后无法执行?',
-     '请检查:\n1. 任务状态是否为"启用"\n2. 执行时间是否已到\n3. 数据范围内是否有符合条件的影像\n4. 质控标准是否已配置并启用'),
-    ('任务执行失败怎么办?',
-     '请查看:\n1. 进入任务详情页\n2. 查看"执行日志"\n3. 根据错误信息进行排查'),
-    ('如何停止正在执行的任务?',
-     '1. 进入任务详情页\n2. 点击"停止执行"按钮\n3. 确认停止操作\n4. 系统将安全停止任务(已分析的结果会保留)'),
-]
-
-for question, answer in faqs:
-    row_cells = faq_table.add_row().cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(question), '微软雅黑', 10)
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(answer), '微软雅黑', 10)
-
-# 第9章:附录
-doc.add_page_break()
-doc.add_heading('9. 附录', 1)
-
-doc.add_heading('9.1 术语表', 2)
-
-term_table = doc.add_table(rows=5, cols=2)
-term_table.style = 'Light Grid Accent 1'
-
-# 表头
-hdr_cells = term_table.rows[0].cells
-set_chinese_font(hdr_cells[0].paragraphs[0].add_run('术语'), '微软雅黑', 11)
-hdr_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[0], '4472C4')
-set_chinese_font(hdr_cells[1].paragraphs[0].add_run('说明'), '微软雅黑', 11)
-hdr_cells[1].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[1], '4472C4')
-
-# 术语数据
-terms = [
-    ('DICOM', 'Digital Imaging and Communications in Medicine,医学影像存储与传输标准'),
-    ('质控因子', '质量检测指标'),
-    ('质量等级', '综合评分等级(优秀/良好/中等/较差/极差)'),
-    ('SOP Instance UID', 'Service-Object Pair Instance Unique Identifier,图像唯一标识符'),
-]
-
-for term, desc in terms:
-    row_cells = term_table.add_row().cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(term), '微软雅黑', 10)
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(desc), '微软雅黑', 10)
-
-doc.add_heading('9.3 系统要求', 2)
-
-# 系统要求表格
-req_table = doc.add_table(rows=4, cols=2)
-req_table.style = 'Light Grid Accent 1'
-
-req_data = [
-    ('浏览器要求', 'Chrome 90+(推荐)、Edge 90+、Firefox 88+、Safari 14+'),
-    ('网络要求', '建议带宽:≥ 10Mbps,延迟:≤ 100ms,稳定性:7×24小时稳定连接'),
-    ('服务器要求', 'CPU:≥ 8核,内存:≥ 16GB,硬盘:≥ 500GB SSD,数据库:MySQL 5.7+'),
-]
-
-for i, (label, value) in enumerate(req_data):
-    row_cells = req_table.rows[i].cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(label), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(row_cells[0], 'E7E6E6')
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(value), '微软雅黑', 10)
-
-# 第10章:更新日志
-doc.add_page_break()
-doc.add_heading('10. 更新日志', 1)
-
-# 版本历史表格
-version_table = doc.add_table(rows=4, cols=2)
-version_table.style = 'Light Grid Accent 1'
-
-# 表头
-hdr_cells = version_table.rows[0].cells
-set_chinese_font(hdr_cells[0].paragraphs[0].add_run('版本'), '微软雅黑', 11)
-hdr_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-set_cell_background(hdr_cells[0], '4472C4')
-set_chinese_font(hdr_cells[1].paragraphs[0].add_run('更新内容'), '微软雅黑', 11)
-set_cell_background(hdr_cells[1], '4472C4')
-
-# 版本数据
-versions = [
-    ('v1.2.0 (2026-02-06)',
-     '新增功能:\n• 质控结果详情页性能优化(懒加载机制)\n• 多部位检查结果查看优化\n• 部位结果统计分析功能\n\n性能提升:\n• 页面加载速度提升30倍(单部位)\n• 页面加载速度提升7倍(多部位)\n• 图像结果按需加载'),
-    ('v1.1.0 (2026-01-15)',
-     '新增功能:\n• 部位结果分析模块\n• 质控结果导出功能\n• 周期任务自动执行\n\n优化改进:\n• 优化任务执行效率\n• 改进结果查询性能'),
-    ('v1.0.0 (2026-01-01)',
-     '初始版本发布:\n• 质控标准管理\n• 质控任务管理\n• 质控结果查询\n• 质控结果详情查看'),
-]
-
-for i, (version, content) in enumerate(versions):
-    row_cells = version_table.add_row().cells
-    set_chinese_font(row_cells[0].paragraphs[0].add_run(version), '微软雅黑', 10)
-    row_cells[0].paragraphs[0].alignment = WD_ALIGN_PARAGRAPH.CENTER
-    set_cell_background(row_cells[0], 'E7E6E6')
-    set_chinese_font(row_cells[1].paragraphs[0].add_run(content), '微软雅黑', 9)
-
-# 保存文档
-output_path = '/Users/geng/Documents/WebstormProjects/qc_web/医学影像质控系统操作手册.docx'
-try:
-    doc.save(output_path)
-    print(f'✅ Word操作手册已生成:{output_path}')
-    print('\n📝 使用说明:')
-    print('1. 打开文档,查找【截图:XXX】标记的位置')
-    print('2. 在标记处插入对应的界面截图')
-    print('3. 删除【截图:XXX】占位符文本')
-    print('4. 保存文档即可')
-except Exception as e:
-    print(f'❌ 生成失败:{e}')