mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 打包错误,文档列表刷新,向量化指令重复发送
This commit is contained in:
parent
6cc03cd611
commit
f8921d841b
|
|
@ -507,8 +507,6 @@ class DataSetSerializers(serializers.ModelSerializer):
|
|||
if first is not None:
|
||||
# 如果存在,使用文档同步
|
||||
DocumentSerializers.Sync(data={'document_id': first.id}).sync()
|
||||
# 发送向量化指令
|
||||
ListenerManagement.embedding_by_document_signal.send(first.id)
|
||||
else:
|
||||
# 插入
|
||||
DocumentSerializers.Create(data={'dataset_id': dataset.id}).save(
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ watch(dialogVisible, (bool) => {
|
|||
const open = (data: any, id?: string) => {
|
||||
detail.value = cloneDeep(data)
|
||||
detail.value.paragraph_list = id
|
||||
? detail.value.paragraph_list.filter((v) => v.dataset_id === id)
|
||||
? detail.value.paragraph_list.filter((v: any) => v.dataset_id === id)
|
||||
: detail.value.paragraph_list
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -451,7 +451,12 @@ const openCreateModel = (provider?: Provider) => {
|
|||
}
|
||||
|
||||
function removeDataset(id: any) {
|
||||
applicationForm.value.dataset_id_list.splice(applicationForm.value.dataset_id_list.indexOf(id), 1)
|
||||
if (applicationForm.value.dataset_id_list) {
|
||||
applicationForm.value.dataset_id_list.splice(
|
||||
applicationForm.value.dataset_id_list.indexOf(id),
|
||||
1
|
||||
)
|
||||
}
|
||||
}
|
||||
function addDataset(val: Array<string>) {
|
||||
applicationForm.value.dataset_id_list = val
|
||||
|
|
|
|||
|
|
@ -40,13 +40,15 @@
|
|||
>
|
||||
<img src="@/assets/icon_web.svg" style="width: 58%" alt="" />
|
||||
</AppAvatar>
|
||||
<AppAvatar v-else class="mr-8" shape="square" :size="32">
|
||||
<AppAvatar v-else class="mr-8" shape="square" :size="32">
|
||||
<img src="@/assets/icon_document.svg" style="width: 58%" alt="" />
|
||||
</AppAvatar>
|
||||
</template>
|
||||
<div class="delete-button">
|
||||
<el-tag v-if="item.type === '0'">通用型</el-tag>
|
||||
<el-tag class="purple-tag" v-else-if="item.type === '1'" type="warning">Web 站点</el-tag>
|
||||
<el-tag class="purple-tag" v-else-if="item.type === '1'" type="warning"
|
||||
>Web 站点</el-tag
|
||||
>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
|
|
@ -116,8 +118,7 @@ const paginationConfig = reactive({
|
|||
const searchValue = ref('')
|
||||
|
||||
function refresh(row: any) {
|
||||
const index = datasetList.value.findIndex((v) => v.id === row.id)
|
||||
datasetList.value.splice(index, 1, row)
|
||||
MsgSuccess('同步任务发送成功')
|
||||
}
|
||||
|
||||
function syncDataset(row: any) {
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ const handleSelectionChange = (val: any[]) => {
|
|||
const initInterval = () => {
|
||||
interval = setInterval(() => {
|
||||
if (
|
||||
documentData.value.length > 0 &&
|
||||
documentData.value.length === 0 &&
|
||||
documentData.value.some((item) => item.status === '0' || item.status === '2')
|
||||
) {
|
||||
getList(true)
|
||||
|
|
|
|||
Loading…
Reference in New Issue