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

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

parent 952a0615
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "5.9.6", "version": "5.9.7",
"description": "5.9.6 防止接口被框架合并参数加时间戳", "description": "5.9.7 修改快捷搜索逻辑判断,增加分页参数读取",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
...@@ -18,12 +18,16 @@ const SearchGroup = forwardRef((props, ref) => { ...@@ -18,12 +18,16 @@ const SearchGroup = forwardRef((props, ref) => {
})) }))
const { accountName, config, notUse, checkName, btnsClick, keys } = props 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 [form] = Form.useForm()
const [dateArray, setDateArray] = useState([]) const [dateArray, setDateArray] = useState([])
const [formatterStr, setFormatterStr] = useState('YYYY-MM-DD HH:mm:ss') const [formatterStr, setFormatterStr] = useState('YYYY-MM-DD HH:mm:ss')
const [queryInfo, setQueryInfo] = useState({ info: '', timeFrom: '', timeTo: '' }) const [queryInfo, setQueryInfo] = useState({ info: '', timeFrom: '', timeTo: '' })
const searchShow = useMemo(() => {
return accountFieids.some(v => v.likeSearch)
}, [accountFieids])
const rangerOptions = useMemo(() => { const rangerOptions = useMemo(() => {
const todayRanger = [ const todayRanger = [
moment(moment().format(`${dateFormat} 00:00:00`)), moment(moment().format(`${dateFormat} 00:00:00`)),
...@@ -308,7 +312,7 @@ const SearchGroup = forwardRef((props, ref) => { ...@@ -308,7 +312,7 @@ const SearchGroup = forwardRef((props, ref) => {
) : null ) : null
} }
{ {
enableQuickSearch ? ( searchShow ? (
<Form.Item label={'快捷搜索'} name="info" style={{ marginBottom: 0 }}> <Form.Item label={'快捷搜索'} name="info" style={{ marginBottom: 0 }}>
<Search <Search
size="middle" size="middle"
...@@ -324,7 +328,7 @@ const SearchGroup = forwardRef((props, ref) => { ...@@ -324,7 +328,7 @@ const SearchGroup = forwardRef((props, ref) => {
) : null ) : null
} }
{ {
(enableTimeFilter || enableQuickSearch) ? ( (enableTimeFilter || searchShow) ? (
<Form.Item style={{ marginBottom: 0 }}> <Form.Item style={{ marginBottom: 0 }}>
<Button type="primary" onClick={() => reset()}> <Button type="primary" onClick={() => reset()}>
重置 重置
......
...@@ -273,7 +273,8 @@ const Account = (props, ref) => { ...@@ -273,7 +273,8 @@ const Account = (props, ref) => {
const { code, data, msg } = await GetAccountConfigInfo(accountName) const { code, data, msg } = await GetAccountConfigInfo(accountName)
if (code === 0) { if (code === 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} }) 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 { } else {
message.error(msg) 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