| | |
| | | <template> |
| | | <div class="flex flex-col h100"> |
| | | <div class="mb-[10px] flex flex-shrink-0 items-center"> |
| | | <el-button style="margin-left: 8px; width: 40px" text @click="handleExitFlow"> |
| | | <el-button style="margin-left: 8px; width: 40px" link @click="handleExitFlow"> |
| | | <el-icon style="font-size: 24px !important"> |
| | | <ArrowLeft /> |
| | | </el-icon> |
| | |
| | | <div |
| | | class="bg-[#fff] border-[1px] border-solid border-[#d8d9e6] py-[12px] w-[215px] mr-[10px] px-[16px] rounded-lg cursor-pointer" |
| | | :class="{ activeColor: state.knowledgeForm.segmentationMode === item.ID }" |
| | | @click="activeConfigurationType(item.ID)" |
| | | @click="activeDataProcessType(item.ID)" |
| | | > |
| | | <div class="flex items-center"> |
| | | <div class="data_left"> |
| | |
| | | const activeConfigurationType = (id: number) => { |
| | | state.knowledgeForm.configurationMode = id; |
| | | }; |
| | | //选择数据文档切分 |
| | | const activeDataProcessType = (id: number) => { |
| | | state.knowledgeForm.segmentationMode = id; |
| | | }; |
| | | //下一步 |
| | | const nextKnowledge = async () => { |
| | | const valid = await knowledgeFormRef.value.validate().catch(() => {}); |
| | |
| | | if (!valid) return; |
| | | const res = await add_docvector_name({ title: state.knowledgeForm.title, prompt: state.knowledgeForm.prompt }); |
| | | if (res.json_ok) { |
| | | ElMessage.success('创建空知识库成功'); |
| | | state.knowlg_id = res.knowlg_id; |
| | | getFileTreeData(true); |
| | | } |