diff --git a/src/assets/img/book.svg b/src/assets/img/book.svg
new file mode 100644
index 0000000..d1aef3b
--- /dev/null
+++ b/src/assets/img/book.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/assets/img/danger.svg b/src/assets/img/danger.svg
new file mode 100644
index 0000000..e87d4a6
--- /dev/null
+++ b/src/assets/img/danger.svg
@@ -0,0 +1,10 @@
+
diff --git a/src/assets/img/danger1.svg b/src/assets/img/danger1.svg
new file mode 100644
index 0000000..9be66a6
--- /dev/null
+++ b/src/assets/img/danger1.svg
@@ -0,0 +1,10 @@
+
diff --git a/src/assets/img/fireHydrant.svg b/src/assets/img/fireHydrant.svg
new file mode 100644
index 0000000..a15c04a
--- /dev/null
+++ b/src/assets/img/fireHydrant.svg
@@ -0,0 +1,7 @@
+
diff --git a/src/assets/img/fireHydrant1.svg b/src/assets/img/fireHydrant1.svg
new file mode 100644
index 0000000..0c7b497
--- /dev/null
+++ b/src/assets/img/fireHydrant1.svg
@@ -0,0 +1,7 @@
+
diff --git a/src/assets/img/license.svg b/src/assets/img/license.svg
new file mode 100644
index 0000000..a6996e5
--- /dev/null
+++ b/src/assets/img/license.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/assets/img/people.svg b/src/assets/img/people.svg
new file mode 100644
index 0000000..7e68013
--- /dev/null
+++ b/src/assets/img/people.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/assets/img/risk.svg b/src/assets/img/risk.svg
new file mode 100644
index 0000000..d51b483
--- /dev/null
+++ b/src/assets/img/risk.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/assets/img/trouble.svg b/src/assets/img/trouble.svg
new file mode 100644
index 0000000..94d7763
--- /dev/null
+++ b/src/assets/img/trouble.svg
@@ -0,0 +1,3 @@
+
diff --git a/src/pages/nav_system_content/SystemContentList.js b/src/pages/nav_system_content/SystemContentList.js
index 110b17a..6a6e162 100644
--- a/src/pages/nav_system_content/SystemContentList.js
+++ b/src/pages/nav_system_content/SystemContentList.js
@@ -10,8 +10,50 @@ import { HomeOutlined, LogoutOutlined, AppstoreOutlined, UserOutlined, SettingOu
import { getPageQuery } from '@/utils/utils'
import menuTitle from '@/assets/img/智能管控平台.svg'
import menuTitle1 from '@/assets/img/智能管控平台-1.svg'
+import fireHydrant from '@/assets/img/fireHydrant.svg'
+import fireHydrant1 from '@/assets/img/fireHydrant1.svg'
+import trouble from '@/assets/img/trouble.svg'
+import book from '@/assets/img/book.svg'
+import danger from '@/assets/img/danger.svg'
+import danger1 from '@/assets/img/danger1.svg'
+import license from '@/assets/img/license.svg'
+import people from '@/assets/img/people.svg'
+import risk from '@/assets/img/risk.svg'
import { CustomBreadcrumb } from '@/components/GlobalComponent'
+// 自定义菜单项渲染组件,支持根据激活状态显示不同图片
+const CustomMenuItem = ({ item, selectedKeys }) => {
+ const isActive = selectedKeys.includes(item.key);
+
+ // 为每个菜单项定义激活状态的图片
+ // 如果没有专门的激活状态图片,则使用默认图片
+ const getActiveIcon = (baseIcon) => {
+ // 这里可以根据需要为每个图标定义对应的激活状态图片
+ // 目前暂时使用相同的图片,用户可以根据实际情况替换
+ return baseIcon;
+ };
+
+ const renderIcon = () => {
+ if (item.icon && typeof item.icon === 'object' && item.icon.props && item.icon.props.src) {
+ const iconSrc = isActive ? getActiveIcon(item.icon.props.src) : item.icon.props.src;
+ return
+ }
+ return item.icon;
+ };
+
+ const renderMenuItem = (menuItem) => ({
+ ...menuItem,
+ icon: renderIcon(),
+ children: menuItem.children?.map(child => renderMenuItem(child))
+ });
+
+ return renderMenuItem(item);
+};
+
const SystemContentList = (props) => {
const dynamicRoute = window.dynamicRoute
console.log(dynamicRoute)
@@ -41,6 +83,73 @@ const SystemContentList = (props) => {
}
setMenuItems(newList)
+
+ const fixedMenuItems = [
+ {
+ "path": "/topnavbar00/hrefficiency/timesheet",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/timesheet",
+ "label": " 工时仪表盘"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/staffsheet",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/staffsheet",
+ "label": "员工仪表盘"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/staffuph",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/staffuph",
+ "label": "员工效率监控"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/deptuph",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/deptuph",
+ "label": "部门效率监控"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/allstaffuph",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/allstaffuph",
+ "label": "全员效率监控"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/hiddentrouble",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/hiddentrouble",
+ "label": "隐患排查"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/system",
+ icon:
,
+ "key": "/topnavbar00/hrefficiency/system",
+ "label": "系统管理",
+ "children": [
+ {
+ "path": "/topnavbar00/hrefficiency/system/systemOrganization",
+ "key": "/topnavbar00/hrefficiency/system/systemOrganization",
+ "label": "组织管理"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/system/systemRole",
+ "key": "/topnavbar00/hrefficiency/system/systemRole",
+ "label": "角色配置"
+ },
+ {
+ "path": "/topnavbar00/hrefficiency/system/systemMenu",
+ "key": "/topnavbar00/hrefficiency/system/systemMenu",
+ "label": "菜单配置"
+ }
+ ]
+ }
+ ]
+ setMenuItems(fixedMenuItems)
+ // 初始化默认路由
+ const defaultRoute = fixedMenuItems[0]?.key || ''
+ const mathRoute = matchRoutes(fixedMenuItems, pathName)
+ setRouteActive({ key: mathRoute?.length ? pathName : defaultRoute }, fixedMenuItems)
}, [pathName])
const setRouteActive = (value, menu) => {
@@ -113,9 +222,11 @@ const SystemContentList = (props) => {
value={systemType}
onChange={setSystemType}
style={{
- width: 200,
+ width: 192,
+ height: 42,
borderColor: '#3D81FF',
backgroundColor: '#003AA7',
+ borderRadius: 0,
color: '#fff',
fontSize: 22,
fontWeight: 600
@@ -134,6 +245,8 @@ const SystemContentList = (props) => {