0007-web-cockpit-shell-and-plugin-reuse.md 932 B


status: accepted

Web cockpit shell and plugin reuse

驾驶舱采用一个 /cockpit 页面作为唯一外壳,中央 MapCanvas 常驻;一级模式通过 mode 状态切换。模式内的全部二级面板同时出现在左右两栏,不再使用 subview 状态或二级路由。二级面板只维护 expandedPanelIds 展开状态集合;点击标题栏切换展开/收起,切换一级模式时重置为默认展开。

开发期可参考或临时使用 src/plugins 下的稳定能力;最终交付以 src/pages/cockpit/index.vue 与 src/modules/cockpit 为准。src/pages/cockpit/index.vue 只挂载 CockpitShell,全部业务面板、地图交互、详情流程与适配层都在 src/modules/cockpit 内。稳定、通用的插件能力可通过适配层复用;大型插件不作为驾驶舱主体依赖,插件静态资源应复制到驾驶舱自有目录或通过受控服务提供。