feat(ui): restore reference mini program and admin design

This commit is contained in:
2026-08-13 10:58:04 +08:00
parent 9622d249be
commit 58787e738a
26 changed files with 1027 additions and 329 deletions
+24 -9
View File
@@ -15,6 +15,8 @@ import ActivitiesView from './views/ActivitiesView.vue';
import ContentView from './views/ContentView.vue';
import NotificationDeliveriesView from './views/NotificationDeliveriesView.vue';
import StatisticsView from './views/StatisticsView.vue';
import DashboardView from './views/DashboardView.vue';
import AdminIcon from './components/AdminIcon.vue';
const auth = useAuthStore();
const form = reactive({ username: '', password: '' });
@@ -23,6 +25,7 @@ const submitting = ref(false);
const showPassword = ref(false);
const message = ref('');
const activeView = ref<
| 'dashboard'
| 'applications'
| 'beneficiaries'
| 'cases'
@@ -33,7 +36,7 @@ const activeView = ref<
| 'content'
| 'notifications'
| 'statistics'
>('applications');
>('dashboard');
onMounted(() => auth.restore());
@@ -136,13 +139,21 @@ async function logout(): Promise<void> {
<div><strong>乐活公益</strong><small>管理平台</small></div>
</div>
<nav>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'dashboard' }]"
type="button"
:aria-current="activeView === 'dashboard' ? 'page' : undefined"
@click="activeView = 'dashboard'"
>
<AdminIcon name="dashboard" />工作概览
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'applications' }]"
type="button"
:aria-current="activeView === 'applications' ? 'page' : undefined"
@click="activeView = 'applications'"
>
服务申请
<AdminIcon name="application" />服务申请
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'statistics' }]"
@@ -150,7 +161,7 @@ async function logout(): Promise<void> {
:aria-current="activeView === 'statistics' ? 'page' : undefined"
@click="activeView = 'statistics'"
>
服务统计
<AdminIcon name="chart" />服务统计
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'content' }]"
@@ -158,7 +169,7 @@ async function logout(): Promise<void> {
:aria-current="activeView === 'content' ? 'page' : undefined"
@click="activeView = 'content'"
>
内容发布
<AdminIcon name="content" />内容发布
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'notifications' }]"
@@ -166,7 +177,7 @@ async function logout(): Promise<void> {
:aria-current="activeView === 'notifications' ? 'page' : undefined"
@click="activeView = 'notifications'"
>
通知投递
<AdminIcon name="notification" />通知投递
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'beneficiaries' }]"
@@ -174,7 +185,7 @@ async function logout(): Promise<void> {
:aria-current="activeView === 'beneficiaries' ? 'page' : undefined"
@click="activeView = 'beneficiaries'"
>
服务对象
<AdminIcon name="people" />服务对象
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'cases' }]"
@@ -182,7 +193,7 @@ async function logout(): Promise<void> {
:aria-current="activeView === 'cases' ? 'page' : undefined"
@click="activeView = 'cases'"
>
服务工单
<AdminIcon name="case" />服务工单
</button>
<button
:class="['nav-item', { 'nav-item--active': activeView === 'follow-ups' }]"
@@ -217,7 +228,7 @@ async function logout(): Promise<void> {
活动与报名
</button>
</nav>
<p class="phase-note">Phase 6:内容审核、站内消息与微信订阅通知</p>
<p class="phase-note">仅限授权人员访问,关键业务操作均记录审计。</p>
</aside>
<div class="admin-main">
<header class="admin-topbar">
@@ -230,7 +241,11 @@ async function logout(): Promise<void> {
</button>
</header>
<p v-if="message" class="global-message" role="alert">{{ message }}</p>
<ServiceApplicationsView v-if="activeView === 'applications'" />
<DashboardView
v-if="activeView === 'dashboard'"
@navigate="activeView = $event as typeof activeView"
/>
<ServiceApplicationsView v-else-if="activeView === 'applications'" />
<BeneficiariesView v-else-if="activeView === 'beneficiaries'" />
<ServiceCasesView v-else-if="activeView === 'cases'" />
<FollowUpsView v-else-if="activeView === 'follow-ups'" />