/*
 * @Author: donghao donghao@supervision.ltd
 * @Date: 2024-04-23 17:00:00
 * @LastEditors: donghao donghao@supervision.ltd
 * @LastEditTime: 2024-04-28 09:33:34
 * @FilePath: \general-ai-platform-web\src\pages\Project\BusinessInfo\components\baseInfo.tsx
 * @Description: 基本信息展示
 *
 */

import { ProDescriptions } from '@ant-design/pro-components';
import { FormattedMessage } from '@umijs/max';

type BaseInfoProps = {
  info: Record<string, any>;
};

const BaseInfo: React.FC<BaseInfoProps> = ({ info }) => {
  // 模型基本信息
  const ModelDetailColumns = [
    {
      title: <FormattedMessage id="business.list.table.form.address" defaultMessage="公司地址" />,
      dataIndex: 'address',
      render: (_, record) => {
        return record?.province + record?.city + record.address;
      },
    },
    {
      title: <FormattedMessage id="business.list.table.form.industry" defaultMessage="所属行业" />,
      dataIndex: 'industryName',
    },
    {
      title: <FormattedMessage id="business.list.table.form.contacts" defaultMessage="联系人" />,
      dataIndex: 'contacts',
    },
    {
      title: (
        <FormattedMessage id="business.list.table.form.contactWay" defaultMessage="联系方式" />
      ),
      dataIndex: 'contactWay',
    },
    {
      title: <FormattedMessage id="business.list.table.form.remark" defaultMessage="公司简介" />,
      dataIndex: 'remark',
    },
  ];
  return (
    <div className="= gn_table_descriptions bg_active_1">
      <ProDescriptions column={4} columns={ModelDetailColumns} dataSource={info}></ProDescriptions>
    </div>
  );
};

export default BaseInfo;
