feat: 重构知识库文档导入任务化流程
- 新增上传建单、异步解析、分块处理与异步向量化闭环 - 收口分享页权限、完成态检索过滤与 SSE 局部状态刷新
This commit is contained in:
@@ -35,6 +35,10 @@ const props = defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
manageable: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const emit = defineEmits(['reload']);
|
||||
@@ -131,8 +135,16 @@ onMounted(() => {
|
||||
<div class="share-config-card__desc">
|
||||
仅开放模型切换、检索参数与向量重建
|
||||
</div>
|
||||
<div v-if="!props.manageable" class="share-config-card__tip">
|
||||
当前分享仅支持查看,不允许修改配置
|
||||
</div>
|
||||
</div>
|
||||
<ElButton type="primary" :loading="saving" @click="handleSave">
|
||||
<ElButton
|
||||
v-if="props.manageable"
|
||||
type="primary"
|
||||
:loading="saving"
|
||||
@click="handleSave"
|
||||
>
|
||||
{{ $t('button.save') }}
|
||||
</ElButton>
|
||||
</div>
|
||||
@@ -140,7 +152,7 @@ onMounted(() => {
|
||||
|
||||
<ElForm label-position="top" class="share-config-form">
|
||||
<ElFormItem :label="$t('documentCollection.vectorEmbedLlmId')">
|
||||
<ElSelect v-model="form.vectorEmbedModelId">
|
||||
<ElSelect v-model="form.vectorEmbedModelId" :disabled="!props.manageable">
|
||||
<ElOption
|
||||
v-for="item in embeddingModels"
|
||||
:key="item.id"
|
||||
@@ -151,7 +163,7 @@ onMounted(() => {
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem :label="$t('documentCollection.rerankLlmId')">
|
||||
<ElSelect v-model="form.rerankModelId" clearable>
|
||||
<ElSelect v-model="form.rerankModelId" clearable :disabled="!props.manageable">
|
||||
<ElOption
|
||||
v-for="item in rerankModels"
|
||||
:key="item.id"
|
||||
@@ -162,11 +174,16 @@ onMounted(() => {
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem :label="$t('documentCollection.rerankEnable')">
|
||||
<ElSwitch v-model="form.rerankEnable" />
|
||||
<ElSwitch v-model="form.rerankEnable" :disabled="!props.manageable" />
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem :label="$t('documentCollectionSearch.docRecallMaxNum.label')">
|
||||
<ElInputNumber v-model="form.docRecallMaxNum" :min="1" :max="50" />
|
||||
<ElInputNumber
|
||||
v-model="form.docRecallMaxNum"
|
||||
:min="1"
|
||||
:max="50"
|
||||
:disabled="!props.manageable"
|
||||
/>
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem :label="$t('documentCollectionSearch.simThreshold.label')">
|
||||
@@ -175,11 +192,12 @@ onMounted(() => {
|
||||
:min="0"
|
||||
:max="1"
|
||||
:step="0.01"
|
||||
:disabled="!props.manageable"
|
||||
/>
|
||||
</ElFormItem>
|
||||
|
||||
<ElFormItem label="保存后重建向量">
|
||||
<ElSwitch v-model="form.rebuildVectors" />
|
||||
<ElSwitch v-model="form.rebuildVectors" :disabled="!props.manageable" />
|
||||
</ElFormItem>
|
||||
</ElForm>
|
||||
</ElCard>
|
||||
@@ -208,6 +226,12 @@ onMounted(() => {
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
|
||||
.share-config-card__tip {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: var(--el-text-color-secondary);
|
||||
}
|
||||
|
||||
.share-config-form {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
|
||||
Reference in New Issue
Block a user