From 3dc25fef2a9453fe9bfa41ae860fcde42103fa8a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 13:31:30 +0800 Subject: [PATCH 01/13] fix: stabilize workflow action buttons --- src/api/model/wf.js | 6 +++ src/views/wf/ticketd_b.vue | 91 ++++++++++++++++++++++++----------- src/views/wf/ticketdetail.vue | 49 ++++++++++++++----- 3 files changed, 108 insertions(+), 38 deletions(-) diff --git a/src/api/model/wf.js b/src/api/model/wf.js index 64264196..6b479b2b 100644 --- a/src/api/model/wf.js +++ b/src/api/model/wf.js @@ -188,6 +188,12 @@ export default { return await http.get( `${config.API_URL}/wf/ticket/${id}/transitions/`); } }, + ticketAvailableActions: { + name: "获取当前用户可执行的工单操作", + req: async function(id){ + return await http.get(`${config.API_URL}/wf/ticket/${id}/available_actions/`); + } + }, dutyAgg: { url: `${config.API_URL}/wf/ticket/duty_agg/`, name: "待办审批聚合", diff --git a/src/views/wf/ticketd_b.vue b/src/views/wf/ticketd_b.vue index 54f3eaed..80e96d4c 100644 --- a/src/views/wf/ticketd_b.vue +++ b/src/views/wf/ticketd_b.vue @@ -1,4 +1,12 @@ \ No newline at end of file + diff --git a/src/views/wf/ticketdetail.vue b/src/views/wf/ticketdetail.vue index 740bb269..bc1e7b3e 100644 --- a/src/views/wf/ticketdetail.vue +++ b/src/views/wf/ticketdetail.vue @@ -316,6 +316,14 @@
+ 接单 { that.mainLoading = false; that.ticketDetail = res; @@ -791,11 +802,11 @@ export default { if (this.ticketDetail.create_by == this.userId) { this.isOwn = true; } - let participant = this.ticketDetail.participant; - if ( - participant == this.userId || - participant.indexOf(this.userId) > -1 - ) { + const participant = this.ticketDetail.participant; + const participants = Array.isArray(participant) + ? participant + : [participant]; + if (participants.map(String).includes(String(this.userId))) { this.isDuty = true; } }).catch((e) => { @@ -806,21 +817,37 @@ export default { getBtns() { let that = this; that.audit_imgs_show = false; - that.$API.wf.ticket.ticketTransitions.req(that.ticketId).then((res) => { - that.operationBtn = res; + that.audit_work_show = false; + that.needAccept = false; + that.$API.wf.ticket.ticketAvailableActions.req(that.ticketId).then((res) => { + that.operationBtn = res.transitions; + that.needAccept = res.need_accept; + if (res.permission || res.need_accept) { + that.isDuty = true; + } console.log("operationBtn", that.operationBtn); - if(res.length>0){ - for (let i = 0; i < res.length; i++) { - if(res[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ + if(that.operationBtn.length>0){ + for (let i = 0; i < that.operationBtn.length; i++) { + if(that.operationBtn[i].on_submit_func=="apps.opm.services.check_opl_audit_imgs"){ that.audit_imgs_show = true; } - if(res[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){ + if(that.operationBtn[i].on_submit_func=="apps.opm.services.check_opl_work_imgs"){ that.audit_work_show = true; } } } }); }, + handleAccept() { + this.acceptLoading = true; + this.$API.wf.ticket.ticketAccept.req(this.ticketId, {}).then(() => { + this.$message.success("接单成功"); + this.getticketItem(); + this.getBtns(); + }).finally(() => { + this.acceptLoading = false; + }); + }, //访客详情 getVisit() { this.$API.vm.visit.read.req(this.projectId).then((res) => { From 16546fd5fdc0174d7b3e9216c34c19419a0252dc Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 14:13:45 +0800 Subject: [PATCH 02/13] Fix route flow tabs layout --- src/views/mtm/route_show.vue | 42 +++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/src/views/mtm/route_show.vue b/src/views/mtm/route_show.vue index 95663b62..dd5789dd 100644 --- a/src/views/mtm/route_show.vue +++ b/src/views/mtm/route_show.vue @@ -22,7 +22,7 @@
工艺路线流程图
- + @@ -124,6 +124,13 @@ export default { setData(data) { let that = this; Object.assign(that.form, data); + that.nodes = []; + that.edges = []; + that.tabsTitle = ['总图']; + that.tabsData = {}; + that.activeName = "总图"; + // 先挂载查看器显示加载后的空状态,避免子图列表先返回时整块区域空白 + that.limitedWatch = true; that.getRoute(that.form.material); that.getDEGdatas(data.id); this.getTabsList(data.id); @@ -135,11 +142,10 @@ export default { getDEGdatas(id) { let that = this; that.$API.mtm.routepack.dag.req(id).then((res) => { - that.nodes = res.nodes; - that.edges = res.edges; that.tabsData['总图'] = res; - if (!that.limitedWatch) { - that.limitedWatch = true; + // 子图列表与总图并行加载;用户已切到子图时不能再被迟到的总图覆盖 + if (that.activeName === "总图") { + that.showGraph(res); } }) }, @@ -156,9 +162,16 @@ export default { that.tabsData[res[key].name] = res[key]; } } - console.log(that.tabsData); + const activeGraph = that.tabsData[that.activeName]; + if (activeGraph) { + that.showGraph(activeGraph); + } }) }, + showGraph(graph) { + this.nodes = graph?.nodes || []; + this.edges = graph?.edges || []; + }, //文件列表加载 getRoute(id) { this.$API.mtm.route.list @@ -168,12 +181,10 @@ export default { }); }, tabshandleClick(val) { - let that = this; - let label = val.props.label; - that.$nextTick(() => { - that.nodes = that.tabsData[label].nodes; - that.edges = that.tabsData[label].edges; - }) + const graph = this.tabsData[val.props.name || val.props.label]; + if (graph) { + this.showGraph(graph); + } }, }, }; @@ -256,9 +267,16 @@ export default { flex: 1; min-height: 0; } +.rs-tabs { + /* el-tabs 的空 content 默认会 flex-grow,多个流程图时会把下方画布挤出可视区 */ + flex: 0 0 auto; +} .rs-tabs :deep(.el-tabs__header) { margin: 0 0 8px; } +.rs-tabs :deep(.el-tabs__content) { + display: none; +} .rs-steps { flex: 1; min-width: 0; From 34d3c437843c087e8ee226fda3bde03bffb28d6a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 14:37:58 +0800 Subject: [PATCH 03/13] Fix route flow viewer mounting --- src/views/mtm/route_show.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/views/mtm/route_show.vue b/src/views/mtm/route_show.vue index dd5789dd..a2bc0fd5 100644 --- a/src/views/mtm/route_show.vue +++ b/src/views/mtm/route_show.vue @@ -24,7 +24,7 @@ @tab-click="tabshandleClick"> -
@@ -69,10 +69,8 @@ + + diff --git a/src/components/flow/MaterialNode.vue b/src/components/flow/MaterialNode.vue index 1edf847d..71f93be3 100644 --- a/src/components/flow/MaterialNode.vue +++ b/src/components/flow/MaterialNode.vue @@ -1,9 +1,27 @@ @@ -64,6 +82,10 @@ export default { -webkit-box-orient: vertical; overflow: hidden; } +.mnode__route-handle { + opacity: 0; + pointer-events: none; +} .mnode--raw { border-color: #f0c78a; background: #fffaf2; diff --git a/src/components/flow/dagreLayout.js b/src/components/flow/dagreLayout.js index ffd5fb1e..ffbb1ac6 100644 --- a/src/components/flow/dagreLayout.js +++ b/src/components/flow/dagreLayout.js @@ -10,6 +10,14 @@ export const NODE_H = 54; * @param {Object} opts { rankdir: TB|BT|LR|RL, nodeW, nodeH, nodesep, edgesep, ranksep, marginx, marginy } */ export function layoutGraph(nodes, edges, opts = {}) { + return layoutGraphWithEdges(nodes, edges, opts).nodes; +} + +/** + * dagre 同时计算节点位置、边的绕行点和标签位置。 + * Vue Flow 默认边只使用节点坐标,会让跨层边穿过节点;因此查看/编辑视图使用此完整结果。 + */ +export function layoutGraphWithEdges(nodes, edges, opts = {}) { const { rankdir = "TB", nodeW = NODE_W, @@ -20,14 +28,93 @@ export function layoutGraph(nodes, edges, opts = {}) { marginx = 20, marginy = 20, } = opts; - const g = new dagre.graphlib.Graph(); + const g = new dagre.graphlib.Graph({ multigraph: true }); g.setGraph({ rankdir, nodesep, edgesep, ranksep, marginx, marginy }); g.setDefaultEdgeLabel(() => ({})); nodes.forEach((n) => g.setNode(n.id, { width: nodeW, height: nodeH })); - edges.forEach((e) => g.setEdge(e.source, e.target)); + const parallelCount = new Map(); + const edgeRefs = []; + edges.forEach((e, index) => { + const key = `${e.source}->${e.target}`; + const parallelIndex = parallelCount.get(key) || 0; + parallelCount.set(key, parallelIndex + 1); + // 参考原 dagre-d3:基础边跨 2 个 rank,同组边逐条增加长度。 + const minlen = e.layoutMinlen || 2 + parallelIndex; + const name = `route-${index}`; + const labelWidth = e.label ? Math.min(190, Math.max(56, String(e.label).length * 13 + 20)) : 0; + g.setEdge( + e.source, + e.target, + { + minlen, + width: labelWidth, + height: e.label ? 30 : 0, + // 标签位于工序线本身;平行边已由独立锚点和 dagre edgesep 分开。 + labelpos: "c", + labeloffset: 0, + }, + name + ); + edgeRefs.push({ v: e.source, w: e.target, name }); + }); dagre.layout(g); - return nodes.map((n) => { + const laidOutNodes = nodes.map((n) => { const gn = g.node(n.id); return { ...n, position: { x: gn.x - nodeW / 2, y: gn.y - nodeH / 2 } }; }); + const laidOutEdges = edges.map((edge, index) => { + const ge = g.edge(edgeRefs[index]) || {}; + return { + ...edge, + data: { + ...edge.data, + dagrePoints: ge.points || [], + dagreLabel: Number.isFinite(ge.x) && Number.isFinite(ge.y) ? { x: ge.x, y: ge.y } : null, + }, + }; + }); + return { nodes: laidOutNodes, edges: laidOutEdges }; +} + +/** + * 为每条边分配独立的节点锚点,避免多条工序共用中心 Handle 产生重叠。 + * 同一节点上的锚点按相邻节点横坐标排序,可同时减少分支交叉。 + */ +export function assignEdgePorts(nodes, edges) { + const nodeMap = new Map(nodes.map((node) => [node.id, node])); + const outgoing = new Map(); + const incoming = new Map(); + + const routedEdges = edges.map((edge, index) => { + const sourceHandle = `route-out-${index}`; + const targetHandle = `route-in-${index}`; + if (!outgoing.has(edge.source)) outgoing.set(edge.source, []); + if (!incoming.has(edge.target)) incoming.set(edge.target, []); + outgoing.get(edge.source).push({ edgeIndex: index, handleId: sourceHandle, neighborId: edge.target }); + incoming.get(edge.target).push({ edgeIndex: index, handleId: targetHandle, neighborId: edge.source }); + return { ...edge, sourceHandle, targetHandle }; + }); + + const getCenterX = (id) => { + const node = nodeMap.get(id); + return node ? node.position.x + NODE_W / 2 : 0; + }; + const makePorts = (items = []) => + [...items] + .sort((a, b) => getCenterX(a.neighborId) - getCenterX(b.neighborId) || a.edgeIndex - b.edgeIndex) + .map((item, index, list) => ({ + id: item.handleId, + left: ((index + 1) * 100) / (list.length + 1), + })); + + const routedNodes = nodes.map((node) => ({ + ...node, + data: { + ...node.data, + sourcePorts: makePorts(outgoing.get(node.id)), + targetPorts: makePorts(incoming.get(node.id)), + }, + })); + + return { nodes: routedNodes, edges: routedEdges }; } diff --git a/src/components/xtFlowEditor.vue b/src/components/xtFlowEditor.vue index 0a02bef9..5802317c 100644 --- a/src/components/xtFlowEditor.vue +++ b/src/components/xtFlowEditor.vue @@ -80,6 +80,9 @@ + @@ -110,8 +113,9 @@ import { VueFlow, useVueFlow } from "@vue-flow/core"; import { Background } from "@vue-flow/background"; import { Controls } from "@vue-flow/controls"; import routeForm from "@/views/mtm/route_form.vue"; +import DagreEdge from "./flow/DagreEdge.vue"; import MaterialNode from "./flow/MaterialNode.vue"; -import { layoutGraph, NODE_W } from "./flow/dagreLayout"; +import { assignEdgePorts, layoutGraphWithEdges, NODE_W } from "./flow/dagreLayout"; import "@vue-flow/core/dist/style.css"; import "@vue-flow/core/dist/theme-default.css"; import "@vue-flow/controls/dist/style.css"; @@ -121,7 +125,7 @@ let flowSeq = 0; export default { name: "xtFlowEditor", - components: { VueFlow, Background, Controls, routeForm, MaterialNode }, + components: { VueFlow, Background, Controls, routeForm, DagreEdge, MaterialNode }, props: { // 工艺包 id routepack: { type: String, default: "" }, @@ -251,7 +255,6 @@ export default { const matKind = {}; const targetIds = new Set(); const edges = []; - const parallelEdgeCount = {}; this.routes.forEach((r) => { if (r.material_in == null || r.material_out == null) return; @@ -264,17 +267,13 @@ export default { targetIds.add(tid); const locked = !!r.from_route; - const edgeKey = sid + "->" + tid; - const edgeIndex = parallelEdgeCount[edgeKey] || 0; - parallelEdgeCount[edgeKey] = edgeIndex + 1; edges.push({ id: String(r.id), source: sid, target: tid, label: (r.process_name || "") + (locked ? " 🔒" : ""), data: { route: r, locked }, - type: "default", - pathOptions: { curvature: 0.25 + edgeIndex * 0.12 }, + type: "dagre", markerEnd: "arrowclosed", style: { stroke: locked ? "#c0c4cc" : "#409eff", @@ -312,22 +311,24 @@ export default { this.seedNodes = this.seedNodes.filter((s) => !routeNodeIds.has(s.id)); const prevCount = this.nodes.length; - this.edges = edges; - this.nodes = this.layoutNodes(routeNodes.concat(this.seedNodes), edges); + const routedGraph = this.layoutAndRoute(routeNodes.concat(this.seedNodes), edges); + this.nodes = routedGraph.nodes; + this.edges = routedGraph.edges; this.syncStore(); // 节点增减后 dagre 会整体重排,重新适配视野,避免“看着是空白其实有节点”导致拉线误吸附 if (this.hasFitted && this.nodes.length !== prevCount) this.fitToWidth(); }, - /** 编辑与查看使用一致的疏朗布局参数,给工序标签和分支留出空间 */ - layoutNodes(nodes, edges) { - return layoutGraph(nodes, edges, { - nodesep: 58, - edgesep: 32, - ranksep: 96, - marginx: 32, - marginy: 32, + /** 编辑与查看使用一致的 dagre-d3 布局参数,并保留边绕行点 */ + layoutAndRoute(nodes, edges) { + const laidOutGraph = layoutGraphWithEdges(nodes, edges, { + nodesep: 40, + edgesep: 25, + ranksep: 20, + marginx: 80, + marginy: 10, }); + return assignEdgePorts(laidOutGraph.nodes, laidOutGraph.edges); }, /** 把本地 nodes/edges 命令式同步到 Vue Flow store(先节点后边,避免边找不到端点) */ @@ -339,8 +340,11 @@ export default { /** 重新布局并适应画布 */ relayout() { - this.nodes = this.layoutNodes([...this.nodes], this.edges); + const routedGraph = this.layoutAndRoute([...this.nodes], this.edges); + this.nodes = routedGraph.nodes; + this.edges = routedGraph.edges; this.setNodes(this.nodes); + this.setEdges(this.edges); this.fitToWidth(); }, diff --git a/src/components/xtFlowViewer.vue b/src/components/xtFlowViewer.vue index 014b98e1..938f70f6 100644 --- a/src/components/xtFlowViewer.vue +++ b/src/components/xtFlowViewer.vue @@ -26,6 +26,9 @@ + @@ -41,8 +44,9 @@ import { VueFlow, useVueFlow } from "@vue-flow/core"; import { Background } from "@vue-flow/background"; import { Controls } from "@vue-flow/controls"; +import DagreEdge from "./flow/DagreEdge.vue"; import MaterialNode from "./flow/MaterialNode.vue"; -import { layoutGraph, NODE_W } from "./flow/dagreLayout"; +import { assignEdgePorts, layoutGraphWithEdges, NODE_W } from "./flow/dagreLayout"; import "@vue-flow/core/dist/style.css"; import "@vue-flow/core/dist/theme-default.css"; import "@vue-flow/controls/dist/style.css"; @@ -56,7 +60,7 @@ let viewerSeq = 0; */ export default { name: "xtFlowViewer", - components: { VueFlow, Background, Controls, MaterialNode }, + components: { VueFlow, Background, Controls, DagreEdge, MaterialNode }, props: { nodes: { type: Array, default: () => [] }, edges: { type: Array, default: () => [] }, @@ -120,25 +124,19 @@ export default { rebuild() { const sourceIds = new Set(); const targetIds = new Set(); - const parallelEdgeCount = {}; const rawEdges = (this.edges || []) .filter((e) => e.source != null && e.target != null) - .map((e) => { + .map((e, index) => { const sid = String(e.source); const tid = String(e.target); - const edgeKey = sid + "->" + tid; - const edgeIndex = parallelEdgeCount[edgeKey] || 0; - parallelEdgeCount[edgeKey] = edgeIndex + 1; sourceIds.add(sid); targetIds.add(tid); return { - id: e.id != null ? String(e.id) : sid + "-" + tid, + id: e.id != null ? String(e.id) : `${sid}-${tid}-${edgeIndex}`, source: sid, target: tid, label: e.label || "", - // 贝塞尔线会在分叉后立即分离;同一对节点有多道工序时用不同曲率错开。 - type: "default", - pathOptions: { curvature: 0.25 + edgeIndex * 0.12 }, + type: "dagre", markerEnd: "arrowclosed", style: { stroke: "#409eff", strokeWidth: 2.2 }, labelStyle: { fill: "#5b6370", fontSize: "12px", fontWeight: 500 }, @@ -161,17 +159,19 @@ export default { const nodeIds = new Set(vNodes.map((n) => n.id)); const vEdges = rawEdges.filter((e) => nodeIds.has(e.source) && nodeIds.has(e.target)); - this.renderedNodes = layoutGraph(vNodes, vEdges, { + const laidOutGraph = layoutGraphWithEdges(vNodes, vEdges, { rankdir: this.rankdir, - nodesep: 58, - edgesep: 32, - ranksep: 96, - marginx: 32, - marginy: 32, + nodesep: 40, + edgesep: 25, + ranksep: 20, + marginx: 80, + marginy: 10, }); + const routedGraph = assignEdgePorts(laidOutGraph.nodes, laidOutGraph.edges); + this.renderedNodes = routedGraph.nodes; this.setEdges([]); this.setNodes(this.renderedNodes); - this.setEdges(vEdges); + this.setEdges(routedGraph.edges); // 首次挂载交给 nodes-initialized(尺寸测量完成)再定位;数据更新时直接重新适配宽度 if (this.hasFitted) this.fitToWidth(); }, diff --git a/src/views/mtm/route_form.vue b/src/views/mtm/route_form.vue index aefbcd5d..5b04df8c 100644 --- a/src/views/mtm/route_form.vue +++ b/src/views/mtm/route_form.vue @@ -13,6 +13,7 @@ ref="dialogForm" :model="form" :rules="rules" + :disabled="mode === 'show'" label-position="right" label-width="100px" > @@ -197,7 +198,7 @@ - + @@ -226,9 +227,10 @@ - + - + + + +
@@ -66,14 +83,16 @@ + @@ -283,6 +307,9 @@ export default { flex: 1; min-height: 0; } +.rs-steps__clickable :deep(.el-table__row) { + cursor: pointer; +} /* 右侧工单/审批面板:与主体同底色,间距交给 ticketd 自身的内边距 */ .rs-aside { background: #f5f7fa; From 906d79dc259e14d2757a94401279d94d928dbe81 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 16:07:05 +0800 Subject: [PATCH 07/13] Fix route flow viewer height --- src/views/mtm/route_show.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/mtm/route_show.vue b/src/views/mtm/route_show.vue index 2aa4e53e..56d40d22 100644 --- a/src/views/mtm/route_show.vue +++ b/src/views/mtm/route_show.vue @@ -24,8 +24,7 @@ @tab-click="tabshandleClick"> - + @@ -284,7 +283,7 @@ export default { } .rs-flow__canvas { flex: 1; - min-height: 0; + min-height: 320px; } .rs-tabs { /* el-tabs 的空 content 默认会 flex-grow,多个流程图时会把下方画布挤出可视区 */ From fa459930b836f7b236bf3be79f1bbc9b13fce9c5 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 16:31:11 +0800 Subject: [PATCH 08/13] Fix route flow tabs height --- src/views/mtm/route_show.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/views/mtm/route_show.vue b/src/views/mtm/route_show.vue index 56d40d22..4c537ece 100644 --- a/src/views/mtm/route_show.vue +++ b/src/views/mtm/route_show.vue @@ -288,6 +288,7 @@ export default { .rs-tabs { /* el-tabs 的空 content 默认会 flex-grow,多个流程图时会把下方画布挤出可视区 */ flex: 0 0 auto; + height: auto; } .rs-tabs :deep(.el-tabs__header) { margin: 0 0 8px; From a0deb72736b16c514699e89e984485197328d394 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 27 Jul 2026 17:00:01 +0800 Subject: [PATCH 09/13] Improve route flow handle targeting --- src/components/flow/MaterialNode.vue | 21 +++++++++++++++++++-- src/components/xtFlowEditor.vue | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/components/flow/MaterialNode.vue b/src/components/flow/MaterialNode.vue index 71f93be3..0102e6c2 100644 --- a/src/components/flow/MaterialNode.vue +++ b/src/components/flow/MaterialNode.vue @@ -117,12 +117,29 @@ export default { padding: 0; } .vue-flow__handle { + display: flex; + align-items: center; + justify-content: center; + width: 56px; + height: 56px; + border-radius: 50%; + background: transparent; + border: 0; + cursor: crosshair; +} +.vue-flow__handle::after { + content: ""; width: 9px; height: 9px; - background: #fff; border: 2px solid #409eff; + border-radius: 50%; + background: #fff; + transition: width 0.15s, height 0.15s, background 0.15s, box-shadow 0.15s; } -.vue-flow__handle:hover { +.vue-flow__handle:hover::after { + width: 13px; + height: 13px; background: #409eff; + box-shadow: 0 0 0 4px rgba(64, 158, 255, 0.18); } diff --git a/src/components/xtFlowEditor.vue b/src/components/xtFlowEditor.vue index 5802317c..cc25125a 100644 --- a/src/components/xtFlowEditor.vue +++ b/src/components/xtFlowEditor.vue @@ -63,7 +63,7 @@ :max-zoom="2" :pan-on-scroll="true" :zoom-on-scroll="false" - :connection-radius="8" + :connection-radius="56" :connect-on-click="false" :nodes-draggable="true" :nodes-connectable="!readonly" From 49f0e94fe0c97314d7e2fe83d35dcc6151470334 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Jul 2026 09:26:29 +0800 Subject: [PATCH 10/13] =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BA=A7=E5=87=BA=E5=BA=93=E5=AD=98=E5=BD=92=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mtm/process.vue | 14 +++++++------- src/views/mtm/process_form.vue | 20 +++++++++++++++----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/src/views/mtm/process.vue b/src/views/mtm/process.vue index 2ab1573d..8873f000 100644 --- a/src/views/mtm/process.vue +++ b/src/views/mtm/process.vue @@ -59,14 +59,9 @@ - + @@ -211,6 +206,11 @@ export default { 20:'切分', 30:'结合' }, + wmScopes:{ + 10:'工段', + 20:'部门', + 30:'全局' + }, currentItem:{}, selectValue:[], visible:false, diff --git a/src/views/mtm/process_form.vue b/src/views/mtm/process_form.vue index 405d00d0..d9ca811c 100644 --- a/src/views/mtm/process_form.vue +++ b/src/views/mtm/process_form.vue @@ -84,10 +84,15 @@ - - + + + + @@ -133,7 +138,7 @@ const defaultForm = { mtype:10, belong_dept: "", wpr_number_rule: "", - into_wm_mgroup: true, + into_wm_scope: 10, store_notok: true, has_ok_b_defect:false, }; @@ -165,6 +170,11 @@ export default { {name:'切分',value:20}, {name:'结合',value:30}, ], + wmScopeOptions:[ + {name:'工段',value:10}, + {name:'部门',value:20}, + {name:'全局',value:30}, + ], visible: false, isSaveing: false, deptOptions: [], From 627711e14b357f6eb3f2feed3e3d788962b30d9f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Jul 2026 12:16:18 +0800 Subject: [PATCH 11/13] Default process inventory scope to department --- src/views/mtm/process_form.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/mtm/process_form.vue b/src/views/mtm/process_form.vue index d9ca811c..0b4cef92 100644 --- a/src/views/mtm/process_form.vue +++ b/src/views/mtm/process_form.vue @@ -138,7 +138,7 @@ const defaultForm = { mtype:10, belong_dept: "", wpr_number_rule: "", - into_wm_scope: 10, + into_wm_scope: 20, store_notok: true, has_ok_b_defect:false, }; From ac3dc576c23c10cc4df556bd421ddaf93cdfd18e Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Jul 2026 13:30:19 +0800 Subject: [PATCH 12/13] Fix missing check table refresh handler --- src/views/wpm_bx/mlog_detail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/wpm_bx/mlog_detail.vue b/src/views/wpm_bx/mlog_detail.vue index c123253b..7e22bbde 100644 --- a/src/views/wpm_bx/mlog_detail.vue +++ b/src/views/wpm_bx/mlog_detail.vue @@ -957,7 +957,7 @@ export default { if(that.mlogItem.material_out_&&that.mlogItem.material_out_.tracking==10){ that.$refs.tableOut.refresh(); }else{ - that.$refs.checkTable.refreshfun(); + that.$refs.checkTable?.refreshfun?.(); } //删除in记录后,out也要删除相应的记录 }); @@ -1060,7 +1060,7 @@ export default { if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){ this.$refs.tableOut.refresh(); }else{ - this.$refs.checkTable.refreshfun(); + this.$refs.checkTable?.refreshfun?.(); } }, handleCheckSuccess() { @@ -1081,7 +1081,7 @@ export default { if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){ this.$refs.tableOut.refresh(); }else{ - this.$refs.checkTable.refreshfun(); + this.$refs.checkTable?.refreshfun?.(); } }, //编辑成功后的方法调用 @@ -1099,7 +1099,7 @@ export default { if(this.mlogItem.material_out_&&this.mlogItem.material_out_.tracking==10){ this.$refs.tableOut.refresh(); }else{ - this.$refs.checkTable.refreshfun(); + this.$refs.checkTable?.refreshfun?.(); } }, checkDialogClose(){ From e990c4e150b884a6cbeef2246bf5751805ee31a2 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 28 Jul 2026 15:39:54 +0800 Subject: [PATCH 13/13] Fix handover expand toggle --- src/components/scTable/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 7056b838..4349fab9 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -13,7 +13,7 @@ + @filter-change="filterChange" @selection-change="selectionChange" @expand-change="handleExpandChange">