feat(ui): refine profile workflows and visual system

This commit is contained in:
2026-07-21 20:50:52 +08:00
parent 12a000845a
commit 04e80b184c
16 changed files with 1105 additions and 334 deletions

View File

@@ -1,7 +1,6 @@
<view class="page-shell">
<text class="eyebrow">个人档案</text>
<view class="page-heading">
<text class="heading-icon">◎</text>
<text class="page-title">学生档案</text>
</view>
<text class="page-subtitle">管理学生默认信息,用于快速生成课堂反馈</text>
@@ -13,7 +12,7 @@
<view class="search-row">
<view class="search-box">
<text class="search-icon">⌕</text>
<icon class="search-icon" type="search" size="18" color="#6E6E73" />
<input
class="search-input"
placeholder="搜索学生姓名、年级、学科或称呼"
@@ -23,8 +22,13 @@
confirm-type="search"
/>
</view>
<button class="filter-button" bindtap="toggleFilter" aria-label="筛选学生档案">
<text>▽</text>
<button class="filter-button {{filterVisible || filterCount ? 'filter-button-active' : ''}}" bindtap="toggleFilter" aria-label="筛选学生档案,已启用 {{filterCount}} 项">
<view class="filter-icon" aria-hidden="true">
<view class="filter-icon-line filter-icon-line-first"></view>
<view class="filter-icon-line filter-icon-line-second"></view>
<view class="filter-icon-line filter-icon-line-third"></view>
</view>
<text wx:if="{{filterCount}}" class="filter-count">{{filterCount}}</text>
</button>
</view>
@@ -45,13 +49,9 @@
</view>
</view>
<view class="archive-toolbar surface">
<view class="archive-toolbar">
<view class="toolbar-copy">
<view class="toolbar-title-row">
<text class="toolbar-icon">▣</text>
<text class="toolbar-title">档案卡片</text>
</view>
<text class="toolbar-description">点击卡片展开最近三条反馈</text>
<text class="toolbar-title">学生列表</text>
<text class="toolbar-updated">上次更新:{{lastUpdatedText}}</text>
</view>
<view class="toolbar-actions">
@@ -78,21 +78,61 @@
<view wx:else class="profile-list">
<view wx:for="{{filteredProfiles}}" wx:key="id" class="profile-card surface">
<view class="profile-card-top">
<view>
<text class="profile-name">{{item.name}}</text>
<text class="profile-guardian">{{item.guardianTitle}}</text>
<view
class="profile-summary"
data-id="{{item.id}}"
bindtap="toggleProfile"
aria-role="button"
aria-label="{{expandedProfileId === item.id ? '收起' : '展开'}}{{item.name}}的最近反馈"
aria-expanded="{{expandedProfileId === item.id}}"
>
<view class="profile-card-top">
<view>
<text class="profile-name">{{item.name}}</text>
<text class="profile-guardian">{{item.guardianTitle}}</text>
</view>
<view class="profile-card-actions">
<button
class="profile-menu-button"
disabled="{{deletingId === item.id}}"
data-id="{{item.id}}"
catchtap="openProfileActions"
aria-label="{{item.name}}的更多操作"
>
<text>{{deletingId === item.id ? '…' : '•••'}}</text>
</button>
<text class="profile-chevron {{expandedProfileId === item.id ? 'profile-chevron-expanded' : ''}}" aria-hidden="true"></text>
</view>
</view>
<view class="profile-tags">
<text class="profile-tag">{{item.grade}}</text>
<text class="profile-tag">{{item.subject}}</text>
<text class="profile-tag">{{item.academicTermLabel}}</text>
</view>
<view class="profile-time-row">
<text class="profile-time-label">上课时间</text>
<text class="profile-time-value">{{item.startTime}} - {{item.endTime}}</text>
</view>
<button class="delete-button" loading="{{deletingId === item.id}}" disabled="{{deletingId === item.id}}" data-id="{{item.id}}" catchtap="deleteProfile" aria-label="删除学生档案">删除</button>
</view>
<view class="profile-tags">
<text class="profile-tag">{{item.grade}}</text>
<text class="profile-tag">{{item.subject}}</text>
<text class="profile-tag">{{item.academicYear}}{{item.term}}</text>
</view>
<view class="profile-time-row">
<text class="profile-time-label">上课时间</text>
<text class="profile-time-value">{{item.startTime}} - {{item.endTime}}</text>
<view wx:if="{{expandedProfileId === item.id}}" class="profile-feedback-panel">
<view class="profile-feedback-heading">
<text class="profile-feedback-title">最近反馈</text>
<text wx:if="{{recentFeedbackByProfile[item.id] && recentFeedbackByProfile[item.id].length}}" class="profile-feedback-count">{{recentFeedbackByProfile[item.id].length}} 条</text>
</view>
<view wx:if="{{feedbackLoadingByProfile[item.id]}}" class="profile-feedback-status">正在读取反馈...</view>
<view wx:elif="{{feedbackErrorsByProfile[item.id]}}" class="profile-feedback-status profile-feedback-error">
<text>{{feedbackErrorsByProfile[item.id]}}</text>
<text class="profile-feedback-retry" data-id="{{item.id}}" catchtap="retryRecentFeedback">重试</text>
</view>
<view wx:elif="{{!recentFeedbackByProfile[item.id] || recentFeedbackByProfile[item.id].length === 0}}" class="profile-feedback-status">暂无反馈记录</view>
<view wx:else class="recent-feedback-list">
<view wx:for="{{recentFeedbackByProfile[item.id]}}" wx:for-item="feedback" wx:key="id" class="recent-feedback-item">
<text class="recent-feedback-date">{{feedback.feedbackDate}}</text>
<text class="recent-feedback-content">{{feedback.content}}</text>
</view>
</view>
</view>
</view>
</view>
@@ -103,12 +143,14 @@
<view class="sheet-top">
<view>
<view class="sheet-title-row">
<text class="sheet-title-icon">▣</text>
<text class="sheet-title">新增学生档案</text>
</view>
<text class="sheet-subtitle">保存后会同步到学生档案列表</text>
</view>
<text class="defaults-link" bindtap="goDefaults">设置预设项 </text>
<view class="sheet-actions">
<text class="defaults-link" bindtap="goDefaults">设置预设项 </text>
<button class="sheet-close" bindtap="closeCreate" aria-label="关闭新增学生弹窗">×</button>
</view>
</view>
<scroll-view class="sheet-scroll" scroll-y="true">