feat(platform): 部署配置向导 + 地图管理,地图编辑器接入统一存取与 AI 助手
- 配置向导:登录按 deployment 画像引导平台选型(导航方式/模块/场景),未完成则路由守卫强制进入 /wizard;选型驱动菜单按需裁剪,并联动 SimpleLite 写 plugins/active-scenes.json + 透传 --scenes 选择性加载导航场景插件 - 地图管理页:服务器地图列表/使用/重命名/删除、地图合并、多地图连接管理 - 地图编辑器:项目存取改为存入地图管理统一目录(同名替换确认),支持 ?map=/?new= 进入,新增右侧可停靠 AI 助手面板 - 集成 PTL 拣选模块;新增车队分配面板(运维总览/筛选联动) - SimpleLiteBuildSync 同步运行时依赖 DLL;重新构建前端静态资源 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import { ref } from 'vue'
|
||||
import { useConfigStore } from '@/stores/config'
|
||||
import { DEFAULT_FLEET } from '@/mock/data/configs'
|
||||
import type { FleetGroup, FleetLifecycleConfig } from '@/types/config'
|
||||
|
||||
const groups = ref<FleetGroup[]>([])
|
||||
const loading = ref(false)
|
||||
|
||||
/** 共享车队分组配置(运维总览分配 + 筛选联动) */
|
||||
export function useFleetGroups() {
|
||||
const store = useConfigStore()
|
||||
|
||||
async function reload(force = false) {
|
||||
loading.value = true
|
||||
try {
|
||||
const env = await store.load<FleetLifecycleConfig>('fleet', force)
|
||||
const payload = env.payload ?? DEFAULT_FLEET
|
||||
groups.value = JSON.parse(JSON.stringify(payload.groups ?? [])) as FleetGroup[]
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
function fleetNameForCarId(carId: string): string | undefined {
|
||||
for (const g of groups.value) {
|
||||
if (g.carIds.includes(carId)) return g.name || g.id
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
function regionForCarId(carId: string): string | undefined {
|
||||
for (const g of groups.value) {
|
||||
if (g.carIds.includes(carId)) return g.region || undefined
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
return { groups, loading, reload, fleetNameForCarId, regionForCarId }
|
||||
}
|
||||
Reference in New Issue
Block a user