66 <div class =" flex-between mb-16" >
77 <div >
88 <el-button type =" primary" @click =" openCreateTagDialog()"
9- >{{ $t('views.document.tag.create') }}
9+ >{{ $t('views.document.tag.create') }}
1010 </el-button >
1111 <el-button :disabled =" multipleSelection.length === 0" @click =" batchDelete" >
1212 {{ $t('common.delete') }}
2727 v-loading =" loading"
2828 @selection-change =" handleSelectionChange"
2929 >
30- <el-table-column type =" selection" width =" 55" />
30+ <el-table-column type =" selection" width =" 55" />
3131 <el-table-column :label =" $t('views.document.tag.key')" >
3232 <template #default =" { row } " >
3333 <div class =" flex-between" >
4141 />
4242 </el-button >
4343 <el-button link >
44- <AppIcon iconName =" app-edit" class =" mr-4" @click =" editTagKey(row)" />
44+ <AppIcon iconName =" app-edit" class =" mr-4" @click =" editTagKey(row)" />
4545 </el-button >
4646 <el-button link >
47- <AppIcon iconName =" app-delete" class =" mr-4" @click =" delTag(row)" />
47+ <AppIcon iconName =" app-delete" class =" mr-4" @click =" delTag(row)" />
4848 </el-button >
4949 </div >
5050 </div >
5656 {{ row.value }}
5757 <div >
5858 <el-button link >
59- <AppIcon iconName =" app-edit" class =" mr-4" @click =" editTagValue(row)" />
59+ <AppIcon iconName =" app-edit" class =" mr-4" @click =" editTagValue(row)" />
6060 </el-button >
6161 <el-button link >
62- <AppIcon iconName =" app-delete" class =" mr-4" @click =" delTagValue(row)" />
62+ <AppIcon iconName =" app-delete" class =" mr-4" @click =" delTagValue(row)" />
6363 </el-button >
6464 </div >
6565 </div >
6666 </template >
6767 </el-table-column >
6868 </el-table >
6969 </el-drawer >
70- <CreateTagDialog ref =" createTagDialogRef" @refresh =" getList" />
71- <EditTagDialog ref =" editTagDialogRef" @refresh =" getList" />
70+ <CreateTagDialog ref =" createTagDialogRef" @refresh =" getList" />
71+ <EditTagDialog ref =" editTagDialogRef" @refresh =" getList" />
7272</template >
7373
7474<script setup lang="ts">
@@ -84,9 +84,13 @@ const emit = defineEmits(['refresh'])
8484
8585const route = useRoute ()
8686const {
87- params : { id }, // id为knowledgeID
87+ params : {id, folderId }, // id为knowledgeID
8888} = route as any
8989
90+ const isShared = computed (() => {
91+ return folderId === ' share'
92+ })
93+
9094const apiType = computed (() => {
9195 if (route .path .includes (' shared' )) {
9296 return ' systemShare'
@@ -121,7 +125,7 @@ const tableData = computed(() => {
121125})
122126
123127// 合并单元格方法
124- const spanMethod = ({ row , column , rowIndex , columnIndex }: any ) => {
128+ const spanMethod = ({row , column , rowIndex , columnIndex }: any ) => {
125129 if (columnIndex === 0 || columnIndex === 1 ) {
126130 // key列 (由于添加了选择列,索引变为1)
127131 if (row .keyIndex === 0 ) {
@@ -213,9 +217,9 @@ function delTagValue(row: any) {
213217
214218function getList() {
215219 const params = {
216- ... (filterText .value && { name: filterText .value }),
220+ ... (filterText .value && {name: filterText .value }),
217221 }
218- loadSharedApi ({ type: ' knowledge' , systemType: apiType .value })
222+ loadSharedApi ({type: ' knowledge' , systemType: apiType .value , isShared: isShared . value })
219223 .getTags (id , params , loading )
220224 .then ((res : any ) => {
221225 tags .value = res .data
0 commit comments