地图航向角修复 绑定设备界面 负责人的显示
This commit is contained in:
@@ -1468,6 +1468,15 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
|
|
||||||
|
|
||||||
// ==============================
|
// ==============================
|
||||||
|
// 航向角:优先用设备自带 heading/yaw/angle,否则按设备索引模拟角度(演示旋转)
|
||||||
|
// ==============================
|
||||||
|
|
||||||
|
//let headingDeg = Number(device?.heading ?? device?.yaw ?? device?.headingAngle ?? device?.angle);
|
||||||
|
//if (!isFinite(headingDeg)) {
|
||||||
|
// headingDeg = (index * 36) % 360;
|
||||||
|
//}
|
||||||
|
//const headingRotation = Cesium.Math.toRadians(-10);
|
||||||
|
|
||||||
// entity 获取 / 创建
|
// entity 获取 / 创建
|
||||||
// ==============================
|
// ==============================
|
||||||
|
|
||||||
@@ -1487,7 +1496,8 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
height,
|
height,
|
||||||
verticalOrigin: window.Cesium.VerticalOrigin.BOTTOM,
|
verticalOrigin: window.Cesium.VerticalOrigin.BOTTOM,
|
||||||
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
disableDepthTestDistance: Number.POSITIVE_INFINITY,
|
||||||
show: !isIOT
|
show: !isIOT,
|
||||||
|
//rotation: headingRotation,
|
||||||
},
|
},
|
||||||
|
|
||||||
label: {
|
label: {
|
||||||
@@ -1518,6 +1528,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
entity.billboard.image = image;
|
entity.billboard.image = image;
|
||||||
entity.billboard.width = width;
|
entity.billboard.width = width;
|
||||||
entity.billboard.height = height;
|
entity.billboard.height = height;
|
||||||
|
//entity.billboard.rotation = headingRotation;
|
||||||
|
|
||||||
entity.label.text = device.name || "";
|
entity.label.text = device.name || "";
|
||||||
|
|
||||||
@@ -1902,7 +1913,7 @@ const CesiumMap = React.forwardRef(({ ifClear, ifClearPlanLine, ifClearNavLine,
|
|||||||
if (realtimePosition?.heading !== undefined && !isNaN(Number(realtimePosition.heading))) {
|
if (realtimePosition?.heading !== undefined && !isNaN(Number(realtimePosition.heading))) {
|
||||||
let headingDeg = Number(realtimePosition.heading);
|
let headingDeg = Number(realtimePosition.heading);
|
||||||
|
|
||||||
rotation = Cesium.Math.toRadians(headingDeg);
|
rotation = Cesium.Math.toRadians(-headingDeg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ export default function SmartDeviceManagement({
|
|||||||
{
|
{
|
||||||
title: t('systemSetting.leader'), width: 150, key: 'userName',
|
title: t('systemSetting.leader'), width: 150, key: 'userName',
|
||||||
render: (_, record: any) => {
|
render: (_, record: any) => {
|
||||||
const user = allUserOptions.find(u => u.userId == record.userId);
|
const user = allUserOptions.find(u => u.userId == record.tenantId);
|
||||||
return user ? (user.nickName || user.userName) : <Text type="secondary">{t('systemSetting.s02')}</Text>;
|
return user ? (user.nickName || user.userName) : <Text type="secondary">{t('systemSetting.s02')}</Text>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user