feat: 优化电缆规格显示和更新项目配置

- GUI电缆规格表格新增'是否为可选'列,支持显示可选电缆标识
- 修复信息容器初始化问题,确保提示文本正确显示
- 更新使用说明文档,修正适用对象和技术支持信息
- 添加项目配置文件(.gitignore, .python-version, pyproject.toml, uv.lock)
- 添加版本管理脚本(make_version.py)
- 添加Excel数据文件和使用说明PDF文档
This commit is contained in:
dmy
2026-01-06 10:01:11 +08:00
parent 67b1f55b92
commit db6114ef57
10 changed files with 2347 additions and 6 deletions

14
gui.py
View File

@@ -164,6 +164,12 @@ def index():
"field": "cost",
"align": "center",
},
{
"name": "is_optional",
"label": "是否为可选",
"field": "is_optional",
"align": "center",
},
]
rows = []
for spec in state["cable_specs"]:
@@ -174,6 +180,7 @@ def index():
"capacity": spec[1],
"resistance": spec[2],
"cost": spec[3],
"is_optional": "Y" if len(spec) > 4 and spec[4] else "",
}
)
ui.table(columns=columns, rows=rows).classes("w-full").props(
@@ -914,9 +921,10 @@ def index():
.style("max-height: 400px; overflow-y: auto;")
):
refs["info_container"] = ui.column().classes("w-full")
ui.label("请上传 Excel 文件以查看系统参数和电缆规格...").classes(
"text-gray-500 italic"
)
with refs["info_container"]:
ui.label("请上传 Excel 文件以查看系统参数和电缆规格...").classes(
"text-gray-500 italic"
)
with ui.card().classes("w-full p-4 shadow-md"):
ui.label("方案对比结果 (点击行查看拓扑详情)").classes(