fix(mileage): reconcile track and daily semantics
This commit is contained in:
@@ -197,7 +197,8 @@ test('renders a map-first replay workspace and connects stop, event, and panel i
|
||||
expect(view.container.querySelector('.v2-track-current-card.semi-card')).toBeInTheDocument();
|
||||
expect(view.container.querySelector('.v2-track-current-coverage')).toBeInTheDocument();
|
||||
expect(view.container.querySelectorAll('.v2-track-current-metrics > span')).toHaveLength(4);
|
||||
expect(view.container.querySelector('.v2-track-current-metrics')).toHaveTextContent('累计总里程100 km');
|
||||
expect(view.container.querySelector('.v2-track-current-metrics')).toHaveTextContent('设备累计值非区间100 km');
|
||||
expect(view.container.querySelector('.v2-track-current-metrics > span:last-child small > b')).toHaveTextContent('非区间');
|
||||
expect(view.container.querySelector('.v2-track-current-metrics > span:last-child')).toHaveAttribute('title', '当前轨迹点设备上报的累计总里程,不是所选时间窗里程或今日里程');
|
||||
expect(view.container.querySelector('.v2-track-current-evidence')).toHaveTextContent('JT/T 808时间窗完整3 → 3 点报警 —');
|
||||
expect(view.container.querySelector('.v2-track-current-evidence .v2-track-protocol-tag')).toHaveClass('semi-tag-cyan-light');
|
||||
|
||||
@@ -522,7 +522,10 @@ export default function TrackPage() {
|
||||
<span><small>速度</small><strong>{number(current?.speedKmh ?? 0)}<em> km/h</em></strong></span>
|
||||
<span><small>方向</small><strong>{direction(current?.directionDeg)}</strong></span>
|
||||
<span><small>SOC</small><strong>{current?.socAvailable ? `${number(current.socPercent)}%` : '—'}</strong></span>
|
||||
<span title="当前轨迹点设备上报的累计总里程,不是所选时间窗里程或今日里程"><small>累计总里程</small><strong>{trackPointMileageAvailable(current) ? number(current?.totalMileageKm ?? 0) : '—'}{trackPointMileageAvailable(current) ? <em> km</em> : null}</strong></span>
|
||||
<span title="当前轨迹点设备上报的累计总里程,不是所选时间窗里程或今日里程">
|
||||
<small>设备累计值<b>非区间</b></small>
|
||||
<strong>{trackPointMileageAvailable(current) ? number(current?.totalMileageKm ?? 0) : '—'}{trackPointMileageAvailable(current) ? <em> km</em> : null}</strong>
|
||||
</span>
|
||||
</div>
|
||||
<div className={`v2-track-current-evidence v2-track-current-coverage${track.coverage.complete ? '' : ' is-warning'}`}>
|
||||
<ProtocolTag className="v2-track-protocol-tag" protocol={current?.protocol} compact />
|
||||
|
||||
@@ -1948,10 +1948,25 @@
|
||||
}
|
||||
|
||||
.v2-track-current-card > .semi-card-body > .v2-track-current-metrics small {
|
||||
display: flex;
|
||||
min-width: 0;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
color: #8491a2;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.v2-track-current-card > .semi-card-body > .v2-track-current-metrics small > b {
|
||||
flex: 0 0 auto;
|
||||
border-radius: 999px;
|
||||
background: #edf3fa;
|
||||
padding: 1px 5px;
|
||||
color: #536a84;
|
||||
font-size: 8px;
|
||||
font-weight: 700;
|
||||
line-height: 13px;
|
||||
}
|
||||
|
||||
.v2-track-current-card > .semi-card-body > .v2-track-current-metrics strong {
|
||||
margin-top: 4px;
|
||||
color: #25384f;
|
||||
@@ -4419,6 +4434,10 @@
|
||||
font-size: 8px;
|
||||
}
|
||||
|
||||
.v2-track-current-card > .semi-card-body > .v2-track-current-metrics small > b {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.v2-track-current-card > .semi-card-body > .v2-track-current-metrics strong {
|
||||
margin-top: 2px;
|
||||
font-size: 12px;
|
||||
|
||||
Reference in New Issue
Block a user