From 982c97ab82f3beb1b4febcf014562eda34b9fc05 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 29 九月 2026 17:59:41 +0800
Subject: [PATCH] feat(ui): 江苏商贸品牌视觉与首页/登录页改版
---
src/views/dashboard/analytics/modules/recent-applications.vue | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 272 insertions(+), 0 deletions(-)
diff --git a/src/views/dashboard/analytics/modules/recent-applications.vue b/src/views/dashboard/analytics/modules/recent-applications.vue
new file mode 100644
index 0000000..3e6ff61
--- /dev/null
+++ b/src/views/dashboard/analytics/modules/recent-applications.vue
@@ -0,0 +1,272 @@
+<script lang="ts" setup>
+import { onMounted, ref } from 'vue';
+
+import { IconifyIcon } from '@vben/icons';
+
+import { getApplicationPage } from '#/api/research/application';
+
+defineOptions({ name: 'DashboardRecentApplications' });
+
+const emit = defineEmits<{
+ navigate: [name: string];
+}>();
+
+interface Row {
+ id?: number;
+ no?: string;
+ title: string;
+ applicantName: string;
+ status?: number;
+ createTime?: string;
+}
+
+/** 鐘舵�佺爜 鈫� 灞曠ず鏂囨涓庨厤鑹诧紝涓� research_application_status 瀛楀吀淇濇寔涓�鑷� */
+const STATUS_MAP: Record<number, { text: string; tone: string }> = {
+ 0: { text: '鑽夌', tone: 'gray' },
+ 15: { text: '瀹℃壒涓�', tone: 'gold' },
+ 20: { text: '宸茬珛椤�', tone: 'green' },
+ 35: { text: '宸查┏鍥�', tone: 'red' },
+};
+
+function statusOf(code?: number) {
+ if (code === undefined || code === null) {
+ return { text: '鈥�', tone: 'gray' };
+ }
+ return STATUS_MAP[code] ?? { text: String(code), tone: 'gray' };
+}
+
+const loading = ref(true);
+const rows = ref<Row[]>([]);
+
+async function load() {
+ loading.value = true;
+ try {
+ const result = await getApplicationPage({ pageNo: 1, pageSize: 6 });
+ rows.value = (result.list ?? []) as Row[];
+ } catch {
+ rows.value = [];
+ } finally {
+ loading.value = false;
+ }
+}
+
+onMounted(load);
+</script>
+
+<template>
+ <div class="elite-section">
+ <div class="elite-head">
+ <h3 class="elite-title">
+ <span class="elite-bar"></span>
+ 鏈�杩戣棰樼敵鎶�
+ </h3>
+ <span class="elite-more" @click="emit('navigate', 'ResearchApplication')">
+ 鍏ㄩ儴
+ <IconifyIcon class="size-3.5" icon="lucide:chevron-right" />
+ </span>
+ </div>
+
+ <div v-if="loading" class="elite-empty">鍔犺浇涓��</div>
+
+ <div v-else-if="rows.length === 0" class="elite-empty">
+ <IconifyIcon class="mb-2 size-8 opacity-40" icon="lucide:file-text" />
+ <div>鏆傛棤璇鹃鐢虫姤璁板綍</div>
+ </div>
+
+ <table v-else class="elite-table">
+ <thead>
+ <tr>
+ <th class="col-title">璇鹃鍚嶇О</th>
+ <th class="col-applicant">鐢虫姤浜�</th>
+ <th class="col-status">鐘舵��</th>
+ <th class="col-time">鐢虫姤鏃堕棿</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr
+ v-for="row in rows"
+ :key="row.id ?? row.no"
+ @click="emit('navigate', 'ResearchApplication')"
+ >
+ <td class="col-title">
+ <span class="elite-ellipsis">{{ row.title }}</span>
+ </td>
+ <td class="col-applicant">{{ row.applicantName || '鈥�' }}</td>
+ <td class="col-status">
+ <span class="elite-chip" :class="`tone-${statusOf(row.status).tone}`">
+ {{ statusOf(row.status).text }}
+ </span>
+ </td>
+ <td class="col-time">{{ row.createTime || '鈥�' }}</td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+</template>
+
+<style scoped>
+.elite-section {
+ border-radius: 14px;
+ padding: 20px;
+ background: #fdfcfa;
+ border: 1px solid rgba(212, 175, 55, 0.22);
+ box-shadow: 0 2px 14px rgba(15, 36, 64, 0.05);
+}
+
+.dark .elite-section {
+ background: #101a2b;
+ border-color: rgba(212, 175, 55, 0.2);
+ box-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
+}
+
+.elite-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ margin-bottom: 14px;
+}
+
+.elite-title {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ margin: 0;
+ font-size: 15px;
+ font-weight: 600;
+ letter-spacing: 1px;
+ color: #0f2440;
+}
+
+.dark .elite-title {
+ color: #f0ead8;
+}
+
+.elite-bar {
+ display: inline-block;
+ width: 3px;
+ height: 15px;
+ border-radius: 2px;
+ background: linear-gradient(180deg, #e3c567, #b8901f);
+}
+
+.elite-more {
+ display: inline-flex;
+ cursor: pointer;
+ align-items: center;
+ gap: 2px;
+ font-size: 12px;
+ color: #b8901f;
+ transition: color 0.2s ease;
+}
+
+.elite-more:hover {
+ color: #8a6a12;
+}
+
+.elite-empty {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ padding: 34px 0;
+ font-size: 13px;
+ color: #8a94a6;
+}
+
+.elite-table {
+ width: 100%;
+ border-collapse: collapse;
+ table-layout: fixed;
+}
+
+.elite-table th {
+ padding: 0 8px 10px;
+ font-size: 12px;
+ font-weight: 500;
+ letter-spacing: 1px;
+ color: #8a94a6;
+ text-align: left;
+ border-bottom: 1px solid rgba(15, 36, 64, 0.08);
+}
+
+.elite-table td {
+ padding: 12px 8px;
+ font-size: 13.5px;
+ color: #0f2440;
+ border-bottom: 1px solid rgba(15, 36, 64, 0.05);
+}
+
+.dark .elite-table td {
+ color: #e6e9ef;
+}
+
+.elite-table tbody tr {
+ cursor: pointer;
+ transition: background-color 0.2s ease;
+}
+
+.elite-table tbody tr:hover {
+ background: rgba(212, 175, 55, 0.07);
+}
+
+.elite-table tbody tr:last-child td {
+ border-bottom: none;
+}
+
+.col-title {
+ width: 44%;
+}
+
+.col-applicant {
+ width: 18%;
+}
+
+.col-status {
+ width: 16%;
+}
+
+.col-time {
+ width: 22%;
+ color: #8a94a6;
+}
+
+.elite-ellipsis {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* 鐘舵�佹爣绛撅細閲�/缁�/绾�/鐏板洓妗� */
+.elite-chip {
+ display: inline-block;
+ padding: 2px 10px;
+ font-size: 12px;
+ border-radius: 999px;
+ border: 1px solid transparent;
+}
+
+.tone-gold {
+ color: #b8901f;
+ background: rgba(212, 175, 55, 0.1);
+ border-color: rgba(212, 175, 55, 0.35);
+}
+
+.tone-green {
+ color: #2f6b4f;
+ background: rgba(47, 107, 79, 0.1);
+ border-color: rgba(47, 107, 79, 0.3);
+}
+
+.tone-red {
+ color: #b4453c;
+ background: rgba(180, 69, 60, 0.1);
+ border-color: rgba(180, 69, 60, 0.3);
+}
+
+.tone-gray {
+ color: #8a94a6;
+ background: rgba(138, 148, 166, 0.1);
+ border-color: rgba(138, 148, 166, 0.28);
+}
+</style>
--
Gitblit v1.9.3