refactor: improve code formatting and update API call for workspace list
parent
b011cd7d26
commit
75f75f0111
|
|
@ -72,7 +72,9 @@
|
|||
<span class="ml-4 lighter">{{ ele.name }}</span>
|
||||
</div>
|
||||
<el-button link>
|
||||
<el-icon @click="clearWorkspace(ele)" :size="18"><Close /></el-icon>
|
||||
<el-icon @click="clearWorkspace(ele)" :size="18">
|
||||
<Close/>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -91,6 +93,8 @@ import { ref, computed } from 'vue'
|
|||
import type {CheckboxValueType} from 'element-plus'
|
||||
import authorizationApi from '@/api/system-shared/authorization'
|
||||
import workspaceApi from '@/api/workspace/workspace'
|
||||
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
|
||||
|
||||
const checkAll = ref(false)
|
||||
const isIndeterminate = ref(true)
|
||||
const checkedWorkspace = ref<any[]>([])
|
||||
|
|
@ -124,7 +128,7 @@ const open = async ({ id }: any, type = 'Knowledge') => {
|
|||
currentType = type
|
||||
const [authList, systemWorkspaceList] = await Promise.all([
|
||||
authorizationApi[`getSharedAuthorization${type}`](id),
|
||||
workspaceApi.getSystemWorkspaceList(),
|
||||
loadPermissionApi('workspace').getSystemWorkspaceList(),
|
||||
])
|
||||
workspace.value = systemWorkspaceList.data as any
|
||||
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
||||
|
|
|
|||
Loading…
Reference in New Issue