diff --git a/src/api/flow-canvas.ts b/src/api/flow-canvas.ts
index ad2e4dc..0eae81b 100644
--- a/src/api/flow-canvas.ts
+++ b/src/api/flow-canvas.ts
@@ -279,3 +279,24 @@ export const threeToThreeViewsApi = (data:threeToThreeViewsData) => {
}
})
}
+
+/**
+ * 根据sketchId更新VersionNode的sketch的URL值
+ * @param data 根据sketchId更新VersionNode的sketchL值的参数
+ * @param data.sketchId sketch id
+ * @param data.newUrl 生成的3d模型地址
+ * @returns 根据sketchId更新VersionNode的sketch的URL值
+ */
+export interface threeToThreeViewsData {
+ sketchId?: string
+ newUrl?: string
+}
+export const updateVersionSketchUrlApi = (data:threeToThreeViewsData) => {
+ return request({
+ url: `/api/canvas/sketchIdAndUrl/${data.sketchId}`,
+ method: 'put',
+ data:{
+ newUrl: data.newUrl,
+ }
+ })
+}
diff --git a/src/components/Canvas/FlowCanvas/components/nodes/cards/cards-select.vue b/src/components/Canvas/FlowCanvas/components/nodes/cards/cards-select.vue
index 77e665b..8bb856b 100644
--- a/src/components/Canvas/FlowCanvas/components/nodes/cards/cards-select.vue
+++ b/src/components/Canvas/FlowCanvas/components/nodes/cards/cards-select.vue
@@ -12,7 +12,7 @@
"
>
-
+
{{ v.title }}
@@ -63,6 +63,25 @@
},
]
}
+ },{
+ tier: NODE_DATATIER.SURFACE_EDIT_,
+ type: NODE_DATATYPE.SURFACE_EDIT_,
+ title: t('FlowCanvas.surfaceEditTitle'),
+ secondaryMenu: {
+ title: t('FlowCanvas.surfaceEditTitle'),
+ icon: NODE_DATATYPE.SURFACE_EDIT_,
+ selectList: [
+ {
+ tier: NODE_DATATIER.CANVAS_MODE_,
+ type: NODE_DATATYPE.CANVAS_MODE_,
+ title: t('FlowCanvas.surfaceEditCanvasTitle'),
+ },{
+ tier: NODE_DATATIER.Fast_MODE_,
+ type: NODE_DATATYPE.Fast_MODE_,
+ title: t('FlowCanvas.surfaceEditTitle'),
+ },
+ ]
+ }
},
{
tier: NODE_DATATIER.SCENE_COMPOSITION,
diff --git a/src/components/Canvas/FlowCanvas/components/nodes/cards/fast-mode.vue b/src/components/Canvas/FlowCanvas/components/nodes/cards/fast-mode.vue
index 007b5ea..bbc4ac4 100644
--- a/src/components/Canvas/FlowCanvas/components/nodes/cards/fast-mode.vue
+++ b/src/components/Canvas/FlowCanvas/components/nodes/cards/fast-mode.vue
@@ -13,6 +13,7 @@
import myEvent from '@/utils/myEvent'
import { getCurrentTime } from '../../../../tools/tools.ts'
import { NODE_DATATIER } from '../../../tools/index.d'
+ import { updateVersionSketchUrlApi } from '@/api/flow-canvas'
const attrs = useAttrs()
const stateManager = inject('stateManager') as any
const nodeManager = inject('nodeManager') as any
@@ -24,7 +25,7 @@
return {
}
}
- const opCanvas = ()=>{
+ const opCanvas = (tier)=>{
const superiorNodeUrl = stateManager.getSuperiorNodeImage(attrs?.node?.data?.superiorID || null)
if (!superiorNodeUrl) console.log('superiorNodeUrl 找不到原始图片')
const data = {
@@ -46,7 +47,7 @@
superiorID: attrs.node.id,
superiorNodeType: attrs.node?.data?.type,
createIndexPosition: 0 + subordNodes.length,
- tier: NODE_DATATIER.RESULT_IMAGE,
+ tier,
isActive: subordNodes.length == 0,
data: {
imageProcessTasks:[workbenchData],
@@ -54,6 +55,11 @@
}
}
})
+ //更新VersionNode的sketchIDAndUrl中指定key的URL值
+ updateVersionSketchUrlApi({
+ sketchId: stateManager.sketchId.value,
+ newUrl: options.url,
+ })
},
}
eventManager.removeEvents()
diff --git a/src/components/Canvas/FlowCanvas/components/nodes/cards/index.vue b/src/components/Canvas/FlowCanvas/components/nodes/cards/index.vue
index 878283c..7693726 100644
--- a/src/components/Canvas/FlowCanvas/components/nodes/cards/index.vue
+++ b/src/components/Canvas/FlowCanvas/components/nodes/cards/index.vue
@@ -3,7 +3,7 @@