diff --git a/static/css/style.css b/static/css/style.css index 506ded9..5e381c1 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -134,12 +134,128 @@ a:hover { color: var(--primary-dark); } .specs-table th, .specs-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-color); } .specs-table th { background: var(--bg-color); width: 30%; color: var(--title-color); font-weight: 500; } +/* ===== 客户分布地图 ===== */ +.map-wrapper { + display: flex; + gap: 20px; + height: 600px; +} +.map-container { + flex: 1; + height: 600px; + border-radius: 12px; + overflow: hidden; + box-shadow: 0 2px 12px rgba(0,0,0,0.08); +} #customer-map { width: 100%; - height: 600px; - border-radius: 8px; + height: 100%; z-index: 1; } +.customer-list-panel { + width: 320px; + height: 600px; + flex-shrink: 0; + background: #fff; + border-radius: 12px; + box-shadow: 0 2px 12px rgba(0,0,0,0.08); + overflow: hidden; + display: flex; + flex-direction: column; +} +.customer-list-header { + padding: 16px 20px; + border-bottom: 1px solid #eef0f4; + background: #fafbfc; + flex-shrink: 0; +} +.customer-list-header h5 { + margin: 0; + color: var(--title-color); + font-size: 1rem; +} +.customer-list-header .count { + color: var(--text-secondary); + font-size: 0.8rem; + margin-left: 8px; +} +.customer-list { + flex: 1 1 auto; + overflow-y: auto; + list-style: none; + padding: 0; + margin: 0; + height: 0; +} +.customer-list li { + padding: 14px 20px; + border-bottom: 1px solid #f3f5f8; + cursor: pointer; + display: flex; + align-items: center; + gap: 12px; + transition: background 0.2s; +} +.customer-list li:hover { + background: #f7f9fc; +} +.customer-list li.active { + background: #eef4ff; +} +.customer-index { + width: 28px; + height: 28px; + border-radius: 50%; + background: var(--primary); + color: #fff; + font-size: 0.8rem; + font-weight: 600; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} +.customer-name { + flex: 1; + color: var(--title-color); + font-size: 0.9rem; + line-height: 1.4; +} +.numbered-marker { + background: var(--primary); + color: #fff; + border-radius: 50%; + width: 32px; + height: 32px; + display: flex; + align-items: center; + justify-content: center; + font-weight: 600; + font-size: 0.8rem; + border: 2px solid #fff; + box-shadow: 0 2px 6px rgba(0,0,0,0.3); +} + +.leaflet-popup-content-wrapper { border-radius: 8px; } +.leaflet-popup-content { margin: 12px 16px; } +.leaflet-popup-content h6 { margin-bottom: 4px; color: var(--title-color); } +.leaflet-popup-content p { margin-bottom: 0; color: var(--text-secondary); font-size: 0.875rem; } + +@media (max-width: 992px) { + .map-wrapper { + flex-direction: column; + height: auto; + } + .map-container { + height: 400px; + flex: none; + } + .customer-list-panel { + width: 100%; + height: 300px; + flex: none; + } +} .contact-form .form-control { border-radius: 8px; padding: 0.75rem 1rem; } .contact-form textarea.form-control { resize: vertical; min-height: 120px; } @@ -155,7 +271,6 @@ a:hover { color: var(--primary-dark); } .banner-carousel .carousel-caption { bottom: 20%; text-align: center; left: 10%; right: 10%; } .banner-carousel .carousel-caption h1 { font-size: 1.25rem; } .banner-carousel .carousel-caption p { font-size: 0.875rem; margin-bottom: 1rem; } - #customer-map { height: 400px; } h1 { font-size: 1.5rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.1rem; } diff --git a/templates/customers/map.html b/templates/customers/map.html index 6d2c9c3..9d7a78a 100644 --- a/templates/customers/map.html +++ b/templates/customers/map.html @@ -5,127 +5,6 @@ {% block extra_css %} - {% endblock %} {% block content %}