1414 </template >
1515 <ContentContainer >
1616 <template #header >
17- <FolderBreadcrumb :folderList =" folderList" @click =" folderClickHandle" />
17+ <FolderBreadcrumb :folderList =" folderList" @click =" folderClickHandle" />
1818 </template >
1919 <template #search >
2020 <div class =" flex" >
2525 style =" width : 100px "
2626 @change =" search_type_change"
2727 >
28- <el-option :label =" $t('common.creator')" value =" create_user" />
28+ <el-option :label =" $t('common.creator')" value =" create_user" />
2929
30- <el-option :label =" $t('common.name')" value =" name" />
30+ <el-option :label =" $t('common.name')" value =" name" />
3131
32- <el-option :label =" $t('views.application.publishStatus')" value =" publish_status" />
32+ <el-option :label =" $t('views.application.publishStatus')" value =" publish_status" />
3333 </el-select >
3434 <el-input
3535 v-if =" search_type === 'name'"
4545 @change =" searchHandle"
4646 filterable
4747 clearable
48+ remote
49+ :remote-method =" getUserList"
4850 style =" width : 190px "
4951 >
50- <el-option v-for =" u in user_options" :key =" u.id" :value =" u.id" :label =" u.nick_name" />
52+ <el-option v-for =" u in user_options" :key =" u.id" :value =" u.id" :label =" u.nick_name" />
5153 </el-select >
5254 <el-select
5355 v-else-if =" search_type === 'publish_status'"
5759 clearable
5860 style =" width : 190px "
5961 >
60- <el-option :label =" $t('common.status.published')" value =" published" />
61- <el-option :label =" $t('common.status.unpublished')" value =" unpublished" />
62+ <el-option :label =" $t('common.status.published')" value =" published" />
63+ <el-option :label =" $t('common.status.unpublished')" value =" unpublished" />
6264 </el-select >
6365 </div >
6466 <span
6567 class =" ml-8"
6668 v-if =" permissionPrecise.batchDelete() || permissionPrecise.batchMove()"
6769 >
6870 <el-button @click =" batchSelectedHandle(true)" v-if =" isBatch === false" >
69- <AppIcon iconName =" app-batch-delete" class =" mr-4" />
71+ <AppIcon iconName =" app-batch-delete" class =" mr-4" />
7072 {{ $t('views.paragraph.setting.batchSelected') }}
7173 </el-button >
7274 <el-button @click =" batchSelectedHandle(false)" v-if =" isBatch === true" >
73- <AppIcon iconName =" app-batch-delete" class =" mr-4" />
75+ <AppIcon iconName =" app-batch-delete" class =" mr-4" />
7476 {{ $t('views.paragraph.setting.cancelSelected') }}
7577 </el-button >
7678 </span >
8082 v-if =" permissionPrecise.create()"
8183 @click =" openTemplateStoreDialog()"
8284 >
83- <AppIcon iconName =" app-template-center" class =" mr-4" />
85+ <AppIcon iconName =" app-template-center" class =" mr-4" />
8486 {{ $t('workflow.setting.templateCenter') }}
8587 </el-button >
8688 <el-dropdown trigger =" click" v-if =" permissionPrecise.create()" >
8789 <el-button type =" primary" class =" ml-8" >
8890 {{ $t('common.create') }}
8991 <el-icon class =" el-icon--right" >
90- <arrow-down />
92+ <arrow-down />
9193 </el-icon >
9294 </el-button >
9395 <template #dropdown >
106108 {{ $t('views.application.simpleAgent') }}
107109 </div >
108110 <el-text type =" info" size =" small" class =" color-secondary"
109- >{{ $t('views.application.simplePlaceholder') }}
111+ >{{ $t('views.application.simplePlaceholder') }}
110112 </el-text >
111113 </div >
112114 </div >
123125 <div class =" pre-wrap ml-8" >
124126 <div class =" lighter" >{{ $t('views.application.AdvancedAgent') }}</div >
125127 <el-text type =" info" size =" small" class =" color-secondary"
126- >{{ $t('views.application.advancedPlaceholder') }}
128+ >{{ $t('views.application.advancedPlaceholder') }}
127129 </el-text >
128130 </div >
129131 </div >
142144 <el-dropdown-item >
143145 <div class =" flex align-center w-full" >
144146 <el-avatar shape =" square" class =" mt-4" :size =" 32" style =" background : none " >
145- <img src =" @/assets/icon_import.svg" alt =" " />
147+ <img src =" @/assets/icon_import.svg" alt =" " />
146148 </el-avatar >
147149 <div class =" pre-wrap ml-8" >
148150 <div class =" lighter" >{{ $t('views.application.importApplication') }}</div >
192194 >
193195 <template #icon >
194196 <el-avatar shape =" square" :size =" 32" style =" background : none " >
195- <img :src =" resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt =" " />
197+ <img :src =" resetUrl(item?.icon, resetUrl('./favicon.ico'))" alt =" " />
196198 </el-avatar >
197199 </template >
198200 <template #subTitle >
209211 </el-text >
210212 </template >
211213 <template #tag >
212- <el-checkbox :value =" item.id" v-if =" isBatch" @change =" checkboxChange(item)" />
214+ <el-checkbox :value =" item.id" v-if =" isBatch" @change =" checkboxChange(item)" />
213215 <div v-else >
214216 <el-tag size =" small" v-if =" isWorkFlow(item.type)" class =" warning-tag" >
215217 {{ $t('views.application.senior') }}
223225 <template #footer >
224226 <div v-if =" item.is_publish" class =" flex align-center" >
225227 <el-icon class =" color-success mr-8" style =" font-size : 16px " >
226- <SuccessFilled />
228+ <SuccessFilled />
227229 </el-icon >
228230 <span class =" color-secondary" >
229231 {{ $t('common.status.published') }}
230232 </span >
231- <el-divider direction =" vertical" />
233+ <el-divider direction =" vertical" />
232234 <AppIcon iconName =" app-clock" class =" color-secondary mr-8" ></AppIcon >
233235
234236 <span class =" color-secondary" >{{ dateFormat(item.update_time) }}</span >
251253 <AppIcon iconName =" app-create-chat" class =" color-secondary" ></AppIcon >
252254 </el-button >
253255 </el-tooltip >
254- <el-divider direction =" vertical" />
256+ <el-divider direction =" vertical" />
255257 <el-dropdown trigger =" click" >
256258 <el-button text @click.stop >
257259 <AppIcon iconName =" app-more" class =" color-secondary" ></AppIcon >
336338 </el-col >
337339 </template >
338340 </el-row >
339- <el-empty :description =" $t('common.noData')" v-else />
341+ <el-empty :description =" $t('common.noData')" v-else />
340342 </el-checkbox-group >
341343 </InfiniteScroll >
342344 </div >
374376 </el-button >
375377 </div >
376378 </ContentContainer >
377- <ResourceMappingDrawer ref =" resourceMappingDrawerRef" />
378- <CreateApplicationDialog ref =" CreateApplicationDialogRef" />
379- <CopyApplicationDialog ref =" CopyApplicationDialogRef" />
380- <CreateFolderDialog ref =" CreateFolderDialogRef" @refresh =" refreshFolder" />
379+ <ResourceMappingDrawer ref =" resourceMappingDrawerRef" />
380+ <CreateApplicationDialog ref =" CreateApplicationDialogRef" />
381+ <CopyApplicationDialog ref =" CopyApplicationDialogRef" />
382+ <CreateFolderDialog ref =" CreateFolderDialogRef" @refresh =" refreshFolder" />
381383 <MoveToDialog
382384 ref =" MoveToDialogRef"
383385 :source =" SourceTypeEnum.APPLICATION"
388390 :type =" SourceTypeEnum.APPLICATION"
389391 ref =" ResourceAuthorizationDrawerRef"
390392 />
391- <TemplateStoreDialog ref =" templateStoreDialogRef" :api-type =" apiType" @refresh =" getList" />
393+ <TemplateStoreDialog ref =" templateStoreDialogRef" :api-type =" apiType" @refresh =" getList" />
392394 <ResourceTriggerDrawer
393395 ref =" resourceTriggerDrawerRef"
394396 :source =" SourceTypeEnum.APPLICATION"
397399</template >
398400
399401<script lang="ts" setup>
400- import { onMounted , ref , reactive , computed } from ' vue'
401- import { useRouter , useRoute } from ' vue-router'
402- import type { CheckboxValueType } from ' element-plus'
402+ import {onMounted , ref , reactive , computed } from ' vue'
403+ import {useRouter , useRoute } from ' vue-router'
404+ import type {CheckboxValueType } from ' element-plus'
403405import CreateApplicationDialog from ' @/views/application/component/CreateApplicationDialog.vue'
404406import CreateFolderDialog from ' @/components/folder-virtualized-tree/CreateFolderDialog.vue'
405407import CopyApplicationDialog from ' @/views/application/component/CopyApplicationDialog.vue'
@@ -409,18 +411,20 @@ import ResourceTriggerDrawer from '@/views/trigger/ResourceTriggerDrawer.vue'
409411import TemplateStoreDialog from ' @/views/application/template-store/TemplateStoreDialog.vue'
410412import ApplicationApi from ' @/api/application/application'
411413import WorkspaceApi from ' @/api/workspace/workspace'
412- import { MsgSuccess , MsgConfirm , MsgError } from ' @/utils/message'
413- import { i18n_name , resetUrl } from ' @/utils/common'
414- import { isWorkFlow } from ' @/utils/application'
415- import { dateFormat } from ' @/utils/time'
416- import { SourceTypeEnum } from ' @/enums/common'
414+ import {MsgSuccess , MsgConfirm , MsgError } from ' @/utils/message'
415+ import {i18n_name , resetUrl } from ' @/utils/common'
416+ import {isWorkFlow } from ' @/utils/application'
417+ import {dateFormat } from ' @/utils/time'
418+ import {SourceTypeEnum } from ' @/enums/common'
417419import permissionMap from ' @/permission'
418- import { hasPermission } from ' @/utils/permission'
419- import { ComplexPermission } from ' @/utils/permission/type'
420- import { EditionConst , PermissionConst , RoleConst } from ' @/utils/permission/data'
420+ import {hasPermission } from ' @/utils/permission'
421+ import {ComplexPermission } from ' @/utils/permission/type'
422+ import {EditionConst , PermissionConst , RoleConst } from ' @/utils/permission/data'
421423import ResourceMappingDrawer from ' @/components/resource_mapping/index.vue'
422424import useStore from ' @/stores'
423- import { t } from ' @/locales'
425+ import {t } from ' @/locales'
426+ import {loadSharedApi } from " @/utils/dynamics-api/shared-api.ts" ;
427+
424428const router = useRouter ()
425429
426430const apiType = computed <' workspace' >(() => {
@@ -430,7 +434,7 @@ const permissionPrecise = computed(() => {
430434 return permissionMap [' application' ][apiType .value ]
431435})
432436
433- const { folder, application, user } = useStore ()
437+ const {folder, application, user} = useStore ()
434438
435439const loading = ref (false )
436440
@@ -463,6 +467,7 @@ const isIndeterminate = computed(() => {
463467 multipleSelection .value .length < applicationList .value .length
464468 )
465469})
470+
466471function batchSelectedHandle(bool : boolean ) {
467472 isBatch .value = bool
468473 multipleSelection .value = []
@@ -512,7 +517,8 @@ function deleteMulApplication() {
512517 MsgSuccess (t (' views.document.delete.successMessage' ))
513518 })
514519 })
515- .catch (() => {})
520+ .catch (() => {
521+ })
516522}
517523
518524const resourceTriggerDrawerRef = ref <InstanceType <typeof ResourceTriggerDrawer >>()
@@ -585,7 +591,7 @@ const goApp = (event: any, item: any) => {
585591 }).href
586592 window .open (newUrl )
587593 } else {
588- router .push ({ path: get_route (item ) })
594+ router .push ({path: get_route (item )})
589595 }
590596}
591597
@@ -718,34 +724,34 @@ function openCreateDialog(type?: string) {
718724}
719725
720726const search_type_change = () => {
721- search_form .value = { name: ' ' , create_user: ' ' }
727+ search_form .value = {name: ' ' , create_user: ' ' }
722728}
723729
724730function toChat(row : any ) {
725731 const api =
726732 row .type == ' WORK_FLOW'
727733 ? (id : string ) => ApplicationApi .getApplicationDetail (id )
728- : (id : string ) => Promise .resolve ({ data: row })
734+ : (id : string ) => Promise .resolve ({data: row })
729735 api (row .id ).then ((ok ) => {
730736 let aips = ok .data ?.work_flow ?.nodes
731737 ?.filter ((v : any ) => v .id === ' base-node' )
732738 .map ((v : any ) => {
733739 return v .properties .api_input_field_list
734740 ? v .properties .api_input_field_list .map ((v : any ) => {
735- return {
736- name: v .variable ,
737- value: v .default_value ,
738- }
739- })
741+ return {
742+ name: v .variable ,
743+ value: v .default_value ,
744+ }
745+ })
740746 : v .properties .input_field_list
741747 ? v .properties .input_field_list
742- .filter ((v : any ) => v .assignment_method === ' api_input' )
743- .map ((v : any ) => {
744- return {
745- name: v .variable ,
746- value: v .default_value ,
747- }
748- })
748+ .filter ((v : any ) => v .assignment_method === ' api_input' )
749+ .map ((v : any ) => {
750+ return {
751+ name: v .variable ,
752+ value: v .default_value ,
753+ }
754+ })
749755 : []
750756 })
751757 .reduce ((x : Array <any >, y : Array <any >) => [... x , ... y ])
@@ -772,7 +778,7 @@ function copyApplication(row: any) {
772778 ApplicationApi .getApplicationDetail (row .id , loading ).then ((res : any ) => {
773779 if (res ?.data ) {
774780 CopyApplicationDialogRef .value .open (
775- { ... res .data , model_id: res .data .model },
781+ {... res .data , model_id: res .data .model },
776782 folder .currentFolder ?.id || ' default' ,
777783 )
778784 }
@@ -789,10 +795,10 @@ function settingApplication(event: any, row: any) {
789795 }).href
790796 window .open (newUrl )
791797 } else {
792- router .push ({ path: ` /application/workspace/${row .id }/workflow ` })
798+ router .push ({path: ` /application/workspace/${row .id }/workflow ` })
793799 }
794800 } else {
795- router .push ({ path: ` /application/workspace/${row .id }/${row .type }/setting ` })
801+ router .push ({path: ` /application/workspace/${row .id }/${row .type }/setting ` })
796802 }
797803}
798804
@@ -815,7 +821,8 @@ function deleteApplication(row: any) {
815821 MsgSuccess (t (' common.deleteSuccess' ))
816822 })
817823 })
818- .catch (() => {})
824+ .catch (() => {
825+ })
819826}
820827
821828const exportApplication = (application : any ) => {
@@ -919,11 +926,14 @@ function getList() {
919926 })
920927}
921928
922- onMounted (() => {
923- getFolder (folder .currentFolder ?.id ? false : true )
924- WorkspaceApi .getAllMemberList (user .getWorkspaceId (), loading ).then ((res ) => {
929+ function getUserList(query : string ) {
930+ WorkspaceApi .getAllMemberList (user .getWorkspaceId (), query ? {nick_name: query } : ' ' , loading ).then ((res ) => {
925931 user_options .value = res .data
926932 })
933+ }
934+
935+ onMounted (() => {
936+ getFolder (folder .currentFolder ?.id ? false : true )
927937})
928938 </script >
929939
0 commit comments