Browse Source

fix: 使用staffId判断销售负责人

lanjianrong 4 years ago
parent
commit
fb353b2a43
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/api/sys/model/userModel.ts
  2. 1 1
      src/views/dashboard/project-detail/index.vue

+ 1 - 0
src/api/sys/model/userModel.ts

@@ -35,4 +35,5 @@ export interface GetUserInfoModel {
   id: string
   id: string
   roles: string[]
   roles: string[]
   isAdmin: number
   isAdmin: number
+  staffId: string
 }
 }

+ 1 - 1
src/views/dashboard/project-detail/index.vue

@@ -65,7 +65,7 @@
       const hasAdmin = computed(() => projectInfo.value?.userId !== 'xCi4xUL6uur0h7fVI--NeA')
       const hasAdmin = computed(() => projectInfo.value?.userId !== 'xCi4xUL6uur0h7fVI--NeA')
       const userStore = useUserStore()
       const userStore = useUserStore()
       const hasPermission = computed(
       const hasPermission = computed(
-        () => !!userStore.getUserInfo.isAdmin || projectInfo.value?.staffIdEncrypted === userStore.getUserInfo.id
+        () => !!userStore.getUserInfo.isAdmin || projectInfo.value?.staffIdEncrypted === userStore.getUserInfo.staffId
       )
       )
       const route = useRoute()
       const route = useRoute()
       async function fetchProjectInfo(id: string) {
       async function fetchProjectInfo(id: string) {