This commit is contained in:
Wyle.Gong-巩文昕
2025-04-23 11:21:08 +08:00
parent fc643727f3
commit 7a1aae1e2f
135 changed files with 221483 additions and 1 deletions
+659
View File
@@ -0,0 +1,659 @@
body {
font-family: "Microsoft YaHei", sans-serif;
margin: 0;
padding: 0;
overflow: hidden;
}
body .container {
display: flex;
height: 100vh;
}
body .sidebar {
width: 300px;
background-color: #f5f5f5;
border-right: 1px solid #e0e0e0;
display: flex;
flex-direction: column;
overflow: hidden;
position: absolute;
/* 改为绝对定位 */
left: 0;
top: 0;
bottom: 0;
z-index: 100;
transition: transform 0.3s ease;
}
body .sidebar.collapsed {
transform: translateX(-300px);
/* 折叠时向左移动 */
}
body .sidebar-toggle {
position: absolute;
left: 300px;
/* 位于侧边栏右侧 */
top: 50%;
transform: translateY(-50%);
width: 24px;
height: 50px;
background-color: #f5f5f5;
border: 1px solid #e0e0e0;
border-left: none;
border-radius: 0 4px 4px 0;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 101;
transition: left 0.3s ease;
}
.sidebar.collapsed+.sidebar-toggle {
left: 0;
/* 侧边栏折叠时,按钮位置调整 */
}
.sidebar-header {
padding: 16px;
border-bottom: 1px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
}
.sidebar-title {
font-size: 18px;
font-weight: bold;
margin: 0;
}
body .sidebar-content {
flex: 1;
overflow-y: auto;
padding: 16px;
}
body .node-list {
list-style: none;
padding: 0;
margin: 0;
}
body .node-item {
padding: 12px;
margin-bottom: 8px;
background-color: white;
border: 1px solid #d9d9d9;
border-radius: 4px;
cursor: move;
transition: all 0.3s;
}
body .node-item:hover {
border-color: #1890ff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}
body .node-name {
font-weight: 500;
margin-bottom: 4px;
}
body .node-info {
font-size: 12px;
color: #666;
}
.loading-overlay {
position: fixed;
/* Cover the entire viewport */
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
/* Semi-transparent black */
display: none;
/* Initially hidden */
justify-content: center;
align-items: center;
flex-direction: column;
/* Stack spinner and text vertically */
z-index: 9999;
/* Ensure it's on top of everything */
color: white;
}
.loading-overlay.visible {
display: flex;
/* Show the overlay */
}
/* Simple CSS Spinner */
.spinner {
border: 4px solid rgba(255, 255, 255, 0.3);
/* Light border */
border-left-color: #ffffff;
/* White spinner color */
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin-bottom: 15px;
/* Space between spinner and text */
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.graph-container {
flex: 1;
position: absolute;
/* 改为绝对定位 */
left: 0;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
.toolbar {
position: absolute;
top: 16px;
right: 16px;
z-index: 10;
display: flex;
gap: 8px;
}
.btn {
padding: 8px 16px;
background-color: #1890ff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
.btn:hover {
background-color: #40a9ff;
}
.btn-danger {
background-color: #ff4d4f;
}
.btn-danger:hover {
background-color: #ff7875;
}
.loading {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(255, 255, 255, 0.7);
display: flex;
justify-content: center;
align-items: center;
z-index: 2000;
}
.spinner {
border: 4px solid #f3f3f3;
border-top: 4px solid #1890ff;
border-radius: 50%;
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
body .empty-state {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #999;
}
body .node rect {
fill: #fff;
stroke: #1890ff;
stroke-width: 1.5px;
rx: 4;
ry: 4;
cursor: pointer;
}
body .node text {
font: 14px sans-serif;
text-anchor: middle;
dominant-baseline: middle;
pointer-events: none;
}
body .node .selected rect {
stroke: #ff4d4f;
stroke-width: 2px;
}
body .link {
stroke: #cacaca;
stroke-width: 1.5px;
marker-end: url(#arrowhead);
stroke-linecap: round;
cursor: pointer;
z-index: -1;
}
body .link-hitbox {
stroke: transparent;
stroke-width: 15px;
cursor: pointer;
pointer-events: stroke;
z-index: 100;
}
body .link-handle {
fill: #1890ff;
cursor: pointer;
}
body .modal {
display: none;
position: fixed;
top: 0;
left: 0;
height: 100%;
width: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
justify-content: center;
align-items: center;
}
body .modal-content {
background-color: white;
padding: 24px;
border-radius: 4px;
width: 500px;
max-width: 90%;
max-height: 90%;
overflow: auto;
}
body .modal-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
body .modal-title {
font-size: 18px;
font-weight: bold;
}
body .close {
font-size: 24px;
cursor: pointer;
}
body .form-group {
margin-bottom: 16px;
}
body .form-label {
display: block;
margin-bottom: 8px;
font-weight: 500;
}
body .form-input {
width: 100%;
padding: 8px 12px;
border: 1px solid #d9d9d9;
border-radius: 4px;
box-sizing: border-box;
}
body .form-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
margin-top: 24px;
}
body .zoom-controls {
position: absolute;
left: 16px;
bottom: 16px;
display: flex;
flex-direction: column;
gap: 8px;
z-index: 10;
transition: left 0.3s ease;
/* 添加过渡效果 */
}
.sidebar.collapsed~.graph-container .zoom-controls {
left: 16px;
/* 保持原位置 */
}
/* 侧边栏展开时的样式 */
.sidebar:not(.collapsed)~.graph-container .zoom-controls {
left: 316px;
/* 300px(侧边栏宽度) + 16px(原来的左边距) */
}
.zoom-btn {
width: 36px;
height: 36px;
background: white;
border: 1px solid #d9d9d9;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 18px;
cursor: pointer;
user-select: none;
}
.zoom-btn:hover {
border-color: #1890ff;
color: #1890ff;
}
.stage-info {
position: absolute;
top: 16px;
left: 16px;
background: white;
padding: 8px 16px;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
z-index: 10;
transition: left 0.3s ease;
/* 添加过渡效果 */
}
.sidebar.collapsed~.graph-container .stage-info {
left: 16px;
/* 保持原位置 */
}
/* 侧边栏展开时的样式 */
.sidebar:not(.collapsed)~.graph-container .stage-info {
left: 316px;
/* 300px(侧边栏宽度) + 16px(原来的左边距) */
}
.stage-name {
font-weight: bold;
margin-bottom: 4px;
}
body .stage-level {
font-size: 12px;
color: #666;
}
body .node rect.selected {
stroke: #ff4d4f;
stroke-width: 2px;
}
body .link.selected {
stroke: #ff4d4f;
marker-end: url(#arrowhead-selected);
/* stroke-width: 2.5px;*/
}
body .connection-point {
fill: #1890ff;
stroke: white;
stroke-width: 2px;
cursor: pointer;
opacity: 0.05;
}
body .connection-point .point-hidden {
visibility: hidden;
}
body .connection-point:hover {
opacity: 1;
}
body .dragline {
stroke: #1890ff;
stroke-width: 2px;
stroke-dasharray: 5, 5;
}
/* 添加箭头样式 */
body .link {
stroke: #cacaca;
stroke-width: 1.5px;
marker-end: url(#arrowhead);
}
body .node rect.highlight {
stroke: #1890ff;
stroke-width: 2.5px;
stroke-dasharray: 5, 3;
}
body .mouse-position {
position: absolute;
bottom: 16px;
right: 16px;
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid #d9d9d9;
border-radius: 4px;
padding: 8px 12px;
font-size: 12px;
font-family: monospace;
z-index: 1000;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
min-width: 200px;
}
body .mouse-position-title {
font-weight: bold;
margin-bottom: 4px;
color: #1890ff;
}
body .mouse-position-data {
display: grid;
grid-template-columns: 80px 1fr;
gap: 4px;
}
body .mouse-position-label {
color: #666;
}
/* 组件节点样式 */
/* 节点类别样式 */
body .node-category {
margin-bottom: 16px;
}
body .category-header {
user-select: none;
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
margin-bottom: 8px;
border-bottom: 1px solid #e8e8e8;
cursor: pointer;
}
body .category-title {
user-select: none;
margin: 0;
font-size: 16px;
font-weight: 500;
color: #333;
}
body .category-toggle {
user-select: none;
color: #999;
font-size: 12px;
}
body .category-content {
padding-left: 8px;
}
/* 节点类型项目样式 */
body .node-type-item {
display: flex;
align-items: center;
padding: 10px;
margin-bottom: 8px;
background-color: white;
border: 1px solid #d9d9d9;
border-radius: 4px;
cursor: move;
transition: all 0.3s;
}
body .node-type-item:hover {
border-color: #1890ff;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.09);
}
body .node-type-icon {
width: 24px;
height: 24px;
margin-right: 12px;
border: 2px solid;
display: flex;
align-items: center;
justify-content: center;
}
body .node-type-icon.rect {
border-radius: 3px;
}
body .node-type-icon.circle {
border-radius: 50%;
}
body .node-type-icon.diamond {
transform: rotate(45deg);
border-radius: 2px;
}
body .node-type-name {
flex: 1;
font-size: 14px;
}
/* 不同形状节点的样式 */
body .node polygon {
fill: #fff;
stroke-width: 1.5px;
}
body .node polygon.selected,
body .node circle.selected {
stroke: #ff4d4f;
stroke-width: 2px;
}
/* 侧边栏分类标记 */
body .category-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 10px;
font-size: 10px;
margin-left: 6px;
color: white;
background-color: #8c8c8c;
vertical-align: middle;
}
body .category-badge.logic {
background-color: #722ed1;
}
body .category-badge.request {
background-color: #52c41a;
}
body .node .node-body.selected,
body .node .icon-circle-bg.selected {
/* 如果你想让图标圆也变红 */
stroke: #ff4d4f !important;
/* 使用 !important 强制覆盖 */
stroke-width: 2.5px !important;
}
/* 用于拖拽连接线时高亮目标 */
body .node .node-body.highlight-target,
body .node .icon-circle-bg.highlight-target {
stroke: #40a9ff !important;
/* 目标高亮颜色 */
stroke-width: 2.5px !important;
stroke-dasharray: 5, 3;
}
/* 确保连接点在节点上方 */
body .connection-point {
z-index: 10;
}
body .node-main-shape {
transition: stroke 0.2s ease, stroke-width 0.2s ease;
/* 平滑过渡 */
}
/* 图标文字样式 */
body .icon-text {
font-family: sans-serif;
pointer-events: none;
/* 不干扰鼠标事件 */
user-select: none;
/* 禁止选中文本 */
}
body .node-icon-image {
background-color: #fff;
}