Merge pull request #10833 from dataease/pr@dev-v2@fixDS

Pr@dev v2@fix ds
This commit is contained in:
taojinlong 2024-07-08 17:30:38 +08:00 committed by GitHub
commit 15b140349b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 5 deletions

View File

@ -195,15 +195,22 @@ public class PermissionManage {
DatasetRowPermissionsTreeObj tree = JsonUtil.parseObject(record.getExpressionTree(), DatasetRowPermissionsTreeObj.class);
List<DatasetRowPermissionsTreeItem> items = new ArrayList<>();
for (DatasetRowPermissionsTreeItem datasetRowPermissionsTreeItem : tree.getItems()) {
if (StringUtils.isNotEmpty(userEntity.getAccount()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userId}")) {
if (StringUtils.isNotEmpty(userEntity.getAccount()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userId}")) {
datasetRowPermissionsTreeItem.setValue(userEntity.getAccount());
items.add(datasetRowPermissionsTreeItem);
continue;
}
if (StringUtils.isNotEmpty(userEntity.getEmail()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userEmail}")) {
if (StringUtils.isNotEmpty(userEntity.getEmail()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userEmail}")) {
datasetRowPermissionsTreeItem.setValue(userEntity.getEmail());
items.add(datasetRowPermissionsTreeItem);
continue;
}
if (StringUtils.isNotEmpty(userEntity.getName()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("\\$\\{sysParams\\.userName}")) {
if (StringUtils.isNotEmpty(userEntity.getName()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userName}")) {
datasetRowPermissionsTreeItem.setValue(userEntity.getName());
items.add(datasetRowPermissionsTreeItem);
continue;
}
String value = handleSysVariable(userEntity, datasetRowPermissionsTreeItem.getValue());
if (value == null) {
continue;

View File

@ -4,7 +4,7 @@ import { equalsAny, includesAny } from '../editor/util/StringUtils'
import { FeatureCollection } from '@antv/l7plot/dist/esm/plots/choropleth/types'
import { useMapStoreWithOut } from '@/store/modules/map'
import { getGeoJson } from '@/api/map'
import { toRaw } from 'vue'
import { computed, toRaw } from 'vue'
import { Options } from '@antv/g2plot/esm'
import { PickOptions } from '@antv/g2plot/esm/core/plot'
import { innerExportDetails } from '@/api/chart'
@ -12,6 +12,8 @@ import { ElMessage } from 'element-plus-secondary'
import { useI18n } from '@/hooks/web/useI18n'
import { useLinkStoreWithOut } from '@/store/modules/link'
const isDataEaseBi = computed(() => appStore.getIsDataEaseBi)
const { t } = useI18n()
// 同时支持将hex和rgb转换成rgba
export function hexColorToRGBA(hex, alpha) {
@ -511,7 +513,7 @@ export const exportExcelDownload = (chart, callBack?) => {
innerExportDetails(request)
.then(res => {
if (linkStore.getLinkToken) {
if (linkStore.getLinkToken || isDataEaseBi.value) {
const blob = new Blob([res.data], { type: 'application/vnd.ms-excel' })
const link = document.createElement('a')
link.style.display = 'none'