+
@@ -293,18 +294,26 @@ const onTabDragEnd = () => {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
-/* 顶部和底部位置:水平布局 */
-.tab-page-top,
-.tab-page-bottom {
+/* 顶部位置:标签栏 -> 工具栏 -> 内容区 */
+.tab-page-top {
flex-direction: column;
}
-/* 左侧和右侧位置:水平布局但标签栏垂直 */
-.tab-page-left,
-.tab-page-right {
+/* 底部位置:内容区 -> 工具栏 -> 标签栏 */
+.tab-page-bottom {
+ flex-direction: column-reverse;
+}
+
+/* 左侧位置:标签栏 -> 工具栏 -> 内容区(垂直排列) */
+.tab-page-left {
flex-direction: row;
}
+/* 右侧位置:标签栏 -> 工具栏 -> 内容区(垂直排列) */
+.tab-page-right {
+ flex-direction: row-reverse;
+}
+
:root {
--vs-blue-top: #4f72b3;
--vs-blue-bottom: #3c5a99;
diff --git a/AutoRobot/Windows/Robot/Web/src/DockLayout/dockLayers.js b/AutoRobot/Windows/Robot/Web/src/DockLayout/dockLayers.js
new file mode 100644
index 0000000..5341c06
--- /dev/null
+++ b/AutoRobot/Windows/Robot/Web/src/DockLayout/dockLayers.js
@@ -0,0 +1,162 @@
+/**
+ * DockLayout Z-Index 全局管理器
+ * 统一管理所有组件的层级,确保正确的显示顺序
+ */
+
+// Z-Index 分层策略
+export const Z_INDEX_LAYERS = {
+ // 基础层级
+ BACKGROUND: 1, // 背景层
+
+ // 内容层级
+ CONTENT: 10, // 普通内容层
+ CONTENT_ACTIVE: 15, // 活跃内容层
+
+ // 交互组件
+ RESIZE_BAR: 100, // 调整手柄
+
+ // 标题栏和工具栏
+ TITLE_BAR: 200, // 标题栏
+ TOOLBAR: 300, // 工具栏
+
+ // 浮动区域
+ FLOATING_AREA: 1000, // 浮动区域
+ FLOATING_AREA_ACTIVE: 1100, // 活跃浮动区域
+
+ // 指示器和交互反馈
+ DOCK_INDICATOR: 5000, // 停靠指示器
+ DRAG_PREVIEW: 6000, // 拖拽预览
+
+ // 最高优先级
+ MODAL: 8000, // 模态框
+ TOOLTIP: 9000, // 工具提示
+ NOTIFICATION: 9500, // 通知
+ CRITICAL: 9999 // 关键提示
+}
+
+// 动态z-index管理
+class ZIndexManager {
+ constructor() {
+ this.floatingAreas = new Map() // 浮动区域层级管理
+ this.dockIndicators = new Set() // 停靠指示器层级
+ this.modalCount = 0 // 模态框计数器
+ }
+
+ /**
+ * 获取浮动区域的z-index
+ * @param {string} areaId - 区域ID
+ * @param {boolean} isActive - 是否为活跃状态
+ * @returns {number} z-index值
+ */
+ getFloatingAreaZIndex(areaId, isActive = false) {
+ if (isActive) {
+ return this.floatingAreas.get(areaId) || Z_INDEX_LAYERS.FLOATING_AREA_ACTIVE
+ }
+
+ // 为新区域分配z-index
+ if (!this.floatingAreas.has(areaId)) {
+ const maxZIndex = Math.max(...Array.from(this.floatingAreas.values()), Z_INDEX_LAYERS.FLOATING_AREA)
+ const newZIndex = maxZIndex + 1
+ this.floatingAreas.set(areaId, newZIndex)
+ return newZIndex
+ }
+
+ return this.floatingAreas.get(areaId)
+ }
+
+ /**
+ * 激活浮动区域(将其置于最顶层)
+ * @param {string} areaId - 区域ID
+ */
+ activateFloatingArea(areaId) {
+ // 获取当前最大z-index
+ const maxZIndex = Math.max(...Array.from(this.floatingAreas.values()), Z_INDEX_LAYERS.FLOATING_AREA)
+ this.floatingAreas.set(areaId, maxZIndex + 1)
+
+ // 触发重排以确保层级生效
+ this.reorderFloatingAreas()
+ }
+
+ /**
+ * 重新排序浮动区域层级
+ */
+ reorderFloatingAreas() {
+ const areas = Array.from(this.floatingAreas.entries())
+ areas.sort((a, b) => a[1] - b[1]) // 按z-index排序
+
+ areas.forEach(([areaId], index) => {
+ this.floatingAreas.set(areaId, Z_INDEX_LAYERS.FLOATING_AREA + index + 1)
+ })
+ }
+
+ /**
+ * 移除浮动区域
+ * @param {string} areaId - 区域ID
+ */
+ removeFloatingArea(areaId) {
+ this.floatingAreas.delete(areaId)
+ this.reorderFloatingAreas()
+ }
+
+ /**
+ * 获取停靠指示器的z-index
+ * @param {string} indicatorType - 指示器类型
+ * @returns {number} z-index值
+ */
+ getDockIndicatorZIndex(indicatorType = 'default') {
+ return Z_INDEX_LAYERS.DOCK_INDICATOR
+ }
+
+ /**
+ * 获取拖拽预览的z-index
+ * @returns {number} z-index值
+ */
+ getDragPreviewZIndex() {
+ return Z_INDEX_LAYERS.DRAG_PREVIEW
+ }
+
+ /**
+ * 获取模态框的z-index
+ * @returns {number} z-index值
+ */
+ getModalZIndex() {
+ this.modalCount++
+ return Z_INDEX_LAYERS.MODAL + this.modalCount
+ }
+
+ /**
+ * 释放模态框z-index
+ */
+ releaseModalZIndex() {
+ if (this.modalCount > 0) {
+ this.modalCount--
+ }
+ }
+
+ /**
+ * 重置所有z-index(用于调试或清理)
+ */
+ resetAll() {
+ this.floatingAreas.clear()
+ this.dockIndicators.clear()
+ this.modalCount = 0
+ }
+
+ /**
+ * 获取当前状态信息(用于调试)
+ */
+ getStatus() {
+ return {
+ floatingAreas: Object.fromEntries(this.floatingAreas),
+ dockIndicators: Array.from(this.dockIndicators),
+ modalCount: this.modalCount
+ }
+ }
+}
+
+// 创建全局实例
+const zIndexManager = new ZIndexManager()
+
+// 导出管理器实例和相关常量
+export { zIndexManager }
+export default zIndexManager
\ No newline at end of file