Commit 1c3fa31e authored by 田翔's avatar 田翔

fix: 台账列表优化

parent 622751c6
{
"name": "panda-xform",
"version": "4.7.4",
"description": "4.7.4 图片预览问题",
"version": "4.7.5",
"description": "4.7.5 台账列表优化",
"keywords": [
"panda-xform"
],
......
......@@ -56,6 +56,7 @@ const Account = (props, ref) => {
const [loading, setLoading] = useState(false)
const [dataSource, setDataSource] = useState([])
const [config, setConfig] = useState(initConfig)
const [configLoading, setConfigLoading] = useState(true)
const [schemaValues, setSchemaValues] = useState({ formJson: {}, values: [] })
const [submitLoading, setSubmitLoading] = useState(false)
const [operation, setOperation] = useState({ id: null, state: '添加' })
......@@ -253,6 +254,7 @@ const Account = (props, ref) => {
}
const getConfig = async () => {
setConfigLoading(true)
const { code, data, msg } = await GetAccountConfigInfo(accountName)
if (code === 0) {
setConfig({ ...data, formJson: isJson(data.formJson) ? JSON.parse(data.formJson) : {} })
......@@ -260,6 +262,7 @@ const Account = (props, ref) => {
} else {
message.error(msg)
}
setConfigLoading(false)
}
const getDataSource = async (param = {}) => {
......@@ -323,21 +326,25 @@ const Account = (props, ref) => {
/>
</div>
<div className={styles.bottom}>
<TablePack
loading={loading}
notUse={notUse}
config={config}
dataSource={dataSource}
rowSelection={{
type: 'checkbox',
selectedRowKeys: keys,
fixed: 'left',
onChange: (keys) => setKeys(keys)
}}
btnsClick={btnsClick}
tableChange={tableChange}
ref={tablePackRef}
/>
{
!configLoading ? (
<TablePack
loading={loading}
notUse={notUse}
config={config}
dataSource={dataSource}
rowSelection={{
type: 'checkbox',
selectedRowKeys: keys,
fixed: 'left',
onChange: (keys) => setKeys(keys)
}}
btnsClick={btnsClick}
tableChange={tableChange}
ref={tablePackRef}
/>
) : null
}
</div>
</div>
<div className={styles.footer}>
......
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