| | |
| | | url: `/admin/workflow/get_flow_func_names`, |
| | | method: 'post', |
| | | ...extraData, |
| | | }); |
| | | |
| | | export const publish_workflow_agent = (params,extraData: ExtraConfig = {}) => |
| | | request({ |
| | | url: `/admin/workflow/publish_workflow_agent`, |
| | | method: 'post', |
| | | data: params, |
| | | |
| | | ...extraData, |
| | | }); |
| | |
| | | height: var(--handle-size); |
| | | } |
| | | |
| | | .vue-flow__resize-control.handle { |
| | | width: var(--resize-handle-size); |
| | | height: var(--resize-handle-size); |
| | | // visibility: hidden; |
| | | } |
| | | // .vue-flow__resize-control.handle { |
| | | // width: var(--resize-handle-size); |
| | | // height: var(--resize-handle-size); |
| | | // // visibility: hidden; |
| | | // } |
| | | } |
| | | </style> |
| | | |
| | |
| | | </div> |
| | | </FieldLayout> |
| | | <FieldLayout :title="prompt.name"> |
| | | <el-input v-model="VueFlowHelper.getParams(prompt, 'prompt').value" type="textarea" :rows="3" autocomplete="off"> </el-input> |
| | | <el-input |
| | | class="nowheel" |
| | | v-model="VueFlowHelper.getParams(prompt, 'prompt').value" |
| | | type="textarea" |
| | | :autosize="{ minRows: 3, maxRows: 6 }" |
| | | autocomplete="off" |
| | | > |
| | | </el-input> |
| | | </FieldLayout> |
| | | <Handle :id="sourceHandleId" type="source" :position="Position.Right" /> |
| | | </NodeBasicLayout> |
| | |
| | | |
| | | const modelSetting = ref(VueFlowHelper.getGroupParam(data.value, 0)); |
| | | const prompt = ref(VueFlowHelper.getGroupParam(data.value, 1)); |
| | | |
| | | |
| | | |
| | | VueFlowHelper.getConfigValue(VueFlowHelper.getParams(prompt.value, 'prompt'), 'label', ''); |
| | | </script> |
| | |
| | | :autosize="{ minRows: 4, maxRows: 6 }" |
| | | :placeholder="VueFlowHelper.getParams(outputParams, 'output_msg').placeholder" |
| | | autocomplete="off" |
| | | class="nowheel" |
| | | > |
| | | </el-input> |
| | | </FieldLayout> |
| | |
| | | <el-input |
| | | v-model="VueFlowHelper.getParams(outputParams, 'output_result').value.value" |
| | | type="textarea" |
| | | class="nowheel" |
| | | |
| | | :autosize="{ minRows: 4, maxRows: 6 }" |
| | | v-if="VueFlowHelper.getParams(outputParams, 'output_result').value.type === InteractionType.Input" |
| | | > |
| | |
| | | > |
| | | <FieldLayout :title="VueFlowHelper.getConfigValue(varListConfig, 'name', '流程参数')"> |
| | | <el-table class="flex-auto" :data="varList" border> |
| | | <el-table-column prop="name" width="90" label="参数名" fixed> |
| | | <el-table-column prop="name" width="170" label="参数名" fixed> |
| | | <template #default="scope"> |
| | | <el-input v-model="scope.row.name"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="type" width="120" label="类型"> |
| | | <!-- <el-table-column prop="type" width="220" label="类型"> |
| | | <template #default="scope"> |
| | | <el-select v-model="scope.row.type"> |
| | | <el-option |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="description" width="180" label="描述"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="description" width="380" label="描述"> |
| | | <template #default="scope"> |
| | | <el-input type="textarea" :rows="1" v-model="scope.row.description"></el-input> |
| | | <el-input class="nowheel" type="textarea" :autosize="{ minRows: 1, maxRows: 6 }" v-model="scope.row.description"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="isRequired" width="56" label="必填"> |
| | | <!-- <el-table-column prop="isRequired" width="56" label="必填"> |
| | | <template #default="scope"> |
| | | <el-checkbox v-model="scope.row.isRequired"></el-checkbox> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column> --> |
| | | |
| | | <el-table-column label="操作" width="55" fixed="right"> |
| | | <template #default="scope"> |
| | |
| | | const varListConfig = ref(VueFlowHelper.getGroupParam(data.value, 0)); |
| | | |
| | | const varListParam = ref(VueFlowHelper.getParams(varListConfig.value, 'var_list')); |
| | | |
| | | |
| | | VueFlowHelper.getConfigValue(varListParam.value, 'label', ''); |
| | | |
| | |
| | | <template> |
| | | <NodeResizer :maxHeight="maxHeight" :maxWidth="maxWidth" :minHeight="minHeight" :minWidth="minWidth" /> |
| | | <div class="order-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group h-fit"> |
| | | <div |
| | | :style="{ maxHeight: `${maxHeight}px`, maxWidth: `${maxWidth}px`, minHeight: `${minHeight}px`, minWidth: minWidth }" |
| | | class="order-2 rounded-lg border-solid border-gray-100 bg-white p-3 shadow-md relative hover:border-blue-500 group h-fit" |
| | | > |
| | | <div |
| | | class="group-hover:visible invisible flex absolute divide-y-[1.5px] divide-solid divide-gray-100 rounded-lg right-0 -top-0.5 translate-y-[-100%]" |
| | | style="box-shadow: 0 0 15px #dbdee6" |
| | |
| | | import { useNode, useVueFlow } from '@vue-flow/core'; |
| | | import { ref } from 'vue'; |
| | | |
| | | import { NodeResizer } from '@vue-flow/node-resizer'; |
| | | import type { PropType } from 'vue'; |
| | | import { VueFlowHelper } from '../../../VueFlowHelper'; |
| | | import type { NodeType } from '../../../vueFlowEnum'; |
| | | import { VueFlowConfig } from '../../VueFlowConfig'; |
| | | import { deepClone } from '/@/utils/other'; |
| | | |
| | | defineOptions({ |
| | | inheritAttrs: false, |
| | | }); |
| | | // defineOptions({ |
| | | // inheritAttrs: false, |
| | | // }); |
| | | const titleIsEdit = ref(false); |
| | | |
| | | const props = defineProps({ |
| | |
| | | <el-table-column prop="create_user" width="100" label="创建者" show-overflow-tooltip align="center" /> |
| | | <el-table-column prop="create_time" width="180" label="创建时间" show-overflow-tooltip align="center" /> |
| | | <el-table-column prop="note" width="180" label="说明" show-overflow-tooltip align="center" /> |
| | | <el-table-column label="操作" width="120" fixed="right" show-overflow-tooltip align="center"> |
| | | <el-table-column label="操作" width="160" fixed="right" show-overflow-tooltip align="center"> |
| | | <template #default="scope"> |
| | | <div class="space-x-2.5"> |
| | | <el-tooltip effect="dark" content="编辑" placement="top"> |
| | |
| | | <i |
| | | class="ywifont ywicon-jiegousheji !text-[15px] text-blue-400 cursor-pointer" |
| | | @click="gotoFlowDesign(scope.row)" |
| | | ></i> |
| | | </el-tooltip> |
| | | <el-tooltip |
| | | effect="dark" |
| | | :content="scope.row.published === SupervisorPublished.Y ? '取消发布' : '发布'" |
| | | placement="top" |
| | | > |
| | | <i |
| | | class="ywifont !text-[20px] cursor-pointer" |
| | | :class="[ |
| | | scope.row.published === SupervisorPublished.Y ? 'ywicon-quxiaofabu text-red-400' : 'ywicon-fabu text-blue-400', |
| | | ]" |
| | | @click=" |
| | | publishStatusChange( |
| | | scope.row.published === SupervisorPublished.Y ? SupervisorPublished.N : SupervisorPublished.Y, |
| | | scope.row.id, |
| | | scope.$index |
| | | ) |
| | | " |
| | | ></i> |
| | | </el-tooltip> |
| | | |
| | |
| | | import { computed, nextTick, onMounted, ref } from 'vue'; |
| | | import OptDlg from './optDlg/OptDlg.vue'; |
| | | import * as agentGroupApi from '/@/api/ai/agentGroup'; |
| | | import { check_workflow_agent_validate, delete_workflow_agent, get_workflow_agent_list } from '/@/api/workflow/index'; |
| | | import { |
| | | check_workflow_agent_validate, |
| | | delete_workflow_agent, |
| | | get_workflow_agent_list, |
| | | publish_workflow_agent, |
| | | } from '/@/api/workflow/index'; |
| | | import Chat from '/@/components/chat/Chat.vue'; |
| | | import AHMContainer from '/@/components/layout/AHMContainer.vue'; |
| | | import LeftTreeByMgr from '/@/components/tree/leftTreeByMgr.vue'; |
| | |
| | | }; |
| | | //#endregion |
| | | |
| | | //#region ====================== 改变发布状态 ====================== |
| | | const publishStatusChange = async (published: SupervisorPublished, id, index) => { |
| | | const res = await publish_workflow_agent( |
| | | { |
| | | agent_id: id, |
| | | publish: published, |
| | | }, |
| | | { |
| | | loading: false, |
| | | } |
| | | ); |
| | | const origin = published === SupervisorPublished.Y ? SupervisorPublished.N : SupervisorPublished.Y; |
| | | const final = res.publish ?? origin; |
| | | if (final === origin) { |
| | | ElMessage.warning('操作失败' + (res.fail_msg ? `:${res.fail_msg}` : '')); |
| | | return; |
| | | } |
| | | |
| | | tableData.value[index].published = final; |
| | | |
| | | published === SupervisorPublished.Y ? ElMessage.success('发布成功') : ElMessage.info('已取消发布'); |
| | | }; |
| | | //#endregion |
| | | onMounted(async () => { |
| | | initData(); |
| | | }); |