部门、分类管理页面图标替换

This commit is contained in:
禺狨
2023-03-14 15:17:28 +08:00
parent 1972380fd7
commit 63a8992312
9 changed files with 135 additions and 107 deletions

View File

@@ -24,6 +24,7 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
const [loading, setLoading] = useState<boolean>(true);
const [departments, setDepartments] = useState<any>([]);
const [parent_id, setParentId] = useState<number>(0);
const [sort, setSort] = useState<number>(0);
useEffect(() => {
getParams();
@@ -63,6 +64,7 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
parent_id: new_arr,
});
setParentId(data.parent_id);
setSort(data.sort);
});
};
@@ -90,7 +92,7 @@ export const DepartmentUpdate: React.FC<PropInterface> = ({
const onFinish = (values: any) => {
department
.updateDepartment(id, values.name, parent_id || 0, 0)
.updateDepartment(id, values.name, parent_id || 0, sort)
.then((res: any) => {
message.success("保存成功!");
onCancel();