From 32b7ae9dedddfff0cf9406ef50a6e6ff61bf78d4 Mon Sep 17 00:00:00 2001 From: xiayebo <364530740@qq.com> Date: Fri, 26 Dec 2025 18:18:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E8=BF=91=E5=8A=A8=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pagesBank/dashboard/index.vue | 220 +++++++++++++++++++++++++++--- 1 file changed, 203 insertions(+), 17 deletions(-) diff --git a/src/pagesBank/dashboard/index.vue b/src/pagesBank/dashboard/index.vue index a7bf835..984b599 100644 --- a/src/pagesBank/dashboard/index.vue +++ b/src/pagesBank/dashboard/index.vue @@ -21,6 +21,103 @@ const quickActions = [ { icon: 'i-carbon-settings', label: '设置', path: '/pagesBank/me/index' }, ] +// 最近动态数据 +interface RecentActivity { + id: number + type: 'audit' | 'visit' | 'customer' | 'withdraw' + title: string + description: string + time: string + status?: 'pending' | 'approved' | 'rejected' | 'completed' +} + +const recentActivities = ref([ + { + id: 1, + type: 'audit', + title: '贷款审核', + description: '商户"张三便利店"提交的贷款申请待审核', + time: '10分钟前', + status: 'pending', + }, + { + id: 2, + type: 'visit', + title: '拜访计划', + description: '已安排拜访"李四超市"了解经营情况', + time: '30分钟前', + status: 'completed', + }, + { + id: 3, + type: 'audit', + title: '提现审核', + description: '商户"王五五金店"提现申请已通过', + time: '1小时前', + status: 'approved', + }, + { + id: 4, + type: 'customer', + title: '客户入驻', + description: '新商户"赵六服装店"提交入驻申请', + time: '2小时前', + status: 'pending', + }, + { + id: 5, + type: 'audit', + title: '贷款审核', + description: '商户"孙七水果店"的贷款申请已拒绝', + time: '3小时前', + status: 'rejected', + }, +]) + +// 获取动态类型对应的图标 +function getActivityIcon(type: string) { + const iconMap: Record = { + audit: 'i-carbon-task-approved', + visit: 'i-carbon-calendar', + customer: 'i-carbon-group', + withdraw: 'i-carbon-wallet', + } + return iconMap[type] || 'i-carbon-information' +} + +// 获取动态类型对应的颜色 +function getActivityColor(type: string) { + const colorMap: Record = { + audit: '#ff8f0d', + visit: '#00c05a', + customer: '#3b82f6', + withdraw: '#8b5cf6', + } + return colorMap[type] || '#666' +} + +// 获取状态对应的文本 +function getStatusText(status?: string) { + const statusMap: Record = { + pending: '待审核', + approved: '已通过', + rejected: '已拒绝', + completed: '已完成', + } + return status ? statusMap[status] : '' +} + +// 获取状态对应的颜色 +function getStatusColor(status?: string) { + const colorMap: Record = { + pending: '#ff8f0d', + approved: '#00c05a', + rejected: '#ef4444', + completed: '#3b82f6', + } + return status ? colorMap[status] : '' +} + function handleAction(path: string) { if (!path) { uni.showToast({ title: '功能开发中', icon: 'none' }) @@ -29,6 +126,20 @@ function handleAction(path: string) { uni.navigateTo({ url: path }) } +function handleActivityClick(activity: RecentActivity) { + // 根据动态类型跳转到对应页面 + const pathMap: Record = { + audit: '/pagesBank/audit/list', + visit: '/pagesBank/visit/list', + customer: '/pagesBank/customer/list', + withdraw: '/pagesBank/audit/list', + } + const path = pathMap[activity.type] + if (path) { + uni.navigateTo({ url: path }) + } +} + onMounted(() => { bankStore.fetchStats() }) @@ -116,15 +227,37 @@ onMounted(() => { - + 最近动态 - 更多 > + 更多 > - - - 暂无新的审核动态 + + + + + + + + {{ activity.title }} + + {{ getStatusText(activity.status) }} + + + {{ activity.description }} + {{ activity.time }} + + @@ -334,21 +467,74 @@ onMounted(() => { } } -.empty-dynamic { +.activity-list { display: flex; flex-direction: column; - align-items: center; - justify-content: center; - padding: 40rpx 0; - color: #adb5bd; - gap: 16rpx; + gap: 24rpx; - text:first-child { - font-size: 64rpx; - } - - text:last-child { - font-size: 26rpx; + .activity-item { + display: flex; + gap: 20rpx; + padding: 24rpx; + background: #f8f9fa; + border-radius: 16rpx; + transition: all 0.2s; + + &:active { + background: #e9ecef; + transform: scale(0.98); + } + + .activity-icon { + width: 72rpx; + height: 72rpx; + border-radius: 16rpx; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + + text { + font-size: 36rpx; + } + } + + .activity-content { + flex: 1; + display: flex; + flex-direction: column; + gap: 8rpx; + + .activity-header { + display: flex; + justify-content: space-between; + align-items: center; + + .activity-title { + font-size: 28rpx; + font-weight: 600; + color: #333; + } + + .activity-status { + font-size: 22rpx; + padding: 4rpx 12rpx; + background: rgba(0, 0, 0, 0.05); + border-radius: 8rpx; + } + } + + .activity-description { + font-size: 24rpx; + color: #666; + line-height: 1.5; + } + + .activity-time { + font-size: 22rpx; + color: #999; + } + } } }