fix(bug)
This commit is contained in:
parent
0c63810c25
commit
54989c2d2f
|
@ -57,19 +57,24 @@ const LayOut = (props: Store) => {
|
||||||
const [stateOpenKeys, setStateOpenKeys] = useState(['2', '23']);
|
const [stateOpenKeys, setStateOpenKeys] = useState(['2', '23']);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
usrStore.getMenu().then((res) => {
|
usrStore.getMenu().then((res) => {
|
||||||
const men: any = [...res];
|
const men: any = [];
|
||||||
men.forEach(element => {
|
res.forEach(ele => {
|
||||||
element.label = element.name;
|
items.forEach((v: any) => {
|
||||||
element.key = element.router_path;
|
if (ele.router_path === v.key) {
|
||||||
if (element.children?.length > 0) {
|
if (ele.children.length > 0) {
|
||||||
element.children?.forEach((i) => {
|
const childs: any = []
|
||||||
i.label = i.name;
|
ele.children.forEach(eles => {
|
||||||
i.key = i.router_path;
|
v.children.forEach(vs => {
|
||||||
})
|
if (eles.router_path === vs.key) {
|
||||||
}
|
childs.push(vs)
|
||||||
if (element.children?.length === 0) {
|
}
|
||||||
element.children = null
|
});
|
||||||
}
|
});
|
||||||
|
v.children = childs
|
||||||
|
}
|
||||||
|
men.push(v)
|
||||||
|
}
|
||||||
|
})
|
||||||
});
|
});
|
||||||
setMenus(men)
|
setMenus(men)
|
||||||
})
|
})
|
||||||
|
|
|
@ -23,9 +23,7 @@ const Source = (props: Store) => {
|
||||||
const [coloums, setColumns] = useState<any>([]);
|
const [coloums, setColumns] = useState<any>([]);
|
||||||
const [content, setContent] = useState([]);
|
const [content, setContent] = useState([]);
|
||||||
const [selectKey, setSelectKey] = useState<Array<string>>([
|
const [selectKey, setSelectKey] = useState<Array<string>>([
|
||||||
"01JM4XMY2N9KN23XSZJSQQM3HY",
|
"01JXVJXFDM39TN9FYCM33TQ0X0", "01JXVJXFDM39TN9FYCM3A0NFVP", "01JXVJXFDM39TN9FYCM4QK3RK5", "01JXVJXFDM39TN9FYCM8J27EYY", "01JXVJXFDM39TN9FYCMAHHNPQ7"
|
||||||
"01JM4XMY2N9KN23XSZJSWQHHKA",
|
|
||||||
|
|
||||||
]);
|
]);
|
||||||
const [page, setPage] = useState<number>(1);
|
const [page, setPage] = useState<number>(1);
|
||||||
const [editingKey, setEditingKey] = useState("");
|
const [editingKey, setEditingKey] = useState("");
|
||||||
|
@ -41,7 +39,7 @@ const Source = (props: Store) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
sourceStore.getHead().then((res) => {
|
sourceStore.getHead().then((res) => {
|
||||||
res.forEach((element) => {
|
res.forEach((element) => {
|
||||||
element.dataIndex = "dbs_" + element.identity.toLowerCase();
|
element.dataIndex = element.identity;
|
||||||
element.title = element.data_name;
|
element.title = element.data_name;
|
||||||
element.label = element.data_name;
|
element.label = element.data_name;
|
||||||
element.value = element.identity;
|
element.value = element.identity;
|
||||||
|
@ -75,7 +73,7 @@ const Source = (props: Store) => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
sourceStore.geContent(list, index, 20).then((res) => {
|
sourceStore.geContent(list, index, 20).then((res) => {
|
||||||
res.forEach((element) => {
|
res.forEach((element) => {
|
||||||
element.key = "dbs_" + element.identity;
|
element.key = element.identity;
|
||||||
});
|
});
|
||||||
setContent(res);
|
setContent(res);
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
@ -88,7 +86,7 @@ const Source = (props: Store) => {
|
||||||
|
|
||||||
const saveClo = () => {
|
const saveClo = () => {
|
||||||
let list: any = [];
|
let list: any = [];
|
||||||
if(rowKeys.length===0) {
|
if (rowKeys.length === 0) {
|
||||||
message.info("请选择需要导出的列");
|
message.info("请选择需要导出的列");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,20 +138,6 @@ const Source = (props: Store) => {
|
||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</Typography.Link>
|
</Typography.Link>
|
||||||
{/* <Popconfirm
|
|
||||||
title="删除确认"
|
|
||||||
description="您是否需要删除该数据?"
|
|
||||||
onConfirm={() => {
|
|
||||||
// deleteCallback(record.identity);
|
|
||||||
}}
|
|
||||||
onCancel={cancel}
|
|
||||||
okText="Yes"
|
|
||||||
cancelText="No"
|
|
||||||
>
|
|
||||||
<Button type="dashed" danger size="small">
|
|
||||||
删除
|
|
||||||
</Button> */}
|
|
||||||
{/* </Popconfirm> */}
|
|
||||||
</Space>
|
</Space>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.6 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
Loading…
Reference in New Issue