diff --git a/klp-ui/src/layout/components/Sidebar/SidebarItem.vue b/klp-ui/src/layout/components/Sidebar/SidebarItem.vue index 60d39e8b9..d69c49331 100644 --- a/klp-ui/src/layout/components/Sidebar/SidebarItem.vue +++ b/klp-ui/src/layout/components/Sidebar/SidebarItem.vue @@ -91,20 +91,14 @@ export default { return this.findFirstLeaf(this.item, this.basePath) }, menuStyle() { - console.log('[SidebarItem] 完整 item 对象:', JSON.parse(JSON.stringify(this.item))) - console.log('[SidebarItem] item.meta:', this.item.meta) - console.log('[SidebarItem] item.meta?.style 原始值:', this.item.meta && this.item.meta.style) if (this.item.meta && this.item.meta.style) { try { const parsed = JSON.parse(this.item.meta.style) - console.log('[SidebarItem] ✅ menuStyle 解析成功:', parsed) return parsed } catch (e) { - console.warn('[SidebarItem] ❌ JSON.parse 失败:', e) return {} } } - console.log('[SidebarItem] ⚠️ item.meta.style 为空,返回 {}') return {} } }, diff --git a/klp-ui/src/store/modules/permission.js b/klp-ui/src/store/modules/permission.js index 512229fbc..17129d557 100644 --- a/klp-ui/src/store/modules/permission.js +++ b/klp-ui/src/store/modules/permission.js @@ -49,13 +49,10 @@ const permission = { arr.forEach(item => { const title = (item.meta && item.meta.title) || item.name || '' const styleVal = item.meta && item.meta.style - console.log('[permission] depth=' + depth, title, 'meta.style=', styleVal) if (item.children) logMetaStyle(item.children, depth + 1) }) } - console.log('[permission] === getRouters 原始数据 ===') logMetaStyle(res.data) - console.log('[permission] === getRouters 数据结束 ===') const sdata = JSON.parse(JSON.stringify(res.data)) const rdata = JSON.parse(JSON.stringify(res.data)) const sidebarRoutes = filterAsyncRouter(sdata) diff --git a/klp-ui/src/utils/meta.js b/klp-ui/src/utils/meta.js new file mode 100644 index 000000000..5bcc8e65d --- /dev/null +++ b/klp-ui/src/utils/meta.js @@ -0,0 +1,34 @@ +// lockValue: 锁值,用于防止并发操作,不同的lockValue对应不同的锁 +// 1:分步加工 2. 退火 3. 酸轧 4. 酸轧分条 4. 合卷 +export const PROCESSES = [ + { name: '酸连轧工序', actionType: 11, api: 'pendingAction', lockValue: 3 }, + { name: '酸轧分条工序', actionType: 120, api: 'pendingAction', lockValue: 4 }, + { name: '酸轧合卷', actionType: 201, api: 'pendingAction', lockValue: 5 }, + { name: '镀锌合卷', actionType: 202, api: 'pendingAction', lockValue: 5 }, + { name: '脱脂合卷', actionType: 203, api: 'pendingAction', lockValue: 5 }, + { name: '拉矫平整合卷', actionType: 204, api: 'pendingAction', lockValue: 5 }, + { name: '双机架合卷', actionType: 205, api: 'pendingAction', lockValue: 5 }, + { name: '镀铬合卷', actionType: 206, api: 'pendingAction', lockValue: 5 }, + { name: '镀锌工序', actionType: 501, api: 'specialSplit', lockValue: 1 }, + { name: '脱脂工序', actionType: 502, api: 'specialSplit', lockValue: 1 }, + { name: '拉矫平整工序', actionType: 503, api: 'specialSplit', lockValue: 1 }, + { name: '双机架工序', actionType: 504, api: 'specialSplit', lockValue: 1 }, + { name: '镀铬工序', actionType: 505, api: 'specialSplit', lockValue: 1 }, + { name: '纵剪分条工序', actionType: 506, api: 'specialSplit', lockValue: 1 }, + { name: '酸轧修复工序', actionType: 520, api: 'specialSplit', lockValue: 1 }, + { name: '镀锌修复工序', actionType: 521, api: 'specialSplit', lockValue: 1 }, + { name: '脱脂修复工序', actionType: 522, api: 'specialSplit', lockValue: 1 }, + { name: '拉矫修复工序', actionType: 523, api: 'specialSplit', lockValue: 1 }, + { name: '双机架修复工序', actionType: 524, api: 'specialSplit', lockValue: 1 }, + { name: '镀铬修复工序', actionType: 525, api: 'specialSplit', lockValue: 1 }, +] + +export const PRODUCTION_LINES = [ + { name: '镀锌线', id: 1, processes: '501,202,521', hasPendingAction: true }, + { name: '酸轧线', id: 2, processes: '11,120,201,520', hasPendingAction: true }, + { name: '脱脂线', id: 3, processes: '203,502,522', hasPendingAction: true }, + { name: '镀铬线', id: 4, processes: '206,505,525', hasPendingAction: true }, + { name: '双机架', id: 5, processes: '205,504,524', hasPendingAction: true }, + { name: '退火线', id: 6, processes: '600', hasPendingAction: false }, + { name: '拉矫线', id: 7, processes: '204,503,523', hasPendingAction: true }, +] \ No newline at end of file diff --git a/klp-ui/src/views/wms/anneal/plan/ctrl.vue b/klp-ui/src/views/wms/anneal/plan/ctrl.vue index 05a718992..dc343566e 100644 --- a/klp-ui/src/views/wms/anneal/plan/ctrl.vue +++ b/klp-ui/src/views/wms/anneal/plan/ctrl.vue @@ -316,6 +316,8 @@ export default { status: 0, dataType: 1, exclusiveStatus: 0, + // 只查询退火原料库的卷 + warehouseId: '1988150648993148929' }, statusForm: { planId: undefined, diff --git a/klp-ui/src/views/wms/anneal/plan/index.vue b/klp-ui/src/views/wms/anneal/plan/index.vue index d9932dead..1dfd9ede5 100644 --- a/klp-ui/src/views/wms/anneal/plan/index.vue +++ b/klp-ui/src/views/wms/anneal/plan/index.vue @@ -258,6 +258,8 @@ export default { status: 0, dataType: 1, exclusiveStatus: 0, + // 只查询退火原料库的卷 + warehouseId: '1988150648993148929' }, statusForm: { planId: undefined, diff --git a/klp-ui/src/views/wms/report/comparison.vue b/klp-ui/src/views/wms/report/comparison.vue index a48f853af..80ee399fb 100644 --- a/klp-ui/src/views/wms/report/comparison.vue +++ b/klp-ui/src/views/wms/report/comparison.vue @@ -2,13 +2,13 @@
+
+ + 全部 + {{ line.label }} + +
- - - - - - @@ -176,7 +176,7 @@ export default { baseStartTime: baseMonthStart, baseEndTime: baseMonthEnd, queryParams: { enterCoilNo: '', currentCoilNo: '', itemName: '', itemSpecification: '', itemMaterial: '', itemManufacturer: '', qualityStatusCsv: '' }, lossColumns: [], outputColumns: [], - actionTypes: '', + actionTypes: '11,120,201,520', lineOptions: [ { label: '酸轧线', value: '11,120,201,520' }, { label: '镀锌线', value: '202,501,521' }, { label: '双机架', value: '205,504,524' }, { label: '镀铬线', value: '206,505,525' }, @@ -355,6 +355,7 @@ export default { .comparison-report { min-width: 900px; } .filter-card { margin-bottom: 8px; } .filter-card >>> .el-card__body { padding: 8px 12px 8px; } +.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; } .filter-form { margin-bottom: 0; } .filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; } .filter-form >>> .el-form-item__label { font-size: 12px; } diff --git a/klp-ui/src/views/wms/report/line.vue b/klp-ui/src/views/wms/report/line.vue index be9f41996..add07597d 100644 --- a/klp-ui/src/views/wms/report/line.vue +++ b/klp-ui/src/views/wms/report/line.vue @@ -2,13 +2,13 @@
+
+ + 全部 + {{ line.label }} + +
- - - - - - .line-report { min-width: 900px; } .filter-area { background: #fff; padding: 8px 12px; margin-bottom: 8px; border-bottom: 1px solid #e4e7ed; } +.line-tabs-row { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #eee; } .filter-form { margin-bottom: 0; } .filter-form .el-form-item { margin-bottom: 6px; margin-right: 4px; } .filter-form >>> .el-form-item__label { font-size: 12px; } diff --git a/klp-ui/src/views/wms/warehouse/components/Warehouse3D.vue b/klp-ui/src/views/wms/warehouse/components/Warehouse3D.vue index 79b46aa65..65dec88fc 100644 --- a/klp-ui/src/views/wms/warehouse/components/Warehouse3D.vue +++ b/klp-ui/src/views/wms/warehouse/components/Warehouse3D.vue @@ -92,7 +92,8 @@ + @click="showCoilDetail(c.id)" + @contextmenu.prevent="handleRowRightClick(c)"> {{ c.posKey }} L{{ c.layer }} {{ c.coilNo }} {{ c.specification }} @@ -306,6 +307,7 @@ export default { const dom = this.renderer.domElement; dom.addEventListener('click', this.onCanvasClick); + dom.addEventListener('contextmenu', this.onContextMenu); dom.addEventListener('mousedown', this.onMouseDown); dom.addEventListener('mousemove', this.onMouseMove); dom.addEventListener('mouseup', this.onMouseUp); @@ -608,6 +610,32 @@ export default { this.closeDetail(); }, + onContextMenu(e) { + e.preventDefault(); + const rect = this.renderer.domElement.getBoundingClientRect(); + this.mouseVec.x = ((e.clientX - rect.left) / rect.width) * 2 - 1; + this.mouseVec.y = -((e.clientY - rect.top) / rect.height) * 2 + 1; + this.raycaster.setFromCamera(this.mouseVec, this.camera); + const targets = []; + this.scene.traverse((o) => { if (o.userData && o.userData.coilId) targets.push(o); }); + const hits = this.raycaster.intersectObjects(targets, true); + if (hits.length > 0) { + let obj = hits[0].object; + while (obj.parent && !(obj.userData && obj.userData.coilId)) obj = obj.parent; + if (obj.userData && obj.userData.coilId) { + const coil = this.coilList.find(c => c.id === obj.userData.coilId); + if (coil) { + this.$emit('coil-selected', { + coilId: coil.id, + currentCoilNo: coil.coilNo, + warehouseId: coil.warehouseId, + warehouseName: coil.warehouseName, + }); + } + } + } + }, + async showCoilDetail(cid) { const coil = this.coilList.find((c) => c.id === cid); if (!coil) return; @@ -638,6 +666,15 @@ export default { } }, + handleRowRightClick(coil) { + this.$emit('coil-selected', { + coilId: coil.id, + currentCoilNo: coil.coilNo, + warehouseId: coil.warehouseId, + warehouseName: coil.warehouseName, + }); + }, + closeDetail() { this.detail = null; this.applyHighlight(); diff --git a/klp-ui/src/views/wms/warehouse/components/WarehouseBird.vue b/klp-ui/src/views/wms/warehouse/components/WarehouseBird.vue index 0c32f7178..bf9c578d6 100644 --- a/klp-ui/src/views/wms/warehouse/components/WarehouseBird.vue +++ b/klp-ui/src/views/wms/warehouse/components/WarehouseBird.vue @@ -80,7 +80,7 @@
+ @release-warehouse="handleReleaseWarehouse" @coil-selected="handleCoilSelected" />
@@ -179,6 +179,10 @@ export default { handleReleaseWarehouse(warehouse) { this.$emit('release-warehouse', warehouse); }, + + handleCoilSelected(coil) { + this.$emit('coil-selected', coil); + }, /** * 解析第三级库位编码 * 新规则: diff --git a/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue b/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue index 0755ecb0d..b26010291 100644 --- a/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue +++ b/klp-ui/src/views/wms/warehouse/components/WarehouseInterlaced.vue @@ -41,7 +41,8 @@ }">
+ :class="{ disabled: warehouse.isEnabled === 0, error: warehouse.isEnabled === 0 && warehouse.currentCoilNo == null }" @click.stop="handleCellClick(warehouse)" + @contextmenu.prevent.stop="handleCellContextMenu(warehouse)">
{{ warehouse.actualWarehouseName || '-' }}
{{ warehouse.currentCoilNo || '-' }}
@@ -61,7 +62,8 @@ :class="{ disabled: warehouse.isEnabled === 0, error: warehouse.isEnabled === 0 && warehouse.currentCoilNo == null }" :style="{ transform: `translateY(var(--offset-value))`, position: 'relative' - }" @click.stop="handleCellClick(warehouse)"> + }" @click.stop="handleCellClick(warehouse)" + @contextmenu.prevent.stop="handleCellContextMenu(warehouse)">
{{ warehouse.actualWarehouseName || '-' }}
{{ warehouse.currentCoilNo || '-' }}
@@ -433,6 +435,16 @@ export default { this.currentWarehouse = { ...warehouse }; this.dialogOpen = true; }, + + handleCellContextMenu(warehouse) { + if (!warehouse.coilId) return; + this.$emit('coil-selected', { + coilId: warehouse.coilId, + currentCoilNo: warehouse.currentCoilNo, + warehouseId: warehouse.actualWarehouseId, + warehouseName: warehouse.actualWarehouseName || warehouse.actualWarehouseCode, + }); + }, handleSplitWarehouse(payload) { this.$emit('split-warehouse', payload); }, diff --git a/klp-ui/src/views/wms/warehouse/overview.vue b/klp-ui/src/views/wms/warehouse/overview.vue index f0f1f9592..09d305a43 100644 --- a/klp-ui/src/views/wms/warehouse/overview.vue +++ b/klp-ui/src/views/wms/warehouse/overview.vue @@ -13,7 +13,7 @@
- + - +
@@ -36,6 +38,29 @@
+ + +
+ +
暂无钢卷数据
+
+ + + + + + + + + + +
+ @@ -71,6 +96,9 @@