Commit bd618560 authored by 田翔's avatar 田翔

fix: BUG修复

parent 65442b32
{ {
"name": "panda-xform", "name": "panda-xform",
"version": "6.0.2", "version": "6.0.3",
"description": "6.0.2 台账控件优化", "description": "6.0.3 BUG修复",
"keywords": [ "keywords": [
"panda-xform" "panda-xform"
], ],
......
import React, { useMemo } from 'react' import React, { useMemo } from 'react'
import moment from 'moment' import moment from 'moment'
const dateType = ['date', 'dateTime', 'year', 'month', 'week', 'quarter', 'datePeriod'] const dateType = ['date', 'dateTime', 'month', 'year', 'week', 'quarter', 'datePeriod']
const DateView = (props) => { const DateView = (props) => {
......
...@@ -42,6 +42,11 @@ const initConfig = { ...@@ -42,6 +42,11 @@ const initConfig = {
enableTimeFilter: 0, //时间筛选 enableTimeFilter: 0, //时间筛选
}; };
let defaultParams = {
sortFields: '录入时间',
direction: 'desc',
}
const Account = (props, ref) => { const Account = (props, ref) => {
useImperativeHandle(ref, () => ({ useImperativeHandle(ref, () => ({
getTableColumns, getTableColumns,
...@@ -49,12 +54,10 @@ const Account = (props, ref) => { ...@@ -49,12 +54,10 @@ const Account = (props, ref) => {
const { accountName, parentConfig, notUse, superAccount, siteLevel, fieldSearch } = props; const { accountName, parentConfig, notUse, superAccount, siteLevel, fieldSearch } = props;
const userID = window?.globalConfig?.userInfo?.OID || 1; const userID = window?.globalConfig?.userInfo?.OID || 1;
const initParams = { let initParams = {
user: userID, user: userID,
accountName, accountName,
siteLevel: !Boolean(siteLevel === 'false'), siteLevel: !Boolean(siteLevel === 'false'),
sortFields: '录入时间',
direction: 'desc',
total: 0, total: 0,
pageIndex: 1, pageIndex: 1,
pageSize: 100, pageSize: 100,
...@@ -64,6 +67,7 @@ const Account = (props, ref) => { ...@@ -64,6 +67,7 @@ const Account = (props, ref) => {
queryForm: [], queryForm: [],
queryTable: [], queryTable: [],
queryWheres: [], queryWheres: [],
...defaultParams,
}; };
const [treeShow, setTreeShow] = useState(true); const [treeShow, setTreeShow] = useState(true);
const [treeData, setTreeData] = useState([]); const [treeData, setTreeData] = useState([]);
...@@ -304,11 +308,16 @@ const Account = (props, ref) => { ...@@ -304,11 +308,16 @@ const Account = (props, ref) => {
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) : {} });
setParams({ ...params, pageSize: data.pageSize || 20, accountName }); setParams({ ...params, pageSize: data.pageSize || 20, accountName });
defaultParams = {
sortFields: data?.defaultSortFields || '录入时间',
direction: data?.sortOrder || 'desc',
}
let param = { let param = {
condition: data?.sqlFilter ? window.btoa(encodeURIComponent(data?.sqlFilter)) : '', condition: data?.sqlFilter ? window.btoa(encodeURIComponent(data?.sqlFilter)) : '',
siteFilter: Boolean(data.enableSiteFilter), siteFilter: Boolean(data.enableSiteFilter),
accountName, accountName,
pageSize: data.pageSize || 20 pageSize: data.pageSize || 20,
...defaultParams,
} }
getDataSource(param); getDataSource(param);
} else { } else {
......
...@@ -74,6 +74,7 @@ const Fieldshine = (props) => { ...@@ -74,6 +74,7 @@ const Fieldshine = (props) => {
width='500px' width='500px'
title='字段映射' title='字段映射'
visible={visible} visible={visible}
bodyStyle={{ maxHeight: '470px', overflow: 'auto' }}
onCancel={() => setVisible(false)} onCancel={() => setVisible(false)}
onOk={onOk} onOk={onOk}
> >
......
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