Commit fb3bb4649a3c52ee5b19aefa6e6b5a262db18d81
1 parent
eab916c5
fix: update data board page permission key
Showing
4 changed files
with
10 additions
and
10 deletions
... | ... | @@ -14,8 +14,8 @@ VITE_PUBLIC_PATH = / |
14 | 14 | # VITE_PROXY = [["/api","http://101.133.234.90:8080/api"]] |
15 | 15 | # 线上测试环境 |
16 | 16 | # VITE_PROXY = [["/api","http://localhost:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] |
17 | -# VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] | |
18 | -VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | |
17 | +VITE_PROXY = [["/api","https://dev.thingskit.com/api"],["/thingskit-drawio","http://localhost:3000/"]] | |
18 | +# VITE_PROXY = [["/api","http://121.37.251.8:8080/api"],["/thingskit-drawio","http://localhost:3000/"]] | |
19 | 19 | # VITE_PROXY = [["/api","http://192.168.10.106:8080/api"],["/thingskit-drawio","http://192.168.10.106:8080/api"]] |
20 | 20 | |
21 | 21 | # 实时数据的ws地址 | ... | ... |
... | ... | @@ -18,8 +18,8 @@ |
18 | 18 | const { hasPermission } = usePermission(); |
19 | 19 | const dropMenuList = computed<DropMenu[]>(() => { |
20 | 20 | const basicMenu: DropMenu[] = []; |
21 | - const hasUpdatePermission = hasPermission('api:yt:dataBoardDetail:update'); | |
22 | - const hasDeletePermission = hasPermission('api:yt:dataBoardDetail:delete'); | |
21 | + const hasUpdatePermission = hasPermission('api:yt:data_component:update:update'); | |
22 | + const hasDeletePermission = hasPermission('api:yt:data_component:delete'); | |
23 | 23 | const hasCopyPermission = hasPermission('api:yt:dataBoardDetail:copy'); |
24 | 24 | if (hasUpdatePermission) |
25 | 25 | basicMenu.push({ | ... | ... |
... | ... | @@ -349,7 +349,7 @@ |
349 | 349 | </div> |
350 | 350 | </template> |
351 | 351 | <template #extra> |
352 | - <Authority value="api:yt:dataBoardDetail:post"> | |
352 | + <Authority value="api:yt:data_component:add:post"> | |
353 | 353 | <Button v-if="!getIsSharePage" type="primary" @click="handleOpenCreatePanel" |
354 | 354 | >创建组件</Button |
355 | 355 | > | ... | ... |
... | ... | @@ -64,8 +64,8 @@ |
64 | 64 | |
65 | 65 | const { hasPermission } = usePermission(); |
66 | 66 | const dropMenuList = computed<DropMenu[]>(() => { |
67 | - const hasUpdatePermission = hasPermission('api:yt:dataBoard:update'); | |
68 | - const hasDeletePermission = hasPermission('api:yt:dataBoard:delete'); | |
67 | + const hasUpdatePermission = hasPermission('api:yt:data_board:update:update'); | |
68 | + const hasDeletePermission = hasPermission('api:yt:data_board:delete'); | |
69 | 69 | const basicMenu: DropMenu[] = []; |
70 | 70 | if (hasUpdatePermission) |
71 | 71 | basicMenu.push({ |
... | ... | @@ -126,14 +126,14 @@ |
126 | 126 | createMessage.success('删除成功'); |
127 | 127 | await getDatasource(); |
128 | 128 | } catch (error) { |
129 | - createMessage.error('删除失败'); | |
129 | + // createMessage.error('删除失败'); | |
130 | 130 | } |
131 | 131 | }; |
132 | 132 | |
133 | 133 | const [registerModal, { openModal }] = useModal(); |
134 | 134 | |
135 | 135 | const handleViewBoard = (record: DataBoardRecord) => { |
136 | - const hasDetailPermission = hasPermission('api:yt:dataBoard:detail'); | |
136 | + const hasDetailPermission = hasPermission('api:yt:data_component:list'); | |
137 | 137 | if (hasDetailPermission) |
138 | 138 | router.push(`/data/board/detail/${encode(record.id)}/${encode(record.name)}`); |
139 | 139 | else createMessage.warning('没有权限'); |
... | ... | @@ -162,7 +162,7 @@ |
162 | 162 | <PageWrapper> |
163 | 163 | <div class="flex mb-6 items-center"> |
164 | 164 | <div class="text-lg mr-6 font-bold">自定义看板</div> |
165 | - <Authority value="api:yt:dataBoard:post"> | |
165 | + <Authority value="api:yt:data_board:add:post"> | |
166 | 166 | <Button type="primary" @click="handleOpenDetailModal">创建看板</Button> |
167 | 167 | </Authority> |
168 | 168 | </div> | ... | ... |