任务: 绘制SVG流程图 (先写出流程U...

Author:辉风起微凉
2026/01/05 09:15

Description

根据心理咨询流程生成专业的SVG流程图,展示患者从咨询到治疗的完整过程,确保布局清晰美观且体现心理学特色。

Tags

视觉化内容生成格式转换

Content

任务: 绘制SVG流程图
(先写出流程UML,然后再绘图(SVG))
流程:
<flow>
患者咨询 → 初步评估 → 心理测试 → 诊断分析 → 治疗方案制定 → 治疗实施 → 效果评估 → 结束治疗或调整方案
</flow>

* 要求:清晰美观,文字元素不重叠,体现心理学专业特色
* 参考示例:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 900 650">
  <!-- 样式定义 -->
  <defs>
    <marker id="arrowhead" markerWidth="10" markerHeight="7" refX="10" refY="3.5" orient="auto">
      <polygon points="0 0, 10 3.5, 0 7" fill="#333" />
    </marker>
  </defs>

  <!-- 纯白背景 -->
  <rect width="900" height="650" fill="white" />

  <!-- 流程图标题 -->
  <text x="450" y="40" font-family="Source Han Sans CN, sans-serif" font-size="24" text-anchor="middle" font-weight="600" fill="#333">心理咨询治疗流程</text>

  <!-- 开始事件:患者咨询 -->
  <rect x="100" y="80" width="200" height="80" rx="4" ry="4" fill="#e8f5e8" stroke="#4caf50" stroke-width="2" />
  <rect x="130" y="100" width="140" height="10" rx="5" ry="5" fill="#c8e6c9" opacity="0.7" />
  <text x="200" y="130" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">患者咨询</text>

  <!-- 连接线1 -->
  <line x1="300" y1="120" x2="370" y2="120" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 初步评估 -->
  <rect x="370" y="80" width="200" height="80" rx="4" ry="4" fill="#e3f2fd" stroke="#2196f3" stroke-width="2" />
  <rect x="400" y="100" width="140" height="10" rx="5" ry="5" fill="#bbdefb" opacity="0.7" />
  <text x="470" y="130" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">初步评估</text>

  <!-- 连接线2 -->
  <line x1="570" y1="120" x2="640" y2="120" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 心理测试 -->
  <rect x="640" y="80" width="200" height="80" rx="4" ry="4" fill="#fff3e0" stroke="#ff9800" stroke-width="2" />
  <rect x="670" y="100" width="140" height="10" rx="5" ry="5" fill="#ffe0b2" opacity="0.7" />
  <text x="740" y="130" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">心理测试</text>

  <!-- 连接线3 -->
  <line x1="740" y1="160" x2="740" y2="210" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 诊断分析 -->
  <rect x="640" y="210" width="200" height="80" rx="4" ry="4" fill="#fce4ec" stroke="#e91e63" stroke-width="2" />
  <rect x="670" y="230" width="140" height="10" rx="5" ry="5" fill="#f8bbd0" opacity="0.7" />
  <text x="740" y="260" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">诊断分析</text>

  <!-- 连接线4 -->
  <line x1="640" y="250" x2="570" y2="250" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 治疗方案制定 -->
  <rect x="370" y="210" width="200" height="80" rx="4" ry="4" fill="#e8eaf6" stroke="#3f51b5" stroke-width="2" />
  <rect x="400" y="230" width="140" height="10" rx="5" ry="5" fill="#c5cae9" opacity="0.7" />
  <text x="470" y="260" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">治疗方案制定</text>

  <!-- 连接线5 -->
  <line x1="370" y1="250" x2="300" y2="250" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 治疗实施 -->
  <rect x="100" y="210" width="200" height="80" rx="4" ry="4" fill="#e0f2f1" stroke="#009688" stroke-width="2" />
  <rect x="130" y="230" width="140" height="10" rx="5" ry="5" fill="#b2dfdb" opacity="0.7" />
  <text x="200" y="260" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">治疗实施</text>

  <!-- 连接线6 -->
  <line x1="200" y1="290" x2="200" y2="340" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />

  <!-- 效果评估 -->
  <rect x="100" y="340" width="200" height="80" rx="4" ry="4" fill="#fff8e1" stroke="#ffc107" stroke-width="2" />
  <rect x="130" y="360" width="140" height="10" rx="5" ry="5" fill="#ffecb3" opacity="0.7" />
  <text x="200" y="390" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">效果评估</text>

  <!-- 决策点:治疗效果是否满意 -->
  <path d="M 200 420 L 270 490 L 200 560 L 130 490 Z" fill="#e8f5e8" stroke="#4caf50" stroke-width="2" />
  <text x="200" y="485" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">治疗效果满意?</text>

  <!-- 效果不满意连接线 -->
  <path d="M 130 490 L 50 490 L 50 250" stroke="#333" stroke-width="1.5" fill="none" stroke-dasharray="5,3" marker-end="url(#arrowhead)" />
  <text x="80" y="470" font-family="Source Han Sans CN, sans-serif" font-size="16" fill="#ff6b6b" text-anchor="middle">No 调整方案</text>

  <!-- 效果满意连接线 -->
  <line x1="270" y1="490" x2="320" y2="490" stroke="#333" stroke-width="2" marker-end="url(#arrowhead)" />
  <text x="290" y="470" font-family="Source Han Sans CN, sans-serif" font-size="16" fill="#2ecc71" text-anchor="middle">Yes</text>

  <!-- 结束治疗 -->
  <rect x="320" y="450" width="200" height="80" rx="4" ry="4" fill="#f3e5f5" stroke="#9c27b0" stroke-width="2" />
  <rect x="350" y="470" width="140" height="10" rx="5" ry="5" fill="#e1bee7" opacity="0.7" />
  <text x="420" y="500" font-family="Source Han Sans CN, sans-serif" font-size="18" text-anchor="middle" font-weight="500">结束治疗</text>

  <!-- 说明文字 -->
  <text x="600" y="450" font-family="Source Han Sans CN, sans-serif" font-size="16" fill="#666" text-anchor="start" font-weight="500">备注:</text>
  <text x="600" y="480" font-family="Source Han Sans CN, sans-serif" font