yangyin
2024-09-06 cf5c3cde7d0dbec44d4c2f7bea87c4d5362accb0
src/views/project/yw/dataManage/knowledge/AddKnowledge.vue
@@ -1,7 +1,7 @@
<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>
@@ -176,7 +176,7 @@
                        <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">
@@ -350,6 +350,10 @@
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(() => {});
@@ -372,7 +376,6 @@
   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);
   }