feat(flow): add visual step groups and associate the large fixture with the fast scan plan
This commit is contained in:
parent
83cb972881
commit
e0de5764ef
@ -6,7 +6,7 @@ import java.util.Map;
|
||||
public final class FixtureScanDefaults {
|
||||
private static final Map<String, String> CASES = Map.of(
|
||||
"REAL-SCAN-20261028-001-MIDDLE", "c090028d47474d03b7cc2f8d77740abf",
|
||||
"REAL-SCAN-20261028-001-LARGE", "8b0c888b013347c08df1a7167f721a83",
|
||||
"REAL-SCAN-20261028-001-LARGE", "a78c5207d7694608981e47e7f75b51d6",
|
||||
"REAL-SCAN-20261028-001-SMALL", "88913757c6564826aa5d05946ccb702e",
|
||||
"CHEJIA", "9d0cafd84a50441aaec78f7f11cde189"
|
||||
);
|
||||
|
||||
@ -36,6 +36,11 @@
|
||||
class="node-item"
|
||||
draggable="true"
|
||||
@dragstart="handleDragCustom($event, node)"
|
||||
:role="node.visualOnly ? 'button' : undefined"
|
||||
:tabindex="node.visualOnly ? 0 : undefined"
|
||||
@click="node.visualOnly && emit('create-group')"
|
||||
@keydown.enter.prevent="node.visualOnly && emit('create-group')"
|
||||
@keydown.space.prevent="node.visualOnly && emit('create-group')"
|
||||
>
|
||||
<div class="node-icon"><img :src="node.icon" alt="" /></div>
|
||||
<div class="node-content">
|
||||
@ -58,6 +63,7 @@ import { Rank, Search } from "@element-plus/icons-vue";
|
||||
import { componentLibraryGroups } from "../config";
|
||||
|
||||
const props = defineProps({ flowId: String })
|
||||
const emit = defineEmits(['create-group'])
|
||||
|
||||
const keyword = ref("");
|
||||
const activeNames = ref(componentLibraryGroups[0] ? [componentLibraryGroups[0].collapseTitle] : []);
|
||||
|
||||
@ -15,6 +15,7 @@ import dialogueSvg from './icon/dialogue.svg'
|
||||
import audioSvg from './icon/audio.svg'
|
||||
import touchSvg from './icon/touch.svg'
|
||||
import expressionSvg from './icon/expression.svg'
|
||||
import groupSvg from './icon/group.svg'
|
||||
import { DEFAULT_CHAT_SYSTEM_PROMPT } from './chatPrompt.js'
|
||||
import scannerSvg from './icon/scanner.svg'
|
||||
import motorSvg from './icon/motor.svg'
|
||||
@ -192,6 +193,14 @@ const componentGroups = [
|
||||
{
|
||||
collapseTitle: "功能",
|
||||
nodeList: [
|
||||
{
|
||||
icon: groupSvg,
|
||||
name: "步骤分组框",
|
||||
type: "selectArea",
|
||||
action: 'NONE',
|
||||
visualOnly: true,
|
||||
desc: "选择多个步骤,添加可重命名的外框,仅用于整理显示",
|
||||
},
|
||||
{
|
||||
icon: loopSvg,
|
||||
name: "循环",
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
<template #dropdown><el-dropdown-menu>
|
||||
<el-dropdown-item :disabled="draftSaving || trialPreparing || ['testRunning', 'pause'].includes(flowState)" @click="deployFlow({ force: true })">强制发布(无需试运行)</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="['testRunning', 'pause'].includes(flowState)" @click="openVersionHistory">发布记录</el-dropdown-item>
|
||||
<el-dropdown-item v-if="!groupSelectionPending" @click="group">分组节点</el-dropdown-item>
|
||||
<el-dropdown-item v-if="!groupSelectionPending" @click="group">添加分组框</el-dropdown-item>
|
||||
<el-dropdown-item :disabled="flowState === 'testRunning' || restoreOperationalLoading" @click="openRestoreOperationalDialog">清除错误状态</el-dropdown-item>
|
||||
<el-dropdown-item v-if="hasRunResult" divided @click="clearRun">清除运行结果</el-dropdown-item>
|
||||
</el-dropdown-menu></template>
|
||||
@ -112,6 +112,7 @@
|
||||
</el-header>
|
||||
<el-alert v-if="controlAction === 'stop'" title="终止中,正在等待设备停止并确认资源释放,请勿重复操作。" type="info" :closable="false" show-icon />
|
||||
<el-alert v-else-if="controlError" :title="controlError" type="warning" :closable="false" show-icon />
|
||||
<el-alert v-if="groupSelectionPending" title="请在画布空白处拖动,框选需要整理的多个步骤。创建后可点击框标题旁的铅笔重命名,步骤和连线保持原样。" type="info" :closable="false" show-icon />
|
||||
<section v-if="validationIssues.length" class="flow-validation" aria-label="流程校验问题">
|
||||
<strong>校验未通过:{{ validationIssues.length }} 个节点需要检查</strong>
|
||||
<div class="flow-validation__list">
|
||||
@ -124,7 +125,7 @@
|
||||
</section>
|
||||
<el-container class="flow-workspace">
|
||||
<el-aside v-if="!flowStore.disableForm && paletteVisible" class="flow-palette">
|
||||
<Aside :flowId="flowInfoData.itemId" />
|
||||
<Aside :flowId="flowInfoData.itemId" @create-group="group" />
|
||||
</el-aside>
|
||||
<el-main>
|
||||
<div class="canvas-toolbar">
|
||||
@ -135,6 +136,7 @@
|
||||
<el-button aria-label="重做" @click="lf.redo()"><el-icon><RefreshRight /></el-icon></el-button>
|
||||
</el-tooltip>
|
||||
<span v-if="!flowStore.disableForm" class="canvas-toolbar__divider"></span>
|
||||
<el-button v-if="!flowStore.disableForm" :type="groupSelectionPending ? 'primary' : 'default'" @click="group">{{ groupSelectionPending ? '取消分组' : '添加分组框' }}</el-button>
|
||||
<el-tooltip content="适应视图" placement="bottom">
|
||||
<el-button aria-label="适应视图" @click="fitView"><el-icon><FullScreen /></el-icon></el-button>
|
||||
</el-tooltip>
|
||||
@ -565,6 +567,10 @@ const drop = (e) => {
|
||||
let node = e.dataTransfer.getData("flowNode");
|
||||
if (!node) return;
|
||||
node = JSON.parse(node);
|
||||
if (node.type === "selectArea" && node.visualOnly) {
|
||||
if (!flowStore.disableForm && !groupSelectionPending.value) group();
|
||||
return;
|
||||
}
|
||||
const point = lf.getPointByClient(e.clientX, e.clientY);
|
||||
const loopNode = findLoopAtPoint(point.canvasOverlayPosition);
|
||||
if (["stopLoop", "subEnd", "subStart", "currentLoop"].includes(node.type) && !loopNode) {
|
||||
@ -853,6 +859,9 @@ const handleNodeDragStop = (payload) => {
|
||||
* @param {*} changes 变更集合
|
||||
*/
|
||||
const handleNodesChange = (changes) => {
|
||||
if (changes.some((change) => change.type === "dimensions")) {
|
||||
nextTick(() => lf.refreshVisualGroups());
|
||||
}
|
||||
if (changes.some((change) => ["add", "remove"].includes(change.type) || (change.type === "position" && change.dragging === false))) {
|
||||
lf.markChanged();
|
||||
}
|
||||
@ -1941,13 +1950,10 @@ const initFlow = () => {
|
||||
const groupSelectionPending = ref(false);
|
||||
|
||||
const createGroup = (selectedNodes) => {
|
||||
const nodes = selectedNodes.filter((item) => (
|
||||
!["selectArea", "loop"].includes(item.type)
|
||||
&& !lf.getNodeModelById(item.id)?.parentId
|
||||
));
|
||||
const nodes = selectedNodes.filter((item) => item.type !== "selectArea");
|
||||
if (nodes.length < 2) {
|
||||
ElMessage.warning("请至少选择两个未分组节点");
|
||||
groupSelectionPending.value = false;
|
||||
ElMessage.warning("请至少选择两个步骤");
|
||||
groupSelectionPending.value = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1978,8 +1984,9 @@ const createGroup = (selectedNodes) => {
|
||||
x: minX - INSET.left + width / 2,
|
||||
y: minY - INSET.top + height / 2,
|
||||
properties: {
|
||||
name: "分组",
|
||||
name: "步骤分组",
|
||||
action: "NONE",
|
||||
visualOnly: true,
|
||||
width,
|
||||
height,
|
||||
},
|
||||
@ -1989,6 +1996,7 @@ const createGroup = (selectedNodes) => {
|
||||
};
|
||||
|
||||
const group = () => {
|
||||
if (flowStore.disableForm) return;
|
||||
if (groupSelectionPending.value) {
|
||||
groupSelectionPending.value = false;
|
||||
lf.clearSelectElements();
|
||||
|
||||
@ -3,18 +3,18 @@
|
||||
* 作用范围:仅服务于流程设计器模块。
|
||||
-->
|
||||
<template>
|
||||
<div class="group__container">
|
||||
<div class="group__container" :class="{ 'group__container--visual': props.properties?.visualOnly }">
|
||||
<NodeTitle
|
||||
:icon="group"
|
||||
:nodeId="props.model.id"
|
||||
:nodeProperties="props.properties"
|
||||
:nodeName="props.properties?.name || '分组'"
|
||||
nodeType="selectArea"
|
||||
nodeDesc="组织相关流程节点"
|
||||
:nodeDesc="props.properties?.visualOnly ? '仅整理显示,步骤和连线保持原样' : '组织相关流程节点'"
|
||||
@setNodeName="setNodeName"
|
||||
/>
|
||||
<div class="group-summary">
|
||||
<span>分组区域</span>
|
||||
<span>{{ props.properties?.visualOnly ? '步骤分组框' : '分组区域' }}</span>
|
||||
<span class="group-summary__count">{{ props.childCount || 0 }} 个节点</span>
|
||||
</div>
|
||||
<div class="child__container">
|
||||
@ -124,5 +124,16 @@ onMounted(() => {
|
||||
.el-row {
|
||||
align-items: end;
|
||||
}
|
||||
|
||||
&--visual {
|
||||
background: transparent;
|
||||
border: 2px dashed var(--el-color-primary-light-5);
|
||||
pointer-events: none;
|
||||
|
||||
&::before { background: var(--el-color-primary); }
|
||||
:deep(.node-title), .group-summary { pointer-events: auto; }
|
||||
:deep(.node-title) { width: 440px; max-width: 100%; }
|
||||
.child__container { background: transparent; border: 0; }
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -131,7 +131,9 @@ const executionLabel = computed(() => executionTargetLabel(
|
||||
));
|
||||
const nodeComponent = computed(() => componentMap[flowType.value] || ServiceNode);
|
||||
const isGroup = computed(() => ["loop", "selectArea"].includes(flowType.value));
|
||||
const childNodeCount = computed(() => viewIndex.childCounts.value.get(props.id) || 0);
|
||||
const childNodeCount = computed(() => properties.value.visualOnly
|
||||
? (properties.value.memberIds || []).filter((id) => vueFlow.findNode(id)).length
|
||||
: viewIndex.childCounts.value.get(props.id) || 0);
|
||||
const showTarget = computed(() => !["start", "subStart", "selectArea"].includes(flowType.value));
|
||||
const showSource = computed(() => !["end", "stopLoop", "subEnd", "selectArea", "branch"].includes(flowType.value));
|
||||
const targetHandleId = computed(() => flowType.value === "branch" ? `${props.id}_entry` : `${props.id}_3`);
|
||||
|
||||
@ -183,11 +183,12 @@ const toVueNode = (node, sizeOverride, positionOverride) => {
|
||||
type: "flow-node",
|
||||
position,
|
||||
...dimensions,
|
||||
draggable: normalized.draggable !== false,
|
||||
draggable: normalized.properties.visualOnly ? false : normalized.draggable !== false,
|
||||
selectable: true,
|
||||
deletable: !SOURCE_ONLY_TYPES.has(normalized.type) && normalized.type !== "end",
|
||||
connectable: true,
|
||||
zIndex: GROUP_TYPES.has(normalized.type) ? 0 : 2,
|
||||
...(normalized.properties.visualOnly ? { style: { pointerEvents: "none" } } : {}),
|
||||
data: {
|
||||
flowType: normalized.type,
|
||||
properties: normalized.properties,
|
||||
@ -247,6 +248,7 @@ const attachChildrenToGroups = (nodes) => {
|
||||
const absolutePositions = new Map(nodes.map((node) => [node.id, { ...node.position }]));
|
||||
|
||||
nodes.filter((node) => GROUP_TYPES.has(node.data.flowType)).forEach((group) => {
|
||||
if (group.data.properties?.visualOnly) return;
|
||||
(group.data.children || []).forEach((childId) => {
|
||||
if (!declaredParents.has(childId)) declaredParents.set(childId, group.id);
|
||||
});
|
||||
@ -460,6 +462,7 @@ export const createFlowFacade = (store) => {
|
||||
*/
|
||||
const changed = () => {
|
||||
if (historySuspended) return;
|
||||
refreshVisualGroups();
|
||||
const snapshot = recordHistory();
|
||||
emit("history:change", snapshot);
|
||||
};
|
||||
@ -480,6 +483,38 @@ export const createFlowFacade = (store) => {
|
||||
};
|
||||
};
|
||||
|
||||
// 展示分组只记录成员 ID,不创建父子关系,也不移动或改写成员。
|
||||
// 成员位置或尺寸改变后,外框自动包住当前区域。
|
||||
const refreshVisualGroups = () => {
|
||||
getNodes().filter((node) => node.data.flowType === "selectArea" && node.data.properties?.visualOnly)
|
||||
.forEach((group) => {
|
||||
const members = (group.data.properties.memberIds || [])
|
||||
.map((id) => store.findNode(id))
|
||||
.filter((node) => node && node.data.flowType !== "selectArea");
|
||||
const memberIds = members.map((node) => node.id);
|
||||
if (!members.length) {
|
||||
if ((group.data.properties.memberIds || []).length) {
|
||||
store.updateNodeData(group.id, { ...group.data, properties: { ...group.data.properties, memberIds } });
|
||||
}
|
||||
return;
|
||||
}
|
||||
const rects = members.map(getNodeRect);
|
||||
const x = Math.min(...rects.map((rect) => rect.x)) - 52;
|
||||
const y = Math.min(...rects.map((rect) => rect.y)) - 120;
|
||||
const width = Math.max(...rects.map((rect) => rect.x + rect.width)) + 52 - x;
|
||||
const height = Math.max(...rects.map((rect) => rect.y + rect.height)) + 52 - y;
|
||||
if (group.position.x === x && group.position.y === y
|
||||
&& group.data.size?.width === width && group.data.size?.height === height
|
||||
&& JSON.stringify(group.data.properties.memberIds) === JSON.stringify(memberIds)) return;
|
||||
store.updateNode(group.id, { position: { x, y }, width, height });
|
||||
store.updateNodeData(group.id, {
|
||||
...group.data,
|
||||
size: { width, height },
|
||||
properties: { ...group.data.properties, memberIds, width, height },
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取 getLoopLayoutState 对应的数据或交互;作用范围仅限画布适配层。
|
||||
* @param {*} group 调用方传入的 group 参数
|
||||
@ -707,6 +742,7 @@ export const createFlowFacade = (store) => {
|
||||
},
|
||||
emit,
|
||||
markChanged: changed,
|
||||
refreshVisualGroups,
|
||||
/**
|
||||
* 获取 getGraphData 对应的数据或交互;作用范围仅限画布适配层。
|
||||
*/
|
||||
@ -1013,6 +1049,18 @@ export const createFlowFacade = (store) => {
|
||||
* @param {*} childIds 子节点 ID 集合
|
||||
*/
|
||||
groupNodes(groupNode, childIds = []) {
|
||||
if (groupNode.properties?.visualOnly) {
|
||||
const memberIds = [...new Set(childIds)].filter((id) => {
|
||||
const node = store.findNode(id);
|
||||
return node && node.data.flowType !== "selectArea";
|
||||
});
|
||||
if (memberIds.length < 2) return null;
|
||||
return facade.addNode({
|
||||
...clone(groupNode),
|
||||
type: "selectArea",
|
||||
properties: { ...clone(groupNode.properties), action: "NONE", memberIds },
|
||||
});
|
||||
}
|
||||
// 先计算选中节点的外接矩形确定容器尺寸,再把子节点坐标转换为容器内相对坐标。
|
||||
// 与分组外节点相连的边保持不变,此处仅更新节点层级和几何信息。
|
||||
const graph = facade.getGraphData();
|
||||
@ -1050,6 +1098,13 @@ export const createFlowFacade = (store) => {
|
||||
* @param {*} groupId 分组节点 ID
|
||||
*/
|
||||
ungroup(groupId) {
|
||||
const vueGroup = store.findNode(groupId);
|
||||
if (vueGroup?.data.flowType === "selectArea" && vueGroup.data.properties?.visualOnly) {
|
||||
store.removeNodes(groupId, false, false);
|
||||
componentInstances.delete(groupId);
|
||||
changed();
|
||||
return true;
|
||||
}
|
||||
const graph = facade.getGraphData();
|
||||
const group = graph.nodes.find((node) => node.id === groupId && node.type === "selectArea");
|
||||
if (!group) return false;
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
| 夹具编号 | 默认扫描方案 ID | 扫描方案 |
|
||||
| --- | --- | --- |
|
||||
| REAL-SCAN-20261028-001-MIDDLE | c090028d47474d03b7cc2f8d77740abf | 中型夹具扫描路径 全流程 |
|
||||
| REAL-SCAN-20261028-001-LARGE | 8b0c888b013347c08df1a7167f721a83 | 大型夹具扫描路径 全流程 |
|
||||
| REAL-SCAN-20261028-001-LARGE | a78c5207d7694608981e47e7f75b51d6 | 大型夹具扫描路径 全流程 - 快速版 |
|
||||
| REAL-SCAN-20261028-001-SMALL | 88913757c6564826aa5d05946ccb702e | 小型夹具扫描路径 全流程 |
|
||||
| CHEJIA | 9d0cafd84a50441aaec78f7f11cde189 | 车架扫描方案-参数化自动路径 |
|
||||
|
||||
|
||||
32
deploy/windows11/RELEASE-20261124-all-platform-changes.md
Normal file
32
deploy/windows11/RELEASE-20261124-all-platform-changes.md
Normal file
@ -0,0 +1,32 @@
|
||||
# 2026-11-24 平台代码发布
|
||||
|
||||
## 本次汇总
|
||||
|
||||
1. **PDF 下载**:报告生成后,结果页和预览窗口可直接下载 PDF,不再要求先完成 STL/PDF 成套归档。未归档报告读取计算服务当前已生成的 PDF,已归档报告继续读取保存的版本。保留租户、任务访问、文件下载权限和报告就绪检查。
|
||||
2. **无图纸比对**:仅有三维数模和扫描 PLY 时,可不选检测计划,直接生成表面偏差图。选用二维图纸时仍须明确选择启用的检测计划;失效计划、资料未保存、计算服务不可用和重复提交仍会被阻止。
|
||||
3. **夹具默认方案**:车架夹具 `CHEJIA` 默认关联参数化自动路径 `9d0cafd84a50441aaec78f7f11cde189`;大型支架夹具 `REAL-SCAN-20261028-001-LARGE` 按用户本次要求改为快速版 `a78c5207d7694608981e47e7f75b51d6`。中小型关联保持。管理页和准备页共用这份关联配置,更新后生效。既有任务的已保存方案与冻结版本不改写,不自动发布或运行扫描流程。
|
||||
4. **步骤分组框**:组件库、工具栏和更多菜单均可添加显示分组,支持重命名,成员移动或尺寸变化后自动调整边框。只保存成员 ID,不改变步骤的循环层级、位置、连接或执行参数;删除分组框保留成员和连线,支持撤销、重做与保存重开。
|
||||
|
||||
同日已在远端的 `0b8d283` 修复了流程暂停时的机械臂坐标系应用状态保留,本次继续保留,并复核相关暂停清理与运动流程回归。
|
||||
|
||||
## 验证
|
||||
|
||||
- 前端 24 项检查通过,覆盖原有流程适配、视图索引、坐标转换、资料展示,以及新增分组行为和无图纸比对规则。
|
||||
- 后端 16 项检查通过,覆盖夹具精确关联、无计划比对规则、机械臂暂停清理与工作流适配;完整后端可执行包构建通过。
|
||||
- PDF 下载此前的 8 项独立验证通过;前端 standalone 完整构建通过。
|
||||
- 更新脚本语法及拉取、前后端构建、标准增量升级、空闲确认、停止/启动、健康检查和部署记录路径已核对。
|
||||
- 本次临时验证源码及产物清理,不保留为项目新增回归测试;原有测试保留。验证不执行现场设备动作。
|
||||
|
||||
## 正式更新
|
||||
|
||||
没有新增依赖、私有配置、菜单、字典或表结构,不需要专项迁移。保持正式环境既有设备地址、密钥、QUIC、证书、数据卷和业务文件,不能同步开发数据或重新初始化业务库。
|
||||
|
||||
正式环境 AI 收到用户更新通知并确认现场空闲后,在原仓库执行:
|
||||
|
||||
```powershell
|
||||
pwsh -NoProfile -File deploy/windows11/update.ps1 -CheckOnly
|
||||
pwsh -NoProfile -File deploy/windows11/update.ps1 -ConfirmStopped
|
||||
pwsh -NoProfile -File deploy/windows11/manage.ps1 -Action Status
|
||||
```
|
||||
|
||||
先保留并核对正式仓库本地改动,不执行强制重置。更新后核对 `.local/standalone/deployment.json` 提交号和 JAR 校验值,以及 48090、5180、网页代理健康;只读抽查未归档报告 PDF 下载、大型夹具快速版关联、车架默认方案、无图纸比对入口和分组框。代码推送完成与正式平台更新完成分别报告。
|
||||
Loading…
Reference in New Issue
Block a user