Merge remote-tracking branch 'origin/dev-v3' into dev-v3
This commit is contained in:
@@ -15,8 +15,8 @@ public class ResourceApi {
|
||||
@Resource
|
||||
private ResourceService resourceService;
|
||||
|
||||
@PostMapping("checkPermission/{id}")
|
||||
public boolean checkPermission(@PathVariable("id") Long id) {
|
||||
return resourceService.checkPermission(id);
|
||||
@PostMapping("checkPermission/{id}/{type}")
|
||||
public boolean checkPermission(@PathVariable("id") Long id, @PathVariable("type") String type) {
|
||||
return resourceService.checkPermission(id, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.dataease.resource;
|
||||
|
||||
import io.dataease.api.permissions.auth.dto.BusiPerCheckDTO;
|
||||
import io.dataease.constant.AuthEnum;
|
||||
import io.dataease.constant.BusiResourceEnum;
|
||||
import io.dataease.system.manage.CorePermissionManage;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -14,9 +15,10 @@ public class ResourceService {
|
||||
@Resource
|
||||
private CorePermissionManage corePermissionManage;
|
||||
|
||||
public boolean checkPermission(Long id) {
|
||||
public boolean checkPermission(Long id, String type) {
|
||||
BusiPerCheckDTO dto = new BusiPerCheckDTO();
|
||||
dto.setId(id);
|
||||
dto.setBusiEnum(getResourceTypeEnum(type));
|
||||
dto.setAuthEnum(AuthEnum.READ);
|
||||
boolean b;
|
||||
try {
|
||||
@@ -26,4 +28,15 @@ public class ResourceService {
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
private BusiResourceEnum getResourceTypeEnum(String type) {
|
||||
String t = type.toLowerCase();
|
||||
return switch (t) {
|
||||
case "datasource" -> BusiResourceEnum.DATASOURCE;
|
||||
case "dataset" -> BusiResourceEnum.DATASET;
|
||||
case "dashboard" -> BusiResourceEnum.PANEL;
|
||||
case "datav" -> BusiResourceEnum.SCREEN;
|
||||
default -> null;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ export function getPanelRelationship(id) {
|
||||
})
|
||||
}
|
||||
|
||||
export function resourceCheckPermission(id) {
|
||||
export function resourceCheckPermission(id, type) {
|
||||
return request.post({
|
||||
url: `/resource/checkPermission/${id}`
|
||||
url: `/resource/checkPermission/${id}/${type}`
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
class="params-class"
|
||||
:append-to-body="true"
|
||||
append-to-body
|
||||
:before-close="cancelDialog"
|
||||
:title="t('visualization.outer_param_set')"
|
||||
v-model="state.outerParamsSetVisible"
|
||||
width="80vw"
|
||||
@@ -491,7 +492,16 @@ const setArgRef = (el, id) => {
|
||||
argRefs.value[id] = el
|
||||
}
|
||||
}
|
||||
|
||||
const cancelDialog = () => {
|
||||
if (state.outerParamsInfo?.filterInfo?.length || state.outerParamsInfo?.datasetInfo?.length) {
|
||||
state.outerParamsInfo.filterInfo = []
|
||||
state.outerParamsInfo.datasetInfo = []
|
||||
state.outerParamsInfoArray = []
|
||||
state.curNodeId = null
|
||||
}
|
||||
state.outerParamsSetVisible = false
|
||||
curEditDataId.value = null
|
||||
}
|
||||
const validateArgs = (val, id) => {
|
||||
const cref = argRefs.value[id]
|
||||
const e = cref.input
|
||||
|
||||
@@ -18,5 +18,7 @@ public class UserGridRequest extends KeywordRequest implements Serializable {
|
||||
|
||||
private Long oid;
|
||||
|
||||
private Boolean isSystem = true;
|
||||
|
||||
private Boolean timeDesc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user