104104 </el-dropdown >
105105 </template >
106106 </div >
107- <div >
108- <el-input
109- v-model =" filterText"
110- :placeholder =" $t('common.searchBar.placeholder')"
111- prefix-icon =" Search"
112- class =" w-240"
113- @change =" getList"
114- clearable
115- />
107+ <div class =" flex" >
108+ <div class =" flex-between complex-search" >
109+ <el-select
110+ class =" complex-search__left"
111+ v-model =" search_type"
112+ style =" width : 120px "
113+ @change =" search_type_change"
114+ >
115+ <el-option :label =" $t('dynamicsForm.tag.label')" value =" tag" />
116+ <el-option :label =" $t('views.tool.form.toolName.label')" value =" name" />
117+ </el-select >
118+ <el-input
119+ v-if =" search_type === 'name'"
120+ v-model =" search_form.name"
121+ @change =" refresh"
122+ :placeholder =" $t('common.searchBar.placeholder')"
123+ style =" width : 220px "
124+ clearable
125+ />
126+ <el-input
127+ v-if =" search_type === 'tag'"
128+ v-model =" search_form.tag"
129+ @change =" refresh"
130+ :placeholder =" $t('views.document.tag.requiredMessage3')"
131+ style =" width : 220px "
132+ clearable
133+ />
134+ </div >
116135 <el-button @click =" openTagDrawer" class =" ml-12" >
117136 {{ $t('views.document.tag.label') }}
118137 </el-button >
@@ -781,6 +800,12 @@ const getTaskState = (status: string, taskType: number) => {
781800 return taskType - 1 > statusList .length + 1 ? ' n' : statusList [taskType - 1 ]
782801}
783802
803+ const search_type = ref (' name' )
804+ const search_form = ref <any >({
805+ name: ' ' ,
806+ tag: ' ' ,
807+ })
808+
784809const beforePagination = computed (() => common .paginationConfig [storeKey ])
785810const beforeSearch = computed (() => common .search [storeKey ])
786811const embeddingContentDialogRef = ref <InstanceType <typeof EmbeddingContentDialog >>()
@@ -1184,11 +1209,13 @@ function handleSortChange({ prop, order }: { prop: string; order: string }) {
11841209
11851210function getList(bool ? : boolean ) {
11861211 const param = {
1187- ... (filterText .value && { name: filterText .value }),
11881212 ... filterMethod .value ,
11891213 order_by: orderBy .value ,
11901214 folder_id: folderId ,
11911215 }
1216+ if (search_form .value [search_type .value ]) {
1217+ param [search_type .value ] = search_form .value [search_type .value ]
1218+ }
11921219 loadSharedApi ({ type: ' document' , isShared: isShared .value , systemType: apiType .value })
11931220 .getDocumentPage (id as string , paginationConfig .value , param , bool ? undefined : loading )
11941221 .then ((res : any ) => {
@@ -1197,6 +1224,10 @@ function getList(bool?: boolean) {
11971224 })
11981225}
11991226
1227+ const search_type_change = () => {
1228+ search_form .value = { name: ' ' , tag: ' ' }
1229+ }
1230+
12001231function getDetail() {
12011232 loadSharedApi ({ type: ' knowledge' , isShared: isShared .value , systemType: apiType .value })
12021233 .getKnowledgeDetail (id , loading )
0 commit comments