|
@@ -0,0 +1,803 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="zh-CN">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>AI室内设计智能出图系统</title>
|
|
|
+ <link href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/theme-chalk/index.css" rel="stylesheet">
|
|
|
+ <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
|
|
|
+ <style>
|
|
|
+ * {
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ box-sizing: border-box;
|
|
|
+ }
|
|
|
+
|
|
|
+ body {
|
|
|
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
|
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
|
+ min-height: 100vh;
|
|
|
+ }
|
|
|
+
|
|
|
+ .container {
|
|
|
+ display: flex;
|
|
|
+ height: 100vh;
|
|
|
+ max-width: 1400px;
|
|
|
+ margin: 0 auto;
|
|
|
+ padding: 20px;
|
|
|
+ gap: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel {
|
|
|
+ background: rgba(255, 255, 255, 0.95);
|
|
|
+ border-radius: 16px;
|
|
|
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
|
|
|
+ backdrop-filter: blur(10px);
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.2);
|
|
|
+ overflow: hidden;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel:hover {
|
|
|
+ transform: translateY(-2px);
|
|
|
+ box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
|
|
|
+ }
|
|
|
+
|
|
|
+ .left-panel {
|
|
|
+ flex: 0 0 320px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .middle-panel {
|
|
|
+ flex: 0 0 350px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .right-panel {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-header {
|
|
|
+ background: linear-gradient(45deg, #4CAF50, #45a049);
|
|
|
+ color: white;
|
|
|
+ padding: 20px;
|
|
|
+ text-align: center;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-header::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: -50%;
|
|
|
+ left: -50%;
|
|
|
+ width: 200%;
|
|
|
+ height: 200%;
|
|
|
+ background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
|
|
|
+ transform: rotate(45deg);
|
|
|
+ animation: shine 3s infinite;
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes shine {
|
|
|
+ 0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
|
|
|
+ 100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-header h3 {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: 600;
|
|
|
+ margin: 0;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-header .subtitle {
|
|
|
+ font-size: 12px;
|
|
|
+ opacity: 0.9;
|
|
|
+ margin-top: 5px;
|
|
|
+ position: relative;
|
|
|
+ z-index: 1;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-content {
|
|
|
+ flex: 1;
|
|
|
+ padding: 20px;
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-section {
|
|
|
+ margin-bottom: 25px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .section-title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ padding-bottom: 8px;
|
|
|
+ border-bottom: 2px solid #4CAF50;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+
|
|
|
+ .section-title::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ bottom: -2px;
|
|
|
+ left: 0;
|
|
|
+ width: 30px;
|
|
|
+ height: 2px;
|
|
|
+ background: #2196F3;
|
|
|
+ }
|
|
|
+
|
|
|
+ .tag-group {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 8px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-tag {
|
|
|
+ padding: 8px 16px;
|
|
|
+ border-radius: 20px;
|
|
|
+ border: 2px solid #e0e0e0;
|
|
|
+ background: white;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ font-size: 13px;
|
|
|
+ color: #666;
|
|
|
+ position: relative;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-tag::before {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ left: -100%;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ background: linear-gradient(90deg, transparent, rgba(76,175,80,0.1), transparent);
|
|
|
+ transition: left 0.5s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-tag:hover::before {
|
|
|
+ left: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-tag:hover {
|
|
|
+ transform: translateY(-2px);
|
|
|
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
|
+ }
|
|
|
+
|
|
|
+ .requirement-tag.selected {
|
|
|
+ background: linear-gradient(45deg, #4CAF50, #45a049);
|
|
|
+ color: white;
|
|
|
+ border-color: #4CAF50;
|
|
|
+ transform: scale(1.05);
|
|
|
+ }
|
|
|
+
|
|
|
+ .indicator-item {
|
|
|
+ background: #f8f9fa;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 15px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ border-left: 4px solid #4CAF50;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .indicator-item:hover {
|
|
|
+ background: #e8f5e8;
|
|
|
+ transform: translateX(5px);
|
|
|
+ }
|
|
|
+
|
|
|
+ .indicator-title {
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .indicator-value {
|
|
|
+ color: #666;
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 1.4;
|
|
|
+ }
|
|
|
+
|
|
|
+ .progress-bar {
|
|
|
+ width: 100%;
|
|
|
+ height: 6px;
|
|
|
+ background: #e0e0e0;
|
|
|
+ border-radius: 3px;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-top: 8px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .progress-fill {
|
|
|
+ height: 100%;
|
|
|
+ background: linear-gradient(45deg, #4CAF50, #2196F3);
|
|
|
+ border-radius: 3px;
|
|
|
+ transition: width 0.5s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .solution-preview {
|
|
|
+ background: #f8f9fa;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 20px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ text-align: center;
|
|
|
+ min-height: 200px;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ border: 2px dashed #ddd;
|
|
|
+ transition: allall 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .solution-preview.active {
|
|
|
+ border-color: #4CAF50;
|
|
|
+ background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
|
|
|
+ }
|
|
|
+
|
|
|
+ .preview-icon {
|
|
|
+ font-size: 48px;
|
|
|
+ color: #ccc;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .solution-preview.active .preview-icon {
|
|
|
+ color: #4CAF50;
|
|
|
+ animation: pulse 2s infinite;
|
|
|
+ }
|
|
|
+
|
|
|
+ @keyframes pulse {
|
|
|
+ 0% { transform: scale(1); }
|
|
|
+ 50% { transform: scale(1.1); }
|
|
|
+ 100% { transform: scale(1); }
|
|
|
+ }
|
|
|
+
|
|
|
+ .preview-text {
|
|
|
+ color: #666;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .solution-preview.active .preview-text {
|
|
|
+ color: #333;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
+
|
|
|
+ .solution-details {
|
|
|
+ background: white;
|
|
|
+ border-radius: 12px;
|
|
|
+ padding: 20px;
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail-title {
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-size: 15px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .detail-content {
|
|
|
+ color: #666;
|
|
|
+ font-size: 13px;
|
|
|
+ line-height: 1.5;
|
|
|
+ }
|
|
|
+
|
|
|
+ .color-palette {
|
|
|
+ display: flex;
|
|
|
+ gap: 8px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .color-item {
|
|
|
+ width: 30px;
|
|
|
+ height: 30px;
|
|
|
+ border-radius: 50%;
|
|
|
+ border: 2px solid white;
|
|
|
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
|
+ transition: transform 0.3s ease;
|
|
|
+ }
|
|
|
+
|
|
|
+ .color-item:hover {
|
|
|
+ transform: scale(1.2);
|
|
|
+ }
|
|
|
+
|
|
|
+ .material-list {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 8px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .material-tag {
|
|
|
+ background: #e3f2fd;
|
|
|
+ color: #1976d2;
|
|
|
+ padding: 4px 8px;
|
|
|
+ border-radius: 12px;
|
|
|
+ font-size: 12px;
|
|
|
+ border: 1px solid #bbdefb;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stats-grid {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: 1fr 1fr;
|
|
|
+ gap: 15px;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stat-item {
|
|
|
+ background: white;
|
|
|
+ padding: 15px;
|
|
|
+ border-radius: 8px;
|
|
|
+ text-align: center;
|
|
|
+ border: 1px solid #e0e0e0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stat-number {
|
|
|
+ font-size: 24px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #4CAF50;
|
|
|
+ }
|
|
|
+
|
|
|
+ .stat-label {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #666;
|
|
|
+ margin-top: 5px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .floating-button {
|
|
|
+ position: fixed;
|
|
|
+ bottom: 30px;
|
|
|
+ right: 30px;
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ background: linear-gradient(45deg, #4CAF50, #45a049);
|
|
|
+ border-radius: 50%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ color: white;
|
|
|
+ font-size: 24px;
|
|
|
+ cursor: pointer;
|
|
|
+ box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
|
|
|
+ transition: all 0.3s ease;
|
|
|
+ z-index: 1000;
|
|
|
+ }
|
|
|
+
|
|
|
+ .floating-button:hover {
|
|
|
+ transform: scale(1.1);
|
|
|
+ box-shadow: 0 6px 25px rgba(76, 175, 80, 0.6);
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 滚动条样式 */
|
|
|
+ .panel-content::-webkit-scrollbar {
|
|
|
+ width: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-content::-webkit-scrollbar-track {
|
|
|
+ background: #f1f1f1;
|
|
|
+ border-radius: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-content::-webkit-scrollbar-thumb {
|
|
|
+ background: #4CAF50;
|
|
|
+ border-radius: 3px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .panel-content::-webkit-scrollbar-thumb:hover {
|
|
|
+ background: #45a049;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 响应式设计 */
|
|
|
+ @media (max-width: 1200px) {
|
|
|
+ .container {
|
|
|
+ flex-direction: column;
|
|
|
+ height: auto;
|
|
|
+ min-height: 100vh;
|
|
|
+ }
|
|
|
+
|
|
|
+ .left-panel, .middle-panel, .right-panel {
|
|
|
+ flex: none;
|
|
|
+ min-height: 400px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <div class="container">
|
|
|
+ <!-- 左栏:抽象需求 -->
|
|
|
+ <div class="panel left-panel">
|
|
|
+ <div class="panel-header">
|
|
|
+ <h3><i class="fas fa-lightbulb"></i> 抽象需求输入</h3>
|
|
|
+ <div class="subtitle">业主需求 → 标准化提取</div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-content">
|
|
|
+ <div class="requirement-section">
|
|
|
+ <div class="section-title">氛围需求</div>
|
|
|
+ <div class="tag-group">
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="温馨">温馨</div>
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="科技感">科技感</div>
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="活力">活力</div>
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="浪漫">浪漫</div>
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="极简">极简</div>
|
|
|
+ <div class="requirement-tag" data-category="atmosphere" data-value="奢华">奢华</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="requirement-section">
|
|
|
+ <div class="section-title">居住者类型</div>
|
|
|
+ <div class="tag-group">
|
|
|
+ <div class="requirement-tag" data-category="resident" data-value="单身女性">单身女性</div>
|
|
|
+ <div class="requirement-tag" data-category="resident" data-value="单身男性">单身男性</div>
|
|
|
+ <div class="requirement-tag" data-category="resident" data-value="年轻情侣">年轻情侣</div>
|
|
|
+ <div class="requirement-tag" data-category="resident" data-value="亲子家庭">亲子家庭</div>
|
|
|
+ <div class="requirement-tag" data-category="resident" data-value="三代同堂">三代同堂</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="requirement-section">
|
|
|
+ <div class="section-title">场景偏好</div>
|
|
|
+ <div class="tag-group">
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="居家办公">居家办公</div>
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="运动健身">运动健身</div>
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="观影娱乐">观影娱乐</div>
|
|
|
+ <div class="requirement-tag"data-category="scene" data-value="烹饪美食">烹饪美食</div>
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="阅读学习">阅读学习</div>
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="聚会社交">聚会社交</div>
|
|
|
+ <div class="requirement-tag" data-category="scene" data-value="艺术创作">艺术创作</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="requirement-section">
|
|
|
+ <div class="section-title">空间类型</div>
|
|
|
+ <div class="tag-group">
|
|
|
+ <div class="requirement-tag" data-category="space" data-value="客厅">客厅</div>
|
|
|
+ <div class="requirement-tag" data-category="space" data-value="卧室">卧室</div>
|
|
|
+ <div class="requirement-tag" data-category="space" data-value="厨房">厨房</div>
|
|
|
+ <div class="requirement-tag" data-category="space" data-value="书房">书房</div>
|
|
|
+ <div class="requirement-tag" data-category="space" data-value="儿童房">儿童房</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 中栏:具体指标 -->
|
|
|
+ <div class="panel middle-panel">
|
|
|
+ <div class="panel-header">
|
|
|
+ <h3><i class="fas fa-cogs"></i> 指标量化分析</h3>
|
|
|
+ <div class="subtitle">需求 → 可执行指标</div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-content">
|
|
|
+ <div id="indicators-container">
|
|
|
+ <div class="indicator-item" style="opacity: 0.5;">
|
|
|
+ <div class="indicator-title">请先选择左侧需求</div>
|
|
|
+ <div class="indicator-value">系统将自动生成对应的量化指标</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 右栏:具体方案 -->
|
|
|
+ <div class="panel right-panel">
|
|
|
+ <div class="panel-header">
|
|
|
+ <h3><i class="fas fa-magic"></i> 方案生成预览</h3>
|
|
|
+ <div class="subtitle">指标 → 可视化效果</div>
|
|
|
+ </div>
|
|
|
+ <div class="panel-content">
|
|
|
+ <div class="solution-preview" id="solution-preview">
|
|
|
+ <div class="preview-icon">
|
|
|
+ <i class="fas fa-image"></i>
|
|
|
+ </div>
|
|
|
+ <div class="preview-text">选择需求和指标后,这里将展示设计方案预览</div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div id="solution-details" style="display: none;">
|
|
|
+ <div class="solution-details">
|
|
|
+ <div class="detail-title">色彩方案</div>
|
|
|
+ <div class="detail-content" id="color-scheme">
|
|
|
+ <div class="color-palette" id="color-palette"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="solution-details">
|
|
|
+ <div class="detail-title">材质搭配</div>
|
|
|
+ <div class="detail-content">
|
|
|
+ <div class="material-list" id="material-list"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="solution-details">
|
|
|
+ <div class="detail-title">空间布局</div>
|
|
|
+ <div class="detail-content" id="layout-description"></div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="solution-details">
|
|
|
+ <div class="detail-title">灯光设计</div>
|
|
|
+ <div class="detail-content" id="lighting-description"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="stats-grid" id="stats-grid" style="display: none;">
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-number" id="completion-rate">0%</div>
|
|
|
+ <div class="stat-label">完成度</div>
|
|
|
+ </div>
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-number" id="match-score">0</div>
|
|
|
+ <div class="stat-label">匹配度</div>
|
|
|
+ </div>
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-number" id="render-time">0分钟</div>
|
|
|
+ <div class="stat-label">预计渲染时间</div>
|
|
|
+ </div>
|
|
|
+ <div class="stat-item">
|
|
|
+ <div class="stat-number" id="cost-estimate">¥0</div>
|
|
|
+ <div class="stat-label">预估成本</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="floating-button" onclick="generateFinalSolution()">
|
|
|
+ <i class="fas fa-play"></i>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.14/vue.min.js"></script>
|
|
|
+ <script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.13/index.js"></script>
|
|
|
+ <script>
|
|
|
+ // 需求数据配置
|
|
|
+ const requirementData = {
|
|
|
+ atmosphere: {
|
|
|
+ '温馨': {
|
|
|
+ color: { main: '暖色调(2700-3000K)', rgb: 'RGB(255,220,150)', accent: '暖木色点缀' },
|
|
|
+ material: ['布艺60%', '木材30%', '金属10%'],
|
|
|
+ lighting: '吊灯+氛围灯带(200-300lux)',
|
|
|
+ layout: '圆润弧形家具,留白25-30%'
|
|
|
+ },
|
|
|
+ '科技感': {
|
|
|
+ color: { main: '冷色调(5000-6000K)', rgb: 'RGB(150,200,250)', accent: '金属质感' },
|
|
|
+ material: ['金属50%', '岩板30%', '玻璃20%'],
|
|
|
+ lighting: '嵌入式无主灯(300-400lux)',
|
|
|
+ layout: '直线条家具,留白35-40%'
|
|
|
+ },
|
|
|
+ '活力': {
|
|
|
+ color: { main: '浅灰基调', rgb: 'RGB(240,240,240)', accent: '橙色点缀12-15%' },
|
|
|
+ material: ['布艺40%', '金属30%', '木材30%'],
|
|
|
+ lighting: '混合光源(250-350lux)',
|
|
|
+ layout: '直线+局部弧形,动感布局'
|
|
|
+ },
|
|
|
+ '浪漫': {
|
|
|
+ color: { main: '粉调暖色', rgb: 'RGB(255,240,245)', accent: '玫瑰金点缀' },
|
|
|
+ material: ['布艺70%', '大理石20%', '金属10%'],
|
|
|
+ lighting: '柔和漫射光(180-250lux)',
|
|
|
+ layout: '弧形元素为主,层次丰富'
|
|
|
+ },
|
|
|
+ '极简': {
|
|
|
+ color: { main: '纯白基调', rgb: 'RGB(255,255,255)', accent: '黑色线条' },
|
|
|
+ material: ['岩板40%', '木材30%', '金属30%'],
|
|
|
+ lighting: '隐藏式线性光(200-300lux)',
|
|
|
+ layout: '几何线条,大面积留白40%+'
|
|
|
+ },
|
|
|
+ '奢华': {
|
|
|
+ color: { main: '深色基调', rgb: 'RGB(30,30,40)', accent: '金色装饰' },
|
|
|
+ material: ['大理石50%', '真皮30%', '金属20%'],
|
|
|
+ lighting: '水晶吊灯+重点照明(400-500lux)',
|
|
|
+ layout: '对称布局,精致细节'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ // 选中的需求
|
|
|
+ let selectedRequirements = {
|
|
|
+ atmosphere: null,
|
|
|
+ resident: null,
|
|
|
+ scene: null,
|
|
|
+ space: null
|
|
|
+ };
|
|
|
+
|
|
|
+ // 初始化事件监听
|
|
|
+ document.addEventListener('DOMContentLoaded', function() {
|
|
|
+ const tags = document.querySelectorAll('.requirement-tag');
|
|
|
+ tags.forEach(tag => {
|
|
|
+ tag.addEventListener('click', function() {
|
|
|
+ const category = this.dataset.category;
|
|
|
+ const value = this.dataset.value;
|
|
|
+
|
|
|
+ // 取消同类别其他选中
|
|
|
+ document.querySelectorAll(`[data-category="${category}"]`).forEach(t => {
|
|
|
+ t.classList.remove('selected');
|
|
|
+ });
|
|
|
+
|
|
|
+ // 选中当前标签
|
|
|
+ this.classList.add('selected');
|
|
|
+ selectedRequirements[category] = value;
|
|
|
+
|
|
|
+ // 更新指标和方案
|
|
|
+ updateIndicators();
|
|
|
+ updateSolution();
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ // 更新指标显示
|
|
|
+ function updateIndicators() {
|
|
|
+ const container = document.getElementById('indicators-container');
|
|
|
+ container.innerHTML = '';
|
|
|
+
|
|
|
+ if (!selectedRequirements.atmosphere) {
|
|
|
+ container.innerHTML = '<div class="indicator-item" style="opacity: 0.5;"><div class="indicator-title">请先选择氛围需求</div><div class="indicator-value">系统将自动生成对应的量化指标</div></div>';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const data = requirementData.atmosphere[selectedRequirements.atmosphere];
|
|
|
+ if (!data) return;
|
|
|
+
|
|
|
+ // 色彩指标
|
|
|
+ const colorIndicator = document.createElement('div');
|
|
|
+ colorIndicator.className = 'indicator-item';
|
|
|
+ colorIndicator.innerHTML = `
|
|
|
+ <div class="indicator-title">色彩体系</div>
|
|
|
+ <div class="indicator-value">
|
|
|
+ 主色调: ${data.color.main}<br>
|
|
|
+ RGB值: ${data.color.rgb}<br>
|
|
|
+ 点缀色: ${data.color.accent}
|
|
|
+ </div>
|
|
|
+ <div class="progress-bar">
|
|
|
+ <div class="progress-fill" style="width: 85%"></div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ container.appendChild(colorIndicator);
|
|
|
+
|
|
|
+ // 材质指标
|
|
|
+ const materialIndicator = document.createElement('div');
|
|
|
+ materialIndicator.className = 'indicator-item';
|
|
|
+ materialIndicator.innerHTML = `
|
|
|
+ <div class="indicator-title">材质配比</div>
|
|
|
+ <div class="indicator-value">
|
|
|
+ ${data.material.join('<br>')}
|
|
|
+ </div>
|
|
|
+ <div class="progress-bar">
|
|
|
+ <div class="progress-fill" style="width: 92%"></div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ container.appendChild(materialIndicator);
|
|
|
+
|
|
|
+ // 灯光指标
|
|
|
+ const lightingIndicator = document.createElement('div');
|
|
|
+ lightingIndicator.className = 'indicator-item';
|
|
|
+ lightingIndicator.innerHTML = `
|
|
|
+ <div class="indicator-title">灯光设计</div>
|
|
|
+ <div class="indicator-value">${data.lighting}</div>
|
|
|
+ <div class="progress-bar">
|
|
|
+ <div class="progress-fill" style="width: 78%"></div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ container.appendChild(lightingIndicator);
|
|
|
+
|
|
|
+ // 空间结构指标
|
|
|
+ const layoutIndicator = document.createElement('div');
|
|
|
+ layoutIndicator.className = 'indicator-item';
|
|
|
+ layoutIndicator.innerHTML = `
|
|
|
+ <div class="indicator-title">空间结构</div>
|
|
|
+ <div class="indicator-value">${data.layout}</div>
|
|
|
+ <div class="progress-bar">
|
|
|
+ <div class="progress-fill" style="width: 88%"></div>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+ container.appendChild(layoutIndicator);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新方案显示
|
|
|
+ function updateSolution() {
|
|
|
+ const preview = document.getElementById('solution-preview');
|
|
|
+ const details = document.getElementById('solution-details');
|
|
|
+ const stats = document.getElementById('stats-grid');
|
|
|
+
|
|
|
+ if (!selectedRequirements.atmosphere) {
|
|
|
+ preview.classList.remove('active');
|
|
|
+ details.style.display = 'none';
|
|
|
+ stats.style.display = 'none';
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ preview.classList.add('active');
|
|
|
+ details.style.display = 'block';
|
|
|
+ stats.style.display = 'grid';
|
|
|
+
|
|
|
+ const data = requirementData.atmosphere[selectedRequirements.atmosphere];
|
|
|
+ if (!data) return;
|
|
|
+
|
|
|
+ // 更新色彩方案
|
|
|
+ const colorPalette = document.getElementById('color-palette');
|
|
|
+ const colors = getColorsFromAtmosphere(selectedRequirements.atmosphere);
|
|
|
+ colorPalette.innerHTML = colors.map(color =>
|
|
|
+ `<div class="color-item" style="background: ${color}"></div>`
|
|
|
+ ).join('');
|
|
|
+
|
|
|
+ // 更新材质列表
|
|
|
+ const materialList = document.getElementById('material-list');
|
|
|
+ materialList.innerHTML = data.material.map(material =>
|
|
|
+ `<span class="material-tag">${material}</span>`
|
|
|
+ ).join('');
|
|
|
+
|
|
|
+ // 更新布局描述
|
|
|
+ document.getElementById('layout-description').textContent = data.layout;
|
|
|
+
|
|
|
+ // 更新灯光描述
|
|
|
+ document.getElementById('lighting-description').textContent = data.lighting;
|
|
|
+
|
|
|
+ // 更新统计数据
|
|
|
+ updateStats();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取氛围对应的色彩
|
|
|
+ function getColorsFromAtmosphere(atmosphere) {
|
|
|
+ const colorMaps = {
|
|
|
+ '温馨': ['#FFD700', '#DEB887', '#8B4513', '#CD853F'],
|
|
|
+ '科技感': ['#4169E1', '#87CEEB', '#708090', '#C0C0C0'],
|
|
|
+ '活力': ['#FF6347', '#FFA500', '#32CD32', '#FF1493'],
|
|
|
+ '浪漫': ['#FFB6C1', '#FFC0CB', '#DDA0DD', '#F0E68C'],
|
|
|
+ '极简': ['#FFFFFF', '#F5F5F5', '#DCDCDC', '#000000'],
|
|
|
+ '奢华': ['#800080', '#DAA520', '#8B0000', '#2F4F4F']
|
|
|
+ };
|
|
|
+ return colorMaps[atmosphere] || ['#CCCCCC', '#DDDDDD', '#EEEEEE', '#FFFFFF'];
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新统计数据
|
|
|
+ function updateStats() {
|
|
|
+ const selectedCount = Object.values(selectedRequirements).filter(v => v !== null).length;
|
|
|
+ const completionRate = Math.round((selectedCount / 4) * 100);
|
|
|
+
|
|
|
+ document.getElementById('completion-rate').textContent = completionRate + '%';
|
|
|
+ document.getElementById('match-score').textContent = Math.round(85 + Math.random() * 10);
|
|
|
+ document.getElementById('render-time').textContent = Math.round(5 + Math.random() * 10) + '分钟';
|
|
|
+ document.getElementById('cost-estimate').textContent = '¥' + Math.round(800 + Math.random() * 400);
|
|
|
+ }
|
|
|
+
|
|
|
+ // 生成最终方案
|
|
|
+ function generateFinalSolution() {
|
|
|
+ const selectedCount = Object.values(selectedRequirements).filter(v => v !== null).length;
|
|
|
+
|
|
|
+ if (selectedCount === 0) {
|
|
|
+ alert('请先选择需求标签');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const button = document.querySelector('.floating-button');
|
|
|
+ button.innerHTML = '<i class="fas fa-spinner fa-spin"></i>';
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ button.innerHTML = '<i class="fas fa-check"></i>';
|
|
|
+
|
|
|
+ // 模拟生成效果图
|
|
|
+ const preview = document.getElementById('solution-preview');
|
|
|
+ preview.innerHTML = `
|
|
|
+ <div class="preview-icon" style="color: #4CAF50;">
|
|
|
+ <i class="fas fa-home"></i>
|
|
|
+ </div>
|
|
|
+ <div class="preview-text" style="color: #333; font-weight: 500;">
|
|
|
+ ${selectedRequirements.atmosphere || '现代'}风格方案生成完成!<br>
|
|
|
+ <small>点击查看4K高清效果图</small>
|
|
|
+ </div>
|
|
|
+ `;
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ button.innerHTML = '<i class="fas fa-play"></i>';
|
|
|
+ }, 2000);
|
|
|
+
|
|
|
+ alert(`方案生成成功!\n已选择: ${Object.entries(selectedRequirements).filter(([k,v]) => v).map(([k,v]) => v).join(', ')}`);
|
|
|
+ }, 2000);
|
|
|
+ }
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|