Files
fe_supplier_frontend/src/pages/supplierEvaluateManage/supplierTaskManage/components/Detail/WeightInfo.tsx

49 lines
1.1 KiB
TypeScript

import React from 'react';
import { Card, Table } from 'antd';
import styles from '../../supplierTaskManageDetail.less';
interface WeightInfoProps {
taskData: SupplierEvaluate.TaskDetailData;
}
const WeightInfo: React.FC<WeightInfoProps> = ({ taskData }) => {
const columns = [
{
title: '序号',
dataIndex: 'index',
key: 'index',
render: (_: any, __: any, index: number) => index + 1,
width: 80,
},
{
title: '部门名称',
dataIndex: 'weightDept',
key: 'weightDept',
},
{
title: '权重值',
dataIndex: 'weightValue',
key: 'weightValue',
render: (value: number) => `${value}%`,
},
];
if (!taskData || !taskData.taskDeptWeightList || taskData.taskDeptWeightList.length === 0) {
return <div className={styles.emptyData}></div>;
}
return (
<Card className={styles.detailCard}>
<Table
columns={columns}
dataSource={taskData.taskDeptWeightList}
rowKey="id"
pagination={false}
className={styles.tableContainer}
/>
</Card>
);
};
export default WeightInfo;