Showing
1 changed file
with
9 additions
and
2 deletions
| 1 | 1 | <script setup lang="ts"> |
| 2 | 2 | import { List, Card, Button, PaginationProps, Tooltip } from 'ant-design-vue'; |
| 3 | 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 | 5 | import { OrganizationIdTree, useResetOrganizationTree } from '../common/organizationIdTree'; |
| 6 | 6 | import { |
| 7 | 7 | bigScreenCancelPublish, |
| ... | ... | @@ -30,6 +30,8 @@ |
| 30 | 30 | import { ViewTypeNameEnum } from '../common/ShareModal/config'; |
| 31 | 31 | import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard'; |
| 32 | 32 | import { ViewType } from '../visual/board/config/panelDetail'; |
| 33 | + import { useUserStore } from '/@/store/modules/user'; | |
| 34 | + import { RoleEnum } from '/@/enums/roleEnum'; | |
| 33 | 35 | |
| 34 | 36 | const listColumn = ref(5); |
| 35 | 37 | |
| ... | ... | @@ -173,6 +175,11 @@ |
| 173 | 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 | 183 | const { clipboardRef, isSuccessRef } = useCopyToClipboard(); |
| 177 | 184 | const handleCreateShareUrl = (record: BigScreenCenterItemsModel) => { |
| 178 | 185 | clipboardRef.value = createShareUrl(record); |
| ... | ... | @@ -214,7 +221,7 @@ |
| 214 | 221 | <Authority :value="ConfigurationPermission.CREATE"> |
| 215 | 222 | <Button type="primary" @click="handleCreateOrUpdate()">新增大屏</Button> |
| 216 | 223 | </Authority> |
| 217 | - <Authority :value="ConfigurationPermission.CREATE"> | |
| 224 | + <Authority v-if="hasPublicInterfacePermission" :value="ConfigurationPermission.CREATE"> | |
| 218 | 225 | <Button type="primary" @click="handleCreateOrUpdatePublicApi()">公共接口管理</Button> |
| 219 | 226 | </Authority> |
| 220 | 227 | <CardLayoutButton v-model:value="listColumn" @change="handleCardLayoutChange" /> | ... | ... |