Showing
7 changed files
with
31 additions
and
12 deletions
| ... | ... | @@ -31,6 +31,6 @@ |
| 31 | 31 | <Icon |
| 32 | 32 | v-bind="getBindProps" |
| 33 | 33 | class="justify-center items-center" |
| 34 | - :class="getHasPermission ? '' : '!cursor-not-allowed !text-gray-200'" | |
| 34 | + :class="getHasPermission ? '' : '!cursor-not-allowed !text-gray-200 !dark:text-gray-700'" | |
| 35 | 35 | /> |
| 36 | 36 | </template> | ... | ... |
| ... | ... | @@ -29,11 +29,14 @@ |
| 29 | 29 | import { useModal } from '/@/components/Modal'; |
| 30 | 30 | import { useCopyToClipboard } from '/@/hooks/web/useCopyToClipboard'; |
| 31 | 31 | import { ViewType } from '../../visual/board/config/panelDetail'; |
| 32 | + import { useRole } from '/@/hooks/business/useRole'; | |
| 32 | 33 | |
| 33 | 34 | const listColumn = ref(5); |
| 34 | 35 | |
| 35 | 36 | const { createMessage } = useMessage(); |
| 36 | 37 | |
| 38 | + const { isCustomerUser } = useRole(); | |
| 39 | + | |
| 37 | 40 | const organizationId = ref<Nullable<number>>(null); |
| 38 | 41 | |
| 39 | 42 | const pagination = reactive<PaginationProps>({ |
| ... | ... | @@ -219,7 +222,7 @@ |
| 219 | 222 | > |
| 220 | 223 | <template #header> |
| 221 | 224 | <div class="flex gap-3 justify-end"> |
| 222 | - <Authority :value="ConfigurationPermission.CREATE"> | |
| 225 | + <Authority v-if="!isCustomerUser" :value="ConfigurationPermission.CREATE"> | |
| 223 | 226 | <Button type="primary" @click="handleCreateOrUpdate()">新增组态</Button> |
| 224 | 227 | </Authority> |
| 225 | 228 | <CardLayoutButton v-model:value="listColumn" @change="handleCardLayoutChange" /> |
| ... | ... | @@ -265,7 +268,7 @@ |
| 265 | 268 | @click="handlePreview(item)" |
| 266 | 269 | /> |
| 267 | 270 | </Tooltip> |
| 268 | - <Tooltip title="设计"> | |
| 271 | + <Tooltip v-if="!isCustomerUser" title="设计"> | |
| 269 | 272 | <AuthIcon |
| 270 | 273 | :auth="ConfigurationPermission.DESIGN" |
| 271 | 274 | class="!text-lg" |
| ... | ... | @@ -283,6 +286,7 @@ |
| 283 | 286 | /> |
| 284 | 287 | </Tooltip> |
| 285 | 288 | <AuthDropDown |
| 289 | + v-if="!isCustomerUser" | |
| 286 | 290 | :dropMenuList="[ |
| 287 | 291 | { |
| 288 | 292 | text: '分享', | ... | ... |
| ... | ... | @@ -32,6 +32,7 @@ |
| 32 | 32 | import { ViewType } from '../visual/board/config/panelDetail'; |
| 33 | 33 | import { useUserStore } from '/@/store/modules/user'; |
| 34 | 34 | import { RoleEnum } from '/@/enums/roleEnum'; |
| 35 | + import { useRole } from '/@/hooks/business/useRole'; | |
| 35 | 36 | |
| 36 | 37 | const listColumn = ref(5); |
| 37 | 38 | |
| ... | ... | @@ -51,6 +52,7 @@ |
| 51 | 52 | }); |
| 52 | 53 | |
| 53 | 54 | const loading = ref(false); |
| 55 | + const { isCustomerUser } = useRole(); | |
| 54 | 56 | |
| 55 | 57 | const dataSource = ref<BigScreenCenterItemsModel[]>([]); |
| 56 | 58 | |
| ... | ... | @@ -218,8 +220,8 @@ |
| 218 | 220 | > |
| 219 | 221 | <template #header> |
| 220 | 222 | <div class="flex gap-3 justify-end"> |
| 221 | - <Authority :value="ConfigurationPermission.CREATE"> | |
| 222 | - <Button type="primary" @click="handleCreateOrUpdate()">新增大屏</Button> | |
| 223 | + <Authority v-if="!isCustomerUser" :value="ConfigurationPermission.CREATE"> | |
| 224 | + <Button type="primary" @click="handleCreateOrUpdate()"> 新增大屏 </Button> | |
| 223 | 225 | </Authority> |
| 224 | 226 | <Authority v-if="hasPublicInterfacePermission" :value="ConfigurationPermission.CREATE"> |
| 225 | 227 | <Button type="primary" @click="handleCreateOrUpdatePublicApi()">公共接口管理</Button> |
| ... | ... | @@ -281,7 +283,7 @@ |
| 281 | 283 | @click="handlePreview(item)" |
| 282 | 284 | /> |
| 283 | 285 | </Tooltip> |
| 284 | - <Tooltip title="设计"> | |
| 286 | + <Tooltip v-if="!isCustomerUser" title="设计"> | |
| 285 | 287 | <AuthIcon |
| 286 | 288 | :disabled="item.state === 1" |
| 287 | 289 | icon="ant-design:edit-outlined" |
| ... | ... | @@ -298,6 +300,7 @@ |
| 298 | 300 | /> |
| 299 | 301 | </Tooltip> |
| 300 | 302 | <AuthDropDown |
| 303 | + v-if="!isCustomerUser" | |
| 301 | 304 | :dropMenuList="[ |
| 302 | 305 | { |
| 303 | 306 | text: '分享', | ... | ... |
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | import { usePermission } from '/@/hooks/web/usePermission'; |
| 13 | 13 | import { DataSource } from '/@/api/dataBoard/model'; |
| 14 | 14 | import { useRoute } from 'vue-router'; |
| 15 | + import { useRole } from '/@/hooks/business/useRole'; | |
| 15 | 16 | |
| 16 | 17 | const emit = defineEmits(['action']); |
| 17 | 18 | const props = defineProps<{ |
| ... | ... | @@ -19,6 +20,7 @@ |
| 19 | 20 | record: DataSource[]; |
| 20 | 21 | panelName?: string; |
| 21 | 22 | }>(); |
| 23 | + const { isCustomerUser } = useRole(); | |
| 22 | 24 | const { hasPermission } = usePermission(); |
| 23 | 25 | const dropMenuList = computed<DropMenu[]>(() => { |
| 24 | 26 | const basicMenu: DropMenu[] = []; |
| ... | ... | @@ -82,7 +84,7 @@ |
| 82 | 84 | <div class="flex items-center gap-5"> |
| 83 | 85 | <slot name="moreAction"></slot> |
| 84 | 86 | <Dropdown |
| 85 | - v-if="dropMenuList.length" | |
| 87 | + v-if="!isCustomerUser && dropMenuList.length" | |
| 86 | 88 | :drop-menu-list="dropMenuList" |
| 87 | 89 | :trigger="['click']" |
| 88 | 90 | @menu-event="handleMenuEvent" | ... | ... |
| ... | ... | @@ -337,7 +337,7 @@ |
| 337 | 337 | v-for="item in dataSource" |
| 338 | 338 | :data-id="item.id" |
| 339 | 339 | :key="item.id" |
| 340 | - class="flex bg-neutral-100 dark:text-gray-300 dark:bg-dark-700" | |
| 340 | + class="flex bg-light-50 dark:text-gray-300 dark:bg-dark-700" | |
| 341 | 341 | > |
| 342 | 342 | <div class="w-24 text-right flex justify-end" style="flex: 0 0 96px"> 选择设备 </div> |
| 343 | 343 | <div class="pl-2 flex-auto"> | ... | ... |
| ... | ... | @@ -47,6 +47,7 @@ |
| 47 | 47 | import { useScript } from '/@/hooks/web/useScript'; |
| 48 | 48 | import { BAI_DU_MAP_GL_LIB, BAI_DU_MAP_TRACK_ANIMATION } from '/@/utils/fnUtils'; |
| 49 | 49 | import { useAppStore } from '/@/store/modules/app'; |
| 50 | + import { useRole } from '/@/hooks/business/useRole'; | |
| 50 | 51 | |
| 51 | 52 | const userStore = useAppStore(); |
| 52 | 53 | |
| ... | ... | @@ -60,6 +61,7 @@ |
| 60 | 61 | |
| 61 | 62 | const ROUTER = useRouter(); |
| 62 | 63 | |
| 64 | + const { isCustomerUser } = useRole(); | |
| 63 | 65 | const { toPromise: injectBaiDuMapLib } = useScript({ src: BAI_DU_MAP_GL_LIB }); |
| 64 | 66 | const { toPromise: injectBaiDuMapTrackAniMationLib } = useScript({ |
| 65 | 67 | src: BAI_DU_MAP_TRACK_ANIMATION, |
| ... | ... | @@ -400,7 +402,11 @@ |
| 400 | 402 | </template> |
| 401 | 403 | <template #extra> |
| 402 | 404 | <Authority :value="VisualComponentPermission.CREATE"> |
| 403 | - <Button v-if="!getIsSharePage" type="primary" @click="handleOpenCreatePanel"> | |
| 405 | + <Button | |
| 406 | + v-if="!getIsSharePage && !isCustomerUser" | |
| 407 | + type="primary" | |
| 408 | + @click="handleOpenCreatePanel" | |
| 409 | + > | |
| 404 | 410 | 创建组件 |
| 405 | 411 | </Button> |
| 406 | 412 | </Authority> |
| ... | ... | @@ -456,7 +462,7 @@ |
| 456 | 462 | @action="handleMoreAction" |
| 457 | 463 | > |
| 458 | 464 | <template #moreAction> |
| 459 | - <Tooltip title="趋势"> | |
| 465 | + <Tooltip v-if="!isCustomerUser" title="趋势"> | |
| 460 | 466 | <img |
| 461 | 467 | :src="trendIcon" |
| 462 | 468 | v-if="!getIsSharePage && hasHistoryTrend(item)" | ... | ... |
| ... | ... | @@ -24,6 +24,7 @@ |
| 24 | 24 | import { ShareModal } from '/@/views/common/ShareModal'; |
| 25 | 25 | import { ModalParamsType } from '/#/utils'; |
| 26 | 26 | import { DataActionModeEnum } from '/@/enums/toolEnum'; |
| 27 | + import { useRole } from '/@/hooks/business/useRole'; | |
| 27 | 28 | |
| 28 | 29 | const ListItem = List.Item; |
| 29 | 30 | const router = useRouter(); |
| ... | ... | @@ -92,6 +93,7 @@ |
| 92 | 93 | unref(clipboardRef) ? createMessage.success('复制成功') : createMessage.error('未找到分享链接'); |
| 93 | 94 | }; |
| 94 | 95 | |
| 96 | + const { isCustomerUser } = useRole(); | |
| 95 | 97 | const { hasPermission } = usePermission(); |
| 96 | 98 | const dropMenuList = computed<DropMenu[]>(() => { |
| 97 | 99 | const hasUpdatePermission = hasPermission(VisualBoardPermission.UPDATE); |
| ... | ... | @@ -213,7 +215,9 @@ |
| 213 | 215 | <div class="flex items-center mb-3 bg-light-100 h-78px dark:text-gray-300 dark:bg-dark-900"> |
| 214 | 216 | <div class="text-lg ml-30px mr-9px font-bold">自定义看板</div> |
| 215 | 217 | <Authority value="api:yt:data_board:add:post"> |
| 216 | - <Button type="primary" @click="handleOpenDetailModal">创建看板</Button> | |
| 218 | + <Button v-if="!isCustomerUser" type="primary" @click="handleOpenDetailModal" | |
| 219 | + >创建看板</Button | |
| 220 | + > | |
| 217 | 221 | </Authority> |
| 218 | 222 | </div> |
| 219 | 223 | <div class="bg-light-100 mb-6 w-full p-3 search-form dark:text-gray-300 dark:bg-dark-900"> |
| ... | ... | @@ -235,7 +239,7 @@ |
| 235 | 239 | </template> |
| 236 | 240 | <template #extra> |
| 237 | 241 | <Dropdown |
| 238 | - v-if="dropMenuList.length" | |
| 242 | + v-if="!isCustomerUser && dropMenuList.length" | |
| 239 | 243 | :trigger="['click']" |
| 240 | 244 | @menu-event="(event) => handleMenuEvent(event, item)" |
| 241 | 245 | :drop-menu-list="dropMenuList" | ... | ... |