diff --git a/src/store/conversation.ts b/src/store/conversation.ts index a7b57ece8734fe34e7e2ae70fd1165855f4f630e..9bee998b77d29f143781218ddeef9efbd1e1e4e2 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -570,7 +570,7 @@ export const useSessionStore = defineStore('conversation', () => { // 初次生成 ,创建一个问题和一个回答 const ind = conversationList.value.length - 1; const a = new MessageArray(); - a.addItem('', '', 2); + a.addItem('', '', 'none'); conversationList.value.push( { cid: ind + 1, diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue index 4fc065761b376674aa86462224fe2bbcfa4286d7..8eb9a89db35c2f154d41c4607fe2e4296b06e943 100644 --- a/src/views/createapp/components/workFlow.vue +++ b/src/views/createapp/components/workFlow.vue @@ -664,7 +664,6 @@ const saveFlow = (updateNodeParameter?) => { ) .then((res) => { if (res[1]?.result) { - ElMessage.success('工作流更新成功'); queryFlow('update'); const updatedCurFlow = res[1].result.flow; console.log(res[1].result); diff --git a/src/views/createapp/components/workFlowConfig/CustomNode.vue b/src/views/createapp/components/workFlowConfig/CustomNode.vue index 4441c73270c032f9938e865552d0cd0d13e3f0f4..4a7d0c875dbe8c741182ef453d272389f2e24fea 100644 --- a/src/views/createapp/components/workFlowConfig/CustomNode.vue +++ b/src/views/createapp/components/workFlowConfig/CustomNode.vue @@ -2,6 +2,9 @@ import { Position, Handle } from '@vue-flow/core'; import { ref, onMounted, watch } from 'vue'; import NodeMirrorText from '../codeMirror/nodeMirrorText.vue'; +import { CopyDocument, WarnTriangleFilled } from '@element-plus/icons-vue'; +import { ElMessage } from 'element-plus'; +import { IconSuccess } from '@computing/opendesign-icons'; import { nodeTypeToIcon, getSrcIcon, getNodeClass } from '../types'; const props = defineProps({ id: { @@ -28,7 +31,7 @@ const props = defineProps({ const emits = defineEmits(['delNode', 'editYamlDrawer', 'updateConnectHandle']); const statusList = ref(['running', 'success', 'error']); - +const nodeDescription = ref([]); // 当前节点状态-工作流调试结果-成功/失败/运行中 const curStatus = ref(''); @@ -48,6 +51,7 @@ const inputAndOutput = ref({ watch( () => props.data, () => { + nodeDescription.value = props.data.description.split('\n\n') || []; const isInclude = statusList.value.includes(props.data?.status); // 设置节点的状态-默认以及成功、失败、运行中 if (!isInclude) { @@ -94,6 +98,22 @@ const setConnectStatus = (type) => { // 更新当前节点handle连接状态 emits('updateConnectHandle', props.id); }; + +const handleCopyTextToclipboard = (text) => { + const input = document.createElement('input'); + input.value = text; + document.body.appendChild(input); + input.select(); + document.execCommand('copy'); + ElMessage({ + showClose: true, + message: '复制成功', + icon: IconSuccess, + customClass: 'o-message--success', + duration: 2000, + }); + document.body.removeChild(input); +};