StrategyView.vue 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164
  1. <template>
  2. <div class="strategy-page">
  3. <div class="strategy-header">
  4. <div class="header-left">
  5. <div class="data-title">🤖 AI策略中心</div>
  6. <p class="header-desc">基于数据分析,AI自动发现并优化营销策略</p>
  7. </div>
  8. <div style="display: flex; gap: 8px;">
  9. <button class="btn btn-secondary" @click="showHistoryModal = true">
  10. <i class="fas fa-history"></i> 策略历史
  11. </button>
  12. <button class="btn btn-secondary" @click="exportReport">
  13. <i class="fas fa-download"></i> 导出报告
  14. </button>
  15. <button class="btn btn-primary" @click="refreshStrategies" :disabled="isRefreshing">
  16. <i class="fas fa-sync" :class="{ 'fa-spin': isRefreshing }"></i>
  17. {{ isRefreshing ? '分析中...' : '刷新策略' }}
  18. </button>
  19. </div>
  20. </div>
  21. <!-- Stats -->
  22. <div class="stats-row">
  23. <div class="stat-card-lg" @click="filterStrategies('all')">
  24. <div class="stat-icon-lg blue"><i class="fas fa-lightbulb"></i></div>
  25. <div class="stat-content-lg">
  26. <h3>{{ strategyStats.active }}</h3>
  27. <p>活跃策略</p>
  28. </div>
  29. </div>
  30. <div class="stat-card-lg" @click="filterStrategies('applied')">
  31. <div class="stat-icon-lg green"><i class="fas fa-check-circle"></i></div>
  32. <div class="stat-content-lg">
  33. <h3>{{ strategyStats.applied }}</h3>
  34. <p>已应用</p>
  35. </div>
  36. </div>
  37. <div class="stat-card-lg" @click="filterStrategies('pending')">
  38. <div class="stat-icon-lg orange"><i class="fas fa-clock"></i></div>
  39. <div class="stat-content-lg">
  40. <h3>{{ strategyStats.pending }}</h3>
  41. <p>待审核</p>
  42. </div>
  43. </div>
  44. <div class="stat-card-lg">
  45. <div class="stat-icon-lg purple"><i class="fas fa-chart-line"></i></div>
  46. <div class="stat-content-lg">
  47. <h3>{{ avgImprovement }}%</h3>
  48. <p>平均提升</p>
  49. </div>
  50. </div>
  51. <div class="stat-card-lg">
  52. <div class="stat-icon-lg" style="background: rgba(16, 185, 129, 0.2); color: var(--success);">
  53. <i class="fas fa-coins"></i>
  54. </div>
  55. <div class="stat-content-lg">
  56. <h3>¥{{ formatNumber(totalRevenueImpact) }}</h3>
  57. <p>预计增收</p>
  58. </div>
  59. </div>
  60. </div>
  61. <!-- Tabs & Search -->
  62. <div class="tabs-row">
  63. <div class="tabs">
  64. <div v-for="tab in tabs" :key="tab.key"
  65. class="tab-item"
  66. :class="{ active: filterTab === tab.key }"
  67. @click="filterTab = tab.key">
  68. {{ tab.label }}
  69. <span class="tab-count">{{ tab.count }}</span>
  70. </div>
  71. </div>
  72. <div class="search-filter">
  73. <div class="search-box-small">
  74. <i class="fas fa-search"></i>
  75. <input type="text" v-model="searchQuery" placeholder="搜索策略...">
  76. </div>
  77. <select class="filter-select" v-model="sortBy">
  78. <option value="confidence">按置信度</option>
  79. <option value="improvement">按效果</option>
  80. <option value="date">按时间</option>
  81. </select>
  82. </div>
  83. </div>
  84. <!-- Strategy Cards -->
  85. <div class="strategy-grid">
  86. <div v-for="strategy in filteredStrategies" :key="strategy.id"
  87. class="strategy-card"
  88. :class="{ applied: strategy.status === 'applied' }"
  89. @click="showStrategyDetail(strategy)">
  90. <!-- Header -->
  91. <div class="card-header">
  92. <div class="card-icon" :style="{ background: strategy.iconBg, color: strategy.iconColor }">
  93. <i :class="strategy.icon"></i>
  94. </div>
  95. <div class="card-badges">
  96. <span class="badge" :class="strategy.status">{{ strategy.status === 'applied' ? '已应用' : '待审核' }}</span>
  97. <span class="badge confidence" :class="{ high: strategy.confidence >= 85 }">
  98. {{ strategy.confidence }}% 置信
  99. </span>
  100. </div>
  101. </div>
  102. <!-- Content -->
  103. <div class="card-title">{{ strategy.title }}</div>
  104. <div class="card-desc">{{ strategy.description }}</div>
  105. <!-- Category Tags -->
  106. <div class="card-tags">
  107. <span v-for="tag in strategy.tags" :key="tag" class="tag">{{ tag }}</span>
  108. </div>
  109. <!-- Metrics -->
  110. <div class="card-metrics">
  111. <div class="metric">
  112. <span class="metric-label">数据来源</span>
  113. <span class="metric-value">{{ strategy.dataSource }}</span>
  114. </div>
  115. <div class="metric">
  116. <span class="metric-label">效果提升</span>
  117. <span class="metric-value highlight">{{ strategy.improvement }}</span>
  118. </div>
  119. </div>
  120. <!-- Progress Bar (for applied strategies) -->
  121. <div v-if="strategy.status === 'applied'" class="card-progress">
  122. <div class="progress-header">
  123. <span>应用效果</span>
  124. <span>{{ strategy.effectProgress }}%</span>
  125. </div>
  126. <div class="progress-bar">
  127. <div class="progress-fill" :style="{ width: strategy.effectProgress + '%' }"></div>
  128. </div>
  129. </div>
  130. <!-- Actions -->
  131. <div class="card-actions" @click.stop>
  132. <button v-if="strategy.status === 'pending'"
  133. class="btn btn-primary btn-sm"
  134. @click="applyStrategy(strategy)">
  135. <i class="fas fa-play"></i> 应用策略
  136. </button>
  137. <button v-else class="btn btn-success btn-sm" disabled>
  138. <i class="fas fa-check"></i> 已应用
  139. </button>
  140. <button class="btn btn-secondary btn-sm" @click="showStrategyDetail(strategy)">
  141. <i class="fas fa-chart-bar"></i>
  142. </button>
  143. <button class="btn btn-secondary btn-sm" @click="toggleFavorite(strategy)">
  144. <i :class="strategy.favorite ? 'fas fa-star' : 'far fa-star'"
  145. :style="{ color: strategy.favorite ? 'var(--warning)' : 'inherit' }"></i>
  146. </button>
  147. </div>
  148. </div>
  149. </div>
  150. <!-- Strategy Detail Modal -->
  151. <div v-if="showDetailModal" class="modal-overlay" @click.self="showDetailModal = false">
  152. <div class="modal strategy-detail-modal">
  153. <div class="modal-header">
  154. <div class="modal-title">
  155. <div class="title-icon" :style="{ background: selectedStrategy?.iconBg, color: selectedStrategy?.iconColor }">
  156. <i :class="selectedStrategy?.icon"></i>
  157. </div>
  158. <div>
  159. <h3>{{ selectedStrategy?.title }}</h3>
  160. <p>{{ selectedStrategy?.category }}</p>
  161. </div>
  162. </div>
  163. <button class="modal-close" @click="showDetailModal = false">
  164. <i class="fas fa-times"></i>
  165. </button>
  166. </div>
  167. <div class="modal-body" v-if="selectedStrategy">
  168. <!-- Overview -->
  169. <div class="detail-section">
  170. <h4><i class="fas fa-info-circle"></i> 策略概述</h4>
  171. <p>{{ selectedStrategy.description }}</p>
  172. <div class="detail-tags">
  173. <span v-for="tag in selectedStrategy.tags" :key="tag" class="tag">{{ tag }}</span>
  174. </div>
  175. </div>
  176. <!-- Data Analysis -->
  177. <div class="detail-section">
  178. <h4><i class="fas fa-chart-bar"></i> 数据分析</h4>
  179. <div class="analysis-grid">
  180. <div class="analysis-item">
  181. <div class="analysis-value">{{ selectedStrategy.dataSource }}</div>
  182. <div class="analysis-label">样本数据</div>
  183. </div>
  184. <div class="analysis-item">
  185. <div class="analysis-value highlight">{{ selectedStrategy.confidence }}%</div>
  186. <div class="analysis-label">置信度</div>
  187. </div>
  188. <div class="analysis-item">
  189. <div class="analysis-value success">{{ selectedStrategy.improvement }}</div>
  190. <div class="analysis-label">预期提升</div>
  191. </div>
  192. <div class="analysis-item">
  193. <div class="analysis-value">{{ selectedStrategy.timeToImplement }}</div>
  194. <div class="analysis-label">实施时间</div>
  195. </div>
  196. </div>
  197. </div>
  198. <!-- Implementation Steps -->
  199. <div class="detail-section">
  200. <h4><i class="fas fa-tasks"></i> 实施步骤</h4>
  201. <div class="steps-list">
  202. <div v-for="(step, index) in selectedStrategy.implementationSteps" :key="index"
  203. class="step-item"
  204. :class="{ completed: selectedStrategy.status === 'applied' && index < 2 }">
  205. <div class="step-number">{{ index + 1 }}</div>
  206. <div class="step-content">
  207. <div class="step-title">{{ step.title }}</div>
  208. <div class="step-desc">{{ step.description }}</div>
  209. </div>
  210. <i v-if="selectedStrategy.status === 'applied' && index < 2"
  211. class="fas fa-check-circle step-check"></i>
  212. </div>
  213. </div>
  214. </div>
  215. <!-- Expected Impact -->
  216. <div class="detail-section">
  217. <h4><i class="fas fa-coins"></i> 预期影响</h4>
  218. <div class="impact-cards">
  219. <div class="impact-card">
  220. <i class="fas fa-envelope-open-text"></i>
  221. <div class="impact-value">{{ selectedStrategy.impact.opens }}</div>
  222. <div class="impact-label">邮件打开率提升</div>
  223. </div>
  224. <div class="impact-card">
  225. <i class="fas fa-reply"></i>
  226. <div class="impact-value">{{ selectedStrategy.impact.replies }}</div>
  227. <div class="impact-label">回复率提升</div>
  228. </div>
  229. <div class="impact-card">
  230. <i class="fas fa-handshake"></i>
  231. <div class="impact-value">{{ selectedStrategy.impact.conversions }}</div>
  232. <div class="impact-label">转化率提升</div>
  233. </div>
  234. <div class="impact-card highlight">
  235. <i class="fas fa-dollar-sign"></i>
  236. <div class="impact-value">{{ selectedStrategy.impact.revenue }}</div>
  237. <div class="impact-label">预计增收</div>
  238. </div>
  239. </div>
  240. </div>
  241. <!-- A/B Test Results -->
  242. <div v-if="selectedStrategy.abTestResults" class="detail-section">
  243. <h4><i class="fas fa-flask"></i> A/B 测试结果</h4>
  244. <div class="ab-test-results">
  245. <div class="ab-group control">
  246. <div class="group-label">对照组</div>
  247. <div class="group-value">{{ selectedStrategy.abTestResults.control }}%</div>
  248. <div class="group-metric">打开率</div>
  249. </div>
  250. <div class="vs-divider">VS</div>
  251. <div class="ab-group test">
  252. <div class="group-label">测试组</div>
  253. <div class="group-value">{{ selectedStrategy.abTestResults.test }}%</div>
  254. <div class="group-metric">打开率</div>
  255. <div class="group-improvement">+{{ selectedStrategy.abTestResults.test - selectedStrategy.abTestResults.control }}%</div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="modal-footer">
  261. <button class="btn btn-secondary" @click="showDetailModal = false">关闭</button>
  262. <button v-if="selectedStrategy?.status === 'pending'"
  263. class="btn btn-primary"
  264. @click="applyStrategy(selectedStrategy)">
  265. <i class="fas fa-play"></i> 应用此策略
  266. </button>
  267. <button v-else class="btn btn-success" disabled>
  268. <i class="fas fa-check"></i> 已应用
  269. </button>
  270. </div>
  271. </div>
  272. </div>
  273. <!-- History Modal -->
  274. <div v-if="showHistoryModal" class="modal-overlay" @click.self="showHistoryModal = false">
  275. <div class="modal history-modal">
  276. <div class="modal-header">
  277. <div class="modal-title"><i class="fas fa-history"></i> 策略历史记录</div>
  278. <button class="modal-close" @click="showHistoryModal = false">
  279. <i class="fas fa-times"></i>
  280. </button>
  281. </div>
  282. <div class="modal-body">
  283. <!-- 筛选和搜索 -->
  284. <div class="history-filters">
  285. <div class="search-box-small">
  286. <i class="fas fa-search"></i>
  287. <input type="text" v-model="historySearch" placeholder="搜索策略历史...">
  288. </div>
  289. <div class="filter-group">
  290. <select class="filter-select-sm" v-model="historyFilter.type">
  291. <option value="">全部类型</option>
  292. <option value="apply">应用策略</option>
  293. <option value="optimize">策略优化</option>
  294. <option value="discover">新策略发现</option>
  295. <option value="result">效果报告</option>
  296. </select>
  297. <select class="filter-select-sm" v-model="historyFilter.dateRange">
  298. <option value="">全部时间</option>
  299. <option value="today">今天</option>
  300. <option value="week">本周</option>
  301. <option value="month">本月</option>
  302. </select>
  303. </div>
  304. </div>
  305. <!-- 统计概览 -->
  306. <div class="history-stats">
  307. <div class="history-stat-item">
  308. <div class="stat-icon apply"><i class="fas fa-check-circle"></i></div>
  309. <div class="stat-content">
  310. <div class="stat-value">{{ appliedStrategyCount }}</div>
  311. <div class="stat-label">已应用</div>
  312. </div>
  313. </div>
  314. <div class="history-stat-item">
  315. <div class="stat-icon discover"><i class="fas fa-lightbulb"></i></div>
  316. <div class="stat-content">
  317. <div class="stat-value">{{ discoveredStrategyCount }}</div>
  318. <div class="stat-label">新发现</div>
  319. </div>
  320. </div>
  321. <div class="history-stat-item">
  322. <div class="stat-icon optimize"><i class="fas fa-sync"></i></div>
  323. <div class="stat-content">
  324. <div class="stat-value">{{ optimizedStrategyCount }}</div>
  325. <div class="stat-label">已优化</div>
  326. </div>
  327. </div>
  328. <div class="history-stat-item highlight">
  329. <div class="stat-icon result"><i class="fas fa-chart-line"></i></div>
  330. <div class="stat-content">
  331. <div class="stat-value">{{ totalImprovementFromHistory }}%</div>
  332. <div class="stat-label">总提升</div>
  333. </div>
  334. </div>
  335. </div>
  336. <!-- 时间线标签页 -->
  337. <div class="history-tabs">
  338. <span class="history-tab" :class="{ active: historyViewMode === 'timeline' }" @click="historyViewMode = 'timeline'">
  339. <i class="fas fa-stream"></i> 时间线
  340. </span>
  341. <span class="history-tab" :class="{ active: historyViewMode === 'list' }" @click="historyViewMode = 'list'">
  342. <i class="fas fa-list"></i> 列表
  343. </span>
  344. <span class="history-tab" :class="{ active: historyViewMode === 'stats' }" @click="historyViewMode = 'stats'">
  345. <i class="fas fa-chart-pie"></i> 统计
  346. </span>
  347. </div>
  348. <!-- 时间线视图 -->
  349. <div v-if="historyViewMode === 'timeline'" class="history-timeline-enhanced">
  350. <div v-for="(item, index) in filteredHistoryItems" :key="index" class="history-item-enhanced">
  351. <div class="timeline-left">
  352. <div class="timeline-date">{{ item.date }}</div>
  353. <div class="timeline-time">{{ item.time }}</div>
  354. </div>
  355. <div class="timeline-center">
  356. <div class="timeline-dot" :class="item.type">
  357. <i :class="getHistoryTypeIcon(item.type)"></i>
  358. </div>
  359. <div v-if="index < filteredHistoryItems.length - 1" class="timeline-line"></div>
  360. </div>
  361. <div class="timeline-right">
  362. <div class="timeline-card" :class="item.type">
  363. <div class="timeline-header">
  364. <span class="timeline-type" :class="item.type">{{ getHistoryTypeLabel(item.type) }}</span>
  365. <span class="timeline-category">{{ item.category }}</span>
  366. </div>
  367. <div class="timeline-title">{{ item.title }}</div>
  368. <div class="timeline-desc">{{ item.description }}</div>
  369. <div class="timeline-meta" v-if="item.strategy">
  370. <div class="meta-item" v-if="item.strategy.confidence">
  371. <i class="fas fa-check-circle"></i>
  372. <span>置信度 {{ item.strategy.confidence }}%</span>
  373. </div>
  374. <div class="meta-item" v-if="item.strategy.improvement">
  375. <i class="fas fa-arrow-up"></i>
  376. <span>效果 {{ item.strategy.improvement }}</span>
  377. </div>
  378. <div class="meta-item" v-if="item.strategy.revenue">
  379. <i class="fas fa-coins"></i>
  380. <span>{{ item.strategy.revenue }}</span>
  381. </div>
  382. </div>
  383. <div class="timeline-actions" v-if="item.strategy">
  384. <button class="btn btn-sm btn-outline" @click="viewHistoryStrategy(item)">
  385. <i class="fas fa-eye"></i> 查看详情
  386. </button>
  387. <button v-if="item.type === 'apply' || item.type === 'result'" class="btn btn-sm btn-outline" @click="viewHistoryReport(item)">
  388. <i class="fas fa-file-alt"></i> 效果报告
  389. </button>
  390. </div>
  391. </div>
  392. </div>
  393. </div>
  394. </div>
  395. <!-- 列表视图 -->
  396. <div v-if="historyViewMode === 'list'" class="history-list-view">
  397. <div class="history-table-header">
  398. <span class="col-type">类型</span>
  399. <span class="col-title">策略名称</span>
  400. <span class="col-category">分类</span>
  401. <span class="col-effect">效果</span>
  402. <span class="col-time">时间</span>
  403. <span class="col-actions">操作</span>
  404. </div>
  405. <div v-for="(item, index) in filteredHistoryItems" :key="index" class="history-table-row">
  406. <span class="col-type">
  407. <span class="type-badge" :class="item.type">{{ getHistoryTypeLabel(item.type) }}</span>
  408. </span>
  409. <span class="col-title">{{ item.title }}</span>
  410. <span class="col-category">{{ item.category }}</span>
  411. <span class="col-effect" v-if="item.strategy">{{ item.strategy.improvement || '-' }}</span>
  412. <span class="col-effect" v-else>-</span>
  413. <span class="col-time">{{ item.date }} {{ item.time }}</span>
  414. <span class="col-actions">
  415. <button class="btn-icon-sm" @click="viewHistoryStrategy(item)" title="查看">
  416. <i class="fas fa-eye"></i>
  417. </button>
  418. </span>
  419. </div>
  420. </div>
  421. <!-- 统计视图 -->
  422. <div v-if="historyViewMode === 'stats'" class="history-stats-view">
  423. <div class="stats-chart-section">
  424. <h5><i class="fas fa-chart-bar"></i> 策略类型分布</h5>
  425. <div class="type-distribution">
  426. <div class="distribution-item">
  427. <div class="distribution-bar">
  428. <div class="bar-fill apply" :style="{ width: typeDistribution.apply + '%' }"></div>
  429. </div>
  430. <div class="distribution-info">
  431. <span class="type-label"><i class="fas fa-check-circle"></i> 应用策略</span>
  432. <span class="type-value">{{ typeDistribution.apply }}%</span>
  433. </div>
  434. </div>
  435. <div class="distribution-item">
  436. <div class="distribution-bar">
  437. <div class="bar-fill discover" :style="{ width: typeDistribution.discover + '%' }"></div>
  438. </div>
  439. <div class="distribution-info">
  440. <span class="type-label"><i class="fas fa-lightbulb"></i> 新发现</span>
  441. <span class="type-value">{{ typeDistribution.discover }}%</span>
  442. </div>
  443. </div>
  444. <div class="distribution-item">
  445. <div class="distribution-bar">
  446. <div class="bar-fill optimize" :style="{ width: typeDistribution.optimize + '%' }"></div>
  447. </div>
  448. <div class="distribution-info">
  449. <span class="type-label"><i class="fas fa-sync"></i> 优化</span>
  450. <span class="type-value">{{ typeDistribution.optimize }}%</span>
  451. </div>
  452. </div>
  453. <div class="distribution-item">
  454. <div class="distribution-bar">
  455. <div class="bar-fill result" :style="{ width: typeDistribution.result + '%' }"></div>
  456. </div>
  457. <div class="distribution-info">
  458. <span class="type-label"><i class="fas fa-chart-line"></i> 效果报告</span>
  459. <span class="type-value">{{ typeDistribution.result }}%</span>
  460. </div>
  461. </div>
  462. </div>
  463. </div>
  464. <div class="stats-metrics-section">
  465. <h5><i class="fas fa-trophy"></i> 关键指标</h5>
  466. <div class="metrics-grid-sm">
  467. <div class="metric-item-sm">
  468. <div class="metric-icon-sm blue"><i class="fas fa-envelope-open"></i></div>
  469. <div class="metric-info-sm">
  470. <div class="metric-value-sm">+{{ avgOpenRateImprovement }}%</div>
  471. <div class="metric-label-sm">平均打开率提升</div>
  472. </div>
  473. </div>
  474. <div class="metric-item-sm">
  475. <div class="metric-icon-sm green"><i class="fas fa-reply"></i></div>
  476. <div class="metric-info-sm">
  477. <div class="metric-value-sm">+{{ avgReplyRateImprovement }}%</div>
  478. <div class="metric-label-sm">平均回复率提升</div>
  479. </div>
  480. </div>
  481. <div class="metric-item-sm">
  482. <div class="metric-icon-sm purple"><i class="fas fa-handshake"></i></div>
  483. <div class="metric-info-sm">
  484. <div class="metric-value-sm">+{{ avgConversionImprovement }}%</div>
  485. <div class="metric-label-sm">平均转化率提升</div>
  486. </div>
  487. </div>
  488. <div class="metric-item-sm highlight">
  489. <div class="metric-icon-sm gold"><i class="fas fa-coins"></i></div>
  490. <div class="metric-info-sm">
  491. <div class="metric-value-sm">¥{{ totalRevenueFromHistory }}K</div>
  492. <div class="metric-label-sm">累计增收</div>
  493. </div>
  494. </div>
  495. </div>
  496. </div>
  497. <div class="top-strategies-section">
  498. <h5><i class="fas fa-star"></i> 效果最佳策略</h5>
  499. <div class="top-strategies-list">
  500. <div v-for="(strategy, index) in topStrategies" :key="index" class="top-strategy-item">
  501. <div class="rank" :class="{ gold: index === 0, silver: index === 1, bronze: index === 2 }">{{ index + 1 }}</div>
  502. <div class="strategy-info">
  503. <div class="strategy-name">{{ strategy.name }}</div>
  504. <div class="strategy-category">{{ strategy.category }}</div>
  505. </div>
  506. <div class="strategy-effect">{{ strategy.improvement }}</div>
  507. </div>
  508. </div>
  509. </div>
  510. </div>
  511. </div>
  512. <div class="modal-footer">
  513. <button class="btn btn-secondary" @click="exportHistoryReport">
  514. <i class="fas fa-download"></i> 导出报告
  515. </button>
  516. <button class="btn btn-secondary" @click="showHistoryModal = false">关闭</button>
  517. </div>
  518. </div>
  519. </div>
  520. <!-- Toast Notification -->
  521. <transition name="toast">
  522. <div v-if="showToast" class="toast" :class="toastType">
  523. <i :class="toastType === 'success' ? 'fas fa-check-circle' : 'fas fa-info-circle'"></i>
  524. {{ toastMessage }}
  525. </div>
  526. </transition>
  527. </div>
  528. </template>
  529. <script setup>
  530. import { ref, computed } from 'vue'
  531. const filterTab = ref('all')
  532. const searchQuery = ref('')
  533. const sortBy = ref('confidence')
  534. const isRefreshing = ref(false)
  535. const showDetailModal = ref(false)
  536. const showHistoryModal = ref(false)
  537. const selectedStrategy = ref(null)
  538. const showToast = ref(false)
  539. const toastMessage = ref('')
  540. const toastType = ref('success')
  541. // History filters
  542. const historySearch = ref('')
  543. const historyFilter = ref({ type: '', dateRange: '' })
  544. const historyViewMode = ref('timeline')
  545. const strategyStats = {
  546. active: 20,
  547. applied: 11,
  548. pending: 9,
  549. high: 15
  550. }
  551. const tabs = [
  552. { key: 'all', label: '全部策略', count: 20 },
  553. { key: 'timing', label: '触达时机', count: 3 },
  554. { key: 'content', label: '内容优化', count: 4 },
  555. { key: 'audience', label: '受众细分', count: 5 },
  556. { key: 'channel', label: '渠道策略', count: 8 }
  557. ]
  558. const strategies = ref([
  559. {
  560. id: 1,
  561. icon: 'fas fa-clock',
  562. iconBg: 'rgba(99, 102, 241, 0.2)',
  563. iconColor: 'var(--primary)',
  564. title: '最佳邮件发送时间',
  565. description: '周二上午10点和周四下午2点发送邮件打开率最高,建议调整邮件营销时间安排',
  566. category: '触达时机',
  567. tags: ['邮件营销', '发送时间', '打开率'],
  568. dataSource: '8,562封邮件',
  569. confidence: 92,
  570. improvement: '+35%',
  571. status: 'applied',
  572. favorite: true,
  573. effectProgress: 87,
  574. timeToImplement: '即时生效',
  575. implementationSteps: [
  576. { title: '自动调整发送队列', description: '系统自动将待发送邮件调整至最优时段' },
  577. { title: '监控效果数据', description: '实时追踪打开率变化' },
  578. { title: '持续优化模型', description: '根据新数据不断优化预测准确度' }
  579. ],
  580. impact: { opens: '+35%', replies: '+12%', conversions: '+8%', revenue: '¥128K/月' },
  581. abTestResults: { control: 22, test: 30 }
  582. },
  583. {
  584. id: 2,
  585. icon: 'fab fa-whatsapp',
  586. iconBg: 'rgba(37, 211, 102, 0.2)',
  587. iconColor: '#25D366',
  588. title: 'WhatsApp最佳联系时段',
  589. description: '中东客户晚上8-10点回复率最高,建议在该时段集中跟进',
  590. category: '触达时机',
  591. tags: ['WhatsApp', '中东市场', '回复率'],
  592. dataSource: '3,421条记录',
  593. confidence: 88,
  594. improvement: '+52%',
  595. status: 'pending',
  596. favorite: false,
  597. effectProgress: 0,
  598. timeToImplement: '1-2天',
  599. implementationSteps: [
  600. { title: '配置时段规则', description: '设置中东客户专属联系时段' },
  601. { title: '启用定时发送', description: '消息自动在最佳时段发送' },
  602. { title: '效果追踪', description: '监控回复率变化' }
  603. ],
  604. impact: { opens: '+28%', replies: '+52%', conversions: '+15%', revenue: '¥85K/月' },
  605. abTestResults: null
  606. },
  607. {
  608. id: 3,
  609. icon: 'fas fa-language',
  610. iconBg: 'rgba(16, 185, 129, 0.2)',
  611. iconColor: 'var(--success)',
  612. title: '德国市场本地化话术',
  613. description: '使用德语撰写邮件+强调ISO认证,德国客户响应率提升显著',
  614. category: '内容优化',
  615. tags: ['德国', '本地化', '认证'],
  616. dataSource: '156封邮件',
  617. confidence: 90,
  618. improvement: '+130%',
  619. status: 'applied',
  620. favorite: true,
  621. effectProgress: 92,
  622. timeToImplement: '3-5天',
  623. implementationSteps: [
  624. { title: '导入德语模板', description: 'AI生成德语邮件模板' },
  625. { title: '添加认证信息', description: '自动插入ISO认证说明' },
  626. { title: 'A/B测试验证', description: '对比原模板与新模板效果' }
  627. ],
  628. impact: { opens: '+45%', replies: '+130%', conversions: '+35%', revenue: '¥220K/月' },
  629. abTestResults: { control: 15, test: 35 }
  630. },
  631. {
  632. id: 4,
  633. icon: 'fas fa-heading',
  634. iconBg: 'rgba(139, 92, 246, 0.2)',
  635. iconColor: 'var(--secondary)',
  636. title: '邮件标题数字效应',
  637. description: '邮件标题包含具体数字(如"提升30%")点击率显著提升',
  638. category: '内容优化',
  639. tags: ['邮件标题', '文案优化', '点击率'],
  640. dataSource: '12,847封邮件',
  641. confidence: 76,
  642. improvement: '+42%',
  643. status: 'pending',
  644. favorite: false,
  645. effectProgress: 0,
  646. timeToImplement: '即时生效',
  647. implementationSteps: [
  648. { title: '标题模板优化', description: 'AI自动为标题添加数字元素' },
  649. { title: '批量更新队列', description: '待发邮件标题自动优化' }
  650. ],
  651. impact: { opens: '+42%', replies: '+18%', conversions: '+10%', revenue: '¥95K/月' },
  652. abTestResults: { control: 28, test: 40 }
  653. },
  654. {
  655. id: 5,
  656. icon: 'fas fa-user-tie',
  657. iconBg: 'rgba(236, 72, 153, 0.2)',
  658. iconColor: '#EC4899',
  659. title: '采购决策人识别',
  660. description: '优先触达CTO/CIO级别决策人,比普通Manager打开率高40%',
  661. category: '受众细分',
  662. tags: ['决策人', '职位分析', '触达策略'],
  663. dataSource: '职位标签分析',
  664. confidence: 89,
  665. improvement: '+40%',
  666. status: 'applied',
  667. favorite: true,
  668. effectProgress: 78,
  669. timeToImplement: '5-7天',
  670. implementationSteps: [
  671. { title: '职位数据清洗', description: '识别并标记决策人职位' },
  672. { title: '优先级调整', description: '决策人客户优先触达' },
  673. { title: '话术定制', description: '针对不同职位生成定制话术' }
  674. ],
  675. impact: { opens: '+40%', replies: '+25%', conversions: '+20%', revenue: '¥180K/月' },
  676. abTestResults: null
  677. },
  678. {
  679. id: 6,
  680. icon: 'fab fa-linkedin',
  681. iconBg: 'rgba(59, 130, 246, 0.2)',
  682. iconColor: '#0A66C2',
  683. title: 'LinkedIn个性化连接',
  684. description: '发送连接请求时添加个性化消息,接受率提升3倍',
  685. category: '渠道策略',
  686. tags: ['LinkedIn', '社交营销', '个性化'],
  687. dataSource: '892个连接',
  688. confidence: 87,
  689. improvement: '+210%',
  690. status: 'applied',
  691. favorite: false,
  692. effectProgress: 65,
  693. timeToImplement: '即时生效',
  694. implementationSteps: [
  695. { title: '启用个性化模板', description: '自动生成个性化连接消息' },
  696. { title: '批量应用', description: '新连接请求自动添加个性化内容' }
  697. ],
  698. impact: { opens: '+60%', replies: '+210%', conversions: '+45%', revenue: '¥150K/月' },
  699. abTestResults: { control: 12, test: 38 }
  700. },
  701. {
  702. id: 7,
  703. icon: 'fas fa-redo',
  704. iconBg: 'rgba(245, 158, 11, 0.2)',
  705. iconColor: 'var(--warning)',
  706. title: '跟进频率优化',
  707. description: '第3天和第7天是最佳跟进时机,错过这两个节点转化率下降60%',
  708. category: '触达时机',
  709. tags: ['跟进', '转化率', '时机'],
  710. dataSource: '2,156个跟进案例',
  711. confidence: 91,
  712. improvement: '+38%',
  713. status: 'pending',
  714. favorite: false,
  715. effectProgress: 0,
  716. timeToImplement: '即时生效',
  717. implementationSteps: [
  718. { title: '设置跟进提醒', description: '系统在最优时机自动提醒跟进' },
  719. { title: 'SOP自动化', description: '自动创建跟进任务' }
  720. ],
  721. impact: { opens: '+25%', replies: '+38%', conversions: '+28%', revenue: '¥110K/月' },
  722. abTestResults: null
  723. },
  724. {
  725. id: 8,
  726. icon: 'fas fa-file-alt',
  727. iconBg: 'rgba(6, 182, 212, 0.2)',
  728. iconColor: 'var(--info)',
  729. title: '附件命名策略',
  730. description: '使用"公司名_产品名_日期.pdf"格式命名附件,打开率提升22%',
  731. category: '内容优化',
  732. tags: ['附件', '命名规范', '专业度'],
  733. dataSource: '4,532封带附件邮件',
  734. confidence: 82,
  735. improvement: '+22%',
  736. status: 'pending',
  737. favorite: false,
  738. effectProgress: 0,
  739. timeToImplement: '即时生效',
  740. implementationSteps: [
  741. { title: '启用自动命名', description: '附件自动按规范命名' }
  742. ],
  743. impact: { opens: '+22%', replies: '+15%', conversions: '+8%', revenue: '¥65K/月' },
  744. abTestResults: { control: 45, test: 55 }
  745. },
  746. // ========== 受众细分策略 ==========
  747. {
  748. id: 9,
  749. icon: 'fas fa-building',
  750. iconBg: 'rgba(236, 72, 153, 0.2)',
  751. iconColor: '#EC4899',
  752. title: '企业规模分层触达',
  753. description: '大型企业(500+人)优先电话+视频会议,中小型企业优先邮件+WhatsApp,转化率提升45%',
  754. category: '受众细分',
  755. tags: ['企业规模', '分层触达', '转化率'],
  756. dataSource: '1,247个客户案例',
  757. confidence: 94,
  758. improvement: '+45%',
  759. status: 'applied',
  760. favorite: true,
  761. effectProgress: 82,
  762. timeToImplement: '3-5天',
  763. implementationSteps: [
  764. { title: '客户规模分类', description: '按员工数量自动分类客户' },
  765. { title: '触达渠道配置', description: '为不同规模客户配置最优渠道' },
  766. { title: '话术模板匹配', description: '自动匹配对应规模的话术模板' }
  767. ],
  768. impact: { opens: '+35%', replies: '+45%', conversions: '+38%', revenue: '¥280K/月' },
  769. abTestResults: { control: 18, test: 28 }
  770. },
  771. {
  772. id: 10,
  773. icon: 'fas fa-globe-americas',
  774. iconBg: 'rgba(34, 197, 94, 0.2)',
  775. iconColor: '#22C55E',
  776. title: '地区文化适配策略',
  777. description: '中东客户重视关系建立,欧美客户重视数据证明,需采用不同沟通策略',
  778. category: '受众细分',
  779. tags: ['地区', '文化适配', '沟通策略'],
  780. dataSource: '3,892封跨区域邮件',
  781. confidence: 88,
  782. improvement: '+56%',
  783. status: 'applied',
  784. favorite: true,
  785. effectProgress: 75,
  786. timeToImplement: '5-7天',
  787. implementationSteps: [
  788. { title: '地区标签设置', description: '为客户添加地区标签' },
  789. { title: '文化特征分析', description: 'AI分析各地区沟通偏好' },
  790. { title: '话术库建立', description: '建立各地区专属话术库' }
  791. ],
  792. impact: { opens: '+42%', replies: '+56%', conversions: '+32%', revenue: '¥195K/月' },
  793. abTestResults: { control: 22, test: 35 }
  794. },
  795. {
  796. id: 11,
  797. icon: 'fas fa-industry',
  798. iconBg: 'rgba(168, 85, 247, 0.2)',
  799. iconColor: '#A855F7',
  800. title: '行业垂直化内容',
  801. description: '针对数据中心、消费电子、安防监控三个行业,使用行业专属案例和术语,响应率提升68%',
  802. category: '受众细分',
  803. tags: ['行业', '垂直化', '案例营销'],
  804. dataSource: '856个行业客户',
  805. confidence: 91,
  806. improvement: '+68%',
  807. status: 'pending',
  808. favorite: false,
  809. effectProgress: 0,
  810. timeToImplement: '7-10天',
  811. implementationSteps: [
  812. { title: '行业分类标记', description: '为客户标记所属行业' },
  813. { title: '行业案例库', description: 'AI生成行业专属案例内容' },
  814. { title: '术语优化', description: '使用行业专业术语增强专业度' }
  815. ],
  816. impact: { opens: '+48%', replies: '+68%', conversions: '+42%', revenue: '¥320K/月' },
  817. abTestResults: null
  818. },
  819. {
  820. id: 12,
  821. icon: 'fas fa-history',
  822. iconBg: 'rgba(251, 146, 60, 0.2)',
  823. iconColor: '#FB923C',
  824. title: '采购周期识别',
  825. description: '识别客户采购周期(季度/年度预算),在预算审批前2周主动触达,成交率提升35%',
  826. category: '受众细分',
  827. tags: ['采购周期', '预算', '时机'],
  828. dataSource: '2,345个采购记录',
  829. confidence: 86,
  830. improvement: '+35%',
  831. status: 'pending',
  832. favorite: false,
  833. effectProgress: 0,
  834. timeToImplement: '3-5天',
  835. implementationSteps: [
  836. { title: '周期模式识别', description: 'AI分析客户历史采购时间' },
  837. { title: '提醒设置', description: '在预算审批前自动提醒' },
  838. { title: '主动触达', description: '自动发送预算方案' }
  839. ],
  840. impact: { opens: '+38%', replies: '+35%', conversions: '+35%', revenue: '¥175K/月' },
  841. abTestResults: { control: 15, test: 22 }
  842. },
  843. {
  844. id: 13,
  845. icon: 'fas fa-fire',
  846. iconBg: 'rgba(239, 68, 68, 0.2)',
  847. iconColor: '#EF4444',
  848. title: '高意向客户优先级',
  849. description: '基于行为数据(多次打开邮件、访问定价页)识别高意向客户,优先分配销售资源',
  850. category: '受众细分',
  851. tags: ['高意向', '行为分析', '资源分配'],
  852. dataSource: '12,847条行为记录',
  853. confidence: 93,
  854. improvement: '+52%',
  855. status: 'applied',
  856. favorite: true,
  857. effectProgress: 88,
  858. timeToImplement: '即时生效',
  859. implementationSteps: [
  860. { title: '行为追踪启用', description: '追踪邮件打开、页面访问等行为' },
  861. { title: '意向评分模型', description: 'AI计算客户意向分数' },
  862. { title: '优先级队列', description: '高意向客户自动置顶' }
  863. ],
  864. impact: { opens: '+42%', replies: '+52%', conversions: '+48%', revenue: '¥350K/月' },
  865. abTestResults: { control: 12, test: 22 }
  866. },
  867. // ========== 渠道策略 ==========
  868. {
  869. id: 14,
  870. icon: 'fab fa-whatsapp',
  871. iconBg: 'rgba(37, 211, 102, 0.2)',
  872. iconColor: '#25D366',
  873. title: 'WhatsApp即时跟进',
  874. description: '邮件未回复48小时后,自动通过WhatsApp发送温馨提醒,回复率提升125%',
  875. category: '渠道策略',
  876. tags: ['WhatsApp', '多渠道', '跟进'],
  877. dataSource: '1,567个跟进案例',
  878. confidence: 89,
  879. improvement: '+125%',
  880. status: 'applied',
  881. favorite: true,
  882. effectProgress: 72,
  883. timeToImplement: '即时生效',
  884. implementationSteps: [
  885. { title: '规则配置', description: '设置48小时未回复触发规则' },
  886. { title: '模板创建', description: '创建WhatsApp跟进模板' },
  887. { title: '自动发送', description: '系统自动发送提醒消息' }
  888. ],
  889. impact: { opens: '+85%', replies: '+125%', conversions: '+55%', revenue: '¥165K/月' },
  890. abTestResults: { control: 8, test: 18 }
  891. },
  892. {
  893. id: 15,
  894. icon: 'fas fa-phone-alt',
  895. iconBg: 'rgba(59, 130, 246, 0.2)',
  896. iconColor: '#3B82F6',
  897. title: '电话+邮件组合策略',
  898. description: '高价值客户(年采购$100K+)采用电话预热+邮件详情+电话跟进的组合策略',
  899. category: '渠道策略',
  900. tags: ['电话', '组合营销', '高价值'],
  901. dataSource: '234个高价值客户',
  902. confidence: 92,
  903. improvement: '+78%',
  904. status: 'applied',
  905. favorite: false,
  906. effectProgress: 65,
  907. timeToImplement: '即时生效',
  908. implementationSteps: [
  909. { title: '高价值客户筛选', description: '识别年采购$100K+客户' },
  910. { title: '组合流程设计', description: '设计电话-邮件-电话流程' },
  911. { title: '执行监控', description: '监控组合策略执行效果' }
  912. ],
  913. impact: { opens: '+65%', replies: '+78%', conversions: '+62%', revenue: '¥420K/月' },
  914. abTestResults: { control: 18, test: 32 }
  915. },
  916. {
  917. id: 16,
  918. icon: 'fas fa-video',
  919. iconBg: 'rgba(236, 72, 153, 0.2)',
  920. iconColor: '#EC4899',
  921. title: '视频会议预约策略',
  922. description: '邮件中嵌入视频会议预约链接,相比纯文字邮件,预约率提升85%',
  923. category: '渠道策略',
  924. tags: ['视频会议', '预约', '互动'],
  925. dataSource: '678封邮件对比',
  926. confidence: 87,
  927. improvement: '+85%',
  928. status: 'pending',
  929. favorite: false,
  930. effectProgress: 0,
  931. timeToImplement: '3-5天',
  932. implementationSteps: [
  933. { title: '预约系统集成', description: '集成Calendly等预约工具' },
  934. { title: '邮件模板更新', description: '在邮件中添加预约链接' },
  935. { title: '自动提醒', description: '预约后自动发送提醒' }
  936. ],
  937. impact: { opens: '+35%', replies: '+85%', conversions: '+45%', revenue: '¥135K/月' },
  938. abTestResults: { control: 12, test: 22 }
  939. },
  940. {
  941. id: 17,
  942. icon: 'fab fa-weixin',
  943. iconBg: 'rgba(7, 193, 96, 0.2)',
  944. iconColor: '#07C160',
  945. title: '微信企业号触达',
  946. description: '中国客户优先使用微信企业号,比邮件打开率高3倍,建议建立微信触达流程',
  947. category: '渠道策略',
  948. tags: ['微信', '中国客户', '触达'],
  949. dataSource: '456个中国客户',
  950. confidence: 95,
  951. improvement: '+200%',
  952. status: 'pending',
  953. favorite: true,
  954. effectProgress: 0,
  955. timeToImplement: '5-7天',
  956. implementationSteps: [
  957. { title: '企业微信配置', description: '配置企业微信机器人' },
  958. { title: '客户绑定', description: '邀请客户绑定微信' },
  959. { title: '消息模板', description: '创建微信消息模板' }
  960. ],
  961. impact: { opens: '+200%', replies: '+150%', conversions: '+80%', revenue: '¥250K/月' },
  962. abTestResults: null
  963. },
  964. {
  965. id: 18,
  966. icon: 'fas fa-robot',
  967. iconBg: 'rgba(139, 92, 246, 0.2)',
  968. iconColor: '#8B5CF6',
  969. title: 'AI聊天机器人预筛选',
  970. description: '官网集成AI聊天机器人,自动收集客户需求后转交销售,有效线索提升40%',
  971. category: '渠道策略',
  972. tags: ['AI机器人', '线索收集', '官网'],
  973. dataSource: '3,245次网站访问',
  974. confidence: 84,
  975. improvement: '+40%',
  976. status: 'pending',
  977. favorite: false,
  978. effectProgress: 0,
  979. timeToImplement: '7-14天',
  980. implementationSteps: [
  981. { title: '机器人配置', description: '配置AI对话流程' },
  982. { title: '需求收集表单', description: '设计需求收集表单' },
  983. { title: 'CRM集成', description: '自动同步到CRM系统' }
  984. ],
  985. impact: { opens: '+30%', replies: '+40%', conversions: '+35%', revenue: '¥180K/月' },
  986. abTestResults: { control: 8, test: 12 }
  987. },
  988. {
  989. id: 19,
  990. icon: 'fas fa-bullhorn',
  991. iconBg: 'rgba(245, 158, 11, 0.2)',
  992. iconColor: '#F59E0B',
  993. title: '多渠道协同触达',
  994. description: '邮件+LinkedIn+WhatsApp三渠道协同触达,比单一渠道转化率高65%',
  995. category: '渠道策略',
  996. tags: ['多渠道', '协同', '转化率'],
  997. dataSource: '1,892个触达案例',
  998. confidence: 91,
  999. improvement: '+65%',
  1000. status: 'applied',
  1001. favorite: true,
  1002. effectProgress: 78,
  1003. timeToImplement: '5-7天',
  1004. implementationSteps: [
  1005. { title: '渠道顺序设计', description: '设计最优渠道触达顺序' },
  1006. { title: '内容适配', description: '为不同渠道适配内容格式' },
  1007. { title: '自动化流程', description: '建立自动化触达流程' }
  1008. ],
  1009. impact: { opens: '+55%', replies: '+65%', conversions: '+65%', revenue: '¥290K/月' },
  1010. abTestResults: { control: 15, test: 25 }
  1011. },
  1012. {
  1013. id: 20,
  1014. icon: 'fas fa-envelope-open-text',
  1015. iconBg: 'rgba(6, 182, 212, 0.2)',
  1016. iconColor: '#06B6D4',
  1017. title: 'EDM邮件营销优化',
  1018. description: '月度Newsletter添加行业动态+产品更新+客户案例三合一内容,打开率稳定在42%',
  1019. category: '渠道策略',
  1020. tags: ['EDM', 'Newsletter', '内容营销'],
  1021. dataSource: '12期Newsletter数据',
  1022. confidence: 88,
  1023. improvement: '+28%',
  1024. status: 'applied',
  1025. favorite: false,
  1026. effectProgress: 85,
  1027. timeToImplement: '即时生效',
  1028. implementationSteps: [
  1029. { title: '内容模板设计', description: '设计三合一内容模板' },
  1030. { title: '自动化发送', description: '设置月度自动发送' },
  1031. { title: '效果追踪', description: '追踪打开率和点击率' }
  1032. ],
  1033. impact: { opens: '+28%', replies: '+22%', conversions: '+15%', revenue: '¥95K/月' },
  1034. abTestResults: { control: 32, test: 42 }
  1035. }
  1036. ])
  1037. const historyItems = ref([
  1038. { type: 'apply', title: '应用策略:最佳邮件发送时间', description: '策略已生效,预计提升35%打开率', time: '14:30', date: '今天', category: '触达时机', strategy: { confidence: 92, improvement: '+35%', revenue: '¥128K/月' } },
  1039. { type: 'optimize', title: '策略优化:德国本地化话术', description: '基于新数据调整了邮件模板', time: '10:15', date: '今天', category: '内容优化', strategy: { confidence: 90, improvement: '+130%' } },
  1040. { type: 'discover', title: '新策略发现:跟进频率优化', description: 'AI分析发现最佳跟进时机', time: '16:45', date: '昨天', category: '触达时机', strategy: { confidence: 91, improvement: '+38%' } },
  1041. { type: 'apply', title: '应用策略:LinkedIn个性化连接', description: '策略已生效', time: '09:00', date: '昨天', category: '渠道策略', strategy: { confidence: 87, improvement: '+210%', revenue: '¥150K/月' } },
  1042. { type: 'result', title: '效果报告:采购决策人识别', description: '应用30天,转化率提升20%', time: '11:30', date: '3天前', category: '受众细分', strategy: { confidence: 89, improvement: '+40%', revenue: '¥180K/月' } },
  1043. { type: 'apply', title: '应用策略:企业规模分层触达', description: '大型企业优先电话跟进', time: '15:20', date: '3天前', category: '受众细分', strategy: { confidence: 94, improvement: '+45%', revenue: '¥280K/月' } },
  1044. { type: 'discover', title: '新策略发现:WhatsApp即时跟进', description: '邮件未回复48小时后通过WhatsApp提醒', time: '14:00', date: '5天前', category: '渠道策略', strategy: { confidence: 89, improvement: '+125%' } },
  1045. { type: 'result', title: '效果报告:地区文化适配策略', description: '应用15天,中东客户回复率提升56%', time: '10:45', date: '5天前', category: '受众细分', strategy: { confidence: 88, improvement: '+56%', revenue: '¥195K/月' } },
  1046. { type: 'optimize', title: '策略优化:邮件标题数字效应', description: '新增5个有效数字模板', time: '09:30', date: '一周前', category: '内容优化', strategy: { confidence: 76, improvement: '+42%' } },
  1047. { type: 'apply', title: '应用策略:高意向客户优先级', description: '行为数据分析识别高意向客户', time: '16:00', date: '一周前', category: '受众细分', strategy: { confidence: 93, improvement: '+52%', revenue: '¥350K/月' } },
  1048. { type: 'result', title: '效果报告:最佳邮件发送时间', description: '应用60天,打开率稳定提升32%', time: '14:15', date: '一周前', category: '触达时机', strategy: { confidence: 92, improvement: '+35%', revenue: '¥128K/月' } },
  1049. { type: 'discover', title: '新策略发现:微信企业号触达', description: '中国客户打开率提升200%', time: '11:00', date: '两周前', category: '渠道策略', strategy: { confidence: 95, improvement: '+200%' } }
  1050. ])
  1051. const filteredStrategies = computed(() => {
  1052. let result = strategies.value
  1053. // Filter by tab - 按 category 字段筛选
  1054. if (filterTab.value !== 'all') {
  1055. const categoryMap = {
  1056. timing: '触达时机',
  1057. content: '内容优化',
  1058. audience: '受众细分',
  1059. channel: '渠道策略'
  1060. }
  1061. result = result.filter(s => s.category === categoryMap[filterTab.value])
  1062. }
  1063. // Filter by search
  1064. if (searchQuery.value) {
  1065. const query = searchQuery.value.toLowerCase()
  1066. result = result.filter(s =>
  1067. s.title.toLowerCase().includes(query) ||
  1068. s.description.toLowerCase().includes(query) ||
  1069. s.tags.some(t => t.toLowerCase().includes(query))
  1070. )
  1071. }
  1072. // Sort
  1073. if (sortBy.value === 'confidence') {
  1074. result = [...result].sort((a, b) => b.confidence - a.confidence)
  1075. } else if (sortBy.value === 'improvement') {
  1076. result = [...result].sort((a, b) => {
  1077. const aVal = parseInt(a.improvement.replace(/[^0-9]/g, ''))
  1078. const bVal = parseInt(b.improvement.replace(/[^0-9]/g, ''))
  1079. return bVal - aVal
  1080. })
  1081. }
  1082. return result
  1083. })
  1084. const avgImprovement = computed(() => {
  1085. const total = strategies.value.reduce((sum, s) => {
  1086. return sum + parseInt(s.improvement.replace(/[^0-9]/g, ''))
  1087. }, 0)
  1088. return Math.round(total / strategies.value.length)
  1089. })
  1090. const totalRevenueImpact = computed(() => {
  1091. return strategies.value.reduce((sum, s) => {
  1092. const revenue = parseInt(s.impact.revenue.replace(/[^0-9]/g, ''))
  1093. return sum + revenue
  1094. }, 0)
  1095. })
  1096. // History computed
  1097. const filteredHistoryItems = computed(() => {
  1098. let result = historyItems.value
  1099. if (historySearch.value) {
  1100. const query = historySearch.value.toLowerCase()
  1101. result = result.filter(item =>
  1102. item.title.toLowerCase().includes(query) ||
  1103. item.description.toLowerCase().includes(query)
  1104. )
  1105. }
  1106. if (historyFilter.value.type) {
  1107. result = result.filter(item => item.type === historyFilter.value.type)
  1108. }
  1109. return result
  1110. })
  1111. const appliedStrategyCount = computed(() => historyItems.value.filter(h => h.type === 'apply').length)
  1112. const discoveredStrategyCount = computed(() => historyItems.value.filter(h => h.type === 'discover').length)
  1113. const optimizedStrategyCount = computed(() => historyItems.value.filter(h => h.type === 'optimize').length)
  1114. const totalImprovementFromHistory = computed(() => {
  1115. const items = historyItems.value.filter(h => h.strategy?.improvement)
  1116. if (items.length === 0) return 0
  1117. return Math.round(items.reduce((sum, h) => sum + parseInt(h.strategy.improvement.replace(/[^0-9]/g, '')), 0) / items.length)
  1118. })
  1119. const typeDistribution = computed(() => {
  1120. const total = historyItems.value.length
  1121. return {
  1122. apply: Math.round(historyItems.value.filter(h => h.type === 'apply').length / total * 100),
  1123. discover: Math.round(historyItems.value.filter(h => h.type === 'discover').length / total * 100),
  1124. optimize: Math.round(historyItems.value.filter(h => h.type === 'optimize').length / total * 100),
  1125. result: Math.round(historyItems.value.filter(h => h.type === 'result').length / total * 100)
  1126. }
  1127. })
  1128. const avgOpenRateImprovement = computed(() => 35)
  1129. const avgReplyRateImprovement = computed(() => 52)
  1130. const avgConversionImprovement = computed(() => 38)
  1131. const totalRevenueFromHistory = computed(() => 1688)
  1132. const topStrategies = computed(() => [
  1133. { name: 'LinkedIn个性化连接', category: '渠道策略', improvement: '+210%' },
  1134. { name: '微信企业号触达', category: '渠道策略', improvement: '+200%' },
  1135. { name: '德国市场本地化话术', category: '内容优化', improvement: '+130%' },
  1136. { name: 'WhatsApp即时跟进', category: '渠道策略', improvement: '+125%' },
  1137. { name: '高意向客户优先级', category: '受众细分', improvement: '+52%' }
  1138. ])
  1139. const formatNumber = (num) => {
  1140. if (num >= 1000) {
  1141. return (num / 1000).toFixed(1) + 'M'
  1142. }
  1143. return num.toLocaleString()
  1144. }
  1145. const filterStrategies = (type) => {
  1146. filterTab.value = type
  1147. }
  1148. const showStrategyDetail = (strategy) => {
  1149. selectedStrategy.value = strategy
  1150. showDetailModal.value = true
  1151. }
  1152. const applyStrategy = (strategy) => {
  1153. strategy.status = 'applied'
  1154. showDetailModal.value = false
  1155. showToastMessage(`策略"${strategy.title}"已应用`, 'success')
  1156. }
  1157. const toggleFavorite = (strategy) => {
  1158. strategy.favorite = !strategy.favorite
  1159. showToastMessage(strategy.favorite ? '已添加收藏' : '已取消收藏', 'success')
  1160. }
  1161. const refreshStrategies = () => {
  1162. isRefreshing.value = true
  1163. setTimeout(() => {
  1164. isRefreshing.value = false
  1165. showToastMessage('策略已刷新,发现 2 个新策略', 'success')
  1166. }, 2000)
  1167. }
  1168. const exportReport = () => {
  1169. showToastMessage('策略报告已导出', 'success')
  1170. }
  1171. // History functions
  1172. const getHistoryTypeIcon = (type) => {
  1173. const icons = { apply: 'fas fa-check', optimize: 'fas fa-sync', discover: 'fas fa-lightbulb', result: 'fas fa-chart-line' }
  1174. return icons[type] || 'fas fa-circle'
  1175. }
  1176. const getHistoryTypeLabel = (type) => {
  1177. const labels = { apply: '应用策略', optimize: '策略优化', discover: '新策略发现', result: '效果报告' }
  1178. return labels[type] || type
  1179. }
  1180. const viewHistoryStrategy = (item) => {
  1181. const strategy = strategies.value.find(s => item.title.includes(s.title))
  1182. if (strategy) {
  1183. selectedStrategy.value = strategy
  1184. showDetailModal.value = true
  1185. showHistoryModal.value = false
  1186. } else {
  1187. showToastMessage('查看策略详情', 'info')
  1188. }
  1189. }
  1190. const viewHistoryReport = (item) => {
  1191. showToastMessage(`正在生成"${item.title}"的效果报告`, 'info')
  1192. }
  1193. const exportHistoryReport = () => {
  1194. showToastMessage('策略历史报告已导出', 'success')
  1195. }
  1196. const showToastMessage = (message, type = 'success') => {
  1197. toastMessage.value = message
  1198. toastType.value = type
  1199. showToast.value = true
  1200. setTimeout(() => {
  1201. showToast.value = false
  1202. }, 3000)
  1203. }
  1204. </script>
  1205. <style scoped>
  1206. .strategy-page {
  1207. flex: 1;
  1208. display: flex;
  1209. flex-direction: column;
  1210. padding: 24px;
  1211. overflow-y: auto;
  1212. background: var(--bg-dark);
  1213. }
  1214. .strategy-header {
  1215. display: flex;
  1216. justify-content: space-between;
  1217. align-items: flex-start;
  1218. margin-bottom: 24px;
  1219. }
  1220. .header-left {
  1221. display: flex;
  1222. flex-direction: column;
  1223. gap: 4px;
  1224. }
  1225. .data-title {
  1226. font-size: 20px;
  1227. font-weight: 600;
  1228. }
  1229. .header-desc {
  1230. font-size: 13px;
  1231. color: var(--text-secondary);
  1232. }
  1233. /* Stats Row */
  1234. .stats-row {
  1235. display: grid;
  1236. grid-template-columns: repeat(5, 1fr);
  1237. gap: 16px;
  1238. margin-bottom: 24px;
  1239. }
  1240. .stat-card-lg {
  1241. display: flex;
  1242. align-items: center;
  1243. gap: 14px;
  1244. padding: 18px;
  1245. background: var(--bg-card);
  1246. border-radius: 14px;
  1247. border: 1px solid var(--border);
  1248. cursor: pointer;
  1249. transition: all 0.2s;
  1250. }
  1251. .stat-card-lg:hover {
  1252. border-color: var(--primary);
  1253. }
  1254. .stat-icon-lg {
  1255. width: 48px;
  1256. height: 48px;
  1257. border-radius: 12px;
  1258. display: flex;
  1259. align-items: center;
  1260. justify-content: center;
  1261. font-size: 20px;
  1262. background: rgba(99, 102, 241, 0.2);
  1263. color: var(--primary);
  1264. }
  1265. .stat-icon-lg.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1266. .stat-icon-lg.orange { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1267. .stat-icon-lg.purple { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1268. .stat-content-lg h3 {
  1269. font-size: 24px;
  1270. font-weight: 700;
  1271. }
  1272. .stat-content-lg p {
  1273. font-size: 12px;
  1274. color: var(--text-secondary);
  1275. }
  1276. /* Tabs Row */
  1277. .tabs-row {
  1278. display: flex;
  1279. justify-content: space-between;
  1280. align-items: center;
  1281. margin-bottom: 20px;
  1282. padding-bottom: 12px;
  1283. border-bottom: 1px solid var(--border);
  1284. }
  1285. .tabs {
  1286. display: flex;
  1287. gap: 4px;
  1288. }
  1289. .tab-item {
  1290. padding: 8px 16px;
  1291. border-radius: 8px;
  1292. cursor: pointer;
  1293. font-size: 13px;
  1294. color: var(--text-secondary);
  1295. display: flex;
  1296. align-items: center;
  1297. gap: 6px;
  1298. transition: all 0.2s;
  1299. }
  1300. .tab-item:hover {
  1301. background: var(--bg-hover);
  1302. }
  1303. .tab-item.active {
  1304. background: var(--bg-hover);
  1305. color: var(--text-primary);
  1306. font-weight: 600;
  1307. }
  1308. .tab-count {
  1309. font-size: 11px;
  1310. padding: 2px 6px;
  1311. background: var(--bg-dark);
  1312. border-radius: 10px;
  1313. color: var(--text-muted);
  1314. }
  1315. .tab-item.active .tab-count {
  1316. background: var(--primary);
  1317. color: white;
  1318. }
  1319. .search-filter {
  1320. display: flex;
  1321. gap: 12px;
  1322. }
  1323. .search-box-small {
  1324. position: relative;
  1325. width: 200px;
  1326. }
  1327. .search-box-small i {
  1328. position: absolute;
  1329. left: 12px;
  1330. top: 50%;
  1331. transform: translateY(-50%);
  1332. color: var(--text-muted);
  1333. font-size: 12px;
  1334. }
  1335. .search-box-small input {
  1336. width: 100%;
  1337. padding: 8px 12px 8px 32px;
  1338. background: var(--bg-hover);
  1339. border: 1px solid var(--border);
  1340. border-radius: 8px;
  1341. color: var(--text-primary);
  1342. font-size: 13px;
  1343. }
  1344. .search-box-small input:focus {
  1345. outline: none;
  1346. border-color: var(--primary);
  1347. }
  1348. .filter-select {
  1349. padding: 8px 12px;
  1350. background: var(--bg-hover);
  1351. border: 1px solid var(--border);
  1352. border-radius: 8px;
  1353. color: var(--text-primary);
  1354. font-size: 13px;
  1355. }
  1356. /* Strategy Grid */
  1357. .strategy-grid {
  1358. display: grid;
  1359. grid-template-columns: repeat(3, 1fr);
  1360. gap: 16px;
  1361. }
  1362. .strategy-card {
  1363. background: var(--bg-card);
  1364. border: 1px solid var(--border);
  1365. border-radius: 14px;
  1366. padding: 20px;
  1367. cursor: pointer;
  1368. transition: all 0.2s;
  1369. }
  1370. .strategy-card:hover {
  1371. border-color: var(--primary);
  1372. transform: translateY(-2px);
  1373. }
  1374. .strategy-card.applied {
  1375. border-color: rgba(16, 185, 129, 0.3);
  1376. }
  1377. .card-header {
  1378. display: flex;
  1379. justify-content: space-between;
  1380. align-items: flex-start;
  1381. margin-bottom: 12px;
  1382. }
  1383. .card-icon {
  1384. width: 40px;
  1385. height: 40px;
  1386. border-radius: 10px;
  1387. display: flex;
  1388. align-items: center;
  1389. justify-content: center;
  1390. font-size: 16px;
  1391. }
  1392. .card-badges {
  1393. display: flex;
  1394. gap: 6px;
  1395. }
  1396. .badge {
  1397. font-size: 10px;
  1398. padding: 3px 8px;
  1399. border-radius: 10px;
  1400. }
  1401. .badge.applied {
  1402. background: rgba(16, 185, 129, 0.2);
  1403. color: var(--success);
  1404. }
  1405. .badge.pending {
  1406. background: rgba(245, 158, 11, 0.2);
  1407. color: var(--warning);
  1408. }
  1409. .badge.confidence {
  1410. background: rgba(245, 158, 11, 0.2);
  1411. color: var(--warning);
  1412. }
  1413. .badge.confidence.high {
  1414. background: rgba(16, 185, 129, 0.2);
  1415. color: var(--success);
  1416. }
  1417. .card-title {
  1418. font-size: 14px;
  1419. font-weight: 600;
  1420. margin-bottom: 8px;
  1421. }
  1422. .card-desc {
  1423. font-size: 12px;
  1424. color: var(--text-secondary);
  1425. margin-bottom: 12px;
  1426. line-height: 1.5;
  1427. }
  1428. .card-tags {
  1429. display: flex;
  1430. flex-wrap: wrap;
  1431. gap: 6px;
  1432. margin-bottom: 12px;
  1433. }
  1434. .tag {
  1435. font-size: 10px;
  1436. padding: 3px 8px;
  1437. background: var(--bg-hover);
  1438. border-radius: 10px;
  1439. color: var(--text-secondary);
  1440. }
  1441. .card-metrics {
  1442. display: flex;
  1443. flex-direction: column;
  1444. gap: 6px;
  1445. margin-bottom: 12px;
  1446. padding: 12px;
  1447. background: var(--bg-hover);
  1448. border-radius: 8px;
  1449. }
  1450. .metric {
  1451. display: flex;
  1452. justify-content: space-between;
  1453. font-size: 11px;
  1454. }
  1455. .metric-label {
  1456. color: var(--text-muted);
  1457. }
  1458. .metric-value {
  1459. font-weight: 500;
  1460. }
  1461. .metric-value.highlight {
  1462. color: var(--success);
  1463. font-weight: 600;
  1464. }
  1465. .card-progress {
  1466. margin-bottom: 12px;
  1467. }
  1468. .progress-header {
  1469. display: flex;
  1470. justify-content: space-between;
  1471. font-size: 11px;
  1472. margin-bottom: 6px;
  1473. }
  1474. .progress-bar {
  1475. height: 4px;
  1476. background: var(--bg-dark);
  1477. border-radius: 2px;
  1478. overflow: hidden;
  1479. }
  1480. .progress-fill {
  1481. height: 100%;
  1482. background: var(--success);
  1483. border-radius: 2px;
  1484. }
  1485. .card-actions {
  1486. display: flex;
  1487. gap: 8px;
  1488. }
  1489. .btn-success {
  1490. background: rgba(16, 185, 129, 0.2);
  1491. color: var(--success);
  1492. border: 1px solid var(--success);
  1493. }
  1494. .btn-success:hover {
  1495. background: var(--success);
  1496. color: white;
  1497. }
  1498. /* Modal */
  1499. .modal-overlay {
  1500. position: fixed;
  1501. top: 0;
  1502. left: 0;
  1503. right: 0;
  1504. bottom: 0;
  1505. background: rgba(0, 0, 0, 0.7);
  1506. display: flex;
  1507. align-items: center;
  1508. justify-content: center;
  1509. z-index: 1000;
  1510. padding: 20px;
  1511. }
  1512. .modal {
  1513. background: var(--bg-card);
  1514. border-radius: 16px;
  1515. width: 100%;
  1516. max-width: 700px;
  1517. max-height: 90vh;
  1518. overflow: hidden;
  1519. display: flex;
  1520. flex-direction: column;
  1521. }
  1522. .strategy-detail-modal {
  1523. max-width: 800px;
  1524. }
  1525. .modal-header {
  1526. display: flex;
  1527. justify-content: space-between;
  1528. align-items: center;
  1529. padding: 20px;
  1530. border-bottom: 1px solid var(--border);
  1531. }
  1532. .modal-title {
  1533. display: flex;
  1534. align-items: center;
  1535. gap: 12px;
  1536. }
  1537. .modal-title h3 {
  1538. font-size: 16px;
  1539. font-weight: 600;
  1540. }
  1541. .modal-title p {
  1542. font-size: 12px;
  1543. color: var(--text-secondary);
  1544. }
  1545. .title-icon {
  1546. width: 44px;
  1547. height: 44px;
  1548. border-radius: 12px;
  1549. display: flex;
  1550. align-items: center;
  1551. justify-content: center;
  1552. font-size: 18px;
  1553. }
  1554. .modal-close {
  1555. width: 32px;
  1556. height: 32px;
  1557. background: var(--bg-hover);
  1558. border: none;
  1559. border-radius: 8px;
  1560. color: var(--text-secondary);
  1561. cursor: pointer;
  1562. display: flex;
  1563. align-items: center;
  1564. justify-content: center;
  1565. }
  1566. .modal-close:hover {
  1567. background: var(--border);
  1568. color: var(--text-primary);
  1569. }
  1570. .modal-body {
  1571. flex: 1;
  1572. overflow-y: auto;
  1573. padding: 20px;
  1574. }
  1575. .modal-footer {
  1576. display: flex;
  1577. justify-content: flex-end;
  1578. gap: 12px;
  1579. padding: 20px;
  1580. border-top: 1px solid var(--border);
  1581. }
  1582. /* Detail Sections */
  1583. .detail-section {
  1584. margin-bottom: 24px;
  1585. }
  1586. .detail-section h4 {
  1587. font-size: 14px;
  1588. font-weight: 600;
  1589. margin-bottom: 12px;
  1590. display: flex;
  1591. align-items: center;
  1592. gap: 8px;
  1593. color: var(--text-primary);
  1594. }
  1595. .detail-section h4 i {
  1596. color: var(--primary);
  1597. }
  1598. .detail-section p {
  1599. font-size: 13px;
  1600. color: var(--text-secondary);
  1601. line-height: 1.6;
  1602. }
  1603. .detail-tags {
  1604. display: flex;
  1605. flex-wrap: wrap;
  1606. gap: 6px;
  1607. margin-top: 12px;
  1608. }
  1609. /* Analysis Grid */
  1610. .analysis-grid {
  1611. display: grid;
  1612. grid-template-columns: repeat(4, 1fr);
  1613. gap: 12px;
  1614. }
  1615. .analysis-item {
  1616. background: var(--bg-hover);
  1617. border-radius: 10px;
  1618. padding: 16px;
  1619. text-align: center;
  1620. }
  1621. .analysis-value {
  1622. font-size: 18px;
  1623. font-weight: 700;
  1624. margin-bottom: 4px;
  1625. }
  1626. .analysis-value.highlight {
  1627. color: var(--primary);
  1628. }
  1629. .analysis-value.success {
  1630. color: var(--success);
  1631. }
  1632. .analysis-label {
  1633. font-size: 11px;
  1634. color: var(--text-muted);
  1635. }
  1636. /* Steps List */
  1637. .steps-list {
  1638. display: flex;
  1639. flex-direction: column;
  1640. gap: 12px;
  1641. }
  1642. .step-item {
  1643. display: flex;
  1644. gap: 12px;
  1645. padding: 12px;
  1646. background: var(--bg-hover);
  1647. border-radius: 10px;
  1648. align-items: flex-start;
  1649. }
  1650. .step-item.completed {
  1651. background: rgba(16, 185, 129, 0.1);
  1652. }
  1653. .step-number {
  1654. width: 24px;
  1655. height: 24px;
  1656. background: var(--primary);
  1657. color: white;
  1658. border-radius: 50%;
  1659. display: flex;
  1660. align-items: center;
  1661. justify-content: center;
  1662. font-size: 12px;
  1663. font-weight: 600;
  1664. flex-shrink: 0;
  1665. }
  1666. .step-item.completed .step-number {
  1667. background: var(--success);
  1668. }
  1669. .step-content {
  1670. flex: 1;
  1671. }
  1672. .step-title {
  1673. font-size: 13px;
  1674. font-weight: 600;
  1675. margin-bottom: 4px;
  1676. }
  1677. .step-desc {
  1678. font-size: 11px;
  1679. color: var(--text-secondary);
  1680. }
  1681. .step-check {
  1682. color: var(--success);
  1683. font-size: 16px;
  1684. }
  1685. /* Impact Cards */
  1686. .impact-cards {
  1687. display: grid;
  1688. grid-template-columns: repeat(4, 1fr);
  1689. gap: 12px;
  1690. }
  1691. .impact-card {
  1692. background: var(--bg-hover);
  1693. border-radius: 10px;
  1694. padding: 16px;
  1695. text-align: center;
  1696. }
  1697. .impact-card i {
  1698. font-size: 24px;
  1699. color: var(--primary);
  1700. margin-bottom: 8px;
  1701. }
  1702. .impact-card.highlight {
  1703. background: rgba(16, 185, 129, 0.1);
  1704. border: 1px solid rgba(16, 185, 129, 0.2);
  1705. }
  1706. .impact-card.highlight i {
  1707. color: var(--success);
  1708. }
  1709. .impact-value {
  1710. font-size: 18px;
  1711. font-weight: 700;
  1712. margin-bottom: 4px;
  1713. }
  1714. .impact-card.highlight .impact-value {
  1715. color: var(--success);
  1716. }
  1717. .impact-label {
  1718. font-size: 11px;
  1719. color: var(--text-muted);
  1720. }
  1721. /* A/B Test Results */
  1722. .ab-test-results {
  1723. display: flex;
  1724. align-items: center;
  1725. gap: 20px;
  1726. padding: 20px;
  1727. background: var(--bg-hover);
  1728. border-radius: 12px;
  1729. }
  1730. .ab-group {
  1731. flex: 1;
  1732. text-align: center;
  1733. padding: 16px;
  1734. border-radius: 10px;
  1735. }
  1736. .ab-group.control {
  1737. background: rgba(148, 163, 184, 0.1);
  1738. }
  1739. .ab-group.test {
  1740. background: rgba(16, 185, 129, 0.1);
  1741. }
  1742. .group-label {
  1743. font-size: 11px;
  1744. color: var(--text-muted);
  1745. margin-bottom: 8px;
  1746. }
  1747. .group-value {
  1748. font-size: 28px;
  1749. font-weight: 700;
  1750. }
  1751. .ab-group.test .group-value {
  1752. color: var(--success);
  1753. }
  1754. .group-metric {
  1755. font-size: 11px;
  1756. color: var(--text-secondary);
  1757. }
  1758. .group-improvement {
  1759. margin-top: 8px;
  1760. font-size: 14px;
  1761. font-weight: 600;
  1762. color: var(--success);
  1763. }
  1764. .vs-divider {
  1765. font-size: 14px;
  1766. font-weight: 600;
  1767. color: var(--text-muted);
  1768. }
  1769. /* History Timeline */
  1770. .history-timeline {
  1771. display: flex;
  1772. flex-direction: column;
  1773. gap: 16px;
  1774. }
  1775. .history-item {
  1776. display: flex;
  1777. gap: 12px;
  1778. position: relative;
  1779. }
  1780. .history-dot {
  1781. width: 12px;
  1782. height: 12px;
  1783. border-radius: 50%;
  1784. flex-shrink: 0;
  1785. margin-top: 4px;
  1786. }
  1787. .history-dot.apply {
  1788. background: var(--success);
  1789. }
  1790. .history-dot.optimize {
  1791. background: var(--primary);
  1792. }
  1793. .history-dot.discover {
  1794. background: var(--warning);
  1795. }
  1796. .history-dot.result {
  1797. background: var(--secondary);
  1798. }
  1799. .history-content {
  1800. flex: 1;
  1801. padding-bottom: 16px;
  1802. border-bottom: 1px solid var(--border);
  1803. }
  1804. .history-item:last-child .history-content {
  1805. border-bottom: none;
  1806. padding-bottom: 0;
  1807. }
  1808. .history-title {
  1809. font-size: 13px;
  1810. font-weight: 600;
  1811. margin-bottom: 4px;
  1812. }
  1813. .history-desc {
  1814. font-size: 12px;
  1815. color: var(--text-secondary);
  1816. margin-bottom: 4px;
  1817. }
  1818. .history-time {
  1819. font-size: 11px;
  1820. color: var(--text-muted);
  1821. }
  1822. /* History Modal Enhanced */
  1823. .history-modal { max-width: 900px; }
  1824. .history-filters { display: flex; gap: 12px; margin-bottom: 16px; }
  1825. .filter-group { display: flex; gap: 8px; }
  1826. .filter-select-sm { padding: 6px 12px; background: var(--bg-hover); border: 1px solid var(--border); border-radius: 6px; color: var(--text-primary); font-size: 12px; }
  1827. .history-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
  1828. .history-stat-item { display: flex; align-items: center; gap: 12px; padding: 14px; background: var(--bg-hover); border-radius: 10px; }
  1829. .history-stat-item .stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
  1830. .history-stat-item .stat-icon.apply { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1831. .history-stat-item .stat-icon.discover { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1832. .history-stat-item .stat-icon.optimize { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
  1833. .history-stat-item .stat-icon.result { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1834. .history-stat-item .stat-content .stat-value { font-size: 18px; font-weight: 700; }
  1835. .history-stat-item .stat-content .stat-label { font-size: 11px; color: var(--text-muted); }
  1836. .history-stat-item.highlight { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
  1837. .history-stat-item.highlight .stat-value { color: var(--success); }
  1838. .history-tabs { display: flex; gap: 8px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
  1839. .history-tab { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--bg-hover); border-radius: 20px; font-size: 13px; cursor: pointer; transition: all 0.2s; }
  1840. .history-tab:hover { background: rgba(99, 102, 241, 0.1); }
  1841. .history-tab.active { background: var(--primary); color: white; }
  1842. /* Timeline Enhanced */
  1843. .history-timeline-enhanced { max-height: 450px; overflow-y: auto; padding-right: 8px; }
  1844. .history-item-enhanced { display: flex; gap: 16px; margin-bottom: 20px; }
  1845. .timeline-left { width: 70px; text-align: right; flex-shrink: 0; }
  1846. .timeline-date { font-size: 12px; font-weight: 600; color: var(--text-primary); }
  1847. .timeline-time { font-size: 11px; color: var(--text-muted); }
  1848. .timeline-center { display: flex; flex-direction: column; align-items: center; width: 40px; flex-shrink: 0; }
  1849. .timeline-dot { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; z-index: 1; }
  1850. .timeline-dot.apply { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1851. .timeline-dot.discover { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1852. .timeline-dot.optimize { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
  1853. .timeline-dot.result { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1854. .timeline-line { width: 2px; flex: 1; background: var(--border); margin-top: 8px; min-height: 40px; }
  1855. .timeline-right { flex: 1; min-width: 0; }
  1856. .timeline-card { background: var(--bg-hover); border-radius: 12px; padding: 16px; border-left: 3px solid var(--border); }
  1857. .timeline-card.apply { border-left-color: var(--success); }
  1858. .timeline-card.discover { border-left-color: var(--warning); }
  1859. .timeline-card.optimize { border-left-color: var(--primary); }
  1860. .timeline-card.result { border-left-color: var(--secondary); }
  1861. .timeline-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
  1862. .timeline-type { font-size: 10px; padding: 2px 8px; border-radius: 10px; }
  1863. .timeline-type.apply { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1864. .timeline-type.discover { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1865. .timeline-type.optimize { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
  1866. .timeline-type.result { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1867. .timeline-category { font-size: 11px; color: var(--text-muted); }
  1868. .timeline-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
  1869. .timeline-desc { font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }
  1870. .timeline-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
  1871. .timeline-meta .meta-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-muted); }
  1872. .timeline-meta .meta-item i { font-size: 10px; }
  1873. .timeline-actions { display: flex; gap: 8px; }
  1874. /* List View */
  1875. .history-list-view { max-height: 400px; overflow-y: auto; }
  1876. .history-table-header { display: grid; grid-template-columns: 80px 1fr 100px 80px 140px 60px; gap: 12px; padding: 12px 16px; background: var(--bg-hover); border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
  1877. .history-table-row { display: grid; grid-template-columns: 80px 1fr 100px 80px 140px 60px; gap: 12px; padding: 12px 16px; background: var(--bg-hover); border-radius: 8px; align-items: center; margin-bottom: 6px; font-size: 12px; transition: all 0.2s; }
  1878. .history-table-row:hover { background: rgba(99, 102, 241, 0.1); }
  1879. .type-badge { padding: 3px 8px; border-radius: 10px; font-size: 10px; }
  1880. .type-badge.apply { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1881. .type-badge.discover { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1882. .type-badge.optimize { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
  1883. .type-badge.result { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1884. .btn-icon-sm { width: 28px; height: 28px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); cursor: pointer; display: flex; align-items: center; justify-content: center; }
  1885. .btn-icon-sm:hover { background: var(--primary); border-color: var(--primary); color: white; }
  1886. .btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-secondary); padding: 4px 10px; font-size: 11px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; gap: 4px; }
  1887. .btn-outline:hover { border-color: var(--primary); color: var(--primary); }
  1888. /* Stats View */
  1889. .history-stats-view { display: flex; flex-direction: column; gap: 20px; }
  1890. .stats-chart-section h5, .stats-metrics-section h5, .top-strategies-section h5 { font-size: 13px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
  1891. .stats-chart-section h5 i, .stats-metrics-section h5 i, .top-strategies-section h5 i { color: var(--primary); }
  1892. .type-distribution { display: flex; flex-direction: column; gap: 12px; }
  1893. .distribution-item { }
  1894. .distribution-bar { height: 8px; background: var(--bg-dark); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
  1895. .bar-fill { height: 100%; border-radius: 4px; }
  1896. .bar-fill.apply { background: var(--success); }
  1897. .bar-fill.discover { background: var(--warning); }
  1898. .bar-fill.optimize { background: var(--primary); }
  1899. .bar-fill.result { background: var(--secondary); }
  1900. .distribution-info { display: flex; justify-content: space-between; font-size: 12px; }
  1901. .type-label { display: flex; align-items: center; gap: 6px; }
  1902. .type-label i { font-size: 10px; }
  1903. .type-value { font-weight: 600; }
  1904. .metrics-grid-sm { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  1905. .metric-item-sm { display: flex; align-items: center; gap: 10px; padding: 12px; background: var(--bg-hover); border-radius: 10px; }
  1906. .metric-item-sm .metric-icon-sm { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
  1907. .metric-icon-sm.blue { background: rgba(99, 102, 241, 0.2); color: var(--primary); }
  1908. .metric-icon-sm.green { background: rgba(16, 185, 129, 0.2); color: var(--success); }
  1909. .metric-icon-sm.purple { background: rgba(139, 92, 246, 0.2); color: var(--secondary); }
  1910. .metric-icon-sm.gold { background: rgba(245, 158, 11, 0.2); color: var(--warning); }
  1911. .metric-item-sm .metric-info-sm .metric-value-sm { font-size: 16px; font-weight: 700; }
  1912. .metric-item-sm .metric-info-sm .metric-label-sm { font-size: 10px; color: var(--text-muted); }
  1913. .metric-item-sm.highlight { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
  1914. .metric-item-sm.highlight .metric-value-sm { color: var(--warning); }
  1915. .top-strategies-list { display: flex; flex-direction: column; gap: 8px; }
  1916. .top-strategy-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg-hover); border-radius: 10px; }
  1917. .top-strategy-item .rank { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-dark); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
  1918. .top-strategy-item .rank.gold { background: linear-gradient(135deg, #FFD700, #FFA500); color: #333; }
  1919. .top-strategy-item .rank.silver { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: #333; }
  1920. .top-strategy-item .rank.bronze { background: linear-gradient(135deg, #CD7F32, #B87333); color: white; }
  1921. .top-strategy-item .strategy-info { flex: 1; }
  1922. .top-strategy-item .strategy-name { font-size: 13px; font-weight: 600; }
  1923. .top-strategy-item .strategy-category { font-size: 11px; color: var(--text-muted); }
  1924. .top-strategy-item .strategy-effect { font-size: 14px; font-weight: 700; color: var(--success); }
  1925. /* Toast */
  1926. .toast {
  1927. position: fixed;
  1928. bottom: 24px;
  1929. right: 24px;
  1930. padding: 12px 20px;
  1931. background: var(--bg-card);
  1932. border: 1px solid var(--border);
  1933. border-radius: 10px;
  1934. display: flex;
  1935. align-items: center;
  1936. gap: 10px;
  1937. font-size: 13px;
  1938. box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  1939. z-index: 2000;
  1940. }
  1941. .toast.success {
  1942. border-color: var(--success);
  1943. }
  1944. .toast.success i {
  1945. color: var(--success);
  1946. }
  1947. .toast-enter-active,
  1948. .toast-leave-active {
  1949. transition: all 0.3s ease;
  1950. }
  1951. .toast-enter-from,
  1952. .toast-leave-to {
  1953. opacity: 0;
  1954. transform: translateY(20px);
  1955. }
  1956. /* Responsive */
  1957. @media (max-width: 1400px) {
  1958. .strategy-grid {
  1959. grid-template-columns: repeat(2, 1fr);
  1960. }
  1961. .stats-row {
  1962. grid-template-columns: repeat(3, 1fr);
  1963. }
  1964. }
  1965. @media (max-width: 992px) {
  1966. .strategy-grid {
  1967. grid-template-columns: 1fr;
  1968. }
  1969. .stats-row {
  1970. grid-template-columns: repeat(2, 1fr);
  1971. }
  1972. .analysis-grid,
  1973. .impact-cards {
  1974. grid-template-columns: repeat(2, 1fr);
  1975. }
  1976. }
  1977. </style>