2026-08-28 15:06:01 +08:00
|
|
|
|
<script setup>
|
2026-08-31 18:54:15 +08:00
|
|
|
|
import { ref, computed, onMounted, onBeforeUnmount, watch } from 'vue'
|
2026-08-28 15:06:01 +08:00
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
2026-10-31 15:41:27 +08:00
|
|
|
|
import { ElMessage, ElNotification } from 'element-plus'
|
2026-08-28 15:06:01 +08:00
|
|
|
|
import {
|
2026-10-14 17:24:59 +08:00
|
|
|
|
HomeFilled, Download, Upload, Search, CircleCheck, List, Bell,
|
2026-11-04 19:06:03 +08:00
|
|
|
|
Box, Monitor, EditPen, Fold, Expand, Location, Goods, Key, Operation, Van, Clock, RefreshLeft, Folder, WarningFilled, Tools, Setting, Tickets
|
2026-08-28 15:06:01 +08:00
|
|
|
|
} from '@element-plus/icons-vue'
|
2026-09-02 14:54:54 +08:00
|
|
|
|
import { getUser, getToken, logout, setSession } from '../utils/auth'
|
|
|
|
|
|
import request from '../utils/request'
|
2026-08-28 15:06:01 +08:00
|
|
|
|
|
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
2026-09-02 14:54:54 +08:00
|
|
|
|
// 当前登录用户(含 permissionCodes),挂载时从 /user/info 刷新
|
|
|
|
|
|
const me = ref(getUser() || {})
|
|
|
|
|
|
const userName = computed(() => me.value?.realName || me.value?.username || '未登录')
|
2026-08-28 15:06:01 +08:00
|
|
|
|
const pageTitle = computed(() => route.meta?.title || '')
|
|
|
|
|
|
|
2026-09-02 14:54:54 +08:00
|
|
|
|
// 菜单按权限码过滤(与 MES 的 defaultMenus + permissionCodes 机制一致)
|
|
|
|
|
|
const permissionCodes = computed(() => me.value?.permissionCodes || [])
|
|
|
|
|
|
|
|
|
|
|
|
async function loadMe() {
|
|
|
|
|
|
try {
|
|
|
|
|
|
const u = await request.get('/user/info')
|
|
|
|
|
|
me.value = u
|
|
|
|
|
|
setSession(getToken(), u) // 刷新本地用户(含最新 permissionCodes/角色)
|
|
|
|
|
|
} catch { /* 用登录时写入的 user 兜底 */ }
|
2026-09-03 14:20:37 +08:00
|
|
|
|
// 幂等初始化 RBAC 种子:权限码与内置角色仅首次创建,已存在则跳过。
|
|
|
|
|
|
// 管理员登录后自动执行,保证前端菜单/角色页有数据。
|
|
|
|
|
|
try {
|
|
|
|
|
|
await request.post('/rbac/seed', {})
|
|
|
|
|
|
} catch { /* 无权限或已初始化,忽略 */ }
|
2026-09-02 14:54:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-31 18:54:15 +08:00
|
|
|
|
// ===== 响应式侧边栏:桌面可折叠,移动端抽屉 =====
|
|
|
|
|
|
const isCollapse = ref(false) // 桌面端折叠(仅图标)
|
|
|
|
|
|
const isMobile = ref(false) // 移动端(≤767px)
|
|
|
|
|
|
const mobileOpen = ref(false) // 移动端抽屉展开
|
|
|
|
|
|
|
|
|
|
|
|
const asideWidth = computed(() => (isMobile.value ? '210px' : isCollapse.value ? '64px' : '210px'))
|
|
|
|
|
|
|
|
|
|
|
|
function toggleAside() {
|
|
|
|
|
|
if (isMobile.value) {
|
|
|
|
|
|
mobileOpen.value = !mobileOpen.value
|
|
|
|
|
|
} else {
|
|
|
|
|
|
isCollapse.value = !isCollapse.value
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function onScreenChange() {
|
|
|
|
|
|
const mq = window.matchMedia('(max-width: 767px)')
|
|
|
|
|
|
isMobile.value = mq.matches
|
|
|
|
|
|
if (!isMobile.value) mobileOpen.value = false
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 路由切换后自动收起移动端抽屉
|
|
|
|
|
|
watch(() => route.path, () => {
|
|
|
|
|
|
if (isMobile.value) mobileOpen.value = false
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
|
onScreenChange()
|
|
|
|
|
|
window.addEventListener('resize', onScreenChange)
|
2026-09-02 14:54:54 +08:00
|
|
|
|
loadMe()
|
2026-10-31 15:41:27 +08:00
|
|
|
|
// 顶部预警铃铛:立即拉一次未读数,随后每 30s 轮询
|
|
|
|
|
|
pollAlerts()
|
|
|
|
|
|
alertTimer = setInterval(pollAlerts, 30000)
|
2026-08-31 18:54:15 +08:00
|
|
|
|
})
|
2026-10-28 10:10:17 +08:00
|
|
|
|
|
2026-10-31 15:41:27 +08:00
|
|
|
|
// 说明:数据归档清理提醒已从顶栏角标移除,统一由「预警中心」承载
|
|
|
|
|
|
// (后端在备份超期时写入 backup_overdue 预警,处理入口为「预警中心」页)。
|
|
|
|
|
|
onBeforeUnmount(() => {
|
|
|
|
|
|
window.removeEventListener('resize', onScreenChange)
|
|
|
|
|
|
if (alertTimer) clearInterval(alertTimer)
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// 顶部预警铃铛未读数。
|
|
|
|
|
|
const unreadAlerts = ref(0)
|
|
|
|
|
|
let alertTimer = null
|
|
|
|
|
|
let alertInited = false
|
|
|
|
|
|
|
|
|
|
|
|
async function pollAlerts() {
|
|
|
|
|
|
try {
|
2026-11-02 19:17:05 +08:00
|
|
|
|
const data = await request.get('/alerts', { params: { status: 'unread', pageSize: 1 } })
|
2026-10-31 15:41:27 +08:00
|
|
|
|
const n = (data && data.unreadCount) || 0
|
|
|
|
|
|
// 首轮仅初始化角标;之后未读数增加时弹提示,避免反复骚扰
|
|
|
|
|
|
if (alertInited && n > unreadAlerts.value) {
|
|
|
|
|
|
ElNotification({
|
|
|
|
|
|
title: '新预警',
|
|
|
|
|
|
message: `有 ${n - unreadAlerts.value} 条新的未读预警,请及时处理`,
|
|
|
|
|
|
type: 'warning',
|
|
|
|
|
|
duration: 5000,
|
|
|
|
|
|
position: 'bottom-right'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
unreadAlerts.value = n
|
|
|
|
|
|
alertInited = true
|
|
|
|
|
|
} catch { /* 忽略轮询异常 */ }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function goAlertCenter() {
|
|
|
|
|
|
router.push('/alert-center')
|
|
|
|
|
|
}
|
2026-08-31 18:54:15 +08:00
|
|
|
|
|
2026-09-04 14:18:53 +08:00
|
|
|
|
// 侧栏菜单:按业务域分组。分组无权限码,子项各自带 code(无 code 的常驻),
|
|
|
|
|
|
// 组内子项全部被过滤掉则整组隐藏。
|
|
|
|
|
|
const topMenu = { path: '/', title: '工作台', icon: HomeFilled, code: 'dashboard:view' }
|
|
|
|
|
|
|
|
|
|
|
|
const menuGroups = [
|
|
|
|
|
|
{
|
2026-11-03 10:17:49 +08:00
|
|
|
|
title: '基础资料', icon: Goods, children: [
|
|
|
|
|
|
{ path: '/material', title: '物料档案', icon: Goods, code: 'material:view' },
|
|
|
|
|
|
{ path: '/zone', title: '区域维护', icon: Location, code: 'zone:view' }
|
2026-09-04 14:18:53 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '仓储作业', icon: Operation, children: [
|
|
|
|
|
|
{ path: '/inbound', title: '入库管理', icon: Download, code: 'inbound:view' },
|
2026-10-05 20:15:38 +08:00
|
|
|
|
{ path: '/finished-inbound', title: '成品入库', icon: Box, code: 'wms.finished:edit' },
|
2026-11-03 10:17:49 +08:00
|
|
|
|
{ path: '/inspection-incoming', title: '来料检验', icon: CircleCheck, code: 'inspection:view' },
|
2026-10-31 15:41:27 +08:00
|
|
|
|
{ path: '/project-outbound', title: '科技项目出库', icon: Upload, code: 'outbound:view' },
|
|
|
|
|
|
{ path: '/general-outbound', title: '通用出库', icon: Upload, code: 'outbound:view' },
|
|
|
|
|
|
{ path: '/outbound', title: '全部出库记录', icon: List, code: 'outbound:view' },
|
2026-10-14 17:24:59 +08:00
|
|
|
|
{ path: '/call-queue', title: '叫料队列', icon: Bell, code: 'call:view' },
|
2026-09-15 16:37:39 +08:00
|
|
|
|
{ path: '/return-order', title: '退库确认', icon: RefreshLeft, code: 'return:view' },
|
2026-11-03 18:29:31 +08:00
|
|
|
|
{ path: '/pallet-workbench', title: '托盘工作台', icon: Box, code: 'return:view' },
|
2026-11-04 19:06:03 +08:00
|
|
|
|
// P1(2026-11-04 用户拍板):备料清单——只读展示"今天及以后×工单×工位×物料×数量"(数据源 MES 日排产实时算)
|
|
|
|
|
|
{ path: '/preparation', title: '备料清单', icon: Tickets, code: 'preparation:view' },
|
2026-11-03 10:17:49 +08:00
|
|
|
|
{ path: '/production-return', title: '生产退不良', icon: WarningFilled, code: 'prodreturn:manage' }
|
2026-09-04 14:18:53 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2026-11-03 10:17:49 +08:00
|
|
|
|
title: '库存管理', icon: Box, children: [
|
|
|
|
|
|
{ path: '/inventory', title: '库存查询', icon: Search, code: 'inventory:view' },
|
|
|
|
|
|
{ path: '/stocktake', title: '库存盘点', icon: List, code: 'stocktake:view' },
|
|
|
|
|
|
{ path: '/semi', title: '半成品管理', icon: Box, code: 'semi:view' }
|
2026-09-04 14:18:53 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
title: '系统管理', icon: Key, children: [
|
|
|
|
|
|
{ path: '/users', title: '账号管理', icon: EditPen, code: 'user:manage' },
|
|
|
|
|
|
{ path: '/roles', title: '角色管理', icon: Key, code: 'role:manage' },
|
2026-09-19 10:54:15 +08:00
|
|
|
|
{ path: '/event-log', title: '操作日志', icon: Clock, code: 'eventlog:manage' },
|
2026-10-31 15:41:27 +08:00
|
|
|
|
{ path: '/alert-center', title: '预警中心', icon: Bell },
|
2026-11-02 19:17:05 +08:00
|
|
|
|
{ path: '/alert-rule', title: '预警规则', icon: Bell },
|
2026-11-03 10:17:49 +08:00
|
|
|
|
{ path: '/attachment', title: '附件中心', icon: Folder, code: 'attachment:view' },
|
|
|
|
|
|
{ path: '/data-archive', title: '数据归档', icon: Tools, code: 'backup:manage' },
|
2026-10-28 10:10:17 +08:00
|
|
|
|
{ path: '/settings', title: '基础设置', icon: Setting, code: 'sys.settings:view' }
|
2026-09-04 14:18:53 +08:00
|
|
|
|
]
|
|
|
|
|
|
}
|
2026-08-28 15:06:01 +08:00
|
|
|
|
]
|
|
|
|
|
|
|
2026-09-04 14:18:53 +08:00
|
|
|
|
// 按当前用户权限码过滤(无 code 常驻;user:manage 仅管理员可见)
|
|
|
|
|
|
const showTopMenu = computed(() => !topMenu.code || permissionCodes.value.includes(topMenu.code))
|
2026-09-02 14:54:54 +08:00
|
|
|
|
const menus = computed(() =>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
menuGroups
|
|
|
|
|
|
.map((g) => ({
|
|
|
|
|
|
...g,
|
|
|
|
|
|
children: g.children.filter((m) => !m.code || permissionCodes.value.includes(m.code))
|
|
|
|
|
|
}))
|
|
|
|
|
|
.filter((g) => g.children.length > 0)
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
// 默认展开的分组:除「系统管理」外全部展开(用户偏好:一进系统即可见全部菜单)
|
|
|
|
|
|
const defaultOpeneds = computed(() =>
|
|
|
|
|
|
menus.value
|
|
|
|
|
|
.filter((g) => g.title !== '系统管理')
|
|
|
|
|
|
.map((g) => 'group:' + g.title)
|
2026-09-02 14:54:54 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
2026-09-04 14:18:53 +08:00
|
|
|
|
// 折叠 → 展开时重挂载菜单,使 default-openeds 重新生效。
|
|
|
|
|
|
// Element Plus 折叠时会清空内部 openedMenus 且展开时不恢复(menu 源码 watch(collapse) 只做清空),
|
|
|
|
|
|
// 而 default-openeds 仅在菜单实例初始化时读取一次——故用 key 变化强制重建实例,必达默认展开态。
|
|
|
|
|
|
const menuKey = ref(0)
|
|
|
|
|
|
watch(isCollapse, (collapsed) => {
|
|
|
|
|
|
if (!collapsed) menuKey.value++
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2026-09-03 14:20:37 +08:00
|
|
|
|
// keep-alive 缓存列表页组件:从路由 meta.keepAlive 收集组件名
|
|
|
|
|
|
// (返回列表页时保留筛选/页码/已加载数据,避免重复请求)
|
|
|
|
|
|
const cachedNames = computed(() => {
|
|
|
|
|
|
const names = []
|
|
|
|
|
|
for (const r of router.getRoutes()) {
|
|
|
|
|
|
const meta = r.meta || {}
|
|
|
|
|
|
if (meta.keepAlive && meta.componentName) names.push(meta.componentName)
|
|
|
|
|
|
}
|
|
|
|
|
|
return names
|
|
|
|
|
|
})
|
|
|
|
|
|
|
2026-08-31 12:58:28 +08:00
|
|
|
|
// 打开当前页面帮助(各页面 PageHelp 监听 wms:open-page-help 事件弹出抽屉)
|
|
|
|
|
|
function openHelp() {
|
|
|
|
|
|
window.dispatchEvent(new CustomEvent('wms:open-page-help'))
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function onUserCmd(cmd) {
|
|
|
|
|
|
if (cmd === 'password') {
|
|
|
|
|
|
router.push('/change-password')
|
|
|
|
|
|
} else if (cmd === 'logout') {
|
|
|
|
|
|
onLogout()
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-08-28 15:06:01 +08:00
|
|
|
|
function onLogout() {
|
2026-09-10 16:59:15 +08:00
|
|
|
|
// 尽力通知后端记录"退出登录"操作日志,失败不阻塞本地退出
|
|
|
|
|
|
request.post('/user/logout').catch(() => {})
|
2026-08-28 15:06:01 +08:00
|
|
|
|
logout()
|
|
|
|
|
|
ElMessage.success('已退出登录')
|
|
|
|
|
|
router.push('/login')
|
|
|
|
|
|
}
|
2026-09-10 16:59:15 +08:00
|
|
|
|
|
|
|
|
|
|
// 免登录大屏:新标签页打开,不覆盖当前窗口
|
|
|
|
|
|
function openDisplay() {
|
|
|
|
|
|
window.open('/display', '_blank')
|
|
|
|
|
|
}
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
|
<el-container class="layout">
|
2026-08-31 18:54:15 +08:00
|
|
|
|
<!-- 移动端遮罩 -->
|
|
|
|
|
|
<div v-if="isMobile && mobileOpen" class="drawer-mask" @click="mobileOpen = false"></div>
|
|
|
|
|
|
<el-aside :width="asideWidth" class="aside"
|
|
|
|
|
|
:class="{ 'drawer': isMobile, 'drawer-open': isMobile && mobileOpen }">
|
2026-08-28 15:06:01 +08:00
|
|
|
|
<div class="brand">
|
|
|
|
|
|
<el-icon :size="22"><Box /></el-icon>
|
2026-09-07 15:26:37 +08:00
|
|
|
|
<span v-show="!isCollapse">WMS库房管理</span>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</div>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<el-menu :key="menuKey" :default-active="route.path" :default-openeds="defaultOpeneds" class="menu"
|
2026-09-07 15:26:37 +08:00
|
|
|
|
background-color="#001529" text-color="#a6adb4" active-text-color="#409eff" router
|
2026-08-31 18:54:15 +08:00
|
|
|
|
:collapse="isCollapse && !isMobile">
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<el-menu-item v-if="showTopMenu" :index="topMenu.path">
|
2026-09-07 15:26:37 +08:00
|
|
|
|
<el-icon style="margin-right:8px"><component :is="topMenu.icon" /></el-icon>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<span>{{ topMenu.title }}</span>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</el-menu-item>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<el-sub-menu v-for="g in menus" :key="g.title" :index="'group:' + g.title">
|
|
|
|
|
|
<template #title>
|
2026-09-07 15:26:37 +08:00
|
|
|
|
<el-icon style="margin-right:8px"><component :is="g.icon" /></el-icon>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<span>{{ g.title }}</span>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<el-menu-item v-for="m in g.children" :key="m.path" :index="m.path">
|
2026-09-07 15:26:37 +08:00
|
|
|
|
<el-icon style="margin-right:8px"><component :is="m.icon" /></el-icon>
|
2026-09-04 14:18:53 +08:00
|
|
|
|
<span>{{ m.title }}</span>
|
|
|
|
|
|
</el-menu-item>
|
|
|
|
|
|
</el-sub-menu>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</el-menu>
|
|
|
|
|
|
</el-aside>
|
|
|
|
|
|
|
|
|
|
|
|
<el-container>
|
|
|
|
|
|
<el-header height="56px" class="header">
|
2026-08-31 18:54:15 +08:00
|
|
|
|
<div class="header-left">
|
|
|
|
|
|
<el-icon class="collapse-btn" @click="toggleAside">
|
|
|
|
|
|
<Expand v-if="isMobile ? !mobileOpen : isCollapse" />
|
|
|
|
|
|
<Fold v-else />
|
|
|
|
|
|
</el-icon>
|
|
|
|
|
|
<span class="title">{{ pageTitle }}</span>
|
|
|
|
|
|
</div>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
<div class="spacer"></div>
|
2026-10-31 15:41:27 +08:00
|
|
|
|
<el-badge :value="unreadAlerts" :hidden="unreadAlerts === 0" :max="99" class="alert-badge">
|
|
|
|
|
|
<el-tooltip content="预警中心" placement="bottom">
|
|
|
|
|
|
<el-button class="alert-btn" text @click="goAlertCenter">
|
|
|
|
|
|
<el-icon :size="18" :class="{ 'alert-ring': unreadAlerts > 0 }"><Bell /></el-icon>
|
|
|
|
|
|
</el-button>
|
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
</el-badge>
|
2026-09-10 16:59:15 +08:00
|
|
|
|
<el-button text type="primary" @click="openDisplay">
|
2026-08-28 15:06:01 +08:00
|
|
|
|
<el-icon style="margin-right:4px"><Monitor /></el-icon>免登录大屏
|
|
|
|
|
|
</el-button>
|
2026-08-31 12:58:28 +08:00
|
|
|
|
<el-button class="help-btn" text @click="openHelp">帮助</el-button>
|
|
|
|
|
|
<el-dropdown trigger="click" @command="onUserCmd">
|
|
|
|
|
|
<span class="user-name">{{ userName }} <span class="caret">▾</span></span>
|
|
|
|
|
|
<template #dropdown>
|
|
|
|
|
|
<el-dropdown-menu>
|
|
|
|
|
|
<el-dropdown-item command="password">修改密码</el-dropdown-item>
|
|
|
|
|
|
<el-dropdown-item divided command="logout">退出登录</el-dropdown-item>
|
|
|
|
|
|
</el-dropdown-menu>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</el-dropdown>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</el-header>
|
|
|
|
|
|
<el-main class="main">
|
2026-09-03 14:20:37 +08:00
|
|
|
|
<router-view v-slot="{ Component, route }">
|
|
|
|
|
|
<keep-alive :include="cachedNames">
|
|
|
|
|
|
<component :is="Component" :key="route.name" />
|
|
|
|
|
|
</keep-alive>
|
|
|
|
|
|
</router-view>
|
2026-08-28 15:06:01 +08:00
|
|
|
|
</el-main>
|
|
|
|
|
|
</el-container>
|
|
|
|
|
|
</el-container>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.layout { height: 100vh; }
|
2026-08-31 18:54:15 +08:00
|
|
|
|
.aside { background: #001529; transition: width .2s ease; }
|
|
|
|
|
|
.drawer { position: fixed; left: 0; top: 0; bottom: 0; z-index: 1001; transform: translateX(-100%); transition: transform .3s ease; }
|
|
|
|
|
|
.drawer-open { transform: translateX(0); }
|
|
|
|
|
|
.drawer-mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1000; }
|
2026-08-28 15:06:01 +08:00
|
|
|
|
.brand {
|
2026-09-07 15:26:37 +08:00
|
|
|
|
display: flex; align-items: center; justify-content: center; gap: 8px;
|
|
|
|
|
|
height: 60px;
|
|
|
|
|
|
color: #fff; font-weight: 600; font-size: 17px;
|
2026-08-31 18:54:15 +08:00
|
|
|
|
white-space: nowrap;
|
2026-08-28 15:06:01 +08:00
|
|
|
|
}
|
|
|
|
|
|
.menu { border-right: none; }
|
|
|
|
|
|
.header {
|
|
|
|
|
|
display: flex; align-items: center; gap: 10px;
|
|
|
|
|
|
background: #fff; border-bottom: 1px solid #ebeef5;
|
|
|
|
|
|
}
|
2026-08-31 18:54:15 +08:00
|
|
|
|
.header-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
|
|
|
|
.collapse-btn { font-size: 20px; cursor: pointer; color: #303133; display: flex; align-items: center; flex-shrink: 0; }
|
|
|
|
|
|
.collapse-btn:hover { color: #1668dc; }
|
|
|
|
|
|
.title { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
2026-08-28 15:06:01 +08:00
|
|
|
|
.spacer { flex: 1; }
|
2026-10-28 10:10:17 +08:00
|
|
|
|
.alert-badge { margin-right: 4px; }
|
|
|
|
|
|
.alert-btn { color: #606266; padding: 4px 6px; }
|
|
|
|
|
|
.alert-btn:hover { color: #1668dc; background: #f2f6fc; }
|
|
|
|
|
|
.alert-ring { color: #e6a23c; animation: alert-ring 1.1s ease-in-out infinite; transform-origin: top center; }
|
|
|
|
|
|
@keyframes alert-ring {
|
|
|
|
|
|
0%, 60%, 100% { transform: rotate(0); }
|
|
|
|
|
|
10% { transform: rotate(14deg); }
|
|
|
|
|
|
20% { transform: rotate(-12deg); }
|
|
|
|
|
|
30% { transform: rotate(9deg); }
|
|
|
|
|
|
40% { transform: rotate(-6deg); }
|
|
|
|
|
|
50% { transform: rotate(0); }
|
|
|
|
|
|
}
|
2026-08-31 12:58:28 +08:00
|
|
|
|
.help-btn { font-size: 13px; color: #606266; }
|
|
|
|
|
|
.user-name {
|
|
|
|
|
|
display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
|
|
|
|
|
|
font-size: 14px; color: #303133; outline: none; padding: 4px 6px; border-radius: 4px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.user-name:hover { color: #1668dc; background: #f2f6fc; }
|
|
|
|
|
|
.caret { font-size: 10px; color: #909399; }
|
2026-08-28 15:06:01 +08:00
|
|
|
|
.main { background: #f0f2f5; padding: 14px; overflow: auto; }
|
|
|
|
|
|
</style>
|