antd-timeinfotable-fy
运单时效信息展示
Installation
npm i antd-timeinfotable-fy
or
yarn add antd-timeinfotable-fy
注意
由于使用了react-Hooks
,需安装 react 16.8.0 版本以上,依赖antd,需要安装antd
"antd": "3.18.2",
"react": "^16.8.4",
参数格式示例
const goodsTimeInfo = {
"pointList": [{
"id": 20880428,
"orderSn": "429120560622",
"address": "藁城区人民法院",
"status": 0,
"statusEnum": "DEFAULT",
"provinceId": 10,
"cityId": 138,
"districtId": 1086,
"provinceName": "河北",
"cityName": "石家庄",
"districtName": "藁城区",
"longitude": 114.835362,
"latitude": 38.020827,
"contactName": "测试",
"contactMobile": "18000000001",
"createTime": 1575541212000,
"planInTime": 1575616810000,
"planOutTime": 1575627610000,
"realInTime": 1575541492000,
"realOutTime": 1575541505000,
"deductInTime": 1575541492000,
"deductOutTime": 1575541205000,
"pointType": 1,
"pointTypeEnum": "POINT_START"
}, {
"id": 20880429,
"orderSn": "429120560622",
"address": "保定东站",
"status": 0,
"statusEnum": "DEFAULT",
"provinceId": 10,
"cityId": 139,
"districtId": 1110,
"provinceName": "河北",
"cityName": "保定",
"districtName": "清苑区",
"longitude": 115.600776,
"latitude": 38.863801,
"createTime": 1575541365000,
"realInTime": 1575541530000,
"deductInTime": 1575541530000,
"pointType": 2,
"pointTypeEnum": "POINT_CENTER"
}, {
"id": 20880430,
"orderSn": "429120560622",
"address": "金隅嘉华大厦",
"status": 0,
"statusEnum": "DEFAULT",
"provinceId": 2,
"cityId": 52,
"districtId": 502,
"provinceName": "北京",
"cityName": "北京",
"districtName": "海淀区",
"longitude": 116.307951,
"latitude": 40.036804,
"contactName": "测试",
"contactMobile": "18000000001",
"createTime": 1575541212000,
"planInTime": 1575670810000,
"realInTime": 1575541542000,
"realOutTime": 1575541542000,
"deductInTime": 1575541842000,
"deductOutTime": 1575541542000,
"pointType": 3,
"pointTypeEnum": "POINT_END"
}],
"planTransTime": 43200
};
const isdeBang =0://0表示非德邦,1表示德邦;
const titleForRows = ['客户计划', '司机打点', '进出围栏', '福佑调整', '德邦系统'];//自定义横栏标题
示例
import TimeInfoDispaly from 'antd-timeinfotable-fy';
class App extends Component {
constructor(props) {
super(props);
}
render() {
return (
<TimeInfoDispaly
goodsTimeInfo={goodsTimeInfo}
isdeBang={isDebang}
titleForRows={titleForRows}
/>
);
}
}