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