File tree Expand file tree Collapse file tree 6 files changed +41
-20
lines changed
Expand file tree Collapse file tree 6 files changed +41
-20
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,7 @@ function rebalanceAndInsert(
580580}
581581
582582onBeforeRouteLeave ((to , from ) => {
583+ if (from ?.name === ' ToolWorkflow' ) return
583584 folder .setCurrentFolder ({})
584585})
585586
Original file line number Diff line number Diff line change @@ -460,8 +460,14 @@ function batchSelectedHandle(bool: boolean) {
460460}
461461
462462const handleCheckAllChange = (val : CheckboxValueType ) => {
463- multipleSelection .value = val ? applicationList .value .map ((v ) => v .id ) : []
464- checkAll .value = val as boolean
463+ let bool
464+ if (isIndeterminate .value ) {
465+ bool = true
466+ } else {
467+ bool = val as boolean
468+ }
469+ multipleSelection .value = bool ? applicationList .value .map ((v ) => v .id ) : []
470+ checkAll .value = bool as boolean
465471}
466472const handleCheckedChatChange = (value : CheckboxValueType []) => {
467473 const checkedCount = value .length
@@ -851,6 +857,7 @@ function folderClickHandle(row: any) {
851857 if (row .id === folder .currentFolder ?.id ) {
852858 return
853859 }
860+ batchSelectedHandle (false )
854861 folder .setCurrentFolder (row )
855862 paginationConfig .current_page = 1
856863 applicationList .value = []
Original file line number Diff line number Diff line change @@ -537,8 +537,14 @@ function batchSelectedHandle(bool: boolean) {
537537}
538538
539539const handleCheckAllChange = (val : CheckboxValueType ) => {
540- multipleSelection .value = val ? knowledge .knowledgeList .map ((v ) => v .id ) : []
541- checkAll .value = val as boolean
540+ let bool
541+ if (isIndeterminate .value ) {
542+ bool = true
543+ } else {
544+ bool = val as boolean
545+ }
546+ multipleSelection .value = bool ? knowledge .knowledgeList .map ((v ) => v .id ) : []
547+ checkAll .value = bool as boolean
542548}
543549const handleCheckedChatChange = (value : CheckboxValueType []) => {
544550 const checkedCount = value .length
@@ -767,6 +773,7 @@ watch(
767773 () => folder .currentFolder ,
768774 (newValue ) => {
769775 if (newValue && newValue .id && ! isSystemShare .value ) {
776+ batchSelectedHandle (false )
770777 paginationConfig .current_page = 1
771778 knowledge .setKnowledgeList ([])
772779 getList ()
@@ -791,10 +798,6 @@ function getList() {
791798 })
792799}
793800
794- function clickFolder(item : any ) {
795- folder .setCurrentFolder (item )
796- }
797-
798801function searchHandle() {
799802 paginationConfig .current_page = 1
800803 knowledge .setKnowledgeList ([])
Original file line number Diff line number Diff line change 192192 {{ $t('common.total') }} {{ paginationConfig.total }}
193193 {{ $t('views.document.items') }}
194194 </span >
195- <el-button
196- link
197- type =" primary"
198- v-if =" multipleSelection.length > 0"
199- @click =" multipleSelection = []"
200- >
201- {{ $t('common.clear') }}
195+ <el-button link type =" primary" @click =" batchSelectedHandle(false)" >
196+ {{ $t('views.paragraph.setting.cancelSelected') }}
202197 </el-button >
203198 </div >
204199 </div >
@@ -303,8 +298,14 @@ const isIndeterminate = computed(() => {
303298 )
304299})
305300const handleCheckAllChange = (val : CheckboxValueType ) => {
306- multipleSelection .value = val ? paragraphDetail .value .map ((v ) => v .id ) : []
307- checkAll .value = val as boolean
301+ let bool
302+ if (isIndeterminate .value ) {
303+ bool = true
304+ } else {
305+ bool = val as boolean
306+ }
307+ multipleSelection .value = bool ? paragraphDetail .value .map ((v ) => v .id ) : []
308+ checkAll .value = bool as boolean
308309}
309310
310311function toggleSelect(id : number ) {
@@ -374,6 +375,7 @@ function deleteMulParagraph() {
374375
375376function batchSelectedHandle(bool : boolean ) {
376377 isBatch .value = bool
378+ checkAll .value = false
377379 multipleSelection .value = []
378380}
379381
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ import DebugDrawer from './debug-drawer/DebugDrawer.vue'
179179provide (' getResourceDetail' , () => detail )
180180provide (' workflowMode' , WorkflowMode .Tool )
181181provide (' loopWorkflowMode' , WorkflowMode .ToolLoop )
182- const { theme } = useStore ()
182+ const { theme, folder } = useStore ()
183183const router = useRouter ()
184184const route = useRoute ()
185185const {
@@ -512,6 +512,7 @@ const go = () => {
512512 } else if (route .path .includes (' shared' )) {
513513 return router .push ({ path: ' /system/shared/tool' })
514514 } else {
515+ folder .setCurrentFolder ({ id: folderId })
515516 return router .push ({ path: ' /tool' })
516517 }
517518}
Original file line number Diff line number Diff line change @@ -635,8 +635,14 @@ function batchSelectedHandle(bool: boolean) {
635635}
636636
637637const handleCheckAllChange = (val : CheckboxValueType ) => {
638- multipleSelection .value = val ? tool .toolList .map ((v ) => v .id ) : []
639- checkAll .value = val as boolean
638+ let bool
639+ if (isIndeterminate .value ) {
640+ bool = true
641+ } else {
642+ bool = val as boolean
643+ }
644+ multipleSelection .value = bool ? tool .toolList .map ((v ) => v .id ) : []
645+ checkAll .value = bool as boolean
640646}
641647const handleCheckedChatChange = (value : CheckboxValueType []) => {
642648 const checkedCount = value .length
@@ -1221,6 +1227,7 @@ watch(
12211227 () => folder .currentFolder ,
12221228 (newValue ) => {
12231229 if (newValue && newValue .id ) {
1230+ batchSelectedHandle (false )
12241231 paginationConfig .current_page = 1
12251232 tool .setToolList ([])
12261233 getList ()
You can’t perform that action at this time.
0 commit comments