忘记密码与部门改为懒加载

This commit is contained in:
孙景学
2025-07-18 13:39:45 +08:00
parent e637f62d86
commit 505562892f
8 changed files with 480 additions and 61 deletions

View File

@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Modal, Button, Descriptions, Tooltip, Table } from 'antd';
import { detail, treeList } from "../services";
import { detail } from "../services";
import type { DataNode } from 'antd/es/tree';
import type { ColumnsType } from 'antd/es/table';
import { useSupplierDetailModal } from '@/components/SupplierDetailModalContext/SupplierDetailModalContext';
@ -50,9 +50,9 @@ const ViewModal: React.FC<{
// 已勾选的供应商 id
// 品类库基本信息
const [categoryInfo, setCategoryInfo] = useState<CategoryInfo>({});
const [treeData, setTreeData] = useState<LockNode[]>([]);
const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
const [autoExpandParent, setAutoExpandParent] = useState(true);
// const [treeData, setTreeData] = useState<LockNode[]>([]);
// const [expandedKeys, setExpandedKeys] = useState<string[]>([]);
// const [autoExpandParent, setAutoExpandParent] = useState(true);
const supplierDetailModal = useSupplierDetailModal();
// 拉取基本信息
@ -61,14 +61,6 @@ const ViewModal: React.FC<{
const res = await detail({ id: storeId });
if (res.code === 200 && res.data) setCategoryInfo(res.data);
// const treeRes = await treeList({ categoryLibraryId: storeId });
// if (treeRes.code === 200 && treeRes.data) {
// // categoryIds
// const formatted = formatData(res.data)
// // setTreeData();
// }
};
const formatData = (list: any[]): LockNode[] => {
return list.map(item => ({