docs(deployment): 更新部署手册和业务架构说明

- 更新MES和WMS服务端口配置说明
- 详细说明产线工位设备配置(扫码枪+拧紧枪)
- 明确AGV配送和接驳台的模拟模式与真实对接方案
- 更新WMS中AGV配送默认模拟模式说明
- 完善厂内物流(AGV/接驳台)的业务架构约束
- 修订临时文档为详细的项目问题和解决方案规划
This commit is contained in:
SunYF
2026-09-20 14:52:36 +08:00
parent 5a33028003
commit f35e9b5b75
57 changed files with 6096 additions and 1000 deletions
@@ -0,0 +1,25 @@
import { ElMessageBox } from 'element-plus'
// 统一二次确认工具(需求6):
// 所有「单次、不可逆、影响面大」的操作——新建 / 编辑 / 保存 / 删除 / 停用启用 / 差异写回 / 批量导入——
// 都必须先弹此确认框,且 message 需回显影响范围(对象、数量、区域等摘要)。
// 高频连续操作(连续扫码入库、工位报工、叫料)不使用本工具,避免打断作业。
//
// 用法:
// if (!(await confirmAction('确认删除物料「X」?将影响 N 条库存记录。', '删除确认'))) return
// await doDelete()
export async function confirmAction(message, title = '操作确认', options = {}) {
try {
await ElMessageBox.confirm(message, title, {
type: 'warning',
confirmButtonText: '确认',
cancelButtonText: '取消',
...options
})
return true
} catch {
return false
}
}
export default confirmAction
+11
View File
@@ -12,4 +12,15 @@ export function can(code) {
} catch {
return false
}
}
// isAdmin 判断当前登录用户是否系统管理员(role==='admin')。
// 用于仅管理员可见的操作入口(如日志清理)。后端 requireAdmin 为准,前端仅控展示。
export function isAdmin() {
try {
const u = JSON.parse(localStorage.getItem('user') || 'null')
return !!u && u.role === 'admin'
} catch {
return false
}
}