index.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780
  1. <template>
  2. <div class="work-analytics">
  3. <!-- 顶部筛选栏 -->
  4. <div class="filter-bar">
  5. <div class="filter-left">
  6. <span class="filter-label">开始时间</span>
  7. <el-date-picker
  8. v-model="startDate"
  9. type="date"
  10. placeholder="选择日期"
  11. format="YYYY-MM-DD"
  12. value-format="YYYY-MM-DD"
  13. style="width: 140px"
  14. />
  15. <span class="filter-label">结束时间</span>
  16. <el-date-picker
  17. v-model="endDate"
  18. type="date"
  19. placeholder="选择日期"
  20. format="YYYY-MM-DD"
  21. value-format="YYYY-MM-DD"
  22. style="width: 140px"
  23. />
  24. <div class="quick-btns">
  25. <el-button
  26. v-for="btn in quickDateBtns"
  27. :key="btn.value"
  28. :type="activeQuickBtn === btn.value ? 'primary' : 'default'"
  29. size="small"
  30. @click="handleQuickDate(btn.value)"
  31. >
  32. {{ btn.label }}
  33. </el-button>
  34. </div>
  35. <el-select
  36. v-model="selectedAccounts"
  37. multiple
  38. collapse-tags
  39. collapse-tags-tooltip
  40. placeholder="选择账号"
  41. style="width: 160px"
  42. >
  43. <el-option
  44. v-for="account in accountList"
  45. :key="account.id"
  46. :label="account.nickname"
  47. :value="account.id"
  48. />
  49. </el-select>
  50. <el-button type="primary" @click="handleQuery">查询</el-button>
  51. </div>
  52. <div class="filter-right">
  53. <el-button @click="handleExport">导出数据</el-button>
  54. </div>
  55. </div>
  56. <!-- 统计卡片 -->
  57. <div class="stats-row">
  58. <div class="stat-card" v-for="(item, index) in summaryStats" :key="index">
  59. <div class="stat-icon">
  60. <el-icon :size="18"><component :is="item.icon" /></el-icon>
  61. </div>
  62. <div class="stat-info">
  63. <div class="stat-label">{{ item.label }}</div>
  64. <div class="stat-value">{{ item.value }}</div>
  65. </div>
  66. </div>
  67. </div>
  68. <!-- 第二行筛选 -->
  69. <div class="filter-bar secondary">
  70. <div class="filter-left">
  71. <el-select v-model="selectedGroup" placeholder="全部" clearable style="width: 120px">
  72. <el-option label="全部" value="" />
  73. <el-option
  74. v-for="group in accountGroups"
  75. :key="group.id"
  76. :label="group.name"
  77. :value="group.id"
  78. />
  79. </el-select>
  80. <el-select v-model="selectedPlatform" placeholder="全部平台" clearable style="width: 120px">
  81. <el-option label="全部平台" value="" />
  82. <el-option
  83. v-for="platform in availablePlatforms"
  84. :key="platform.value"
  85. :label="platform.label"
  86. :value="platform.value"
  87. />
  88. </el-select>
  89. <!-- 排序统一按发布时间倒序,这里仅保留一个选项以避免误解 -->
  90. <el-select v-model="sortBy" style="width: 160px">
  91. <el-option label="按发布时间倒序排列" value="publish_desc" />
  92. </el-select>
  93. <el-input
  94. v-model="searchKeyword"
  95. placeholder="请输入要搜索的作品标题"
  96. clearable
  97. style="width: 240px"
  98. @clear="handleQuery"
  99. @keyup.enter="handleQuery"
  100. >
  101. <template #prefix>
  102. <el-icon><Search /></el-icon>
  103. </template>
  104. </el-input>
  105. </div>
  106. </div>
  107. <!-- 数据表格 -->
  108. <div class="data-table">
  109. <el-table :data="workList" v-loading="loading" stripe>
  110. <el-table-column label="账号" width="150">
  111. <template #default="{ row }">
  112. <div class="account-cell">
  113. <el-avatar :size="32" :src="row.accountAvatar">
  114. {{ row.accountName?.[0] }}
  115. </el-avatar>
  116. <span class="account-name">{{ row.accountName }}</span>
  117. </div>
  118. </template>
  119. </el-table-column>
  120. <el-table-column label="平台" width="100" align="center">
  121. <template #default="{ row }">
  122. <el-tag size="small" :type="getPlatformTagType(row.platform)">
  123. {{ getPlatformName(row.platform) }}
  124. </el-tag>
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="标题" min-width="300">
  128. <template #default="{ row }">
  129. <div class="title-cell">
  130. <div class="work-title">{{ row.title }}</div>
  131. <div class="work-stats">
  132. <span class="stat-item">推荐 <em>{{ row.recommendCount ?? '--' }}</em></span>
  133. <span class="stat-item">阅读 <em>{{ row.viewsCount ?? 0 }}</em></span>
  134. <span class="stat-item">评论 <em>{{ row.commentsCount ?? 0 }}</em></span>
  135. <span class="stat-item">分享 <em>{{ row.sharesCount ?? 0 }}</em></span>
  136. <span class="stat-item">收藏 <em>{{ row.collectsCount ?? 0 }}</em></span>
  137. <span class="stat-item">点赞 <em>{{ row.likesCount ?? 0 }}</em></span>
  138. </div>
  139. </div>
  140. </template>
  141. </el-table-column>
  142. <!-- 类型列暂时不展示
  143. <el-table-column prop="workType" label="类型" width="80" align="center">
  144. <template #default="{ row }">
  145. <span>{{ row.workType || '动态' }}</span>
  146. </template>
  147. </el-table-column>
  148. -->
  149. <el-table-column prop="publishTime" label="发布时间" width="160" align="center">
  150. <template #default="{ row }">
  151. <span class="publish-time">{{ formatTime(row.publishTime) }}</span>
  152. </template>
  153. </el-table-column>
  154. <el-table-column label="操作" width="80" align="center" fixed="right">
  155. <template #default="{ row }">
  156. <el-button type="primary" link @click="handleView(row)">
  157. 查看
  158. </el-button>
  159. </template>
  160. </el-table-column>
  161. </el-table>
  162. <!-- 分页 -->
  163. <div class="pagination-wrapper">
  164. <el-pagination
  165. v-model:current-page="currentPage"
  166. v-model:page-size="pageSize"
  167. :total="totalWorks"
  168. :page-sizes="[10, 20, 50, 100]"
  169. layout="total, sizes, prev, pager, next, jumper"
  170. @size-change="handleQuery"
  171. @current-change="handleQuery"
  172. />
  173. </div>
  174. </div>
  175. <!-- 作品详情抽屉 -->
  176. <el-drawer v-model="drawerVisible" title="作品详情" size="50%">
  177. <div v-if="selectedWork" class="work-detail">
  178. <!-- 作品基本信息 -->
  179. <div class="detail-header">
  180. <el-image
  181. :src="selectedWork.coverUrl"
  182. class="work-cover"
  183. fit="cover"
  184. >
  185. <template #error>
  186. <div class="cover-placeholder">
  187. <el-icon :size="32"><Picture /></el-icon>
  188. </div>
  189. </template>
  190. </el-image>
  191. <div class="header-info">
  192. <h3>{{ selectedWork.title }}</h3>
  193. <div class="meta-info">
  194. <el-tag size="small">{{ getPlatformName(selectedWork.platform) }}</el-tag>
  195. <span class="publish-time">发布于 {{ formatTime(selectedWork.publishTime) }}</span>
  196. </div>
  197. </div>
  198. </div>
  199. <!-- 数据统计 -->
  200. <div class="detail-stats">
  201. <div class="stat-item">
  202. <div class="stat-value">{{ selectedWork.viewsCount || 0 }}</div>
  203. <div class="stat-label">阅读</div>
  204. </div>
  205. <div class="stat-item">
  206. <div class="stat-value">{{ selectedWork.likesCount || 0 }}</div>
  207. <div class="stat-label">点赞</div>
  208. </div>
  209. <div class="stat-item">
  210. <div class="stat-value">{{ selectedWork.commentsCount || 0 }}</div>
  211. <div class="stat-label">评论</div>
  212. </div>
  213. <div class="stat-item">
  214. <div class="stat-value">{{ selectedWork.collectsCount || 0 }}</div>
  215. <div class="stat-label">收藏</div>
  216. </div>
  217. <div class="stat-item">
  218. <div class="stat-value">{{ selectedWork.sharesCount || 0 }}</div>
  219. <div class="stat-label">分享</div>
  220. </div>
  221. </div>
  222. <!-- 作品内容 -->
  223. <div class="detail-content" v-if="selectedWork.content">
  224. <h4>作品内容</h4>
  225. <div class="content-text">{{ selectedWork.content }}</div>
  226. </div>
  227. </div>
  228. </el-drawer>
  229. </div>
  230. </template>
  231. <script setup lang="ts">
  232. import { ref, computed, onMounted } from 'vue';
  233. import { Search, Picture, Document, View, ChatDotRound, Share, Star, Pointer } from '@element-plus/icons-vue';
  234. import { PLATFORMS } from '@media-manager/shared';
  235. import type { PlatformType } from '@media-manager/shared';
  236. import { useAuthStore } from '@/stores/auth';
  237. import { ElMessage } from 'element-plus';
  238. import dayjs from 'dayjs';
  239. import request from '@/api/request';
  240. const authStore = useAuthStore();
  241. const loading = ref(false);
  242. // 日期筛选
  243. const startDate = ref(dayjs().subtract(30, 'day').format('YYYY-MM-DD'));
  244. const endDate = ref(dayjs().format('YYYY-MM-DD'));
  245. const activeQuickBtn = ref('lastMonth');
  246. // 快捷日期按钮
  247. const quickDateBtns = [
  248. { label: '近三天', value: 'last3days' },
  249. { label: '近七天', value: 'last7days' },
  250. { label: '近一个月', value: 'lastMonth' },
  251. ];
  252. // 账号选择
  253. const selectedAccounts = ref<number[]>([]);
  254. const accountList = ref<{ id: number; nickname: string }[]>([]);
  255. // 分组和平台筛选
  256. const selectedGroup = ref<number | ''>('');
  257. const selectedPlatform = ref<PlatformType | ''>('');
  258. const sortBy = ref('publish_desc');
  259. const searchKeyword = ref('');
  260. // 分组列表
  261. interface AccountGroup {
  262. id: number;
  263. name: string;
  264. }
  265. const accountGroups = ref<AccountGroup[]>([]);
  266. // 可用平台
  267. const availablePlatforms = computed(() => {
  268. return Object.entries(PLATFORMS).map(([key, value]) => ({
  269. value: key as PlatformType,
  270. label: value.name,
  271. }));
  272. });
  273. // 分页
  274. const currentPage = ref(1);
  275. const pageSize = ref(20);
  276. const totalWorks = ref(0);
  277. // 汇总统计
  278. const summaryData = ref({
  279. totalWorks: 0,
  280. recommendCount: 0,
  281. viewsCount: 0,
  282. commentsCount: 0,
  283. sharesCount: 0,
  284. collectsCount: 0,
  285. likesCount: 0,
  286. });
  287. // 统计卡片数据
  288. const summaryStats = computed(() => [
  289. { label: '作品总数', value: summaryData.value.totalWorks, icon: Document },
  290. { label: '推荐量', value: summaryData.value.recommendCount, icon: Pointer },
  291. { label: '播放(阅读)量', value: summaryData.value.viewsCount, icon: View },
  292. { label: '评论量', value: summaryData.value.commentsCount, icon: ChatDotRound },
  293. { label: '分享量', value: summaryData.value.sharesCount, icon: Share },
  294. { label: '收藏量', value: summaryData.value.collectsCount, icon: Star },
  295. { label: '点赞量', value: summaryData.value.likesCount, icon: Pointer },
  296. ]);
  297. // 作品数据
  298. interface WorkData {
  299. id: number;
  300. title: string;
  301. coverUrl: string;
  302. content: string;
  303. platform: PlatformType;
  304. accountId: number;
  305. accountName: string;
  306. accountAvatar: string;
  307. workType: string;
  308. publishTime: string;
  309. recommendCount: number | null;
  310. viewsCount: number;
  311. commentsCount: number;
  312. sharesCount: number;
  313. collectsCount: number;
  314. likesCount: number;
  315. }
  316. const workList = ref<WorkData[]>([]);
  317. // 抽屉相关
  318. const drawerVisible = ref(false);
  319. const selectedWork = ref<WorkData | null>(null);
  320. function getPlatformName(platform: PlatformType) {
  321. return PLATFORMS[platform]?.name || platform;
  322. }
  323. function getPlatformTagType(platform: PlatformType) {
  324. const typeMap: Record<string, 'primary' | 'success' | 'warning' | 'danger' | 'info'> = {
  325. douyin: 'danger',
  326. xiaohongshu: 'danger',
  327. bilibili: 'primary',
  328. kuaishou: 'warning',
  329. weixin: 'success',
  330. };
  331. return typeMap[platform] || 'info';
  332. }
  333. function formatTime(time: string) {
  334. if (!time) return '-';
  335. const d = dayjs(time);
  336. if (!d.isValid()) return time;
  337. const nowYear = dayjs().year();
  338. // 今年:01-22 10:22,往年:2025-12-22 10:22
  339. return d.year() === nowYear ? d.format('MM-DD HH:mm') : d.format('YYYY-MM-DD HH:mm');
  340. }
  341. // 快捷日期选择
  342. function handleQuickDate(type: string) {
  343. activeQuickBtn.value = type;
  344. const today = dayjs();
  345. switch (type) {
  346. case 'last3days':
  347. startDate.value = today.subtract(3, 'day').format('YYYY-MM-DD');
  348. endDate.value = today.format('YYYY-MM-DD');
  349. break;
  350. case 'last7days':
  351. startDate.value = today.subtract(7, 'day').format('YYYY-MM-DD');
  352. endDate.value = today.format('YYYY-MM-DD');
  353. break;
  354. case 'lastMonth':
  355. startDate.value = today.subtract(30, 'day').format('YYYY-MM-DD');
  356. endDate.value = today.format('YYYY-MM-DD');
  357. break;
  358. }
  359. }
  360. // 查询
  361. function handleQuery() {
  362. loadData();
  363. }
  364. // 加载账号列表
  365. async function loadAccountList() {
  366. try {
  367. const res = await request.get('/api/accounts');
  368. // 新接口:request 已经解包,res 就是账号数组
  369. if (Array.isArray(res)) {
  370. accountList.value = res.map((a: any) => ({
  371. id: a.id,
  372. nickname: a.accountName || a.nickname || a.username,
  373. }));
  374. } else if ((res as any)?.data?.data) {
  375. // 兼容旧格式 { data: { data: [] } }
  376. accountList.value = (res as any).data.data.map((a: any) => ({
  377. id: a.id,
  378. nickname: a.accountName || a.nickname || a.username,
  379. }));
  380. }
  381. } catch (error) {
  382. console.error('加载账号列表失败:', error);
  383. }
  384. }
  385. // 加载分组列表
  386. async function loadGroups() {
  387. try {
  388. const res = await request.get('/api/accounts/groups');
  389. if (res.data.success) {
  390. accountGroups.value = res.data.data || [];
  391. }
  392. } catch (error) {
  393. console.error('加载分组失败:', error);
  394. }
  395. }
  396. // 加载数据
  397. async function loadData() {
  398. const userId = authStore.user?.id;
  399. if (!userId) return;
  400. loading.value = true;
  401. try {
  402. const params: Record<string, any> = {
  403. startDate: startDate.value,
  404. endDate: endDate.value,
  405. page: currentPage.value,
  406. pageSize: pageSize.value,
  407. sortBy: sortBy.value,
  408. };
  409. if (selectedPlatform.value) {
  410. params.platform = selectedPlatform.value;
  411. }
  412. if (selectedAccounts.value.length > 0) {
  413. params.accountIds = selectedAccounts.value.join(',');
  414. }
  415. if (searchKeyword.value) {
  416. params.keyword = searchKeyword.value;
  417. }
  418. if (selectedGroup.value) {
  419. params.groupId = selectedGroup.value;
  420. }
  421. const data = await request.get('/api/work-day-statistics/works', {
  422. params,
  423. });
  424. if (data) {
  425. workList.value = (data.works || []) as WorkData[];
  426. totalWorks.value = data.total || 0;
  427. if (data.summary) {
  428. summaryData.value = {
  429. totalWorks: data.summary.totalWorks || 0,
  430. recommendCount: data.summary.recommendCount || 0,
  431. viewsCount: data.summary.viewsCount || 0,
  432. commentsCount: data.summary.commentsCount || 0,
  433. sharesCount: data.summary.sharesCount || 0,
  434. collectsCount: data.summary.collectsCount || 0,
  435. likesCount: data.summary.likesCount || 0,
  436. };
  437. }
  438. }
  439. } catch (error) {
  440. console.error('加载作品数据失败:', error);
  441. ElMessage.error('加载作品数据失败,请稍后重试');
  442. } finally {
  443. loading.value = false;
  444. }
  445. }
  446. // 查看详情
  447. function handleView(row: WorkData) {
  448. selectedWork.value = row;
  449. drawerVisible.value = true;
  450. }
  451. // 导出数据
  452. function handleExport() {
  453. ElMessage.info('导出功能开发中');
  454. }
  455. onMounted(() => {
  456. loadAccountList();
  457. loadGroups();
  458. loadData();
  459. });
  460. </script>
  461. <style lang="scss" scoped>
  462. @use '@/styles/variables.scss' as *;
  463. .work-analytics {
  464. .filter-bar {
  465. display: flex;
  466. align-items: center;
  467. justify-content: space-between;
  468. margin-bottom: 20px;
  469. padding: 16px 20px;
  470. background: #fff;
  471. border-radius: $radius-lg;
  472. box-shadow: $shadow-sm;
  473. &.secondary {
  474. margin-bottom: 16px;
  475. padding: 12px 20px;
  476. }
  477. .filter-left {
  478. display: flex;
  479. align-items: center;
  480. gap: 12px;
  481. .filter-label {
  482. font-size: 14px;
  483. color: $text-regular;
  484. }
  485. .quick-btns {
  486. display: flex;
  487. gap: 8px;
  488. }
  489. }
  490. }
  491. .stats-row {
  492. display: grid;
  493. grid-template-columns: repeat(7, 1fr);
  494. gap: 0;
  495. margin-bottom: 20px;
  496. background: #fff;
  497. border-radius: $radius-lg;
  498. box-shadow: $shadow-sm;
  499. overflow: hidden;
  500. .stat-card {
  501. padding: 20px 16px;
  502. display: flex;
  503. align-items: center;
  504. gap: 12px;
  505. border-right: 1px solid #f0f0f0;
  506. &:last-child {
  507. border-right: none;
  508. }
  509. .stat-icon {
  510. width: 36px;
  511. height: 36px;
  512. background: $primary-color-light;
  513. border-radius: 8px;
  514. display: flex;
  515. align-items: center;
  516. justify-content: center;
  517. color: $primary-color;
  518. flex-shrink: 0;
  519. }
  520. .stat-info {
  521. .stat-label {
  522. font-size: 12px;
  523. color: $text-secondary;
  524. margin-bottom: 4px;
  525. white-space: nowrap;
  526. }
  527. .stat-value {
  528. font-size: 20px;
  529. font-weight: 600;
  530. color: $text-primary;
  531. }
  532. }
  533. }
  534. }
  535. .data-table {
  536. background: #fff;
  537. border-radius: $radius-lg;
  538. box-shadow: $shadow-sm;
  539. overflow: hidden;
  540. .account-cell {
  541. display: flex;
  542. align-items: center;
  543. gap: 8px;
  544. .account-name {
  545. font-weight: 500;
  546. color: $text-primary;
  547. }
  548. }
  549. .title-cell {
  550. .work-title {
  551. font-weight: 500;
  552. color: $primary-color;
  553. margin-bottom: 6px;
  554. cursor: pointer;
  555. &:hover {
  556. text-decoration: underline;
  557. }
  558. }
  559. .work-stats {
  560. display: flex;
  561. gap: 16px;
  562. font-size: 12px;
  563. color: $text-secondary;
  564. .stat-item {
  565. em {
  566. font-style: normal;
  567. color: $primary-color;
  568. margin-left: 2px;
  569. }
  570. }
  571. }
  572. }
  573. .publish-time {
  574. font-size: 13px;
  575. color: $text-secondary;
  576. }
  577. .pagination-wrapper {
  578. padding: 16px 20px;
  579. display: flex;
  580. justify-content: flex-end;
  581. }
  582. }
  583. }
  584. .work-detail {
  585. .detail-header {
  586. display: flex;
  587. gap: 16px;
  588. margin-bottom: 24px;
  589. .work-cover {
  590. width: 120px;
  591. height: 120px;
  592. border-radius: 8px;
  593. flex-shrink: 0;
  594. .cover-placeholder {
  595. width: 100%;
  596. height: 100%;
  597. background: #f3f4f6;
  598. display: flex;
  599. align-items: center;
  600. justify-content: center;
  601. color: #9ca3af;
  602. }
  603. }
  604. .header-info {
  605. flex: 1;
  606. h3 {
  607. margin: 0 0 12px 0;
  608. font-size: 16px;
  609. line-height: 1.5;
  610. }
  611. .meta-info {
  612. display: flex;
  613. align-items: center;
  614. gap: 12px;
  615. .publish-time {
  616. font-size: 13px;
  617. color: $text-secondary;
  618. }
  619. }
  620. }
  621. }
  622. .detail-stats {
  623. display: grid;
  624. grid-template-columns: repeat(5, 1fr);
  625. gap: 16px;
  626. margin-bottom: 24px;
  627. .stat-item {
  628. background: #f8fafc;
  629. border-radius: 12px;
  630. padding: 16px;
  631. text-align: center;
  632. .stat-value {
  633. font-size: 24px;
  634. font-weight: 600;
  635. color: $primary-color;
  636. }
  637. .stat-label {
  638. font-size: 13px;
  639. color: $text-secondary;
  640. margin-top: 4px;
  641. }
  642. }
  643. }
  644. .detail-content {
  645. h4 {
  646. margin: 0 0 12px 0;
  647. font-size: 15px;
  648. color: $text-primary;
  649. }
  650. .content-text {
  651. font-size: 14px;
  652. line-height: 1.8;
  653. color: $text-regular;
  654. white-space: pre-wrap;
  655. }
  656. }
  657. }
  658. @media (max-width: 1400px) {
  659. .work-analytics {
  660. .stats-row {
  661. grid-template-columns: repeat(4, 1fr);
  662. .stat-card {
  663. &:nth-child(4) {
  664. border-right: none;
  665. }
  666. &:nth-child(n+5) {
  667. border-top: 1px solid #f0f0f0;
  668. }
  669. }
  670. }
  671. }
  672. }
  673. @media (max-width: 1200px) {
  674. .work-analytics {
  675. .filter-bar {
  676. flex-direction: column;
  677. align-items: flex-start;
  678. gap: 12px;
  679. .filter-left {
  680. flex-wrap: wrap;
  681. }
  682. }
  683. .stats-row {
  684. grid-template-columns: repeat(3, 1fr);
  685. .stat-card {
  686. &:nth-child(3n) {
  687. border-right: none;
  688. }
  689. &:nth-child(n+4) {
  690. border-top: 1px solid #f0f0f0;
  691. }
  692. }
  693. }
  694. }
  695. }
  696. </style>