import services from '@/services';
import { useRequest } from 'ahooks';
import { Descriptions } from 'antd';
import { useMemo } from 'react';
import styles from './inedx.less';
const AdministPunishList = (props: any) => {
  const { data } = useRequest(
    () =>
      services.DataBase.getSjdzInfoData({
        typeCode: 'zzcc-xzcf-xzcffylb',
        params: {
          id: props?.id,
        },
      }),
    {
      refreshDeps: [props?.id],
    },
  );
  console.log(data);

  const items = useMemo(() => {
    return [
      {
        key: '1',
        label: '所属区域',
        children: (
          <span>{data?.data?.data?.records?.[0]?.list?.[0]?.gridName}</span>
        ),
      },
      {
        key: '2',
        label: '所属部门',
        children: (
          <span>{data?.data?.data?.records?.[0]?.list?.[0]?.ssbm}</span>
        ),
      },
      {
        key: '3',
        label: '上报人',
        children: (
          <span>{data?.data?.data?.records?.[0]?.list?.[0]?.sbr}</span>
        ),
      },
      {
        key: '4',
        label: '案件编号',
        children: (
          <span>{data?.data?.data?.records?.[0]?.list?.[0]?.ajbh}</span>
        ),
      },
      {
        key: '5',
        label: '程序类别',
        children: (
          <span>{data?.data?.data?.records?.[0]?.list?.[0]?.cxlb}</span>
        ),
      },
      // {
      //   key: '52',
      //   label: '专项行动',
      //   children:   <span>{data?.data?.data?.records?.[0]?.list?.[0]?.zjlx}</span>
      // },
      {
        key: '6',
        label: '案件类型',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.ajlx}</span>
      },
      {
        key: '7',
        label: '当事人类型',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.dsrlx}</span>
      },
      {
        key: '8',
        label: '违法事由',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.wfsy}</span>
      },
      {
        key: '9',
        label: '违法地点',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.wfdd}</span>,
      },
      {
        key: '10',
        label: '案件上报时间',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.ajsbsj}</span>,
      },
      {
        key: '11',
        label: '案发时间',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.afsj}</span>,
      },
      {
        key: '12',
        label: '案件来源',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.sjly}</span>,
      },
      {
        key: '13',
        label: '违则',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.wz}</span>,
      },
      {
        key: '14',
        label: '罚则',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.fz}</span>,
      },
      {
        key: '15',
        label: '罚款金额',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.fkje}</span>,
      },
      {
        key: '16',
        label: '处罚内容',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.cfnr}</span>,
      },
      {
        key: '17',
        label: '处罚（不予处罚）时间',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.cfsj}</span>,
      },
      {
        key: '18',
        label: '案件完结时间',
        children:  <span>{data?.data?.data?.records?.[0]?.list?.[0]?.ajwjsj}</span>,
      },
    ];
  }, [data]);

  return (
    <div className={styles.container}>
      <Descriptions
        items={items}
        column={1}
        labelStyle={{
          fontSize: 18,
          color: 'rgb(188, 206, 233)',
          display: 'flex',
          justifyContent: 'flex-end',
          width: 260,
        }}
        contentStyle={{
          color: '#fff',
          fontSize: 18,
        }}
      />
    </div>
  );
};
export default AdministPunishList;
