forked from github/dataease
Merge branch 'dev-v2' into pr@dev-v2_dzz
This commit is contained in:
commit
9dc760773d
@ -6,11 +6,6 @@
|
||||
<a href="https://github.com/dataease/dataease"><img src="https://img.shields.io/github/stars/dataease/dataease?color=%231890FF&style=flat-square" alt="Stars"></a>
|
||||
</p>
|
||||
|
||||
|说明|
|
||||
|------------------|
|
||||
|此分支为 DataEase v2 版本的开发分支。DataEase v2 正在快速迭代中,如是在生产环境部署 DataEase,建议使用 v1.18.* 的最新稳定版本。|
|
||||
<hr/>
|
||||
|
||||
## 什么是 DataEase?
|
||||
|
||||
DataEase 是开源的数据可视化分析工具,帮助用户快速分析数据并洞察业务趋势,从而实现业务的改进与优化。DataEase 支持丰富的数据源连接,能够通过拖拉拽方式快速制作图表,并可以方便的与他人分享。
|
||||
@ -56,6 +51,7 @@ DataEase 是开源的数据可视化分析工具,帮助用户快速分析数
|
||||
|
||||
- [在线文档](https://dataease.io/docs/)
|
||||
- [社区论坛](https://bbs.fit2cloud.com/c/de/6)
|
||||
- [快速入门视频](https://www.bilibili.com/video/BV1Z84y1X7eF/)
|
||||
|
||||
## License
|
||||
|
||||
|
@ -498,4 +498,26 @@ public class DatasetGroupManage {
|
||||
geFullName(parent.getPid(), fullName);
|
||||
}
|
||||
}
|
||||
|
||||
public List<DatasetTableDTO> getDetailWithPerm(List<Long> ids) {
|
||||
var result = new ArrayList<DatasetTableDTO>();
|
||||
if (CollectionUtil.isNotEmpty(ids)) {
|
||||
var dsList = coreDatasetGroupMapper.selectBatchIds(ids);
|
||||
if (CollectionUtil.isNotEmpty(dsList)) {
|
||||
dsList.forEach(ds -> {
|
||||
DatasetTableDTO dto = new DatasetTableDTO();
|
||||
BeanUtils.copyBean(dto, ds);
|
||||
var fields = datasetTableFieldManage.listFieldsWithPermissions(ds.getId());
|
||||
List<DatasetTableFieldDTO> dimensionList = fields.stream().filter(ele -> StringUtils.equalsIgnoreCase(ele.getGroupType(), "d")).toList();
|
||||
List<DatasetTableFieldDTO> quotaList = fields.stream().filter(ele -> StringUtils.equalsIgnoreCase(ele.getGroupType(), "q")).toList();
|
||||
Map<String, List<DatasetTableFieldDTO>> map = new LinkedHashMap<>();
|
||||
map.put("dimensionList", dimensionList);
|
||||
map.put("quotaList", quotaList);
|
||||
dto.setFields(map);
|
||||
result.add(dto);
|
||||
});
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,9 @@
|
||||
package io.dataease.dataset.manage;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.dataease.api.chart.dto.ColumnPermissionItem;
|
||||
import io.dataease.auth.bo.TokenUserBO;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetGroupMapper;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetTableFieldMapper;
|
||||
@ -9,6 +12,7 @@ import io.dataease.datasource.provider.CalciteProvider;
|
||||
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.utils.AuthUtils;
|
||||
import io.dataease.utils.BeanUtils;
|
||||
import io.dataease.utils.IDUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
@ -18,9 +22,7 @@ import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -187,6 +189,20 @@ public class DatasetTableFieldManage {
|
||||
return map;
|
||||
}
|
||||
|
||||
public List<DatasetTableFieldDTO> listFieldsWithPermissions(Long id) {
|
||||
List<DatasetTableFieldDTO> fields = selectByDatasetGroupId(id);
|
||||
Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>();
|
||||
Long userId = AuthUtils.getUser() == null ? null : AuthUtils.getUser().getUserId();
|
||||
List<DatasetTableFieldDTO> tmp = permissionManage
|
||||
.filterColumnPermissions(fields, desensitizationList, id, userId)
|
||||
.stream()
|
||||
.sorted(Comparator.comparing(DatasetTableFieldDTO::getGroupType))
|
||||
.toList();
|
||||
tmp.forEach(ele -> ele.setDesensitized(desensitizationList.containsKey(ele.getDataeaseName())));
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
public List<DatasetTableFieldDTO> transDTO(List<CoreDatasetTableField> list) {
|
||||
return list.stream().map(ele -> {
|
||||
DatasetTableFieldDTO dto = new DatasetTableFieldDTO();
|
||||
|
@ -53,6 +53,11 @@ public class DatasetFieldServer implements DatasetTableApi {
|
||||
return datasetTableFieldManage.listByDQ(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DatasetTableFieldDTO> listFieldsWithPermissions(Long id) {
|
||||
return datasetTableFieldManage.listFieldsWithPermissions(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> multFieldValuesForPermissions(@RequestBody MultFieldValuesRequest multFieldValuesRequest) throws Exception {
|
||||
return datasetDataManage.getFieldEnum(multFieldValuesRequest.getFieldIds());
|
||||
|
@ -77,4 +77,10 @@ public class DatasetTreeServer implements DatasetTreeApi {
|
||||
public List<SqlVariableDetails> getSqlParams(List<Long> ids) throws Exception {
|
||||
return datasetGroupManage.getSqlParams(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DatasetTableDTO> detailWithPerm(List<Long> ids) throws Exception {
|
||||
return datasetGroupManage.getDetailWithPerm(ids);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,8 @@
|
||||
package io.dataease.map.manage;
|
||||
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.dataease.api.map.dto.GeometryNodeCreator;
|
||||
import io.dataease.api.map.vo.AreaNode;
|
||||
import io.dataease.constant.StaticResourceConstants;
|
||||
@ -29,6 +32,7 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static io.dataease.constant.CacheConstant.CommonCacheConstant.WORLD_MAP_CACHE;
|
||||
|
||||
@ -107,6 +111,13 @@ public class MapManage {
|
||||
@CacheEvict(cacheNames = WORLD_MAP_CACHE, key = "'world_map'")
|
||||
@Transactional
|
||||
public void saveMapGeo(GeometryNodeCreator request, MultipartFile file) {
|
||||
if (ObjectUtils.isEmpty(file) || file.isEmpty()) {
|
||||
DEException.throwException("geometry file is require");
|
||||
}
|
||||
String suffix = FileUtil.getSuffix(file.getOriginalFilename());
|
||||
if (!StringUtils.equalsIgnoreCase("json", suffix)) {
|
||||
DEException.throwException("仅支持json格式文件");
|
||||
}
|
||||
List<Area> areas = proxy().defaultArea();
|
||||
String code = getBusiGeoCode(request.getCode());
|
||||
|
||||
@ -147,10 +158,30 @@ public class MapManage {
|
||||
if (!StringUtils.startsWith(code, GEO_PREFIX)) {
|
||||
DEException.throwException("内置Geometry,禁止删除");
|
||||
}
|
||||
coreAreaCustomMapper.deleteById(code);
|
||||
File file = buildGeoFile(code);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
CoreAreaCustom coreAreaCustom = coreAreaCustomMapper.selectById(code);
|
||||
if (ObjectUtils.isEmpty(coreAreaCustom)) {
|
||||
DEException.throwException("Geometry code 不存在!");
|
||||
}
|
||||
List<String> codeResultList = new ArrayList<>();
|
||||
codeResultList.add(code);
|
||||
childTreeIdList(ListUtil.of(code), codeResultList);
|
||||
coreAreaCustomMapper.deleteBatchIds(codeResultList);
|
||||
codeResultList.forEach(id -> {
|
||||
File file = buildGeoFile(id);
|
||||
if (file.exists()) {
|
||||
file.delete();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void childTreeIdList(List<String> pidList, List<String> resultList) {
|
||||
QueryWrapper<CoreAreaCustom> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.in("pid", pidList);
|
||||
List<CoreAreaCustom> coreAreaCustoms = coreAreaCustomMapper.selectList(queryWrapper);
|
||||
if (CollectionUtils.isNotEmpty(coreAreaCustoms)) {
|
||||
List<String> codeList = coreAreaCustoms.stream().map(CoreAreaCustom::getId).toList();
|
||||
resultList.addAll(codeList);
|
||||
childTreeIdList(codeList, resultList);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,77 +1,91 @@
|
||||
DROP TABLE IF EXISTS `visualization_template`;
|
||||
CREATE TABLE `visualization_template` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '缩略图',
|
||||
`template_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ',
|
||||
`template_style` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'template 样式',
|
||||
`template_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'template 数据',
|
||||
`dynamic_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '预存数据',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
CREATE TABLE `visualization_template`
|
||||
(
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext COMMENT '缩略图',
|
||||
`template_type` varchar(255) DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ',
|
||||
`template_style` longtext COMMENT 'template 样式',
|
||||
`template_data` longtext COMMENT 'template 数据',
|
||||
`dynamic_data` longtext COMMENT '预存数据',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `visualization_template_category`;
|
||||
CREATE TABLE `visualization_template_category` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '缩略图',
|
||||
`template_type` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
CREATE TABLE `visualization_template_category`
|
||||
(
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext COMMENT '缩略图',
|
||||
`template_type` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_category_map
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `visualization_template_category_map`;
|
||||
CREATE TABLE `visualization_template_category_map` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`category_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`template_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
CREATE TABLE `visualization_template_category_map`
|
||||
(
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`category_id` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`template_id` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_extend_data
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `visualization_template_extend_data`;
|
||||
CREATE TABLE `visualization_template_extend_data` (
|
||||
`id` bigint NOT NULL,
|
||||
`dv_id` bigint DEFAULT NULL,
|
||||
`view_id` bigint DEFAULT NULL,
|
||||
`view_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
||||
`copy_from` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
`copy_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
CREATE TABLE `visualization_template_extend_data`
|
||||
(
|
||||
`id` bigint NOT NULL,
|
||||
`dv_id` bigint DEFAULT NULL,
|
||||
`view_id` bigint DEFAULT NULL,
|
||||
`view_details` longtext,
|
||||
`copy_from` varchar(255) DEFAULT NULL,
|
||||
`copy_id` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (19, 0, 2, 'template-market', 'template-market', 4, NULL, '/template-market', 1, 1, 0);
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (30, 0, 1, 'toolbox', null, 7, 'icon_template', '/toolbox', 1, 1, 0);
|
||||
INSERT INTO `core_menu`
|
||||
VALUES (31, 30, 2, 'template-setting', 'toolbox/template-setting', 1, 'icon_template', '/template-setting', 0, 1, 1);
|
||||
COMMIT;
|
||||
|
||||
ALTER TABLE core_opt_recent ADD `resource_name` varchar(255) NULL COMMENT '资源名称';
|
||||
|
||||
ALTER TABLE `core_opt_recent`
|
||||
MODIFY COLUMN `resource_id` bigint NULL COMMENT '资源ID' AFTER `id`,
|
||||
ADD COLUMN `resource_name` varchar(255) NULL COMMENT '资源名称' AFTER `resource_id`;
|
||||
DROP TABLE IF EXISTS `core_area_custom`;
|
||||
CREATE TABLE `core_area_custom`
|
||||
(
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`pid` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (7, 'template.url', 'https://templates-de.fit2cloud.com', 'text', 0);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (8, 'template.accessKey', 'dataease', 'text', 1);
|
||||
INSERT INTO `core_sys_setting`
|
||||
VALUES (1, 'basic.dsIntervalTime', '6', 'text', 2);
|
||||
INSERT INTO `core_sys_setting`
|
||||
VALUES (2, 'basic.dsExecuteTime', 'minute', 'text', 3);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`)
|
||||
VALUES (7, 'template.url', 'https://templates.dataease.cn', 'text', 0);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`)
|
||||
VALUES (8, 'template.accessKey', 'dataease', 'text', 1);
|
||||
|
@ -3748,7 +3748,7 @@ CREATE TABLE QRTZ_JOB_DETAILS
|
||||
JOB_DATA BLOB NULL,
|
||||
PRIMARY KEY (SCHED_NAME, JOB_NAME, JOB_GROUP)
|
||||
);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
CREATE TABLE QRTZ_TRIGGERS
|
||||
(
|
||||
SCHED_NAME VARCHAR(120) NOT NULL,
|
||||
@ -3827,9 +3827,7 @@ CREATE TABLE QRTZ_BLOB_TRIGGERS
|
||||
PRIMARY KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP),
|
||||
FOREIGN KEY (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
|
||||
REFERENCES QRTZ_TRIGGERS (SCHED_NAME, TRIGGER_NAME, TRIGGER_GROUP)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
);
|
||||
|
||||
CREATE TABLE QRTZ_CALENDARS
|
||||
(
|
||||
@ -3896,9 +3894,7 @@ CREATE TABLE `visualization_background`
|
||||
`base_url` varchar(255) DEFAULT NULL,
|
||||
`url` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
);
|
||||
|
||||
INSERT INTO `visualization_background` (`id`, `name`, `classification`, `content`, `remark`, `sort`, `upload_time`,
|
||||
`base_url`, `url`)
|
||||
@ -3947,11 +3943,7 @@ CREATE TABLE `visualization_background_image`
|
||||
`base_url` varchar(255) DEFAULT NULL,
|
||||
`url` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
|
||||
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_subject
|
||||
@ -3959,7 +3951,7 @@ CREATE TABLE `visualization_background_image`
|
||||
DROP TABLE IF EXISTS `visualization_subject`;
|
||||
CREATE TABLE `visualization_subject`
|
||||
(
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
|
||||
`id` varchar(50) NOT NULL,
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '主题名称',
|
||||
`type` varchar(255) DEFAULT NULL COMMENT '主题类型 system 系统主题,self 自定义主题',
|
||||
`details` longtext COMMENT '主题内容',
|
||||
@ -3973,11 +3965,7 @@ CREATE TABLE `visualization_subject`
|
||||
`delete_time` bigint DEFAULT NULL COMMENT '删除时间',
|
||||
`delete_by` bigint DEFAULT NULL COMMENT '删除人',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
|
||||
|
||||
);
|
||||
commit;
|
||||
|
||||
DROP TABLE IF EXISTS `core_dataset_table_sql_log`;
|
||||
@ -3991,9 +3979,7 @@ CREATE TABLE `core_dataset_table_sql_log`
|
||||
`sql` longtext NOT NULL COMMENT '详细信息',
|
||||
`status` varchar(45) DEFAULT NULL COMMENT '状态',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE utf8mb4_0900_ai_ci;
|
||||
);
|
||||
|
||||
|
||||
INSERT INTO `visualization_subject` (`id`, `name`, `type`, `details`, `delete_flag`, `cover_url`, `create_num`,
|
||||
@ -4024,9 +4010,7 @@ CREATE TABLE `core_store`
|
||||
`resource_type` int NOT NULL COMMENT '资源类型',
|
||||
`time` bigint NOT NULL COMMENT '收藏时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for xpack_share
|
||||
@ -4044,9 +4028,7 @@ CREATE TABLE `xpack_share`
|
||||
`oid` bigint NOT NULL COMMENT '组织ID',
|
||||
`type` int NOT NULL COMMENT '业务类型',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for xpack_setting_authentication
|
||||
@ -4061,25 +4043,8 @@ CREATE TABLE `xpack_setting_authentication`
|
||||
`sync_time` bigint NOT NULL COMMENT '同步时间',
|
||||
`relational_ids` varchar(255) DEFAULT NULL COMMENT '相关的ID',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : de2-qa-123.56.90.236
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 80100
|
||||
Source Host : 123.56.90.236:3306
|
||||
Source Schema : dataease
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 80100
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 22/09/2023 00:30:08
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
@ -4093,14 +4058,12 @@ CREATE TABLE `visualization_link_jump`
|
||||
`id` bigint NOT NULL,
|
||||
`source_dv_id` bigint DEFAULT NULL COMMENT '源仪表板ID',
|
||||
`source_view_id` bigint DEFAULT NULL COMMENT '源视图ID',
|
||||
`link_jump_info` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转信息',
|
||||
`link_jump_info` varchar(4000) DEFAULT NULL COMMENT '跳转信息',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否启用',
|
||||
`copy_from` bigint DEFAULT NULL,
|
||||
`copy_id` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_link_jump_info
|
||||
@ -4110,19 +4073,17 @@ CREATE TABLE `visualization_link_jump_info`
|
||||
(
|
||||
`id` bigint NOT NULL,
|
||||
`link_jump_id` bigint DEFAULT NULL COMMENT 'link jump ID',
|
||||
`link_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '关联类型 inner 内部仪表板,outer 外部链接',
|
||||
`jump_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '跳转类型 _blank 新开页面 _self 当前窗口',
|
||||
`link_type` varchar(255) DEFAULT NULL COMMENT '关联类型 inner 内部仪表板,outer 外部链接',
|
||||
`jump_type` varchar(255) DEFAULT NULL COMMENT '跳转类型 _blank 新开页面 _self 当前窗口',
|
||||
`target_dv_id` bigint DEFAULT NULL COMMENT '关联仪表板ID',
|
||||
`source_field_id` bigint DEFAULT NULL COMMENT '字段ID',
|
||||
`content` varchar(4000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '内容 linkType = outer时使用',
|
||||
`content` varchar(4000) DEFAULT NULL COMMENT '内容 linkType = outer时使用',
|
||||
`checked` tinyint(1) DEFAULT NULL COMMENT '是否可用',
|
||||
`attach_params` tinyint(1) DEFAULT NULL COMMENT '是否附加点击参数',
|
||||
`copy_from` bigint DEFAULT NULL,
|
||||
`copy_id` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_link_jump_target_view_info
|
||||
@ -4138,9 +4099,7 @@ CREATE TABLE `visualization_link_jump_target_view_info`
|
||||
`copy_from` bigint DEFAULT NULL,
|
||||
`copy_id` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`target_id`) USING BTREE
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_linkage
|
||||
@ -4160,9 +4119,7 @@ CREATE TABLE `visualization_linkage`
|
||||
`copy_from` bigint DEFAULT NULL,
|
||||
`copy_id` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_linkage_field
|
||||
@ -4178,16 +4135,11 @@ CREATE TABLE `visualization_linkage_field`
|
||||
`copy_from` bigint DEFAULT NULL,
|
||||
`copy_id` bigint DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_0900_ai_ci;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
||||
);
|
||||
|
||||
ALTER TABLE `core_datasource`
|
||||
ADD COLUMN `update_by` bigint NULL COMMENT '变更人' AFTER `update_time`;
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `core_ds_finish_page`;
|
||||
CREATE TABLE `core_ds_finish_page`
|
||||
(
|
||||
@ -4205,9 +4157,7 @@ CREATE TABLE `core_opt_recent`
|
||||
`opt_type` int DEFAULT NULL COMMENT '1 新建 2 修改',
|
||||
`time` bigint NOT NULL COMMENT '收藏时间',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for core_sys_setting
|
||||
@ -4221,6 +4171,4 @@ CREATE TABLE `core_sys_setting`
|
||||
`type` varchar(255) NOT NULL COMMENT '类型',
|
||||
`sort` int NOT NULL DEFAULT '0' COMMENT '顺序',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB
|
||||
DEFAULT CHARSET = utf8mb4
|
||||
COLLATE = utf8mb4_general_ci;
|
||||
);
|
||||
|
@ -1,49 +1,49 @@
|
||||
DROP TABLE IF EXISTS `visualization_template`;
|
||||
CREATE TABLE `visualization_template` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
||||
`dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '缩略图',
|
||||
`template_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ',
|
||||
`template_style` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'template 样式',
|
||||
`template_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT 'template 数据',
|
||||
`dynamic_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '预存数据',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
`snapshot` longtext COMMENT '缩略图',
|
||||
`template_type` varchar(255) DEFAULT NULL COMMENT '模版类型 system 系统内置 self 用户自建 ',
|
||||
`template_style` longtext COMMENT 'template 样式',
|
||||
`template_data` longtext COMMENT 'template 数据',
|
||||
`dynamic_data` longtext COMMENT '预存数据',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='模板表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_category
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `visualization_template_category`;
|
||||
CREATE TABLE `visualization_template_category` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`name` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`pid` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
`level` int DEFAULT NULL COMMENT '层级',
|
||||
`dv_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
||||
`dv_type` varchar(255) DEFAULT NULL COMMENT '模版种类 dataV or dashboard 目录或者文件夹',
|
||||
`node_type` varchar(255) DEFAULT NULL COMMENT '节点类型 folder or panel 目录或者文件夹',
|
||||
`create_by` varchar(255) DEFAULT NULL COMMENT '创建人',
|
||||
`create_time` bigint DEFAULT NULL COMMENT '创建时间',
|
||||
`snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '缩略图',
|
||||
`snapshot` longtext COMMENT '缩略图',
|
||||
`template_type` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='模板表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_category_map
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `visualization_template_category_map`;
|
||||
CREATE TABLE `visualization_template_category_map` (
|
||||
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '主键',
|
||||
`category_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '名称',
|
||||
`template_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级id',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='模板表';
|
||||
`id` varchar(50) NOT NULL COMMENT '主键',
|
||||
`category_id` varchar(255) DEFAULT NULL COMMENT '名称',
|
||||
`template_id` varchar(255) DEFAULT NULL COMMENT '父级id',
|
||||
PRIMARY KEY (`id`)
|
||||
) COMMENT='模板表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for visualization_template_extend_data
|
||||
@ -53,11 +53,11 @@ CREATE TABLE `visualization_template_extend_data` (
|
||||
`id` bigint NOT NULL,
|
||||
`dv_id` bigint DEFAULT NULL,
|
||||
`view_id` bigint DEFAULT NULL,
|
||||
`view_details` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
|
||||
`copy_from` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
`copy_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
||||
`view_details` longtext ,
|
||||
`copy_from` varchar(255) DEFAULT NULL,
|
||||
`copy_id` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO `core_menu`
|
||||
@ -87,6 +87,6 @@ INSERT INTO `core_sys_setting`
|
||||
VALUES (1, 'basic.dsIntervalTime', '6', 'text', 2);
|
||||
INSERT INTO `core_sys_setting`
|
||||
VALUES (2, 'basic.dsExecuteTime', 'minute', 'text', 3);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (7, 'template.url', 'https://templates-de.fit2cloud.com', 'text', 0);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (7, 'template.url', 'https://templates.dataease.cn', 'text', 0);
|
||||
INSERT INTO `core_sys_setting` (`id`, `pkey`, `pval`, `type`, `sort`) VALUES (8, 'template.accessKey', 'dataease', 'text', 1);
|
||||
COMMIT;
|
||||
|
@ -26,6 +26,6 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
sourcemap: true
|
||||
sourcemap: false
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ export interface Field {
|
||||
extField: number
|
||||
checked: boolean
|
||||
fieldShortName: string
|
||||
desensitized: boolean
|
||||
}
|
||||
|
||||
export interface ComponentInfo {
|
||||
|
@ -154,6 +154,11 @@ export const getDsDetails = async (data): Promise<DatasetDetail[]> => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
export const getDsDetailsWithPerm = async (data): Promise<DatasetDetail[]> => {
|
||||
return request.post({ url: '/datasetTree/detailWithPerm', data }).then(res => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
export const getSqlParams = async (data): Promise<ParamsDetail[]> => {
|
||||
return request.post({ url: '/datasetTree/getSqlParams', data }).then(res => {
|
||||
return res?.data
|
||||
@ -175,6 +180,10 @@ export const multFieldValuesForPermissions = (data = {}) => {
|
||||
return request.post({ url: '/datasetField/multFieldValuesForPermissions', data })
|
||||
}
|
||||
|
||||
export const listFieldsWithPermissions = (datasetId: number) => {
|
||||
return request.get({ url: '/datasetField/listWithPermissions/' + datasetId })
|
||||
}
|
||||
|
||||
export const saveRowPermission = (data = {}) => {
|
||||
return request.post({ url: '/dataset/rowPermissions/save', data })
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4 2.66666C4 1.93028 4.59695 1.33333 5.33333 1.33333H21.1477C21.3265 1.33333 21.4979 1.40515 21.6232 1.53267L27.8088 7.82587C27.9313 7.95055 28 8.11838 28 8.2932V29.3333C28 30.0697 27.403 30.6667 26.6667 30.6667H5.33333C4.59695 30.6667 4 30.0697 4 29.3333V2.66666Z" fill="#FF8800"/>
|
||||
<path d="M9.33398 11.3333C9.33398 10.9651 9.63246 10.6667 10.0007 10.6667H22.0007C22.3688 10.6667 22.6673 10.9651 22.6673 11.3333V12.6667C22.6673 13.0349 22.3688 13.3333 22.0007 13.3333H10.0007C9.63246 13.3333 9.33398 13.0349 9.33398 12.6667V11.3333Z" fill="white"/>
|
||||
<path d="M14.6673 16.6667C14.6673 16.2985 14.9658 16 15.334 16H22.0007C22.3688 16 22.6673 16.2985 22.6673 16.6667V23.3333C22.6673 23.7015 22.3688 24 22.0007 24H15.334C14.9658 24 14.6673 23.7015 14.6673 23.3333V16.6667Z" fill="white"/>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@ -35,6 +35,10 @@ const cacheRequest = cb => {
|
||||
}
|
||||
|
||||
export const configHandler = config => {
|
||||
const desktop = wsCache.get('app.desktop')
|
||||
if (desktop) {
|
||||
return config
|
||||
}
|
||||
if (wsCache.get('user.token')) {
|
||||
config.headers['X-DE-TOKEN'] = wsCache.get('user.token')
|
||||
const expired = isExpired()
|
||||
|
@ -313,6 +313,7 @@ const calcData = (view: Chart, callback) => {
|
||||
state.totalItems = res?.totalItems
|
||||
const curViewInfo = canvasViewInfo.value[element.value.id]
|
||||
curViewInfo['curFields'] = res.data.fields
|
||||
dvMainStore.setViewDataDetails(element.value.id, state.data)
|
||||
initCurFields(res)
|
||||
}
|
||||
callback?.()
|
||||
|
@ -77,6 +77,7 @@ const autoStyle = computed(() => {
|
||||
<template>
|
||||
<div class="bash-shape" :style="autoStyle">
|
||||
<chart
|
||||
:scale="scale"
|
||||
:active="active"
|
||||
:view="view"
|
||||
:element="element"
|
||||
|
@ -7,7 +7,7 @@ import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
import { ElMessage } from 'element-plus-secondary'
|
||||
import type { DatasetDetail } from '@/api/dataset'
|
||||
import { getDsDetails, getSqlParams } from '@/api/dataset'
|
||||
import { getDsDetailsWithPerm, getSqlParams, listFieldsWithPermissions } from '@/api/dataset'
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
import { cloneDeep } from 'lodash-es'
|
||||
import Select from './Select.vue'
|
||||
@ -391,7 +391,7 @@ const init = (queryId: string) => {
|
||||
}
|
||||
const params = [...new Set(datasetFieldList.value.map(ele => ele.tableId).filter(ele => !!ele))]
|
||||
if (!params.length) return
|
||||
getDsDetails(params)
|
||||
getDsDetailsWithPerm(params)
|
||||
.then(res => {
|
||||
res
|
||||
.filter(ele => !!ele)
|
||||
@ -438,7 +438,7 @@ const handleCondition = item => {
|
||||
curComponent.value = conditions.value.find(ele => ele.id === item.id)
|
||||
|
||||
multiple.value = curComponent.value.multiple
|
||||
if (!curComponent.value.dataset.fields.length) {
|
||||
if (!curComponent.value.dataset.fields.length && curComponent.value.dataset.id) {
|
||||
getOptions(curComponent.value.dataset.id, curComponent.value)
|
||||
}
|
||||
datasetFieldList.value.forEach(ele => {
|
||||
@ -468,12 +468,8 @@ const handleCondition = item => {
|
||||
}
|
||||
|
||||
const getOptions = (id, component) => {
|
||||
getDsDetails([id]).then(res => {
|
||||
res.forEach(ele => {
|
||||
if (!ele) return
|
||||
const { dimensionList, quotaList } = ele.fields
|
||||
component.dataset.fields = [...dimensionList, ...quotaList]
|
||||
})
|
||||
listFieldsWithPermissions(id).then(res => {
|
||||
component.dataset.fields = res.data
|
||||
})
|
||||
}
|
||||
|
||||
@ -840,8 +836,12 @@ defineExpose({
|
||||
:key="ele.id"
|
||||
:label="ele.name"
|
||||
:value="ele.id"
|
||||
:disabled="ele.desensitized"
|
||||
>
|
||||
<div class="flex-align-center icon">
|
||||
<div
|
||||
class="flex-align-center icon"
|
||||
:title="ele.desensitized ? '脱敏字段,不能被设置为查询条件' : ''"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[ele.deType]}`"
|
||||
@ -990,8 +990,12 @@ defineExpose({
|
||||
:key="ele.id"
|
||||
:label="ele.name"
|
||||
:value="ele.id"
|
||||
:disabled="ele.desensitized"
|
||||
>
|
||||
<div class="flex-align-center icon">
|
||||
<div
|
||||
class="flex-align-center icon"
|
||||
:title="ele.desensitized ? '脱敏字段,不能被设置为查询条件' : ''"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[ele.deType]}`"
|
||||
|
@ -1802,7 +1802,7 @@ export default {
|
||||
apply: '应用',
|
||||
apply_this_template: '应用此模板',
|
||||
market_network_tips:
|
||||
'查看模板市场模板需要服务器与模板市场(https://dataease.io/templates2)连通,请检查网络...',
|
||||
'查看模板市场模板需要服务器与模板市场(https://templates.dataease.cn)连通,请检查网络...',
|
||||
enter_name_tips: '请输入仪表板名称',
|
||||
name: '名称',
|
||||
apply_template: '应用模板',
|
||||
|
125
core/core-frontend/src/utils/sizeAdaptor.ts
Normal file
125
core/core-frontend/src/utils/sizeAdaptor.ts
Normal file
@ -0,0 +1,125 @@
|
||||
import { getScaleValue, mobileSpecialProps } from '@/utils/canvasStyle'
|
||||
|
||||
export const customAttrTrans = {
|
||||
size: [
|
||||
'barWidth',
|
||||
'lineWidth',
|
||||
'lineSymbolSize',
|
||||
'funnelWidth', // 漏斗图 最大宽度
|
||||
'tableTitleFontSize',
|
||||
'tableItemFontSize',
|
||||
'tableTitleHeight',
|
||||
'tableItemHeight',
|
||||
'dimensionFontSize',
|
||||
'quotaFontSize',
|
||||
'spaceSplit', // 间隔
|
||||
'scatterSymbolSize', // 气泡大小,散点图
|
||||
'radarSize', // 雷达占比
|
||||
'quotaSuffixFontSize'
|
||||
],
|
||||
label: ['fontSize'],
|
||||
tooltip: {
|
||||
textStyle: ['fontSize']
|
||||
},
|
||||
slider: ['fontSize'],
|
||||
graphic: ['fontSize']
|
||||
}
|
||||
export const customStyleTrans = {
|
||||
text: ['fontSize'],
|
||||
legend: {
|
||||
textStyle: ['fontSize']
|
||||
},
|
||||
xAxis: {
|
||||
nameTextStyle: ['fontSize'],
|
||||
axisLabel: ['fontSize'],
|
||||
splitLine: {
|
||||
lineStyle: ['width']
|
||||
}
|
||||
},
|
||||
yAxis: {
|
||||
nameTextStyle: ['fontSize'],
|
||||
axisLabel: ['fontSize'],
|
||||
splitLine: {
|
||||
lineStyle: ['width']
|
||||
}
|
||||
},
|
||||
yAxisExt: {
|
||||
nameTextStyle: ['fontSize'],
|
||||
axisLabel: ['fontSize'],
|
||||
splitLine: {
|
||||
lineStyle: ['width']
|
||||
}
|
||||
},
|
||||
split: {
|
||||
name: ['fontSize'],
|
||||
axisLine: {
|
||||
lineStyle: ['width']
|
||||
},
|
||||
axisTick: {
|
||||
lineStyle: ['width']
|
||||
},
|
||||
axisLabel: ['margin', 'fontSize'],
|
||||
splitLine: {
|
||||
lineStyle: ['width']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function recursionTransObj(template, infoObj, scale, terminal) {
|
||||
for (const templateKey in template) {
|
||||
// 如果是数组 进行赋值计算
|
||||
if (template[templateKey] instanceof Array) {
|
||||
template[templateKey].forEach(templateProp => {
|
||||
if (infoObj[templateKey] && infoObj[templateKey][templateProp]) {
|
||||
// 移动端特殊属性值设置
|
||||
if (terminal === 'mobile' && mobileSpecialProps[templateProp] !== undefined) {
|
||||
infoObj[templateKey][templateProp] = mobileSpecialProps[templateProp]
|
||||
} else {
|
||||
infoObj[templateKey][templateProp] = getScaleValue(
|
||||
infoObj[templateKey][templateProp],
|
||||
scale
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
} else if (typeof template[templateKey] === 'string') {
|
||||
// 一级字段为字符串直接赋值
|
||||
infoObj[templateKey] = getScaleValue(infoObj[templateKey], scale)
|
||||
} else {
|
||||
// 如果是对象 继续进行递归
|
||||
if (infoObj[templateKey]) {
|
||||
recursionTransObj(template[templateKey], infoObj[templateKey], scale, terminal)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function recursionThemTransObj(template, infoObj, color) {
|
||||
for (const templateKey in template) {
|
||||
// 如果是数组 进行赋值计算
|
||||
if (template[templateKey] instanceof Array) {
|
||||
template[templateKey].forEach(templateProp => {
|
||||
if (infoObj[templateKey]) {
|
||||
infoObj[templateKey][templateProp] = color
|
||||
}
|
||||
})
|
||||
} else if (typeof template[templateKey] === 'string') {
|
||||
// 一级字段为字符串直接赋值
|
||||
infoObj[templateKey] = color
|
||||
} else {
|
||||
// 如果是对象 继续进行递归
|
||||
if (infoObj[templateKey]) {
|
||||
recursionThemTransObj(template[templateKey], infoObj[templateKey], color)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function componentScalePublic(chartInfo, heightScale, widthScale) {
|
||||
const scale = Math.min(heightScale, widthScale)
|
||||
// attr 缩放转换
|
||||
recursionTransObj(this.customAttrTrans, chartInfo.customAttr, scale, null)
|
||||
// style 缩放转换
|
||||
recursionTransObj(this.customStyleTrans, chartInfo.customStyle, scale, null)
|
||||
return chartInfo
|
||||
}
|
@ -12,6 +12,7 @@ import { parseJson } from '@/views/chart/components/js/util'
|
||||
import { defaultsDeep, cloneDeep } from 'lodash-es'
|
||||
import ChartError from '@/views/chart/components/views/components/ChartError.vue'
|
||||
import { BASE_VIEW_CONFIG } from '../../editor/util/chart'
|
||||
import { customAttrTrans, customStyleTrans, recursionTransObj } from '@/utils/canvasStyle'
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { nowPanelTrackInfo, nowPanelJumpInfo } = storeToRefs(dvMainStore)
|
||||
@ -29,12 +30,21 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'canvas'
|
||||
},
|
||||
scale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 100
|
||||
},
|
||||
terminal: {
|
||||
type: String,
|
||||
default: 'pc'
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['onChartClick', 'onDrillFilters', 'onJumpClick'])
|
||||
|
||||
const { view, showPosition } = toRefs(props)
|
||||
const { view, showPosition, scale, terminal } = toRefs(props)
|
||||
|
||||
const isError = ref(false)
|
||||
const errMsg = ref('')
|
||||
@ -105,6 +115,9 @@ const renderChart = async view => {
|
||||
// 与默认视图对象合并,方便增加配置项
|
||||
const chart = { ...defaultsDeep(view, cloneDeep(BASE_VIEW_CONFIG)), data: chartData.value }
|
||||
const chartView = chartViewManager.getChartView(view.render, view.type)
|
||||
console.log('scale=' + scale.value)
|
||||
recursionTransObj(customAttrTrans, chart.customAttr, scale.value / 100, terminal.value)
|
||||
recursionTransObj(customStyleTrans, chart.customStyle, scale.value / 100, terminal.value)
|
||||
switch (chartView.library) {
|
||||
case ChartLibraryType.L7_PLOT:
|
||||
renderL7Plot(chart, chartView as L7PlotChartView<any, any>)
|
||||
|
@ -89,6 +89,11 @@ const props = defineProps({
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
scale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 100
|
||||
}
|
||||
})
|
||||
const dynamicAreaId = ref('')
|
||||
@ -617,6 +622,7 @@ const toolTip = computed(() => {
|
||||
:show-position="showPosition"
|
||||
/>
|
||||
<chart-component-g2-plot
|
||||
:scale="scale"
|
||||
:dynamic-area-id="dynamicAreaId"
|
||||
:view="view"
|
||||
:show-position="showPosition"
|
||||
|
@ -40,6 +40,7 @@
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node" :class="{ 'is-disabled': node.disabled || data.root }">
|
||||
<span
|
||||
class="geo-name-span"
|
||||
:title="data.name"
|
||||
v-html="data.colorName && keyword ? data.colorName : data.name"
|
||||
/>
|
||||
@ -304,14 +305,19 @@ loadTreeData(true)
|
||||
padding-right: 4px;
|
||||
overflow: hidden;
|
||||
justify-content: space-between;
|
||||
|
||||
.geo-name-span {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.geo-operate-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.geo-operate-container {
|
||||
display: contents;
|
||||
display: inline-flex;
|
||||
padding-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,12 +17,12 @@ const dialogVisible = ref(false)
|
||||
const loadingInstance = ref(null)
|
||||
const geoForm = ref<FormInstance>()
|
||||
const geoFile = ref()
|
||||
const fileName = ref()
|
||||
const state = reactive({
|
||||
form: reactive<GeometryFrom>({
|
||||
pid: null,
|
||||
code: null,
|
||||
name: null
|
||||
name: null,
|
||||
fileName: null
|
||||
}),
|
||||
treeData: []
|
||||
})
|
||||
@ -53,6 +53,13 @@ const rule = reactive<FormRules>({
|
||||
message: t('common.require'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
fileName: [
|
||||
{
|
||||
required: true,
|
||||
message: t('common.require'),
|
||||
trigger: 'blur'
|
||||
}
|
||||
]
|
||||
})
|
||||
|
||||
@ -63,7 +70,7 @@ const edit = (pid?: string) => {
|
||||
state.form.code = null
|
||||
state.form.name = null
|
||||
geoFile.value = null
|
||||
fileName.value = null
|
||||
state.form.fileName = null
|
||||
dialogVisible.value = true
|
||||
}
|
||||
|
||||
@ -71,7 +78,7 @@ const emits = defineEmits(['saved'])
|
||||
|
||||
const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
await formEl.validate(valid => {
|
||||
if (valid) {
|
||||
const param = { ...state.form }
|
||||
const formData = buildFormData(geoFile.value, param)
|
||||
@ -96,7 +103,6 @@ const submitForm = async (formEl: FormInstance | undefined) => {
|
||||
const resetForm = (formEl: FormInstance | undefined) => {
|
||||
if (!formEl) return
|
||||
geoFile.value = null
|
||||
fileName.value = null
|
||||
formEl.resetFields()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
@ -119,7 +125,7 @@ const handleError = () => {
|
||||
}
|
||||
const setFile = (options: UploadRequestOptions) => {
|
||||
geoFile.value = options.file
|
||||
fileName.value = options.file.name
|
||||
state.form.fileName = options.file.name
|
||||
}
|
||||
const uploadValidate = file => {
|
||||
const suffix = file.name.substring(file.name.lastIndexOf('.') + 1)
|
||||
@ -185,7 +191,7 @@ defineExpose({
|
||||
</el-form-item>
|
||||
|
||||
<div class="geo-label-mask" />
|
||||
<el-form-item label="坐标文件">
|
||||
<el-form-item label="坐标文件" prop="fileName">
|
||||
<el-upload
|
||||
class="upload-geo"
|
||||
action=""
|
||||
@ -196,14 +202,18 @@ defineExpose({
|
||||
:show-file-list="false"
|
||||
:http-request="setFile"
|
||||
>
|
||||
<el-input :placeholder="t('userimport.placeholder')" readonly v-model="fileName">
|
||||
<el-input
|
||||
:placeholder="t('userimport.placeholder')"
|
||||
readonly
|
||||
v-model="state.form.fileName"
|
||||
>
|
||||
<template #suffix>
|
||||
<el-icon>
|
||||
<Icon name="icon_upload_outlined" />
|
||||
</el-icon>
|
||||
</template>
|
||||
<template #prefix>
|
||||
<el-icon v-if="!!fileName">
|
||||
<el-icon v-if="!!state.form.fileName">
|
||||
<Icon name="de-json" />
|
||||
</el-icon>
|
||||
</template>
|
||||
|
@ -2,4 +2,5 @@ export interface GeometryFrom {
|
||||
pid?: string
|
||||
code?: string
|
||||
name?: string
|
||||
fileName?: string
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
:base-url="baseUrl"
|
||||
:width="templateCurWidth"
|
||||
:cur-position="curPosition"
|
||||
:create-auth="createAuth"
|
||||
@templateApply="templateApply"
|
||||
@templatePreview="templatePreview"
|
||||
/>
|
||||
@ -67,6 +68,15 @@ const props = defineProps({
|
||||
fullTemplateShowList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
createAuth: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
PANEL: false,
|
||||
SCREEN: false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
@ -101,12 +101,13 @@
|
||||
class="main-area"
|
||||
:class="state.asideActive ? 'main-area-active' : ''"
|
||||
>
|
||||
<el-row>
|
||||
<span v-if="state.curTemplate" class="template-title">{{ state.curTemplate.title }}</span>
|
||||
<el-row v-if="state.curTemplate">
|
||||
<span class="template-title">{{ state.curTemplate.title }}</span>
|
||||
<div style="flex: 1; text-align: right">
|
||||
<el-button
|
||||
style="float: right"
|
||||
type="primary"
|
||||
:disabled="!createAuth[state.curTemplate?.templateType]"
|
||||
@click="templateApply(state.curTemplate)"
|
||||
>{{ t('visualization.apply_this_template') }}</el-button
|
||||
>
|
||||
@ -138,6 +139,15 @@ const props = defineProps({
|
||||
templateShowList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
createAuth: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
PANEL: false,
|
||||
SCREEN: false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -4,7 +4,11 @@
|
||||
<el-row class="bottom-area"> </el-row>
|
||||
<el-row
|
||||
class="bottom-area-show"
|
||||
:class="{ 'create-area': ['branchCreate', 'create'].includes(props.curPosition) }"
|
||||
:class="{
|
||||
'create-area':
|
||||
['branchCreate', 'create'].includes(props.curPosition) ||
|
||||
!createAuth[template.templateType]
|
||||
}"
|
||||
>
|
||||
<el-row class="demonstration">
|
||||
{{ template.title }}
|
||||
@ -44,6 +48,15 @@ const props = defineProps({
|
||||
},
|
||||
width: {
|
||||
type: Number
|
||||
},
|
||||
createAuth: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
PANEL: false,
|
||||
SCREEN: false
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@ -139,4 +152,8 @@ const templateInnerPreview = e => {
|
||||
.create-area {
|
||||
bottom: -38px !important;
|
||||
}
|
||||
|
||||
.fix-bottom {
|
||||
bottom: -38px !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<market-preview-v2
|
||||
v-show="previewModel === 'marketPreview'"
|
||||
:preview-id="state.templatePreviewId"
|
||||
:create-auth="createAuth"
|
||||
@closePreview="closePreview"
|
||||
@templateApply="templateApply"
|
||||
></market-preview-v2>
|
||||
@ -111,6 +112,7 @@
|
||||
:base-url="state.baseUrl"
|
||||
:template-cur-width="state.templateCurWidth"
|
||||
:cur-position="state.curPosition"
|
||||
:create-auth="createAuth"
|
||||
@templateApply="templateApply"
|
||||
@templatePreview="templatePreview"
|
||||
></category-template-v2>
|
||||
@ -130,6 +132,7 @@
|
||||
:base-url="state.baseUrl"
|
||||
:template-cur-width="state.templateCurWidth"
|
||||
:cur-position="state.curPosition"
|
||||
:create-auth="createAuth"
|
||||
@templateApply="templateApply"
|
||||
@templatePreview="templatePreview"
|
||||
></category-template-v2>
|
||||
@ -163,9 +166,12 @@ import MarketPreviewV2 from '@/views/template-market/component/MarketPreviewV2.v
|
||||
import { imgUrlTrans } from '@/utils/imgUtils'
|
||||
import { deepCopy } from '@/utils/utils'
|
||||
import CategoryTemplateV2 from '@/views/template-market/component/CategoryTemplateV2.vue'
|
||||
import { interactiveStoreWithOut } from '@/store/modules/interactive'
|
||||
const { t } = useI18n()
|
||||
const { wsCache } = useCache()
|
||||
|
||||
const interactiveStore = interactiveStoreWithOut()
|
||||
|
||||
// full 正常展示 marketPreview 模板中心预览 createPreview 创建界面预览
|
||||
const previewModel = ref('full')
|
||||
const emits = defineEmits(['close'])
|
||||
@ -264,6 +270,14 @@ const state = reactive({
|
||||
}
|
||||
})
|
||||
|
||||
const createAuth = computed(() => {
|
||||
const authMap = interactiveStore.getData
|
||||
return {
|
||||
PANEL: authMap['0'].menuAuth && authMap['0'].anyManage,
|
||||
SCREEN: authMap['1'].menuAuth && authMap['1'].anyManage
|
||||
}
|
||||
})
|
||||
|
||||
const categoriesComputed = computed(() => {
|
||||
let result
|
||||
if (state.templateSourceType === 'all') {
|
||||
@ -341,7 +355,7 @@ const initMarketTemplate = async () => {
|
||||
state.baseUrl = rsp.data.baseUrl
|
||||
state.currentMarketTemplateShowList = rsp.data.contents
|
||||
state.marketTabs = rsp.data.categories
|
||||
state.marketActiveTab = state.marketTabs[0].label
|
||||
state.marketActiveTab = state.marketTabs[1].label
|
||||
initStyle()
|
||||
initTemplateShow()
|
||||
})
|
||||
@ -414,7 +428,11 @@ const apply = () => {
|
||||
templateData.type === 'dataV'
|
||||
? '#/dvCanvas?opt=create&createType=template'
|
||||
: '#/dashboard?opt=create&createType=template'
|
||||
window.open(baseUrl, '_blank')
|
||||
if (state.pid) {
|
||||
window.open(baseUrl + `&pid=${state.pid}`, '_blank')
|
||||
} else {
|
||||
window.open(baseUrl, '_blank')
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
state.loading = false
|
||||
|
@ -3,8 +3,10 @@
|
||||
<div class="photo">
|
||||
<div class="img" :style="classBackground"></div>
|
||||
</div>
|
||||
<div class="apply">
|
||||
<span :title="template.title" class="name ellipsis"> {{ template.title }} </span>
|
||||
<div class="apply" :class="{ 'fix-height': !createAuth[template.templateType] }">
|
||||
<span :title="template.title" class="name ellipsis">
|
||||
{{ template.title }}
|
||||
</span>
|
||||
<el-button class="flex-center" secondary @click="templateInnerPreview">{{
|
||||
t('dataset.preview')
|
||||
}}</el-button>
|
||||
@ -30,6 +32,15 @@ const props = defineProps({
|
||||
return {}
|
||||
}
|
||||
},
|
||||
createAuth: {
|
||||
type: Object,
|
||||
default() {
|
||||
return {
|
||||
PANEL: false,
|
||||
SCREEN: false
|
||||
}
|
||||
}
|
||||
},
|
||||
baseUrl: {
|
||||
type: String
|
||||
}
|
||||
@ -69,7 +80,7 @@ const templateInnerPreview = e => {
|
||||
border-radius: 4px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
width: 181px;
|
||||
min-width: 181px;
|
||||
height: 141px;
|
||||
margin-left: 16px;
|
||||
position: relative;
|
||||
@ -136,4 +147,8 @@ const templateInnerPreview = e => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fix-height {
|
||||
height: 39px !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -58,6 +58,21 @@ const showTemplate = computed(() => {
|
||||
return state.networkStatus && state.hasResult
|
||||
})
|
||||
|
||||
const createAuth = computed(() => {
|
||||
return {
|
||||
PANEL: havePanelAuth.value,
|
||||
SCREEN: haveScreenAuth.value
|
||||
}
|
||||
})
|
||||
|
||||
const havePanelAuth = computed(() => {
|
||||
return quickCreationList.value[0]['menuAuth'] && quickCreationList.value[0]['anyManage']
|
||||
})
|
||||
|
||||
const haveScreenAuth = computed(() => {
|
||||
return quickCreationList.value[1]['menuAuth'] && quickCreationList.value[1]['anyManage']
|
||||
})
|
||||
|
||||
const activeTabChange = value => {
|
||||
activeTabBtn.value = value
|
||||
}
|
||||
@ -289,8 +304,23 @@ initMarketTemplate()
|
||||
{{ t(`auth.${ele.name}`) }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="item item-quick" @click="toTemplateMarketAdd">
|
||||
<el-icon class="main-color-quick">
|
||||
<div
|
||||
class="item item-quick"
|
||||
:class="{
|
||||
'quick-create-disabled': !(havePanelAuth || haveScreenAuth)
|
||||
}"
|
||||
@click="toTemplateMarketAdd"
|
||||
>
|
||||
<el-tooltip
|
||||
v-if="!(havePanelAuth || haveScreenAuth)"
|
||||
class="box-item"
|
||||
effect="dark"
|
||||
content="缺少创建权限"
|
||||
placement="top"
|
||||
>
|
||||
<div class="empty-tooltip-container-template" />
|
||||
</el-tooltip>
|
||||
<el-icon class="main-color-quick template-create">
|
||||
<Icon name="icon_template_colorful" />
|
||||
</el-icon>
|
||||
<span class="name">使用模板新建</span>
|
||||
@ -329,6 +359,7 @@ initMarketTemplate()
|
||||
:key="index"
|
||||
:template="template"
|
||||
:base-url="state.baseUrl"
|
||||
:create-auth="createAuth"
|
||||
@templateApply="templateApply"
|
||||
@templatePreview="templatePreview"
|
||||
>
|
||||
@ -536,6 +567,15 @@ initMarketTemplate()
|
||||
height: 52px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
.empty-tooltip-container-template {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
height: 52px;
|
||||
margin-left: -16px;
|
||||
}
|
||||
.template-create {
|
||||
opacity: 0.3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -620,6 +660,7 @@ initMarketTemplate()
|
||||
.template-list {
|
||||
display: flex;
|
||||
margin-left: -16px;
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
||||
Subproject commit 0352814e63af722b8811159704d36d9ca2244c0d
|
||||
Subproject commit 79da01c6f46aec7b0d3e5920213fe866a8a07678
|
@ -245,4 +245,4 @@ dectl start | tee -a ${CURRENT_DIR}/install.log
|
||||
dectl status 2>&1 | tee -a ${CURRENT_DIR}/install.log
|
||||
|
||||
echo -e "======================= 安装完成 =======================\n" 2>&1 | tee -a ${CURRENT_DIR}/install.log
|
||||
echo -e "系统登录信息如下:\n 用户名: admin\n 初始密码: dataease" 2>&1 | tee -a ${CURRENT_DIR}/install.log
|
||||
echo -e "系统登录信息如下:\n 用户名: admin\n 初始密码: DataEase@123456" 2>&1 | tee -a ${CURRENT_DIR}/install.log
|
4
pom.xml
4
pom.xml
@ -23,7 +23,7 @@
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<mybatis-plus.version>3.5.3.1</mybatis-plus.version>
|
||||
<h2.version>1.4.199</h2.version>
|
||||
<h2.version>2.2.220</h2.version>
|
||||
<knife4j.version>4.1.0</knife4j.version>
|
||||
<calcite-core.version>1.35.1</calcite-core.version>
|
||||
<commons-dbcp2.version>2.6.0</commons-dbcp2.version>
|
||||
@ -33,7 +33,7 @@
|
||||
<maven.antrun.version>3.1.0</maven.antrun.version>
|
||||
<hutool.version>5.8.16</hutool.version>
|
||||
<ehcache.version>3.10.8</ehcache.version>
|
||||
<bcprov.version>1.72</bcprov.version>
|
||||
<bcprov.version>1.74</bcprov.version>
|
||||
<junit.version>4.13.2</junit.version>
|
||||
<httpclient.version>4.5.14</httpclient.version>
|
||||
<httpcore.version>4.4.16</httpcore.version>
|
||||
|
@ -3,6 +3,7 @@ package io.dataease.api.dataset;
|
||||
import io.dataease.api.dataset.dto.MultFieldValuesRequest;
|
||||
import io.dataease.api.dataset.engine.SQLFunctionDTO;
|
||||
import io.dataease.dto.dataset.DatasetTableFieldDTO;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@ -37,6 +38,9 @@ public interface DatasetTableApi {
|
||||
@PostMapping("listByDQ/{id}")
|
||||
Map<String, List<DatasetTableFieldDTO>> listByDQ(@PathVariable Long id);
|
||||
|
||||
@GetMapping ("listWithPermissions/{id}")
|
||||
List<DatasetTableFieldDTO> listFieldsWithPermissions(@PathVariable Long id);
|
||||
|
||||
|
||||
@PostMapping("multFieldValuesForPermissions")
|
||||
List<String> multFieldValuesForPermissions(@RequestBody MultFieldValuesRequest multFieldValuesRequest) throws Exception;
|
||||
|
@ -72,4 +72,7 @@ public interface DatasetTreeApi {
|
||||
|
||||
@PostMapping("getSqlParams")
|
||||
List<SqlVariableDetails> getSqlParams(@RequestBody List<Long> ids) throws Exception;
|
||||
|
||||
@PostMapping("detailWithPerm")
|
||||
List<DatasetTableDTO> detailWithPerm(@RequestBody List<Long> ids) throws Exception;
|
||||
}
|
||||
|
@ -121,4 +121,9 @@ public class DatasetTableFieldDTO implements Serializable {
|
||||
* 字段short name
|
||||
*/
|
||||
private String fieldShortName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否脱敏
|
||||
*/
|
||||
private Boolean desensitized;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user