1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| import streamlit as st
| from app.pages.sorting_dashboard import show_sorting_dashboard
| from app.pages.extruder_dashboard import show_extruder_dashboard
| from app.pages.main_process_dashboard import show_main_process_dashboard
| from app.pages.comprehensive_dashboard import show_comprehensive_dashboard
|
| # 设置页面配置
| st.set_page_config(
| page_title="数据分析系统",
| page_icon="📊",
| layout="wide"
| )
|
| # 定义页面
| sorting_page = st.Page(
| show_sorting_dashboard,
| title="分拣磅秤",
| icon="⚖️",
| url_path="sorting"
| )
|
| extruder_page = st.Page(
| show_extruder_dashboard,
| title="挤出机",
| icon="🏭",
| url_path="extruder"
| )
|
| main_process_page = st.Page(
| show_main_process_dashboard,
| title="主流程控制",
| icon="⚙️",
| url_path="main_process"
| )
|
| comprehensive_page = st.Page(
| show_comprehensive_dashboard,
| title="综合分析",
| icon="🌐",
| url_path="comprehensive"
| )
|
| # 侧边栏页脚信息
| def show_footer():
| st.sidebar.markdown("---")
| st.sidebar.markdown("© 2026 数据分析系统")
|
| # 导航配置
| pg = st.navigation({
| "综合分析": [comprehensive_page],
| "分项分析": [sorting_page, extruder_page, main_process_page]
| })
|
| # 运行导航
| pg.run()
|
| # 显示页脚
| show_footer()
|
|