添加管理员逻辑

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

@@ -148,12 +148,16 @@ export class DataModule {
this.updateMarkers(updatedMarkers);
} else {
// 创建新的用户标记点
const userInfo = this.pageContext.data.userInfo;
const userRole = userInfo?.role || 'employee';
const iconPath = userRole === 'ADMIN' ? '/images/crown.png' : '/images/truck.png';
const newUserMarker = {
id: targetUserId,
title: markerTitle,
longitude: longitude,
latitude: latitude,
iconPath: '/images/trucks.png',
iconPath: iconPath,
width: 40,
height: 40,
zIndex: targetUserId === -1 ? 99 : 98 // 当前用户层级更高