fix: 处理记录圆点按动作着色(通过绿、驳回红、其余蓝)
This commit is contained in:
@@ -107,7 +107,7 @@
|
||||
|
||||
<uni-card :border="false" :padding="'16px'" title="处理记录">
|
||||
<view v-for="item in detail.records" :key="item.id" class="timeline-item">
|
||||
<view class="timeline-dot"></view>
|
||||
<view class="timeline-dot" :class="dotClass(item.action)"></view>
|
||||
<view class="timeline-body">
|
||||
<view class="timeline-head">
|
||||
<text class="timeline-operator">{{ item.operatorName || '—' }}</text>
|
||||
@@ -485,6 +485,17 @@ function formatTime(value?: string) {
|
||||
return value.replace('T', ' ').substring(0, 19);
|
||||
}
|
||||
|
||||
/** 处理记录圆点:通过/存档/归档绿色,驳回红色,其余蓝色 */
|
||||
function dotClass(action?: string) {
|
||||
if (action === 'REJECT') {
|
||||
return 'dot-reject';
|
||||
}
|
||||
if (action === 'APPROVE' || action === 'CONFIRM' || action === 'ARCHIVE') {
|
||||
return 'dot-approve';
|
||||
}
|
||||
return 'dot-default';
|
||||
}
|
||||
|
||||
function formatFee(value?: number) {
|
||||
if (value === undefined || value === null) {
|
||||
return '—';
|
||||
@@ -626,10 +637,18 @@ function formatSize(value?: number) {
|
||||
height: 16rpx;
|
||||
margin: 10rpx 16rpx 0 0;
|
||||
border-radius: 50%;
|
||||
background: #d81e06;
|
||||
background: #3c9cff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.timeline-dot.dot-approve {
|
||||
background: #19be6b;
|
||||
}
|
||||
|
||||
.timeline-dot.dot-reject {
|
||||
background: #d81e06;
|
||||
}
|
||||
|
||||
.timeline-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user