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

1010

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