1.1.4 • Published 4 years ago
traffic-biz-component v1.1.4
安装
npm i traffic-biz-component
接入
import { InterConfigSetting } from 'traffic-biz-component'
<InterConfigSetting.ParamsAsync
inter={{
id: '152C909H0R0',
interName: '南京路路口'
}}
week={[
{
label: '星期一',
value: 0,
time: [{
label: '05:10-07:00',
value: '0510-0700'
}, {
label: '09:30-17:00',
value: '0930-1700'
}]
},
{
label: '星期二',
value: 1,
time: [{
label: '05:10-07:00',
value: '0510-0700'
}, {
label: '09:30-17:00',
value: '0930-1700'
}]
}
]}
taskId='20807'
onTimeClick={
(week, time) => {
console.log(week, time)
}
}
batchSaveCallBack={
(res) => {
console.log(res)
}
}
saveCallBack={
(res) => {
console.log(res)
}
}
/>
参数
属性名 | 描述 | 参考 | 默认值 | 是否必传 |
---|---|---|---|---|
inter | 路口信息 | {id: 'xx', interName: '路口'} | {} | 是 |
taskId | 任务ID | 20789 | '' | 是 |
week | 日期时间 | [{labe: '星期一',value: 0, time:{label:'05:00-06:00',value:'0500-0600'}}] | [] | 是 |
onTimeClick | 星期或时间切换回调 | e => week, time | 否 | |
saveCallBack | 保存回调 | e=> (activeWeek, activeTime, currentParams, taskId) | 否 | |
batchSaveCallBack | 批量保存回调 | e =>(checkedRoad, checkedPhase, applyTime, currentParams, taskId) | 否 |