feat(platform): polish customer time window controls
This commit is contained in:
@@ -294,30 +294,46 @@ export function AppShell({
|
||||
value={keyword}
|
||||
onChange={setKeyword}
|
||||
onEnterPress={search}
|
||||
style={{ width: 320 }}
|
||||
style={{ width: 280 }}
|
||||
/>
|
||||
<Button theme="solid" type="primary" loading={searching} onClick={search}>查询车辆</Button>
|
||||
</Space>
|
||||
<div className="vp-topbar-context">
|
||||
<div className="vp-topbar-time-window" aria-label="客户时间窗">
|
||||
<label>
|
||||
<span>开始</span>
|
||||
<div className="vp-topbar-time-window-copy">
|
||||
<strong>客户时间窗</strong>
|
||||
<span>同步约束地图、轨迹、统计、导出和告警</span>
|
||||
</div>
|
||||
<label htmlFor="vp-customer-time-window-start">
|
||||
<span>开始日期</span>
|
||||
<input
|
||||
aria-label="顶部时间窗开始"
|
||||
type="date"
|
||||
id="vp-customer-time-window-start"
|
||||
aria-label="客户时间窗开始日期"
|
||||
type="text"
|
||||
inputMode="numeric"
|
||||
pattern="\d{4}-\d{2}-\d{2}"
|
||||
placeholder="YYYY-MM-DD"
|
||||
maxLength={10}
|
||||
value={dateFrom}
|
||||
onChange={(event) => onCustomerTimeWindowChange?.({ dateFrom: event.currentTarget.value, dateTo })}
|
||||
/>
|
||||
</label>
|
||||
<label>
|
||||
<span>结束</span>
|
||||
<label className="vp-sr-only" htmlFor="vp-customer-time-window-start">顶部时间窗开始</label>
|
||||
<label htmlFor="vp-customer-time-window-end">
|
||||
<span>结束日期</span>
|
||||
<input
|
||||
aria-label="顶部时间窗结束"
|
||||
type="date"
|
||||
id="vp-customer-time-window-end"
|
||||
aria-label="客户时间窗结束日期"
|
||||
type="text"
|
||||
inputMode="numeric"
|
||||
pattern="\d{4}-\d{2}-\d{2}"
|
||||
placeholder="YYYY-MM-DD"
|
||||
maxLength={10}
|
||||
value={dateTo}
|
||||
onChange={(event) => onCustomerTimeWindowChange?.({ dateFrom, dateTo: event.currentTarget.value })}
|
||||
/>
|
||||
</label>
|
||||
<label className="vp-sr-only" htmlFor="vp-customer-time-window-end">顶部时间窗结束</label>
|
||||
<div className="vp-topbar-time-window-presets">
|
||||
<button type="button" aria-label="顶部时间窗 今天" onClick={() => applyTimeWindowPreset(1)}>今天</button>
|
||||
<button type="button" aria-label="顶部时间窗 近7天" onClick={() => applyTimeWindowPreset(7)}>近7天</button>
|
||||
|
||||
Reference in New Issue
Block a user