feat: 完成产线MES系统全流程功能迭代与优化
本提交完成了多个核心模块的功能完善与业务对齐: 1. 工位终端:固定工位配置、移除自选工位逻辑、适配配置化工位号 2. MES核心:重构工位组合逻辑、新增工单/流程状态管理、补全报工/追溯逻辑 3. WMS客户端:新增修改密码功能、优化帮助弹窗逻辑 4. 文档与权限:补充完整操作手册、统一菜单名称与权限描述 5. 修复多业务校验:排产数量校验、工单状态校验、工位绑定规则
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
<el-menu v-if="menus.length" :default-active="$route.path" router background-color="#001529"
|
||||
text-color="#a6adb4" active-text-color="#409eff" style="border-right:none">
|
||||
<el-menu-item v-for="m in menus" :key="m.path" :index="m.path">
|
||||
<el-icon style="margin-right:8px"><component :is="m.icon" /></el-icon>
|
||||
<span>{{ m.name }}</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
@@ -17,10 +18,17 @@
|
||||
<el-header class="header">
|
||||
<span class="page-title">{{ $route.meta.title || '' }}</span>
|
||||
<div class="spacer"></div>
|
||||
<div>
|
||||
<span style="margin-right:16px">{{ userName }}</span>
|
||||
<el-button size="small" @click="router.push('/change-password')">修改密码</el-button>
|
||||
<el-button size="small" @click="doLogout">退出</el-button>
|
||||
<div class="header-right">
|
||||
<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>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main style="padding:14px">
|
||||
@@ -33,6 +41,10 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {
|
||||
Document, Calendar, Box, Goods, ShoppingCart, Monitor, Tools,
|
||||
Operation, Link, DataLine, EditPen, Search, CircleCheck, Clock, User
|
||||
} from '@element-plus/icons-vue'
|
||||
import { getUser, logout } from '../utils/auth'
|
||||
import request from '../utils/request'
|
||||
|
||||
@@ -51,10 +63,10 @@ const defaultMenus = [
|
||||
{ code: 'produce.dailyplan', name: '日排产', path: '/daily-plan' },
|
||||
{ code: 'produce.bom', name: '物料清单', path: '/bom' },
|
||||
{ code: 'produce.material', name: '备料单', path: '/material-request' },
|
||||
{ code: 'produce.plc', name: 'PLC工序下发', path: '/plc-send' },
|
||||
{ code: 'produce.plc', name: '工位组合下发', path: '/plc-send' },
|
||||
{ code: 'produce.torque', name: '拧紧查询', path: '/torque' },
|
||||
{ code: 'produce.step', name: '工艺参数', path: '/process-step' },
|
||||
{ code: 'produce.processflow', name: '工艺流程', path: '/process-flow' },
|
||||
{ code: 'produce.station', name: '关联工位', path: '/station' },
|
||||
{ code: 'produce.performance', name: '绩效报表', path: '/performance' },
|
||||
{ code: 'produce.scan', name: '手动报工', path: '/scan' },
|
||||
{ code: 'produce.trace', name: '工件追溯', path: '/trace' },
|
||||
@@ -80,6 +92,19 @@ function doLogout() {
|
||||
logout()
|
||||
router.replace('/login')
|
||||
}
|
||||
|
||||
// 打开当前页面帮助(PageHelp 监听该全局事件弹出抽屉)
|
||||
function openHelp() {
|
||||
window.dispatchEvent(new CustomEvent('mes:open-page-help'))
|
||||
}
|
||||
|
||||
function onUserCmd(cmd) {
|
||||
if (cmd === 'password') {
|
||||
router.push('/change-password')
|
||||
} else if (cmd === 'logout') {
|
||||
doLogout()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@@ -90,4 +115,9 @@ function doLogout() {
|
||||
.header { display: flex; align-items: center; justify-content: space-between; background: #fff; border-bottom: 1px solid #eee; }
|
||||
.page-title { font-size: 16px; font-weight: 600; color: #303133; }
|
||||
.spacer { flex: 1; }
|
||||
.header-right { display: flex; align-items: center; gap: 6px; }
|
||||
.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; }
|
||||
</style>
|
||||
Reference in New Issue
Block a user