feat: 完成产线MES系统全流程功能迭代与优化
本提交完成了多个核心模块的功能完善与业务对齐: 1. 工位终端:固定工位配置、移除自选工位逻辑、适配配置化工位号 2. MES核心:重构工位组合逻辑、新增工单/流程状态管理、补全报工/追溯逻辑 3. WMS客户端:新增修改密码功能、优化帮助弹窗逻辑 4. 文档与权限:补充完整操作手册、统一菜单名称与权限描述 5. 修复多业务校验:排产数量校验、工单状态校验、工位绑定规则
This commit is contained in:
@@ -12,6 +12,7 @@ const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
const user = getUser()
|
||||
const userName = computed(() => user?.realName || user?.username || '未登录')
|
||||
const pageTitle = computed(() => route.meta?.title || '')
|
||||
|
||||
const menus = [
|
||||
@@ -27,6 +28,19 @@ const menus = [
|
||||
{ path: '/base-data', title: '基础数据', icon: EditPen }
|
||||
]
|
||||
|
||||
// 打开当前页面帮助(各页面 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()
|
||||
}
|
||||
}
|
||||
|
||||
function onLogout() {
|
||||
logout()
|
||||
ElMessage.success('已退出登录')
|
||||
@@ -57,8 +71,16 @@ function onLogout() {
|
||||
<el-button text type="primary" @click="router.push('/display')">
|
||||
<el-icon style="margin-right:4px"><Monitor /></el-icon>免登录大屏
|
||||
</el-button>
|
||||
<el-tag effect="plain">{{ user?.realName || user?.username || '未登录' }}</el-tag>
|
||||
<el-button text type="danger" @click="onLogout">退出登录</el-button>
|
||||
<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>
|
||||
</el-header>
|
||||
<el-main class="main">
|
||||
<router-view />
|
||||
@@ -83,5 +105,12 @@ function onLogout() {
|
||||
}
|
||||
.title { font-size: 16px; font-weight: 600; }
|
||||
.spacer { flex: 1; }
|
||||
.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; }
|
||||
.main { background: #f0f2f5; padding: 14px; overflow: auto; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user