Commit 83387bd8f0e572a459b78ac6e2fc970238fa80f4

Authored by fengwotao
1 parent 6be83184

feat: 设备,新增设备管理凭证权限标识

@@ -52,7 +52,9 @@ @@ -52,7 +52,9 @@
52 <div class="mt-4" v-if="!isCustomer"> 52 <div class="mt-4" v-if="!isCustomer">
53 <a-button type="primary" class="mr-4" @click="copyTbDeviceId">复制设备ID</a-button> 53 <a-button type="primary" class="mr-4" @click="copyTbDeviceId">复制设备ID</a-button>
54 <a-button type="primary" class="mr-4" @click="copyDeviceToken">复制访问令牌</a-button> 54 <a-button type="primary" class="mr-4" @click="copyDeviceToken">复制访问令牌</a-button>
55 - <a-button type="primary" class="mr-4" @click="manageDeviceToken">管理设备凭证</a-button> 55 + <Authority value="api:yt:device:equipment">
  56 + <a-button type="primary" class="mr-4" @click="manageDeviceToken">管理设备凭证</a-button>
  57 + </Authority>
56 <ManageDeviceTokenModal @register="registerModal" /> 58 <ManageDeviceTokenModal @register="registerModal" />
57 </div> 59 </div>
58 <div class="mt-4"> 60 <div class="mt-4">
@@ -84,10 +86,10 @@ @@ -84,10 +86,10 @@
84 import { DeviceTypeEnum } from '/@/api/device/model/deviceModel'; 86 import { DeviceTypeEnum } from '/@/api/device/model/deviceModel';
85 import { useAuthDeviceDetail } from '../../hook/useAuthDeviceDetail'; 87 import { useAuthDeviceDetail } from '../../hook/useAuthDeviceDetail';
86 import { useClipboard } from '@vueuse/core'; 88 import { useClipboard } from '@vueuse/core';
87 -  
88 import wz from '/@/assets/images/wz.png'; 89 import wz from '/@/assets/images/wz.png';
89 import { useAsyncQueue } from '../../../localtion/useAsyncQueue'; 90 import { useAsyncQueue } from '../../../localtion/useAsyncQueue';
90 import locationImage from '/@/assets/icons/location.svg'; 91 import locationImage from '/@/assets/icons/location.svg';
  92 + import { Authority } from '/@/components/Authority';
91 93
92 export default defineComponent({ 94 export default defineComponent({
93 components: { 95 components: {
@@ -98,6 +100,7 @@ @@ -98,6 +100,7 @@
98 BasicModal, 100 BasicModal,
99 Tooltip, 101 Tooltip,
100 Empty, 102 Empty,
  103 + Authority,
101 }, 104 },
102 props: { 105 props: {
103 deviceDetail: { 106 deviceDetail: {