Compare commits
2 Commits
9212b45ece
...
2dfd975b46
| Author | SHA1 | Date | |
|---|---|---|---|
| 2dfd975b46 | |||
| d4e19d519b |
@@ -423,6 +423,20 @@ export default function DeviceStatusPage() {
|
|||||||
// `webrtc://1.95.137.212/live/livestream/${device?.serialNumber}`,
|
// `webrtc://1.95.137.212/live/livestream/${device?.serialNumber}`,
|
||||||
//);
|
//);
|
||||||
const getVal = (val) => val === "no_rain" ? t('devices.rainNo') : (val || '-');
|
const getVal = (val) => val === "no_rain" ? t('devices.rainNo') : (val || '-');
|
||||||
|
const fixStatusMap: Record<string, string> = {
|
||||||
|
'no_fix': t('devices.noFix'),
|
||||||
|
'single': t('devices.single'),
|
||||||
|
'dgnss': t('devices.dgnss'),
|
||||||
|
'ins': t('devices.ins'),
|
||||||
|
'rtk_fixed': t('devices.rtkFixed'),
|
||||||
|
'rtk_float': t('devices.rtkFloat'),
|
||||||
|
'single_no_heading': t('devices.singleNoHeading'),
|
||||||
|
'dgnss_no_heading': t('devices.dgnssNoHeading'),
|
||||||
|
'rtk_fixed_no_heading': t('devices.rtkFixedNoHeading'),
|
||||||
|
'rtk_float_no_heading': t('devices.rtkFloatNoHeading'),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const realtimePosition = React.useMemo(() => {
|
const realtimePosition = React.useMemo(() => {
|
||||||
// 1. 无人机:优先用 MQTT 实时数据
|
// 1. 无人机:优先用 MQTT 实时数据
|
||||||
@@ -1167,11 +1181,7 @@ export default function DeviceStatusPage() {
|
|||||||
<span>{runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? t('devices.rtInitialized') : t('devices.uninitialized')}` : '-'}</span>
|
<span>{runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? t('devices.rtInitialized') : t('devices.uninitialized')}` : '-'}</span>
|
||||||
<span>{t('devices.rtPositioning')}:</span>
|
<span>{t('devices.rtPositioning')}:</span>
|
||||||
<span>
|
<span>
|
||||||
{runningStatus.qual == 0 ? t('constants.locationInvalid') :
|
{runningStatus.fix_status ? fixStatusMap[runningStatus.fix_status] : t('constants.locationUnknown')}
|
||||||
runningStatus.qual == 1 ? t('devices.gpsSingle') :
|
|
||||||
runningStatus.qual == 2 ? t('devices.dgpsDiff') :
|
|
||||||
runningStatus.qual == 4 ? t('devices.rtkFixed2') :
|
|
||||||
runningStatus.qual == 5 ? t('devices.rtkFloat') : t('constants.locationUnknown')}
|
|
||||||
</span>
|
</span>
|
||||||
<span>{t('devices.rtSatellites')}:</span>
|
<span>{t('devices.rtSatellites')}:</span>
|
||||||
<span>{t('devices.satelliteCount', { count: runningStatus.satelliteCnt || 0 })}</span>
|
<span>{t('devices.satelliteCount', { count: runningStatus.satelliteCnt || 0 })}</span>
|
||||||
@@ -1280,11 +1290,8 @@ export default function DeviceStatusPage() {
|
|||||||
<span>{runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? t('devices.rtInitialized') : t('devices.uninitialized')}` : '-'}</span>
|
<span>{runningStatus.headingStatus !== undefined ? `${runningStatus.headingStatus == 1 ? t('devices.rtInitialized') : t('devices.uninitialized')}` : '-'}</span>
|
||||||
<span>{t('devices.rtPositioning')}</span>
|
<span>{t('devices.rtPositioning')}</span>
|
||||||
<span>
|
<span>
|
||||||
{runningStatus.qual == 0 ? t('constants.locationInvalid') :
|
{runningStatus.fix_status ? fixStatusMap[runningStatus.fix_status] : t('constants.locationUnknown')}
|
||||||
runningStatus.qual == 1 ? t('devices.gpsSingle') :
|
|
||||||
runningStatus.qual == 2 ? t('devices.dgpsDiff') :
|
|
||||||
runningStatus.qual == 4 ? t('devices.rtkFixed2') :
|
|
||||||
runningStatus.qual == 5 ? t('devices.rtkFloat') : t('constants.locationUnknown')}
|
|
||||||
</span>
|
</span>
|
||||||
<span>{t('devices.rtSatellites')}</span>
|
<span>{t('devices.rtSatellites')}</span>
|
||||||
<span>{t('devices.satelliteCount', { count: runningStatus.satelliteCnt || 0 })}</span>
|
<span>{t('devices.satelliteCount', { count: runningStatus.satelliteCnt || 0 })}</span>
|
||||||
|
|||||||
@@ -145,6 +145,20 @@ export default function RobotTaskPage() {
|
|||||||
const [messageApi, contextHolder] = message.useMessage();
|
const [messageApi, contextHolder] = message.useMessage();
|
||||||
const controllerRef = useRef<DeviceController | null>(null);
|
const controllerRef = useRef<DeviceController | null>(null);
|
||||||
const isFirstConnect = useRef(true);
|
const isFirstConnect = useRef(true);
|
||||||
|
const fixStatusMap: Record<string, string> = {
|
||||||
|
'no_fix': t('devices.noFix'),
|
||||||
|
'single': t('devices.single'),
|
||||||
|
'dgnss': t('devices.dgnss'),
|
||||||
|
'ins': t('devices.ins'),
|
||||||
|
'rtk_fixed': t('devices.rtkFixed'),
|
||||||
|
'rtk_float': t('devices.rtkFloat'),
|
||||||
|
'single_no_heading': t('devices.singleNoHeading'),
|
||||||
|
'dgnss_no_heading': t('devices.dgnssNoHeading'),
|
||||||
|
'rtk_fixed_no_heading': t('devices.rtkFixedNoHeading'),
|
||||||
|
'rtk_float_no_heading': t('devices.rtkFloatNoHeading'),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const handleFinish = (data) => {
|
const handleFinish = (data) => {
|
||||||
setExecute(false);
|
setExecute(false);
|
||||||
setShowVideo(false); // 任务完成关闭视频
|
setShowVideo(false); // 任务完成关闭视频
|
||||||
@@ -1268,6 +1282,19 @@ export default function RobotTaskPage() {
|
|||||||
<span style={{ color: '#9eff9e' }}>{t('devices.remoteMode')}</span>
|
<span style={{ color: '#9eff9e' }}>{t('devices.remoteMode')}</span>
|
||||||
)}
|
)}
|
||||||
</span>
|
</span>
|
||||||
|
{/* const fixStatusMap: Record<string, string> = {
|
||||||
|
'no_fix': t('devices.noFix'),
|
||||||
|
'single': t('devices.single'),
|
||||||
|
'dgnss': t('devices.dgnss'),
|
||||||
|
'ins': t('devices.ins'),
|
||||||
|
'rtk_fixed': t('devices.rtkFixed'),
|
||||||
|
'rtk_float': t('devices.rtkFloat'),
|
||||||
|
'single_no_heading': t('devices.singleNoHeading'),
|
||||||
|
'dgnss_no_heading': t('devices.dgnssNoHeading'),
|
||||||
|
'rtk_fixed_no_heading': t('devices.rtkFixedNoHeading'),
|
||||||
|
'rtk_float_no_heading': t('devices.rtkFloatNoHeading'),
|
||||||
|
}
|
||||||
|
*/}
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{t('devices.heading')}
|
{t('devices.heading')}
|
||||||
@@ -1280,11 +1307,7 @@ export default function RobotTaskPage() {
|
|||||||
|
|
||||||
<span>
|
<span>
|
||||||
{t('devices.location')}
|
{t('devices.location')}
|
||||||
{(() => {
|
{robotRealtimePosition?.fix_status ? fixStatusMap[robotRealtimePosition?.fix_status] : t('constants.locationUnknown')}
|
||||||
const qual = robotRealtimePosition?.qual;
|
|
||||||
const info = getLocationQuality(qual);
|
|
||||||
return <span style={{ color: info.color }}>{info.text}</span>;
|
|
||||||
})()}
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{/* 视频开关 */}
|
{/* 视频开关 */}
|
||||||
|
|||||||
@@ -1029,7 +1029,15 @@ const en = {
|
|||||||
fixed2Video: 'Fixed2 Video 已配',
|
fixed2Video: 'Fixed2 Video 已配',
|
||||||
|
|
||||||
batteryFixed2: '电池 Battery Fixed2',
|
batteryFixed2: '电池 Battery Fixed2',
|
||||||
|
noFix: 'noFix',
|
||||||
|
single: 'single',
|
||||||
|
dgnss: 'dgnss',
|
||||||
|
ins: 'ins',
|
||||||
|
|
||||||
|
singleNoHeading: 'singleNoHeading',
|
||||||
|
dgnssNoHeading: 'dgnssNoHeading',
|
||||||
|
rtkFixedNoHeading: 'rtkFixedNoHeading',
|
||||||
|
rtkFloatNoHeading: 'rtkFloatNoHeading',
|
||||||
s62: 'Signal/Satellite',
|
s62: 'Signal/Satellite',
|
||||||
|
|
||||||
s72: 'Wind Speed',
|
s72: 'Wind Speed',
|
||||||
|
|||||||
@@ -243,6 +243,16 @@ const zh = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
devices: {
|
devices: {
|
||||||
|
noFix: '无定位',
|
||||||
|
single: '单点定位',
|
||||||
|
dgnss: '差分定位',
|
||||||
|
ins: '惯导定位',
|
||||||
|
rtkFixed: 'RTK固定解',
|
||||||
|
rtkFloat: 'RTK浮点解',
|
||||||
|
singleNoHeading: '单点定位(无航向)',
|
||||||
|
dgnssNoHeading: '差分定位(无航向)',
|
||||||
|
rtkFixedNoHeading: 'RTK固定解(无航向)',
|
||||||
|
rtkFloatNoHeading: 'RTK浮点解(无航向)',
|
||||||
deviceManagement: '设备管理',
|
deviceManagement: '设备管理',
|
||||||
distributable: '可调度',
|
distributable: '可调度',
|
||||||
deviceOverview: '设备总览',
|
deviceOverview: '设备总览',
|
||||||
@@ -373,7 +383,6 @@ const zh = {
|
|||||||
currentTemp: '当前温度',
|
currentTemp: '当前温度',
|
||||||
humidity: '环境湿度',
|
humidity: '环境湿度',
|
||||||
positionAccuracy: '定位精度',
|
positionAccuracy: '定位精度',
|
||||||
rtkFixed: 'RTK 固定',
|
|
||||||
networkLatency: '网络延迟',
|
networkLatency: '网络延迟',
|
||||||
waterRiskWarning: '注意:区域 B 存在积水风险,建议避开',
|
waterRiskWarning: '注意:区域 B 存在积水风险,建议避开',
|
||||||
presetRoutes: '预设路线',
|
presetRoutes: '预设路线',
|
||||||
@@ -739,8 +748,8 @@ const zh = {
|
|||||||
positionInStation: '位置内电站',
|
positionInStation: '位置内电站',
|
||||||
precipStatus: '降水状态',
|
precipStatus: '降水状态',
|
||||||
productType: '产品类型',
|
productType: '产品类型',
|
||||||
rainNo: '雨无',
|
rainNo: '无',
|
||||||
rainYes: '雨是',
|
rainYes: '降雨',
|
||||||
rainfall: '降雨',
|
rainfall: '降雨',
|
||||||
realtimeMonitorList: '实时监控列表',
|
realtimeMonitorList: '实时监控列表',
|
||||||
realtimePicture: '实时图片',
|
realtimePicture: '实时图片',
|
||||||
@@ -788,29 +797,28 @@ const zh = {
|
|||||||
routeLoadedWithName: '路线已加载带名称',
|
routeLoadedWithName: '路线已加载带名称',
|
||||||
routeNoPathPoints: '路线编号路径点',
|
routeNoPathPoints: '路线编号路径点',
|
||||||
routeSavedLocal: '路线已保存本地',
|
routeSavedLocal: '路线已保存本地',
|
||||||
rtBattery: '实时电量',
|
rtBattery: '电量',
|
||||||
rtHeadingAngle: '实时航向角度',
|
rtHeadingAngle: '航向角度',
|
||||||
rtHeadingStatus: '实时航向状态',
|
rtHeadingStatus: '航向状态',
|
||||||
rtInitialized: '实时已初始化',
|
rtInitialized: '已初始化',
|
||||||
rtLeftMotor: '实时左电机',
|
rtLeftMotor: '左电机',
|
||||||
rtLeftSpeed: '实时左速度',
|
rtLeftSpeed: '左速度',
|
||||||
rtLeftTemp: '实时左温度',
|
rtLeftTemp: '左温度',
|
||||||
rtMainTemp: '实时主温度',
|
rtMainTemp: '主温度',
|
||||||
rtMode: '实时模式',
|
rtMode: '模式',
|
||||||
rtPitchAngle: '实时俯仰角度',
|
rtPitchAngle: '俯仰角度',
|
||||||
rtPositioning: '实时定位',
|
rtPositioning: '定位',
|
||||||
rtRightMotor: '实时右电机',
|
rtRightMotor: '右电机',
|
||||||
rtRightSpeed: '实时右速度',
|
rtRightSpeed: '右速度',
|
||||||
rtRightTemp: '实时右温度',
|
rtRightTemp: '右温度',
|
||||||
rtSatellites: '实时卫星',
|
rtSatellites: '卫星数量',
|
||||||
rtVoltage: '实时电压',
|
rtVoltage: '电压',
|
||||||
rthMode: '返航模式',
|
rthMode: '返航模式',
|
||||||
rthOptimal: '返航最优',
|
rthOptimal: '返航最优',
|
||||||
rthPreset: '返航预设',
|
rthPreset: '返航预设',
|
||||||
rtkCount: 'RTK数量',
|
rtkCount: 'RTK数量',
|
||||||
rtkEnvLabel: 'RTK环境标签',
|
rtkEnvLabel: 'RTK环境标签',
|
||||||
rtkFixed2: 'RTK',
|
rtkFixed2: 'RTK固定',
|
||||||
rtkFloat: 'RTK浮点',
|
|
||||||
rtkHighPrecision: 'RTK高精度',
|
rtkHighPrecision: 'RTK高精度',
|
||||||
rtkModeDesc: 'RTK模式描述',
|
rtkModeDesc: 'RTK模式描述',
|
||||||
rtkStatus: 'RTK状态',
|
rtkStatus: 'RTK状态',
|
||||||
@@ -823,11 +831,11 @@ const zh = {
|
|||||||
searchWaylinePlaceholder: '搜索航线占位',
|
searchWaylinePlaceholder: '搜索航线占位',
|
||||||
selectDevice: '选择设备',
|
selectDevice: '选择设备',
|
||||||
selectDrone: '选择无人机',
|
selectDrone: '选择无人机',
|
||||||
selectExecuteDroneFirst: '选择执行无人机先',
|
selectExecuteDroneFirst: '执行无人机',
|
||||||
selectNoDrone: '选择无无人机',
|
selectNoDrone: '无无人机',
|
||||||
selectStartTimePlaceholder: '选择开始时间占位',
|
selectStartTimePlaceholder: '开始时间',
|
||||||
selectTaskFirst: '选择任务先',
|
selectTaskFirst: '选择任务先',
|
||||||
selectTaskStartTime: '选择任务开始时间',
|
selectTaskStartTime: '任务开始时间',
|
||||||
selectWayline: '选择航线',
|
selectWayline: '选择航线',
|
||||||
selectedWaylineColon: '已选航线冒号',
|
selectedWaylineColon: '已选航线冒号',
|
||||||
signalSatellite: '信号卫星',
|
signalSatellite: '信号卫星',
|
||||||
@@ -3344,17 +3352,17 @@ const zh = {
|
|||||||
male: '男',
|
male: '男',
|
||||||
female: '女',
|
female: '女',
|
||||||
notSet: '未设置',
|
notSet: '未设置',
|
||||||
basicInfo: '基础提示',
|
basicInfo: '基本信息',
|
||||||
changePassword: '变更密码',
|
changePassword: '变更密码',
|
||||||
confirmPasswordPlaceholder: '确认密码占位',
|
confirmPasswordPlaceholder: '确认密码',
|
||||||
confirmPasswordRequired: '确认密码必填',
|
confirmPasswordRequired: '确认密码必填',
|
||||||
emailInvalid: '邮件无效',
|
emailInvalid: '邮件无效',
|
||||||
emailPlaceholder: '邮件占位',
|
emailPlaceholder: '邮件占位',
|
||||||
newPasswordPlaceholder: '新密码占位',
|
newPasswordPlaceholder: '新密码',
|
||||||
oldPasswordPlaceholder: '旧密码占位',
|
oldPasswordPlaceholder: '旧密码',
|
||||||
passwordLengthError: '密码长度错误',
|
passwordLengthError: '密码长度错误',
|
||||||
phoneInvalid: '电话无效',
|
phoneInvalid: '电话无效',
|
||||||
remarkPlaceholder: '备注占位',
|
remarkPlaceholder: '备注',
|
||||||
requestFailed: '请求失败',
|
requestFailed: '请求失败',
|
||||||
},
|
},
|
||||||
users: {
|
users: {
|
||||||
|
|||||||
Reference in New Issue
Block a user