Commit 0a982f46 authored by 田翔's avatar 田翔

fix: 修改快捷搜索逻辑判断,增加分页参数读取

parent 952a0615
{
"name": "panda-xform",
"version": "5.9.6",
"description": "5.9.6 防止接口被框架合并参数加时间戳",
"version": "5.9.7",
"description": "5.9.7 修改快捷搜索逻辑判断,增加分页参数读取",
"keywords": [
"panda-xform"
],
......
......@@ -18,12 +18,16 @@ const SearchGroup = forwardRef((props, ref) => {
}))
const { accountName, config, notUse, checkName, btnsClick, keys } = props
const { enableBatchOperation, enableImportExport, enablePrint, enableQuickSearch, enableTimeFilter, parent } = config
const { enableBatchOperation, enableImportExport, enablePrint, enableQuickSearch, enableTimeFilter, parent, accountFieids } = config
const [form] = Form.useForm()
const [dateArray, setDateArray] = useState([])
const [formatterStr, setFormatterStr] = useState('YYYY-MM-DD HH:mm:ss')
const [queryInfo, setQueryInfo] = useState({ info: '', timeFrom: '', timeTo: '' })
const searchShow = useMemo(() => {
return accountFieids.some(v => v.likeSearch)
}, [accountFieids])
const rangerOptions = useMemo(() => {
const todayRanger = [
moment(moment().format(`${dateFormat} 00:00:00`)),
......@@ -308,7 +312,7 @@ const SearchGroup = forwardRef((props, ref) => {
) : null
}
{
enableQuickSearch ? (
searchShow ? (
<Form.Item label={'快捷搜索'} name="info" style={{ marginBottom: 0 }}>
<Search
size="middle"
......@@ -324,7 +328,7 @@ const SearchGroup = forwardRef((props, ref) => {
) : null
}
{
(enableTimeFilter || enableQuickSearch) ? (
(enableTimeFilter || searchShow) ? (
<Form.Item style={{ marginBottom: 0 }}>
<Button type="primary" onClick={() => reset()}>
重置
......
......@@ -273,7 +273,8 @@ const Account = (props, ref) => {
const { code, data, msg } = await GetAccountConfigInfo(accountName)
if (code === 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} })
getDataSource({ siteFilter: Boolean(data.enableSiteFilter), accountName })
setParams({ ...params, pageSize: data.pageSize || 20 })
getDataSource({ siteFilter: Boolean(data.enableSiteFilter), accountName, pageSize: data.pageSize || 20 })
} else {
message.error(msg)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment