基础功能完整
This commit is contained in:
parent
5bff1a186f
commit
f14501f586
@ -18,24 +18,6 @@ body {
|
||||
}
|
||||
|
||||
/* 顶部工具栏 */
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 44px;
|
||||
padding: 0 12px;
|
||||
background: linear-gradient(to bottom, #fdfdfd, #e8e8e8);
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toolbar-left,
|
||||
.toolbar-center,
|
||||
.toolbar-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.app-title {
|
||||
font-weight: 600;
|
||||
@ -141,6 +123,22 @@ body {
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.tree-header-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.tree-header-actions .icon-btn {
|
||||
padding: 0 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.tree-header-actions .icon-btn:hover {
|
||||
background: #e5f1fb;
|
||||
color: #0078d4;
|
||||
}
|
||||
|
||||
.tree-content {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
@ -554,10 +552,10 @@ body.mode-readonly .row-btn:not(.view) {
|
||||
/* ===== 工具栏(分组处理) ===== */
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
gap: 6px 4px;
|
||||
min-height: 46px;
|
||||
padding: 4px 8px;
|
||||
padding: 5px 8px;
|
||||
background: linear-gradient(to bottom, #fdfdfd, #eaeaea);
|
||||
border-bottom: 1px solid #c0c0c0;
|
||||
flex-shrink: 0;
|
||||
@ -571,6 +569,11 @@ body.mode-readonly .row-btn:not(.view) {
|
||||
gap: 6px;
|
||||
padding: 2px 10px;
|
||||
border-right: 1px solid #d5d5d5;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.tool-group:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.tool-group .group-label {
|
||||
@ -591,10 +594,6 @@ body.mode-readonly .row-btn:not(.view) {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.dim-empty {
|
||||
color: #8aa;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.dim-item {
|
||||
display: flex;
|
||||
|
||||
@ -33,11 +33,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tool-group" title="配置操作">
|
||||
<span class="group-label">配置</span>
|
||||
<button id="btn-add-config" class="toolbar-btn" title="新增配置项">➕ 新增</button>
|
||||
<button id="btn-collapse-all" class="toolbar-btn" title="全部折叠">⊟ 折叠</button>
|
||||
</div>
|
||||
|
||||
<div class="tool-group" title="数据操作">
|
||||
<span class="group-label">数据</span>
|
||||
@ -49,7 +44,7 @@
|
||||
|
||||
<!-- 维度栏:展示已启用维度的筛选器与映射配置入口 -->
|
||||
<div class="dimension-bar" id="dimension-bar">
|
||||
<span class="dim-empty" id="dim-empty">选择项目后展示维度筛选</span>
|
||||
|
||||
<div class="dim-item" id="dim-idc" style="display:none">
|
||||
<span class="dim-name">机房</span>
|
||||
<select class="dim-select" id="dim-idc-select"></select>
|
||||
@ -74,6 +69,10 @@
|
||||
<aside class="tree-panel" id="tree-panel">
|
||||
<div class="tree-header">
|
||||
<span>配置树</span>
|
||||
<div class="tree-header-actions">
|
||||
<button id="btn-add-config" class="icon-btn" title="新增配置项">➕</button>
|
||||
<button id="btn-collapse-all" class="icon-btn" title="全部折叠">⊟</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tree-content" id="tree-content">
|
||||
<div class="tree-empty">请先选择一个项目</div>
|
||||
|
||||
@ -174,7 +174,6 @@ function collectDimValues(field) {
|
||||
*/
|
||||
function renderDimensionBar() {
|
||||
const p = state.currentProject;
|
||||
const empty = document.getElementById("dim-empty");
|
||||
const mappingBtn = document.getElementById("btn-dim-mapping");
|
||||
const items = [
|
||||
{ key: "idc", enable: "enableIdc", mapping: "idcMapping", field: "idc", box: "dim-idc", sel: "dim-idc-select", map: "dim-idc-mapping" },
|
||||
@ -183,14 +182,12 @@ function renderDimensionBar() {
|
||||
];
|
||||
|
||||
if (!p) {
|
||||
empty.style.display = "";
|
||||
mappingBtn.style.display = "none";
|
||||
items.forEach((it) => (document.getElementById(it.box).style.display = "none"));
|
||||
return;
|
||||
}
|
||||
|
||||
const anyEnabled = p.enableIdc || p.enableEnvironment || p.enableGroup;
|
||||
empty.style.display = anyEnabled ? "none" : "";
|
||||
mappingBtn.style.display = anyEnabled ? "" : "none";
|
||||
|
||||
items.forEach((it) => {
|
||||
|
||||
@ -14,8 +14,8 @@ const PORT = process.env.PORT || 3000;
|
||||
// 解析 JSON 请求体
|
||||
app.use(express.json());
|
||||
|
||||
// 静态资源服务
|
||||
app.use(express.static(path.join(__dirname, "..", "public")));
|
||||
// 静态资源服务(禁用缓存,避免浏览器加载到旧版本页面/脚本)
|
||||
app.use(express.static(path.join(__dirname, "..", "public"), { etag: false, lastModified: false, cacheControl: false, setHeaders: (res) => res.setHeader("Cache-Control", "no-store") }));
|
||||
|
||||
// API 路由
|
||||
app.use("/api/projects", projectRoutes);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user