import React from "react";
import { vehicleInfoCard, CheckBoxItem } from "../../utils";
import { Checkbox} from 'antd';
const CheckGroup=Checkbox.Group
class vehicleCard extends React.Component {
  render() {
    let { vehicleData, searchKeyChange, selectDataList, click } = this.props;
    let id = vehicleData.id
    
    let selectKeys = selectDataList[id] || [];
    return (
      <>
        {vehicleInfoCard(vehicleData, click)}
        <div className="relation-search-box ">
          <div className="relation-search-title">资源碰撞：</div>
          <div
            className="relation-search-content"
            style={{ padding: "0 0 10px 0" }}
          >
            <CheckGroup onChange={searchKeyChange} defaultValue={selectKeys}>
              {CheckBoxItem(
                selectKeys,
                "queryVehicleAndXidRelation",
                "查询车辆和对象（人/车/场所）的关系"
              )}

            </CheckGroup>
          </div>
        </div>
      </>
    );
  }
}

export default vehicleCard;
