Commit dd308c73b1aca3a296a8783ece80d77faf72acb4
1 parent
a6607384
fix: 修改课题组列表选择器bug
Showing
1 changed file
with
29 additions
and
6 deletions
src/pages/ResearchGroup/ResearchGroup/index.tsx
... | ... | @@ -531,17 +531,29 @@ const ResearchGroupListPage = () => { |
531 | 531 | columns={researchGroupColumnsInit()} |
532 | 532 | actionRef={researchGroupActionRef} |
533 | 533 | cardBordered |
534 | + manualRequest={false} | |
535 | + dataSource={undefined} // Use undefined to force server fetch | |
534 | 536 | pagination={{ |
535 | - pageSize: 10, | |
537 | + showSizeChanger: true, | |
538 | + pageSizeOptions: ['10', '20', '50', '100'], | |
539 | + defaultCurrent: 1, | |
540 | + defaultPageSize: 10, | |
536 | 541 | }} |
542 | + scroll={{ x: 1400 }} | |
537 | 543 | request={async (params) => { |
544 | + const { current, pageSize, ...rest } = params; | |
538 | 545 | const res = await postResearchGroupsList({ |
539 | - data: { ...params }, | |
546 | + data: { | |
547 | + current: current, | |
548 | + pageSize: pageSize, | |
549 | + ...rest, | |
550 | + }, | |
540 | 551 | }); |
541 | 552 | setPerms(res.data.specialPath); |
542 | 553 | return { |
543 | 554 | data: res?.data?.data || [], |
544 | 555 | total: res?.data?.total || 0, |
556 | + success: res && res.result === RESPONSE_CODE.SUCCESS, | |
545 | 557 | }; |
546 | 558 | }} |
547 | 559 | columnsState={{ |
... | ... | @@ -566,7 +578,6 @@ const ResearchGroupListPage = () => { |
566 | 578 | form={{}} |
567 | 579 | dateFormatter="string" |
568 | 580 | headerTitle="课题组列表" |
569 | - scroll={{ x: 1400 }} | |
570 | 581 | toolBarRender={() => { |
571 | 582 | let btns = []; |
572 | 583 | if (perms?.includes('add')) { |
... | ... | @@ -640,17 +651,29 @@ const ResearchGroupListPage = () => { |
640 | 651 | columns={memberApplyColumnsInit()} |
641 | 652 | actionRef={memberApplyActionRef} |
642 | 653 | cardBordered |
654 | + manualRequest={false} | |
655 | + dataSource={undefined} // Use undefined to force server fetch | |
643 | 656 | pagination={{ |
644 | - pageSize: 10, | |
657 | + showSizeChanger: true, | |
658 | + pageSizeOptions: ['10', '20', '50', '100'], | |
659 | + defaultCurrent: 1, | |
660 | + defaultPageSize: 10, | |
645 | 661 | }} |
662 | + scroll={{ x: 1400 }} | |
646 | 663 | request={async (params) => { |
664 | + const { current, pageSize, ...rest } = params; | |
647 | 665 | const res = await postResearchGroupMemberRequestsList({ |
648 | - data: { ...params }, | |
666 | + data: { | |
667 | + current: current, | |
668 | + pageSize: pageSize, | |
669 | + ...rest, | |
670 | + }, | |
649 | 671 | }); |
650 | 672 | setPerms(res.data.specialPath); |
651 | 673 | return { |
652 | 674 | data: res?.data?.data || [], |
653 | 675 | total: res?.data?.total || 0, |
676 | + success: res && res.result === RESPONSE_CODE.SUCCESS, | |
654 | 677 | }; |
655 | 678 | }} |
656 | 679 | columnsState={{ |
... | ... | @@ -666,6 +689,7 @@ const ResearchGroupListPage = () => { |
666 | 689 | rowKey="id" |
667 | 690 | search={{ |
668 | 691 | labelWidth: 'auto', |
692 | + defaultCollapsed: false, | |
669 | 693 | }} |
670 | 694 | options={{ |
671 | 695 | setting: { |
... | ... | @@ -675,7 +699,6 @@ const ResearchGroupListPage = () => { |
675 | 699 | form={{}} |
676 | 700 | dateFormatter="string" |
677 | 701 | headerTitle="申请列表" |
678 | - scroll={{ x: 1400 }} | |
679 | 702 | toolBarRender={() => { |
680 | 703 | let btns = []; |
681 | 704 | btns.push( | ... | ... |