添加管理员逻辑

This commit is contained in:
2025-10-19 23:38:54 +08:00
parent 118ec38550
commit 5ee4e077fb
46 changed files with 5263 additions and 883 deletions

View File

@@ -1,6 +1,6 @@
// 员工模块 - 处理所有员工(管理员和货运人员)管理、位置跟踪、交互
import employeeService from '../../../services/employeeService';
import { Role } from '../../../utils/roleUtils';
// getApp是微信小程序全局函数无需导入
import { showToast } from '../../../utils/helpers';
@@ -30,37 +30,7 @@ export class EmployeeModule {
}
}
/**
* 获取员工角色对应的图标
*/
private getEmployeeIcon(role: string): string {
console.log(`获取员工图标,角色: ${role}`);
// 根据角色使用不同的图标
let iconPath = '';
switch (role) {
case Role.ADMIN:
// 管理员使用皇冠图标
iconPath = '/images/crown.png';
console.log('使用管理员图标(👑)');
break;
case Role.DELIVERY_PERSON:
// 货运人员使用货车图标
iconPath = '/images/truck.png';
console.log('使用货运人员图标(🚚)');
break;
default:
// 默认使用货车图标
iconPath = '/images/truck.png';
console.log('使用默认图标(🚚)');
break;
}
console.log(`最终使用图标路径: ${iconPath}`);
return iconPath;
}
/**
* 显示货运人员详情面板