feat: 会话令牌与守卫、看板组件及工位终端功能完善
- 用户表扩展:MES/WMS user 实体新增字段,新增 active_token 迁移 SQL(2026-11-11) - 会话机制:MES 新增 session_guard,重构 token/auth/jwt/perm 与路由;WMS/工作站同步令牌续签与鉴权 - 看板(board):调整 MES 看板产线/生产/侧栏/仓库组件及样式;WMS 看板展示页同步调整 - 工位终端后端:完善报警流、绑定、PLC 对账、拧紧、proxy、上报、站点告警/操作等 handler,补充 mes client/store - 工位终端前端:登录/主界面/各操作面板调整,新增滚动分页与多语言 yaml 文案,刷新构建产物 - MES 业务:新增流程链 logic,调整待审核/产能支撑/产品工艺/设置页、PLC 监控与帮助文档,刷新构建产物 - 更新问题记录文档
This commit is contained in:
@@ -29,11 +29,8 @@
|
||||
<span class="lab">工位</span>
|
||||
<!-- 固定模式:服务端配置了工位(stationNo>0),不允许选择 -->
|
||||
<span v-if="fixedStation" class="station-fixed">工位 {{ fixedStation }}</span>
|
||||
<!-- 选择模式:终端未配置工位(2026-11-09 拍板),实体+虚拟工位都可选 -->
|
||||
<el-select v-else v-model="pickedStation" class="station-el" placeholder="请选择工位" size="large">
|
||||
<el-option-group v-if="stationGroups.LINE.length" label="实体工位">
|
||||
<el-option v-for="s in stationGroups.LINE" :key="s.stationNo" :label="stationLabel(s)" :value="s.stationNo" />
|
||||
</el-option-group>
|
||||
<!-- 选择模式(2026-11-11 多会话拍板):终端未配置工位=虚拟工位专用机,只允许选虚拟工位 -->
|
||||
<el-select v-else v-model="pickedStation" class="station-el" placeholder="请选择虚拟工位" size="large">
|
||||
<el-option-group v-if="stationGroups.OFFLINE.length" label="虚拟工位">
|
||||
<el-option v-for="s in stationGroups.OFFLINE" :key="s.stationNo" :label="stationLabel(s)" :value="s.stationNo" />
|
||||
</el-option-group>
|
||||
@@ -66,7 +63,6 @@ const stationList = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
const stationGroups = computed(() => ({
|
||||
LINE: stationList.value.filter((s) => s.stationType !== 'OFFLINE'),
|
||||
OFFLINE: stationList.value.filter((s) => s.stationType === 'OFFLINE')
|
||||
}))
|
||||
const stationLabel = (s) => {
|
||||
@@ -74,8 +70,9 @@ const stationLabel = (s) => {
|
||||
return s.name ? `工位 ${s.stationNo} ${s.name}${tip}` : `工位 ${s.stationNo}${tip}`
|
||||
}
|
||||
|
||||
// 2026-11-09 拍板:配置了工位(stationNo>0)登录页不允许选择;未配置则加载工位清单供选择
|
||||
//(实体工位 + 虚拟工位 0 上线位/13 下线位)。固定模式下不再显示接驳台(dock 配置已删除)。
|
||||
// 2026-11-09 拍板:配置了工位(stationNo>0)登录页不允许选择。
|
||||
// 2026-11-11 多会话拍板:未配置工位(<=0)的终端实例=虚拟工位专用机,登录页只显示虚拟工位
|
||||
//(后端登录接口同样硬校验 stationType=OFFLINE,防前端绕过)。固定模式下不显示接驳台。
|
||||
onMounted(async () => {
|
||||
try {
|
||||
const cfg = await getConfig()
|
||||
@@ -85,9 +82,8 @@ onMounted(async () => {
|
||||
}
|
||||
const list = await getStationOptions()
|
||||
stationList.value = Array.isArray(list) ? list : []
|
||||
// 默认选中首个虚拟工位(上线位 0)优先,否则首个实体工位
|
||||
pickedStation.value = stationList.value.find((s) => s.stationType === 'OFFLINE')?.stationNo ??
|
||||
stationList.value[0]?.stationNo ?? null
|
||||
// 默认选中首个虚拟工位
|
||||
pickedStation.value = stationList.value.find((s) => s.stationType === 'OFFLINE')?.stationNo ?? null
|
||||
} catch {
|
||||
// 网络异常:固定模式保持 null(提交时提示),选择模式保持空清单(提交时提示)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user