| | |
| | | <template> |
| | | <div class="main-container"> |
| | | <div ref="scrollContainer" class="main-container"> |
| | | <div style="position: absolute;top: 0;left: 0;width: 100%;padding: 0 20px"> |
| | | <h4 style="margin-bottom: 10px"></h4> |
| | | <div style="color: #666666;">在这里更新您的知识库详细信息,尤其是解析方法。</div> |
| | |
| | | v-if="avatarShow" |
| | | :action="uploadAction" |
| | | :limit="1" |
| | | :url="form.avatar" |
| | | :url="form.avatar ? httpUrl + form.avatar : ''" |
| | | @update:fileList="updateFileList" |
| | | @success="handleSuccess" |
| | | ></Upload> |
| | |
| | | <div style="width: 100%;text-align: right"> |
| | | <a-space> |
| | | <a-button @click="cancelConfig">取消</a-button> |
| | | <a-button type="primary" html-type="submit">保存</a-button> |
| | | <a-button :loading="loading" type="primary" html-type="submit">保存</a-button> |
| | | </a-space> |
| | | </div> |
| | | </a-form-item> |
| | |
| | | import message from "@arco-design/web-vue/es/message"; |
| | | import useLoading from "@/hooks/loading"; |
| | | const { loading,setLoading } = useLoading(true); |
| | | |
| | | const scrollContainer = ref(); |
| | | const props = defineProps(['kbtenantInfo']) |
| | | const emit = defineEmits(['cancleConfig','saveConfig']) |
| | | // 解析方法列表 |
| | |
| | | const uploadAction = '/api/v1/llm/upload'; // 替换为你的上传API |
| | | const fileList = ref([]); |
| | | const imageUrls = ref([]); |
| | | const httpUrl = localStorage.getItem('httpUrl'); |
| | | |
| | | const updateFileList = (newFileList) => { |
| | | fileList.value = newFileList; |
| | |
| | | }; |
| | | } |
| | | try { |
| | | |
| | | setLoading(true) |
| | | const data = await kbUpdate(parms); |
| | | if(data.code == '0'){ |
| | | Message.success("配置成功"); |
| | |
| | | emit('saveConfig') |
| | | |
| | | } |
| | | // emit('upTabdateItem') |
| | | setLoading(false) |
| | | |
| | | } catch (err) { |
| | | Message.error(err.message); |
| | | setLoading(false) |
| | | } |
| | | |
| | | |
| | |
| | | console.log(kbObj, 'kbObj'); |
| | | let configObj = { |
| | | name: kbObj.name, |
| | | avatar: kbObj.avatar, |
| | | pages: kbObj.parser_config.pages, |
| | | chunk_token_num: kbObj.parser_config.chunk_token_num, |
| | | description: kbObj.description, |
| | | language: "English", |
| | | permission: kbObj.permission, |
| | |
| | | use_raptor: false, |
| | | }); |
| | | } |
| | | form.avatar = kbObj.avatar; |
| | | imageUrls.value = [kbObj.avatar]; |
| | | console.log(form,'配置页面表单信息'); |
| | | avatarShow.value = false; |
| | | setTimeout(() => { |
| | | avatarShow.value = true; |
| | | },100); |
| | | scrollContainer.value.scrollTop = 0; |
| | | |
| | | } |
| | | |
| | | defineExpose({ |
| | |
| | | |
| | | |
| | | onBeforeMount(()=>{ |
| | | setLoading(false) |
| | | queryModel({}) |
| | | }) |
| | | onMounted(()=>{ |
| | |
| | | justify-content: space-between; |
| | | height: 100%; |
| | | overflow: auto; |
| | | //background: #626aea; |
| | | border-radius: 8px; |
| | | background: var(--color-bg-2); |
| | | padding-top: 80px; |
| | | |