This commit is contained in:
wang_yp 2025-06-18 00:45:27 +08:00
parent 0c63810c25
commit 54989c2d2f
7 changed files with 22 additions and 33 deletions

View File

@ -57,19 +57,24 @@ const LayOut = (props: Store) => {
const [stateOpenKeys, setStateOpenKeys] = useState(['2', '23']);
useEffect(() => {
usrStore.getMenu().then((res) => {
const men: any = [...res];
men.forEach(element => {
element.label = element.name;
element.key = element.router_path;
if (element.children?.length > 0) {
element.children?.forEach((i) => {
i.label = i.name;
i.key = i.router_path;
})
}
if (element.children?.length === 0) {
element.children = null
}
const men: any = [];
res.forEach(ele => {
items.forEach((v: any) => {
if (ele.router_path === v.key) {
if (ele.children.length > 0) {
const childs: any = []
ele.children.forEach(eles => {
v.children.forEach(vs => {
if (eles.router_path === vs.key) {
childs.push(vs)
}
});
});
v.children = childs
}
men.push(v)
}
})
});
setMenus(men)
})

View File

@ -23,9 +23,7 @@ const Source = (props: Store) => {
const [coloums, setColumns] = useState<any>([]);
const [content, setContent] = useState([]);
const [selectKey, setSelectKey] = useState<Array<string>>([
"01JM4XMY2N9KN23XSZJSQQM3HY",
"01JM4XMY2N9KN23XSZJSWQHHKA",
"01JXVJXFDM39TN9FYCM33TQ0X0", "01JXVJXFDM39TN9FYCM3A0NFVP", "01JXVJXFDM39TN9FYCM4QK3RK5", "01JXVJXFDM39TN9FYCM8J27EYY", "01JXVJXFDM39TN9FYCMAHHNPQ7"
]);
const [page, setPage] = useState<number>(1);
const [editingKey, setEditingKey] = useState("");
@ -41,7 +39,7 @@ const Source = (props: Store) => {
useEffect(() => {
sourceStore.getHead().then((res) => {
res.forEach((element) => {
element.dataIndex = "dbs_" + element.identity.toLowerCase();
element.dataIndex = element.identity;
element.title = element.data_name;
element.label = element.data_name;
element.value = element.identity;
@ -75,7 +73,7 @@ const Source = (props: Store) => {
setLoading(true);
sourceStore.geContent(list, index, 20).then((res) => {
res.forEach((element) => {
element.key = "dbs_" + element.identity;
element.key = element.identity;
});
setContent(res);
setLoading(false);
@ -88,7 +86,7 @@ const Source = (props: Store) => {
const saveClo = () => {
let list: any = [];
if(rowKeys.length===0) {
if (rowKeys.length === 0) {
message.info("请选择需要导出的列");
return;
}
@ -140,20 +138,6 @@ const Source = (props: Store) => {
>
</Typography.Link>
{/* <Popconfirm
title="删除确认"
description="您是否需要删除该数据?"
onConfirm={() => {
// deleteCallback(record.identity);
}}
onCancel={cancel}
okText="Yes"
cancelText="No"
>
<Button type="dashed" danger size="small">
</Button> */}
{/* </Popconfirm> */}
</Space>
);
},

BIN
src/static/qx.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
src/static/sj.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
src/static/sy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
src/static/xt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

BIN
src/static/yh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB