5757 >
5858 {{ $t('common.setting') }}
5959 </el-button >
60- <el-button
61- @click =" openAddTagDialog()"
62- :disabled =" multipleSelection.length === 0"
63- v-if =" permissionPrecise.doc_edit(id)"
64- >
65- {{ $t('views.document.tag.addTag') }}
66- </el-button >
60+
6761 <el-dropdown v-if =" MoreFilledPermission0(id)" >
6862 <el-button class =" ml-12 mr-12" >
6963 <AppIcon iconName =" app-more" ></AppIcon >
7771 >
7872 {{ $t('views.document.setting.migration') }}
7973 </el-dropdown-item >
74+ <el-dropdown-item
75+ @click =" openAddTagDialog()"
76+ :disabled =" multipleSelection.length === 0"
77+ v-if =" permissionPrecise.doc_edit(id)"
78+ >{{ $t('views.document.tag.addTag') }}
79+ </el-dropdown-item >
8080 <el-dropdown-item
8181 divided
8282 @click =" syncMulDocument"
9191 v-if =" knowledgeDetail?.type === 2 && permissionPrecise.doc_sync(id)"
9292 >{{ $t('views.document.syncDocument') }}
9393 </el-dropdown-item >
94+
9495 <el-dropdown-item
9596 divided
9697 @click =" deleteMulDocument"
459460 ></AppIcon >
460461 {{ $t('views.document.generateQuestion.title') }}
461462 </el-dropdown-item >
462- <el-dropdown-item
463- @click = " openTagSettingDrawer(row) "
464- >
463+ <el-dropdown-item @click = " openTagSettingDrawer(row) " >
464+ < AppIcon iconName = " app-tag " class = " color-secondary " ></ AppIcon >
465+
465466 {{ $t('views.document.tag.setting') }}
466467 </el-dropdown-item >
467468 <el-dropdown-item
676677 :workspaceId =" knowledgeDetail?.workspace_id"
677678 />
678679 <GenerateRelatedDialog ref =" GenerateRelatedDialogRef" @refresh =" getList" :apiType =" apiType" />
679- <TagDrawer ref =" tagDrawerRef" />
680- <TagSettingDrawer ref =" tagSettingDrawerRef" :knowledge-tags = " knowledgeTags " />
681- <AddTagDialog ref =" addTagDialogRef" @addTags =" addTags" :knowledge-tags = " knowledgeTags " />
680+ <TagDrawer ref =" tagDrawerRef" />
681+ <TagSettingDrawer ref =" tagSettingDrawerRef" />
682+ <AddTagDialog ref =" addTagDialogRef" @addTags =" addTags" :apiType = " apiType " />
682683 </div >
683684</template >
684685<script setup lang="ts">
685686import { ref , onMounted , onBeforeUnmount , computed } from ' vue'
686687import { useRouter , useRoute , onBeforeRouteLeave , onBeforeRouteUpdate } from ' vue-router'
687- import { ElTable } from ' element-plus'
688+ import type { ElTable } from ' element-plus'
688689import ImportDocumentDialog from ' ./component/ImportDocumentDialog.vue'
689690import SyncWebDialog from ' @/views/knowledge/component/SyncWebDialog.vue'
690691import SelectKnowledgeDialog from ' ./component/SelectKnowledgeDialog.vue'
@@ -700,9 +701,9 @@ import { TaskType, State } from '@/utils/status'
700701import { t } from ' @/locales'
701702import permissionMap from ' @/permission'
702703import { loadSharedApi } from ' @/utils/dynamics-api/shared-api'
703- import TagDrawer from " ./tag/TagDrawer.vue" ;
704- import TagSettingDrawer from " ./tag/TagSettingDrawer.vue" ;
705- import AddTagDialog from " @/views/document/tag/MulAddTagDialog.vue" ;
704+ import TagDrawer from ' ./tag/TagDrawer.vue'
705+ import TagSettingDrawer from ' ./tag/TagSettingDrawer.vue'
706+ import AddTagDialog from ' @/views/document/tag/MulAddTagDialog.vue'
706707
707708const route = useRoute ()
708709const router = useRouter ()
@@ -1020,15 +1021,14 @@ function syncMulDocument() {
10201021 confirmButtonClass: ' danger' ,
10211022 })
10221023 .then (() => {
1023- loadSharedApi ({type: ' document' , systemType: apiType .value })
1024+ loadSharedApi ({ type: ' document' , systemType: apiType .value })
10241025 .putMulSyncDocument (id , arr , loading )
10251026 .then (() => {
10261027 MsgSuccess (t (' views.document.sync.successMessage' ))
10271028 getList ()
10281029 })
10291030 })
1030- .catch (() => {
1031- })
1031+ .catch (() => {})
10321032}
10331033
10341034function syncLarkMulDocument() {
@@ -1239,7 +1239,7 @@ function openTagDrawer() {
12391239
12401240const tagSettingDrawerRef = ref ()
12411241function openTagSettingDrawer(doc : any ) {
1242- tagSettingDrawerRef .value .open (doc )
1242+ tagSettingDrawerRef .value .open (doc )
12431243}
12441244
12451245const addTagDialogRef = ref ()
@@ -1251,24 +1251,15 @@ function openAddTagDialog() {
12511251function addTags(tags : any ) {
12521252 const arr: string [] = multipleSelection .value .map ((v ) => v .id )
12531253
1254- loadSharedApi ({type: ' document' , systemType: apiType .value })
1255- .postMulDocumentTags (id , {tag_ids: tags , document_ids: arr }, loading )
1254+ loadSharedApi ({ type: ' document' , systemType: apiType .value })
1255+ .postMulDocumentTags (id , { tag_ids: tags , document_ids: arr }, loading )
12561256 .then (() => {
12571257 addTagDialogRef .value ?.close ()
12581258 getList ()
12591259 clearSelection ()
12601260 })
12611261}
12621262
1263- const knowledgeTags = ref <any []>([])
1264- function getTags() {
1265- loadSharedApi ({type: ' knowledge' , systemType: apiType .value , isShared: isShared .value })
1266- .getTags (id , {}, loading )
1267- .then ((res : any ) => {
1268- knowledgeTags .value = res .data
1269- })
1270- }
1271-
12721263onMounted (() => {
12731264 getDetail ()
12741265 if (beforePagination .value ) {
@@ -1279,7 +1270,6 @@ onMounted(() => {
12791270 filterMethod .value = beforeSearch .value [' filterMethod' ]
12801271 }
12811272 getList ()
1282- getTags ()
12831273 // 初始化定时任务
12841274 initInterval ()
12851275})
0 commit comments