cognitive-report.vue 23 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016
  1. <template>
  2. <view class="container">
  3. <PageBanner theme="wisdom"
  4. tagline="认知能力 · 全面评估"
  5. quote="知人者智,自知者明" />
  6. <!-- ===== 报告卡片 ===== -->
  7. <view class="report-card" v-if="report">
  8. <view class="report-header">
  9. <text class="report-title">认知测评报告</text>
  10. <text class="report-date">测评日期: {{ report.assessmentDate || '-' }}</text>
  11. </view>
  12. <!-- 综合认知评分 -->
  13. <view class="overall-score-wrap">
  14. <text class="overall-label">综合认知评分</text>
  15. <view class="overall-row">
  16. <text class="overall-value">{{ report.overallScore || 0 }}</text>
  17. </view>
  18. </view>
  19. <!-- 常模参考线说明 -->
  20. <view class="norm-legend" v-if="norms">
  21. <view class="norm-legend-item"><view class="norm-dot norm-dot-p50"></view>同龄中位</view>
  22. <view class="norm-legend-item"><view class="norm-dot norm-dot-child"></view>当前得分</view>
  23. </view>
  24. <!-- 六维条形图 -->
  25. <view class="dimension-list">
  26. <view class="dimension-item" v-for="dim in dimensions" :key="dim.key">
  27. <view class="dimension-header">
  28. <view class="dimension-label-row">
  29. <text class="dimension-icon">{{ dim.icon }}</text>
  30. <text class="dimension-name">{{ dim.label }}</text>
  31. </view>
  32. <view class="dimension-score-wrap">
  33. <text class="dimension-score">{{ report[dim.key] || 0 }}</text>
  34. <text class="norm-level-tag" v-if="normLevel(dim.key)" :class="dim.normClass">{{ normLevel(dim.key) }}</text>
  35. </view>
  36. </view>
  37. <view class="dimension-bar">
  38. <view class="dimension-bar-fill" :style="{ width: (report[dim.key] || 0) + '%' }"></view>
  39. <view class="norm-marker" :style="{ left: normP50(dim.key) + '%' }">
  40. <view class="norm-marker-line"></view>
  41. </view>
  42. </view>
  43. <text class="dimension-desc">{{ dim.desc }}</text>
  44. </view>
  45. </view>
  46. <!-- 分析报告 -->
  47. <view class="report-analysis" v-if="report.analysisReport">
  48. <view class="analysis-header-row">
  49. <text class="analysis-icon">&#x1F4DD;</text>
  50. <text class="analysis-title">分析报告</text>
  51. </view>
  52. <text class="analysis-content">{{ report.analysisReport }}</text>
  53. </view>
  54. <!-- 成长建议 -->
  55. <view class="report-suggestions" v-if="report.growthSuggestions">
  56. <view class="analysis-header-row">
  57. <text class="analysis-icon">&#x1F331;</text>
  58. <text class="analysis-title">成长建议</text>
  59. </view>
  60. <text class="suggestion-content">{{ report.growthSuggestions }}</text>
  61. </view>
  62. <!-- 底部操作 -->
  63. <view class="action-row">
  64. <view class="action-btn secondary" @click="goAssessment">
  65. <text class="action-btn-text">预约测评</text>
  66. </view>
  67. <view class="action-btn primary" @click="goTraining">
  68. <text class="action-btn-text">认知训练</text>
  69. </view>
  70. </view>
  71. </view>
  72. <!-- ===== 家庭行动建议 ===== -->
  73. <view class="action-plan-section" v-if="recommendations && recommendations.length > 0">
  74. <view class="action-plan-header">
  75. <text class="action-plan-icon">&#x1F4CB;</text>
  76. <text class="action-plan-title">家庭行动建议</text>
  77. </view>
  78. <text class="action-plan-desc">基于本次测评结果,为你推荐以下训练方向</text>
  79. <!-- 综合评分 -->
  80. <view class="overall-suggestion" v-if="overall">
  81. <text class="overall-suggestion-text">{{ overall.suggestion }}</text>
  82. </view>
  83. <!-- 各维度推荐 -->
  84. <view class="rec-item" v-for="rec in recommendations" :key="rec.dimensionKey"
  85. :class="'rec-level-' + (rec.priority || 'normal')">
  86. <view class="rec-header">
  87. <view class="rec-dim-row">
  88. <text class="rec-icon">{{ rec.icon }}</text>
  89. <text class="rec-label">{{ rec.label }}</text>
  90. <text class="rec-score">{{ rec.score }}分</text>
  91. </view>
  92. <text class="rec-level-tag" :class="'tag-' + (rec.priority || 'normal')">{{ rec.level }}</text>
  93. </view>
  94. <text class="rec-suggestion">{{ rec.suggestion }}</text>
  95. <view class="rec-actions" v-if="rec.tasks && rec.tasks.length > 0">
  96. <view class="rec-tag-btn add-task-btn" @click="addTask(rec)">
  97. <text class="rec-tag-btn-icon">&#x2795;</text>
  98. <text class="rec-tag-btn-text">添加到今日任务</text>
  99. </view>
  100. <view class="rec-tag-btn game-btn" v-if="rec.games && rec.games.length > 0"
  101. @click="goGame(rec.games[0].code)">
  102. <text class="rec-tag-btn-text">去训练</text>
  103. </view>
  104. <view class="rec-tag-btn article-btn" v-if="rec.articles && rec.articles.length > 0"
  105. @click="goArticle(rec.articles[0].id)">
  106. <text class="rec-tag-btn-text">读文章</text>
  107. </view>
  108. </view>
  109. </view>
  110. </view>
  111. <!-- ===== 历史趋势 ===== -->
  112. <view class="trend-section" v-if="trendData && trendData.length > 1">
  113. <view class="trend-header">
  114. <text class="trend-icon">&#x1F4C8;</text>
  115. <text class="trend-title">历史趋势</text>
  116. </view>
  117. <view class="trend-overview-row">
  118. <view class="trend-stat" v-for="stat in trendStats" :key="stat.key">
  119. <text class="trend-stat-label">{{ stat.label }}</text>
  120. <text class="trend-stat-value" :class="'ts-' + stat.direction">{{ stat.display }}</text>
  121. <text class="trend-stat-sub" v-if="stat.pct != 0">{{ stat.pct > 0 ? '↑' : '↓' }}{{ Math.abs(stat.pct) }}%</text>
  122. </view>
  123. </view>
  124. <!-- 最近两次对比 -->
  125. <view class="trend-compare" v-if="trendData.length >= 2">
  126. <view class="tc-header">
  127. <text class="tc-title">前后两次对比</text>
  128. </view>
  129. <view class="tc-dim-row tc-header-row">
  130. <text class="tc-dim-name">维度</text>
  131. <text class="tc-old">上次</text>
  132. <text class="tc-new">本次</text>
  133. <text class="tc-change">变化</text>
  134. </view>
  135. <view class="tc-dim-row" v-for="dim in dimensions" :key="dim.key">
  136. <text class="tc-dim-name">{{ dim.label }}</text>
  137. <text class="tc-old">{{ prevScore(dim.key) }}</text>
  138. <text class="tc-new" :class="scoreUp(dim.key) ? 'sc-up' : (scoreDown(dim.key) ? 'sc-down' : '')">{{ latestScore(dim.key) }}</text>
  139. <text class="tc-change">
  140. <text v-if="scoreUp(dim.key)" class="change-up">&#x25B2; +{{ scoreDiff(dim.key) }}</text>
  141. <text v-else-if="scoreDown(dim.key)" class="change-down">&#x25BC; {{ scoreDiff(dim.key) }}</text>
  142. <text v-else class="change-flat">—</text>
  143. </text>
  144. </view>
  145. </view>
  146. </view>
  147. <!-- 加载中 -->
  148. <view class="loading-state" v-if="loading">
  149. <text class="loading-text">加载中...</text>
  150. </view>
  151. <!-- 无数据 -->
  152. <view class="empty-state" v-if="!report && !loading">
  153. <text class="empty-icon">&#x1F9E0;</text>
  154. <text class="empty-title">暂无认知测评数据</text>
  155. <text class="empty-desc">完成 DAN 认知评估后,可在此查看详细的六维认知分析报告和家庭训练建议</text>
  156. <view class="empty-btn" @click="goAssessment">预约测评</view>
  157. </view>
  158. </view>
  159. </template>
  160. <script>
  161. import PageBanner from '../../components/PageBanner.vue'
  162. import { getAssessmentLatestResult, getCognitiveRecommendations, createTaskFromRecommendation, getCognitiveNorms, getCognitiveTrend } from '../../utils/api.js'
  163. export default {
  164. components: { PageBanner },
  165. data: function() {
  166. return {
  167. memberId: null,
  168. report: null,
  169. recommendations: null,
  170. overall: null,
  171. norms: null,
  172. trendData: null,
  173. loading: true,
  174. addingTask: false,
  175. dimensions: [
  176. { key: 'perceptionScore', label: '感知能力', icon: '\u{1F441}', desc: '感官信息处理能力', normClass: '' },
  177. { key: 'focusScore', label: '专注力', icon: '\u{1F3AF}', desc: '持续集中和抗干扰能力', normClass: '' },
  178. { key: 'memoryScore', label: '记忆力', icon: '\u{1F9E0}', desc: '信息编码和回忆能力', normClass: '' },
  179. { key: 'logicScore', label: '逻辑思维', icon: '\u{1F9E9}', desc: '推理和问题解决能力', normClass: '' },
  180. { key: 'spatialScore', label: '空间思维', icon: '\u{1F9CA}', desc: '空间想象和方位判断', normClass: '' },
  181. { key: 'processingSpeedScore', label: '加工速度', icon: '\u26A1', desc: '信息处理和反应速度', normClass: '' }
  182. ]
  183. }
  184. },
  185. computed: {
  186. trendStats: function() {
  187. if (!this.trendData || this.trendData.length < 2) return []
  188. var latest = this.trendData[0]
  189. var prev = this.trendData[this.trendData.length - 1]
  190. var diff = (latest.overallScore || 0) - (prev.overallScore || 0)
  191. var pct = prev.overallScore ? Math.round(diff / prev.overallScore * 100) : 0
  192. return [
  193. { key: 'count', label: '测评次数', display: this.trendData.length + '次', direction: 'neutral', pct: 0 },
  194. { key: 'trend', label: '综合趋势', display: diff > 0 ? '上升' : (diff < 0 ? '下降' : '持平'), direction: diff > 0 ? 'up' : (diff < 0 ? 'down' : 'flat'), pct: pct },
  195. { key: 'latest', label: '最新综合', display: latest.overallScore || 0 + '分', direction: 'neutral', pct: 0 }
  196. ]
  197. }
  198. },
  199. onLoad: function(options) {
  200. if (options && options.memberId) {
  201. this.memberId = options.memberId
  202. } else {
  203. this.memberId = uni.getStorageSync('currentChildId') || null
  204. }
  205. this.loadData()
  206. },
  207. methods: {
  208. loadData: function() {
  209. var self = this
  210. var memberId = self.memberId
  211. if (!memberId) {
  212. self.loading = false
  213. return
  214. }
  215. self.loading = true
  216. // 并行加载报告和建议
  217. getAssessmentLatestResult(memberId).then(function(res) {
  218. if (res.code === 200 && res.data) {
  219. self.report = res.data
  220. }
  221. }).catch(function() {})
  222. getCognitiveRecommendations(memberId).then(function(res) {
  223. if (res.code === 200 && res.data) {
  224. self.recommendations = res.data.recommendations || []
  225. self.overall = res.data.overall || null
  226. }
  227. }).catch(function() {})
  228. getCognitiveNorms(memberId).then(function(res) {
  229. if (res.code === 200 && res.data) {
  230. self.norms = res.data
  231. }
  232. }).catch(function() {})
  233. getCognitiveTrend(memberId, 5).then(function(res) {
  234. if (res.code === 200 && res.data && res.data.length > 0) {
  235. self.trendData = res.data
  236. }
  237. }).catch(function() {})
  238. // 都完成后关闭加载
  239. setTimeout(function() {
  240. self.loading = false
  241. }, 800)
  242. },
  243. addTask: function(rec) {
  244. if (this.addingTask) return
  245. this.addingTask = true
  246. var self = this
  247. createTaskFromRecommendation(self.memberId, rec.dimensionKey, 0).then(function(res) {
  248. self.addingTask = false
  249. if (res.code === 200 && res.data) {
  250. uni.showToast({ title: '已添加到今日任务', icon: 'success' })
  251. } else {
  252. uni.showToast({ title: res.message || '添加失败', icon: 'none' })
  253. }
  254. }).catch(function() {
  255. self.addingTask = false
  256. uni.showToast({ title: '网络异常,请重试', icon: 'none' })
  257. })
  258. },
  259. goGame: function(code) {
  260. var url = ''
  261. if (code === 'schulte') {
  262. url = '/pages/games/schulte'
  263. } else if (code === '1a2b') {
  264. url = '/pages/games/1a2b'
  265. } else if (code === 'sudoku') {
  266. url = '/pages/games/sudoku'
  267. }
  268. if (url) {
  269. uni.navigateTo({ url: url })
  270. }
  271. },
  272. goArticle: function(articleId) {
  273. uni.navigateTo({ url: '/pages/article-center/article-detail?id=' + articleId })
  274. },
  275. goAssessment: function() {
  276. uni.navigateTo({ url: '/pages/assessment/apply' })
  277. },
  278. goTraining: function() {
  279. uni.navigateTo({ url: '/pages/wisdom-detail/training-hub?memberId=' + (this.memberId || '') })
  280. },
  281. normLevel: function(dimKey) {
  282. var dim = this.dimensions.find(function(d) { return d.key === dimKey })
  283. if (!this.norms || !dim) return ''
  284. var normKey = dimKey.replace('Score', '') + 'Norm'
  285. var info = this.norms[normKey]
  286. var level = info && info.level ? info.level : ''
  287. var map = {
  288. '较弱': 'nl-weak',
  289. '偏弱': 'nl-below-average',
  290. '中等': 'nl-average',
  291. '良好': 'nl-good',
  292. '优秀': 'nl-excellent'
  293. }
  294. dim.normClass = level ? (map[level] || '') : ''
  295. return level
  296. },
  297. normP50: function(dimKey) {
  298. if (!this.norms) return 50
  299. var normKey = dimKey.replace('Score', '') + 'Norm'
  300. var info = this.norms[normKey]
  301. return info && info.p50 ? info.p50 : 50
  302. },
  303. prevScore: function(dimKey) {
  304. return this.trendData && this.trendData.length > 1 ? this.trendData[1][dimKey] || 0 : 0
  305. },
  306. latestScore: function(dimKey) {
  307. return this.trendData && this.trendData.length > 0 ? this.trendData[0][dimKey] || 0 : 0
  308. },
  309. scoreDiff: function(dimKey) {
  310. return this.latestScore(dimKey) - this.prevScore(dimKey)
  311. },
  312. scoreUp: function(dimKey) {
  313. return this.scoreDiff(dimKey) > 0
  314. },
  315. scoreDown: function(dimKey) {
  316. return this.scoreDiff(dimKey) < 0
  317. }
  318. }
  319. }
  320. </script>
  321. <style scoped>
  322. .container {
  323. min-height: 100vh;
  324. background: #f5f7fa;
  325. padding-bottom: 120rpx;
  326. }
  327. /* ===== 报告卡 ===== */
  328. .report-card {
  329. margin: 20rpx 30rpx;
  330. background: #fff;
  331. border-radius: 24rpx;
  332. padding: 40rpx;
  333. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  334. }
  335. .report-header {
  336. display: flex;
  337. flex-direction: row;
  338. justify-content: space-between;
  339. align-items: center;
  340. margin-bottom: 30rpx;
  341. }
  342. .report-title {
  343. font-size: 36rpx;
  344. font-weight: bold;
  345. color: #333;
  346. }
  347. .report-date {
  348. font-size: 24rpx;
  349. color: #999;
  350. }
  351. /* ===== 综合评分 ===== */
  352. .overall-score-wrap {
  353. text-align: center;
  354. padding: 40rpx 0;
  355. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  356. border-radius: 20rpx;
  357. margin-bottom: 40rpx;
  358. color: #fff;
  359. }
  360. .overall-label {
  361. font-size: 28rpx;
  362. opacity: 0.9;
  363. display: block;
  364. margin-bottom: 16rpx;
  365. }
  366. .overall-row {
  367. display: flex;
  368. flex-direction: row;
  369. align-items: center;
  370. justify-content: center;
  371. }
  372. .overall-value {
  373. font-size: 80rpx;
  374. font-weight: bold;
  375. margin-right: 20rpx;
  376. }
  377. /* ===== 六维条形图 ===== */
  378. .dimension-list {
  379. margin-bottom: 30rpx;
  380. }
  381. .dimension-item {
  382. margin-bottom: 28rpx;
  383. }
  384. .dimension-header {
  385. display: flex;
  386. flex-direction: row;
  387. justify-content: space-between;
  388. align-items: center;
  389. margin-bottom: 10rpx;
  390. }
  391. .dimension-label-row {
  392. display: flex;
  393. flex-direction: row;
  394. align-items: center;
  395. }
  396. .dimension-icon {
  397. font-size: 28rpx;
  398. margin-right: 10rpx;
  399. }
  400. .dimension-name {
  401. font-size: 28rpx;
  402. color: #333;
  403. font-weight: 500;
  404. }
  405. .dimension-score {
  406. font-size: 32rpx;
  407. font-weight: bold;
  408. color: #667eea;
  409. }
  410. .dimension-desc {
  411. font-size: 22rpx;
  412. color: #999;
  413. line-height: 1.4;
  414. }
  415. /* ===== 常模参考线 ===== */
  416. .norm-legend {
  417. display: flex;
  418. flex-direction: row;
  419. align-items: center;
  420. gap: 24rpx;
  421. margin-bottom: 20rpx;
  422. padding: 12rpx 16rpx;
  423. background: #f8f9ff;
  424. border-radius: 12rpx;
  425. }
  426. .norm-legend-item {
  427. display: flex;
  428. flex-direction: row;
  429. align-items: center;
  430. font-size: 22rpx;
  431. color: #888;
  432. }
  433. .norm-dot {
  434. width: 16rpx;
  435. height: 16rpx;
  436. border-radius: 50%;
  437. margin-right: 8rpx;
  438. }
  439. .norm-dot-p50 {
  440. background: #FF9500;
  441. }
  442. .norm-dot-child {
  443. background: #667eea;
  444. }
  445. .dimension-score-wrap {
  446. display: flex;
  447. flex-direction: row;
  448. align-items: center;
  449. gap: 10rpx;
  450. }
  451. .norm-level-tag {
  452. font-size: 20rpx;
  453. padding: 2rpx 12rpx;
  454. border-radius: 16rpx;
  455. font-weight: 500;
  456. }
  457. .nl-weak, .nl-below-average {
  458. background: #FEF2F2;
  459. color: #EF4444;
  460. }
  461. .nl-average {
  462. background: #FFFBEB;
  463. color: #F59E0B;
  464. }
  465. .nl-good, .nl-excellent {
  466. background: #F0FDF4;
  467. color: #22C55E;
  468. }
  469. .dimension-bar {
  470. height: 16rpx;
  471. background: #f0f0f0;
  472. border-radius: 8rpx;
  473. margin-bottom: 8rpx;
  474. position: relative;
  475. }
  476. .dimension-bar-fill {
  477. height: 100%;
  478. background: linear-gradient(90deg, #667eea, #764ba2);
  479. border-radius: 8rpx;
  480. transition: width 0.5s;
  481. }
  482. .norm-marker {
  483. position: absolute;
  484. top: -4rpx;
  485. width: 2rpx;
  486. height: 24rpx;
  487. z-index: 2;
  488. transform: translateX(-50%);
  489. }
  490. .norm-marker-line {
  491. width: 4rpx;
  492. height: 24rpx;
  493. background: #FF9500;
  494. border-radius: 2rpx;
  495. }
  496. /* ===== 分析/建议 ===== */
  497. .report-analysis, .report-suggestions {
  498. margin-top: 30rpx;
  499. padding: 28rpx;
  500. border-radius: 16rpx;
  501. }
  502. .report-analysis {
  503. background: #f9f9ff;
  504. }
  505. .report-suggestions {
  506. background: #f0fdf4;
  507. }
  508. .analysis-header-row {
  509. display: flex;
  510. flex-direction: row;
  511. align-items: center;
  512. margin-bottom: 16rpx;
  513. }
  514. .analysis-icon {
  515. font-size: 30rpx;
  516. margin-right: 10rpx;
  517. }
  518. .analysis-title {
  519. font-size: 30rpx;
  520. font-weight: bold;
  521. color: #333;
  522. }
  523. .analysis-content, .suggestion-content {
  524. font-size: 26rpx;
  525. color: #666;
  526. line-height: 1.7;
  527. display: block;
  528. }
  529. /* ===== 底部操作 ===== */
  530. .action-row {
  531. display: flex;
  532. flex-direction: row;
  533. justify-content: space-between;
  534. margin-top: 40rpx;
  535. }
  536. .action-btn {
  537. flex: 1;
  538. display: flex;
  539. align-items: center;
  540. justify-content: center;
  541. padding: 20rpx 0;
  542. border-radius: 40rpx;
  543. }
  544. .action-btn.primary {
  545. background: linear-gradient(135deg, #667eea, #764ba2);
  546. margin-left: 16rpx;
  547. box-shadow: 0 4rpx 16rpx rgba(102,126,234,0.3);
  548. }
  549. .action-btn.secondary {
  550. background: #fff;
  551. border: 2rpx solid #ddd;
  552. margin-right: 16rpx;
  553. }
  554. .action-btn-text {
  555. font-size: 28rpx;
  556. font-weight: 500;
  557. color: #fff;
  558. }
  559. .action-btn.secondary .action-btn-text {
  560. color: #666;
  561. }
  562. /* ===== 家庭行动建议 ===== */
  563. .action-plan-section {
  564. margin: 30rpx 30rpx 40rpx;
  565. }
  566. .action-plan-header {
  567. display: flex;
  568. flex-direction: row;
  569. align-items: center;
  570. margin-bottom: 10rpx;
  571. }
  572. .action-plan-icon {
  573. font-size: 36rpx;
  574. margin-right: 10rpx;
  575. }
  576. .action-plan-title {
  577. font-size: 34rpx;
  578. font-weight: bold;
  579. color: #333;
  580. }
  581. .action-plan-desc {
  582. font-size: 26rpx;
  583. color: #888;
  584. margin-bottom: 20rpx;
  585. display: block;
  586. }
  587. .overall-suggestion {
  588. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  589. border-radius: 16rpx;
  590. padding: 24rpx 28rpx;
  591. margin-bottom: 24rpx;
  592. }
  593. .overall-suggestion-text {
  594. font-size: 26rpx;
  595. color: #fff;
  596. line-height: 1.6;
  597. display: block;
  598. }
  599. /* 各维度推荐卡片 */
  600. .rec-item {
  601. background: #fff;
  602. border-radius: 20rpx;
  603. padding: 28rpx;
  604. margin-bottom: 20rpx;
  605. box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.05);
  606. border-left: 8rpx solid #667eea;
  607. }
  608. .rec-item.rec-level-high {
  609. border-left-color: #EF4444;
  610. }
  611. .rec-item.rec-level-normal {
  612. border-left-color: #F59E0B;
  613. }
  614. .rec-item.rec-level-low {
  615. border-left-color: #22C55E;
  616. }
  617. .rec-header {
  618. display: flex;
  619. flex-direction: row;
  620. justify-content: space-between;
  621. align-items: center;
  622. margin-bottom: 12rpx;
  623. }
  624. .rec-dim-row {
  625. display: flex;
  626. flex-direction: row;
  627. align-items: center;
  628. }
  629. .rec-icon {
  630. font-size: 28rpx;
  631. margin-right: 8rpx;
  632. }
  633. .rec-label {
  634. font-size: 28rpx;
  635. font-weight: bold;
  636. color: #333;
  637. margin-right: 12rpx;
  638. }
  639. .rec-score {
  640. font-size: 24rpx;
  641. color: #888;
  642. }
  643. .rec-level-tag {
  644. font-size: 22rpx;
  645. padding: 4rpx 16rpx;
  646. border-radius: 20rpx;
  647. font-weight: 500;
  648. }
  649. .tag-high {
  650. background: #FEF2F2;
  651. color: #EF4444;
  652. }
  653. .tag-normal {
  654. background: #FFFBEB;
  655. color: #F59E0B;
  656. }
  657. .tag-low {
  658. background: #F0FDF4;
  659. color: #22C55E;
  660. }
  661. .rec-suggestion {
  662. font-size: 26rpx;
  663. color: #555;
  664. line-height: 1.6;
  665. display: block;
  666. margin-bottom: 16rpx;
  667. }
  668. .rec-actions {
  669. display: flex;
  670. flex-direction: row;
  671. flex-wrap: wrap;
  672. gap: 12rpx;
  673. }
  674. .rec-tag-btn {
  675. display: flex;
  676. flex-direction: row;
  677. align-items: center;
  678. padding: 12rpx 24rpx;
  679. border-radius: 32rpx;
  680. font-size: 24rpx;
  681. }
  682. .rec-tag-btn:active {
  683. opacity: 0.7;
  684. }
  685. .add-task-btn {
  686. background: #EEF2FF;
  687. color: #667eea;
  688. }
  689. .game-btn {
  690. background: #FEF3C7;
  691. color: #D97706;
  692. }
  693. .article-btn {
  694. background: #F0FDF4;
  695. color: #16A34A;
  696. }
  697. .rec-tag-btn-icon {
  698. font-size: 22rpx;
  699. margin-right: 6rpx;
  700. }
  701. .rec-tag-btn-text {
  702. font-size: 24rpx;
  703. font-weight: 500;
  704. }
  705. /* ===== 加载中 ===== */
  706. .loading-state {
  707. display: flex;
  708. align-items: center;
  709. justify-content: center;
  710. padding: 120rpx 0;
  711. }
  712. .loading-text {
  713. font-size: 28rpx;
  714. color: #999;
  715. }
  716. /* ===== 空状态 ===== */
  717. .empty-state {
  718. display: flex;
  719. flex-direction: column;
  720. align-items: center;
  721. padding: 120rpx 40rpx 80rpx;
  722. }
  723. .empty-icon {
  724. font-size: 100rpx;
  725. margin-bottom: 20rpx;
  726. }
  727. .empty-title {
  728. font-size: 32rpx;
  729. color: #333;
  730. font-weight: bold;
  731. margin-bottom: 16rpx;
  732. }
  733. .empty-desc {
  734. font-size: 26rpx;
  735. color: #999;
  736. text-align: center;
  737. line-height: 1.6;
  738. margin-bottom: 40rpx;
  739. }
  740. .empty-btn {
  741. background: linear-gradient(135deg, #667eea, #764ba2);
  742. color: #fff;
  743. font-size: 28rpx;
  744. font-weight: bold;
  745. padding: 16rpx 64rpx;
  746. border-radius: 40rpx;
  747. box-shadow: 0 4rpx 16rpx rgba(102,126,234,0.3);
  748. }
  749. /* ===== 历史趋势 ===== */
  750. .trend-section {
  751. margin: 30rpx 30rpx 40rpx;
  752. }
  753. .trend-header {
  754. display: flex;
  755. flex-direction: row;
  756. align-items: center;
  757. margin-bottom: 16rpx;
  758. }
  759. .trend-icon {
  760. font-size: 36rpx;
  761. margin-right: 10rpx;
  762. }
  763. .trend-title {
  764. font-size: 34rpx;
  765. font-weight: bold;
  766. color: #333;
  767. }
  768. .trend-overview-row {
  769. display: flex;
  770. flex-direction: row;
  771. gap: 16rpx;
  772. margin-bottom: 20rpx;
  773. }
  774. .trend-stat {
  775. flex: 1;
  776. background: #fff;
  777. border-radius: 16rpx;
  778. padding: 20rpx;
  779. text-align: center;
  780. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.05);
  781. }
  782. .trend-stat-label {
  783. font-size: 24rpx;
  784. color: #888;
  785. display: block;
  786. margin-bottom: 8rpx;
  787. }
  788. .trend-stat-value {
  789. font-size: 32rpx;
  790. font-weight: bold;
  791. display: block;
  792. }
  793. .ts-up {
  794. color: #22C55E;
  795. }
  796. .ts-down {
  797. color: #EF4444;
  798. }
  799. .ts-flat {
  800. color: #F59E0B;
  801. }
  802. .ts-neutral {
  803. color: #333;
  804. }
  805. .trend-stat-sub {
  806. font-size: 22rpx;
  807. margin-top: 4rpx;
  808. display: block;
  809. }
  810. .ts-up + .trend-stat-sub {
  811. color: #22C55E;
  812. }
  813. .ts-down + .trend-stat-sub {
  814. color: #EF4444;
  815. }
  816. .trend-compare {
  817. background: #fff;
  818. border-radius: 20rpx;
  819. padding: 24rpx;
  820. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.05);
  821. }
  822. .tc-header {
  823. margin-bottom: 16rpx;
  824. padding-bottom: 12rpx;
  825. border-bottom: 2rpx solid #f0f0f0;
  826. }
  827. .tc-title {
  828. font-size: 28rpx;
  829. font-weight: bold;
  830. color: #333;
  831. }
  832. .tc-dim-row {
  833. display: flex;
  834. flex-direction: row;
  835. align-items: center;
  836. padding: 12rpx 0;
  837. border-bottom: 1rpx solid #f5f5f5;
  838. }
  839. .tc-header-row {
  840. padding-bottom: 10rpx;
  841. border-bottom: 2rpx solid #e8e8e8;
  842. }
  843. .tc-dim-row:last-child {
  844. border-bottom: none;
  845. }
  846. .tc-dim-name {
  847. flex: 2;
  848. font-size: 26rpx;
  849. color: #333;
  850. }
  851. .tc-old {
  852. flex: 1;
  853. font-size: 24rpx;
  854. color: #999;
  855. text-align: center;
  856. }
  857. .tc-new {
  858. flex: 1;
  859. font-size: 26rpx;
  860. font-weight: bold;
  861. text-align: center;
  862. color: #333;
  863. }
  864. .sc-up {
  865. color: #22C55E;
  866. }
  867. .sc-down {
  868. color: #EF4444;
  869. }
  870. .tc-change {
  871. flex: 1.5;
  872. text-align: right;
  873. font-size: 24rpx;
  874. }
  875. .change-up {
  876. color: #22C55E;
  877. }
  878. .change-down {
  879. color: #EF4444;
  880. }
  881. .change-flat {
  882. color: #999;
  883. }
  884. </style>