From 9589e0e1bfd14f2297563fa9a9b3bdcbc7723b74 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期五, 16 二月 2024 21:12:52 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/system/role/index.jsx |   78 ++++++++++++++++++++++++++-------------
 1 files changed, 52 insertions(+), 26 deletions(-)

diff --git a/zy-asrs-flow/src/pages/system/role/index.jsx b/zy-asrs-flow/src/pages/system/role/index.jsx
index d770d00..a34f947 100644
--- a/zy-asrs-flow/src/pages/system/role/index.jsx
+++ b/zy-asrs-flow/src/pages/system/role/index.jsx
@@ -1,17 +1,17 @@
 
 import React, { useState, useRef, useEffect } from 'react';
 import { useIntl, FormattedMessage } from '@umijs/max';
-import { Button, message, Modal, Input, Space } from 'antd';
+import { Button, message, Modal } from 'antd';
 import {
     FooterToolbar,
     PageContainer,
     ProTable,
     LightFilter,
 } from '@ant-design/pro-components';
-import { PlusOutlined, ExportOutlined, SearchOutlined } from '@ant-design/icons';
+import { PlusOutlined, ExportOutlined } from '@ant-design/icons';
 import Http from '@/utils/http';
 import Edit from './components/edit'
-import Filter from '@/components/TableSearch'
+import { TextFilter, SelectFilter, DatetimeRangeFilter, LinkFilter } from '@/components/TableSearch'
 
 const handleSave = async (val) => {
     const hide = message.loading('姝e湪娣诲姞');
@@ -112,12 +112,60 @@
             dataIndex: 'name',
             valueType: 'text',
             copyable: true,
+            filterDropdown: (props) => <TextFilter
+                name='name'
+                {...props}
+                actionRef={actionRef}
+                setSearchParam={setSearchParam}
+            />,
         },
         {
             title: '鏍囪瘑',
             dataIndex: 'code',
             valueType: 'text',
-            filterDropdown: (props) => <Filter {...props} />,
+            filterDropdown: (props) => <TextFilter
+                name='code'
+                {...props}
+                actionRef={actionRef}
+                setSearchParam={setSearchParam}
+            />,
+        },
+        {
+            title: '鏈烘瀯',
+            dataIndex: 'hostId$',
+            valueType: 'text',
+            filterDropdown: (props) => <LinkFilter
+                name='hostId'
+                {...props}
+                actionRef={actionRef}
+                setSearchParam={setSearchParam}
+            />,
+        },
+        {
+            title: '鐘舵��',
+            dataIndex: 'status$',
+            valueType: 'text',
+            filterDropdown: (props) => <SelectFilter
+                name='status'
+                {...props}
+                actionRef={actionRef}
+                setSearchParam={setSearchParam}
+                data={[
+                    { label: '姝e父', value: 1 },
+                    { label: '绂佺敤', value: 0 },
+                ]}
+            />,
+        },
+        {
+            title: '淇敼鏃堕棿',
+            dataIndex: 'updateTime$',
+            valueType: 'text',
+            filterDropdown: (props) => <DatetimeRangeFilter
+                name='updateTime'
+                {...props}
+                actionRef={actionRef}
+                setSearchParam={setSearchParam}
+            />,
         },
         {
             title: '鎿嶄綔',
@@ -211,30 +259,8 @@
                             </Button>,
                         ],
                     }}
-                    // toolBarRender={() => [
-                    //     <Button
-                    //         type="primary"
-                    //         key="save"
-                    //         onClick={async () => {
-                    //             setModalVisible(true)
-                    //         }}
-                    //     >
-                    //         <PlusOutlined />
-                    //         娣诲姞
-                    //     </Button>,
-                    //     <Button
-                    //         key="export"
-                    //         onClick={async () => {
-                    //             handleExport();
-                    //         }}
-                    //     >
-                    //         <ExportOutlined />
-                    //         瀵煎嚭
-                    //     </Button>,
-                    // ]}
                     request={(params, sorter, filter) =>
                         Http.doPostPromise('/api/role/page', { ...params, ...searchParam }, (res) => {
-                            console.log(filter);
                             return {
                                 data: res.data.records,
                                 total: res.data.total,

--
Gitblit v1.9.1