package com.police.policedatasystem.data.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.police.policedatasystem.R;
import com.police.policedatasystem.model.PoliceEmergency;
import com.police.policedatasystem.util.UiUtils;

public class PoliceEmergencyAdapter extends BaseQuickAdapter<PoliceEmergency, BaseViewHolder> {

    public PoliceEmergencyAdapter() {
        super(R.layout.item_police_emergency); // 指定列表项的布局
    }

    @Override
    protected void convert(BaseViewHolder helper, PoliceEmergency item) {
        helper.setText(R.id.tv_police_num_title, "警情编号："+item.getJcjbh());//警情编号
        helper.setText(R.id.item_content, item.getBjjyqk());//报警内容
        helper.setText(R.id.tv_police_tel, item.getBjrlxdh());//报警电话
        helper.setText(R.id.tv_police_time, UiUtils.formatTime(item.getJjsj()));//报警时间
        helper.setText(R.id.tv_police_loc, item.getAsjfsdddzmc());//报警地址
    }
}