|
|
|
@ -2,16 +2,30 @@
|
|
|
|
|
* @Author: donghao donghao@supervision.ltd
|
|
|
|
|
* @Date: 2024-04-08 16:57:30
|
|
|
|
|
* @LastEditors: donghao donghao@supervision.ltd
|
|
|
|
|
* @LastEditTime: 2024-05-09 09:54:36
|
|
|
|
|
* @LastEditTime: 2024-07-18 15:15:26
|
|
|
|
|
* @FilePath: \general-ai-manage\src\pages\Project\BusinessProject\components\businessCard.tsx
|
|
|
|
|
* @Description: 企业项目卡片
|
|
|
|
|
*/
|
|
|
|
|
import { ProCard } from '@ant-design/pro-components';
|
|
|
|
|
import { Image, theme } from 'antd';
|
|
|
|
|
import icon1 from '/public/images/bussnessInfo/icon1.png';
|
|
|
|
|
import svg1 from '/public/images/bussnessInfo/model_1.png';
|
|
|
|
|
|
|
|
|
|
import icon2 from '/public/images/bussnessInfo/icon2.png';
|
|
|
|
|
import industryClassification0 from '/public/images/industryClassification/0.png';
|
|
|
|
|
import industryClassification1 from '/public/images/industryClassification/1.png';
|
|
|
|
|
import industryClassification10 from '/public/images/industryClassification/10.png';
|
|
|
|
|
import industryClassification11 from '/public/images/industryClassification/11.png';
|
|
|
|
|
import industryClassification12 from '/public/images/industryClassification/12.png';
|
|
|
|
|
import industryClassification13 from '/public/images/industryClassification/13.png';
|
|
|
|
|
import industryClassification14 from '/public/images/industryClassification/14.png';
|
|
|
|
|
import industryClassification15 from '/public/images/industryClassification/15.png';
|
|
|
|
|
import industryClassification2 from '/public/images/industryClassification/2.png';
|
|
|
|
|
import industryClassification3 from '/public/images/industryClassification/3.png';
|
|
|
|
|
import industryClassification4 from '/public/images/industryClassification/4.png';
|
|
|
|
|
import industryClassification5 from '/public/images/industryClassification/5.png';
|
|
|
|
|
import industryClassification6 from '/public/images/industryClassification/6.png';
|
|
|
|
|
import industryClassification7 from '/public/images/industryClassification/7.png';
|
|
|
|
|
import industryClassification8 from '/public/images/industryClassification/8.png';
|
|
|
|
|
import industryClassification9 from '/public/images/industryClassification/9.png';
|
|
|
|
|
|
|
|
|
|
type AlgorithmCardProps = {
|
|
|
|
|
info: Record<string, any>;
|
|
|
|
@ -20,6 +34,64 @@ type AlgorithmCardProps = {
|
|
|
|
|
const AlgorithmCard: React.FC<AlgorithmCardProps> = ({ info }) => {
|
|
|
|
|
const { token } = theme.useToken();
|
|
|
|
|
console.log(theme, 'AlgorithmCard_token', theme.useToken());
|
|
|
|
|
function renderIcon() {
|
|
|
|
|
let currUrl = industryClassification0;
|
|
|
|
|
|
|
|
|
|
switch (info?.classification_name) {
|
|
|
|
|
case 'IT服务':
|
|
|
|
|
currUrl = industryClassification1;
|
|
|
|
|
break;
|
|
|
|
|
case '管材':
|
|
|
|
|
currUrl = industryClassification2;
|
|
|
|
|
break;
|
|
|
|
|
case '建筑房地产':
|
|
|
|
|
currUrl = industryClassification3;
|
|
|
|
|
break;
|
|
|
|
|
case '教育':
|
|
|
|
|
currUrl = industryClassification4;
|
|
|
|
|
break;
|
|
|
|
|
case '金融行业':
|
|
|
|
|
currUrl = industryClassification5;
|
|
|
|
|
break;
|
|
|
|
|
case '零售':
|
|
|
|
|
currUrl = industryClassification6;
|
|
|
|
|
break;
|
|
|
|
|
case '能源矿采':
|
|
|
|
|
currUrl = industryClassification7;
|
|
|
|
|
break;
|
|
|
|
|
case '农林牧渔':
|
|
|
|
|
currUrl = industryClassification8;
|
|
|
|
|
break;
|
|
|
|
|
case '生活服务':
|
|
|
|
|
currUrl = industryClassification9;
|
|
|
|
|
break;
|
|
|
|
|
case '手机电子行业':
|
|
|
|
|
currUrl = industryClassification10;
|
|
|
|
|
break;
|
|
|
|
|
case '文化娱乐':
|
|
|
|
|
currUrl = industryClassification11;
|
|
|
|
|
break;
|
|
|
|
|
case '医疗':
|
|
|
|
|
currUrl = industryClassification12;
|
|
|
|
|
break;
|
|
|
|
|
case '运输物流':
|
|
|
|
|
currUrl = industryClassification13;
|
|
|
|
|
break;
|
|
|
|
|
case '政府':
|
|
|
|
|
currUrl = industryClassification14;
|
|
|
|
|
break;
|
|
|
|
|
case '制造业':
|
|
|
|
|
currUrl = industryClassification15;
|
|
|
|
|
break;
|
|
|
|
|
case '其他行业':
|
|
|
|
|
default:
|
|
|
|
|
currUrl = industryClassification0;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return <Image width={64} preview={false} src={currUrl} />;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<ProCard
|
|
|
|
|
className="algorithmCard_box"
|
|
|
|
@ -48,28 +120,28 @@ const AlgorithmCard: React.FC<AlgorithmCardProps> = ({ info }) => {
|
|
|
|
|
className="tag_type"
|
|
|
|
|
style={{
|
|
|
|
|
background:
|
|
|
|
|
info.typeName === '机器学习'
|
|
|
|
|
info.model_type === '机器学习'
|
|
|
|
|
? 'linear-gradient( 180deg, #FFB21A 0%, #FF9B3E 100%)'
|
|
|
|
|
: 'linear-gradient(180deg, #21c7ff 0%, #428cff 100%)',
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
{info.typeName}
|
|
|
|
|
{info.model_type}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<ul className="p1">
|
|
|
|
|
<li className="flex items-center mb-[8px]">
|
|
|
|
|
<Image width={16} className="flex items-center" preview={false} src={icon1} />
|
|
|
|
|
<span className="pl-[8px]"> 版本:</span>
|
|
|
|
|
<span className="text_color_1">{info.version}</span>
|
|
|
|
|
<span className="text_color_1">{info.default_version}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li className="flex items-center">
|
|
|
|
|
<Image width={16} className="flex items-center" preview={false} src={icon2} />
|
|
|
|
|
<span className="pl-[8px]"> 适用行业:</span>
|
|
|
|
|
<span className="text_color_1">{info.industryName}</span>
|
|
|
|
|
<span className="text_color_1">{info.classification_name}</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<Image width={64} preview={false} src={svg1} />
|
|
|
|
|
{renderIcon()}
|
|
|
|
|
</div>
|
|
|
|
|
</ProCard>
|
|
|
|
|
);
|
|
|
|
|