|
@@ -20,6 +20,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { ref, computed } from 'vue';
|
|
import { ref, computed } from 'vue';
|
|
|
import { Message } from '@arco-design/web-vue';
|
|
import { Message } from '@arco-design/web-vue';
|
|
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
import { bus_knowledgeSearch } from '../../base/event-bus';
|
|
import { bus_knowledgeSearch } from '../../base/event-bus';
|
|
|
import { createKb } from '../../apis/rgflow-dify';
|
|
import { createKb } from '../../apis/rgflow-dify';
|
|
|
import { createOwnKnowledge } from '../../apis/knowledge';
|
|
import { createOwnKnowledge } from '../../apis/knowledge';
|
|
@@ -39,6 +40,8 @@ const props = defineProps({
|
|
|
|
|
|
|
|
const emit = defineEmits(['update:visible', 'select_icon']);
|
|
const emit = defineEmits(['update:visible', 'select_icon']);
|
|
|
|
|
|
|
|
|
|
+const router = useRouter();
|
|
|
|
|
+
|
|
|
const formInit = {
|
|
const formInit = {
|
|
|
name: '',
|
|
name: '',
|
|
|
description: '',
|
|
description: '',
|
|
@@ -81,6 +84,14 @@ const createOwnKnowledgeBase = async (data) => {
|
|
|
form.value = Object.assign({}, formInit);
|
|
form.value = Object.assign({}, formInit);
|
|
|
emit('update:visible', false);
|
|
emit('update:visible', false);
|
|
|
Message.success('创建成功');
|
|
Message.success('创建成功');
|
|
|
|
|
+ // TODO 进入知识库详情页面
|
|
|
|
|
+ router.push({
|
|
|
|
|
+ path: '/knowledge/detail',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: data.id,
|
|
|
|
|
+ name: data.name
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.log('创建知识库失败', error);
|
|
console.log('创建知识库失败', error);
|