生产管理系统 - 角色管理、员工管理主页面联调
This commit is contained in:
@@ -103,12 +103,8 @@ export default function EmployeeManagementPage() {
|
||||
} catch (error) {
|
||||
console.error('Failed to load employees:', error);
|
||||
toast.error('加载员工数据失败');
|
||||
|
||||
// 如果API失败,使用localStorage中的数据
|
||||
const data = localStorage.getItem('smart_agriculture_employees');
|
||||
if (data) {
|
||||
setEmployees(JSON.parse(data));
|
||||
}
|
||||
setEmployees([]);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user