Commit 02db7815 authored by 左玲玲's avatar 左玲玲 😬

1010

parent 79d6f580
...@@ -67,7 +67,7 @@ export default (props) => { ...@@ -67,7 +67,7 @@ export default (props) => {
}; };
}); });
} }
}, [props.tabList]); }, [props.tabList, props.extraparams]);
return ( return (
<div className="diycard"> <div className="diycard">
{props.withCard === false ? ( {props.withCard === false ? (
......
...@@ -162,10 +162,28 @@ const TagView = ({ children, home }) => { ...@@ -162,10 +162,28 @@ const TagView = ({ children, home }) => {
/> />
</div> </div>
</div> </div>
<div className={styles.child}> {/* <div className={styles.child}>
<div className={styles.contianbox}> <div className={styles.contianbox}>
<div style={{ width: '100%', height: '100%' }}> {refresh && children}</div> <div style={{ width: '100%', height: '100%' }}> {refresh && children}</div>
</div> </div>
</div> */}
<div className={styles.child}>
<div className={`${styles.contianbox} boxcontianbox`}>
{tagList.map((item) => {
return (
<div
key={item.path}
style={{
display: item.active ? 'block' : 'none',
width: '100%',
height: '100%',
}}
>
{item.children}
</div>
);
})}
</div>
</div> </div>
</> </>
); );
......
...@@ -424,7 +424,8 @@ ol { ...@@ -424,7 +424,8 @@ ol {
.runtime-keep-alive-layout, .runtime-keep-alive-layout,
.ant-table-content, .ant-table-content,
.ant-drawer-body { .ant-drawer-body,
.boxcontianbox {
&::-webkit-scrollbar { &::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
...@@ -585,7 +586,7 @@ ol { ...@@ -585,7 +586,7 @@ ol {
} }
} }
.contianbox___W4bW5 { .boxcontianbox {
.ant-descriptions { .ant-descriptions {
margin-bottom: 24px; margin-bottom: 24px;
} }
......
...@@ -506,6 +506,10 @@ function Contract(props) { ...@@ -506,6 +506,10 @@ function Contract(props) {
} }
useEffect(() => { useEffect(() => {
if (state) { if (state) {
setdrawer((s) => ({
...s,
open: false,
}));
if (state.isFinish == 1) { if (state.isFinish == 1) {
setactiveTabKey('1') setactiveTabKey('1')
} else { } else {
...@@ -532,7 +536,7 @@ function Contract(props) { ...@@ -532,7 +536,7 @@ function Contract(props) {
const tabList = useMemo(() => { const tabList = useMemo(() => {
return getcolumns(); return getcolumns();
}, [activeTabKey, extraparams]); }, [activeTabKey]);
const pathconfig = useMemo(() => { const pathconfig = useMemo(() => {
let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {}; let defpath = getcolumns(setdrawer).filter((it) => it.key == activeTabKey)[0]?.pathconfig ?? {};
return defpath; return defpath;
......
...@@ -15,8 +15,8 @@ const Costanalysis = () => { ...@@ -15,8 +15,8 @@ const Costanalysis = () => {
formRef = useRef(), formRef = useRef(),
boxRef = useRef(); boxRef = useRef();
const [drawer, setdrawer] = useState({ const [drawer, setdrawer] = useState({
open: false, open: false,
}), }),
[extraparams, setextraparams] = useState({}), [extraparams, setextraparams] = useState({}),
[activeKey, catk] = useState(''), [activeKey, catk] = useState(''),
[searchParams, csearch] = useState({}); [searchParams, csearch] = useState({});
...@@ -208,17 +208,16 @@ const Costanalysis = () => { ...@@ -208,17 +208,16 @@ const Costanalysis = () => {
}; };
useEffect(() => { useEffect(() => {
if (state) { if (state) {
setdrawer((s) => ({
...s,
open: false,
}));
catk(state.pageStatus == 1 ? 'item-1' : 'item-2'); catk(state.pageStatus == 1 ? 'item-1' : 'item-2');
setextraparams(state.extraparams); setextraparams(state.extraparams);
} else { } else {
catk('item-1'); catk('item-1');
} }
}, [state]); }, [state]);
console.log('====================================');
console.log(extraparams);
console.log('====================================');
return ( return (
<div ref={boxRef}> <div ref={boxRef}>
<AutoTable <AutoTable
...@@ -260,6 +259,11 @@ const Costanalysis = () => { ...@@ -260,6 +259,11 @@ const Costanalysis = () => {
}, },
}, },
}} }}
options={{
reload: () => {
setextraparams({});
}
}}
/> />
<DrawerPro <DrawerPro
...@@ -274,7 +278,7 @@ const Costanalysis = () => { ...@@ -274,7 +278,7 @@ const Costanalysis = () => {
open: false, open: false,
})); }));
}} }}
onValuesChange={(changedValues, allValues) => {}} onValuesChange={(changedValues, allValues) => { }}
onFinish={async (vals) => { onFinish={async (vals) => {
let newVals = JSON.parse(JSON.stringify(vals)); let newVals = JSON.parse(JSON.stringify(vals));
if (drawer?.val == 'confirm') { if (drawer?.val == 'confirm') {
......
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