Commit c5a86c74 by 江名洋

refactor(ui): 简化导航栏为平铺结构并移除数据上传功能

1 parent 33316239
......@@ -185,9 +185,9 @@ async def run_dw_sync_get(
async def download_analysis_template(template_type: str):
"""下载分析模板文件"""
template_map = {
"store": "门店数据-模板.xlsx",
"store": "门店数据-模板0625.xlsx",
"factory": "主机厂数据-模板.xlsx",
"output": "输出-问界生态系数生态(5.25-6.14).xlsx",
"output": "输出-问界生态系数-模板0625.xlsx",
}
filename = template_map.get(template_type)
if not filename:
......
......@@ -52,48 +52,6 @@ header {
background-color: #34495e;
}
/* 下拉菜单样式 */
.nav-dropdown {
position: relative;
}
.nav-dropdown-menu {
display: none;
position: absolute;
top: 100%;
left: 0;
min-width: 180px;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
padding: 4px 0;
z-index: 200;
list-style: none;
}
.nav-dropdown-menu.show {
display: block;
}
.nav-sub-item {
padding: 10px 20px;
cursor: pointer;
color: #333;
font-size: 14px;
white-space: nowrap;
transition: all 0.2s;
}
.nav-sub-item:hover {
background-color: #f0f2f5;
color: #1890ff;
}
.nav-sub-item.active-sub {
background-color: #e6f7ff;
color: #1890ff;
}
/* 主体内容布局(全宽,无侧边栏) */
main {
flex: 1;
......
......@@ -12,26 +12,13 @@
<link rel="stylesheet" href="static/css/style.css">
</head>
<body>
<!-- 顶部导航栏:所有入口集中在下拉菜单中 -->
<!-- 顶部导航栏:所有入口平铺展示 -->
<header>
<div class="logo">问界运营分析平台</div>
<nav class="nav-links">
<!-- 任务调度下拉 -->
<div class="nav-item nav-dropdown" data-module="task">
<span class="nav-dropdown-label">任务调度 ▾</span>
<ul class="nav-dropdown-menu">
<li class="nav-sub-item" data-section="ods">ODS 同步任务</li>
<li class="nav-sub-item" data-section="dw">DWS/DWM/DWA 任务</li>
</ul>
</div>
<!-- 数据分析下拉 -->
<div class="nav-item nav-dropdown" data-module="analysis">
<span class="nav-dropdown-label">数据分析 ▾</span>
<ul class="nav-dropdown-menu">
<li class="nav-sub-item" data-section="upload">数据上传</li>
<li class="nav-sub-item" data-section="analysis-modal">模板分析</li>
</ul>
</div>
<div class="nav-item active" data-section="ods">ODS 同步任务</div>
<div class="nav-item" data-section="dw">DWS/DWM/DWA 任务</div>
<div class="nav-item" data-section="analysis-modal">模板分析</div>
</nav>
<div class="user-info">管理员</div>
</header>
......@@ -106,64 +93,9 @@
</table>
</div>
<!-- 数据上传部分 -->
<div id="data-upload-section" style="display:none;">
<div style="background: #fff; border: 1px dashed #d9d9d9; padding: 30px; text-align: center; border-radius: 8px; margin-bottom: 20px;">
<input type="file" id="excel-file" style="display: none;" accept=".xlsx, .xls">
<div id="drop-zone" style="cursor: pointer;">
<div style="font-size: 40px; color: #1890ff; margin-bottom: 10px;">📤</div>
<p id="file-display-name">点击或将 Excel 文件拖拽到此处上传</p>
<p style="font-size: 12px; color: #999;">支持 .xlsx, .xls 格式</p>
</div>
</div>
<div class="upload-form" style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #fafafa; padding: 20px; border-radius: 8px;">
<div>
<label style="display: block; margin-bottom: 8px; font-weight: bold;">上传模式:</label>
<select id="upload-mode-select" style="width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;">
<option value="dynamic">智能分析模式 (LLM 自动识别结构)</option>
<option value="ods">固定表模式 (ODS 层同步)</option>
</select>
</div>
<div id="ods-table-select-div" style="display:none;">
<label style="display: block; margin-bottom: 8px; font-weight: bold;">目标 ODS 表:</label>
<select id="upload-table-name" style="width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;">
<option value="ods_staff_daily_report_huawei">员工日报华为表 (ODS)</option>
<option value="ods_goods_order">商品订单主表 (ODS)</option>
<option value="ods_host_plant_delivery">主机厂交付数据 (ODS)</option>
</select>
</div>
<div id="dynamic-type-select-div">
<label style="display: block; margin-bottom: 8px; font-weight: bold;">分析数据类型:</label>
<select id="upload-type-select" style="width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;">
<option value="分析的门店列表">分析的门店列表</option>
<option value="主机厂数据表">主机厂数据表</option>
<option value="赔付方案数据表">赔付方案数据表</option>
</select>
</div>
<div>
<label style="display: block; margin-bottom: 8px; font-weight: bold;">版本标识 (可选):</label>
<input type="text" id="upload-version-tag" placeholder="如: 202406_v1" style="width: 100%; padding: 8px; border: 1px solid #d9d9d9; border-radius: 4px;">
</div>
</div>
<div style="margin-top: 20px; text-align: center;">
<button id="btn-do-upload" style="padding: 10px 40px; background: #52c41a; color: white; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: all 0.3s;">
开始解析并上传
</button>
</div>
<div id="upload-status-tip" style="margin-top: 20px; display: none; padding: 15px; background: #e6f7ff; border: 1px solid #91d5ff; border-radius: 4px;">
<span style="color: #1890ff;">ℹ️ 正在处理中,您可以前往"数据目录"查看已生成的表。</span>
</div>
</div>
<!-- 数据分析部分 -->
<div id="data-analysis-section" style="display:none;">
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
<div style="display: flex; flex-direction: column; gap: 20px; margin-bottom: 20px;">
<!-- 步骤1: 上传门店列表 -->
<div style="background: #f8f9fa; padding: 20px; border-radius: 8px; border: 1px solid #e8e8e8;">
<h3 style="margin:0 0 12px; font-size:16px; color:#333;">步骤1: 上传门店列表</h3>
......
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!