Commit bd618560 authored by 田翔's avatar 田翔

fix: BUG修复

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