| | |
| | | </a-tab-pane> |
| | | <a-tab-pane key="3" :title="t('dmx.list.disposition')"> |
| | | <div class="rt-container-main"> |
| | | <config ref="configForm" :kbtenantInfo="kbtenantInfo" :kbobj="kbobj"></config> |
| | | <config ref="configForm" :kbtenantInfo="kbtenantInfo" :kbobj="kbobj" @cancleConfig="cancleConfig" @saveConfig="saveConfig"></config> |
| | | </div> |
| | | </a-tab-pane> |
| | | </a-tabs> |
| | |
| | | let parser_ids = reactive({}) |
| | | let seeObj = reactive({}) |
| | | let kbtenantInfo = reactive({ |
| | | "asr_id": "paraformer-realtime-8k-v1", |
| | | "embd_id": "BAAI/bge-large-zh-v1.5", |
| | | "img2txt_id": "qwen-vl-max", |
| | | "llm_id": "qwen-plus", |
| | | "name": "wanghao‘s Kingdom", |
| | | "parser_ids": "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One", |
| | | "rerank_id": "BAAI/bge-reranker-v2-m3", |
| | | "role": "owner", |
| | | "tenant_id": "948fc6fa41ab11ef8fb80242ac120004", |
| | | asr_id: "paraformer-realtime-8k-v1", |
| | | embd_id: "BAAI/bge-large-zh-v1.5", |
| | | img2txt_id: "qwen-vl-max", |
| | | llm_id: "qwen-plus", |
| | | name: "wanghao‘s Kingdom", |
| | | parser_ids: "naive:General,qa:Q&A,resume:Resume,manual:Manual,table:Table,paper:Paper,book:Book,laws:Laws,presentation:Presentation,picture:Picture,one:One", |
| | | rerank_id: "BAAI/bge-reranker-v2-m3", |
| | | role: "owner", |
| | | tenant_id: "948fc6fa41ab11ef8fb80242ac120004", |
| | | parser_idObj:{} |
| | | }) |
| | | let tabs = ref([]) |
| | |
| | | setLoading(true); |
| | | try { |
| | | const data = await queryKbDocumentList(params); |
| | | console.log(data, 'data'); |
| | | if(data.code=='0'){ |
| | | // 详情 |
| | | // const kbtenantInfo = await queryKbtenantInfo(); |
| | | parser_ids = kbtenantInfo.parser_ids.split(',').reduce((acc, pair) => { |
| | | const [key, value] = pair.split(':'); |
| | | acc[key] = value; |
| | |
| | | parser_id: parser_ids[item.parser_id], |
| | | }; |
| | | }); |
| | | console.log(renderData.value, 'renderData'); |
| | | // console.log(renderData.value, 'renderData'); |
| | | |
| | | pagination.current = params.page; |
| | | pagination.total = data.data.total; |
| | |
| | | setLoading(true); |
| | | try { |
| | | const { data } = await queryKbList(params); |
| | | console.log(data, 'data'); |
| | | // console.log(data, 'data'); |
| | | tabs.value = data; |
| | | console.log(tabs.value, 'tabs'); |
| | | // console.log(tabs.value, 'tabs'); |
| | | if(tabs.value.length>0 && tabs.value[0]){ |
| | | kbobj = tabs.value[0] |
| | | kbId = kbobj.id; |
| | |
| | | size.value = val as SizeProps; |
| | | }; |
| | | |
| | | const cancleConfig = () => { |
| | | activeKey.value = '1'; |
| | | let id = tabs.value[selectedTab.value].id; |
| | | fetchData({ |
| | | kb_id: id, |
| | | page: 1, |
| | | page_size: 20 |
| | | }) |
| | | } |
| | | |
| | | const saveConfig = async () => { |
| | | activeKey.value = '1'; |
| | | let id = tabs.value[selectedTab.value].id; |
| | | const { data } = await queryKbList({ page: 1, page_size: 20 }); |
| | | tabs.value = data; |
| | | fetchData({ |
| | | kb_id: id, |
| | | page: 1, |
| | | page_size: 20 |
| | | }) |
| | | getKbdetail(id) // 获取详情 |
| | | } |
| | | |
| | | |
| | | const handleChange = ( |
| | | checked: boolean | (string | boolean | number)[], |
| | | column: Column, |
| | |
| | | let data = await kbdocumentrm({doc_id: row.id}) |
| | | if(data.code == 0){ |
| | | Message.success('删除成功'); |
| | | console.log(kbobj, 'kbobj'); |
| | | // console.log(kbobj, 'kbobj'); |
| | | fetchData({ |
| | | kb_id: kbobj.id, |
| | | page: 1, |
| | |
| | | |
| | | |
| | | const run = async (row)=>{ |
| | | console.log(row); |
| | | // console.log(row); |
| | | row.loading = true; |
| | | let run = '1' |
| | | if(row.run!='2'){ |
| | |
| | | Message.error('解析失败'); |
| | | row.run = '1'; |
| | | } |
| | | fetchData({ |
| | | kb_id: tabs.value[selectedTab.value].id, |
| | | page: 1, |
| | | page_size: 20 |
| | | }) |
| | | |
| | | row.loading = false; |
| | | } |
| | | |
| | |
| | | { deep: true, immediate: true } |
| | | ); |
| | | |
| | | onBeforeMount(()=>{ |
| | | onBeforeMount(async()=>{ |
| | | // const {data} = await queryKbtenantInfo(); |
| | | // Object.assign(kbtenantInfo,data); |
| | | // console.log(kbtenantInfo,'kbtenantInfo的数据'); |
| | | |
| | | }) |
| | | onMounted(()=>{ |