合并代码

This commit is contained in:
孙景学
2025-07-02 16:18:03 +08:00
parent 2b3eb5672d
commit 3ae57eb23b
87 changed files with 3852 additions and 19276 deletions

View File

@ -46,10 +46,11 @@ const CooperateEnterprise: React.FC = () => {
};
// 列表数据
const getList = async (params: { pageNo: number; pageSize: number; parentCode: string; }) => {
const getList = async (params: { pageNo: number; pageSize: number;}) => {
setLoading(true);
try {
const { code, data } = await getPage({...params });
try {
const values = searchForm.getFieldsValue();
const { code, data } = await getPage({...params, ...values });
if (code === 200) {
setData(data.records);
setPagination({ current: params.pageNo, pageSize: params.pageSize, total: data.total });
@ -63,20 +64,18 @@ const CooperateEnterprise: React.FC = () => {
const handleReset = () => {
searchForm.resetFields();
getList({ pageNo: 1, pageSize: pagination.pageSize ?? 10, parentCode: '' });
getList({ pageNo: 1, pageSize: pagination.pageSize ?? 10 });
};
const handleSearch = (values: any) => {
const { parentCode } = values;
const handleSearch = () => {
getList({
pageNo: 1,
pageSize: pagination.pageSize ?? 10,
parentCode: parentCode || ''
});
};
useEffect(() => {
getList({ pageNo: 1, pageSize: 10, parentCode: '' });
getList({ pageNo: 1, pageSize: 10 });
}, []);
const columns: ColumnsType<Data> = [
@ -86,12 +85,13 @@ const CooperateEnterprise: React.FC = () => {
key: 'index',
width: 80,
align: 'center',
render: (_: any, __: any, index: number) => index + 1,
render: (_: any, __: any, idx: number) => (((pagination.current ?? 1) - 1) * (pagination.pageSize ?? 10)) + idx + 1,
},
{
title: '准入工作',
dataIndex: 'accessWorkName',
key: 'accessWorkName',
ellipsis: true,
},
{
title: '发起单位',
@ -117,6 +117,7 @@ const CooperateEnterprise: React.FC = () => {
title: '评审时间',
dataIndex: 'createTime',
key: 'createTime',
ellipsis: true,
},
{
title: '评审状态',
@ -126,7 +127,7 @@ const CooperateEnterprise: React.FC = () => {
},
{
title: '操作',
width: 120,
width: 140,
render: (_: any, record: any) => {
// 已完成 3 、结果汇总中 2 、进行中1 、 未开始0
// 显示评审 按钮
@ -159,8 +160,8 @@ const CooperateEnterprise: React.FC = () => {
onFinish={handleSearch}
style={{ marginBottom: 16 }}
>
<Form.Item name="parentCode" label="准入工作">
<Input placeholder="请输入准入工作" />
<Form.Item name="accessWorkName" label="准入工作">
<Input placeholder="请输入准入工作" allowClear maxLength={50} />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit" icon={<SearchOutlined />}>
@ -178,7 +179,7 @@ const CooperateEnterprise: React.FC = () => {
dataSource={data}
pagination={pagination}
loading={loading}
onChange={(pagination) => getList({ pageNo: pagination.current!, pageSize: pagination.pageSize!, parentCode: '', })}
onChange={(pagination) => getList({ pageNo: pagination.current!, pageSize: pagination.pageSize! })}
/>
{ modalInfo.type && modalInfo.type === 'teamMembers' && (
<ResultModal