mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: add type search option to KnowledgeResourceIndex
fix: add tool type search option to ToolResourceIndex
This commit is contained in:
parent
d7ee6b74b3
commit
2306f90048
|
|
@ -16,8 +16,8 @@
|
|||
@change="search_type_change"
|
||||
>
|
||||
<el-option :label="$t('common.creator')" value="create_user" />
|
||||
|
||||
<el-option :label="$t('common.name')" value="name" />
|
||||
<el-option :label="$t('views.system.resource_management.type')" value="type"/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="search_type === 'name'"
|
||||
|
|
@ -37,6 +37,16 @@
|
|||
>
|
||||
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="search_type === 'type'"
|
||||
v-model="search_form.type"
|
||||
@change="getList"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option v-for="u in type_options" :value="u.value" :label="u.label"/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -312,9 +322,23 @@ const search_type = ref('name')
|
|||
const search_form = ref<any>({
|
||||
name: '',
|
||||
create_user: '',
|
||||
type: '',
|
||||
})
|
||||
const user_options = ref<any[]>([])
|
||||
|
||||
const type_options = ref<any[]>([
|
||||
{
|
||||
label: t('views.knowledge.knowledgeType.generalKnowledge'),
|
||||
value: '0',
|
||||
},
|
||||
{
|
||||
label: t('views.knowledge.knowledgeType.webKnowledge'),
|
||||
value: '1',
|
||||
},
|
||||
{
|
||||
label: t('views.knowledge.knowledgeType.larkKnowledge'),
|
||||
value: '2',
|
||||
},
|
||||
])
|
||||
const loading = ref(false)
|
||||
const knowledgeList = ref<any[]>([])
|
||||
const paginationConfig = reactive({
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@
|
|||
@change="search_type_change"
|
||||
>
|
||||
<el-option :label="$t('common.creator')" value="create_user" />
|
||||
|
||||
<el-option :label="$t('views.tool.form.toolName.label')" value="name" />
|
||||
<el-option :label="$t('views.system.resource_management.type')" value="tool_type"/>
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="search_type === 'name'"
|
||||
|
|
@ -37,6 +37,16 @@
|
|||
>
|
||||
<el-option v-for="u in user_options" :key="u.id" :value="u.id" :label="u.nick_name" />
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="search_type === 'tool_type'"
|
||||
v-model="search_form.tool_type"
|
||||
@change="getList"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 220px"
|
||||
>
|
||||
<el-option v-for="u in type_options" :value="u.value" :label="u.label"/>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -346,9 +356,27 @@ const search_type = ref('name')
|
|||
const search_form = ref<any>({
|
||||
name: '',
|
||||
create_user: '',
|
||||
tool_type: '',
|
||||
})
|
||||
const user_options = ref<any[]>([])
|
||||
|
||||
const type_options = ref<any[]>([
|
||||
{
|
||||
label: 'MCP',
|
||||
value: 'MCP',
|
||||
},
|
||||
{
|
||||
label: t('views.tool.toolStore.title'),
|
||||
value: 'TOOL_STORE',
|
||||
},
|
||||
{
|
||||
label: t('views.tool.toolStore.internal'),
|
||||
value: 'INTERNAL',
|
||||
},
|
||||
{
|
||||
label: t('common.custom'),
|
||||
value: 'CUSTOM',
|
||||
},
|
||||
])
|
||||
const loading = ref(false)
|
||||
const changeStateloading = ref(false)
|
||||
const toolList = ref<any[]>([])
|
||||
|
|
|
|||
Loading…
Reference in New Issue