diff --git a/src/assets/images/stream_image.svg b/src/assets/images/stream_image.svg new file mode 100644 index 00000000..b2e8b254 --- /dev/null +++ b/src/assets/images/stream_image.svg @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/EquipmentEntryApproval/EquipmentMainList.vue b/src/views/EquipmentEntryApproval/EquipmentMainList.vue index af0ca025..320e69df 100644 --- a/src/views/EquipmentEntryApproval/EquipmentMainList.vue +++ b/src/views/EquipmentEntryApproval/EquipmentMainList.vue @@ -3,8 +3,8 @@ @@ -21,7 +21,7 @@ - + - - - - 查询 - - - 重置 - - - - 展开明细 - - + + + 查询 + 重置 + 展开明细 diff --git a/src/views/contract-manage/index.vue b/src/views/contract-manage/index.vue index 3f7cebff..6a5ec74d 100644 --- a/src/views/contract-manage/index.vue +++ b/src/views/contract-manage/index.vue @@ -144,7 +144,7 @@ 装备管理系统流程图 -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
装备录入 @@ -105,7 +20,8 @@
装备退役 @@ -114,7 +30,8 @@
录入审核 @@ -123,7 +40,8 @@
装备台账 @@ -132,7 +50,8 @@
装备上架 @@ -141,7 +60,8 @@
自用出库 @@ -150,7 +70,8 @@
装备退库 @@ -159,7 +80,8 @@
装备维修 @@ -168,7 +90,8 @@
共享大厅 @@ -177,7 +100,8 @@ @@ -220,6 +163,24 @@ export default { return { activeNode: null, activeLine: null, + connections: [], + // 参考示意图连线定义(按布局方向设置 from/to) + lineDefs: [ + { id: 'entryToAudit', from: 'equipmentEntry', to: 'entryAudit' }, + { id: 'auditToLedger', from: 'entryAudit', to: 'equipmentLedger' }, + { id: 'ledgerToSelf', from: 'equipmentLedger', to: 'selfUseOut' }, + { id: 'selfToReturn', from: 'selfUseOut', to: 'equipmentReturn' }, + { id: 'returnToRepair', from: 'equipmentReturn', to: 'equipmentRepair' }, + { id: 'ledgerToShelf', from: 'equipmentLedger', to: 'equipmentShelf' }, + { id: 'shelfToRental', from: 'equipmentShelf', to: 'rentalHall' }, + { id: 'rentalToShareOut', from: 'rentalHall', to: 'shareOut' }, + { id: 'shareOutToShareReturn', from: 'shareOut', to: 'shareReturn' }, + { id: 'shareReturnToRepair', from: 'shareReturn', to: 'equipmentRepair' }, + { id: 'shelfToOff', from: 'equipmentShelf', to: 'equipmentOffShelf' }, + // 顶部/右侧回流到退役 + { id: 'repairToRetire', from: 'equipmentRepair', to: 'equipmentRetire' }, + { id: 'ledgerToRetire', from: 'equipmentLedger', to: 'equipmentRetire' } + ], nodeData: { equipmentEntry: { name: '装备录入', @@ -296,6 +257,13 @@ export default { } }; }, + mounted() { + this.$nextTick(this.updateConnections); + window.addEventListener('resize', this.updateConnections, { passive: true }); + }, + beforeDestroy() { + window.removeEventListener('resize', this.updateConnections); + }, computed: { nodeInfo() { return this.nodeData[this.activeNode] || {}; @@ -315,6 +283,55 @@ export default { } else if (nodeId === 'equipmentRepair') { this.activeLine = 'repairToRetire'; } + }, + updateConnections() { + const buildMetrics = (el) => { + if (!el) return null; + return { + left: el.offsetLeft, + top: el.offsetTop, + width: el.offsetWidth, + height: el.offsetHeight + }; + }; + const getEdgeAnchors = (rect) => { + const cx = rect.left + rect.width / 2; + const cy = rect.top + rect.height / 2; + return { + left: { x: rect.left, y: cy }, + right: { x: rect.left + rect.width, y: cy }, + top: { x: cx, y: rect.top }, + bottom: { x: cx, y: rect.top + rect.height } + }; + }; + const conns = []; + this.lineDefs.forEach((ld) => { + const fromEl = this.$refs[ld.from]; + const toEl = this.$refs[ld.to]; + const f = buildMetrics(fromEl); + const t = buildMetrics(toEl); + if (!f || !t) return; + const fa = getEdgeAnchors(f); + const ta = getEdgeAnchors(t); + const dx = (t.left + t.width / 2) - (f.left + f.width / 2); + const dy = (t.top + t.height / 2) - (f.top + f.height / 2); + // 水平优先:从左右边到对侧左右边 + const hStart = dx >= 0 ? fa.right : fa.left; + const hEnd = dx >= 0 ? ta.left : ta.right; + const hLen = Math.abs(hEnd.x - hStart.x) + Math.abs(hEnd.y - hStart.y); + const hMidX = (hStart.x + hEnd.x) / 2; + const hPoints = `${hStart.x},${hStart.y} ${hMidX},${hStart.y} ${hMidX},${hEnd.y} ${hEnd.x},${hEnd.y}`; + // 垂直优先:从上下边到对侧上下边 + const vStart = dy >= 0 ? fa.bottom : fa.top; + const vEnd = dy >= 0 ? ta.top : ta.bottom; + const vLen = Math.abs(vEnd.x - vStart.x) + Math.abs(vEnd.y - vStart.y); + const vMidY = (vStart.y + vEnd.y) / 2; + const vPoints = `${vStart.x},${vStart.y} ${vStart.x},${vMidY} ${vEnd.x},${vMidY} ${vEnd.x},${vEnd.y}`; + // 取更短的 L 型路径 + const useH = hLen <= vLen; + conns.push({ id: ld.id, points: useH ? hPoints : vPoints }); + }); + this.connections = conns; } } }; @@ -338,7 +355,7 @@ export default { .flowchart-wrapper { position: relative; - width: 900px; + width: 1200px; height: 700px; margin: 0 auto; background-color: white; @@ -357,14 +374,14 @@ export default { pointer-events: none; } -line, path { +line, path, polyline { stroke: #999; stroke-width: 2px; fill: none; transition: all 0.3s ease; } -line.active, path.active { +line.active, path.active, polyline.active { stroke: #ff4500; stroke-width: 2.5px; } diff --git a/src/views/material/ma/supplier/index.vue b/src/views/material/ma/supplier/index.vue index 0795e508..b712331b 100644 --- a/src/views/material/ma/supplier/index.vue +++ b/src/views/material/ma/supplier/index.vue @@ -64,7 +64,7 @@ v-hasPermi="['machinery:type:add']" >新增 - + 导出 - + - + @@ -128,7 +128,7 @@ - + - + @@ -160,7 +160,7 @@ - + @@ -180,7 +180,7 @@ /> - + @@ -201,8 +201,8 @@ /> - - + + @@ -210,7 +210,7 @@ - + @@ -223,10 +223,10 @@ show-word-limit > - + - - + + - + - +
- - + +