|
72 | 72 | <span class="ml-4 lighter">{{ ele.name }}</span> |
73 | 73 | </div> |
74 | 74 | <el-button link> |
75 | | - <el-icon @click="clearWorkspace(ele)" :size="18"><Close /></el-icon> |
| 75 | + <el-icon @click="clearWorkspace(ele)" :size="18"> |
| 76 | + <Close/> |
| 77 | + </el-icon> |
76 | 78 | </el-button> |
77 | 79 | </div> |
78 | 80 | </template> |
|
81 | 83 |
|
82 | 84 | <template #footer> |
83 | 85 | <el-button @click="centerDialogVisible = false"> {{ $t('common.cancel') }}</el-button> |
84 | | - <el-button type="primary" @click="handleConfirm"> {{ $t('common.add') }} </el-button> |
| 86 | + <el-button type="primary" @click="handleConfirm"> {{ $t('common.add') }}</el-button> |
85 | 87 | </template> |
86 | 88 | </el-dialog> |
87 | 89 | </template> |
88 | 90 |
|
89 | 91 | <script lang="ts" setup> |
90 | | -import { ref, computed } from 'vue' |
91 | | -import type { CheckboxValueType } from 'element-plus' |
| 92 | +import {ref, computed} from 'vue' |
| 93 | +import type {CheckboxValueType} from 'element-plus' |
92 | 94 | import authorizationApi from '@/api/system-shared/authorization' |
93 | 95 | import workspaceApi from '@/api/workspace/workspace' |
| 96 | +import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts"; |
| 97 | +
|
94 | 98 | const checkAll = ref(false) |
95 | 99 | const isIndeterminate = ref(true) |
96 | 100 | const checkedWorkspace = ref<any[]>([]) |
@@ -118,13 +122,13 @@ const handleCheckedWorkspaceChange = (value: CheckboxValueType[]) => { |
118 | 122 | isIndeterminate.value = checkedCount > 0 && checkedCount < workspace.value.length |
119 | 123 | } |
120 | 124 |
|
121 | | -const open = async ({ id }: any, type = 'Knowledge') => { |
| 125 | +const open = async ({id}: any, type = 'Knowledge') => { |
122 | 126 | knowledge_id = id |
123 | 127 | loading.value = true |
124 | 128 | currentType = type |
125 | 129 | const [authList, systemWorkspaceList] = await Promise.all([ |
126 | 130 | authorizationApi[`getSharedAuthorization${type}`](id), |
127 | | - workspaceApi.getSystemWorkspaceList(), |
| 131 | + loadPermissionApi('workspace').getSystemWorkspaceList(), |
128 | 132 | ]) |
129 | 133 | workspace.value = systemWorkspaceList.data as any |
130 | 134 | listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST' |
|
0 commit comments