From b8fe12c5ff7dc2ce750af72c78d4043e836ad9ab Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期四, 15 二月 2024 20:54:17 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/components/TableSearch/index.jsx |   50 ++++++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 48 insertions(+), 2 deletions(-)

diff --git a/zy-asrs-flow/src/components/TableSearch/index.jsx b/zy-asrs-flow/src/components/TableSearch/index.jsx
index 2054aeb..3e7fdb5 100644
--- a/zy-asrs-flow/src/components/TableSearch/index.jsx
+++ b/zy-asrs-flow/src/components/TableSearch/index.jsx
@@ -1,5 +1,5 @@
 import React from 'react';
-import { Input, Button, Space } from 'antd';
+import { Input, Button, Space, Select } from 'antd';
 
 const TextFilter = (props) => {
     return (
@@ -39,4 +39,50 @@
     );
 }
 
-export { TextFilter };
\ No newline at end of file
+const SelectFilter = (props) => {
+    return (
+        <div style={{ padding: 8 }}>
+            <Select
+                style={{ width: 188, marginBottom: 8 }}
+                placeholder="閫夋嫨涓�涓�夐」"
+                value={props.selectedKeys[0]}
+                onChange={value => props.setSelectedKeys(value ? [value] : [])}
+            >
+                {props.data.map(item => (
+                    <Select.Option key={item.value} value={item.value}>
+                        {item.label}
+                    </Select.Option>
+                ))}
+            </Select>
+            <Space>
+                <Button
+                    type="primary"
+                    onClick={() => {
+                        props.confirm();
+                        props.setSearchParam(prevState => ({
+                            ...prevState,
+                            [props.name]: props.selectedKeys[0]
+                        }));
+                        props.actionRef.current?.reload();
+                    }}
+                    size="small"
+                    style={{ width: 90 }}
+                >
+                    纭畾
+                </Button>
+                <Button
+                    onClick={() => {
+                        setSelectedKeys([]);
+                        clearFilters();
+                    }}
+                    size="small"
+                    style={{ width: 90 }}
+                >
+                    閲嶇疆
+                </Button>
+            </Space>
+        </div>
+    );
+}
+
+export { TextFilter, SelectFilter };
\ No newline at end of file

--
Gitblit v1.9.1