refactor(mes): 移除工位接驳台绑定逻辑,改为独立dock主数据
- 移除station表的hasDock、dockCode字段及相关代码 - 新增dock表注释及关联逻辑,支持一个工位绑定多个接驳台 - 更新工位相关的seed、logic、schema及前端代码,适配新的接驳台管理方式 - 新增SQL注释固化脚本,完善MES表注释
This commit is contained in:
@@ -84,11 +84,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="dlg.hasDock" label="接驳台编码">
|
||||
<div style="color:#909399;font-size:12px;line-height:1.5">
|
||||
接驳台与工位的 1:1 绑定由系统预置(种子初始化),页面不可更改。
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="dlg.show = false">取消</el-button>
|
||||
@@ -157,10 +152,10 @@ const tabLabel = (v) => (TAB_OPTIONS.find((t) => t.v === v) || {}).l || v
|
||||
const rows = computed(() => {
|
||||
return [...stations.value]
|
||||
.sort((a, b) => (a.stationNo || 0) - (b.stationNo || 0))
|
||||
.map((s) => ({ id: s.id, stationNo: s.stationNo, name: s.name, flowId: s.flowId, flowName: s.flowName, stationType: s.stationType, isBuiltin: !!s.isBuiltin, hasDock: !!s.hasDock, dockCode: s.dockCode || '', visibleTabs: Array.isArray(s.visibleTabs) ? s.visibleTabs : [] }))
|
||||
.map((s) => ({ id: s.id, stationNo: s.stationNo, name: s.name, flowId: s.flowId, flowName: s.flowName, stationType: s.stationType, isBuiltin: !!s.isBuiltin, visibleTabs: Array.isArray(s.visibleTabs) ? s.visibleTabs : [] }))
|
||||
})
|
||||
|
||||
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false, hasDock: false })
|
||||
const dlg = reactive({ show: false, isAdd: false, title: '', id: 0, stationNo: 1, name: '', stationType: 'OFFLINE', isBuiltin: false })
|
||||
|
||||
// 终端可见页签编辑(空数组 = 显示全部)
|
||||
const tabDlg = reactive({ show: false, id: 0, stationNo: 0, name: '', stationType: 'LINE', tabs: [] })
|
||||
@@ -187,11 +182,11 @@ function openAdd() {
|
||||
const used = new Set(stations.value.map((s) => s.stationNo))
|
||||
let next = 14
|
||||
while (used.has(next)) next++
|
||||
Object.assign(dlg, { show: true, isAdd: true, title: '新增工位', id: 0, stationNo: next, name: '', stationType: 'OFFLINE', isBuiltin: false, hasDock: false })
|
||||
Object.assign(dlg, { show: true, isAdd: true, title: '新增工位', id: 0, stationNo: next, name: '', stationType: 'OFFLINE', isBuiltin: false })
|
||||
}
|
||||
|
||||
function openName(row) {
|
||||
Object.assign(dlg, { show: true, isAdd: false, title: `工位${row.stationNo} - 修改`, id: row.id, stationNo: row.stationNo, name: row.name, stationType: row.stationType || 'LINE', isBuiltin: !!row.isBuiltin, hasDock: !!row.hasDock })
|
||||
Object.assign(dlg, { show: true, isAdd: false, title: `工位${row.stationNo} - 修改`, id: row.id, stationNo: row.stationNo, name: row.name, stationType: row.stationType || 'LINE', isBuiltin: !!row.isBuiltin })
|
||||
}
|
||||
|
||||
async function save() {
|
||||
|
||||
Reference in New Issue
Block a user