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

fix: 台账列表优化

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