From 025c4c6e32a1c06ea604a9f2b67c4b8cbc29ce2c Mon Sep 17 00:00:00 2001
From: 13404089107 <puwei@sinata.cn>
Date: 星期二, 20 五月 2025 21:33:05 +0800
Subject: [PATCH] 新增迭代

---
 management/src/pages/party/manage/index.jsx |  188 ++++++++++++++++++++++++++--------------------
 1 files changed, 106 insertions(+), 82 deletions(-)

diff --git a/management/src/pages/party/manage/index.jsx b/management/src/pages/party/manage/index.jsx
index 7edb3d1..f5a39dd 100644
--- a/management/src/pages/party/manage/index.jsx
+++ b/management/src/pages/party/manage/index.jsx
@@ -66,6 +66,18 @@
       }
     },
     {
+      title: '创建时间',
+      dataIndex: 'createTime',
+      sorter: true,
+      hideInSearch: true,
+    },
+    {
+      title: '更新时间',
+      dataIndex: 'updateTime',
+      sorter: true,
+      hideInSearch: true,
+    },
+    {
       title: '状态',
       dataIndex: 'freezeStatus',
       valueEnum: {
@@ -75,80 +87,84 @@
       }
     },
     {
+      title: '身份证号',
+      dataIndex: 'idNumber',
+    },
+    {
       title: '操作',
       hideInSearch: true,
       render: (text, record) => {
         return (
           <Space>
             <Access accessible={access['/party_member/edit']}>
-            <Button
-              type="link"
-              onClick={() => {
-                history.push(`/party/manage/add?type=edit&id=${record.id}`)
-              }}
-            >
-              编辑
-            </Button>
-            </Access>
-            <Access accessible={access['/party_member/del']}>
-            <Button
-              type="link"
-              onClick={() => {
-                showDelConfirm(async () => {
-                  let status = await sendRequest(deleteBanner, {id:record.id})
-                  if (status) {
-                    actionRef.current.reload();
-                  }
-                }, '确认删除所选信息吗?');
-              }}
-            >
-              删除
-            </Button>
-            </Access>
-            <Access accessible={access['/party_member/detail']}>
-            <Button
-              type="link"
-              onClick={() => {
-                history.push(`/party/manage/add?detail=true&id=${record.id}`)
-              }}
-            >
-              查看详情
-            </Button>
-            </Access>
-            <Access accessible={access['/party_member/freeze']}>
-            {record.freezeStatus == 0 && (
               <Button
                 type="link"
                 onClick={() => {
-                  showDelConfirm1(async () => {
-                    let status = await sendRequest(freeze, { id: record.id })
+                  history.push(`/party/manage/add?type=edit&id=${record.id}`)
+                }}
+              >
+                编辑
+              </Button>
+            </Access>
+            <Access accessible={access['/party_member/del']}>
+              <Button
+                type="link"
+                onClick={() => {
+                  showDelConfirm(async () => {
+                    let status = await sendRequest(deleteBanner, { id: record.id })
                     if (status) {
                       actionRef.current.reload();
                     }
-                  }, '确认冻结该党员信息吗?', '冻结', '', '确认冻结该党员信息吗?');
+                  }, '确认删除所选信息吗?');
                 }}
               >
-                冻结
+                删除
               </Button>
-            )}
+            </Access>
+            <Access accessible={access['/party_member/detail']}>
+              <Button
+                type="link"
+                onClick={() => {
+                  history.push(`/party/manage/add?detail=true&id=${record.id}`)
+                }}
+              >
+                查看详情
+              </Button>
+            </Access>
+            <Access accessible={access['/party_member/freeze']}>
+              {record.freezeStatus == 0 && (
+                <Button
+                  type="link"
+                  onClick={() => {
+                    showDelConfirm1(async () => {
+                      let status = await sendRequest(freeze, { id: record.id })
+                      if (status) {
+                        actionRef.current.reload();
+                      }
+                    }, '确认冻结该党员信息吗?', '冻结', '', '确认冻结该党员信息吗?');
+                  }}
+                >
+                  冻结
+                </Button>
+              )}
 
             </Access>
             <Access accessible={access['/party_member/freeze']}>
-            {record.freezeStatus == 1 && (
-              <Button
-                type="link"
-                onClick={() => {
-                  showDelConfirm1(async () => {
-                    let status = await sendRequest(freeze, { id: record.id })
-                    if (status) {
-                      actionRef.current.reload();
-                    }
-                  }, '确认解冻该党员信息吗?', '解冻', '', '确认解冻该党员信息吗?');
-                }}
-              >
-                解冻
-              </Button>
-            )}
+              {record.freezeStatus == 1 && (
+                <Button
+                  type="link"
+                  onClick={() => {
+                    showDelConfirm1(async () => {
+                      let status = await sendRequest(freeze, { id: record.id })
+                      if (status) {
+                        actionRef.current.reload();
+                      }
+                    }, '确认解冻该党员信息吗?', '解冻', '', '确认解冻该党员信息吗?');
+                  }}
+                >
+                  解冻
+                </Button>
+              )}
 
             </Access>
           </Space >
@@ -175,7 +191,15 @@
           showQuickJumper: true,
           defaultPageSize: 10,
         }}
-        request={(params) => {
+        request={(params, sorter) => {
+          console.log('weqweqeqwe', sorter);
+          if (sorter.createTime) {
+            params.createTimeSort = sorter.createTime === 'ascend' ? 2 : 1;
+          }
+          if (sorter.updateTime) {
+            params.updateTimeSort = sorter.updateTime === 'ascend' ? 2 : 1;
+          }
+          
           params.communityId = params.community ? params.community[params.community.length - 1] : ''
           params.auditStatus = 1
           setExcelParams(() => params)
@@ -184,35 +208,35 @@
         toolBarRender={(action, selectRows) => [
           <Space>
             <Access accessible={access['/party_member/add']}>
-            <Button
-              type="primary"
-              onClick={() => {
-                history.push('/party/manage/add?type=add')
-              }}
-            >
-              添加
-            </Button>
+              <Button
+                type="primary"
+                onClick={() => {
+                  history.push('/party/manage/add?type=add')
+                }}
+              >
+                添加
+              </Button>
             </Access>
             <Access accessible={access['/party_member/export']}>
-            <Button
-              type="primary"
-              onClick={() => {
-                exportExcell('党员列表', excelParams, '/api/huacheng-sangeshenbian/party-member/export')
-              }}
-            >
-              导出
-            </Button>
+              <Button
+                type="primary"
+                onClick={() => {
+                  exportExcell('党员列表', excelParams, '/api/huacheng-sangeshenbian/party-member/export')
+                }}
+              >
+                导出
+              </Button>
             </Access>
             <Access accessible={access['/party_member/import']}>
-            <Button
-              type="primary"
-              onClick={() => {
-                handleModalExport(true)
-                modalExportRef.current.clean()
-              }}
-            >
-              导入
-            </Button>
+              <Button
+                type="primary"
+                onClick={() => {
+                  handleModalExport(true)
+                  modalExportRef.current.clean()
+                }}
+              >
+                导入
+              </Button>
             </Access>
           </Space>
         ]}

--
Gitblit v1.7.1