2025-09-08 11:44:28 +08:00
|
|
|
|
<template>
|
|
|
|
|
<div class="robot-menu">
|
2025-09-10 16:39:46 +08:00
|
|
|
|
<!-- 机器人图片设置模态框 -->
|
|
|
|
|
<RobotImageSettingsModal
|
|
|
|
|
v-model:open="imageSettingsVisible"
|
2025-09-11 14:25:08 +08:00
|
|
|
|
:robots="robotInfo ? [{ name: robotInfo.label, type: 'robot', id: robotInfo.id }] : []"
|
2025-09-10 16:39:46 +08:00
|
|
|
|
:selected-robot-name="selectedRobotName"
|
|
|
|
|
@save="handleImageSettingsSave"
|
|
|
|
|
/>
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<div class="menu-container">
|
|
|
|
|
<!-- 左侧:机器人信息区域 -->
|
|
|
|
|
<div v-if="robotInfo" class="robot-info-section">
|
|
|
|
|
<div class="robot-header">
|
2025-09-11 11:48:48 +08:00
|
|
|
|
<div class="robot-name">{{ robotInfo.label }}</div>
|
2025-09-11 14:25:08 +08:00
|
|
|
|
<div class="robot-status" :style="{ color: getRobotStatusColor(robotInfo.state as any || 'offline') }">
|
|
|
|
|
{{ getRobotStatusText(robotInfo.state as any || 'offline') }}
|
2025-09-08 11:44:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<div class="robot-details">
|
2025-09-11 11:48:48 +08:00
|
|
|
|
<div v-if="robotInfo.battery !== undefined" class="detail-item">
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<span class="detail-label">电量:</span>
|
|
|
|
|
<div class="battery-container">
|
|
|
|
|
<div class="battery-bar">
|
|
|
|
|
<div
|
|
|
|
|
class="battery-fill"
|
2025-09-11 11:48:48 +08:00
|
|
|
|
:style="{ width: `${robotInfo.battery}%` }"
|
|
|
|
|
:class="getBatteryClass(robotInfo.battery)"
|
2025-09-10 10:41:10 +08:00
|
|
|
|
></div>
|
|
|
|
|
</div>
|
2025-09-11 11:48:48 +08:00
|
|
|
|
<span class="battery-text">{{ robotInfo.battery }}%</span>
|
2025-09-10 10:41:10 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-09-11 11:48:48 +08:00
|
|
|
|
<div v-if="robotInfo.targetPoint" class="detail-item">
|
|
|
|
|
<span class="detail-label">目标点位:</span>
|
|
|
|
|
<span class="detail-value">{{ robotInfo.targetPoint }}</span>
|
2025-09-10 10:41:10 +08:00
|
|
|
|
</div>
|
2025-09-08 11:44:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<!-- 右侧:机器人操作菜单 -->
|
|
|
|
|
<div class="robot-actions">
|
|
|
|
|
<div class="actions-grid">
|
|
|
|
|
<!-- 控制权限 -->
|
|
|
|
|
<div class="action-group">
|
|
|
|
|
<div class="action-group-title">控制权限</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('seize_control', '抢占控制权')">
|
|
|
|
|
<span class="action-icon">🎮</span>
|
|
|
|
|
<span>抢占控制权</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('enable_orders', '可接单')">
|
|
|
|
|
<span class="action-icon">✅</span>
|
|
|
|
|
<span>可接单</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('disable_orders', '不可接单')">
|
|
|
|
|
<span class="action-icon">❌</span>
|
|
|
|
|
<span>不可接单</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-09 17:12:30 +08:00
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<!-- 运行控制 -->
|
|
|
|
|
<div class="action-group">
|
|
|
|
|
<div class="action-group-title">运行控制</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('pause', '暂停')">
|
|
|
|
|
<span class="action-icon">⏸️</span>
|
|
|
|
|
<span>暂停</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('resume', '继续')">
|
|
|
|
|
<span class="action-icon">▶️</span>
|
|
|
|
|
<span>继续</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('start', '启动')">
|
|
|
|
|
<span class="action-icon">🚀</span>
|
|
|
|
|
<span>启动</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('stop', '停止')">
|
|
|
|
|
<span class="action-icon">⏹️</span>
|
|
|
|
|
<span>停止</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<!-- 导航控制 -->
|
|
|
|
|
<div class="action-group">
|
|
|
|
|
<div class="action-group-title">导航控制</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('go_charge', '前往充电')">
|
|
|
|
|
<span class="action-icon">🔋</span>
|
|
|
|
|
<span>前往充电</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('go_dock', '前往停靠')">
|
|
|
|
|
<span class="action-icon">🏠</span>
|
|
|
|
|
<span>前往停靠</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('navigate', '路径导航')">
|
|
|
|
|
<span class="action-icon">🧭</span>
|
|
|
|
|
<span>路径导航</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<!-- 系统管理 -->
|
|
|
|
|
<div class="action-group">
|
|
|
|
|
<div class="action-group-title">系统管理</div>
|
2025-09-10 15:56:50 +08:00
|
|
|
|
<div class="action-item" @click="handleRobotAction('custom_image', '自定义图片')">
|
|
|
|
|
<span class="action-icon">🖼️</span>
|
|
|
|
|
<span>自定义图片</span>
|
|
|
|
|
</div>
|
2025-09-10 10:41:10 +08:00
|
|
|
|
<div class="action-item" @click="handleRobotAction('reset', '重置')">
|
|
|
|
|
<span class="action-icon">🔄</span>
|
|
|
|
|
<span>重置</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('diagnose', '诊断')">
|
|
|
|
|
<span class="action-icon">🔧</span>
|
|
|
|
|
<span>诊断</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="action-item" @click="handleRobotAction('update', '更新')">
|
|
|
|
|
<span class="action-icon">📱</span>
|
|
|
|
|
<span>更新</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2025-09-08 11:44:28 +08:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2025-09-10 15:56:50 +08:00
|
|
|
|
import { message } from 'ant-design-vue';
|
2025-09-11 15:27:30 +08:00
|
|
|
|
import { computed, inject, type InjectionKey, ref, type ShallowRef } from 'vue';
|
2025-09-10 15:56:50 +08:00
|
|
|
|
|
2025-09-11 11:48:48 +08:00
|
|
|
|
import type { RobotInfo } from '../../apis/robot';
|
|
|
|
|
import type { RobotAction } from '../../services/context-menu/robot-menu.service';
|
2025-09-09 17:12:30 +08:00
|
|
|
|
import {
|
|
|
|
|
executeRobotAction,
|
|
|
|
|
getRobotStatusColor,
|
2025-09-10 15:56:50 +08:00
|
|
|
|
getRobotStatusText
|
|
|
|
|
} from '../../services/context-menu/robot-menu.service';
|
2025-09-11 15:27:30 +08:00
|
|
|
|
import type { EditorService } from '../../services/editor.service';
|
2025-09-10 16:39:46 +08:00
|
|
|
|
import RobotImageSettingsModal from '../modal/robot-image-settings-modal.vue';
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
|
|
|
|
interface Props {
|
2025-09-11 15:27:30 +08:00
|
|
|
|
robotId?: string; // 改为传递机器人ID而不是完整的机器人信息
|
|
|
|
|
token?: InjectionKey<ShallowRef<EditorService>>; // 添加 editor token
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface Emits {
|
2025-09-09 17:12:30 +08:00
|
|
|
|
(e: 'actionComplete', data: { action: RobotAction; robot: RobotInfo; success: boolean }): void;
|
2025-09-10 15:56:50 +08:00
|
|
|
|
(e: 'customImage', data: { robotInfo: RobotInfo }): void;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-09-11 14:25:08 +08:00
|
|
|
|
const props = defineProps<Props>();
|
2025-09-10 15:56:50 +08:00
|
|
|
|
|
2025-09-08 11:44:28 +08:00
|
|
|
|
const emit = defineEmits<Emits>();
|
|
|
|
|
|
2025-09-11 15:27:30 +08:00
|
|
|
|
// 注入 editor service
|
|
|
|
|
const editor = props.token ? inject(props.token) : null;
|
|
|
|
|
|
|
|
|
|
// 根据 robotId 获取机器人信息
|
|
|
|
|
const robotInfo = computed<RobotInfo | null>(() => {
|
|
|
|
|
if (!props.robotId || !editor?.value) return null;
|
|
|
|
|
return editor.value.getRobotById(props.robotId) || null;
|
|
|
|
|
});
|
|
|
|
|
|
2025-09-10 15:56:50 +08:00
|
|
|
|
// 图片设置模态框状态
|
|
|
|
|
const imageSettingsVisible = ref(false);
|
|
|
|
|
const selectedRobotName = ref('');
|
|
|
|
|
|
|
|
|
|
|
2025-09-08 11:44:28 +08:00
|
|
|
|
// 定义组件名称
|
|
|
|
|
defineOptions({
|
|
|
|
|
name: 'RobotMenu',
|
|
|
|
|
});
|
|
|
|
|
|
2025-09-11 14:25:08 +08:00
|
|
|
|
// 直接使用服务函数,无需包装
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
|
|
|
|
// 获取电量条样式类
|
|
|
|
|
const getBatteryClass = (batteryLevel: number) => {
|
|
|
|
|
if (batteryLevel > 50) return 'battery-high';
|
|
|
|
|
if (batteryLevel > 20) return 'battery-medium';
|
|
|
|
|
return 'battery-low';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 处理机器人操作
|
2025-09-10 15:56:50 +08:00
|
|
|
|
const handleRobotAction = async (action: RobotAction | 'custom_image', actionName: string) => {
|
2025-09-11 15:27:30 +08:00
|
|
|
|
if (!robotInfo.value) return;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
2025-09-10 15:56:50 +08:00
|
|
|
|
// 处理自定义图片操作
|
|
|
|
|
if (action === 'custom_image') {
|
2025-09-11 15:27:30 +08:00
|
|
|
|
if (!robotInfo.value?.label) {
|
2025-09-11 14:25:08 +08:00
|
|
|
|
message.error('未找到机器人信息');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-11 15:27:30 +08:00
|
|
|
|
console.log('打开机器人图片设置:', robotInfo.value);
|
2025-09-11 14:25:08 +08:00
|
|
|
|
|
|
|
|
|
// 打开模态框,不关闭右键菜单
|
2025-09-11 15:27:30 +08:00
|
|
|
|
selectedRobotName.value = robotInfo.value.label;
|
2025-09-11 14:25:08 +08:00
|
|
|
|
imageSettingsVisible.value = true;
|
|
|
|
|
|
|
|
|
|
// 只触发自定义图片事件,不触发操作完成事件
|
|
|
|
|
emit('customImage', {
|
2025-09-11 15:27:30 +08:00
|
|
|
|
robotInfo: robotInfo.value
|
2025-09-11 14:25:08 +08:00
|
|
|
|
});
|
2025-09-10 15:56:50 +08:00
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-08 11:44:28 +08:00
|
|
|
|
try {
|
2025-09-11 15:27:30 +08:00
|
|
|
|
console.log(`执行机器人操作: ${action} (${actionName})`, robotInfo.value);
|
2025-09-09 17:12:30 +08:00
|
|
|
|
|
|
|
|
|
// 使用服务函数执行操作
|
2025-09-11 15:27:30 +08:00
|
|
|
|
const result = await executeRobotAction(action, robotInfo.value);
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
2025-09-09 17:12:30 +08:00
|
|
|
|
console.log('机器人操作结果:', result);
|
2025-09-08 11:44:28 +08:00
|
|
|
|
|
|
|
|
|
// 发送操作完成事件
|
|
|
|
|
emit('actionComplete', {
|
|
|
|
|
action,
|
2025-09-11 15:27:30 +08:00
|
|
|
|
robot: robotInfo.value,
|
2025-09-09 17:12:30 +08:00
|
|
|
|
success: result.success
|
2025-09-08 11:44:28 +08:00
|
|
|
|
});
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(`机器人${actionName}操作失败:`, error);
|
|
|
|
|
|
|
|
|
|
emit('actionComplete', {
|
|
|
|
|
action,
|
2025-09-11 15:27:30 +08:00
|
|
|
|
robot: robotInfo.value,
|
2025-09-08 11:44:28 +08:00
|
|
|
|
success: false
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
};
|
2025-09-10 15:56:50 +08:00
|
|
|
|
|
|
|
|
|
// 处理图片设置保存
|
|
|
|
|
const handleImageSettingsSave = (data: any) => {
|
|
|
|
|
console.log('机器人图片设置保存:', data);
|
|
|
|
|
message.success('机器人图片设置保存成功');
|
|
|
|
|
|
|
|
|
|
// 可以在这里添加额外的保存后处理逻辑
|
|
|
|
|
// 比如通知父组件更新机器人显示等
|
|
|
|
|
};
|
2025-09-08 11:44:28 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
.robot-menu {
|
|
|
|
|
width: 100%;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
min-width: 320px;
|
|
|
|
|
max-width: 500px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
/* 主容器:左右布局 */
|
|
|
|
|
.menu-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
min-height: 200px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 左侧:机器人信息区域 */
|
2025-09-08 11:44:28 +08:00
|
|
|
|
.robot-info-section {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
width: 140px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
padding: 12px;
|
|
|
|
|
background-color: #f8f9fa;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
border-right: 1px solid #e9ecef;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
justify-content: flex-start;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.robot-header {
|
|
|
|
|
display: flex;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
margin-bottom: 12px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.robot-name {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 14px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #000;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
line-height: 1.2;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.robot-status {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 10px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
font-weight: 500;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
padding: 2px 6px;
|
|
|
|
|
border-radius: 8px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
background-color: rgba(0, 0, 0, 0.05);
|
2025-09-10 10:41:10 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
white-space: nowrap;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.robot-details {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
gap: 8px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-item {
|
|
|
|
|
display: flex;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
font-size: 11px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-label {
|
|
|
|
|
color: #666;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 10px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.detail-value {
|
|
|
|
|
color: #000;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 11px;
|
|
|
|
|
word-break: break-all;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 电量条样式 */
|
|
|
|
|
.battery-container {
|
|
|
|
|
display: flex;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
flex-direction: column;
|
|
|
|
|
gap: 4px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-bar {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
width: 100%;
|
|
|
|
|
height: 4px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
background-color: #e9ecef;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
border-radius: 2px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-fill {
|
|
|
|
|
height: 100%;
|
|
|
|
|
transition: width 0.3s ease;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
border-radius: 2px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-fill.battery-high {
|
|
|
|
|
background-color: #52c41a;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-fill.battery-medium {
|
|
|
|
|
background-color: #faad14;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-fill.battery-low {
|
|
|
|
|
background-color: #ff4d4f;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.battery-text {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 10px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
color: #666;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
text-align: center;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
/* 右侧:操作区域 */
|
2025-09-08 11:44:28 +08:00
|
|
|
|
.robot-actions {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 8px;
|
|
|
|
|
overflow-y: auto;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
.actions-grid {
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 1fr 1fr;
|
|
|
|
|
gap: 8px;
|
|
|
|
|
height: 100%;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
2025-09-10 10:41:10 +08:00
|
|
|
|
.action-group {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
min-height: 0;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-group-title {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 10px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
font-weight: 600;
|
|
|
|
|
color: #666;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
padding: 4px 8px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
letter-spacing: 0.5px;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
background-color: #f5f5f5;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
margin-bottom: 4px;
|
|
|
|
|
text-align: center;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-item {
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
padding: 6px 8px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
transition: background-color 0.2s;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 11px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
color: #000;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
gap: 6px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
margin-bottom: 2px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-item:hover {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
background-color: #f0f0f0;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.action-icon {
|
2025-09-10 10:41:10 +08:00
|
|
|
|
font-size: 12px;
|
|
|
|
|
width: 14px;
|
2025-09-08 11:44:28 +08:00
|
|
|
|
text-align: center;
|
2025-09-10 10:41:10 +08:00
|
|
|
|
flex-shrink: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* 响应式设计 */
|
|
|
|
|
@media (max-width: 400px) {
|
|
|
|
|
.menu-container {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.robot-info-section {
|
|
|
|
|
width: 100%;
|
|
|
|
|
border-right: none;
|
|
|
|
|
border-bottom: 1px solid #e9ecef;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.actions-grid {
|
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
|
}
|
2025-09-08 11:44:28 +08:00
|
|
|
|
}
|
|
|
|
|
</style>
|