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>
|
<span class="ml-4 lighter">{{ ele.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button link>
|
<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>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -91,6 +93,8 @@ import { ref, computed } from 'vue'
|
||||||
import type {CheckboxValueType} from 'element-plus'
|
import type {CheckboxValueType} from 'element-plus'
|
||||||
import authorizationApi from '@/api/system-shared/authorization'
|
import authorizationApi from '@/api/system-shared/authorization'
|
||||||
import workspaceApi from '@/api/workspace/workspace'
|
import workspaceApi from '@/api/workspace/workspace'
|
||||||
|
import {loadPermissionApi} from "@/utils/dynamics-api/permission-api.ts";
|
||||||
|
|
||||||
const checkAll = ref(false)
|
const checkAll = ref(false)
|
||||||
const isIndeterminate = ref(true)
|
const isIndeterminate = ref(true)
|
||||||
const checkedWorkspace = ref<any[]>([])
|
const checkedWorkspace = ref<any[]>([])
|
||||||
|
|
@ -124,7 +128,7 @@ const open = async ({ id }: any, type = 'Knowledge') => {
|
||||||
currentType = type
|
currentType = type
|
||||||
const [authList, systemWorkspaceList] = await Promise.all([
|
const [authList, systemWorkspaceList] = await Promise.all([
|
||||||
authorizationApi[`getSharedAuthorization${type}`](id),
|
authorizationApi[`getSharedAuthorization${type}`](id),
|
||||||
workspaceApi.getSystemWorkspaceList(),
|
loadPermissionApi('workspace').getSystemWorkspaceList(),
|
||||||
])
|
])
|
||||||
workspace.value = systemWorkspaceList.data as any
|
workspace.value = systemWorkspaceList.data as any
|
||||||
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
listType.value = (authList.data || {}).authentication_type || 'WHITE_LIST'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue