fix: Workflow knowledge base import button error

This commit is contained in:
shaohuzhang1 2025-12-03 17:16:11 +08:00
parent 4591d4d322
commit 13fd7ba729
2 changed files with 10 additions and 10 deletions

View File

@ -43,7 +43,7 @@
{{ $t('views.document.buttons.next') }}
</el-button>
<el-button
v-if="base_form_list.length > 0 ? active == 'knowledge_base' : true"
v-if="base_form_list.length > 0 ? active == 'knowledge_base' : active == 'data_source'"
@click="upload"
type="primary"
:disabled="loading"

View File

@ -38,7 +38,7 @@
{{ $t('views.document.buttons.next') }}
</el-button>
<el-button
v-if="base_form_list.length > 0 ? active == 'knowledge_base' : true"
v-if="base_form_list.length > 0 ? active == 'knowledge_base' : active == 'data_source'"
@click="upload"
type="primary"
:loading="loading"
@ -133,14 +133,14 @@ const permissionPrecise = computed(() => {
const upload = () => {
if (permissionPrecise.value.doc_create(id)) {
ActionRef.value.validate().then(() => {
form_data.value[active.value] = ActionRef.value.get_data()
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
.workflowAction(id, form_data.value, loading)
.then((ok: any) => {
action_id.value = ok.data.id
active.value = 'result'
})
})
form_data.value[active.value] = ActionRef.value.get_data()
loadSharedApi({ type: 'knowledge', systemType: apiType.value })
.workflowAction(id, form_data.value, loading)
.then((ok: any) => {
action_id.value = ok.data.id
active.value = 'result'
})
})
} else {
MsgError(t('views.application.tip.noDocPermission'))
}