ota 拓展功能-黑名单&灰色定向上线

This commit is contained in:
eafonyang
2026-06-30 18:15:25 +08:00
parent 08da279275
commit 864040f45b
16 changed files with 1872 additions and 9 deletions
+13 -3
View File
@@ -69,6 +69,14 @@
<el-icon><Document /></el-icon>
<span>OTA 管理</span>
</el-menu-item>
<el-menu-item index="/blacklist">
<el-icon><Warning /></el-icon>
<span>黑名单管理</span>
</el-menu-item>
<el-menu-item index="/ota-target-device">
<el-icon><Aim /></el-icon>
<span>定向升级</span>
</el-menu-item>
</el-sub-menu>
<el-sub-menu index="share-code">
<template #title>
@@ -145,7 +153,7 @@
import { computed, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { Headset, Collection, List, Upload, Document, Share, User } from '@element-plus/icons-vue'
import { Headset, Collection, List, Upload, Document, Share, User, Warning, Aim } from '@element-plus/icons-vue'
import { clearAuth, getUser, isSuperAdmin } from '@/utils/auth'
import TabsView from '@/components/TabsView.vue'
import SidebarLogo from '@/components/SidebarLogo.vue'
@@ -165,7 +173,7 @@ const changePasswordVisible = ref(false)
function resolveOpenedMenus(path) {
if (path.startsWith('/brand') || path.startsWith('/model')) return ['1']
if (path.startsWith('/ota')) return ['upgrade']
if (path.startsWith('/ota') || path.startsWith('/blacklist') || path.startsWith('/ota-target-device')) return ['upgrade']
if (path.startsWith('/share-code')) return ['share-code']
return []
}
@@ -182,6 +190,8 @@ const railNavItems = [
{ path: '/brand', title: '品牌管理', icon: Collection },
{ path: '/model', title: '型号管理', icon: List },
{ path: '/ota', title: 'OTA 管理', icon: Document },
{ path: '/blacklist', title: '黑名单', icon: Warning },
{ path: '/ota-target-device', title: '定向升级', icon: Aim },
{ path: '/share-code/log', title: '分享日志', icon: Share }
]
@@ -194,7 +204,7 @@ const breadcrumbTitle = computed(() => {
const breadcrumbSection = computed(() => {
const path = route.path || ''
if (path.startsWith('/brand') || path.startsWith('/model')) return '耳机管理'
if (path.startsWith('/ota')) return '升级管理'
if (path.startsWith('/ota') || path.startsWith('/blacklist') || path.startsWith('/ota-target-device')) return '升级管理'
if (path.startsWith('/share-code')) return '分享码'
if (path.startsWith('/system')) return '系统管理'
return ''