文件
nahaichuan/tests/generate_showcases.py

589 行
28 KiB
Python

# -*- coding: utf-8 -*-
"""
企业级现代中式浅色专业风矢量配图生成引擎 (Concise Visual Showcases Generator)
设计准则:
1. 视觉简洁纯粹:彻底摒弃“文字介绍类图片”模式,不包含任何长篇功能描述、业务参数、假数据表格或架构长文。
2. 现代中式浅色专业风:
- 背景:#FFFFFF 至 #F8FAFC 极净浅色底,点缀 0.75px 雅致东方窗棂微网格
- 主色:#2563EB 科技蓝
- 辅色:#06B6D4 沉静青、#7C3AED 优雅紫
- 东方意境:大留白、细线构图、多维空间微几何体、纯粹光影层次
- 印章点缀:仅在右上角保留一枚精致小巧的朱砂印章微标(仅 1 个单字),作为东方文化印记,无任何冗余文字。
"""
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
TARGET_DIR = os.path.join(BASE_DIR, 'public', 'assets', 'addons', 'official', 'images', 'showcases')
os.makedirs(TARGET_DIR, exist_ok=True)
COMMON_DEFS = '''
<linearGradient id="bgGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FFFFFF"/>
<stop offset="100%" stop-color="#F8FAFC"/>
</linearGradient>
<linearGradient id="blueGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#2563EB"/>
<stop offset="100%" stop-color="#1D4ED8"/>
</linearGradient>
<linearGradient id="cyanGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#06B6D4"/>
<stop offset="100%" stop-color="#0EA5E9"/>
</linearGradient>
<linearGradient id="purpleGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#7C3AED"/>
<stop offset="100%" stop-color="#6366F1"/>
</linearGradient>
<linearGradient id="glassGrad" x1="0%" y1="0%" x2="100%" y2="100%">
<stop offset="0%" stop-color="#FFFFFF" stop-opacity="0.85"/>
<stop offset="100%" stop-color="#F1F5F9" stop-opacity="0.6"/>
</linearGradient>
<pattern id="lattice" width="28" height="28" patternUnits="userSpaceOnUse">
<path d="M 28 0 L 0 0 0 28" fill="none" stroke="#E2E8F0" stroke-width="0.7" stroke-dasharray="3,3"/>
</pattern>
<filter id="softGlow" x="-20%" y="-20%" width="140%" height="140%">
<feGaussianBlur stdDeviation="12" result="blur"/>
<feComposite in="SourceGraphic" in2="blur" operator="over"/>
</filter>
<filter id="cardShadow" x="-10%" y="-10%" width="120%" height="120%">
<feDropShadow dx="0" dy="6" stdDeviation="10" flood-color="#0F172A" flood-opacity="0.06"/>
</filter>
'''
def make_seal(x, y, char):
return f'''
<g transform="translate({x}, {y})">
<rect width="26" height="26" rx="4" fill="#FEF2F2" stroke="#DC2626" stroke-width="1.2"/>
<rect x="2.5" y="2.5" width="21" height="21" rx="2" fill="none" stroke="#DC2626" stroke-width="0.5" stroke-opacity="0.5"/>
<text x="13" y="18" fill="#DC2626" font-family="'Noto Serif SC', 'SimSun', serif" font-size="13" font-weight="700" text-anchor="middle">{char}</text>
</g>
'''
# 1. 软件开发
def build_service_middle():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "研")}
<g transform="translate(300, 195)">
<ellipse cx="0" cy="50" rx="210" ry="85" fill="none" stroke="#E2E8F0" stroke-width="1.5" stroke-dasharray="6,6"/>
<ellipse cx="0" cy="50" rx="150" ry="60" fill="none" stroke="#CBD5E1" stroke-width="1"/>
<g transform="translate(-140, 45)" filter="url(#cardShadow)">
<polygon points="0,-16 28,-2 0,12 -28,-2" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1"/>
<polygon points="-28,-2 0,12 0,26 -28,12" fill="#E2E8F0"/>
<polygon points="0,12 28,-2 28,12 0,26" fill="#F1F5F9"/>
<circle cx="0" cy="-2" r="3" fill="#2563EB"/>
</g>
<g transform="translate(140, 45)" filter="url(#cardShadow)">
<polygon points="0,-16 28,-2 0,12 -28,-2" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1"/>
<polygon points="-28,-2 0,12 0,26 -28,12" fill="#E2E8F0"/>
<polygon points="0,12 28,-2 28,12 0,26" fill="#F1F5F9"/>
<circle cx="0" cy="-2" r="3" fill="#06B6D4"/>
</g>
<path d="M -140 45 L 0 -10 M 140 45 L 0 -10 M 0 -10 L 0 -75" stroke="#94A3B8" stroke-width="1.5" stroke-dasharray="4,4"/>
<path d="M -80 75 Q 0 40 80 75" fill="none" stroke="#2563EB" stroke-width="1.5" opacity="0.6"/>
<g transform="translate(-60, 10)" filter="url(#cardShadow)">
<polygon points="0,-22 36,-4 0,14 -36,-4" fill="url(#blueGrad)"/>
<polygon points="-36,-4 0,14 0,36 -36,18" fill="#1D4ED8"/>
<polygon points="0,14 36,-4 36,18 0,36" fill="#1E40AF"/>
</g>
<g transform="translate(60, 10)" filter="url(#cardShadow)">
<polygon points="0,-22 36,-4 0,14 -36,-4" fill="url(#cyanGrad)"/>
<polygon points="-36,-4 0,14 0,36 -36,18" fill="#0891B2"/>
<polygon points="0,14 36,-4 36,18 0,36" fill="#0E7490"/>
</g>
<g transform="translate(0, -60)" filter="url(#cardShadow)">
<circle cx="0" cy="0" r="48" fill="#EFF6FF" opacity="0.8"/>
<circle cx="0" cy="0" r="38" fill="none" stroke="#2563EB" stroke-width="1.2" stroke-dasharray="5,3"/>
<polygon points="0,-32 30,-12 0,8 -30,-12" fill="url(#glassGrad)" stroke="#2563EB" stroke-width="1.5"/>
<polygon points="-30,-12 0,8 0,32 -30,12" fill="#DBEAFE"/>
<polygon points="0,8 30,-12 30,12 0,32" fill="#BFDBFE"/>
<circle cx="0" cy="8" r="5" fill="#2563EB"/>
<circle cx="0" cy="8" r="8" fill="none" stroke="#2563EB" stroke-width="1" opacity="0.5"/>
</g>
<circle cx="-120" cy="-30" r="3" fill="#2563EB" opacity="0.6"/>
<circle cx="110" cy="-40" r="3.5" fill="#06B6D4" opacity="0.6"/>
<circle cx="-50" cy="90" r="2.5" fill="#7C3AED" opacity="0.5"/>
<circle cx="70" cy="80" r="3" fill="#2563EB" opacity="0.5"/>
</g>
</svg>'''
# 2. APP与小程序
def build_service_app():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "端")}
<g transform="translate(300, 190)">
<ellipse cx="0" cy="70" rx="200" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.5" stroke-dasharray="4,4"/>
<g transform="translate(-110, -10)" filter="url(#cardShadow)">
<rect x="-65" y="-85" width="130" height="170" rx="8" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.5"/>
<rect x="-55" y="-75" width="110" height="135" rx="4" fill="#FFFFFF" stroke="#E2E8F0"/>
<line x1="-45" y1="-60" x2="0" y2="-60" stroke="#CBD5E1" stroke-width="2.5" stroke-linecap="round"/>
<rect x="-45" y="-45" width="42" height="36" rx="3" fill="#EFF6FF" stroke="#BFDBFE"/>
<rect x="3" y="-45" width="42" height="36" rx="3" fill="#F1F5F9" stroke="#E2E8F0"/>
<rect x="-45" y="0" width="90" height="48" rx="3" fill="#F8FAFC" stroke="#E2E8F0"/>
<circle cx="0" cy="72" r="4" fill="#94A3B8"/>
</g>
<g transform="translate(75, 10)" filter="url(#cardShadow)">
<rect x="-45" y="-95" width="90" height="190" rx="14" fill="#FFFFFF" stroke="#2563EB" stroke-width="1.8"/>
<rect x="-14" y="-87" width="28" height="6" rx="3" fill="#E2E8F0"/>
<rect x="-37" y="-74" width="74" height="154" rx="8" fill="url(#bgGrad)"/>
<circle cx="0" cy="-35" r="18" fill="url(#blueGrad)"/>
<rect x="-24" y="-8" width="48" height="6" rx="3" fill="#93C5FD"/>
<rect x="-18" y="4" width="36" height="5" rx="2.5" fill="#CBD5E1"/>
<rect x="-28" y="20" width="56" height="45" rx="4" fill="#FFFFFF" stroke="#E2E8F0"/>
<rect x="-15" y="86" width="30" height="3" rx="1.5" fill="#94A3B8"/>
</g>
<path d="M -45 -15 C -10 -50 30 -40 75 -25" fill="none" stroke="url(#cyanGrad)" stroke-width="2.5" stroke-linecap="round"/>
<path d="M 75 45 C 30 70 -20 60 -45 35" fill="none" stroke="url(#purpleGrad)" stroke-width="2" stroke-linecap="round" stroke-dasharray="5,3"/>
<circle cx="15" cy="-35" r="4" fill="#06B6D4" filter="url(#softGlow)"/>
<circle cx="12" cy="55" r="3.5" fill="#7C3AED" filter="url(#softGlow)"/>
<circle cx="-135" cy="40" r="3" fill="#2563EB"/>
<circle cx="145" cy="-20" r="3" fill="#06B6D4"/>
</g>
</svg>'''
# 3. 智能体开发
def build_service_agent():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "智")}
<g transform="translate(300, 190)">
<circle cx="0" cy="0" r="110" fill="#FAF5FF" opacity="0.7"/>
<circle cx="0" cy="0" r="80" fill="#EFF6FF" opacity="0.9"/>
<ellipse cx="0" cy="0" rx="170" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="6,4" transform="rotate(-25)"/>
<ellipse cx="0" cy="0" rx="170" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="6,4" transform="rotate(35)"/>
<circle cx="0" cy="0" r="130" fill="none" stroke="#CBD5E1" stroke-width="0.8"/>
<g transform="rotate(-25)">
<circle cx="-150" cy="0" r="6" fill="#7C3AED" filter="url(#softGlow)"/>
<circle cx="150" cy="0" r="5" fill="#2563EB"/>
</g>
<g transform="rotate(35)">
<circle cx="0" cy="-65" r="5.5" fill="#06B6D4" filter="url(#softGlow)"/>
<circle cx="0" cy="65" r="4.5" fill="#2563EB"/>
</g>
<polygon points="0,-60 52,-25 52,35 0,68 -52,35 -52,-25" fill="none" stroke="#93C5FD" stroke-width="1.2"/>
<polygon points="0,-40 35,-15 35,25 0,48 -35,25 -35,-15" fill="none" stroke="#C4B5FD" stroke-width="1"/>
<line x1="0" y1="-60" x2="0" y2="68" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="3,3"/>
<line x1="-52" y1="-25" x2="52" y2="35" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="3,3"/>
<line x1="-52" y1="35" x2="52" y2="-25" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="3,3"/>
<circle cx="0" cy="0" r="26" fill="url(#purpleGrad)" filter="url(#cardShadow)"/>
<circle cx="0" cy="0" r="18" fill="url(#blueGrad)"/>
<circle cx="0" cy="0" r="8" fill="#FFFFFF"/>
<circle cx="0" cy="-60" r="3.5" fill="#2563EB"/>
<circle cx="52" cy="-25" r="3.5" fill="#06B6D4"/>
<circle cx="52" cy="35" r="3.5" fill="#7C3AED"/>
<circle cx="0" cy="68" r="3.5" fill="#2563EB"/>
<circle cx="-52" cy="35" r="3.5" fill="#06B6D4"/>
<circle cx="-52" cy="-25" r="3.5" fill="#7C3AED"/>
</g>
</svg>'''
# 4. 商城系统
def build_product_mall():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "商")}
<g transform="translate(300, 195)">
<ellipse cx="0" cy="60" rx="190" ry="75" fill="none" stroke="#E2E8F0" stroke-width="1.5" stroke-dasharray="4,4"/>
<polygon points="0,-20 140,40 0,100 -140,40" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.5"/>
<polygon points="-140,40 0,100 0,116 -140,56" fill="#E2E8F0"/>
<polygon points="0,100 140,40 140,56 0,116" fill="#F1F5F9"/>
<g transform="translate(0, 5)" filter="url(#cardShadow)">
<polygon points="0,-32 40,-12 0,10 -40,-12" fill="url(#blueGrad)"/>
<polygon points="-40,-12 0,10 0,42 -40,20" fill="#1D4ED8"/>
<polygon points="0,10 40,-12 40,20 0,42" fill="#1E40AF"/>
</g>
<g transform="translate(-75, -20)" filter="url(#cardShadow)">
<polygon points="0,-24 30,-9 0,8 -30,-9" fill="url(#cyanGrad)"/>
<polygon points="-30,-9 0,8 0,30 -30,13" fill="#0891B2"/>
<polygon points="0,8 30,-9 30,13 0,30" fill="#0E7490"/>
</g>
<g transform="translate(75, -20)" filter="url(#cardShadow)">
<polygon points="0,-24 30,-9 0,8 -30,-9" fill="url(#purpleGrad)"/>
<polygon points="-30,-9 0,8 0,30 -30,13" fill="#6D28D9"/>
<polygon points="0,8 30,-9 30,13 0,30" fill="#5B21B6"/>
</g>
<g transform="translate(0, -75)" filter="url(#cardShadow)">
<polygon points="0,-18 22,-6 0,6 -22,-6" fill="url(#glassGrad)" stroke="#2563EB" stroke-width="1.2"/>
<polygon points="-22,-6 0,6 0,20 -22,8" fill="#DBEAFE"/>
<polygon points="0,6 22,-6 22,8 0,20" fill="#BFDBFE"/>
<circle cx="0" cy="0" r="3" fill="#2563EB"/>
</g>
<path d="M -75 -10 Q 0 -50 75 -10" fill="none" stroke="url(#blueGrad)" stroke-width="2" stroke-linecap="round"/>
<path d="M 75 10 Q 0 50 -75 10" fill="none" stroke="url(#cyanGrad)" stroke-width="1.8" stroke-linecap="round" stroke-dasharray="4,3"/>
<line x1="0" y1="-50" x2="0" y2="-25" stroke="#2563EB" stroke-width="1.5" stroke-dasharray="2,2"/>
<circle cx="-35" cy="-35" r="3.5" fill="#2563EB" opacity="0.6"/>
<circle cx="45" cy="-35" r="3" fill="#7C3AED" opacity="0.6"/>
</g>
</svg>'''
# 5. 收银系统
def build_product_pos():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "笃")}
<g transform="translate(300, 190)">
<circle cx="0" cy="0" r="140" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="4,4"/>
<circle cx="0" cy="0" r="110" fill="none" stroke="#CBD5E1" stroke-width="1.2"/>
<circle cx="0" cy="0" r="80" fill="#EFF6FF" opacity="0.7"/>
<path d="M 0 -85 L 55 -55 V 0 C 55 45 0 85 0 85 C 0 85 -55 45 -55 0 V -55 Z" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.5" filter="url(#cardShadow)"/>
<path d="M 0 -70 L 42 -45 V 0 C 42 35 0 68 0 68 C 0 68 -42 35 -42 0 V -45 Z" fill="none" stroke="#93C5FD" stroke-width="1"/>
<circle cx="0" cy="0" r="28" fill="url(#blueGrad)" filter="url(#softGlow)"/>
<circle cx="0" cy="0" r="14" fill="#FFFFFF"/>
<circle cx="0" cy="0" r="7" fill="#2563EB"/>
<line x1="-120" y1="0" x2="-28" y2="0" stroke="url(#cyanGrad)" stroke-width="2" stroke-linecap="round"/>
<circle cx="-120" cy="0" r="5" fill="#06B6D4"/>
<circle cx="-120" cy="0" r="9" fill="none" stroke="#06B6D4" stroke-width="1" opacity="0.5"/>
<line x1="28" y1="0" x2="120" y2="0" stroke="url(#blueGrad)" stroke-width="2" stroke-linecap="round"/>
<circle cx="120" cy="0" r="5" fill="#2563EB"/>
<circle cx="120" cy="0" r="9" fill="none" stroke="#2563EB" stroke-width="1" opacity="0.5"/>
<line x1="0" y1="-85" x2="0" y2="-120" stroke="#7C3AED" stroke-width="1.8" stroke-dasharray="3,3"/>
<circle cx="0" cy="-120" r="4.5" fill="#7C3AED"/>
</g>
</svg>'''
# 6. 进销存系统
def build_product_erp():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "准")}
<g transform="translate(300, 190)">
<ellipse cx="0" cy="65" rx="190" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,5"/>
<g transform="translate(-80, 20)" filter="url(#cardShadow)">
<polygon points="0,-30 38,-10 0,10 -38,-10" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.2"/>
<polygon points="-38,-10 0,10 0,40 -38,20" fill="#E2E8F0"/>
<polygon points="0,10 38,-10 38,20 0,40" fill="#F1F5F9"/>
<line x1="-19" y1="0" x2="19" y2="-20" stroke="#94A3B8" stroke-width="0.8"/>
<circle cx="0" cy="-10" r="3.5" fill="#2563EB"/>
</g>
<g transform="translate(80, 20)" filter="url(#cardShadow)">
<polygon points="0,-30 38,-10 0,10 -38,-10" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.2"/>
<polygon points="-38,-10 0,10 0,40 -38,20" fill="#E2E8F0"/>
<polygon points="0,10 38,-10 38,20 0,40" fill="#F1F5F9"/>
<circle cx="0" cy="-10" r="3.5" fill="#06B6D4"/>
</g>
<g transform="translate(0, -35)" filter="url(#cardShadow)">
<circle cx="0" cy="0" r="42" fill="none" stroke="#2563EB" stroke-width="1.2" stroke-dasharray="4,4"/>
<circle cx="0" cy="0" r="32" fill="url(#blueGrad)"/>
<circle cx="0" cy="0" r="14" fill="#FFFFFF"/>
<circle cx="0" cy="0" r="6" fill="#1D4ED8"/>
</g>
<path d="M -80 10 Q 0 -15 80 10" fill="none" stroke="url(#cyanGrad)" stroke-width="2" stroke-linecap="round"/>
<path d="M 80 30 Q 0 60 -80 30" fill="none" stroke="#2563EB" stroke-width="1.8" stroke-linecap="round" stroke-dasharray="5,3"/>
<line x1="0" y1="5" x2="0" y2="40" stroke="#CBD5E1" stroke-width="1.5" stroke-dasharray="3,3"/>
<circle cx="0" cy="40" r="3.5" fill="#7C3AED"/>
</g>
</svg>'''
# 7. SaaS版本
def build_product_saas():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "云")}
<g transform="translate(300, 190)">
<ellipse cx="0" cy="65" rx="195" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="6,4"/>
<g transform="translate(0, 55)" filter="url(#cardShadow)">
<polygon points="0,-25 110,12 0,48 -110,12" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.2"/>
<polygon points="-110,12 0,48 0,58 -110,22" fill="#E2E8F0"/>
<polygon points="0,48 110,12 110,22 0,58" fill="#F1F5F9"/>
<circle cx="-50" cy="12" r="3" fill="#2563EB"/>
<circle cx="50" cy="12" r="3" fill="#06B6D4"/>
</g>
<g transform="translate(0, 5)" filter="url(#cardShadow)">
<polygon points="0,-25 110,12 0,48 -110,12" fill="url(#glassGrad)" stroke="#93C5FD" stroke-width="1.2"/>
<polygon points="-110,12 0,48 0,58 -110,22" fill="#BFDBFE"/>
<polygon points="0,48 110,12 110,22 0,58" fill="#DBEAFE"/>
<circle cx="0" cy="12" r="5" fill="#2563EB" filter="url(#softGlow)"/>
</g>
<g transform="translate(0, -45)" filter="url(#cardShadow)">
<polygon points="0,-25 110,12 0,48 -110,12" fill="url(#glassGrad)" stroke="#C4B5FD" stroke-width="1.2"/>
<polygon points="-110,12 0,48 0,58 -110,22" fill="#DDD6FE"/>
<polygon points="0,48 110,12 110,22 0,58" fill="#EDE9FE"/>
<circle cx="0" cy="12" r="6" fill="#7C3AED" filter="url(#softGlow)"/>
</g>
<line x1="0" y1="-75" x2="0" y2="70" stroke="url(#blueGrad)" stroke-width="2.5" stroke-linecap="round"/>
<line x1="-60" y1="-30" x2="-60" y2="60" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="3,3"/>
<line x1="60" y1="-30" x2="60" y2="60" stroke="#CBD5E1" stroke-width="1" stroke-dasharray="3,3"/>
<circle cx="-130" cy="-20" r="4" fill="#06B6D4"/>
<circle cx="130" cy="-20" r="4" fill="#2563EB"/>
</g>
</svg>'''
# 8. 案例 1
def build_case_distrib():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "通")}
<g transform="translate(300, 190)">
<ellipse cx="0" cy="20" rx="200" ry="90" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
<circle cx="0" cy="0" r="45" fill="#EFF6FF" opacity="0.8"/>
<circle cx="0" cy="0" r="32" fill="url(#blueGrad)" filter="url(#cardShadow)"/>
<circle cx="0" cy="0" r="14" fill="#FFFFFF"/>
<circle cx="0" cy="0" r="6" fill="#1D4ED8"/>
<g transform="translate(-130, -35)">
<line x1="0" y1="0" x2="105" y2="28" stroke="#93C5FD" stroke-width="1.5" stroke-dasharray="4,3"/>
<circle cx="0" cy="0" r="20" fill="url(#glassGrad)" stroke="#2563EB" stroke-width="1.2"/>
<circle cx="0" cy="0" r="7" fill="#2563EB"/>
</g>
<g transform="translate(130, -35)">
<line x1="0" y1="0" x2="-105" y2="28" stroke="#93C5FD" stroke-width="1.5" stroke-dasharray="4,3"/>
<circle cx="0" cy="0" r="20" fill="url(#glassGrad)" stroke="#06B6D4" stroke-width="1.2"/>
<circle cx="0" cy="0" r="7" fill="#06B6D4"/>
</g>
<g transform="translate(-85, 65)">
<line x1="0" y1="0" x2="68" y2="-52" stroke="#CBD5E1" stroke-width="1.2"/>
<circle cx="0" cy="0" r="15" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1"/>
<circle cx="0" cy="0" r="5" fill="#7C3AED"/>
</g>
<g transform="translate(85, 65)">
<line x1="0" y1="0" x2="-68" y2="-52" stroke="#CBD5E1" stroke-width="1.2"/>
<circle cx="0" cy="0" r="15" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1"/>
<circle cx="0" cy="0" r="5" fill="#2563EB"/>
</g>
<path d="M -130 -35 Q 0 -80 130 -35" fill="none" stroke="url(#cyanGrad)" stroke-width="2" stroke-linecap="round"/>
</g>
</svg>'''
# 9. 案例 2
def build_case_catering():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "敏")}
<g transform="translate(300, 190)">
<ellipse cx="-80" cy="0" rx="80" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<ellipse cx="80" cy="0" rx="80" ry="70" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
<g transform="translate(-80, 0)" filter="url(#cardShadow)">
<circle cx="0" cy="0" r="36" fill="url(#blueGrad)"/>
<circle cx="0" cy="0" r="16" fill="#FFFFFF"/>
<circle cx="0" cy="0" r="7" fill="#1D4ED8"/>
</g>
<g transform="translate(80, 0)" filter="url(#cardShadow)">
<circle cx="0" cy="0" r="36" fill="url(#cyanGrad)"/>
<circle cx="0" cy="0" r="16" fill="#FFFFFF"/>
<circle cx="0" cy="0" r="7" fill="#0891B2"/>
</g>
<path d="M -44 -14 C -15 -35 15 -35 44 -14" fill="none" stroke="url(#blueGrad)" stroke-width="2.5" stroke-linecap="round"/>
<path d="M 44 14 C 15 35 -15 35 -44 14" fill="none" stroke="url(#cyanGrad)" stroke-width="2.5" stroke-linecap="round"/>
<circle cx="0" cy="-28" r="4.5" fill="#2563EB" filter="url(#softGlow)"/>
<circle cx="0" cy="28" r="4.5" fill="#06B6D4" filter="url(#softGlow)"/>
<circle cx="-160" cy="-30" r="3.5" fill="#CBD5E1"/>
<circle cx="-160" cy="30" r="3.5" fill="#CBD5E1"/>
<circle cx="160" cy="-30" r="3.5" fill="#CBD5E1"/>
<circle cx="160" cy="30" r="3.5" fill="#CBD5E1"/>
</g>
</svg>'''
# 10. 案例 3
def build_case_manufacture():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "精")}
<g transform="translate(300, 190)">
<circle cx="0" cy="0" r="130" fill="none" stroke="#E2E8F0" stroke-width="1" stroke-dasharray="6,4"/>
<circle cx="0" cy="0" r="100" fill="none" stroke="#CBD5E1" stroke-width="1.2"/>
<circle cx="0" cy="0" r="70" fill="#EFF6FF" opacity="0.6"/>
<line x1="-120" y1="0" x2="120" y2="0" stroke="#CBD5E1" stroke-width="0.8"/>
<line x1="0" y1="-120" x2="0" y2="120" stroke="#CBD5E1" stroke-width="0.8"/>
<line x1="-85" y1="-85" x2="85" y2="85" stroke="#E2E8F0" stroke-width="0.8" stroke-dasharray="3,3"/>
<line x1="-85" y1="85" x2="85" y2="-85" stroke="#E2E8F0" stroke-width="0.8" stroke-dasharray="3,3"/>
<g filter="url(#cardShadow)">
<polygon points="0,-40 38,-15 38,25 0,50 -38,25 -38,-15" fill="url(#glassGrad)" stroke="#2563EB" stroke-width="1.5"/>
<circle cx="0" cy="5" r="22" fill="url(#blueGrad)"/>
<circle cx="0" cy="5" r="10" fill="#FFFFFF"/>
<circle cx="0" cy="5" r="4" fill="#1D4ED8"/>
</g>
<circle cx="0" cy="-100" r="5" fill="#2563EB"/>
<circle cx="100" cy="0" r="5" fill="#06B6D4"/>
<circle cx="0" cy="100" r="5" fill="#7C3AED"/>
<circle cx="-100" cy="0" r="5" fill="#2563EB"/>
</g>
</svg>'''
# 11. 案例 4
def build_case_gov_agent():
return f'''<svg width="600" height="380" viewBox="0 0 600 380" fill="none" xmlns="http://www.w3.org/2000/svg">
<defs>
{COMMON_DEFS}
</defs>
<rect width="600" height="380" rx="8" fill="url(#bgGrad)"/>
<rect width="600" height="380" rx="8" fill="url(#lattice)" opacity="0.65"/>
<rect x="1" y="1" width="598" height="378" rx="7" fill="none" stroke="#E2E8F0" stroke-width="1.5"/>
{make_seal(554, 20, "安")}
<g transform="translate(300, 190)">
<polygon points="0,-120 104,-60 104,60 0,120 -104,60 -104,-60" fill="none" stroke="#E2E8F0" stroke-width="1.2" stroke-dasharray="5,4"/>
<polygon points="0,-95 82,-47 82,47 0,95 -82,47 -82,-47" fill="url(#glassGrad)" stroke="#CBD5E1" stroke-width="1.5" opacity="0.7"/>
<circle cx="0" cy="0" r="62" fill="#FAF5FF" opacity="0.8"/>
<circle cx="0" cy="0" r="50" fill="none" stroke="#7C3AED" stroke-width="1.2" stroke-dasharray="4,4"/>
<g filter="url(#cardShadow)">
<circle cx="0" cy="0" r="32" fill="url(#purpleGrad)"/>
<circle cx="0" cy="0" r="20" fill="url(#blueGrad)"/>
<circle cx="0" cy="0" r="9" fill="#FFFFFF"/>
</g>
<circle cx="0" cy="-95" r="4.5" fill="#2563EB"/>
<circle cx="82" cy="-47" r="4.5" fill="#7C3AED"/>
<circle cx="82" cy="47" r="4.5" fill="#06B6D4"/>
<circle cx="0" cy="95" r="4.5" fill="#2563EB"/>
<circle cx="-82" cy="47" r="4.5" fill="#7C3AED"/>
<circle cx="-82" cy="-47" r="4.5" fill="#06B6D4"/>
</g>
</svg>'''
def generate_all():
showcases = {
'service_middle.svg': build_service_middle(),
'service_app.svg': build_service_app(),
'service_agent.svg': build_service_agent(),
'product_mall.svg': build_product_mall(),
'product_pos.svg': build_product_pos(),
'product_erp.svg': build_product_erp(),
'product_saas.svg': build_product_saas(),
'case_distrib.svg': build_case_distrib(),
'case_catering.svg': build_case_catering(),
'case_manufacture.svg': build_case_manufacture(),
'case_gov_agent.svg': build_case_gov_agent(),
}
for filename, content in showcases.items():
filepath = os.path.join(TARGET_DIR, filename)
with open(filepath, 'w', encoding='utf-8') as f:
f.write(content.strip())
print(f"Generated concise showcase: {filename} ({len(content)} bytes)")
if __name__ == '__main__':
generate_all()