75 lines
2.4 KiB
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* @Author: donghao donghao@supervision.ltd
* @Date: 2024-06-11 13:33:07
* @LastEditors: donghao donghao@supervision.ltd
* @LastEditTime: 2024-06-13 09:51:34
* @FilePath: \general-ai-platform-web\src\pages\Business\BusinessModel\components\detailCard.tsx
* @Description: 业务模型详情
*/
import { isArrayAndNotEmpty } from '@/utils/is';
import { ProCard } from '@ant-design/pro-components';
import { Modal } from 'antd';
import { proFormSmallModelWidth } from '../../../../../config/defaultForm';
type DetailCardProps = {
info: Record<string, any>;
detailModalOpen: boolean;
handleModal: () => void;
};
const DetailCard: React.FC<DetailCardProps> = (props) => {
/**state */
// const intl = useIntl();
return (
<Modal
width={proFormSmallModelWidth}
title={props.info?.name}
open={props.detailModalOpen}
onCancel={props.handleModal}
footer={null}
>
<ProCard className="gn_card_wrap" bodyStyle={{ padding: 0 }}>
<ul className="p1">
<li className="pt-[16px]">
<span className="text2"></span>
<span>{props.info?.name}</span>
</li>
<li className="pt-[16px]">
<span className="text2">: </span>
<span>{props.info?.comment}</span>
</li>
<li className="pt-[16px] flex">
<span className="text2">: </span>
<ul className="flex flex-wrap flex-1">
{isArrayAndNotEmpty(props.info?.basemodel_list) &&
props.info?.basemodel_list.map((item) => {
return (
<li key={item?.id} className="ml-[8px] mb-[8px] active_tag">
{item?.name}
</li>
);
})}
</ul>
</li>
<li className="pt-[8px] flex">
<span className="text2">: </span>
<ul className="flex flex-wrap flex-1">
{isArrayAndNotEmpty(props.info?.link_node_list) &&
props.info?.link_node_list.map((item) => {
return (
<li key={item?.node_id} className="ml-[8px] mb-[8px] active_tag">
{item?.node_name}
</li>
);
})}
</ul>
</li>
</ul>
</ProCard>
</Modal>
);
};
export default DetailCard;