style(mobile-uni): 重构今日安排任务列表排版,新增Top-Meta栏与主题色卡片亮边

This commit is contained in:
2026-07-23 01:35:06 +08:00
parent 163b08ecfe
commit 390bbda993
+120 -33
View File
@@ -102,28 +102,46 @@
</view>
<view class="schedule-list">
<view class="schedule-row" v-if="primaryScheduleTitle">
<view class="schedule-tag" :class="primaryAssignmentTagClass">
<text class="schedule-tag-text">{{ primaryAssignmentTagText }}</text>
<view class="schedule-row" :class="primaryAssignmentAccentClass" v-if="primaryScheduleTitle">
<view class="schedule-row-header">
<view class="schedule-tag" :class="primaryAssignmentTagClass">
<uni-icons :type="primaryAssignmentTagIcon" size="12" :color="primaryAssignmentTagColor" />
<text class="schedule-tag-text">{{ primaryAssignmentTagText }}</text>
</view>
<view class="schedule-time-meta">
<uni-icons type="clock" size="12" color="#9a9da3" />
<text class="time-meta-text">预计 3 分钟</text>
</view>
</view>
<view class="schedule-copy">
<text class="schedule-title">{{ primaryScheduleTitle }}</text>
<text class="schedule-desc">{{ primaryScheduleDesc }}</text>
<view class="schedule-row-body">
<view class="schedule-copy">
<text class="schedule-title">{{ primaryScheduleTitle }}</text>
<text class="schedule-desc">{{ primaryScheduleDesc }}</text>
</view>
<button class="schedule-action primary-gradient-btn" @click="openPrimarySchedule">
{{ primaryAssignment?.source === 'daily' ? '去作答' : '开始练习' }}
</button>
</view>
<button class="schedule-action primary-gradient-btn" @click="openPrimarySchedule">
{{ primaryAssignment?.source === 'daily' ? '去作答' : '开始练习' }}
</button>
</view>
<view class="schedule-row" v-if="home?.review">
<view class="schedule-tag tag-review">
<text class="schedule-tag-text">SOP复习</text>
<view class="schedule-row accent-review" v-if="home?.review">
<view class="schedule-row-header">
<view class="schedule-tag tag-review">
<uni-icons type="paperplane-filled" size="12" color="#059669" />
<text class="schedule-tag-text">SOP复习</text>
</view>
<view class="schedule-time-meta">
<uni-icons type="clock" size="12" color="#9a9da3" />
<text class="time-meta-text">预计 5 分钟</text>
</view>
</view>
<view class="schedule-copy">
<text class="schedule-title">{{ home?.review?.title }}</text>
<text class="schedule-desc">{{ home?.review?.desc }}</text>
<view class="schedule-row-body">
<view class="schedule-copy">
<text class="schedule-title">{{ home?.review?.title }}</text>
<text class="schedule-desc">{{ home?.review?.desc }}</text>
</view>
<button class="schedule-action review-action" @click="ask(home?.review?.title || '岗前SOP复习')">去复习</button>
</view>
<button class="schedule-action review-action" @click="ask(home?.review?.title || '岗前SOP复习')">去复习</button>
</view>
</view>
</view>
@@ -240,6 +258,27 @@ const primaryAssignmentTagClass = computed(() => {
return 'tag-practice';
});
const primaryAssignmentAccentClass = computed(() => {
const source = primaryAssignment.value?.source;
if (source === 'daily') return 'accent-daily';
if (source === 'retry') return 'accent-retry';
return 'accent-practice';
});
const primaryAssignmentTagIcon = computed(() => {
const source = primaryAssignment.value?.source;
if (source === 'daily') return 'compose';
if (source === 'retry') return 'refresh';
return 'flag-filled';
});
const primaryAssignmentTagColor = computed(() => {
const source = primaryAssignment.value?.source;
if (source === 'daily') return '#2d80ff';
if (source === 'retry') return '#d97706';
return '#e60012';
});
const primaryAssignment = computed(() =>
assignments.value.find((item) => item.status === '待训练' && item.source !== 'daily')
@@ -1057,31 +1096,58 @@ onUnload(() => {
.schedule-list {
display: flex;
flex-direction: column;
gap: 10px;
gap: 12px;
}
.schedule-row {
display: flex;
flex-direction: column;
gap: 10px;
padding: 14px;
border-radius: 18px;
background: #ffffff;
border: 1px solid #f0f1f5;
border-left: 4px solid var(--employee-primary);
box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.schedule-row.accent-daily {
border-left-color: #2d80ff;
}
.schedule-row.accent-retry {
border-left-color: #d97706;
}
.schedule-row.accent-practice {
border-left-color: var(--employee-primary);
}
.schedule-row.accent-review {
border-left-color: #10b981;
}
.schedule-row-header {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 12px;
border-radius: 16px;
background: #f9f9fb;
justify-content: space-between;
width: 100%;
}
.schedule-tag {
display: flex;
align-items: center;
justify-content: center;
padding: 5px 10px;
border-radius: 10px;
gap: 4px;
padding: 3px 8px;
border-radius: 8px;
flex: none;
}
.schedule-tag-text {
font-size: 12px;
font-size: 11px;
font-weight: 800;
line-height: 1;
line-height: 1.2;
}
.tag-daily {
@@ -1104,6 +1170,26 @@ onUnload(() => {
color: #059669;
}
.schedule-time-meta {
display: flex;
align-items: center;
gap: 4px;
}
.time-meta-text {
font-size: 11px;
font-weight: 500;
color: #9a9da3;
}
.schedule-row-body {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
width: 100%;
}
.schedule-copy {
display: flex;
min-width: 0;
@@ -1114,30 +1200,31 @@ onUnload(() => {
.schedule-title {
color: #1a1a1a;
font-size: 16px;
font-size: 15px;
font-weight: 800;
line-height: 1.3;
line-height: 1.45;
}
.schedule-desc {
color: #8a8d93;
font-size: 13px;
font-size: 12px;
line-height: 1.4;
}
.schedule-action {
display: flex;
width: auto;
min-width: 84px;
min-height: 44px;
min-width: 80px;
height: 40px;
min-height: 40px;
flex: none;
align-items: center;
justify-content: center;
padding: 0 12px;
padding: 0 14px;
border-radius: 12px;
background: var(--employee-primary);
color: #ffffff;
font-size: 15px;
font-size: 14px;
font-weight: 800;
line-height: 1.2;
white-space: nowrap;