加入创建功能卡片文字推送到助手中
This commit is contained in:
@@ -3,9 +3,42 @@ import { NODE_TYPE, NODE_DATATYPE } from '../tools/index.d'
|
||||
import { ElMessageBox } from 'element-plus'
|
||||
import i18n from '@/lang'
|
||||
import { putSketchFlowCanvas } from '@/api/flow-canvas'
|
||||
import myEvent from '@/utils/myEvent'
|
||||
|
||||
const t = i18n.global.t
|
||||
|
||||
//推送到对话框的助手
|
||||
const chatAssistant = {
|
||||
[NODE_DATATYPE.TO_REAL_STYLE]:{
|
||||
content: t('flowCanvas.toRealStyleDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.TO_REAL_STYLE,
|
||||
},
|
||||
[NODE_DATATYPE.CANVAS_MODE]:{
|
||||
content: t('flowCanvas.surfaceEditCanvasDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.CANVAS_MODE,
|
||||
},
|
||||
[NODE_DATATYPE.SURFACE_EDIT]:{
|
||||
content: t('flowCanvas.surfaceEditAIDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.SURFACE_EDIT,
|
||||
},
|
||||
[NODE_DATATYPE.COLOR_PALETTE]:{
|
||||
content: t('flowCanvas.colorPaletteDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.COLOR_PALETTE,
|
||||
},
|
||||
[NODE_DATATYPE.SCENE_COMPOSITION]:{
|
||||
content: t('flowCanvas.threeModelDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.SCENE_COMPOSITION,
|
||||
},
|
||||
[NODE_DATATYPE.TO_3D_MODEL]:{
|
||||
content: t('flowCanvas.threeModelDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.TO_3D_MODEL,
|
||||
},
|
||||
[NODE_DATATYPE.TO_3VIEW]:{
|
||||
content: t('flowCanvas.threeModelDesignAssistant'),
|
||||
nodeType:NODE_DATATYPE.TO_3VIEW,
|
||||
},
|
||||
}
|
||||
|
||||
export interface NodesItem {
|
||||
id: string
|
||||
type: string
|
||||
@@ -117,6 +150,7 @@ export class StateManager {
|
||||
this.nodes.value.push(node);
|
||||
this.recordState()
|
||||
this.exportFlow()
|
||||
if(chatAssistant[node.data.type])myEvent.emit('assistantPushChat',chatAssistant[node.data.type])
|
||||
}
|
||||
/** 删除节点 */
|
||||
async deleteNode(id: string) {
|
||||
@@ -133,7 +167,7 @@ export class StateManager {
|
||||
getSuperiorNodeImage(superiorID: string) {
|
||||
const superiorNode = this.getNodeById(superiorID)
|
||||
if(!superiorNode){
|
||||
ElMessage.error(t('flowCanvas.cannotFindSuperiorImage'))
|
||||
// ElMessage.error(t('flowCanvas.cannotFindSuperiorImage'))
|
||||
return null
|
||||
}
|
||||
const superiorNodeUrl = superiorNode.data.data.imageProcessTasks.filter((item)=>{
|
||||
|
||||
Reference in New Issue
Block a user