Commit 6bf879ab authored by 左玲玲's avatar 左玲玲 😬

1725

parent f32ca732
...@@ -118,7 +118,7 @@ export default (props) => { ...@@ -118,7 +118,7 @@ export default (props) => {
items={items} items={items}
onChange={props.onTabChange} onChange={props.onTabChange}
destroyInactiveTabPane destroyInactiveTabPane
activeTabKey={props.activeTabKey} activeKey={props.activeTabKey}
/> />
</div> </div>
)} )}
......
...@@ -143,7 +143,8 @@ function getcolumns(setdrawer, valtype, itemId) { ...@@ -143,7 +143,8 @@ function getcolumns(setdrawer, valtype, itemId) {
hideInSearch: true, hideInSearch: true,
valueType: 'digit', valueType: 'digit',
hideInTable: true, hideInTable: true,
precision: 0 precision: 0,
min: 1
}, },
{ {
title: '租赁设备', title: '租赁设备',
......
...@@ -16,7 +16,7 @@ const Costanalysis = () => { ...@@ -16,7 +16,7 @@ const Costanalysis = () => {
open: false, open: false,
}), }),
[extraparams, setextraparams] = useState({}), [extraparams, setextraparams] = useState({}),
[activeKey, catk] = useState('item-1'), [activeKey, catk] = useState(''),
[searchParams, csearch] = useState({}); [searchParams, csearch] = useState({});
const { run, loading, runAsync } = useRequest(doFetch, { const { run, loading, runAsync } = useRequest(doFetch, {
manual: true, manual: true,
...@@ -42,7 +42,7 @@ const Costanalysis = () => { ...@@ -42,7 +42,7 @@ const Costanalysis = () => {
}, [activeKey]); }, [activeKey]);
const tabList = useMemo(() => { const tabList = useMemo(() => {
return getcolumns(); return getcolumns();
}, [activeKey, extraparams]); }, [activeKey]);
const rightExtra = (text, row, _, action) => { const rightExtra = (text, row, _, action) => {
return [ return [
activeKey == 'item-1' && <PremButton activeKey == 'item-1' && <PremButton
...@@ -193,12 +193,15 @@ const Costanalysis = () => { ...@@ -193,12 +193,15 @@ const Costanalysis = () => {
if (state) { if (state) {
catk(state.pageStatus == 1 ? 'item-1' : 'item-2'); catk(state.pageStatus == 1 ? 'item-1' : 'item-2');
setextraparams(state.extraparams); setextraparams(state.extraparams);
} else {
catk('item-1');
} }
}, [state]); }, [state]);
return <div ref={boxRef}> return <div ref={boxRef}>
<AutoTable <AutoTable
pagetitle={<h3 className="page-title">费用分析</h3>} pagetitle={<h3 className="page-title">费用分析</h3>}
columns={columns} columns={columns}
extraparams={extraparams}
path={activeKey == 'item-1' ? '/lease/umContractEquipment/queryNoAnalysis' : '/lease/umContractEquipment/queryYesAnalysis'} path={activeKey == 'item-1' ? '/lease/umContractEquipment/queryNoAnalysis' : '/lease/umContractEquipment/queryYesAnalysis'}
actionRef={actionRef} actionRef={actionRef}
resizeable={false} resizeable={false}
...@@ -224,7 +227,6 @@ const Costanalysis = () => { ...@@ -224,7 +227,6 @@ const Costanalysis = () => {
} }
} }
}} }}
extraparams={extraparams}
/> />
......
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