Showing
1 changed file
with
9 additions
and
2 deletions
1 | <script setup lang="ts"> | 1 | <script setup lang="ts"> |
2 | import { List, Card, Button, PaginationProps, Tooltip } from 'ant-design-vue'; | 2 | import { List, Card, Button, PaginationProps, Tooltip } from 'ant-design-vue'; |
3 | import { ReloadOutlined } from '@ant-design/icons-vue'; | 3 | import { ReloadOutlined } from '@ant-design/icons-vue'; |
4 | - import { onMounted, reactive, ref, unref } from 'vue'; | 4 | + import { computed, onMounted, reactive, ref, unref } from 'vue'; |
5 | import { OrganizationIdTree, useResetOrganizationTree } from '../common/organizationIdTree'; | 5 | import { OrganizationIdTree, useResetOrganizationTree } from '../common/organizationIdTree'; |
6 | import { | 6 | import { |
7 | bigScreenCancelPublish, | 7 | bigScreenCancelPublish, |
@@ -30,6 +30,8 @@ | @@ -30,6 +30,8 @@ | ||
30 | import { ViewTypeNameEnum } from '../common/ShareModal/config'; | 30 | import { ViewTypeNameEnum } from '../common/ShareModal/config'; |
31 | import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard'; | 31 | import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard'; |
32 | import { ViewType } from '../visual/board/config/panelDetail'; | 32 | import { ViewType } from '../visual/board/config/panelDetail'; |
33 | + import { useUserStore } from '/@/store/modules/user'; | ||
34 | + import { RoleEnum } from '/@/enums/roleEnum'; | ||
33 | 35 | ||
34 | const listColumn = ref(5); | 36 | const listColumn = ref(5); |
35 | 37 | ||
@@ -173,6 +175,11 @@ | @@ -173,6 +175,11 @@ | ||
173 | return `${origin}${largeDesignerPrefix}/#/share/preview/${record.id}/${record.publicId}`; | 175 | return `${origin}${largeDesignerPrefix}/#/share/preview/${record.id}/${record.publicId}`; |
174 | }; | 176 | }; |
175 | 177 | ||
178 | + const userStore = useUserStore(); | ||
179 | + const hasPublicInterfacePermission = computed(() => { | ||
180 | + return userStore.getUserInfo.roles![0] !== RoleEnum.CUSTOMER_USER; | ||
181 | + }); | ||
182 | + | ||
176 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); | 183 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); |
177 | const handleCreateShareUrl = (record: BigScreenCenterItemsModel) => { | 184 | const handleCreateShareUrl = (record: BigScreenCenterItemsModel) => { |
178 | clipboardRef.value = createShareUrl(record); | 185 | clipboardRef.value = createShareUrl(record); |
@@ -214,7 +221,7 @@ | @@ -214,7 +221,7 @@ | ||
214 | <Authority :value="ConfigurationPermission.CREATE"> | 221 | <Authority :value="ConfigurationPermission.CREATE"> |
215 | <Button type="primary" @click="handleCreateOrUpdate()">新增大屏</Button> | 222 | <Button type="primary" @click="handleCreateOrUpdate()">新增大屏</Button> |
216 | </Authority> | 223 | </Authority> |
217 | - <Authority :value="ConfigurationPermission.CREATE"> | 224 | + <Authority v-if="hasPublicInterfacePermission" :value="ConfigurationPermission.CREATE"> |
218 | <Button type="primary" @click="handleCreateOrUpdatePublicApi()">公共接口管理</Button> | 225 | <Button type="primary" @click="handleCreateOrUpdatePublicApi()">公共接口管理</Button> |
219 | </Authority> | 226 | </Authority> |
220 | <CardLayoutButton v-model:value="listColumn" @change="handleCardLayoutChange" /> | 227 | <CardLayoutButton v-model:value="listColumn" @change="handleCardLayoutChange" /> |