feat: 1:优化token查询页 2:用户管理页面新增修改密码功能 3:调整景区与二维码关系
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
import { QueryFilter } from '@ant-design/pro-components';
|
||||
import { Button } from 'antd';
|
||||
import TenantSelector from '@/components/ui/TenantSelector';
|
||||
import { tenantApi } from '@/services/tenant';
|
||||
|
||||
export interface SearchBarPlusProps {
|
||||
// QueryFilter 透传属性(常用)
|
||||
// QueryFilter 常用属性
|
||||
defaultCollapsed?: boolean;
|
||||
split?: boolean;
|
||||
span?: number | { xs?: number; sm?: number; md?: number; lg?: number; xl?: number; xxl?: number };
|
||||
@@ -14,12 +15,14 @@ export interface SearchBarPlusProps {
|
||||
children?: React.ReactNode;
|
||||
// 是否显示租户筛选(默认显示)
|
||||
showTenant?: boolean;
|
||||
// 租户变化回调:用于触发表格 reload 等
|
||||
// 租户变化回调:用于触发表格 reload
|
||||
onTenantChanged?: (tenantId: string, includeChildren: boolean) => void;
|
||||
// 租户筛选放置位置:start 放在最前,end 放在最后(默认 start)
|
||||
tenantPosition?: 'start' | 'end';
|
||||
// 是否调用后端“切换查询租户”接口(默认不调用,避免跨页面副作用)
|
||||
useSwitchTenant?: boolean;
|
||||
// 是否隐藏重置按钮(默认 false)
|
||||
hideReset?: boolean;
|
||||
}
|
||||
|
||||
const SearchBarPlus: React.FC<SearchBarPlusProps> = ({
|
||||
@@ -33,6 +36,7 @@ const SearchBarPlus: React.FC<SearchBarPlusProps> = ({
|
||||
onTenantChanged,
|
||||
tenantPosition = 'start',
|
||||
useSwitchTenant = false,
|
||||
hideReset = false,
|
||||
}) => {
|
||||
const handleFinish = async (values: Record<string, any>) => {
|
||||
try {
|
||||
@@ -52,6 +56,17 @@ const SearchBarPlus: React.FC<SearchBarPlusProps> = ({
|
||||
span={span as any}
|
||||
form={form}
|
||||
onFinish={handleFinish}
|
||||
submitter={
|
||||
hideReset
|
||||
? {
|
||||
render: (props: any) => [
|
||||
<Button key="submit" type="primary" onClick={() => props?.form?.submit?.()}>
|
||||
查询
|
||||
</Button>,
|
||||
],
|
||||
}
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{showTenant && tenantPosition === 'start' ? <TenantSelector /> : null}
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user