index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  1. <template>
  2. <view class="wisdom-container">
  3. <!-- Tabbar 切换过渡页 -->
  4. <tab-transition v-if="showTabTransition" dimCode="wisdom" />
  5. <!-- 1. 品牌头部 -->
  6. <PageBanner theme="wisdom"
  7. tagline="学以启智 · 慧及未来"
  8. quote="知者不惑,仁者不忧" />
  9. <!-- 2. 认知雷达图(登录后) -->
  10. <view class="section" v-if="isLoggedIn && cognitiveReport">
  11. <view class="section-header">
  12. <text class="section-title">认知雷达</text>
  13. <text class="section-more" @click="goCognitiveReport">查看详情 ›</text>
  14. </view>
  15. <RadarChart
  16. :dimensions="cognitiveDimensions"
  17. :scores="cognitiveScores"
  18. :avg-scores="cognitiveAvgScores"
  19. :childName="activeChildName"
  20. fillColor="#6366F1"
  21. gridColor="#E0E7FF"
  22. labelColor="#3730A3" />
  23. </view>
  24. <!-- 家庭成员选择条 -->
  25. <FamilyMemberStrip
  26. v-if="isLoggedIn"
  27. :members="familyMembersVisible"
  28. :selectedMemberId="selectedMemberId"
  29. @select="onFamilyMemberSelect" />
  30. <!-- 3. 游客专属区块 -->
  31. <template v-if="!isLoggedIn">
  32. <LoginGuideCard
  33. title="登录后查看全家智慧成长数据"
  34. :items="[
  35. '查看全家认知能量数据和测评报告',
  36. '记录每日成长,获取智慧能量',
  37. '参与认知训练,提升综合能力'
  38. ]" />
  39. </template>
  40. <!-- 4. 五维能量条(登录后) -->
  41. <FamilyEnergyBar
  42. v-if="isLoggedIn"
  43. dimensionCode="wisdom"
  44. :sandboxData="sandboxData"
  45. :dualDimension="dualDimension" />
  46. <!-- ===== DAN 报告(登录后) ===== -->
  47. <view class="section" v-if="isLoggedIn">
  48. <view class="section-header">
  49. <text class="section-title">&#x1F4CA; DAN 报告</text>
  50. <text class="section-more" @click="goDanUpload">上传 +</text>
  51. </view>
  52. <view class="dan-card" v-for="report in danReports" :key="report.id" @click="viewDanReport(report)">
  53. <view class="dan-card-header">
  54. <text class="dan-report-date">{{ formatDate(report.assessmentDate) }}</text>
  55. <text :class="['dan-status', report.draftStatus === 'confirmed' ? 'confirmed' : 'pending']">
  56. {{ report.draftStatus === 'confirmed' ? '已确认' : '待确认' }}
  57. </text>
  58. </view>
  59. <text class="dan-report-desc">DAN B4 智维度测评报告</text>
  60. </view>
  61. <view class="dan-empty" v-if="danReports.length === 0">
  62. <text class="dan-empty-text">暂无 DAN 报告,点击上方「上传 +」上传测评报告</text>
  63. </view>
  64. </view>
  65. <!-- 6. 功能入口 -->
  66. <view class="func-section" v-if="sectionVisible('func_entries')">
  67. <view class="func-grid">
  68. <view class="func-item" v-for="item in funcList" :key="item.label" @click="onFuncClick(item)">
  69. <view class="func-icon-wrap">
  70. <text class="func-icon">{{ item.icon }}</text>
  71. </view>
  72. <text class="func-label">{{ item.label }}</text>
  73. </view>
  74. </view>
  75. </view>
  76. <!-- 7. 维度任务 -->
  77. <DimensionTasks
  78. v-if="isLoggedIn"
  79. dimensionCode="wisdom"
  80. :tasks="dimensionTasks"
  81. @taskClick="onTaskClick"
  82. @moreTasks="goTasks" />
  83. <!-- 8. 维度活动 -->
  84. <DimensionActivities
  85. dimensionCode="wisdom"
  86. :activities="dimensionActivities"
  87. :isLoggedIn="isLoggedIn"
  88. @activityClick="goActivityDetail"
  89. @moreActivities="goMoreActivities" />
  90. <!-- 9. 维度商品 -->
  91. <DimensionProducts
  92. dimensionCode="wisdom"
  93. :products="dimensionProducts"
  94. @productClick="goProductDetail"
  95. @moreProducts="goMoreProducts" />
  96. <!-- 10. 推荐阅读 -->
  97. <DimensionArticles
  98. v-if="sectionVisible('recommended_reading')"
  99. dimensionCode="wisdom"
  100. :articles="wisdomArticles"
  101. :isLoggedIn="isLoggedIn"
  102. @articleClick="goArticleDetail"
  103. @moreArticles="goMoreArticles" />
  104. <!-- 11. 快捷操作按钮 -->
  105. <view class="section quick-actions" v-if="isLoggedIn">
  106. <view class="action-btn" @click="goCognitiveReport">
  107. <text class="action-icon">📊</text>
  108. <text class="action-text">认知报告</text>
  109. </view>
  110. <view class="action-btn" @click="goTrainingHub">
  111. <text class="action-icon">🧠</text>
  112. <text class="action-text">认知训练</text>
  113. </view>
  114. <view class="action-btn" @click="goAssessment">
  115. <text class="action-icon">📋</text>
  116. <text class="action-text">测评预约</text>
  117. </view>
  118. <view class="action-btn" @click="goDanUpload">
  119. <text class="action-icon">&#x1F4C4;</text>
  120. <text class="action-text">上传报告</text>
  121. </view>
  122. </view>
  123. <!-- 底部占位 -->
  124. <view class="bottom-spacer"></view>
  125. <AIFloatingAvatar />
  126. </view>
  127. </template>
  128. <script>
  129. import TabTransition from '../../components/tab-transition.vue'
  130. import PageBanner from '../../components/PageBanner.vue'
  131. import LoginGuideCard from '../../components/LoginGuideCard.vue'
  132. import RadarChart from '../../components/RadarChart.vue'
  133. import FamilyEnergyBar from '../../components/FamilyEnergyBar.vue'
  134. import DimensionTasks from '../../components/DimensionTasks.vue'
  135. import DimensionActivities from '../../components/DimensionActivities.vue'
  136. import DimensionProducts from '../../components/DimensionProducts.vue'
  137. import DimensionArticles from '../../components/DimensionArticles.vue'
  138. import AIFloatingAvatar from '../../components/AIFloatingAvatar.vue'
  139. import FamilyMemberStrip from '../../components/FamilyMemberStrip.vue'
  140. import { getVisibleSections, getChildren, getTodayTasksByCategory, getActivityList, getProductsByDomain, getFamilyEnergySandbox, getAssessmentLatestResult, getFeaturedArticles, getDanReportByChild } from '../../utils/api.js'
  141. export default {
  142. components: { TabTransition, PageBanner, LoginGuideCard, RadarChart, FamilyEnergyBar, DimensionTasks, DimensionActivities, DimensionProducts, DimensionArticles, AIFloatingAvatar, FamilyMemberStrip },
  143. data() {
  144. return {
  145. isLoggedIn: false,
  146. role: null,
  147. showTabTransition: true,
  148. activeChildId: null,
  149. activeChildName: '',
  150. userName: '',
  151. children: [],
  152. familyMembersVisible: [],
  153. selectedMemberId: null,
  154. sandboxData: null,
  155. dualDimension: null,
  156. visibleSections: [],
  157. cognitiveReport: null,
  158. dimensionTasks: [],
  159. dimensionActivities: [],
  160. dimensionProducts: [],
  161. articles: [],
  162. /** Mock 平均值(6维认知):感知/专注/记忆/逻辑/空间/加工速度 */
  163. cognitiveAvgScores: [70, 65, 72, 68, 66, 71],
  164. danReports: [],
  165. funcList: [
  166. { icon: '\u{1F4CA}', label: '认知报告', needLogin: true, page: '/pages/wisdom-detail/cognitive-report' },
  167. { icon: '\u{1F9E0}', label: '训练中心', needLogin: true, page: '/pages/wisdom-detail/training-hub' },
  168. { icon: '\u{1F3AF}', label: '测评预约', needLogin: false, page: '/pages/assessment/apply' },
  169. { icon: '\u{1F4D6}', label: '阅读天地', needLogin: false, page: '/pages/mind-extra/articles' }
  170. ]
  171. }
  172. },
  173. computed: {
  174. wisdomArticles: function() {
  175. if (!this.articles || this.articles.length === 0) return []
  176. var result = []
  177. for (var i = 0; i < this.articles.length; i++) {
  178. var a = this.articles[i]
  179. if (a.relatedDimensions && a.relatedDimensions.indexOf('wisdom') !== -1) {
  180. result.push(a)
  181. }
  182. }
  183. if (result.length === 0) return this.articles.slice(0, 5)
  184. return result.slice(0, 5)
  185. },
  186. cognitiveDimensions: function() {
  187. return [
  188. { label: '感知能力', key: 'perceptionScore' },
  189. { label: '专注力', key: 'focusScore' },
  190. { label: '记忆力', key: 'memoryScore' },
  191. { label: '逻辑思维', key: 'logicScore' },
  192. { label: '空间思维', key: 'spatialScore' },
  193. { label: '加工速度', key: 'processingSpeedScore' }
  194. ]
  195. },
  196. cognitiveScores: function() {
  197. if (!this.cognitiveReport) return []
  198. var dims = this.cognitiveDimensions
  199. var scores = []
  200. for (var i = 0; i < dims.length; i++) {
  201. scores.push(this.cognitiveReport[dims[i].key] || 0)
  202. }
  203. return scores
  204. }
  205. },
  206. onShow() {
  207. this.showTabTransition = true
  208. var token = uni.getStorageSync('token')
  209. this.isLoggedIn = !!token
  210. if (this.isLoggedIn) {
  211. this.role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  212. this.userName = uni.getStorageSync('nickname') || uni.getStorageSync('userName') || '家长'
  213. }
  214. this.loadSectionConfig()
  215. if (this.isLoggedIn) {
  216. this.loadChildren()
  217. this.loadFamilyMembersVisible()
  218. this.loadCognitiveReport()
  219. this.loadDanReports()
  220. }
  221. this.loadDimensionActivities()
  222. this.loadDimensionProducts()
  223. // 游客也能浏览文章
  224. this.loadFeaturedArticles()
  225. this._watchPageReady()
  226. },
  227. methods: {
  228. onFamilyMemberSelect: function(member) {
  229. this.selectedMemberId = member.id
  230. },
  231. loadSectionConfig: function() {
  232. var baseSections = ['func_entries', 'recommended_reading']
  233. if (!uni.getStorageSync('token')) {
  234. this.visibleSections = baseSections
  235. return
  236. }
  237. var role = uni.getStorageSync('currentRole') || uni.getStorageSync('role') || null
  238. var self = this
  239. getVisibleSections({ pageKey: 'wisdom', role: role }).then(function(res) {
  240. if (res.code === 200 && res.data) {
  241. var keys = res.data.map(function(s) { return s.sectionKey })
  242. var merged = baseSections.slice()
  243. keys.forEach(function(k) { if (merged.indexOf(k) === -1) merged.push(k) })
  244. self.visibleSections = merged
  245. }
  246. }).catch(function(e) {
  247. self.visibleSections = ['func_entries', 'recommended_reading']
  248. })
  249. },
  250. loadChildren: function() {
  251. var self = this
  252. getChildren().then(function(res) {
  253. if (res.code === 200 && res.data) {
  254. self.children = res.data
  255. if (self.children.length > 0) {
  256. var activeId = uni.getStorageSync('currentChildId')
  257. if (activeId) {
  258. for (var i = 0; i < self.children.length; i++) {
  259. if (self.children[i].id == activeId) {
  260. self.activeChildId = activeId
  261. self.activeChildName = self.children[i].nickname || self.children[i].name || ''
  262. break
  263. }
  264. }
  265. }
  266. // Fallback: 首次进入或未选孩子时,默认选第一个孩子以加载认知数据(仅本地状态,不触发全局切换)
  267. if (!self.activeChildId && self.children.length > 0) {
  268. self.activeChildId = self.children[0].id
  269. self.activeChildName = self.children[0].nickname || self.children[0].name || ''
  270. }
  271. }
  272. // Load cognitive report if activeChildId is available
  273. if (self.activeChildId) {
  274. self.loadCognitiveReport()
  275. }
  276. }
  277. }).catch(function(e) {})
  278. },
  279. loadFamilyMembersVisible: function() {
  280. var self = this
  281. getFamilyEnergySandbox().then(function(res) {
  282. if (res && res.data) {
  283. self.sandboxData = res.data.sandboxData || null
  284. self.dualDimension = res.data.dualDimension || null
  285. if (res.data.members) {
  286. self.familyMembersVisible = res.data.members
  287. }
  288. }
  289. }).catch(function(e) {})
  290. },
  291. loadCognitiveReport: function() {
  292. var self = this
  293. var childId = this.activeChildId
  294. if (!childId) return
  295. getAssessmentLatestResult(childId).then(function(res) {
  296. if (res.code === 200 && res.data) {
  297. self.cognitiveReport = res.data
  298. }
  299. }).catch(function(e) {})
  300. },
  301. onChildChanged: function(childId) {
  302. this.activeChildId = childId
  303. // FIX: 同步提交到 Vuex store
  304. this.$store.commit('switchToChild', childId)
  305. for (var i = 0; i < this.children.length; i++) {
  306. if (this.children[i].id == childId) {
  307. this.activeChildName = this.children[i].nickname || this.children[i].name || ''
  308. break
  309. }
  310. }
  311. this.loadFamilyMembersVisible()
  312. this.loadCognitiveReport()
  313. this.loadDanReports()
  314. },
  315. loadDimensionTasks: function() {
  316. var self = this
  317. var childId = this.activeChildId
  318. if (!childId) return
  319. getTodayTasksByCategory(childId, 'wisdom').then(function(res) {
  320. if (res && res.data) {
  321. self.dimensionTasks = res.data.slice(0, 5)
  322. }
  323. }).catch(function(e) {})
  324. },
  325. loadDimensionActivities: function() {
  326. var self = this
  327. getActivityList({ dimensionCode: 'wisdom', page: 1, size: 5 }).then(function(res) {
  328. if (res && res.data) {
  329. self.dimensionActivities = res.data.records || res.data
  330. }
  331. }).catch(function(e) {})
  332. },
  333. loadDimensionProducts: function() {
  334. var self = this
  335. getProductsByDomain('wisdom', 1, 4).then(function(res) {
  336. if (res && res.data) {
  337. self.dimensionProducts = res.data.records || res.data
  338. }
  339. }).catch(function(e) {})
  340. },
  341. sectionVisible: function(key) {
  342. return this.visibleSections.length === 0 || this.visibleSections.indexOf(key) !== -1
  343. },
  344. onFuncClick: function(item) {
  345. if (item.needLogin && !this.isLoggedIn) {
  346. uni.showModal({
  347. title: '提示',
  348. content: '请先登录后使用此功能',
  349. success: function(res) { if (res.confirm) uni.navigateTo({ url: '/pages/login/login' }) }
  350. })
  351. return
  352. }
  353. if (item.page) {
  354. var nativeTabs = ['/pages/tasks/tasks', '/pages/index-home/index', '/pages/body/index', '/pages/mind/index', '/pages/action/index', '/pages/wisdom/index', '/pages/profile/profile']
  355. if (nativeTabs.indexOf(item.page) !== -1) {
  356. uni.switchTab({ url: item.page })
  357. } else {
  358. uni.navigateTo({ url: item.page })
  359. }
  360. }
  361. },
  362. scrollToSection: function(section) {},
  363. goCognitiveReport: function() {
  364. uni.navigateTo({ url: '/pages/wisdom-detail/cognitive-report' })
  365. },
  366. goTrainingHub: function() {
  367. uni.navigateTo({ url: '/pages/wisdom-detail/training-hub' })
  368. },
  369. goAssessment: function() {
  370. uni.navigateTo({ url: '/pages/assessment/apply' })
  371. },
  372. onTaskClick: function(task) {},
  373. goTasks: function() { uni.switchTab({ url: '/pages/tasks/tasks' }) },
  374. goActivityDetail: function(act) {
  375. if (!act || !act.id) return
  376. uni.navigateTo({ url: '/pages/discover-detail/activity-detail/activity-detail?id=' + act.id })
  377. },
  378. goProductDetail: function(prod) {
  379. if (prod && prod.id) {
  380. var token = uni.getStorageSync('token')
  381. if (token) {
  382. uni.navigateTo({ url: '/pages/discover-detail/product-detail/product-detail?id=' + prod.id })
  383. } else {
  384. uni.navigateTo({ url: '/pages/login/login?redirect=' + encodeURIComponent('/pages/wisdom/index') })
  385. }
  386. }
  387. },
  388. goMoreProducts: function() {
  389. uni.navigateTo({ url: '/pages/shop/index' })
  390. },
  391. parseRelatedDimensions: function(val) {
  392. if (!val) return []
  393. if (Array.isArray(val)) return val
  394. if (typeof val === 'string') {
  395. try {
  396. var parsed = JSON.parse(val)
  397. return Array.isArray(parsed) ? parsed : []
  398. } catch (e) {
  399. return val.split(',').map(function(s) { return s.trim() }).filter(function(s) { return s })
  400. }
  401. }
  402. return []
  403. },
  404. loadFeaturedArticles: function() {
  405. var self = this
  406. getFeaturedArticles({ size: 5, dimensionCode: 'wisdom' }).then(function(res) {
  407. if (res.code === 200 && res.data) {
  408. var gradientColors = [
  409. 'linear-gradient(135deg, #6366F1, #818CF8)',
  410. 'linear-gradient(135deg, #8B5CF6, #A78BFA)',
  411. 'linear-gradient(135deg, #5B9BD5, #8FC5E8)',
  412. 'linear-gradient(135deg, #10B981, #34D399)',
  413. 'linear-gradient(135deg, #F97316, #FB923C)'
  414. ]
  415. var list = Array.isArray(res.data) ? res.data : (res.data.records || [])
  416. self.articles = list.map(function(item, index) {
  417. return {
  418. id: item.id,
  419. category: item.categoryName || '智慧养成',
  420. categoryColor: gradientColors[index % gradientColors.length],
  421. title: item.title || '',
  422. summary: item.summary || '',
  423. dimensionWeights: item.dimensionWeights || null,
  424. views: item.viewCount ? String(item.viewCount) : '0',
  425. likes: '0',
  426. date: item.publishedAt ? item.publishedAt.slice(0, 10) : '',
  427. relatedDimensions: self.parseRelatedDimensions(item.relatedDimensions)
  428. }
  429. })
  430. }
  431. }).catch(function() {})
  432. },
  433. goMoreArticles: function() {
  434. uni.navigateTo({ url: '/pages/article-center/index?dimension=wisdom' })
  435. },
  436. goArticleDetail: function(article) {
  437. uni.navigateTo({ url: '/pages/mind-detail/article-detail?id=' + (article.id || article) })
  438. },
  439. _watchPageReady() {
  440. var self = this
  441. var unwatch = this.$watch(function() {
  442. if (self.isLoggedIn) {
  443. return !!(self.cognitiveReport || self.sandboxData)
  444. }
  445. return !!(self.dimensionActivities && self.dimensionActivities.length > 0) ||
  446. !!(self.dimensionProducts && self.dimensionProducts.length > 0)
  447. }, function(val) {
  448. if (val) {
  449. if (unwatch) unwatch()
  450. self.showTabTransition = false
  451. }
  452. })
  453. setTimeout(function() {
  454. if (unwatch) unwatch()
  455. self.showTabTransition = false
  456. }, 5000)
  457. },
  458. // ===== DAN 报告 =====
  459. loadDanReports: function() {
  460. var self = this
  461. var memberId = self.activeChildId
  462. if (!memberId) return
  463. getDanReportByChild(memberId, 'wisdom').then(function(res) {
  464. if (res.code === 200 && res.data) {
  465. self.danReports = res.data
  466. }
  467. }).catch(function() {})
  468. },
  469. goDanUpload: function() {
  470. uni.navigateTo({ url: '/pages/dan-assessment/report-upload' })
  471. },
  472. viewDanReport: function(report) {
  473. uni.navigateTo({ url: '/pages/dan-assessment/report-upload?draftId=' + report.id })
  474. },
  475. formatDate: function(dateStr) {
  476. if (!dateStr) return ''
  477. var d = new Date(dateStr)
  478. return d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate()
  479. }
  480. }
  481. }
  482. </script>
  483. <style scoped>
  484. .wisdom-container {
  485. min-height: 100vh;
  486. background: #f5f7fa;
  487. padding-bottom: 120rpx;
  488. }
  489. .func-section {
  490. margin: -40rpx 20rpx 0;
  491. position: relative;
  492. z-index: 2;
  493. }
  494. .func-grid {
  495. background: #fff;
  496. border-radius: 24rpx;
  497. padding: 30rpx 16rpx;
  498. display: flex;
  499. box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
  500. }
  501. .func-item {
  502. flex: 1;
  503. display: flex;
  504. flex-direction: column;
  505. align-items: center;
  506. }
  507. .func-item:active {
  508. opacity: 0.7;
  509. }
  510. .func-icon-wrap {
  511. width: 88rpx;
  512. height: 88rpx;
  513. border-radius: 50%;
  514. background: #FFF8E1;
  515. display: flex;
  516. align-items: center;
  517. justify-content: center;
  518. margin-bottom: 10rpx;
  519. }
  520. .func-icon {
  521. font-size: 40rpx;
  522. }
  523. .func-label {
  524. font-size: 24rpx;
  525. color: #333;
  526. font-weight: 500;
  527. }
  528. /* ===== Section ===== */
  529. .section {
  530. margin: 20rpx 20rpx;
  531. }
  532. .section-header {
  533. display: flex;
  534. justify-content: space-between;
  535. align-items: center;
  536. margin-bottom: 20rpx;
  537. }
  538. .section-title {
  539. font-size: 30rpx;
  540. font-weight: bold;
  541. color: #333;
  542. }
  543. .section-more {
  544. font-size: 24rpx;
  545. color: #999;
  546. }
  547. /* ===== 快捷操作按钮 ===== */
  548. .quick-actions {
  549. display: flex;
  550. flex-direction: row;
  551. flex-wrap: wrap;
  552. justify-content: space-between;
  553. }
  554. .action-btn {
  555. width: 48%;
  556. background: #fff;
  557. border-radius: 16rpx;
  558. padding: 24rpx 0;
  559. box-shadow: 0 2rpx 12rpx rgba(0,0,0,0.06);
  560. display: flex;
  561. flex-direction: column;
  562. align-items: center;
  563. margin-bottom: 20rpx;
  564. }
  565. .action-btn:active {
  566. opacity: 0.8;
  567. }
  568. .action-icon {
  569. font-size: 40rpx;
  570. margin-bottom: 10rpx;
  571. }
  572. .action-text {
  573. font-size: 26rpx;
  574. color: #333;
  575. font-weight: 500;
  576. }
  577. /* ===== 底部占位 ===== */
  578. .bottom-spacer {
  579. height: 120rpx;
  580. }
  581. /* DAN 报告卡片 */
  582. .dan-card {
  583. background: #fff;
  584. border-radius: 16rpx;
  585. padding: 24rpx;
  586. margin-bottom: 16rpx;
  587. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.06);
  588. }
  589. .dan-card-header {
  590. display: flex;
  591. justify-content: space-between;
  592. align-items: center;
  593. margin-bottom: 12rpx;
  594. }
  595. .dan-report-date {
  596. font-size: 26rpx;
  597. color: #666;
  598. }
  599. .dan-status {
  600. font-size: 22rpx;
  601. padding: 4rpx 16rpx;
  602. border-radius: 8rpx;
  603. }
  604. .dan-status.confirmed {
  605. background: #D1FAE5;
  606. color: #065F46;
  607. }
  608. .dan-status.pending {
  609. background: #FEF3C7;
  610. color: #92400E;
  611. }
  612. .dan-report-desc {
  613. font-size: 28rpx;
  614. color: #333;
  615. font-weight: 500;
  616. margin-bottom: 12rpx;
  617. display: block;
  618. }
  619. .dan-card-footer {
  620. text-align: right;
  621. }
  622. .dan-view-link {
  623. font-size: 26rpx;
  624. color: #6366F1;
  625. }
  626. .dan-empty {
  627. background: #fff;
  628. border-radius: 16rpx;
  629. padding: 40rpx 24rpx;
  630. text-align: center;
  631. }
  632. .dan-empty-text {
  633. font-size: 24rpx;
  634. color: #999;
  635. }
  636. </style>