|
|
|
|
@ -0,0 +1,936 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="quick-plan">
|
|
|
|
|
<!-- ========== List View ========== -->
|
|
|
|
|
<template v-if="viewMode === 'list'">
|
|
|
|
|
<div class="quick-header">
|
|
|
|
|
<button class="back-btn" @click="goBack" v-if="allSchemes.length > 0">返回</button>
|
|
|
|
|
<h1>快速规划</h1>
|
|
|
|
|
<p>输入目的地和天数,立即生成多个旅行方案</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Input form -->
|
|
|
|
|
<div v-if="allSchemes.length === 0" class="quick-form">
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>目的地</label>
|
|
|
|
|
<input v-model="destination" placeholder="如:云南、贵州、四川" :disabled="isGenerating" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>出行天数</label>
|
|
|
|
|
<select v-model="days" :disabled="isGenerating">
|
|
|
|
|
<option v-for="d in 15" :key="d" :value="d">{{ d }}天</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-row">
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>出发日期</label>
|
|
|
|
|
<input type="date" v-model="startDate" :disabled="isGenerating" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>出行方式</label>
|
|
|
|
|
<select v-model="transport" :disabled="isGenerating">
|
|
|
|
|
<option value="自驾">自驾</option>
|
|
|
|
|
<option value="高铁">高铁</option>
|
|
|
|
|
<option value="飞机">飞机</option>
|
|
|
|
|
<option value="公共交通">公共交通</option>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group full-width">
|
|
|
|
|
<label>其他需求(选填)</label>
|
|
|
|
|
<input v-model="extraNeeds" placeholder="如:带老人小孩、预算范围、必去景点等" :disabled="isGenerating" />
|
|
|
|
|
</div>
|
|
|
|
|
<button class="generate-btn" @click="generatePlan" :disabled="!destination.trim() || isGenerating">
|
|
|
|
|
{{ isGenerating ? '生成中...' : '立即生成方案' }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- AI Thinking process -->
|
|
|
|
|
<div v-if="isGenerating" class="thinking-section">
|
|
|
|
|
<div class="thinking-header" @click="thinkingExpanded = !thinkingExpanded">
|
|
|
|
|
<div class="thinking-spinner"></div>
|
|
|
|
|
<span class="thinking-title">AI 正在规划中...</span>
|
|
|
|
|
<span class="thinking-toggle">{{ thinkingExpanded ? '收起' : '展开详情' }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<transition name="expand">
|
|
|
|
|
<div v-if="thinkingExpanded" class="thinking-content">
|
|
|
|
|
<div class="thinking-text">{{ thinkingText || '正在初始化...' }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Loading (fallback) -->
|
|
|
|
|
<div v-if="isGenerating && !thinkingText" class="loading-section">
|
|
|
|
|
<div class="loading-spinner"></div>
|
|
|
|
|
<p>{{ loadingText }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Regenerate button -->
|
|
|
|
|
<div v-if="allSchemes.length > 0 && !isGenerating" class="regenerate-row">
|
|
|
|
|
<button class="regenerate-btn" @click="generatePlan" :disabled="isGenerating">
|
|
|
|
|
重新生成方案
|
|
|
|
|
</button>
|
|
|
|
|
<span class="scheme-count">已生成 {{ allSchemes.length }}/9 个方案</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Current schemes -->
|
|
|
|
|
<transition name="fade-up">
|
|
|
|
|
<div v-if="allSchemes.length > 0" class="schemes-section">
|
|
|
|
|
<h3>当前方案</h3>
|
|
|
|
|
<div class="cards-grid">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(scheme, i) in allSchemes"
|
|
|
|
|
:key="'current-' + i"
|
|
|
|
|
class="scheme-card"
|
|
|
|
|
@click="selectScheme(i, 'current')"
|
|
|
|
|
>
|
|
|
|
|
<div class="card-badge">{{ getSchemeLabel(i) }}</div>
|
|
|
|
|
<h4>{{ scheme.name }}</h4>
|
|
|
|
|
<div class="card-stats">
|
|
|
|
|
<span>{{ scheme.days }}天</span>
|
|
|
|
|
<span>~{{ scheme.totalKm }}km</span>
|
|
|
|
|
<span>{{ scheme.budget }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-route">{{ scheme.route }}</div>
|
|
|
|
|
<div class="card-highlights">
|
|
|
|
|
<span v-for="(h, j) in scheme.highlights" :key="j">{{ h }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-action">查看此方案 →</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
|
|
|
|
|
<!-- History section -->
|
|
|
|
|
<transition name="fade-up">
|
|
|
|
|
<div v-if="historySchemes.length > 0" class="history-section">
|
|
|
|
|
<h3 @click="historyExpanded = !historyExpanded" style="cursor:pointer;">
|
|
|
|
|
历史方案 ({{ historySchemes.length }})
|
|
|
|
|
<span class="toggle-icon">{{ historyExpanded ? '▲' : '▼' }}</span>
|
|
|
|
|
</h3>
|
|
|
|
|
<transition name="expand">
|
|
|
|
|
<div v-if="historyExpanded" class="history-grid">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(group, gi) in historySchemes"
|
|
|
|
|
:key="'history-' + gi"
|
|
|
|
|
class="history-group"
|
|
|
|
|
>
|
|
|
|
|
<div class="group-label">第 {{ gi + 1 }} 组</div>
|
|
|
|
|
<div
|
|
|
|
|
v-for="(scheme, si) in group.schemes"
|
|
|
|
|
:key="si"
|
|
|
|
|
class="history-card"
|
|
|
|
|
@click="selectScheme(si, 'history', gi)"
|
|
|
|
|
>
|
|
|
|
|
<div class="card-badge">{{ getSchemeLabel(si) }}</div>
|
|
|
|
|
<h5>{{ scheme.name }}</h5>
|
|
|
|
|
<div class="card-stats">
|
|
|
|
|
<span>{{ scheme.days }}天</span>
|
|
|
|
|
<span>~{{ scheme.totalKm }}km</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="card-action">查看详情 →</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<!-- ========== Detail View ========== -->
|
|
|
|
|
<template v-else-if="viewMode === 'detail'">
|
|
|
|
|
<div class="detail-view">
|
|
|
|
|
<div class="detail-header">
|
|
|
|
|
<button class="back-btn" @click="goBackToList">返回</button>
|
|
|
|
|
<h2>{{ currentDetailScheme.name }}</h2>
|
|
|
|
|
<div class="detail-meta">
|
|
|
|
|
<span>{{ currentDetailScheme.days }}天</span>
|
|
|
|
|
<span>{{ currentDetailScheme.route }}</span>
|
|
|
|
|
<span>预算 {{ currentDetailScheme.budget }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<button class="use-btn" @click="useThisScheme">使用此方案进入工作台</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Scheme switcher -->
|
|
|
|
|
<div class="scheme-switcher">
|
|
|
|
|
<div class="switcher-label">切换方案:</div>
|
|
|
|
|
<div class="switcher-btns">
|
|
|
|
|
<template v-if="currentDetailSource === 'current'">
|
|
|
|
|
<button
|
|
|
|
|
v-for="(s, i) in allSchemes"
|
|
|
|
|
:key="'switch-' + i"
|
|
|
|
|
:class="['switch-btn', { active: currentDetailIndex === i }]"
|
|
|
|
|
@click="selectScheme(i, 'current')"
|
|
|
|
|
>
|
|
|
|
|
{{ getSchemeLabel(i) }}
|
|
|
|
|
</button>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<button
|
|
|
|
|
v-for="(s, i) in (historySchemes[currentDetailHistoryGroup]?.schemes || [])"
|
|
|
|
|
:key="'switch-h-' + i"
|
|
|
|
|
:class="['switch-btn', { active: currentDetailIndex === i }]"
|
|
|
|
|
@click="selectScheme(i, 'history', currentDetailHistoryGroup)"
|
|
|
|
|
>
|
|
|
|
|
{{ getSchemeLabel(i) }}
|
|
|
|
|
</button>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Detail content -->
|
|
|
|
|
<div class="detail-content">
|
|
|
|
|
<div class="detail-highlights">
|
|
|
|
|
<h3>亮点</h3>
|
|
|
|
|
<ul>
|
|
|
|
|
<li v-for="(h, i) in currentDetailScheme.highlights" :key="i">{{ h }}</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="currentDetailScheme.daysDetail" class="detail-days">
|
|
|
|
|
<h3>每日行程</h3>
|
|
|
|
|
<div
|
|
|
|
|
v-for="(day, di) in currentDetailScheme.daysDetail"
|
|
|
|
|
:key="di"
|
|
|
|
|
class="day-card"
|
|
|
|
|
>
|
|
|
|
|
<div class="day-header">
|
|
|
|
|
<span class="day-badge">Day {{ di + 1 }}</span>
|
|
|
|
|
<span class="day-title">{{ day.location }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="day-content">
|
|
|
|
|
<p class="day-desc">{{ day.desc }}</p>
|
|
|
|
|
<div v-if="day.spots && day.spots.length > 0" class="day-spots">
|
|
|
|
|
<span v-for="(spot, si) in day.spots" :key="si" class="spot-tag">{{ spot }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div v-if="currentDetailScheme.tips" class="detail-tips">
|
|
|
|
|
<h3>旅行贴士</h3>
|
|
|
|
|
<p>{{ currentDetailScheme.tips }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
|
import { ref, computed, onMounted } from 'vue'
|
|
|
|
|
import { useItineraryStore } from '../stores/itinerary'
|
|
|
|
|
import { quickPlan } from '../services/aiService'
|
|
|
|
|
|
|
|
|
|
const store = useItineraryStore()
|
|
|
|
|
|
|
|
|
|
// View modes: 'list' | 'detail'
|
|
|
|
|
const viewMode = ref('list')
|
|
|
|
|
|
|
|
|
|
// Use store's shared scheme state
|
|
|
|
|
const allSchemes = computed(() => store.quickSchemes)
|
|
|
|
|
const historySchemes = computed(() => store.historySchemeGroups)
|
|
|
|
|
const historyExpanded = ref(false)
|
|
|
|
|
|
|
|
|
|
const MAX_SCHEMES = 9
|
|
|
|
|
|
|
|
|
|
// Form fields
|
|
|
|
|
const destination = ref('')
|
|
|
|
|
const days = ref(3)
|
|
|
|
|
const startDate = ref('')
|
|
|
|
|
const transport = ref('自驾')
|
|
|
|
|
const extraNeeds = ref('')
|
|
|
|
|
const isGenerating = ref(false)
|
|
|
|
|
const loadingText = ref('正在分析目的地并规划路线...')
|
|
|
|
|
const thinkingText = ref('')
|
|
|
|
|
const thinkingExpanded = ref(true)
|
|
|
|
|
|
|
|
|
|
// Detail view state
|
|
|
|
|
const currentDetailIndex = ref(-1)
|
|
|
|
|
const currentDetailSource = ref('current') // 'current' | 'history'
|
|
|
|
|
const currentDetailHistoryGroup = ref(-1)
|
|
|
|
|
|
|
|
|
|
const currentDetailScheme = computed(() => {
|
|
|
|
|
if (currentDetailSource.value === 'current' && currentDetailIndex.value >= 0) {
|
|
|
|
|
return allSchemes.value[currentDetailIndex.value] || {}
|
|
|
|
|
}
|
|
|
|
|
if (currentDetailSource.value === 'history' && currentDetailHistoryGroup.value >= 0) {
|
|
|
|
|
return historySchemes.value[currentDetailHistoryGroup.value]?.schemes?.[currentDetailIndex.value] || {}
|
|
|
|
|
}
|
|
|
|
|
return {}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
function getSchemeLabel(i) {
|
|
|
|
|
return '方案' + String.fromCharCode(65 + (i % 26))
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function generatePlan() {
|
|
|
|
|
if (!destination.value.trim() || isGenerating.value) return
|
|
|
|
|
|
|
|
|
|
isGenerating.value = true
|
|
|
|
|
thinkingText.value = '发送请求中...'
|
|
|
|
|
thinkingExpanded.value = true
|
|
|
|
|
loadingText.value = '正在分析目的地并规划路线...'
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const userInput = {
|
|
|
|
|
destination: destination.value.trim(),
|
|
|
|
|
days: days.value,
|
|
|
|
|
startDate: startDate.value || '近期',
|
|
|
|
|
transport: transport.value,
|
|
|
|
|
extraNeeds: extraNeeds.value.trim() || '无特殊需求'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const result = await quickPlan(userInput, (text) => {
|
|
|
|
|
thinkingText.value = text
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const newSchemes = result.schemes || []
|
|
|
|
|
const currentSchemes = [...allSchemes.value]
|
|
|
|
|
const currentHistory = [...historySchemes.value]
|
|
|
|
|
|
|
|
|
|
// Archive old schemes to history if we exceed MAX_SCHEMES
|
|
|
|
|
if (currentSchemes.length + newSchemes.length > MAX_SCHEMES) {
|
|
|
|
|
const toArchive = currentSchemes.slice(0, 3)
|
|
|
|
|
currentHistory.push({
|
|
|
|
|
schemes: toArchive,
|
|
|
|
|
timestamp: Date.now()
|
|
|
|
|
})
|
|
|
|
|
currentSchemes.splice(0, 3)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Add new schemes
|
|
|
|
|
currentSchemes.push(...newSchemes)
|
|
|
|
|
|
|
|
|
|
// Cap at MAX_SCHEMES
|
|
|
|
|
if (currentSchemes.length > MAX_SCHEMES) {
|
|
|
|
|
const excess = currentSchemes.splice(MAX_SCHEMES)
|
|
|
|
|
currentHistory.push({ schemes: excess, timestamp: Date.now() })
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Save to store
|
|
|
|
|
store.saveSchemesToStore(currentSchemes, currentHistory)
|
|
|
|
|
} catch (error) {
|
|
|
|
|
thinkingText.value = '生成失败:' + (error.message || '请重试')
|
|
|
|
|
} finally {
|
|
|
|
|
isGenerating.value = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function selectScheme(index, source, historyGroup) {
|
|
|
|
|
currentDetailIndex.value = index
|
|
|
|
|
currentDetailSource.value = source
|
|
|
|
|
currentDetailHistoryGroup.value = historyGroup ?? -1
|
|
|
|
|
viewMode.value = 'detail'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function useThisScheme() {
|
|
|
|
|
const scheme = currentDetailScheme.value
|
|
|
|
|
if (!scheme) return
|
|
|
|
|
|
|
|
|
|
store.saveSchemesToStore(allSchemes.value, historySchemes.value)
|
|
|
|
|
|
|
|
|
|
const idx = currentDetailSource.value === 'current' ? currentDetailIndex.value : -1
|
|
|
|
|
store.setActiveSchemeIndex(idx)
|
|
|
|
|
|
|
|
|
|
store.loadFromAI(scheme)
|
|
|
|
|
store.setPhase('workbench')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function goBack() {
|
|
|
|
|
store.resetToModeSelection()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function goBackToList() {
|
|
|
|
|
viewMode.value = 'list'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Restore state from store on mount
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
if (store.quickSchemes.length > 0) {
|
|
|
|
|
viewMode.value = 'list'
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.quick-plan {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.quick-header {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 30px 20px 20px;
|
|
|
|
|
background: linear-gradient(135deg, #e76f51, #f4a261);
|
|
|
|
|
color: #fff;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.quick-header h1 { margin: 0 0 8px; font-size: 24px; }
|
|
|
|
|
.quick-header p { margin: 0; opacity: 0.9; font-size: 14px; }
|
|
|
|
|
|
|
|
|
|
.back-btn {
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 16px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
background: rgba(255,255,255,0.2);
|
|
|
|
|
border: none;
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 8px 14px;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.2s;
|
|
|
|
|
}
|
|
|
|
|
.back-btn:hover { background: rgba(255,255,255,0.3); }
|
|
|
|
|
|
|
|
|
|
.quick-form {
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
margin: 20px auto;
|
|
|
|
|
padding: 24px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
|
flex: 1;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group.full-width { margin-bottom: 16px; }
|
|
|
|
|
|
|
|
|
|
.form-group label {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #555;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group input,
|
|
|
|
|
.form-group select {
|
|
|
|
|
padding: 10px 14px;
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
outline: none;
|
|
|
|
|
transition: border-color 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group input:focus,
|
|
|
|
|
.form-group select:focus {
|
|
|
|
|
border-color: #e76f51;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.form-group input:disabled,
|
|
|
|
|
.form-group select:disabled {
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.generate-btn {
|
|
|
|
|
width: 100%;
|
|
|
|
|
padding: 14px;
|
|
|
|
|
background: #e76f51;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.generate-btn:hover:not(:disabled) { background: #d35f44; }
|
|
|
|
|
.generate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
|
|
|
|
|
|
|
|
.regenerate-row {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
max-width: 900px;
|
|
|
|
|
margin: 16px auto 0;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.regenerate-btn {
|
|
|
|
|
padding: 10px 20px;
|
|
|
|
|
background: #e76f51;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.regenerate-btn:hover:not(:disabled) { background: #d35f44; }
|
|
|
|
|
.regenerate-btn:disabled { opacity: 0.6; cursor: not-allowed; }
|
|
|
|
|
|
|
|
|
|
.scheme-count {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-section {
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
margin: 16px auto;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
user-select: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-spinner {
|
|
|
|
|
width: 20px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
border: 3px solid #f3f3f3;
|
|
|
|
|
border-top: 3px solid #e76f51;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
animation: spin 1s linear infinite;
|
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-title {
|
|
|
|
|
flex: 1;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-toggle {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-content {
|
|
|
|
|
border-top: 1px solid #f0f0f0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.thinking-text {
|
|
|
|
|
padding: 16px 20px;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #555;
|
|
|
|
|
line-height: 1.8;
|
|
|
|
|
max-height: 300px;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
white-space: pre-wrap;
|
|
|
|
|
word-break: break-word;
|
|
|
|
|
background: #fafafa;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.expand-enter-active, .expand-leave-active {
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
max-height: 300px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
.expand-enter-from, .expand-leave-to {
|
|
|
|
|
max-height: 0;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-section {
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: 40px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-spinner {
|
|
|
|
|
width: 40px;
|
|
|
|
|
height: 40px;
|
|
|
|
|
border: 4px solid #f3f3f3;
|
|
|
|
|
border-top: 4px solid #e76f51;
|
|
|
|
|
border-radius: 50%;
|
|
|
|
|
animation: spin 1s linear infinite;
|
|
|
|
|
margin: 0 auto 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@keyframes spin {
|
|
|
|
|
to { transform: rotate(360deg); }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.loading-section p { color: #666; font-size: 14px; }
|
|
|
|
|
|
|
|
|
|
.schemes-section, .history-section {
|
|
|
|
|
max-width: 900px;
|
|
|
|
|
margin: 16px auto 40px;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.schemes-section h3, .history-section h3 {
|
|
|
|
|
margin: 0 0 16px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.toggle-icon {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cards-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
|
|
|
gap: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scheme-card {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border: 2px solid #e0e0e0;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scheme-card:hover {
|
|
|
|
|
border-color: #e76f51;
|
|
|
|
|
transform: translateY(-3px);
|
|
|
|
|
box-shadow: 0 6px 16px rgba(231,111,81,0.15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-badge {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
background: #e76f51;
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.scheme-card h4 {
|
|
|
|
|
margin: 0 0 12px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-stats {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
color: #666;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-route {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
color: #888;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
padding: 6px 8px;
|
|
|
|
|
background: #f8f9fa;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-highlights {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
margin-bottom: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-highlights span {
|
|
|
|
|
background: #fff3e0;
|
|
|
|
|
color: #e76f51;
|
|
|
|
|
padding: 2px 8px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 11px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.card-action {
|
|
|
|
|
text-align: center;
|
|
|
|
|
color: #e76f51;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* History */
|
|
|
|
|
.history-grid {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.history-group {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.group-label {
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #999;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
padding-bottom: 6px;
|
|
|
|
|
border-bottom: 1px solid #f0f0f0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.history-card {
|
|
|
|
|
background: #f8f9fa;
|
|
|
|
|
border: 1px solid #e0e0e0;
|
|
|
|
|
border-radius: 8px;
|
|
|
|
|
padding: 12px;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.history-card:last-child { margin-bottom: 0; }
|
|
|
|
|
|
|
|
|
|
.history-card:hover {
|
|
|
|
|
border-color: #e76f51;
|
|
|
|
|
background: #fff;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.history-card h5 {
|
|
|
|
|
margin: 8px 0 6px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.fade-up-enter-active, .fade-up-leave-active {
|
|
|
|
|
transition: all 0.3s ease;
|
|
|
|
|
}
|
|
|
|
|
.fade-up-enter-from, .fade-up-leave-to {
|
|
|
|
|
transform: translateY(20px);
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Detail View */
|
|
|
|
|
.detail-view {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
height: 100vh;
|
|
|
|
|
background: #f5f5f5;
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-header {
|
|
|
|
|
background: linear-gradient(135deg, #e76f51, #f4a261);
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 20px 20px 24px;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-header h2 {
|
|
|
|
|
margin: 12px 0 8px;
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-meta {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
opacity: 0.9;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.use-btn {
|
|
|
|
|
padding: 12px 24px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
color: #e76f51;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.use-btn:hover {
|
|
|
|
|
transform: scale(1.02);
|
|
|
|
|
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Scheme switcher */
|
|
|
|
|
.scheme-switcher {
|
|
|
|
|
background: #fff;
|
|
|
|
|
padding: 12px 20px;
|
|
|
|
|
border-bottom: 1px solid #e0e0e0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switcher-label {
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #666;
|
|
|
|
|
margin-bottom: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switcher-btns {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switch-btn {
|
|
|
|
|
padding: 6px 14px;
|
|
|
|
|
border: 1px solid #ddd;
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 6px;
|
|
|
|
|
font-size: 13px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: all 0.2s;
|
|
|
|
|
color: #555;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switch-btn:hover {
|
|
|
|
|
border-color: #e76f51;
|
|
|
|
|
color: #e76f51;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.switch-btn.active {
|
|
|
|
|
background: #e76f51;
|
|
|
|
|
color: #fff;
|
|
|
|
|
border-color: #e76f51;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Detail content */
|
|
|
|
|
.detail-content {
|
|
|
|
|
max-width: 800px;
|
|
|
|
|
margin: 0 auto;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-highlights {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-highlights h3 {
|
|
|
|
|
margin: 0 0 12px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-highlights ul {
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding-left: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-highlights li {
|
|
|
|
|
margin-bottom: 6px;
|
|
|
|
|
color: #555;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-days {
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-days h3 {
|
|
|
|
|
margin: 0 0 12px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-card {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 16px;
|
|
|
|
|
margin-bottom: 12px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-header {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
gap: 10px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-badge {
|
|
|
|
|
background: #e76f51;
|
|
|
|
|
color: #fff;
|
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-title {
|
|
|
|
|
font-size: 15px;
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-content {
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-desc {
|
|
|
|
|
margin: 0 0 10px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #555;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.day-spots {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.spot-tag {
|
|
|
|
|
background: #f0f7ff;
|
|
|
|
|
color: #2196f3;
|
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-tips {
|
|
|
|
|
background: #fff;
|
|
|
|
|
border-radius: 12px;
|
|
|
|
|
padding: 20px;
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-tips h3 {
|
|
|
|
|
margin: 0 0 10px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #333;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-tips p {
|
|
|
|
|
margin: 0;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #555;
|
|
|
|
|
line-height: 1.6;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media (max-width: 768px) {
|
|
|
|
|
.form-row { flex-direction: column; }
|
|
|
|
|
.cards-grid { grid-template-columns: 1fr; }
|
|
|
|
|
}
|
|
|
|
|
</style>
|