【代码评审】AI:工作流

This commit is contained in:
YunaiV 2025-03-25 09:54:55 +08:00
parent 047b9f327f
commit 05393006c1
3 changed files with 17 additions and 4 deletions

View File

@ -668,6 +668,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
activeMenu: '/ai/knowledge' activeMenu: '/ai/knowledge'
} }
}, },
// TODO @lesan:type =》 design 设计 AI 工作流
{ {
path: 'console/workflow/:type/:id', path: 'console/workflow/:type/:id',
component: () => import('@/views/ai/workflow/manager/WorkflowModelForm.vue'), component: () => import('@/views/ai/workflow/manager/WorkflowModelForm.vue'),
@ -676,7 +677,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
noCache: true, noCache: true,
hidden: true, hidden: true,
canTo: true, canTo: true,
title: '修改AI工作流', title: '修改 AI 工作流',
activeMenu: '/ai/console/workflow' activeMenu: '/ai/console/workflow'
} }
} }

View File

@ -1,3 +1,4 @@
<!-- TODO @lesan要不叫搞个 design 单独一个路由 -->
<template> <template>
<div style="width: 100%; height: calc(100vh - 160px)"> <div style="width: 100%; height: calc(100vh - 160px)">
<Tinyflow <Tinyflow
@ -10,8 +11,12 @@
/> />
</div> </div>
<div class="absolute top-30px right-30px"> <div class="absolute top-30px right-30px">
<el-button @click="updateWorkflowModel" type="primary" v-hasPermi="['ai:workflow:update']">保存</el-button> <el-button @click="updateWorkflowModel" type="primary" v-hasPermi="['ai:workflow:update']">
<el-button @click="testWorkflowModel" type="primary" v-hasPermi="['ai:workflow:test']">测试</el-button> 保存
</el-button>
<el-button @click="testWorkflowModel" type="primary" v-hasPermi="['ai:workflow:test']">
测试
</el-button>
</div> </div>
</template> </template>
@ -25,6 +30,7 @@ const message = useMessage() // 消息弹窗
const { t } = useI18n() // const { t } = useI18n() //
const tinyflowRef = ref() const tinyflowRef = ref()
// TODO @lesan
const provider = ref({ llm: () => [], knowledge: () => [], internal: () => [] }) const provider = ref({ llm: () => [], knowledge: () => [], internal: () => [] })
const initialData = ref() const initialData = ref()

View File

@ -1,3 +1,4 @@
<!-- TODO @lesan要不直接放到 workflow 根目录 -->
<template> <template>
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<ContentWrap> <ContentWrap>
@ -40,7 +41,12 @@
<el-form-item> <el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button type="primary" plain @click="openForm('create')" v-hasPermi="['ai:workflow:create']"> <el-button
type="primary"
plain
@click="openForm('create')"
v-hasPermi="['ai:workflow:create']"
>
<Icon icon="ep:plus" /> 新增 <Icon icon="ep:plus" /> 新增
</el-button> </el-button>
</el-form-item> </el-form-item>