File tree Expand file tree Collapse file tree 5 files changed +11
-6
lines changed
system-resource-management
system/resource-authorization Expand file tree Collapse file tree 5 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ import { isAppIcon } from '@/utils/common'
162162import useStore from ' @/stores'
163163import WorkspaceApi from ' @/api/workspace/workspace.ts'
164164import { datetimeFormat } from ' @/utils/time'
165+ import {loadPermissionApi } from " @/utils/dynamics-api/permission-api.ts" ;
165166
166167const { user } = useStore ()
167168
@@ -192,7 +193,7 @@ function filterWorkspaceChange(val: string) {
192193}
193194async function getWorkspaceList() {
194195 if (user .isEE ()) {
195- const res = await WorkspaceApi .getSystemWorkspaceList (loading )
196+ const res = await loadPermissionApi ( ' workspace ' ) .getSystemWorkspaceList (loading )
196197 workspaceOptions .value = res .data .map ((item : any ) => ({
197198 label: item .name ,
198199 value: item .id ,
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ import { isAppIcon } from '@/utils/common'
151151import useStore from ' @/stores'
152152import WorkspaceApi from ' @/api/workspace/workspace.ts'
153153import { datetimeFormat } from ' @/utils/time'
154+ import {loadPermissionApi } from " @/utils/dynamics-api/permission-api.ts" ;
154155
155156const { user } = useStore ()
156157
@@ -181,7 +182,7 @@ function filterWorkspaceChange(val: string) {
181182}
182183async function getWorkspaceList() {
183184 if (user .isEE ()) {
184- const res = await WorkspaceApi .getSystemWorkspaceList (loading )
185+ const res = await loadPermissionApi ( ' workspace ' ) .getSystemWorkspaceList (loading )
185186 workspaceOptions .value = res .data .map ((item : any ) => ({
186187 label: item .name ,
187188 value: item .id ,
Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ import { t } from '@/locales'
175175import useStore from ' @/stores'
176176import WorkspaceApi from ' @/api/workspace/workspace.ts'
177177import { datetimeFormat } from ' @/utils/time'
178+ import {loadPermissionApi } from " @/utils/dynamics-api/permission-api.ts" ;
178179
179180const { user, model } = useStore ()
180181
@@ -219,7 +220,7 @@ function filterWorkspaceChange(val: string) {
219220}
220221async function getWorkspaceList() {
221222 if (user .isEE ()) {
222- const res = await WorkspaceApi .getSystemWorkspaceList (loading )
223+ const res = await loadPermissionApi ( ' workspace ' ) .getSystemWorkspaceList (loading )
223224 workspaceOptions .value = res .data .map ((item : any ) => ({
224225 label: item .name ,
225226 value: item .id ,
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ import { ToolType } from '@/enums/tool'
171171import useStore from ' @/stores'
172172import WorkspaceApi from ' @/api/workspace/workspace.ts'
173173import { datetimeFormat } from ' @/utils/time'
174+ import {loadPermissionApi } from " @/utils/dynamics-api/permission-api.ts" ;
174175
175176const { user } = useStore ()
176177
@@ -201,7 +202,7 @@ function filterWorkspaceChange(val: string) {
201202}
202203async function getWorkspaceList() {
203204 if (user .isEE ()) {
204- const res = await WorkspaceApi .getSystemWorkspaceList (loading )
205+ const res = await loadPermissionApi ( ' workspace ' ) .getSystemWorkspaceList (loading )
205206 workspaceOptions .value = res .data .map ((item : any ) => ({
206207 label: item .name ,
207208 value: item .id ,
Original file line number Diff line number Diff line change 8282
8383 <div class =" submit-button" >
8484 <el-button type =" primary" @click =" submitPermissions"
85- v-if =" hasPermission(permissionObj[(route.meta?.resource as string||'APPLICATION')],'OR')"
85+ v-if =" hasPermission(permissionObj[(route.meta?.resource as string||'APPLICATION')],'OR')"
8686 >{{ $t('common.save') }}</el-button >
8787 </div >
8888 </div >
@@ -106,6 +106,7 @@ import { hasPermission } from '@/utils/permission/index'
106106import WorkspaceApi from ' @/api/workspace/workspace.ts'
107107import type { WorkspaceItem } from ' @/api/type/workspace'
108108import { ComplexPermission } from ' @/utils/permission/type'
109+ import {loadPermissionApi } from " @/utils/dynamics-api/permission-api.ts" ;
109110
110111const route = useRoute ()
111112const { user } = useStore ()
@@ -390,7 +391,7 @@ const currentWorkspace = computed(() => {
390391 return workspaceList .value .find ((w ) => w .id == currentWorkspaceId .value )
391392})
392393async function getWorkspaceList() {
393- const res = await WorkspaceApi .getSystemWorkspaceList (loading )
394+ const res = await loadPermissionApi ( ' workspace ' ) .getSystemWorkspaceList (loading )
394395 workspaceList .value = res .data
395396 currentWorkspaceId .value = ' default'
396397}
You can’t perform that action at this time.
0 commit comments