Merge branch 'dev-v2' into pr@dev2@fixds
This commit is contained in:
commit
d56004364a
@ -25,7 +25,7 @@ public class MybatisPlusGenerator {
|
||||
/**
|
||||
* 这是要生成代码的表名称
|
||||
*/
|
||||
private static final String TABLE_NAME = "visualization_outer_params_info";
|
||||
private static final String TABLE_NAME = "visualization_link_jump_info";
|
||||
|
||||
/**
|
||||
* 下面两个配置基本上不用动
|
||||
|
||||
@ -12,12 +12,13 @@ import io.dataease.extensions.datasource.provider.Provider;
|
||||
import io.dataease.extensions.view.dto.*;
|
||||
import io.dataease.extensions.view.util.FieldUtil;
|
||||
import io.dataease.utils.JsonUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 带同环比计算的图表处理器
|
||||
@ -118,6 +119,61 @@ public class YoyChartHandler extends DefaultChartHandler {
|
||||
expandedResult.setOriginData(resultData);
|
||||
expandedResult.setQuerySql(originSql);
|
||||
}
|
||||
// 同环比数据排序
|
||||
expandedResult.setOriginData(sortData(view, expandedResult.getOriginData()));
|
||||
return expandedResult;
|
||||
}
|
||||
|
||||
public static List<String[]> sortData(ChartViewDTO view, List<String[]> data) {
|
||||
// 维度排序
|
||||
List<ChartViewFieldDTO> xAxisSortList = view.getXAxis().stream().filter(x -> !StringUtils.equalsIgnoreCase("none", x.getSort())).toList();
|
||||
// 指标排序
|
||||
List<ChartViewFieldDTO> yAxisSortList = view.getYAxis().stream().filter(y -> !StringUtils.equalsIgnoreCase("none", y.getSort())).toList();
|
||||
// 不包含维度排序时,指标排序生效
|
||||
if (!data.isEmpty() && CollectionUtils.isEmpty(xAxisSortList) && CollectionUtils.isNotEmpty(yAxisSortList)) {
|
||||
// 指标排序仅第一个生效
|
||||
ChartViewFieldDTO firstYAxis = yAxisSortList.getFirst();
|
||||
boolean asc = firstYAxis.getSort().equalsIgnoreCase("asc");
|
||||
// 维度指标
|
||||
List<ChartViewFieldDTO> allAxisList = Stream.of(
|
||||
view.getXAxis(),
|
||||
view.getXAxisExt(),
|
||||
view.getYAxis()
|
||||
).flatMap(List::stream).toList();
|
||||
int index = findIndex(allAxisList, firstYAxis.getId());
|
||||
return sortData(data, asc, index);
|
||||
}
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
public static List<String[]> sortData(List<String[]> data, boolean ascending, int index) {
|
||||
Comparator<String[]> comparator;
|
||||
if (ascending) {
|
||||
comparator = Comparator.comparing(item -> toBigDecimal(item[index]), Comparator.nullsFirst(Comparator.naturalOrder()));
|
||||
} else {
|
||||
comparator = Comparator.comparing(item -> toBigDecimal(item[index]), Comparator.nullsLast(Comparator.reverseOrder()));
|
||||
}
|
||||
return data.stream().sorted(comparator).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private static BigDecimal toBigDecimal(String value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return new BigDecimal(value);
|
||||
} catch (NumberFormatException e) {
|
||||
throw new IllegalArgumentException("Invalid number format: " + value, e);
|
||||
}
|
||||
}
|
||||
|
||||
public static int findIndex(List<ChartViewFieldDTO> list, Long id) {
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
if (StringUtils.equalsIgnoreCase(list.get(i).getId().toString(), id.toString())) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,8 +47,7 @@ public class SymbolicMapHandler extends GroupChartHandler {
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
var extBubble = formatResult.getAxisMap().get(ChartAxis.extBubble);
|
||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||
Map<String, Object> result = ChartDataBuild.transSymbolicMapNormalWithDetail(xAxis, yAxis, extBubble, data, detailFields, detailData);
|
||||
return result;
|
||||
return ChartDataBuild.transSymbolicMapNormalWithDetail(view, xAxis, yAxis, extBubble, data, detailFields, detailData);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
package io.dataease.chart.charts.impl.mix;
|
||||
|
||||
import io.dataease.chart.utils.ChartDataBuild;
|
||||
import io.dataease.extensions.view.dto.AxisFormatResult;
|
||||
import io.dataease.extensions.view.dto.ChartAxis;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.extensions.view.dto.CustomFilterResult;
|
||||
import lombok.Getter;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class DualLineMixHandler extends GroupMixHandler {
|
||||
@Getter
|
||||
private final String type = "chart-mix-dual-line";
|
||||
|
||||
@Override
|
||||
public Map<String, Object> buildNormalResult(ChartViewDTO view, AxisFormatResult formatResult, CustomFilterResult filterResult, List<String[]> data) {
|
||||
boolean isDrill = filterResult
|
||||
.getFilterList()
|
||||
.stream()
|
||||
.anyMatch(ele -> ele.getFilterType() == 1);
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
var xAxisExt = formatResult.getAxisMap().get(ChartAxis.xAxisExt);
|
||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||
var xAxisBase = xAxis.subList(0, xAxis.size() - xAxisExt.size());
|
||||
return ChartDataBuild.transMixChartDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill, true);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,13 +1,10 @@
|
||||
package io.dataease.chart.charts.impl.mix;
|
||||
|
||||
import io.dataease.chart.utils.ChartDataBuild;
|
||||
import io.dataease.extensions.view.dto.*;
|
||||
import lombok.Getter;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class GroupMixHandler extends MixHandler {
|
||||
|
||||
@ -55,11 +55,19 @@ public class MixHandler extends YoyChartHandler {
|
||||
.getFilterList()
|
||||
.stream()
|
||||
.anyMatch(ele -> ele.getFilterType() == 1);
|
||||
if (StringUtils.equals((String) formatResult.getContext().get("isRight"), "isRight")) {
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
var xAxisExt = formatResult.getAxisMap().get(ChartAxis.xAxisExt);
|
||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||
var xAxisBase = xAxis.subList(0, xAxis.size() - xAxisExt.size());
|
||||
return ChartDataBuild.transMixChartDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill, true);
|
||||
}
|
||||
|
||||
var xAxisBase = (List<ChartViewFieldDTO>) formatResult.getContext().get("xAxisBase");
|
||||
var yAxis = formatResult.getAxisMap().get(ChartAxis.yAxis);
|
||||
var xAxis = formatResult.getAxisMap().get(ChartAxis.xAxis);
|
||||
var xAxisExt = formatResult.getAxisMap().get(ChartAxis.xAxisExt);
|
||||
var result = ChartDataBuild.transMixChartDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill);
|
||||
var result = ChartDataBuild.transMixChartDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill, false);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -97,11 +105,6 @@ public class MixHandler extends YoyChartHandler {
|
||||
|
||||
AxisFormatResult formatResult2 = new AxisFormatResult();
|
||||
var axisMap = new HashMap<ChartAxis, List<ChartViewFieldDTO>>();
|
||||
axisMap.put(ChartAxis.xAxis, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.xAxis)));
|
||||
axisMap.put(ChartAxis.extStack, new ArrayList<>());
|
||||
axisMap.put(ChartAxis.xAxisExt, new ArrayList<>());
|
||||
axisMap.put(ChartAxis.extBubble, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extBubble)));
|
||||
axisMap.put(ChartAxis.yAxisExt, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.yAxisExt)));
|
||||
axisMap.put(ChartAxis.extLabel, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extLabel)));
|
||||
axisMap.put(ChartAxis.extTooltip, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extTooltip)));
|
||||
axisMap.put(ChartAxis.drill, new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.drill)));
|
||||
@ -110,18 +113,21 @@ public class MixHandler extends YoyChartHandler {
|
||||
|
||||
// 计算右轴,包含 xAxis,xAxisExt,yAxisExt,需要去掉 group 和 stack
|
||||
var xAxis = new ArrayList<>(view.getXAxis());
|
||||
var extStack = formatResult2.getAxisMap().get(ChartAxis.extStack);
|
||||
var xAxisExt = formatResult2.getAxisMap().get(ChartAxis.xAxisExt);
|
||||
//xAxis = xAxis.subList(0, xAxis.size() - extStack.size() - xAxisExt.size());
|
||||
var extBubble = formatResult2.getAxisMap().get(ChartAxis.extBubble);
|
||||
var extBubble = new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.extBubble));
|
||||
xAxis.addAll(extBubble);
|
||||
var dillAxis = (ArrayList<ChartViewFieldDTO>) formatResult.getContext().get("dillAxis");
|
||||
xAxis.addAll(dillAxis);
|
||||
var fields = xAxis.stream().map(ChartViewFieldDTO::getId).collect(Collectors.toSet());
|
||||
for (ChartViewFieldDTO dillAxi : dillAxis) {
|
||||
if (!fields.contains(dillAxi.getId())) {
|
||||
xAxis.add(dillAxi);
|
||||
}
|
||||
}
|
||||
formatResult2.getAxisMap().put(ChartAxis.xAxis, xAxis);
|
||||
formatResult2.getAxisMap().put(ChartAxis.xAxisExt, extBubble);
|
||||
var yAxisExt = formatResult2.getAxisMap().get(ChartAxis.yAxisExt);
|
||||
var yAxisExt = new ArrayList<>(formatResult.getAxisMap().get(ChartAxis.yAxisExt));
|
||||
formatResult2.getAxisMap().put(ChartAxis.yAxis, yAxisExt);
|
||||
formatResult2.getContext().remove("yoyFiltered");
|
||||
formatResult2.getContext().put("isRight", "isRight");
|
||||
|
||||
|
||||
formatResult.getContext().put("subAxisMap", axisMap);
|
||||
|
||||
@ -7,7 +7,6 @@ import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
public class StackMixHandler extends MixHandler {
|
||||
|
||||
@ -237,12 +237,12 @@ public class ChartDataManage {
|
||||
if (ObjectUtils.isNotEmpty(filters)) {
|
||||
for (ChartExtFilterDTO request : filters) {
|
||||
// 包含 DE 的为数据集参数
|
||||
if(request.getFieldId().contains("DE")){
|
||||
if (request.getFieldId().contains("DE")) {
|
||||
// 组装sql 参数原始数据
|
||||
if (CollectionUtils.isNotEmpty(sqlVariables)) {
|
||||
for(SqlVariableDetails sourceVariables : sqlVariables){
|
||||
if(sourceVariables.getId().equals(request.getFieldId())){
|
||||
if(CollectionUtils.isEmpty(request.getParameters())){
|
||||
for (SqlVariableDetails sourceVariables : sqlVariables) {
|
||||
if (sourceVariables.getId().equals(request.getFieldId())) {
|
||||
if (CollectionUtils.isEmpty(request.getParameters())) {
|
||||
request.setParameters(new ArrayList<>());
|
||||
}
|
||||
request.getParameters().add(sourceVariables);
|
||||
@ -250,7 +250,7 @@ public class ChartDataManage {
|
||||
}
|
||||
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
DatasetTableFieldDTO datasetTableField = datasetTableFieldManage.selectById(Long.valueOf(request.getFieldId()));
|
||||
request.setDatasetTableField(datasetTableField);
|
||||
request.setFilterType(2);
|
||||
@ -370,10 +370,7 @@ public class ChartDataManage {
|
||||
provider = ProviderFactory.getProvider(dsMap.entrySet().iterator().next().getValue().getType());
|
||||
}
|
||||
|
||||
if (ObjectUtils.isEmpty(view.getCalParams())) {
|
||||
view.setCalParams(Utils.getParams(transFields(allFields)));
|
||||
}
|
||||
|
||||
view.setCalParams(Utils.getParams(transFields(allFields)));
|
||||
SQLMeta sqlMeta = new SQLMeta();
|
||||
Table2SQLObj.table2sqlobj(sqlMeta, null, "(" + sql + ")", crossDs);
|
||||
CustomWhere2Str.customWhere2sqlObj(sqlMeta, fieldCustomFilter, transFields(allFields), crossDs, dsMap, Utils.getParams(transFields(allFields)), view.getCalParams(), pluginManage);
|
||||
@ -624,7 +621,9 @@ public class ChartDataManage {
|
||||
|| StringUtils.containsIgnoreCase(view.getType(), "group")
|
||||
|| ("antv".equalsIgnoreCase(view.getRender()) && "line".equalsIgnoreCase(view.getType()))
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "flow-map")
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "t-heatmap")) {
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "t-heatmap")
|
||||
|| StringUtils.equalsIgnoreCase(view.getType(), "sankey")
|
||||
) {
|
||||
xAxis.addAll(xAxisExt);
|
||||
}
|
||||
List<ChartViewFieldDTO> yAxis = new ArrayList<>(view.getYAxis());
|
||||
@ -642,7 +641,7 @@ public class ChartDataManage {
|
||||
List<ChartViewFieldDTO> drill = new ArrayList<>(view.getDrillFields());
|
||||
|
||||
// 获取数据集,需校验权限
|
||||
DatasetGroupInfoDTO table = datasetGroupManage.get(view.getTableId(), null);
|
||||
DatasetGroupInfoDTO table = datasetGroupManage.getDatasetGroupInfoDTO(view.getTableId(), null);
|
||||
Map<String, ColumnPermissionItem> desensitizationList = new HashMap<>();
|
||||
List<DataSetRowPermissionsTreeDTO> rowPermissionsTree = permissionManage.getRowPermissionsTree(table.getId(), view.getChartExtRequest().getUser());
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package io.dataease.chart.utils;
|
||||
|
||||
import io.dataease.api.chart.dto.*;
|
||||
import io.dataease.api.chart.dto.ScatterChartDataDTO;
|
||||
import io.dataease.api.chart.dto.Series;
|
||||
import io.dataease.extensions.view.dto.*;
|
||||
import io.dataease.i18n.Lang;
|
||||
import io.dataease.i18n.Translator;
|
||||
@ -504,6 +505,11 @@ public class ChartDataBuild {
|
||||
|
||||
// antV组合图形
|
||||
public static Map<String, Object> transMixChartDataAntV(List<ChartViewFieldDTO> xAxisBase, List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> xAxisExt, List<ChartViewFieldDTO> yAxis, ChartViewDTO view, List<String[]> data, boolean isDrill) {
|
||||
return transMixChartDataAntV(xAxisBase, xAxis, xAxisExt, yAxis, view, data, isDrill, false);
|
||||
}
|
||||
|
||||
public static Map<String, Object> transMixChartDataAntV(List<ChartViewFieldDTO> xAxisBase, List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> xAxisExt, List<ChartViewFieldDTO> yAxis, ChartViewDTO view, List<String[]> data, boolean isDrill, boolean isLine) {
|
||||
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
|
||||
List<Series> series = new ArrayList<>();
|
||||
@ -571,8 +577,16 @@ public class ChartDataBuild {
|
||||
} catch (Exception e) {
|
||||
axisChartDataDTO.setValue(new BigDecimal(0));
|
||||
}
|
||||
|
||||
String category = StringUtils.defaultIfBlank(b.toString(),
|
||||
StringUtils.defaultIfBlank(yAxis.get(j).getChartShowName(), yAxis.get(j).getName()));
|
||||
|
||||
if (isLine) {
|
||||
if (ObjectUtils.isEmpty(xAxisExt)) {
|
||||
category = StringUtils.defaultIfBlank(yAxis.get(j).getChartShowName(), yAxis.get(j).getName());
|
||||
}
|
||||
}
|
||||
|
||||
axisChartDataDTO.setCategory(category);
|
||||
categories.add(category);
|
||||
|
||||
@ -1752,7 +1766,7 @@ public class ChartDataBuild {
|
||||
}
|
||||
}
|
||||
|
||||
public static Map<String, Object> transSymbolicMapNormalWithDetail(List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> yAxis, List<ChartViewFieldDTO> extBubble, List<String[]> data, List<ChartViewFieldDTO> detailFields, List<String[]> detailData) {
|
||||
public static Map<String, Object> transSymbolicMapNormalWithDetail(ChartViewDTO view, List<ChartViewFieldDTO> xAxis, List<ChartViewFieldDTO> yAxis, List<ChartViewFieldDTO> extBubble, List<String[]> data, List<ChartViewFieldDTO> detailFields, List<String[]> detailData) {
|
||||
int detailIndex = xAxis.size();
|
||||
|
||||
List<ChartViewFieldDTO> realDetailFields = detailFields.subList(detailIndex, detailFields.size());
|
||||
@ -1764,7 +1778,7 @@ public class ChartDataBuild {
|
||||
fields.addAll(extBubble);
|
||||
if (ObjectUtils.isNotEmpty(yAxis))
|
||||
fields.addAll(yAxis);
|
||||
Map<String, Object> map = transTableNormal(fields, null, data, new HashMap<>());
|
||||
Map<String, Object> map = transTableNormal(fields, view, data, new HashMap<>());
|
||||
List<Map<String, Object>> tableRow = (List<Map<String, Object>>) map.get("tableRow");
|
||||
final int xEndIndex = detailIndex;
|
||||
Map<String, List<String[]>> groupDataList = detailData.stream().collect(Collectors.groupingBy(item -> "(" + StringUtils.join(ArrayUtils.subarray(item, 0, xEndIndex), ")-de-(") + ")"));
|
||||
|
||||
@ -254,8 +254,6 @@ public class DatasetDataManage {
|
||||
map.put("allFields", fieldList);
|
||||
}
|
||||
map.put("sql", Base64.getEncoder().encodeToString(querySQL.getBytes()));
|
||||
String replaceSql = provider.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, false, false), sqlMeta, crossDs, dsMap);
|
||||
map.put("total", getDatasetTotal(datasetGroupInfoDTO, replaceSql, null));
|
||||
return map;
|
||||
}
|
||||
|
||||
@ -267,6 +265,56 @@ public class DatasetDataManage {
|
||||
return 0L;
|
||||
}
|
||||
|
||||
public Long getDatasetCountWithWhere(Long datasetGroupId) throws Exception {
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.getForCount(datasetGroupId);
|
||||
Map<String, Object> sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, null);
|
||||
String sql = (String) sqlMap.get("sql");
|
||||
|
||||
// 获取allFields
|
||||
List<DatasetTableFieldDTO> fields = datasetGroupInfoDTO.getAllFields();
|
||||
if (ObjectUtils.isEmpty(fields)) {
|
||||
DEException.throwException(Translator.get("i18n_no_fields"));
|
||||
}
|
||||
|
||||
buildFieldName(sqlMap, fields);
|
||||
|
||||
Map<Long, DatasourceSchemaDTO> dsMap = (Map<Long, DatasourceSchemaDTO>) sqlMap.get("dsMap");
|
||||
DatasourceUtils.checkDsStatus(dsMap);
|
||||
List<String> dsList = new ArrayList<>();
|
||||
for (Map.Entry<Long, DatasourceSchemaDTO> next : dsMap.entrySet()) {
|
||||
dsList.add(next.getValue().getType());
|
||||
}
|
||||
boolean crossDs = Utils.isCrossDs(dsMap);
|
||||
if (!crossDs) {
|
||||
if (notFullDs.contains(dsMap.entrySet().iterator().next().getValue().getType()) && (boolean) sqlMap.get("isFullJoin")) {
|
||||
DEException.throwException(Translator.get("i18n_not_full"));
|
||||
}
|
||||
sql = Utils.replaceSchemaAlias(sql, dsMap);
|
||||
}
|
||||
|
||||
List<DataSetRowPermissionsTreeDTO> rowPermissionsTree = new ArrayList<>();
|
||||
TokenUserBO user = AuthUtils.getUser();
|
||||
if (user != null) {
|
||||
rowPermissionsTree = permissionManage.getRowPermissionsTree(datasetGroupInfoDTO.getId(), user.getUserId());
|
||||
}
|
||||
|
||||
Provider provider;
|
||||
if (crossDs) {
|
||||
provider = ProviderFactory.getDefaultProvider();
|
||||
} else {
|
||||
provider = ProviderFactory.getProvider(dsList.getFirst());
|
||||
}
|
||||
|
||||
// build query sql
|
||||
SQLMeta sqlMeta = new SQLMeta();
|
||||
Table2SQLObj.table2sqlobj(sqlMeta, null, "(" + sql + ")", crossDs);
|
||||
Field2SQLObj.field2sqlObj(sqlMeta, fields, fields, crossDs, dsMap, Utils.getParams(fields), null, pluginManage);
|
||||
WhereTree2Str.transFilterTrees(sqlMeta, rowPermissionsTree, fields, crossDs, dsMap, Utils.getParams(fields), null, pluginManage);
|
||||
Order2SQLObj.getOrders(sqlMeta, datasetGroupInfoDTO.getSortFields(), fields, crossDs, dsMap, Utils.getParams(fields), null, pluginManage);
|
||||
String replaceSql = provider.rebuildSQL(SQLProvider.createQuerySQL(sqlMeta, false, false, false), sqlMeta, crossDs, dsMap);
|
||||
return getDatasetTotal(datasetGroupInfoDTO, replaceSql, null);
|
||||
}
|
||||
|
||||
public Long getDatasetTotal(DatasetGroupInfoDTO datasetGroupInfoDTO, String s, ChartExtRequest request) throws Exception {
|
||||
Map<String, Object> sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, request);
|
||||
Map<Long, DatasourceSchemaDTO> dsMap = (Map<Long, DatasourceSchemaDTO>) sqlMap.get("dsMap");
|
||||
@ -472,7 +520,7 @@ public class DatasetDataManage {
|
||||
if (field.getChartId() != null) {
|
||||
allFields.addAll(datasetTableFieldManage.getChartCalcFields(field.getChartId()));
|
||||
}
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.get(datasetGroupId, null);
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.getDatasetGroupInfoDTO(datasetGroupId, null);
|
||||
|
||||
Map<String, Object> sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, new ChartExtRequest());
|
||||
String sql = (String) sqlMap.get("sql");
|
||||
@ -624,7 +672,7 @@ public class DatasetDataManage {
|
||||
if (field.getChartId() != null) {
|
||||
allFields.addAll(datasetTableFieldManage.getChartCalcFields(field.getChartId()));
|
||||
}
|
||||
datasetGroupInfoDTO = datasetGroupManage.get(datasetGroupId, null);
|
||||
datasetGroupInfoDTO = datasetGroupManage.getDatasetGroupInfoDTO(datasetGroupId, null);
|
||||
|
||||
sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, new ChartExtRequest());
|
||||
String sql = (String) sqlMap.get("sql");
|
||||
@ -844,7 +892,7 @@ public class DatasetDataManage {
|
||||
if (field.getChartId() != null) {
|
||||
allFields.addAll(datasetTableFieldManage.getChartCalcFields(field.getChartId()));
|
||||
}
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.get(datasetGroupId, null);
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.getDatasetGroupInfoDTO(datasetGroupId, null);
|
||||
|
||||
Map<String, Object> sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, new ChartExtRequest());
|
||||
String sql = (String) sqlMap.get("sql");
|
||||
|
||||
@ -45,8 +45,6 @@ import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static io.dataease.result.ResultCode.DV_RESOURCE_UNCHECKED;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
*/
|
||||
@ -397,10 +395,6 @@ public class DatasetGroupManage {
|
||||
return dto;
|
||||
}
|
||||
|
||||
public DatasetGroupInfoDTO getDatasetGroupInfoDTO(Long id, String type) throws Exception {
|
||||
return get(id, type);
|
||||
}
|
||||
|
||||
public DatasetGroupInfoDTO getDetail(Long id) throws Exception {
|
||||
CoreDatasetGroup coreDatasetGroup = coreDatasetGroupMapper.selectById(id);
|
||||
if (coreDatasetGroup == null) {
|
||||
@ -437,7 +431,7 @@ public class DatasetGroupManage {
|
||||
return dto;
|
||||
}
|
||||
|
||||
public DatasetGroupInfoDTO get(Long id, String type) throws Exception {
|
||||
public DatasetGroupInfoDTO getDatasetGroupInfoDTO(Long id, String type) throws Exception {
|
||||
CoreDatasetGroup coreDatasetGroup = coreDatasetGroupMapper.selectById(id);
|
||||
if (coreDatasetGroup == null) {
|
||||
return null;
|
||||
|
||||
@ -212,7 +212,7 @@ public class DatasetTableFieldManage {
|
||||
}
|
||||
|
||||
public Map<String, List<DatasetTableFieldDTO>> copilotFields(Long id) throws Exception {
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.get(id, null);
|
||||
DatasetGroupInfoDTO datasetGroupInfoDTO = datasetGroupManage.getDatasetGroupInfoDTO(id, null);
|
||||
Map<String, Object> sqlMap = datasetSQLManage.getUnionSQLForEdit(datasetGroupInfoDTO, null);
|
||||
Map<Long, DatasourceSchemaDTO> dsMap = (Map<Long, DatasourceSchemaDTO>) sqlMap.get("dsMap");
|
||||
boolean crossDs = Utils.isCrossDs(dsMap);
|
||||
|
||||
@ -73,6 +73,11 @@ public class DatasetDataServer implements DatasetDataApi {
|
||||
return datasetDataManage.getDatasetTotal(datasetGroupInfoDTO.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long getDatasetTotal(DatasetGroupInfoDTO datasetGroupInfoDTO) throws Exception {
|
||||
return datasetDataManage.getDatasetCountWithWhere(datasetGroupInfoDTO.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BaseTreeNodeDTO> getFieldValueTree(MultFieldValuesRequest multFieldValuesRequest) throws Exception {
|
||||
try {
|
||||
|
||||
@ -77,7 +77,7 @@ public class DatasetTreeServer implements DatasetTreeApi {
|
||||
|
||||
@Override
|
||||
public DatasetGroupInfoDTO get(Long id) throws Exception {
|
||||
return datasetGroupManage.get(id, "preview");
|
||||
return datasetGroupManage.getDatasetGroupInfoDTO(id, "preview");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -337,9 +337,6 @@ public class CalciteProvider extends Provider {
|
||||
case ck:
|
||||
configuration = JsonUtil.parseObject(coreDatasource.getConfiguration(), CK.class);
|
||||
break;
|
||||
case h2:
|
||||
configuration = JsonUtil.parseObject(coreDatasource.getConfiguration(), H2.class);
|
||||
break;
|
||||
default:
|
||||
configuration = JsonUtil.parseObject(coreDatasource.getConfiguration(), Mysql.class);
|
||||
}
|
||||
|
||||
@ -208,6 +208,7 @@ public class DatasourceServer implements DatasourceApi {
|
||||
}
|
||||
CoreDatasource datasource = datasourceMapper.selectById(dataSourceDTO.getId());
|
||||
datasource.setName(dataSourceDTO.getName());
|
||||
dataSourceDTO.setPid(datasource.getPid());
|
||||
dataSourceManage.checkName(dataSourceDTO);
|
||||
dataSourceManage.innerEdit(datasource);
|
||||
return dataSourceDTO;
|
||||
|
||||
@ -71,6 +71,8 @@ public class SQLConstants {
|
||||
|
||||
public static final String WHERE_VALUE_VALUE = "'%s'";
|
||||
|
||||
public static final String WHERE_VALUE_VALUE_CH = "N'%s'";
|
||||
|
||||
public static final String WHERE_NUMBER_VALUE = "%s";
|
||||
|
||||
public static final String AGG_COUNT = "COUNT(*)";
|
||||
|
||||
@ -17,6 +17,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
@ -135,7 +136,11 @@ public class CustomWhere2Str {
|
||||
|
||||
if (StringUtils.equalsIgnoreCase(item.getFilterType(), "enum")) {
|
||||
if (ObjectUtils.isNotEmpty(item.getEnumValue())) {
|
||||
res = "(" + whereName + " IN ('" + String.join("','", item.getEnumValue()) + "'))";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
res = "(" + whereName + " IN (" + item.getEnumValue().stream().map(str -> "N" + "'" + str + "'").collect(Collectors.joining(",")) + "))";
|
||||
} else {
|
||||
res = "(" + whereName + " IN ('" + String.join("','", item.getEnumValue()) + "'))";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (field.getDeType() == 1 && isCross) {
|
||||
@ -156,18 +161,26 @@ public class CustomWhere2Str {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "not_empty")) {
|
||||
whereValue = "''";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = "(" + Arrays.stream(value.split(",")).map(str -> "N" + "'" + str + "'").collect(Collectors.joining(",")) + ")";
|
||||
} else {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = "N'%" + value + "%'";
|
||||
} else {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}
|
||||
} else {
|
||||
// 如果是时间字段过滤,当条件是等于和不等于的时候转换成between和not between
|
||||
if (field.getDeType() == 1) {
|
||||
// 如果是动态时间,计算具体值
|
||||
value = fixValue(item);
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " = ")) {
|
||||
whereTerm = " BETWEEN ";
|
||||
// 把value类似过滤组件处理,获得start time和end time
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (isCross) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_BETWEEN, stringLongMap.get("startTime"), stringLongMap.get("endTime"));
|
||||
} else {
|
||||
@ -175,20 +188,35 @@ public class CustomWhere2Str {
|
||||
}
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " <> ")) {
|
||||
whereTerm = " NOT BETWEEN ";
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (isCross) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_BETWEEN, stringLongMap.get("startTime"), stringLongMap.get("endTime"));
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
|
||||
}
|
||||
} else {
|
||||
Long startTime = stringLongMap.get("startTime");
|
||||
Long endTime = stringLongMap.get("endTime");
|
||||
if (isCross) {
|
||||
value = Utils.allDateFormat2Long(value) + "";
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " > ") || StringUtils.equalsIgnoreCase(whereTerm, " <= ")) {
|
||||
value = endTime + "";
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " >= ") || StringUtils.equalsIgnoreCase(whereTerm, " < ")) {
|
||||
value = startTime + "";
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " > ") || StringUtils.equalsIgnoreCase(whereTerm, " <= ")) {
|
||||
value = Utils.transLong2Str(endTime);
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " >= ") || StringUtils.equalsIgnoreCase(whereTerm, " < ")) {
|
||||
value = Utils.transLong2Str(startTime);
|
||||
}
|
||||
}
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
SQLObj build = SQLObj.builder()
|
||||
|
||||
@ -13,10 +13,8 @@ import io.dataease.extensions.view.dto.ChartExtFilterDTO;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
@ -129,10 +127,18 @@ public class ExtWhere2Str {
|
||||
if (value.contains(SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "', '')" + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
if (StringUtils.equalsIgnoreCase(request.getDatasetTableField().getType(), "NVARCHAR")) {
|
||||
whereValue = "(" + value.stream().map(str -> "N" + "'" + str + "'").collect(Collectors.joining(",")) + ")";
|
||||
} else {
|
||||
whereValue = "('" + StringUtils.join(value, "','") + "')";
|
||||
}
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "like")) {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
if (StringUtils.equalsIgnoreCase(request.getDatasetTableField().getType(), "NVARCHAR")) {
|
||||
whereValue = "N'%" + value.get(0) + "%'";
|
||||
} else {
|
||||
whereValue = "'%" + value.get(0) + "%'";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||
if (request.getDatasetTableField().getDeType() == 1) {
|
||||
if (request.getDatasetTableField().getDeExtractType() == 2
|
||||
@ -159,7 +165,11 @@ public class ExtWhere2Str {
|
||||
if (StringUtils.equals(value.get(0), SQLConstants.EMPTY_SIGN)) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, "") + " or " + whereName + " is null ";
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
if (StringUtils.equalsIgnoreCase(request.getDatasetTableField().getType(), "NVARCHAR")) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||
}
|
||||
}
|
||||
}
|
||||
list.add(SQLObj.builder()
|
||||
|
||||
@ -18,6 +18,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author Junjun
|
||||
@ -148,7 +149,11 @@ public class WhereTree2Str {
|
||||
|
||||
if (StringUtils.equalsIgnoreCase(item.getFilterType(), "enum")) {
|
||||
if (CollectionUtils.isNotEmpty(item.getEnumValue())) {
|
||||
res = "(" + whereName + " IN ('" + String.join("','", item.getEnumValue()) + "'))";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
res = "(" + whereName + " IN (" + item.getEnumValue().stream().map(str -> "N" + "'" + str + "'").collect(Collectors.joining(",")) + "))";
|
||||
} else {
|
||||
res = "(" + whereName + " IN ('" + String.join("','", item.getEnumValue()) + "'))";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
String value = item.getValue();
|
||||
@ -168,16 +173,24 @@ public class WhereTree2Str {
|
||||
} else if (StringUtils.equalsIgnoreCase(item.getTerm(), "not_empty")) {
|
||||
whereValue = "''";
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "in") || StringUtils.containsIgnoreCase(item.getTerm(), "not in")) {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = "(" + Arrays.stream(value.split(",")).map(str -> "N" + "'" + str + "'").collect(Collectors.joining(",")) + ")";
|
||||
} else {
|
||||
whereValue = "('" + String.join("','", value.split(",")) + "')";
|
||||
}
|
||||
} else if (StringUtils.containsIgnoreCase(item.getTerm(), "like")) {
|
||||
whereValue = "'%" + value + "%'";
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = "N'%" + value + "%'";
|
||||
} else {
|
||||
whereValue = "'%" + value + "%'";
|
||||
}
|
||||
} else {
|
||||
// 如果是时间字段过滤,当条件是等于和不等于的时候转换成between和not between
|
||||
if (field.getDeType() == 1) {
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " = ")) {
|
||||
whereTerm = " BETWEEN ";
|
||||
// 把value类似过滤组件处理,获得start time和end time
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (isCross) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_BETWEEN, stringLongMap.get("startTime"), stringLongMap.get("endTime"));
|
||||
} else {
|
||||
@ -185,20 +198,35 @@ public class WhereTree2Str {
|
||||
}
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " <> ")) {
|
||||
whereTerm = " NOT BETWEEN ";
|
||||
Map<String, Long> stringLongMap = Utils.parseDateTimeValue(value);
|
||||
if (isCross) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_BETWEEN, stringLongMap.get("startTime"), stringLongMap.get("endTime"));
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_BETWEEN, Utils.transLong2Str(stringLongMap.get("startTime")), Utils.transLong2Str(stringLongMap.get("endTime")));
|
||||
}
|
||||
} else {
|
||||
Long startTime = stringLongMap.get("startTime");
|
||||
Long endTime = stringLongMap.get("endTime");
|
||||
if (isCross) {
|
||||
value = Utils.allDateFormat2Long(value) + "";
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " > ") || StringUtils.equalsIgnoreCase(whereTerm, " <= ")) {
|
||||
value = endTime + "";
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " >= ") || StringUtils.equalsIgnoreCase(whereTerm, " < ")) {
|
||||
value = startTime + "";
|
||||
}
|
||||
} else {
|
||||
if (StringUtils.equalsIgnoreCase(whereTerm, " > ") || StringUtils.equalsIgnoreCase(whereTerm, " <= ")) {
|
||||
value = Utils.transLong2Str(endTime);
|
||||
} else if (StringUtils.equalsIgnoreCase(whereTerm, " >= ") || StringUtils.equalsIgnoreCase(whereTerm, " < ")) {
|
||||
value = Utils.transLong2Str(startTime);
|
||||
}
|
||||
}
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
if (StringUtils.equalsIgnoreCase(field.getType(), "NVARCHAR")) {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE_CH, value);
|
||||
} else {
|
||||
whereValue = String.format(SQLConstants.WHERE_VALUE_VALUE, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
SQLObj build = SQLObj.builder().whereField(whereName).whereTermAndValue(whereTerm + whereValue).build();
|
||||
|
||||
@ -10,11 +10,10 @@ import io.dataease.api.chart.request.ChartExcelRequestInner;
|
||||
import io.dataease.api.dataset.dto.DataSetExportRequest;
|
||||
import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
|
||||
import io.dataease.api.dataset.union.UnionDTO;
|
||||
import io.dataease.extensions.datasource.api.PluginManageApi;
|
||||
import io.dataease.extensions.view.dto.DatasetRowPermissionsTreeObj;
|
||||
import io.dataease.license.manage.F2CLicLimitedManage;
|
||||
import io.dataease.model.ExportTaskDTO;
|
||||
import io.dataease.api.export.BaseExportApi;
|
||||
import io.dataease.api.permissions.dataset.dto.DataSetRowPermissionsTreeDTO;
|
||||
import io.dataease.api.xpack.dataFilling.DataFillingApi;
|
||||
import io.dataease.api.xpack.dataFilling.dto.DataFillFormTableDataRequest;
|
||||
import io.dataease.auth.bo.TokenUserBO;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.server.ChartDataServer;
|
||||
@ -22,7 +21,6 @@ import io.dataease.dataset.dao.auto.entity.CoreDatasetGroup;
|
||||
import io.dataease.dataset.dao.auto.mapper.CoreDatasetGroupMapper;
|
||||
import io.dataease.dataset.manage.*;
|
||||
import io.dataease.datasource.utils.DatasourceUtils;
|
||||
import io.dataease.engine.constant.DeTypeConstants;
|
||||
import io.dataease.engine.sql.SQLProvider;
|
||||
import io.dataease.engine.trans.Field2SQLObj;
|
||||
import io.dataease.engine.trans.Order2SQLObj;
|
||||
@ -32,6 +30,7 @@ import io.dataease.engine.utils.Utils;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.exportCenter.dao.auto.entity.CoreExportTask;
|
||||
import io.dataease.exportCenter.dao.auto.mapper.CoreExportTaskMapper;
|
||||
import io.dataease.extensions.datasource.api.PluginManageApi;
|
||||
import io.dataease.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import io.dataease.extensions.datasource.dto.DatasourceRequest;
|
||||
import io.dataease.extensions.datasource.dto.DatasourceSchemaDTO;
|
||||
@ -39,8 +38,11 @@ import io.dataease.extensions.datasource.factory.ProviderFactory;
|
||||
import io.dataease.extensions.datasource.model.SQLMeta;
|
||||
import io.dataease.extensions.datasource.provider.Provider;
|
||||
import io.dataease.extensions.view.dto.ColumnPermissionItem;
|
||||
import io.dataease.extensions.view.dto.DatasetRowPermissionsTreeObj;
|
||||
import io.dataease.i18n.Translator;
|
||||
import io.dataease.license.config.XpackInteract;
|
||||
import io.dataease.license.manage.F2CLicLimitedManage;
|
||||
import io.dataease.model.ExportTaskDTO;
|
||||
import io.dataease.system.manage.CoreUserManage;
|
||||
import io.dataease.system.manage.SysParameterManage;
|
||||
import io.dataease.utils.*;
|
||||
@ -72,7 +74,7 @@ import java.util.stream.Collectors;
|
||||
|
||||
@Component
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class ExportCenterManage {
|
||||
public class ExportCenterManage implements BaseExportApi {
|
||||
@Resource
|
||||
private CoreExportTaskMapper exportTaskMapper;
|
||||
@Resource
|
||||
@ -117,6 +119,13 @@ public class ExportCenterManage {
|
||||
@Resource
|
||||
private DatasetDataManage datasetDataManage;
|
||||
|
||||
@Autowired(required = false)
|
||||
private DataFillingApi dataFillingApi = null;
|
||||
|
||||
private DataFillingApi getDataFillingApi() {
|
||||
return dataFillingApi;
|
||||
}
|
||||
|
||||
@Resource(name = "f2CLicLimitedManage")
|
||||
private F2CLicLimitedManage f2CLicLimitedManage;
|
||||
|
||||
@ -234,6 +243,10 @@ public class ExportCenterManage {
|
||||
DataSetExportRequest request = JsonUtil.parseObject(exportTask.getParams(), DataSetExportRequest.class);
|
||||
startDatasetTask(exportTask, request);
|
||||
}
|
||||
if (exportTask.getExportFromType().equalsIgnoreCase("data_filling")) {
|
||||
HashMap request = JsonUtil.parseObject(exportTask.getParams(), HashMap.class);
|
||||
startDataFillingTask(exportTask, request);
|
||||
}
|
||||
}
|
||||
|
||||
public List<ExportTaskDTO> exportTasks(String status) {
|
||||
@ -279,6 +292,13 @@ public class ExportCenterManage {
|
||||
List<String> finalFullName = fullName;
|
||||
exportTaskDTO.setExportFromName(String.join("/", finalFullName));
|
||||
}
|
||||
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("data_filling")) {
|
||||
List<String> fullName = new ArrayList<>();
|
||||
getDataFillingApi().geFullName(Long.valueOf(exportTaskDTO.getExportFrom()), fullName);
|
||||
Collections.reverse(fullName);
|
||||
List<String> finalFullName = fullName;
|
||||
exportTaskDTO.setExportFromName(String.join("/", finalFullName));
|
||||
}
|
||||
}
|
||||
|
||||
private void setExportFromName(ExportTaskDTO exportTaskDTO) {
|
||||
@ -288,6 +308,9 @@ public class ExportCenterManage {
|
||||
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("dataset")) {
|
||||
exportTaskDTO.setExportFromName(coreDatasetGroupMapper.selectById(exportTaskDTO.getExportFrom()).getName());
|
||||
}
|
||||
if (exportTaskDTO.getExportFromType().equalsIgnoreCase("data_filling")) {
|
||||
exportTaskDTO.setExportFromName(getDataFillingApi().get(Long.parseLong(exportTaskDTO.getExportFrom())).getName());
|
||||
}
|
||||
}
|
||||
|
||||
private String hostName() {
|
||||
@ -333,6 +356,65 @@ public class ExportCenterManage {
|
||||
startDatasetTask(exportTask, request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addTask(String exportFromId, String exportFromType, HashMap<String, Object> request, Long userId, Long org) {
|
||||
CoreExportTask exportTask = new CoreExportTask();
|
||||
request.put("org", org);
|
||||
exportTask.setId(UUID.randomUUID().toString());
|
||||
exportTask.setUserId(userId);
|
||||
exportTask.setExportFrom(exportFromId);
|
||||
exportTask.setExportFromType(exportFromType);
|
||||
exportTask.setExportStatus("PENDING");
|
||||
exportTask.setFileName(request.get("name") + ".xlsx");
|
||||
exportTask.setExportProgress("0");
|
||||
exportTask.setExportTime(System.currentTimeMillis());
|
||||
exportTask.setParams(JsonUtil.toJSONString(request).toString());
|
||||
exportTask.setExportMachineName(hostName());
|
||||
exportTaskMapper.insert(exportTask);
|
||||
if (StringUtils.equals(exportFromType, "data_filling")) {
|
||||
startDataFillingTask(exportTask, request);
|
||||
}
|
||||
}
|
||||
|
||||
private void startDataFillingTask(CoreExportTask exportTask, HashMap<String, Object> request) {
|
||||
|
||||
if (ObjectUtils.isEmpty(getDataFillingApi())) {
|
||||
return;
|
||||
}
|
||||
|
||||
String dataPath = exportData_path + exportTask.getId();
|
||||
File directory = new File(dataPath);
|
||||
boolean isCreated = directory.mkdir();
|
||||
TokenUserBO tokenUserBO = AuthUtils.getUser();
|
||||
Future future = scheduledThreadPoolExecutor.submit(() -> {
|
||||
AuthUtils.setUser(tokenUserBO);
|
||||
try {
|
||||
exportTask.setExportStatus("IN_PROGRESS");
|
||||
exportTaskMapper.updateById(exportTask);
|
||||
|
||||
getDataFillingApi().writeExcel(dataPath + "/" + exportTask.getFileName(),
|
||||
new DataFillFormTableDataRequest()
|
||||
.setId(Long.parseLong(exportTask.getExportFrom()))
|
||||
.setWithoutLogs(true)
|
||||
, exportTask.getUserId(), Long.parseLong(request.get("org").toString()));
|
||||
|
||||
|
||||
exportTask.setExportProgress("100");
|
||||
exportTask.setExportStatus("SUCCESS");
|
||||
|
||||
setFileSize(dataPath + "/" + exportTask.getFileName(), exportTask);
|
||||
} catch (Exception e) {
|
||||
exportTask.setMsg(e.getMessage());
|
||||
LogUtil.error("Failed to export data", e);
|
||||
exportTask.setExportStatus("FAILED");
|
||||
} finally {
|
||||
exportTaskMapper.updateById(exportTask);
|
||||
}
|
||||
});
|
||||
Running_Task.put(exportTask.getId(), future);
|
||||
}
|
||||
|
||||
|
||||
private void startDatasetTask(CoreExportTask exportTask, DataSetExportRequest request) {
|
||||
String dataPath = exportData_path + exportTask.getId();
|
||||
File directory = new File(dataPath);
|
||||
|
||||
@ -5,17 +5,20 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* 跳转配置表
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2023-09-22
|
||||
* @since 2024-09-19
|
||||
*/
|
||||
@TableName("visualization_link_jump_info")
|
||||
public class VisualizationLinkJumpInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
@ -33,6 +36,11 @@ public class VisualizationLinkJumpInfo implements Serializable {
|
||||
*/
|
||||
private String jumpType;
|
||||
|
||||
/**
|
||||
* 窗口大小large middle small
|
||||
*/
|
||||
private String windowSize;
|
||||
|
||||
/**
|
||||
* 关联仪表板ID
|
||||
*/
|
||||
@ -58,8 +66,14 @@ public class VisualizationLinkJumpInfo implements Serializable {
|
||||
*/
|
||||
private Boolean attachParams;
|
||||
|
||||
/**
|
||||
* 复制来源
|
||||
*/
|
||||
private Long copyFrom;
|
||||
|
||||
/**
|
||||
* 复制来源ID
|
||||
*/
|
||||
private Long copyId;
|
||||
|
||||
public Long getId() {
|
||||
@ -94,6 +108,14 @@ public class VisualizationLinkJumpInfo implements Serializable {
|
||||
this.jumpType = jumpType;
|
||||
}
|
||||
|
||||
public String getWindowSize() {
|
||||
return windowSize;
|
||||
}
|
||||
|
||||
public void setWindowSize(String windowSize) {
|
||||
this.windowSize = windowSize;
|
||||
}
|
||||
|
||||
public Long getTargetDvId() {
|
||||
return targetDvId;
|
||||
}
|
||||
@ -157,6 +179,7 @@ public class VisualizationLinkJumpInfo implements Serializable {
|
||||
", linkJumpId = " + linkJumpId +
|
||||
", linkType = " + linkType +
|
||||
", jumpType = " + jumpType +
|
||||
", windowSize = " + windowSize +
|
||||
", targetDvId = " + targetDvId +
|
||||
", sourceFieldId = " + sourceFieldId +
|
||||
", content = " + content +
|
||||
|
||||
@ -6,11 +6,11 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* 跳转配置表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author fit2cloud
|
||||
* @since 2023-09-22
|
||||
* @since 2024-09-19
|
||||
*/
|
||||
@Mapper
|
||||
public interface VisualizationLinkJumpInfoMapper extends BaseMapper<VisualizationLinkJumpInfo> {
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package io.dataease.visualization.manage;
|
||||
|
||||
import io.dataease.dataset.manage.DatasetGroupManage;
|
||||
import io.dataease.datasource.manage.DataSourceManage;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
import io.dataease.model.BusiNodeVO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component("coreBusiManage")
|
||||
public class CoreBusiManage {
|
||||
|
||||
@Resource
|
||||
private CoreVisualizationManage coreVisualizationManage;
|
||||
|
||||
@Resource
|
||||
private DataSourceManage dataSourceManage;
|
||||
|
||||
@Resource
|
||||
private DatasetGroupManage datasetGroupManage;
|
||||
|
||||
public Map<String, List<BusiNodeVO>> interactiveTree(Map<String, BusiNodeRequest> requestMap) {
|
||||
Map<String, List<BusiNodeVO>> result = new HashMap<>();
|
||||
for (Map.Entry<String, BusiNodeRequest> entry : requestMap.entrySet()) {
|
||||
BusiNodeRequest busiNodeRequest = entry.getValue();
|
||||
String key = entry.getKey();
|
||||
if (StringUtils.equalsIgnoreCase(key, "datasource")) {
|
||||
result.put(key, dataSourceManage.tree(busiNodeRequest));
|
||||
} else if (StringUtils.equalsIgnoreCase(key, "dataset")) {
|
||||
result.put(key, datasetGroupManage.tree(busiNodeRequest));
|
||||
} else if (StringUtils.equalsAnyIgnoreCase(key, "dashboard", "dataV")) {
|
||||
result.put(key, coreVisualizationManage.tree(busiNodeRequest));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -8,7 +8,6 @@ import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.dataset.server.DatasetFieldServer;
|
||||
import io.dataease.engine.constant.DeTypeConstants;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import io.dataease.extensions.view.dto.ChartExtFilterDTO;
|
||||
import io.dataease.extensions.view.dto.ChartExtRequest;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
@ -50,6 +49,12 @@ public class CoreVisualizationExportManage {
|
||||
@Resource
|
||||
private DatasetFieldServer datasetFieldServer;
|
||||
|
||||
public String getResourceName(Long dvId, String busiFlag) {
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag);
|
||||
if (ObjectUtils.isEmpty(visualization)) DEException.throwException("资源不存在或已经被删除...");
|
||||
return visualization.getName();
|
||||
}
|
||||
|
||||
public File exportExcel(Long dvId, String busiFlag, List<Long> viewIdList, boolean onlyDisplay) throws Exception {
|
||||
DataVisualizationVO visualization = extDataVisualizationMapper.findDvInfo(dvId, busiFlag);
|
||||
if (ObjectUtils.isEmpty(visualization)) DEException.throwException("资源不存在或已经被删除...");
|
||||
@ -73,27 +78,14 @@ public class CoreVisualizationExportManage {
|
||||
}
|
||||
view.getChartExtRequest().setUser(AuthUtils.getUser().getUserId());
|
||||
view.setTitle((i + 1) + "-" + view.getTitle());
|
||||
sheets.add(exportViewData(view));
|
||||
sheets.addAll(exportViewData(view));
|
||||
}
|
||||
|
||||
return VisualizationExcelUtils.exportExcel(sheets, visualization.getName(), visualization.getId().toString());
|
||||
}
|
||||
|
||||
private ExcelSheetModel exportViewData(ChartViewDTO request) {
|
||||
private ExcelSheetModel exportSingleData(Map<String, Object> chart, String title) {
|
||||
ExcelSheetModel result = new ExcelSheetModel();
|
||||
ChartViewDTO chartViewDTO = null;
|
||||
if (CommonConstants.VIEW_DATA_FROM.TEMPLATE.equalsIgnoreCase(request.getDataFrom())) {
|
||||
chartViewDTO = extendDataManage.getChartDataInfo(request.getId(), request);
|
||||
} else {
|
||||
try {
|
||||
chartViewDTO = chartDataManage.calcData(request);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
String title = chartViewDTO.getTitle();
|
||||
Map<String, Object> chart = chartViewDTO.getData();
|
||||
|
||||
Object objectFields = chart.get("fields");
|
||||
List<ChartViewFieldDTO> fields = (List<ChartViewFieldDTO>) objectFields;
|
||||
List<String> heads = new ArrayList<>();
|
||||
@ -116,6 +108,9 @@ public class CoreVisualizationExportManage {
|
||||
});
|
||||
}
|
||||
Object objectTableRow = chart.get("tableRow");
|
||||
if (objectTableRow == null) {
|
||||
objectTableRow = chart.get("sourceData");
|
||||
}
|
||||
List<Map<String, Object>> tableRow = (List<Map<String, Object>>) objectTableRow;
|
||||
|
||||
List<List<String>> details = tableRow.stream().map(row -> {
|
||||
@ -140,6 +135,40 @@ public class CoreVisualizationExportManage {
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<ExcelSheetModel> exportViewData(ChartViewDTO request) {
|
||||
|
||||
ChartViewDTO chartViewDTO = null;
|
||||
request.setIsExcelExport(true);
|
||||
if (CommonConstants.VIEW_DATA_FROM.TEMPLATE.equalsIgnoreCase(request.getDataFrom())) {
|
||||
chartViewDTO = extendDataManage.getChartDataInfo(request.getId(), request);
|
||||
} else {
|
||||
try {
|
||||
chartViewDTO = chartDataManage.calcData(request);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
String title = chartViewDTO.getTitle();
|
||||
Map<String, Object> chart = chartViewDTO.getData();
|
||||
List<ExcelSheetModel> resultList = new ArrayList<>();
|
||||
boolean leftExist = ObjectUtils.isNotEmpty(chart.get("left"));
|
||||
boolean rightExist = ObjectUtils.isNotEmpty(chart.get("right"));
|
||||
if (!leftExist && !rightExist) {
|
||||
ExcelSheetModel sheetModel = exportSingleData(chart, title);
|
||||
resultList.add(sheetModel);
|
||||
return resultList;
|
||||
}
|
||||
if (leftExist) {
|
||||
ExcelSheetModel sheetModel = exportSingleData((Map<String, Object>) chart.get("left"), title + "_left");
|
||||
resultList.add(sheetModel);
|
||||
}
|
||||
if (rightExist) {
|
||||
ExcelSheetModel sheetModel = exportSingleData((Map<String, Object>) chart.get("right"), title + "_right");
|
||||
resultList.add(sheetModel);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
private String filterInvalidDecimal(String sourceNumberStr) {
|
||||
if (StringUtils.isNotBlank(sourceNumberStr) && StringUtils.contains(sourceNumberStr, ".")) {
|
||||
sourceNumberStr = sourceNumberStr.replaceAll("0+?$", "");
|
||||
|
||||
@ -3,8 +3,22 @@ package io.dataease.visualization.server;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import io.dataease.api.dataset.union.DatasetGroupInfoDTO;
|
||||
import io.dataease.api.template.dto.TemplateManageFileDTO;
|
||||
import io.dataease.api.template.dto.VisualizationTemplateExtendDataDTO;
|
||||
import io.dataease.api.visualization.DataVisualizationApi;
|
||||
import io.dataease.api.visualization.dto.VisualizationViewTableDTO;
|
||||
import io.dataease.api.visualization.request.DataVisualizationBaseRequest;
|
||||
import io.dataease.api.visualization.request.VisualizationAppExportRequest;
|
||||
import io.dataease.api.visualization.request.VisualizationWorkbranchQueryRequest;
|
||||
import io.dataease.api.visualization.vo.*;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.manage.ChartDataManage;
|
||||
import io.dataease.chart.manage.ChartViewManege;
|
||||
import io.dataease.commons.constants.DataVisualizationConstants;
|
||||
import io.dataease.commons.constants.OptConstants;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.constant.LogOT;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetGroup;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTable;
|
||||
import io.dataease.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
@ -17,23 +31,9 @@ import io.dataease.datasource.dao.auto.entity.CoreDatasource;
|
||||
import io.dataease.datasource.dao.auto.mapper.CoreDatasourceMapper;
|
||||
import io.dataease.datasource.provider.ApiUtils;
|
||||
import io.dataease.datasource.provider.ExcelUtils;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.extensions.datasource.vo.DatasourceConfiguration;
|
||||
import io.dataease.extensions.view.dto.ChartViewDTO;
|
||||
import io.dataease.api.template.dto.TemplateManageFileDTO;
|
||||
import io.dataease.api.template.dto.VisualizationTemplateExtendDataDTO;
|
||||
import io.dataease.api.visualization.DataVisualizationApi;
|
||||
import io.dataease.api.visualization.dto.VisualizationViewTableDTO;
|
||||
import io.dataease.api.visualization.request.DataVisualizationBaseRequest;
|
||||
import io.dataease.api.visualization.request.VisualizationWorkbranchQueryRequest;
|
||||
import io.dataease.chart.dao.auto.entity.CoreChartView;
|
||||
import io.dataease.chart.dao.auto.mapper.CoreChartViewMapper;
|
||||
import io.dataease.chart.manage.ChartDataManage;
|
||||
import io.dataease.chart.manage.ChartViewManege;
|
||||
import io.dataease.commons.constants.DataVisualizationConstants;
|
||||
import io.dataease.commons.constants.OptConstants;
|
||||
import io.dataease.constant.CommonConstants;
|
||||
import io.dataease.constant.LogOT;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.license.config.XpackInteract;
|
||||
import io.dataease.log.DeLog;
|
||||
import io.dataease.model.BusiNodeRequest;
|
||||
@ -51,6 +51,7 @@ import io.dataease.visualization.dao.auto.entity.VisualizationWatermark;
|
||||
import io.dataease.visualization.dao.auto.mapper.DataVisualizationInfoMapper;
|
||||
import io.dataease.visualization.dao.auto.mapper.VisualizationWatermarkMapper;
|
||||
import io.dataease.visualization.dao.ext.mapper.ExtDataVisualizationMapper;
|
||||
import io.dataease.visualization.manage.CoreBusiManage;
|
||||
import io.dataease.visualization.manage.CoreVisualizationManage;
|
||||
import io.dataease.visualization.utils.VisualizationUtils;
|
||||
import jakarta.annotation.Resource;
|
||||
@ -128,6 +129,9 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
@Autowired
|
||||
private CoreDatasourceMapper coreDatasourceMapper;
|
||||
|
||||
@Resource
|
||||
private CoreBusiManage coreBusiManage;
|
||||
|
||||
@Override
|
||||
public DataVisualizationVO findCopyResource(Long dvId, String busiFlag) {
|
||||
DataVisualizationVO result = findById(new DataVisualizationBaseRequest(dvId, busiFlag));
|
||||
@ -165,7 +169,17 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
result.setReportFilterInfo(reportFilterInfo);
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(request.getShowWatermark()) && !request.getShowWatermark()) {
|
||||
VisualizationWatermarkVO watermarkInfo = result.getWatermarkInfo();
|
||||
String settingContent = null;
|
||||
if (ObjectUtils.isNotEmpty(watermarkInfo) && StringUtils.isNotBlank(settingContent = watermarkInfo.getSettingContent())) {
|
||||
Map map = JsonUtil.parse(settingContent, Map.class);
|
||||
map.put("enable", false);
|
||||
settingContent = JsonUtil.toJSONString(map).toString();
|
||||
watermarkInfo.setSettingContent(settingContent);
|
||||
result.setWatermarkInfo(watermarkInfo);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
DEException.throwException("资源不存在或已经被删除...");
|
||||
@ -176,44 +190,44 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
@DeLog(id = "#p0.id", pid = "#p0.pid", ot = LogOT.CREATE, stExp = "#p0.type")
|
||||
@Override
|
||||
@Transactional
|
||||
public String saveCanvas(DataVisualizationBaseRequest request) throws Exception{
|
||||
public String saveCanvas(DataVisualizationBaseRequest request) throws Exception {
|
||||
boolean isAppSave = false;
|
||||
Long time = System.currentTimeMillis();
|
||||
// 如果是应用 则新进行应用校验 数据集名称和 数据源名称校验
|
||||
VisualizationExport2AppVO appData = request.getAppData();
|
||||
Map<Long,Long> dsGroupIdMap = new HashMap<>();
|
||||
Map<Long, Long> dsGroupIdMap = new HashMap<>();
|
||||
List<DatasetGroupInfoDTO> newDsGroupInfo = new ArrayList<>();
|
||||
Map<Long,Long> dsTableIdMap = new HashMap<>();
|
||||
Map<Long,Long> dsTableFieldsIdMap = new HashMap<>();
|
||||
Map<Long, Long> dsTableIdMap = new HashMap<>();
|
||||
Map<Long, Long> dsTableFieldsIdMap = new HashMap<>();
|
||||
List<CoreDatasetTableField> dsTableFieldsList = new ArrayList();
|
||||
Map<Long,Long> datasourceIdMap = new HashMap<>();
|
||||
Map<Long,Map<String,String>> dsTableNamesMap = new HashMap<>();
|
||||
Map<Long, Long> datasourceIdMap = new HashMap<>();
|
||||
Map<Long, Map<String, String>> dsTableNamesMap = new HashMap<>();
|
||||
List<Long> newDatasourceId = new ArrayList<>();
|
||||
if(appData != null){
|
||||
if (appData != null) {
|
||||
isAppSave = true;
|
||||
try {
|
||||
List<AppCoreDatasourceVO> appCoreDatasourceVO = appData.getDatasourceInfo();
|
||||
List<AppCoreDatasourceVO> appCoreDatasourceVO = appData.getDatasourceInfo();
|
||||
|
||||
// app 数据源 excel 表名映射
|
||||
appCoreDatasourceVO.forEach(datasourceOld ->{
|
||||
appCoreDatasourceVO.forEach(datasourceOld -> {
|
||||
newDatasourceId.add(datasourceOld.getSystemDatasourceId());
|
||||
// Excel 数据表明映射
|
||||
if (StringUtils.isNotEmpty(datasourceOld.getConfiguration())) {
|
||||
if( datasourceOld.getType().equals(DatasourceConfiguration.DatasourceType.Excel.name())){
|
||||
dsTableNamesMap.put(datasourceOld.getId(),ExcelUtils.getTableNamesMap(datasourceOld.getConfiguration()));
|
||||
}else if(datasourceOld.getType().equals(DatasourceConfiguration.DatasourceType.API.name())){
|
||||
if (datasourceOld.getType().equals(DatasourceConfiguration.DatasourceType.Excel.name())) {
|
||||
dsTableNamesMap.put(datasourceOld.getId(), ExcelUtils.getTableNamesMap(datasourceOld.getConfiguration()));
|
||||
} else if (datasourceOld.getType().equals(DatasourceConfiguration.DatasourceType.API.name())) {
|
||||
dsTableNamesMap.put(datasourceOld.getId(), ApiUtils.getTableNamesMap(datasourceOld.getConfiguration()));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
List<CoreDatasource> systemDatasource = coreDatasourceMapper.selectBatchIds(newDatasourceId);
|
||||
systemDatasource.forEach(datasourceNew ->{
|
||||
systemDatasource.forEach(datasourceNew -> {
|
||||
// Excel 数据表明映射
|
||||
if (StringUtils.isNotEmpty(datasourceNew.getConfiguration())) {
|
||||
if(datasourceNew.getType().equals(DatasourceConfiguration.DatasourceType.Excel.name())){
|
||||
dsTableNamesMap.put(datasourceNew.getId(),ExcelUtils.getTableNamesMap(datasourceNew.getConfiguration()));
|
||||
}else if(datasourceNew.getType().equals(DatasourceConfiguration.DatasourceType.API.name())){
|
||||
if (datasourceNew.getType().equals(DatasourceConfiguration.DatasourceType.Excel.name())) {
|
||||
dsTableNamesMap.put(datasourceNew.getId(), ExcelUtils.getTableNamesMap(datasourceNew.getConfiguration()));
|
||||
} else if (datasourceNew.getType().equals(DatasourceConfiguration.DatasourceType.API.name())) {
|
||||
dsTableNamesMap.put(datasourceNew.getId(), ApiUtils.getTableNamesMap(datasourceNew.getConfiguration()));
|
||||
}
|
||||
}
|
||||
@ -244,7 +258,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
datasetNewRequest.setPid(datasetFolderNewId);
|
||||
try {
|
||||
newDsGroupInfo.add(datasetNewRequest);
|
||||
dsGroupIdMap.put(oldId,newId);
|
||||
dsGroupIdMap.put(oldId, newId);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -256,56 +270,56 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
Long oldId = appCoreDatasetTableVO.getId();
|
||||
Long newId = IDUtils.snowID();
|
||||
CoreDatasetTable datasetTable = new CoreDatasetTable();
|
||||
BeanUtils.copyBean(datasetTable,appCoreDatasetTableVO);
|
||||
BeanUtils.copyBean(datasetTable, appCoreDatasetTableVO);
|
||||
datasetTable.setDatasetGroupId(dsGroupIdMap.get(datasetTable.getDatasetGroupId()));
|
||||
datasetTable.setId(newId);
|
||||
datasetTable.setDatasourceId(datasourceIdMap.get(datasetTable.getDatasourceId()));
|
||||
coreDatasetTableMapper.insert(datasetTable);
|
||||
dsTableIdMap.put(oldId,newId);
|
||||
dsTableIdMap.put(oldId, newId);
|
||||
|
||||
});
|
||||
// 新建数据字段
|
||||
appData.getDatasetTableFieldsInfo().forEach( appDsTableFields ->{
|
||||
appData.getDatasetTableFieldsInfo().forEach(appDsTableFields -> {
|
||||
Long oldId = appDsTableFields.getId();
|
||||
Long newId = IDUtils.snowID();
|
||||
CoreDatasetTableField dsDsField = new CoreDatasetTableField();
|
||||
BeanUtils.copyBean(dsDsField,appDsTableFields);
|
||||
BeanUtils.copyBean(dsDsField, appDsTableFields);
|
||||
dsDsField.setDatasetGroupId(dsGroupIdMap.get(dsDsField.getDatasetGroupId()));
|
||||
dsDsField.setDatasetTableId(dsTableIdMap.get(dsDsField.getDatasetTableId()));
|
||||
dsDsField.setDatasourceId(datasourceIdMap.get(dsDsField.getDatasourceId()));
|
||||
dsDsField.setId(newId);
|
||||
dsTableFieldsList.add(dsDsField);
|
||||
dsTableFieldsIdMap.put(oldId,newId);
|
||||
dsTableFieldsIdMap.put(oldId, newId);
|
||||
});
|
||||
|
||||
// dsTableFields 中存在计算字段在OriginName中 也需要替换
|
||||
dsTableFieldsList.forEach(dsTableFields ->{
|
||||
dsTableFieldsIdMap.forEach((key,value) ->{
|
||||
dsTableFields.setOriginName(dsTableFields.getOriginName().replaceAll(key.toString(),value.toString()));
|
||||
dsTableFieldsList.forEach(dsTableFields -> {
|
||||
dsTableFieldsIdMap.forEach((key, value) -> {
|
||||
dsTableFields.setOriginName(dsTableFields.getOriginName().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
coreDatasetTableFieldMapper.insert(dsTableFields);
|
||||
});
|
||||
|
||||
|
||||
// 持久化数据集
|
||||
newDsGroupInfo.forEach(dsGroup ->{
|
||||
dsTableIdMap.forEach((key,value) ->{
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(),value.toString()));
|
||||
newDsGroupInfo.forEach(dsGroup -> {
|
||||
dsTableIdMap.forEach((key, value) -> {
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
|
||||
dsTableFieldsIdMap.forEach((key,value) ->{
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(),value.toString()));
|
||||
dsTableFieldsIdMap.forEach((key, value) -> {
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
|
||||
datasourceIdMap.forEach((key,value) ->{
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(),value.toString()));
|
||||
datasourceIdMap.forEach((key, value) -> {
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(key.toString(), value.toString()));
|
||||
//表名映射更新
|
||||
Map<String,String> appDsTableNamesMap = dsTableNamesMap.get(key);
|
||||
Map<String,String> systemDsTableNamesMap = dsTableNamesMap.get(value);
|
||||
if(!CollectionUtils.isEmpty(appDsTableNamesMap) && !CollectionUtils.isEmpty(systemDsTableNamesMap) ){
|
||||
appDsTableNamesMap.forEach((keyName,valueName) ->{
|
||||
if(StringUtils.isNotEmpty(systemDsTableNamesMap.get(keyName))){
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(valueName,systemDsTableNamesMap.get(keyName)));
|
||||
Map<String, String> appDsTableNamesMap = dsTableNamesMap.get(key);
|
||||
Map<String, String> systemDsTableNamesMap = dsTableNamesMap.get(value);
|
||||
if (!CollectionUtils.isEmpty(appDsTableNamesMap) && !CollectionUtils.isEmpty(systemDsTableNamesMap)) {
|
||||
appDsTableNamesMap.forEach((keyName, valueName) -> {
|
||||
if (StringUtils.isNotEmpty(systemDsTableNamesMap.get(keyName))) {
|
||||
dsGroup.setInfo(dsGroup.getInfo().replaceAll(valueName, systemDsTableNamesMap.get(keyName)));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -316,31 +330,31 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
datasetGroupManage.innerSave(dsGroup);
|
||||
});
|
||||
|
||||
}catch (Exception e){
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
DEException.throwException(e);
|
||||
}
|
||||
// 更换主数据内容
|
||||
AtomicReference<String> componentDataStr = new AtomicReference<>(request.getComponentData());
|
||||
dsGroupIdMap.forEach((key,value) ->{
|
||||
dsGroupIdMap.forEach((key, value) -> {
|
||||
componentDataStr.set(componentDataStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
dsTableIdMap.forEach((key,value) ->{
|
||||
dsTableIdMap.forEach((key, value) -> {
|
||||
componentDataStr.set(componentDataStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
|
||||
dsTableFieldsIdMap.forEach((key,value) ->{
|
||||
dsTableFieldsIdMap.forEach((key, value) -> {
|
||||
componentDataStr.set(componentDataStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
|
||||
datasourceIdMap.forEach((key,value) ->{
|
||||
datasourceIdMap.forEach((key, value) -> {
|
||||
componentDataStr.set(componentDataStr.get().replaceAll(key.toString(), value.toString()));
|
||||
//表名映射更新
|
||||
Map<String,String> appDsTableNamesMap = dsTableNamesMap.get(key);
|
||||
Map<String,String> systemDsTableNamesMap = dsTableNamesMap.get(value);
|
||||
if(!CollectionUtils.isEmpty(appDsTableNamesMap) && !CollectionUtils.isEmpty(systemDsTableNamesMap) ){
|
||||
appDsTableNamesMap.forEach((keyName,valueName) ->{
|
||||
if(StringUtils.isNotEmpty(systemDsTableNamesMap.get(keyName))){
|
||||
Map<String, String> appDsTableNamesMap = dsTableNamesMap.get(key);
|
||||
Map<String, String> systemDsTableNamesMap = dsTableNamesMap.get(value);
|
||||
if (!CollectionUtils.isEmpty(appDsTableNamesMap) && !CollectionUtils.isEmpty(systemDsTableNamesMap)) {
|
||||
appDsTableNamesMap.forEach((keyName, valueName) -> {
|
||||
if (StringUtils.isNotEmpty(systemDsTableNamesMap.get(keyName))) {
|
||||
componentDataStr.set(componentDataStr.get().replaceAll(key.toString(), value.toString()));
|
||||
}
|
||||
});
|
||||
@ -366,28 +380,28 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
request.setId(newDvId);
|
||||
// 还原ID信息
|
||||
Map<Long, ChartViewDTO> canvasViews = request.getCanvasViewInfo();
|
||||
if(isAppSave){
|
||||
if (isAppSave) {
|
||||
Map<Long, String> canvasViewsStr = VisualizationUtils.viewTransToStr(canvasViews);
|
||||
canvasViewsStr.forEach((viewId,viewInfoStr) ->{
|
||||
canvasViewsStr.forEach((viewId, viewInfoStr) -> {
|
||||
AtomicReference<String> mutableViewInfoStr = new AtomicReference<>(viewInfoStr);
|
||||
datasourceIdMap.forEach((key,value) ->{
|
||||
datasourceIdMap.forEach((key, value) -> {
|
||||
mutableViewInfoStr.set(mutableViewInfoStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
dsTableIdMap.forEach((key,value) ->{
|
||||
dsTableIdMap.forEach((key, value) -> {
|
||||
mutableViewInfoStr.set(mutableViewInfoStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
dsTableFieldsIdMap.forEach((key,value) ->{
|
||||
dsTableFieldsIdMap.forEach((key, value) -> {
|
||||
mutableViewInfoStr.set(mutableViewInfoStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
dsGroupIdMap.forEach((key,value) ->{
|
||||
dsGroupIdMap.forEach((key, value) -> {
|
||||
mutableViewInfoStr.set(mutableViewInfoStr.get().replaceAll(key.toString(), value.toString()));
|
||||
});
|
||||
canvasViewsStr.put(viewId, mutableViewInfoStr.get());
|
||||
});
|
||||
canvasViews = VisualizationUtils.viewTransToObj(canvasViewsStr);
|
||||
canvasViews.forEach((key,viewInfo) ->{
|
||||
canvasViews.forEach((key, viewInfo) -> {
|
||||
viewInfo.setDataFrom("dataset");
|
||||
if(viewInfo.getTableId() == null){
|
||||
if (viewInfo.getTableId() == null) {
|
||||
viewInfo.setTableId(viewInfo.getSourceTableId());
|
||||
}
|
||||
});
|
||||
@ -406,7 +420,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
queryWrapper.eq("pid", datasetFolderPid);
|
||||
if (coreDatasetGroupMapper.exists(queryWrapper)) {
|
||||
return "repeat";
|
||||
}else{
|
||||
} else {
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
@ -474,6 +488,11 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
return coreVisualizationManage.tree(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<BusiNodeVO>> interactiveTree(Map<String, BusiNodeRequest> requestMap) {
|
||||
return coreBusiManage.interactiveTree(requestMap);
|
||||
}
|
||||
|
||||
@DeLog(id = "#p0.id", pid = "#p0.pid", ot = LogOT.MODIFY, stExp = "#p0.type")
|
||||
@Transactional
|
||||
@Override
|
||||
@ -536,7 +555,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
|
||||
@Override
|
||||
public DataVisualizationVO decompression(DataVisualizationBaseRequest request) throws Exception {
|
||||
try{
|
||||
try {
|
||||
Long newDvId = IDUtils.snowID();
|
||||
String newFrom = request.getNewFrom();
|
||||
String templateStyle = null;
|
||||
@ -586,18 +605,18 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
// 模板市场记录
|
||||
coreOptRecentManage.saveOpt(request.getResourceName(), OptConstants.OPT_RESOURCE_TYPE.TEMPLATE, OptConstants.OPT_TYPE.NEW);
|
||||
}
|
||||
if(StringUtils.isNotEmpty(appDataStr) && appDataStr.length()>10){
|
||||
try{
|
||||
VisualizationExport2AppVO appDataFormat = JsonUtil.parseObject(appDataStr,VisualizationExport2AppVO.class);
|
||||
String dvInfo = appDataFormat.getVisualizationInfo();
|
||||
VisualizationBaseInfoVO baseInfoVO = JsonUtil.parseObject(dvInfo,VisualizationBaseInfoVO.class);
|
||||
if (StringUtils.isNotEmpty(appDataStr) && appDataStr.length() > 10) {
|
||||
try {
|
||||
VisualizationExport2AppVO appDataFormat = JsonUtil.parseObject(appDataStr, VisualizationExport2AppVO.class);
|
||||
String dvInfo = appDataFormat.getVisualizationInfo();
|
||||
VisualizationBaseInfoVO baseInfoVO = JsonUtil.parseObject(dvInfo, VisualizationBaseInfoVO.class);
|
||||
Long sourceDvId = baseInfoVO.getId();
|
||||
appDataStr = appDataStr.replaceAll(sourceDvId.toString(), newDvId.toString());
|
||||
}catch (Exception e){
|
||||
appDataStr = appDataStr.replaceAll(sourceDvId.toString(), newDvId.toString());
|
||||
} catch (Exception e) {
|
||||
LogUtil.error(e);
|
||||
appDataStr = null;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
appDataStr = null;
|
||||
}
|
||||
// 解析动态数据
|
||||
@ -632,9 +651,9 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
VisualizationTemplateExtendDataDTO extendDataDTO = new VisualizationTemplateExtendDataDTO(newDvId, newViewId, originViewData);
|
||||
extendDataInfo.put(newViewId, extendDataDTO);
|
||||
templateData = templateData.replaceAll(originViewId, newViewId.toString());
|
||||
if(StringUtils.isNotEmpty(appDataStr)){
|
||||
if (StringUtils.isNotEmpty(appDataStr)) {
|
||||
chartView.setTableId(chartView.getSourceTableId());
|
||||
appDataStr = appDataStr.replaceAll(originViewId, newViewId.toString());
|
||||
appDataStr = appDataStr.replaceAll(originViewId, newViewId.toString());
|
||||
}
|
||||
canvasViewInfo.put(chartView.getId(), chartView);
|
||||
//插入模板数据 此处预先插入减少数据交互量
|
||||
@ -645,8 +664,8 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
request.setCanvasStyleData(templateStyle);
|
||||
//Store static resource into the server
|
||||
staticResourceServer.saveFilesToServe(staticResource);
|
||||
return new DataVisualizationVO(newDvId, name, dvType, version, templateStyle, templateData,appDataStr, canvasViewInfo, null);
|
||||
}catch (Exception e){
|
||||
return new DataVisualizationVO(newDvId, name, dvType, version, templateStyle, templateData, appDataStr, canvasViewInfo, null);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
DEException.throwException("解析错误");
|
||||
return null;
|
||||
@ -694,7 +713,7 @@ public class DataVisualizationServer implements DataVisualizationApi {
|
||||
datasourceTaskVOInfo = appTemplateMapper.findAppDatasourceTaskInfo(dsIds);
|
||||
}
|
||||
|
||||
if(CollectionUtils.isEmpty(datasourceVOInfo)){
|
||||
if (CollectionUtils.isEmpty(datasourceVOInfo)) {
|
||||
DEException.throwException("当前不存在数据源无法导出");
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
package io.dataease.visualization.server;
|
||||
|
||||
|
||||
import io.dataease.api.visualization.StaticResourceApi;
|
||||
import io.dataease.api.visualization.request.StaticResourceRequest;
|
||||
import io.dataease.exception.DEException;
|
||||
@ -17,13 +16,9 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
@ -68,6 +63,9 @@ public class StaticResourceServer implements StaticResourceApi {
|
||||
return false;
|
||||
}
|
||||
String mimeType = file.getContentType();
|
||||
if (StringUtils.isEmpty(mimeType)) {
|
||||
return false;
|
||||
}
|
||||
// 判断是否为图片或SVG
|
||||
return (mimeType != null && mimeType.startsWith("image/")) || isValidSVG(file);
|
||||
}
|
||||
@ -123,9 +121,14 @@ public class StaticResourceServer implements StaticResourceApi {
|
||||
}
|
||||
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
dbf.setNamespaceAware(true);
|
||||
|
||||
try (InputStream inputStream = file.getInputStream()) {
|
||||
// 禁用外部实体解析以防止XXE攻击
|
||||
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-general-entities", false);
|
||||
dbf.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
|
||||
dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
|
||||
dbf.setNamespaceAware(true);
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
Document doc = db.parse(inputStream);
|
||||
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
ALTER TABLE `visualization_outer_params_info`
|
||||
ADD COLUMN `required` tinyint(1) DEFAULT 0 COMMENT '是否必填',
|
||||
ADD COLUMN `default_value` longtext NULL COMMENT '默认值 JSON格式',
|
||||
ADD COLUMN `default_value` varchar(255) DEFAULT NULL COMMENT '默认值 JSON格式',
|
||||
ADD COLUMN `enabled_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否启用默认值';
|
||||
update visualization_outer_params_info set required =0;
|
||||
|
||||
ALTER TABLE `visualization_link_jump_info`
|
||||
ADD COLUMN `window_size` varchar(255) NULL DEFAULT 'middle' COMMENT '窗口大小large middle small';
|
||||
|
||||
@ -1,5 +1,13 @@
|
||||
ALTER TABLE `visualization_outer_params_info`
|
||||
ADD COLUMN `required` tinyint(1) DEFAULT 0 COMMENT '是否必填',
|
||||
ADD COLUMN `default_value` longtext NULL COMMENT '默认值 JSON格式',
|
||||
ADD COLUMN `enabled_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否启用默认值';
|
||||
update visualization_outer_params_info set required =0;
|
||||
ADD COLUMN `required` tinyint(1) DEFAULT 0 COMMENT '是否必填',
|
||||
ADD COLUMN `default_value` varchar(255) DEFAULT NULL COMMENT '默认值 JSON格式',
|
||||
ADD COLUMN `enabled_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否启用默认值';
|
||||
update visualization_outer_params_info
|
||||
set required =0;
|
||||
|
||||
ALTER TABLE `xpack_report_info`
|
||||
ADD COLUMN `show_watermark` tinyint(1) NOT NULL DEFAULT 0 COMMENT '显示水印' AFTER `rid`;
|
||||
|
||||
ALTER TABLE `visualization_link_jump_info`
|
||||
ADD COLUMN `window_size` varchar(255) NULL DEFAULT 'middle' COMMENT '窗口大小large middle small';
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
<result column="link_jump_id" jdbcType="BIGINT" property="linkJumpId"/>
|
||||
<result column="link_type" jdbcType="VARCHAR" property="linkType"/>
|
||||
<result column="jump_type" jdbcType="VARCHAR" property="jumpType"/>
|
||||
<result column="window_size" jdbcType="VARCHAR" property="windowSize"/>
|
||||
<result column="target_dv_id" jdbcType="BIGINT" property="targetDvId"/>
|
||||
<result column="source_field_id" jdbcType="BIGINT" property="sourceFieldId"/>
|
||||
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||
@ -78,6 +79,7 @@
|
||||
visualization_link_jump_info.link_jump_id,
|
||||
visualization_link_jump_info.link_type,
|
||||
visualization_link_jump_info.jump_type,
|
||||
visualization_link_jump_info.window_size,
|
||||
visualization_link_jump_info.target_dv_id,
|
||||
visualization_link_jump_info.content,
|
||||
xpack_share.uuid AS publicJumpId,
|
||||
@ -304,6 +306,7 @@
|
||||
link_jump_id,
|
||||
link_type,
|
||||
jump_type,
|
||||
window_size,
|
||||
target_dv_id,
|
||||
source_field_id,
|
||||
content,
|
||||
@ -315,6 +318,7 @@
|
||||
plj_copy.t_id,
|
||||
link_type,
|
||||
jump_type,
|
||||
window_size,
|
||||
target_dv_id,
|
||||
source_field_id,
|
||||
content,
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import pkg from '../package.json'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
|
||||
export default {
|
||||
plugins: [
|
||||
viteCompression({
|
||||
@ -12,6 +13,7 @@ export default {
|
||||
})
|
||||
],
|
||||
build: {
|
||||
cssCodeSplit: false,
|
||||
rollupOptions: {
|
||||
external: id => /de-xpack/.test(id) || /extensions/.test(id),
|
||||
output: {
|
||||
@ -19,10 +21,15 @@ export default {
|
||||
chunkFileNames: `assets/chunk/[name]-${pkg.version}-${pkg.name}.js`,
|
||||
assetFileNames: `assets/[ext]/[name]-${pkg.version}-${pkg.name}.[ext]`,
|
||||
entryFileNames: `js/[name]-${pkg.version}-${pkg.name}.js`,
|
||||
manualChunks(id: string) {
|
||||
if (id.includes('node_modules')) {
|
||||
return id.toString().split('node_modules/')[1].split('/')[0].toString()
|
||||
}
|
||||
manualChunks: {
|
||||
echarts: ['echarts'],
|
||||
vue: ['vue', 'vue-router', 'pinia', 'vue-i18n', 'mitt'],
|
||||
lodash: ['lodash-es', 'lodash'],
|
||||
library: ['jspdf', '@tinymce/tinymce-vue', 'screenfull'],
|
||||
antv: ['@antv/g2', '@antv/g2plot', '@antv/l7', '@antv/l7plot', '@antv/s2'],
|
||||
tinymce: ['tinymce'],
|
||||
axios: ['axios'],
|
||||
'vuedraggable-es': ['vuedraggable']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
"build:flush": "cd ./flushbonading && rimraf ./demo.html && npm i && node ./index.js",
|
||||
"ts:check": "vue-tsc --noEmit",
|
||||
"build:base": "NODE_OPTIONS=--max_old_space_size=4096 vite build --mode base && npm run build:flush",
|
||||
"build:distributed": "NODE_OPTIONS=--max_old_space_size=4096 vite build --mode distributed && npm run build:flush",
|
||||
"build:distributed": "NODE_OPTIONS=--max_old_space_size=5020 vite build --mode distributed && npm run build:flush",
|
||||
"build:lib": "vite build --mode lib",
|
||||
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx --fix",
|
||||
"lint:stylelint": "stylelint --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
|
||||
|
||||
@ -172,6 +172,12 @@ export const getDatasetPreview = async (id): Promise<FieldData> => {
|
||||
})
|
||||
}
|
||||
|
||||
export const getDatasetTotal = async (id): Promise<FieldData> => {
|
||||
return request.post({ url: `/datasetData/getDatasetTotal`, data: { id: id } }).then(res => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
|
||||
export const getDatasetDetails = async (id): Promise<Dataset> => {
|
||||
return request.post({ url: `/datasetTree/details/${id}`, data: {} }).then(res => {
|
||||
return res?.data
|
||||
|
||||
@ -41,6 +41,12 @@ export const queryTreeApi = async (data: BusiTreeRequest): Promise<IResponse> =>
|
||||
})
|
||||
}
|
||||
|
||||
export const queryBusiTreeApi = async (data): Promise<IResponse> => {
|
||||
return request.post({ url: '/dataVisualization/interactiveTree', data }).then(res => {
|
||||
return res?.data
|
||||
})
|
||||
}
|
||||
|
||||
export const findDvType = async dvId =>
|
||||
request.get({ url: `/dataVisualization/findDvType/${dvId}` })
|
||||
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
<svg width="80" height="56" viewBox="0 0 80 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 2V50.9977L76 50.9977L76 53.9977H4V2H7Z" fill="#434343"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M72.8196 13.7602C73.1363 14.2126 73.0262 14.8362 72.5738 15.1529L50.2198 29.3007L37.043 16.1239L36.7137 16.4943C36.0548 17.2352 35.1121 18.2952 33.9766 19.5713C31.7056 22.1235 28.6637 25.5405 25.5801 28.9991C19.434 35.8927 13.0676 43.0139 12.3741 43.7074C11.9836 44.098 11.3504 44.098 10.9599 43.7074C10.5694 43.3169 10.5694 42.6837 10.9599 42.2932C11.5997 41.6534 17.9 34.608 24.0872 27.6682C27.1703 24.2102 30.2117 20.7938 32.4824 18.2418C33.6178 16.9659 34.5604 15.906 35.2192 15.1652L36.2526 14.0029C36.2526 14.0029 36.2529 14.0026 37.0003 14.667L36.2526 14.0029L36.9575 13.21L50.4475 26.7L71.4269 13.5144C71.8793 13.1977 72.5028 13.3077 72.8196 13.7602Z" fill="#3370FF"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M36.2315 13.274C36.6138 12.844 37.2791 12.8245 37.686 13.2313L50.5191 26.0644L71.1513 13.097C71.8291 12.6316 72.7567 12.7985 73.2292 13.4735C73.7043 14.1521 73.5392 15.0874 72.8605 15.5625L72.851 15.5692L50.8253 29.5092C50.43 29.7594 49.9141 29.7021 49.5834 29.3713L37.0644 16.8524C36.4066 17.5921 35.4725 18.6423 34.3501 19.9037C32.0791 22.456 29.0371 25.873 25.9533 29.3319C19.8175 36.2139 13.4346 43.354 12.7277 44.061C12.1419 44.6468 11.1921 44.6468 10.6063 44.061C10.0205 43.4752 10.0205 42.5255 10.6063 41.9397C11.2327 41.3133 17.5164 34.2868 23.714 27.3354C26.7969 23.8776 29.8382 20.4613 32.1089 17.9095C33.2442 16.6336 34.1868 15.5738 34.8455 14.833L36.2315 13.274ZM36.3401 16.162L37.0217 15.3955L50.2905 28.6642L72.2949 14.7377C72.5145 14.5776 72.5665 14.2705 72.4099 14.0469C72.2516 13.8207 71.9398 13.7657 71.7136 13.924L71.7034 13.9312L50.3759 27.3355C46.6555 23.5997 40.5 17.0002 37.3315 14.2924L37.3324 14.2931L36.6683 15.0408L36.2943 14.7086L35.5929 15.4975C34.934 16.2383 33.9913 17.2982 32.856 18.5742C30.5852 21.1262 27.5436 24.5427 24.4605 28.0009C18.2835 34.9291 11.9667 41.9935 11.3134 42.6468C11.1182 42.842 11.1182 43.1586 11.3134 43.3539M10.9599 43.7074L11.3134 43.3539C11.5087 43.5491 11.8253 43.5491 12.0205 43.3539C12.7006 42.6738 19.0505 35.5715 25.2069 28.6664C28.2903 25.2079 31.3321 21.7911 33.603 19.2389C34.7385 17.9629 35.6812 16.9029 36.3401 16.162" fill="#3370FF"/>
|
||||
<path d="M37.686 13.2308C37.2791 12.824 36.6138 12.8435 36.2315 13.2735L34.8455 14.8325C34.1868 15.5733 33.2442 16.633 32.1089 17.9089C29.8382 20.4608 26.7969 23.8771 23.714 27.3349C17.5164 34.2863 11.2327 41.3128 10.6063 41.9391C10.0205 42.5249 10.0205 43.4747 10.6063 44.0605C11.1921 44.6462 12.1419 44.6462 12.7277 44.0605C13.4346 43.3535 19.8175 36.2134 25.9533 29.3314C29.0371 25.8725 32.0791 22.4555 34.3501 19.9032C35.4725 18.6418 36.4066 17.5915 37.0644 16.8519L49.5834 29.3708C49.9141 29.7016 50.43 29.7589 50.8253 29.5087L72.851 15.5686L72.8605 15.562C73.5392 15.0869 73.7043 14.1516 73.2292 13.4729C72.7567 12.798 71.8291 12.631 71.1513 13.0965L50.5191 26.0639L37.686 13.2308Z" fill="#3370FF"/>
|
||||
<path d="M11.667 26.5C10.8386 26.5 10.167 27.1716 10.167 28C10.167 28.8284 10.8386 29.5 11.667 29.5H33.6392L42.646 40.1151C42.8119 40.3107 43.0467 40.4351 43.3017 40.4624L71.4856 43.489C72.3058 43.589 73.0528 43.0065 73.1554 42.1861C73.2582 41.364 72.6751 40.6143 71.8531 40.5115L44.4294 37.5801L35.3277 26.853C35.1377 26.6291 34.8588 26.5 34.5651 26.5H11.667Z" fill="#00D6B9"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@ -0,0 +1,4 @@
|
||||
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.713135 21.4739V1.80273C0.713135 1.52659 0.936992 1.30273 1.21313 1.30273H2.26008C2.53623 1.30273 2.76008 1.52659 2.76008 1.80273V20.5523H22.5686C22.8447 20.5523 23.0686 20.7761 23.0686 21.0523V22.0992C23.0686 22.3754 22.8447 22.5992 22.5686 22.5992H1.83907C1.54045 22.5992 1.25407 22.4806 1.04291 22.2694C0.83176 22.0583 0.713135 21.7725 0.713135 21.4739Z"/>
|
||||
<path d="M4.19544 18.3911C3.96872 18.2313 3.91539 17.9175 4.07659 17.6918L8.90155 10.9358C8.97757 10.8235 9.07516 10.7274 9.18865 10.6531C9.30213 10.5788 9.42925 10.5278 9.56262 10.5031C9.69599 10.4784 9.83293 10.4804 9.96551 10.5091C10.0981 10.5377 10.2236 10.5925 10.3349 10.6701L15.7191 14.2624L20.9481 8.16625C21.1291 7.95528 21.4474 7.93239 21.6567 8.11531L22.4497 8.80844C22.6562 8.98892 22.6788 9.30208 22.5003 9.51031L16.6806 16.2998C16.5179 16.4883 16.2919 16.611 16.0452 16.6449C15.7984 16.6788 15.5478 16.6215 15.3402 16.4839L10.0275 12.9315L5.77196 18.8941C5.61221 19.118 5.30171 19.1708 5.07694 19.0124L4.19544 18.3911Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
@ -0,0 +1,5 @@
|
||||
<svg width="80" height="56" viewBox="0 0 80 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M37.686 13.231C37.2791 12.8242 36.6138 12.8437 36.2315 13.2737L34.8455 14.8327C34.1868 15.5735 33.2442 16.6333 32.1089 17.9092C29.8382 20.4611 26.7969 23.8773 23.714 27.3352C17.5164 34.2865 11.2327 41.313 10.6063 41.9394C10.0205 42.5252 10.0205 43.4749 10.6063 44.0607C11.1921 44.6465 12.1419 44.6465 12.7277 44.0607C13.4346 43.3537 19.8175 36.2136 25.9533 29.3316C29.0371 25.8728 32.0791 22.4557 34.3501 19.9034C35.4725 18.642 36.4066 17.5918 37.0644 16.8521L49.5834 29.3711C49.9141 29.7018 50.43 29.7591 50.8253 29.5089L72.851 15.5689L72.8605 15.5622C73.5392 15.0872 73.7043 14.1519 73.2292 13.4732C72.7567 12.7982 71.8291 12.6313 71.1513 13.0968L50.5191 26.0642L37.686 13.231Z" fill="#3370FF"/>
|
||||
<path d="M11.667 26.5C10.8386 26.5 10.167 27.1716 10.167 28C10.167 28.8284 10.8386 29.5 11.667 29.5H33.6392L42.646 40.1151C42.8119 40.3107 43.0467 40.4351 43.3017 40.4624L71.4856 43.489C72.3058 43.589 73.0528 43.0065 73.1554 42.1861C73.2582 41.364 72.6751 40.6143 71.8531 40.5115L44.4294 37.5801L35.3277 26.853C35.1377 26.6291 34.8588 26.5 34.5651 26.5H11.667Z" fill="#00D6B9"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 2.00391V51.0016L76 51.0016L76 54.0016H4V2.00391H7Z" fill="#DEE0E3"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
1
core/core-frontend/src/assets/svg/picture-group-dark.svg
Normal file
1
core/core-frontend/src/assets/svg/picture-group-dark.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726302584557" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6066" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 0h938.666667v938.666667H0V0z m64 64v810.666667h810.666667v-810.666667h-810.666667z" fill="#2C82FC" p-id="6067"></path><path d="M170.666667 170.666667h853.333333v853.333333H170.666667z" fill="#2C82FC" p-id="6068"></path><path d="M967.082667 334.208v362.965333l-151.850667-162.986666s-17.962667-21.461333-32.64-21.461334a35.072 35.072 0 0 0-30.506667 17.706667c-4.053333 7.04-73.344 76.330667-207.872 207.872-6.016 4.309333-6.016 4.309333-12.586666 0L413.653333 641.706667s-16.768-14.293333-28.373333-14.293334c-5.930667 0-11.477333 1.621333-16.426667 4.224s-8.917333 6.528-10.496 8.192l-130.816 125.312V284.458667 227.541333h739.541334v106.666667z m-55.68 632.917333H227.541333v-55.68-68.650666l151.381334-144.896c5.077333-4.266667 8.362667-4.565333 13.482666-0.085334l116.224 95.061334c10.026667 7.082667 20.949333 15.786667 29.525334 15.786666 8.576 0 18.773333-2.944 29.781333-13.952l211.242667-211.242666c1.109333 0.128 2.218667 0.384 3.370666 0.384l1.066667-0.085334 183.424 196.906667v79.744h0.042667v106.666667h-55.68z" fill="#FFFFFF" p-id="6069"></path><path d="M758.698667 672.64a35.584 35.584 0 0 1 45.013333 4.437333c1.536 1.578667 4.352 4.736 4.352 4.736l15.104 15.061334a21.461333 21.461333 0 0 1 0 30.208 21.077333 21.077333 0 0 1-24.064 4.010666c-0.469333 0.256-21.162667-19.157333-21.162667-19.157333l-30.08 30.208-63.701333 63.701333c-0.512 0.554667-0.682667 1.322667-1.28 1.834667a21.418667 21.418667 0 0 1-30.165333 0 21.418667 21.418667 0 0 1 0-30.165333l0.341333-0.298667 105.642667-104.576z m84.949333 104.917333c-0.170667-0.042667-0.256-0.213333-0.469333-0.298666a21.418667 21.418667 0 0 1 0-30.165334 21.461333 21.461333 0 0 1 30.208 0l0.256 0.384 0.085333-0.128 9.728 9.770667a21.333333 21.333333 0 0 1-30.165333 30.165333l-9.642667-9.728zM426.666667 312.874667a85.333333 85.333333 0 1 1-0.042667 170.709333A85.333333 85.333333 0 0 1 426.666667 312.874667zM426.666667 426.666667a28.458667 28.458667 0 1 0-0.042667-56.96A28.458667 28.458667 0 0 0 426.666667 426.666667z" fill="#2C82FC" p-id="6070"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726300744320" class="icon" viewBox="0 0 1448 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4293" xmlns:xlink="http://www.w3.org/1999/xlink" width="282.8125" height="200"><path d="M1081.624727 143.803796H302.916849c-49.712078 0-89.96338 40.251302-89.96338 89.96338V892.753234c0 49.712078 40.251302 89.96338 89.96338 89.963379h778.879892c49.712078 0 89.96338-40.251302 89.96338-89.963379V233.767176c-0.172014-49.712078-40.423316-89.96338-90.135394-89.96338M302.744835 203.836721h778.879892c16.513355 0 29.930455 13.417101 29.930455 29.930455V586.568117c-48.335965-39.563245-131.934823-93.059634-232.391063-93.059634-92.543591 0-183.883084 71.729884-272.126323 141.051571-67.601545 53.15236-137.611288 108.196876-186.63531 108.196875-68.805644 0-127.806484-50.572148-147.760121-69.837729V233.767176c0.172014-16.513355 13.589115-29.930455 30.10247-29.930455m778.879892 718.846968H302.744835c-16.513355 0-29.930455-13.417101-29.930456-29.930455v-142.25567c35.950949 25.458088 87.89921 52.120275 147.760121 52.120276 69.837729 0 144.491853-58.656812 223.618344-120.92592 80.33059-63.129179 163.241391-128.322526 235.143289-128.322526 128.838569 0 230.842936 113.357299 231.875021 114.561397l0.516042-0.344028V892.753234c0 16.513355-13.417101 29.930455-30.102469 29.930455m-569.366706-359.165463c66.225433 0 120.065849-53.668402 120.065849-120.065849 0-66.225433-53.668402-120.065849-120.065849-120.065849-66.225433 0-120.065849 53.668402-120.065849 120.065849 0 66.397447 53.668402 120.065849 120.065849 120.065849M512.602049 383.591466c33.026709 0 59.688896 26.662187 59.688897 59.688897 0 33.026709-26.662187 59.688896-59.688897 59.688896-33.026709 0-59.688896-26.662187-59.688896-59.688896 0-33.026709 26.662187-59.688896 59.688896-59.688897m0 0" p-id="4294"></path><path d="M1217.687888 833.236351h-96.843944v-51.08819h96.843944c24.770032 0 45.067697-20.125651 45.067697-44.895683V134.34302c0-24.770032-20.125651-44.895683-45.067697-44.895683h-844.589282c-24.770032 0-44.895683 20.125651-44.895683 44.895683v59.688897H276.942718V134.34302c0-52.980346 43.003528-95.983874 95.983874-95.983873h844.589282c52.980346 0 95.983874 43.003528 95.983874 95.983873v602.909458c0.172014 52.980346-42.831514 95.983874-95.81186 95.983873z" p-id="4295"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
1
core/core-frontend/src/assets/svg/picture-group.svg
Normal file
1
core/core-frontend/src/assets/svg/picture-group.svg
Normal file
@ -0,0 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1726302584557" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6066" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M0 0h938.666667v938.666667H0V0z m64 64v810.666667h810.666667v-810.666667h-810.666667z" fill="#2C82FC" p-id="6067"></path><path d="M170.666667 170.666667h853.333333v853.333333H170.666667z" fill="#2C82FC" p-id="6068"></path><path d="M967.082667 334.208v362.965333l-151.850667-162.986666s-17.962667-21.461333-32.64-21.461334a35.072 35.072 0 0 0-30.506667 17.706667c-4.053333 7.04-73.344 76.330667-207.872 207.872-6.016 4.309333-6.016 4.309333-12.586666 0L413.653333 641.706667s-16.768-14.293333-28.373333-14.293334c-5.930667 0-11.477333 1.621333-16.426667 4.224s-8.917333 6.528-10.496 8.192l-130.816 125.312V284.458667 227.541333h739.541334v106.666667z m-55.68 632.917333H227.541333v-55.68-68.650666l151.381334-144.896c5.077333-4.266667 8.362667-4.565333 13.482666-0.085334l116.224 95.061334c10.026667 7.082667 20.949333 15.786667 29.525334 15.786666 8.576 0 18.773333-2.944 29.781333-13.952l211.242667-211.242666c1.109333 0.128 2.218667 0.384 3.370666 0.384l1.066667-0.085334 183.424 196.906667v79.744h0.042667v106.666667h-55.68z" fill="#FFFFFF" p-id="6069"></path><path d="M758.698667 672.64a35.584 35.584 0 0 1 45.013333 4.437333c1.536 1.578667 4.352 4.736 4.352 4.736l15.104 15.061334a21.461333 21.461333 0 0 1 0 30.208 21.077333 21.077333 0 0 1-24.064 4.010666c-0.469333 0.256-21.162667-19.157333-21.162667-19.157333l-30.08 30.208-63.701333 63.701333c-0.512 0.554667-0.682667 1.322667-1.28 1.834667a21.418667 21.418667 0 0 1-30.165333 0 21.418667 21.418667 0 0 1 0-30.165333l0.341333-0.298667 105.642667-104.576z m84.949333 104.917333c-0.170667-0.042667-0.256-0.213333-0.469333-0.298666a21.418667 21.418667 0 0 1 0-30.165334 21.461333 21.461333 0 0 1 30.208 0l0.256 0.384 0.085333-0.128 9.728 9.770667a21.333333 21.333333 0 0 1-30.165333 30.165333l-9.642667-9.728zM426.666667 312.874667a85.333333 85.333333 0 1 1-0.042667 170.709333A85.333333 85.333333 0 0 1 426.666667 312.874667zM426.666667 426.666667a28.458667 28.458667 0 1 0-0.042667-56.96A28.458667 28.458667 0 0 0 426.666667 426.666667z" fill="#2C82FC" p-id="6070"></path></svg>
|
||||
|
After Width: | Height: | Size: 2.3 KiB |
@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import icon_admin_outlined from '@/assets/svg/icon_admin_outlined.svg'
|
||||
import { ref } from 'vue'
|
||||
import { COLOR_CASES, COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
@ -99,7 +100,7 @@ const resetCustomColor = () => {
|
||||
</div>
|
||||
<el-button @click="changeShowCustom" style="margin-left: 8px" size="default" plain>
|
||||
<template #icon>
|
||||
<icon name="icon_admin_outlined"></icon>
|
||||
<icon name="icon_admin_outlined"><icon_admin_outlined class="svg-icon" /></icon>
|
||||
</template>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import iconSetting from '@/assets/svg/icon-setting.svg'
|
||||
import { reactive, ref, toRaw } from 'vue'
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import {
|
||||
@ -56,7 +57,7 @@ const handleCheckAllChange = (val: CheckboxValueType) => {
|
||||
<el-button secondary>
|
||||
<template #icon>
|
||||
<el-icon>
|
||||
<Icon name="icon-setting"></Icon>
|
||||
<Icon name="icon-setting"><iconSetting class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
{{ $t('component.columnList') }}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { useAttrs, computed } from 'vue'
|
||||
import icon_visible_outlined from '@/assets/svg/icon_visible_outlined.svg'
|
||||
import icon_invisible_outlined from '@/assets/svg/icon_invisible_outlined.svg'
|
||||
import { hIcon } from '@/components/icon-custom'
|
||||
const attrs = useAttrs()
|
||||
const props = defineProps(['modelValue'])
|
||||
@ -13,8 +15,8 @@ const value = computed({
|
||||
}
|
||||
})
|
||||
|
||||
const iconView = hIcon('icon_visible_outlined')
|
||||
const iconHide = hIcon('icon_invisible_outlined')
|
||||
const iconView = hIcon(icon_visible_outlined)
|
||||
const iconHide = hIcon(icon_invisible_outlined)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@ -1,36 +0,0 @@
|
||||
<script setup lang="ts">
|
||||
import ComponentGroup from '../visualization/ComponentGroup.vue'
|
||||
import UserViewGroup from '../../custom-component/component-group/UserViewGroup.vue'
|
||||
import TextGroup from '@/custom-component/component-group/TextGroup.vue'
|
||||
import MediaGroup from '@/custom-component/component-group/MediaGroup.vue'
|
||||
</script>
|
||||
<template>
|
||||
<el-row class="custom-main">
|
||||
<component-group :base-width="300" icon-name="chart_pie" title="图表">
|
||||
<user-view-group></user-view-group>
|
||||
</component-group>
|
||||
<component-group :base-width="148" icon-name="other_text" title="文本">
|
||||
<text-group></text-group>
|
||||
</component-group>
|
||||
<component-group icon-name="other_media" title="媒体">
|
||||
<media-group></media-group>
|
||||
</component-group>
|
||||
<component-group icon-name="other_material" title="素材">
|
||||
<div>this is material test</div>
|
||||
</component-group>
|
||||
<component-group icon-name="other_setting" title="参数">
|
||||
<div>setting</div>
|
||||
</component-group>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<style lang="less">
|
||||
.custom-main {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: @component-toolbar-height;
|
||||
background-color: rgba(37, 45, 54, 1);
|
||||
border-bottom: 1px solid rgba(85, 85, 85, 1);
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
@ -1,4 +1,20 @@
|
||||
<script setup lang="ts">
|
||||
import dvBatch from '@/assets/svg/dv-batch.svg'
|
||||
import dvDashboard from '@/assets/svg/dv-dashboard.svg'
|
||||
import dvFilter from '@/assets/svg/dv-filter.svg'
|
||||
import dvMedia from '@/assets/svg/dv-media.svg'
|
||||
import dvMoreCom from '@/assets/svg/dv-more-com.svg'
|
||||
import dvTab from '@/assets/svg/dv-tab.svg'
|
||||
import dvText from '@/assets/svg/dv-text.svg'
|
||||
import dvView from '@/assets/svg/dv-view.svg'
|
||||
import icon_params_setting from '@/assets/svg/icon_params_setting.svg'
|
||||
import icon_phone_outlined from '@/assets/svg/icon_phone_outlined.svg'
|
||||
import icon_copy_filled from '@/assets/svg/icon_copy_filled.svg'
|
||||
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
|
||||
import icon_undo_outlined from '@/assets/svg/icon_undo_outlined.svg'
|
||||
import icon_redo_outlined from '@/assets/svg/icon_redo_outlined.svg'
|
||||
import icon_pc_fullscreen from '@/assets/svg/icon_pc_fullscreen.svg'
|
||||
import dvPreviewOuter from '@/assets/svg/dv-preview-outer.svg'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import { useEmbedded } from '@/store/modules/embedded'
|
||||
@ -89,8 +105,8 @@ const closeEditCanvasName = () => {
|
||||
if (inputName.value.trim() === dvInfo.value.name) {
|
||||
return
|
||||
}
|
||||
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 2) {
|
||||
ElMessage.warning('名称字段长度2-64个字符')
|
||||
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
|
||||
ElMessage.warning('名称字段长度1-64个字符')
|
||||
editCanvasName()
|
||||
return
|
||||
}
|
||||
@ -443,7 +459,9 @@ const initOpenHandler = newWindow => {
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon v-if="!batchOptStatus" class="custom-el-icon back-icon" @click="backToMain()">
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
<Icon name="icon_left_outlined"
|
||||
><icon_left_outlined class="svg-icon toolbar-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<div class="left-area" v-if="editMode === 'edit' && !batchOptStatus">
|
||||
<span id="canvas-name" class="name-area" @dblclick="editCanvasName">
|
||||
@ -457,7 +475,7 @@ const initOpenHandler = newWindow => {
|
||||
:disabled="snapshotIndex < 1"
|
||||
@click="undo()"
|
||||
>
|
||||
<Icon name="icon_undo_outlined"></Icon>
|
||||
<Icon name="icon_undo_outlined"><icon_undo_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
|
||||
@ -469,7 +487,7 @@ const initOpenHandler = newWindow => {
|
||||
}"
|
||||
@click="redo()"
|
||||
>
|
||||
<Icon name="icon_redo_outlined"></Icon>
|
||||
<Icon name="icon_redo_outlined"><icon_redo_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -484,7 +502,7 @@ const initOpenHandler = newWindow => {
|
||||
:base-width="410"
|
||||
:show-split-line="true"
|
||||
is-label
|
||||
:icon-name="'dv-view'"
|
||||
:icon-name="dvView"
|
||||
themes="light"
|
||||
title="图表"
|
||||
>
|
||||
@ -495,7 +513,7 @@ const initOpenHandler = newWindow => {
|
||||
:show-split-line="true"
|
||||
is-label
|
||||
themes="light"
|
||||
icon-name="dv-filter"
|
||||
:icon-name="dvFilter"
|
||||
title="查询组件"
|
||||
>
|
||||
<query-group themes="light" :dv-model="dvModel"></query-group>
|
||||
@ -504,7 +522,7 @@ const initOpenHandler = newWindow => {
|
||||
is-label
|
||||
themes="light"
|
||||
:base-width="115"
|
||||
icon-name="dv-text"
|
||||
:icon-name="dvText"
|
||||
title="富文本"
|
||||
>
|
||||
<text-group themes="light" :dv-model="dvModel"></text-group>
|
||||
@ -514,12 +532,12 @@ const initOpenHandler = newWindow => {
|
||||
themes="light"
|
||||
placement="bottom"
|
||||
:base-width="315"
|
||||
icon-name="dv-media"
|
||||
:icon-name="dvMedia"
|
||||
title="媒体"
|
||||
>
|
||||
<media-group themes="light" :dv-model="dvModel"></media-group>
|
||||
</component-group>
|
||||
<component-group themes="light" is-label :base-width="115" icon-name="dv-tab" title="Tab">
|
||||
<component-group themes="light" is-label :base-width="115" :icon-name="dvTab" title="Tab">
|
||||
<tabs-group themes="light" :dv-model="dvModel"></tabs-group>
|
||||
</component-group>
|
||||
<component-group
|
||||
@ -527,13 +545,13 @@ const initOpenHandler = newWindow => {
|
||||
show-split-line
|
||||
is-label
|
||||
:base-width="115"
|
||||
icon-name="dv-more-com"
|
||||
:icon-name="dvMoreCom"
|
||||
title="更多"
|
||||
>
|
||||
<db-more-com-group themes="light" :dv-model="dvModel"></db-more-com-group>
|
||||
</component-group>
|
||||
<component-button-label
|
||||
icon-name="icon_copy_filled"
|
||||
:icon-name="icon_copy_filled"
|
||||
title="复用"
|
||||
is-label
|
||||
@customClick="multiplexingCanvasOpen"
|
||||
@ -547,14 +565,14 @@ const initOpenHandler = newWindow => {
|
||||
<component-button
|
||||
tips="外部参数设置"
|
||||
@custom-click="openOuterParamsSet"
|
||||
icon-name="icon_params_setting"
|
||||
:icon-name="icon_params_setting"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" content="批量操作" placement="bottom">
|
||||
<component-button
|
||||
tips="批量操作"
|
||||
@custom-click="batchOptStatusChange(true)"
|
||||
icon-name="dv-batch"
|
||||
:icon-name="dvBatch"
|
||||
/>
|
||||
</el-tooltip>
|
||||
|
||||
@ -562,7 +580,7 @@ const initOpenHandler = newWindow => {
|
||||
<component-button
|
||||
tips="仪表板配置"
|
||||
@custom-click="openDataBoardSetting"
|
||||
icon-name="dv-dashboard"
|
||||
:icon-name="dvDashboard"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<div class="divider"></div>
|
||||
@ -570,7 +588,7 @@ const initOpenHandler = newWindow => {
|
||||
<component-button
|
||||
tips="切换至移动端布局"
|
||||
@custom-click="openMobileSetting"
|
||||
icon-name="icon_phone_outlined"
|
||||
:icon-name="icon_phone_outlined"
|
||||
/>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
@ -583,13 +601,13 @@ const initOpenHandler = newWindow => {
|
||||
<el-dropdown-menu class="drop-style">
|
||||
<el-dropdown-item @click="previewInner">
|
||||
<el-icon style="margin-right: 8px; font-size: 16px">
|
||||
<Icon name="icon_pc_fullscreen" />
|
||||
<Icon name="icon_pc_fullscreen"><icon_pc_fullscreen class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
全屏预览
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item @click="previewOuter()">
|
||||
<el-icon style="margin-right: 8px; font-size: 16px">
|
||||
<Icon name="dv-preview-outer" />
|
||||
<Icon name="dv-preview-outer"><dvPreviewOuter class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
新页面预览
|
||||
</el-dropdown-item>
|
||||
|
||||
@ -14,7 +14,9 @@
|
||||
@click="handleHorizontalChange('left')"
|
||||
class="hover-icon"
|
||||
>
|
||||
<Icon name="icon_left-align_outlined" />
|
||||
<Icon name="icon_left-align_outlined"
|
||||
><icon_leftAlign_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
@ -26,7 +28,9 @@
|
||||
@click="handleHorizontalChange('center')"
|
||||
class="hover-icon"
|
||||
>
|
||||
<Icon name="icon_horizontal-align_outlined" />
|
||||
<Icon name="icon_horizontal-align_outlined"
|
||||
><icon_horizontalAlign_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
@ -38,7 +42,9 @@
|
||||
@click="handleHorizontalChange('right')"
|
||||
class="hover-icon"
|
||||
>
|
||||
<Icon name="icon_right-align_outlined" />
|
||||
<Icon name="icon_right-align_outlined"
|
||||
><icon_rightAlign_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
@ -54,7 +60,9 @@
|
||||
@click="handleHorizontalChange('vertical', 'layout')"
|
||||
class="hover-icon"
|
||||
>
|
||||
<Icon name="icon_title-top-align_outlined" />
|
||||
<Icon name="icon_title-top-align_outlined"
|
||||
><icon_titleTopAlign_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" placement="top">
|
||||
@ -66,7 +74,9 @@
|
||||
@click="handleHorizontalChange('horizontal', 'layout')"
|
||||
class="hover-icon"
|
||||
>
|
||||
<Icon name="icon_title-left-align_outlined" />
|
||||
<Icon name="icon_title-left-align_outlined"
|
||||
><icon_titleLeftAlign_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
@ -145,6 +155,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import icon_leftAlign_outlined from '@/assets/svg/icon_left-align_outlined.svg'
|
||||
import icon_horizontalAlign_outlined from '@/assets/svg/icon_horizontal-align_outlined.svg'
|
||||
import icon_rightAlign_outlined from '@/assets/svg/icon_right-align_outlined.svg'
|
||||
import icon_titleTopAlign_outlined from '@/assets/svg/icon_title-top-align_outlined.svg'
|
||||
import icon_titleLeftAlign_outlined from '@/assets/svg/icon_title-left-align_outlined.svg'
|
||||
import { onMounted, reactive, computed } from 'vue'
|
||||
import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -76,21 +76,21 @@
|
||||
<el-checkbox
|
||||
:effect="themes"
|
||||
size="small"
|
||||
v-model="canvasStyleData.refreshViewBrowserEnable"
|
||||
v-model="canvasStyleData.refreshBrowserEnable"
|
||||
@change="themeChange"
|
||||
>
|
||||
整体刷新
|
||||
</el-checkbox>
|
||||
<el-tooltip class="item" :effect="toolTip" placement="bottom">
|
||||
<template #content>
|
||||
<div>仅公共链接生效</div>
|
||||
<div>仅公共链接和新Tab预览生效</div>
|
||||
</template>
|
||||
<el-icon
|
||||
class="hint-icon"
|
||||
style="margin-left: 4px"
|
||||
:class="{ 'hint-icon--dark': themes === 'dark' }"
|
||||
>
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
@ -104,7 +104,7 @@
|
||||
:min="1"
|
||||
:max="3600"
|
||||
size="middle"
|
||||
:disabled="!canvasStyleData.refreshViewBrowserEnable"
|
||||
:disabled="!canvasStyleData.refreshBrowserEnable"
|
||||
@change="onRefreshChange"
|
||||
>
|
||||
<template #append>
|
||||
@ -112,7 +112,7 @@
|
||||
v-model="canvasStyleData.refreshBrowserUnit"
|
||||
size="middle"
|
||||
:effect="themes"
|
||||
:disabled="!canvasStyleData.refreshViewBrowserEnable"
|
||||
:disabled="!canvasStyleData.refreshBrowserEnable"
|
||||
style="width: 90px"
|
||||
@change="themeChange"
|
||||
>
|
||||
@ -145,7 +145,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
@ -184,6 +184,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
const { t } = useI18n()
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
@click="checkBold"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_bold_outlined" />
|
||||
<Icon name="icon_bold_outlined"><icon_bold_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -57,7 +57,7 @@
|
||||
@click="checkItalic"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_italic_outlined" />
|
||||
<Icon name="icon_italic_outlined"><icon_italic_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -74,7 +74,9 @@
|
||||
@click="setPosition('left')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_left-alignment_outlined" />
|
||||
<Icon name="icon_left-alignment_outlined"
|
||||
><icon_leftAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -88,7 +90,9 @@
|
||||
@click="setPosition('center')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_center-alignment_outlined" />
|
||||
<Icon name="icon_center-alignment_outlined"
|
||||
><icon_centerAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -102,7 +106,9 @@
|
||||
@click="setPosition('right')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_right-alignment_outlined" />
|
||||
<Icon name="icon_right-alignment_outlined"
|
||||
><icon_rightAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -112,6 +118,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import icon_bold_outlined from '@/assets/svg/icon_bold_outlined.svg'
|
||||
import icon_italic_outlined from '@/assets/svg/icon_italic_outlined.svg'
|
||||
import icon_leftAlignment_outlined from '@/assets/svg/icon_left-alignment_outlined.svg'
|
||||
import icon_centerAlignment_outlined from '@/assets/svg/icon_center-alignment_outlined.svg'
|
||||
import icon_rightAlignment_outlined from '@/assets/svg/icon_right-alignment_outlined.svg'
|
||||
import { computed, reactive, ref } from 'vue'
|
||||
import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -16,7 +16,9 @@
|
||||
width="172"
|
||||
height="79"
|
||||
/>
|
||||
<Icon v-else name="dv-no-img" style="width: 172px; height: 79px" />
|
||||
<Icon v-else name="dv-no-img"
|
||||
><dvNoImg class="svg-icon" style="width: 172px; height: 79px"
|
||||
/></Icon>
|
||||
</div>
|
||||
<div class="title-main">
|
||||
<div class="title-area">
|
||||
@ -44,6 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import dvNoImg from '@/assets/svg/dv-no-img.svg'
|
||||
import { computed, onMounted, reactive, toRefs } from 'vue'
|
||||
import { imgUrlTrans } from '@/utils/imgUtils'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script setup lang="tsx">
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -125,7 +126,7 @@ onMounted(() => {
|
||||
<div>预览时生效</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon--dark">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-select
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import dvReposition from '@/assets/svg/dv-reposition.svg'
|
||||
import dvMax from '@/assets/svg/dv-max.svg'
|
||||
import dvMin from '@/assets/svg/dv-min.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
|
||||
@ -124,7 +127,7 @@ onUnmounted(() => {
|
||||
/>
|
||||
|
||||
<el-icon @click="scaleDecrease(1)" class="hover-icon-custom" style="margin-right: 12px">
|
||||
<Icon name="dv-min"></Icon
|
||||
<Icon name="dv-min"><dvMin class="svg-icon"></dvMin></Icon
|
||||
></el-icon>
|
||||
<el-slider
|
||||
style="width: 100px; margin-right: 12px"
|
||||
@ -136,12 +139,12 @@ onUnmounted(() => {
|
||||
size="small"
|
||||
/>
|
||||
<el-icon @click="scaleIncrease(1)" class="hover-icon-custom">
|
||||
<Icon name="dv-max"></Icon
|
||||
<Icon name="dv-max"><dvMax class="svg-icon"></dvMax></Icon
|
||||
></el-icon>
|
||||
<el-divider direction="vertical" class="custom-divider_scale" />
|
||||
<el-tooltip effect="ndark" content="定位到中心点" placement="top">
|
||||
<el-icon @click="reposition" class="hover-icon-custom" style="margin-right: 12px">
|
||||
<Icon name="dv-reposition"></Icon
|
||||
<Icon name="dv-reposition"><dvReposition class="svg-icon"></dvReposition></Icon
|
||||
></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
@ -1,7 +1,19 @@
|
||||
<script setup lang="ts">
|
||||
import dvFilter from '@/assets/svg/dv-filter.svg'
|
||||
import dvMaterial from '@/assets/svg/dv-material.svg'
|
||||
import dvMedia from '@/assets/svg/dv-media.svg'
|
||||
import dvMoreCom from '@/assets/svg/dv-more-com.svg'
|
||||
import dvTab from '@/assets/svg/dv-tab.svg'
|
||||
import dvText from '@/assets/svg/dv-text.svg'
|
||||
import dvView from '@/assets/svg/dv-view.svg'
|
||||
import icon_params_setting from '@/assets/svg/icon_params_setting.svg'
|
||||
import icon_copy_filled from '@/assets/svg/icon_copy_filled.svg'
|
||||
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
|
||||
import icon_undo_outlined from '@/assets/svg/icon_undo_outlined.svg'
|
||||
import icon_redo_outlined from '@/assets/svg/icon_redo_outlined.svg'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus-secondary'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import { ref, nextTick, computed, toRefs, onMounted } from 'vue'
|
||||
import { ref, nextTick, computed, toRefs } from 'vue'
|
||||
import { useEmbedded } from '@/store/modules/embedded'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
@ -64,8 +76,8 @@ const closeEditCanvasName = () => {
|
||||
if (inputName.value.trim() === dvInfo.value.name) {
|
||||
return
|
||||
}
|
||||
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 2) {
|
||||
ElMessage.warning('名称字段长度2-64个字符')
|
||||
if (inputName.value.trim().length > 64 || inputName.value.trim().length < 1) {
|
||||
ElMessage.warning('名称字段长度1-64个字符')
|
||||
editCanvasName()
|
||||
return
|
||||
}
|
||||
@ -276,7 +288,9 @@ const fullScreenPreview = () => {
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-icon class="custom-el-icon back-icon" @click="backToMain()">
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
<Icon name="icon_left_outlined"
|
||||
><icon_left_outlined class="svg-icon toolbar-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<div class="left-area">
|
||||
<span id="dv-canvas-name" class="name-area" @dblclick="editCanvasName">
|
||||
@ -289,7 +303,7 @@ const fullScreenPreview = () => {
|
||||
:class="{ 'toolbar-icon-disabled': snapshotIndex < 1 }"
|
||||
@click="undo()"
|
||||
>
|
||||
<Icon name="icon_undo_outlined"></Icon>
|
||||
<Icon name="icon_undo_outlined"><icon_undo_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="ndark" :content="$t('commons.reduction')" placement="bottom">
|
||||
@ -300,7 +314,7 @@ const fullScreenPreview = () => {
|
||||
}"
|
||||
@click="redo()"
|
||||
>
|
||||
<Icon name="icon_redo_outlined"></Icon>
|
||||
<Icon name="icon_redo_outlined"><icon_redo_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -310,7 +324,7 @@ const fullScreenPreview = () => {
|
||||
show-split-line
|
||||
is-label
|
||||
:base-width="410"
|
||||
icon-name="dv-view"
|
||||
:icon-name="dvView"
|
||||
title="图表"
|
||||
>
|
||||
<user-view-group></user-view-group>
|
||||
@ -319,40 +333,40 @@ const fullScreenPreview = () => {
|
||||
:base-width="115"
|
||||
:show-split-line="true"
|
||||
is-label
|
||||
icon-name="dv-filter"
|
||||
:icon-name="dvFilter"
|
||||
title="查询组件"
|
||||
>
|
||||
<query-group :dv-model="dvModel"></query-group>
|
||||
</component-group>
|
||||
<component-group is-label :base-width="215" icon-name="dv-text" title="文本">
|
||||
<component-group is-label :base-width="215" :icon-name="dvText" title="文本">
|
||||
<text-group></text-group>
|
||||
</component-group>
|
||||
<component-group
|
||||
is-label
|
||||
placement="bottom"
|
||||
:base-width="315"
|
||||
icon-name="dv-media"
|
||||
:icon-name="dvMedia"
|
||||
title="媒体"
|
||||
>
|
||||
<media-group></media-group>
|
||||
</component-group>
|
||||
<component-group is-label :base-width="115" icon-name="dv-tab" title="Tab">
|
||||
<component-group is-label :base-width="115" :icon-name="dvTab" title="Tab">
|
||||
<tabs-group :dv-model="dvModel"></tabs-group>
|
||||
</component-group>
|
||||
<component-group is-label :base-width="215" icon-name="dv-more-com" title="更多">
|
||||
<component-group is-label :base-width="215" :icon-name="dvMoreCom" title="更多">
|
||||
<more-com-group></more-com-group>
|
||||
</component-group>
|
||||
<component-group
|
||||
is-label
|
||||
:base-width="410"
|
||||
icon-name="dv-material"
|
||||
:icon-name="dvMaterial"
|
||||
:show-split-line="true"
|
||||
title="素材"
|
||||
>
|
||||
<common-group></common-group>
|
||||
</component-group>
|
||||
<component-button-label
|
||||
icon-name="icon_copy_filled"
|
||||
:icon-name="icon_copy_filled"
|
||||
title="复用"
|
||||
is-label
|
||||
@customClick="multiplexingCanvasOpen"
|
||||
@ -365,7 +379,7 @@ const fullScreenPreview = () => {
|
||||
v-show="editMode === 'edit'"
|
||||
tips="外部参数设置"
|
||||
@custom-click="openOuterParamsSet"
|
||||
icon-name="icon_params_setting"
|
||||
:icon-name="icon_params_setting"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<div v-show="editMode === 'edit'" class="divider"></div>
|
||||
|
||||
@ -1,4 +1,66 @@
|
||||
<script lang="ts" setup>
|
||||
import group from '@/assets/svg/group.svg'
|
||||
import bar from '@/assets/svg/bar.svg'
|
||||
import dbMoreWeb from '@/assets/svg/db-more-web.svg'
|
||||
import dvMoreTimeClock from '@/assets/svg/dv-more-time-clock.svg'
|
||||
import dvPictureReal from '@/assets/svg/dv-picture-real.svg'
|
||||
import dvTab from '@/assets/svg/dv-tab.svg'
|
||||
import iconStream from '@/assets/svg/icon-stream.svg'
|
||||
import iconVideo from '@/assets/svg/icon-video.svg'
|
||||
import icon_graphical from '@/assets/svg/icon_graphical.svg'
|
||||
import icon_search from '@/assets/svg/icon_search.svg'
|
||||
import other_material_board from '@/assets/svg/other_material_board.svg'
|
||||
import other_material_icon from '@/assets/svg/other_material_icon.svg'
|
||||
import scrollText from '@/assets/svg/scroll-text.svg'
|
||||
import areaOrigin from '@/assets/svg/area-origin.svg'
|
||||
import areaStackOrigin from '@/assets/svg/area-stack-origin.svg'
|
||||
import barGroupOrigin from '@/assets/svg/bar-group-origin.svg'
|
||||
import barGroupStackOrigin from '@/assets/svg/bar-group-stack-origin.svg'
|
||||
import barHorizontalOrigin from '@/assets/svg/bar-horizontal-origin.svg'
|
||||
import barOrigin from '@/assets/svg/bar-origin.svg'
|
||||
import barRangeOrigin from '@/assets/svg/bar-range-origin.svg'
|
||||
import barStackHorizontalOrigin from '@/assets/svg/bar-stack-horizontal-origin.svg'
|
||||
import barStackOrigin from '@/assets/svg/bar-stack-origin.svg'
|
||||
import bidirectionalBarOrigin from '@/assets/svg/bidirectional-bar-origin.svg'
|
||||
import bubbleMapOrigin from '@/assets/svg/bubble-map-origin.svg'
|
||||
import chartMixGroupOrigin from '@/assets/svg/chart-mix-group-origin.svg'
|
||||
import chartMixOrigin from '@/assets/svg/chart-mix-origin.svg'
|
||||
import chartMixStackOrigin from '@/assets/svg/chart-mix-stack-origin.svg'
|
||||
import chartMixDualLineOrigin from '@/assets/svg/chart-mix-dual-line-origin.svg'
|
||||
import flowMapOrigin from '@/assets/svg/flow-map-origin.svg'
|
||||
import funnelOrigin from '@/assets/svg/funnel-origin.svg'
|
||||
import gaugeOrigin from '@/assets/svg/gauge-origin.svg'
|
||||
import heatMapOrigin from '@/assets/svg/heat-map-origin.svg'
|
||||
import indicatorOrigin from '@/assets/svg/indicator-origin.svg'
|
||||
import lineOrigin from '@/assets/svg/line-origin.svg'
|
||||
import liquidOrigin from '@/assets/svg/liquid-origin.svg'
|
||||
import mapOrigin from '@/assets/svg/map-origin.svg'
|
||||
import percentageBarStackHorizontalOrigin from '@/assets/svg/percentage-bar-stack-horizontal-origin.svg'
|
||||
import percentageBarStackOrigin from '@/assets/svg/percentage-bar-stack-origin.svg'
|
||||
import pieDonutOrigin from '@/assets/svg/pie-donut-origin.svg'
|
||||
import pieDonutRoseOrigin from '@/assets/svg/pie-donut-rose-origin.svg'
|
||||
import pieOrigin from '@/assets/svg/pie-origin.svg'
|
||||
import pieRoseOrigin from '@/assets/svg/pie-rose-origin.svg'
|
||||
import progressBarOrigin from '@/assets/svg/progress-bar-origin.svg'
|
||||
import quadrantOrigin from '@/assets/svg/quadrant-origin.svg'
|
||||
import radarOrigin from '@/assets/svg/radar-origin.svg'
|
||||
import richTextOrigin from '@/assets/svg/rich-text-origin.svg'
|
||||
import sankeyOrigin from '@/assets/svg/sankey-origin.svg'
|
||||
import scatterOrigin from '@/assets/svg/scatter-origin.svg'
|
||||
import stockLineOrigin from '@/assets/svg/stock-line-origin.svg'
|
||||
import symbolicMapOrigin from '@/assets/svg/symbolic-map-origin.svg'
|
||||
import tableInfoOrigin from '@/assets/svg/table-info-origin.svg'
|
||||
import tableNormalOrigin from '@/assets/svg/table-normal-origin.svg'
|
||||
import tablePivotOrigin from '@/assets/svg/table-pivot-origin.svg'
|
||||
import treemapOrigin from '@/assets/svg/treemap-origin.svg'
|
||||
import waterfallOrigin from '@/assets/svg/waterfall-origin.svg'
|
||||
import wordCloudOrigin from '@/assets/svg/word-cloud-origin.svg'
|
||||
import tHeatmapOrigin from '@/assets/svg/t-heatmap-origin.svg'
|
||||
import dvEyeClose from '@/assets/svg/dv-eye-close.svg'
|
||||
import dvShow from '@/assets/svg/dv-show.svg'
|
||||
import dvUnlock from '@/assets/svg/dv-unlock.svg'
|
||||
import dvLock from '@/assets/svg/dv-lock.svg'
|
||||
import dvMore from '@/assets/svg/dv-more.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { layerStoreWithOut } from '@/store/modules/data-visualization/layer'
|
||||
@ -114,12 +176,71 @@ const dragOnEnd = ({ oldIndex, newIndex }) => {
|
||||
dvMainStore.setCurComponent({ component: target, index: transformIndex(comLength - oldIndex) })
|
||||
}
|
||||
|
||||
const iconMap = {
|
||||
bar: bar,
|
||||
'db-more-web': dbMoreWeb,
|
||||
'dv-more-time-clock': dvMoreTimeClock,
|
||||
'dv-picture-real': dvPictureReal,
|
||||
'dv-tab': dvTab,
|
||||
'icon-stream': iconStream,
|
||||
'icon-video': iconVideo,
|
||||
icon_graphical: icon_graphical,
|
||||
icon_search: icon_search,
|
||||
other_material_board: other_material_board,
|
||||
other_material_icon: other_material_icon,
|
||||
'scroll-text': scrollText,
|
||||
'area-origin': areaOrigin,
|
||||
'area-stack-origin': areaStackOrigin,
|
||||
'bar-group-origin': barGroupOrigin,
|
||||
'bar-group-stack-origin': barGroupStackOrigin,
|
||||
'bar-horizontal-origin': barHorizontalOrigin,
|
||||
'bar-origin': barOrigin,
|
||||
'bar-range-origin': barRangeOrigin,
|
||||
'bar-stack-horizontal-origin': barStackHorizontalOrigin,
|
||||
'bar-stack-origin': barStackOrigin,
|
||||
'bidirectional-bar-origin': bidirectionalBarOrigin,
|
||||
'bubble-map-origin': bubbleMapOrigin,
|
||||
'chart-mix-group-origin': chartMixGroupOrigin,
|
||||
'chart-mix-origin': chartMixOrigin,
|
||||
'chart-mix-stack-origin': chartMixStackOrigin,
|
||||
'chart-mix-dual-line': chartMixDualLineOrigin,
|
||||
'flow-map-origin': flowMapOrigin,
|
||||
'funnel-origin': funnelOrigin,
|
||||
'gauge-origin': gaugeOrigin,
|
||||
'heat-map-origin': heatMapOrigin,
|
||||
'indicator-origin': indicatorOrigin,
|
||||
'line-origin': lineOrigin,
|
||||
'liquid-origin': liquidOrigin,
|
||||
'map-origin': mapOrigin,
|
||||
'percentage-bar-stack-horizontal-origin': percentageBarStackHorizontalOrigin,
|
||||
'percentage-bar-stack-origin': percentageBarStackOrigin,
|
||||
'pie-donut-origin': pieDonutOrigin,
|
||||
'pie-donut-rose-origin': pieDonutRoseOrigin,
|
||||
'pie-origin': pieOrigin,
|
||||
'pie-rose-origin': pieRoseOrigin,
|
||||
'progress-bar-origin': progressBarOrigin,
|
||||
'quadrant-origin': quadrantOrigin,
|
||||
'radar-origin': radarOrigin,
|
||||
'rich-text-origin': richTextOrigin,
|
||||
'sankey-origin': sankeyOrigin,
|
||||
'scatter-origin': scatterOrigin,
|
||||
'stock-line-origin': stockLineOrigin,
|
||||
'symbolic-map-origin': symbolicMapOrigin,
|
||||
'table-info-origin': tableInfoOrigin,
|
||||
'table-normal-origin': tableNormalOrigin,
|
||||
'table-pivot-origin': tablePivotOrigin,
|
||||
'treemap-origin': treemapOrigin,
|
||||
'waterfall-origin': waterfallOrigin,
|
||||
'word-cloud-origin': wordCloudOrigin,
|
||||
't-heatmap-origin': tHeatmapOrigin,
|
||||
group: group
|
||||
}
|
||||
const getIconName = item => {
|
||||
if (item.component === 'UserView') {
|
||||
const viewInfo = canvasViewInfo.value[item.id]
|
||||
return `${viewInfo.type}-origin`
|
||||
return iconMap[`${viewInfo.type}-origin`]
|
||||
} else {
|
||||
return item.icon
|
||||
return iconMap[item.icon]
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,7 +304,7 @@ const handleContextMenu = e => {
|
||||
@click="onClick(transformIndex(index))"
|
||||
>
|
||||
<el-icon class="component-icon">
|
||||
<Icon :name="getIconName(getComponent(index))"></Icon>
|
||||
<Icon><component :is="getIconName(getComponent(index))"></component></Icon>
|
||||
</el-icon>
|
||||
<span
|
||||
:id="`component-label-${getComponent(index)?.id}`"
|
||||
@ -205,24 +326,24 @@ const handleContextMenu = e => {
|
||||
v-show="!getComponent(index).isShow"
|
||||
@click="showComponent"
|
||||
>
|
||||
<Icon name="dv-eye-close" class="opt-icon"></Icon>
|
||||
<Icon name="dv-eye-close"><dvEyeClose class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="component-base"
|
||||
v-show="getComponent(index)?.isShow"
|
||||
@click="hideComponent"
|
||||
>
|
||||
<Icon name="dv-show" class="opt-icon"></Icon>
|
||||
<Icon name="dv-show"><dvShow class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon v-show="!getComponent(index)?.isLock" class="component-base" @click="lock">
|
||||
<Icon class="opt-icon" name="dv-unlock"></Icon>
|
||||
<Icon name="dv-unlock"><dvUnlock class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="component-base component-icon-display"
|
||||
v-show="getComponent(index)?.isLock"
|
||||
@click="unlock"
|
||||
>
|
||||
<Icon name="dv-lock" class="opt-icon"></Icon>
|
||||
<Icon name="dv-lock"><dvLock class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-dropdown
|
||||
ref="dropdownMore"
|
||||
@ -233,7 +354,7 @@ const handleContextMenu = e => {
|
||||
>
|
||||
<span :class="'dropdownMore-' + index" @click="onClick(transformIndex(index))">
|
||||
<el-icon class="component-base">
|
||||
<Icon name="dv-more" class="opt-icon"></Icon>
|
||||
<Icon name="dv-more"><dvMore class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
|
||||
@ -1,4 +1,68 @@
|
||||
<script lang="ts" setup>
|
||||
import group from '@/assets/svg/group.svg'
|
||||
import bar from '@/assets/svg/bar.svg'
|
||||
import dbMoreWeb from '@/assets/svg/db-more-web.svg'
|
||||
import dvMoreTimeClock from '@/assets/svg/dv-more-time-clock.svg'
|
||||
import dvPictureReal from '@/assets/svg/dv-picture-real.svg'
|
||||
import dvTab from '@/assets/svg/dv-tab.svg'
|
||||
import iconStream from '@/assets/svg/icon-stream.svg'
|
||||
import iconVideo from '@/assets/svg/icon-video.svg'
|
||||
import icon_graphical from '@/assets/svg/icon_graphical.svg'
|
||||
import icon_search from '@/assets/svg/icon_search.svg'
|
||||
import other_material_board from '@/assets/svg/other_material_board.svg'
|
||||
import other_material_icon from '@/assets/svg/other_material_icon.svg'
|
||||
import scrollText from '@/assets/svg/scroll-text.svg'
|
||||
import areaOrigin from '@/assets/svg/area-origin.svg'
|
||||
import areaStackOrigin from '@/assets/svg/area-stack-origin.svg'
|
||||
import barGroupOrigin from '@/assets/svg/bar-group-origin.svg'
|
||||
import barGroupStackOrigin from '@/assets/svg/bar-group-stack-origin.svg'
|
||||
import barHorizontalOrigin from '@/assets/svg/bar-horizontal-origin.svg'
|
||||
import barOrigin from '@/assets/svg/bar-origin.svg'
|
||||
import barRangeOrigin from '@/assets/svg/bar-range-origin.svg'
|
||||
import barStackHorizontalOrigin from '@/assets/svg/bar-stack-horizontal-origin.svg'
|
||||
import barStackOrigin from '@/assets/svg/bar-stack-origin.svg'
|
||||
import bidirectionalBarOrigin from '@/assets/svg/bidirectional-bar-origin.svg'
|
||||
import bubbleMapOrigin from '@/assets/svg/bubble-map-origin.svg'
|
||||
import chartMixGroupOrigin from '@/assets/svg/chart-mix-group-origin.svg'
|
||||
import chartMixOrigin from '@/assets/svg/chart-mix-origin.svg'
|
||||
import chartMixStackOrigin from '@/assets/svg/chart-mix-stack-origin.svg'
|
||||
import chartMixDualLineOrigin from '@/assets/svg/chart-mix-dual-line-origin.svg'
|
||||
import flowMapOrigin from '@/assets/svg/flow-map-origin.svg'
|
||||
import funnelOrigin from '@/assets/svg/funnel-origin.svg'
|
||||
import gaugeOrigin from '@/assets/svg/gauge-origin.svg'
|
||||
import heatMapOrigin from '@/assets/svg/heat-map-origin.svg'
|
||||
import indicatorOrigin from '@/assets/svg/indicator-origin.svg'
|
||||
import lineOrigin from '@/assets/svg/line-origin.svg'
|
||||
import liquidOrigin from '@/assets/svg/liquid-origin.svg'
|
||||
import mapOrigin from '@/assets/svg/map-origin.svg'
|
||||
import percentageBarStackHorizontalOrigin from '@/assets/svg/percentage-bar-stack-horizontal-origin.svg'
|
||||
import percentageBarStackOrigin from '@/assets/svg/percentage-bar-stack-origin.svg'
|
||||
import pieDonutOrigin from '@/assets/svg/pie-donut-origin.svg'
|
||||
import pieDonutRoseOrigin from '@/assets/svg/pie-donut-rose-origin.svg'
|
||||
import pieOrigin from '@/assets/svg/pie-origin.svg'
|
||||
import pieRoseOrigin from '@/assets/svg/pie-rose-origin.svg'
|
||||
import progressBarOrigin from '@/assets/svg/progress-bar-origin.svg'
|
||||
import quadrantOrigin from '@/assets/svg/quadrant-origin.svg'
|
||||
import radarOrigin from '@/assets/svg/radar-origin.svg'
|
||||
import richTextOrigin from '@/assets/svg/rich-text-origin.svg'
|
||||
import sankeyOrigin from '@/assets/svg/sankey-origin.svg'
|
||||
import scatterOrigin from '@/assets/svg/scatter-origin.svg'
|
||||
import stockLineOrigin from '@/assets/svg/stock-line-origin.svg'
|
||||
import symbolicMapOrigin from '@/assets/svg/symbolic-map-origin.svg'
|
||||
import tableInfoOrigin from '@/assets/svg/table-info-origin.svg'
|
||||
import tableNormalOrigin from '@/assets/svg/table-normal-origin.svg'
|
||||
import tablePivotOrigin from '@/assets/svg/table-pivot-origin.svg'
|
||||
import treemapOrigin from '@/assets/svg/treemap-origin.svg'
|
||||
import waterfallOrigin from '@/assets/svg/waterfall-origin.svg'
|
||||
import wordCloudOrigin from '@/assets/svg/word-cloud-origin.svg'
|
||||
import tHeatmapOrigin from '@/assets/svg/t-heatmap-origin.svg'
|
||||
import dvMore from '@/assets/svg/dv-more.svg'
|
||||
import dvExpandDown from '@/assets/svg/dv-expand-down.svg'
|
||||
import dvExpandRight from '@/assets/svg/dv-expand-right.svg'
|
||||
import dvEyeClose from '@/assets/svg/dv-eye-close.svg'
|
||||
import dvShow from '@/assets/svg/dv-show.svg'
|
||||
import dvUnlock from '@/assets/svg/dv-unlock.svg'
|
||||
import dvLock from '@/assets/svg/dv-lock.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { layerStoreWithOut } from '@/store/modules/data-visualization/layer'
|
||||
@ -203,13 +267,71 @@ const dragOnEnd = ({ oldIndex, newIndex }) => {
|
||||
dvMainStore.setCurComponent({ component: target, index: transformIndex(comLength - oldIndex) })
|
||||
snapshotStore.recordSnapshotCache()
|
||||
}
|
||||
|
||||
const iconMap = {
|
||||
bar: bar,
|
||||
'db-more-web': dbMoreWeb,
|
||||
'dv-more-time-clock': dvMoreTimeClock,
|
||||
'dv-picture-real': dvPictureReal,
|
||||
'dv-tab': dvTab,
|
||||
'icon-stream': iconStream,
|
||||
'icon-video': iconVideo,
|
||||
icon_graphical: icon_graphical,
|
||||
icon_search: icon_search,
|
||||
other_material_board: other_material_board,
|
||||
other_material_icon: other_material_icon,
|
||||
'scroll-text': scrollText,
|
||||
'area-origin': areaOrigin,
|
||||
'area-stack-origin': areaStackOrigin,
|
||||
'bar-group-origin': barGroupOrigin,
|
||||
'bar-group-stack-origin': barGroupStackOrigin,
|
||||
'bar-horizontal-origin': barHorizontalOrigin,
|
||||
'bar-origin': barOrigin,
|
||||
'bar-range-origin': barRangeOrigin,
|
||||
'bar-stack-horizontal-origin': barStackHorizontalOrigin,
|
||||
'bar-stack-origin': barStackOrigin,
|
||||
'bidirectional-bar-origin': bidirectionalBarOrigin,
|
||||
'bubble-map-origin': bubbleMapOrigin,
|
||||
'chart-mix-group-origin': chartMixGroupOrigin,
|
||||
'chart-mix-origin': chartMixOrigin,
|
||||
'chart-mix-stack-origin': chartMixStackOrigin,
|
||||
'chart-mix-dual-line-origin': chartMixDualLineOrigin,
|
||||
'flow-map-origin': flowMapOrigin,
|
||||
'funnel-origin': funnelOrigin,
|
||||
'gauge-origin': gaugeOrigin,
|
||||
'heat-map-origin': heatMapOrigin,
|
||||
'indicator-origin': indicatorOrigin,
|
||||
'line-origin': lineOrigin,
|
||||
'liquid-origin': liquidOrigin,
|
||||
'map-origin': mapOrigin,
|
||||
'percentage-bar-stack-horizontal-origin': percentageBarStackHorizontalOrigin,
|
||||
'percentage-bar-stack-origin': percentageBarStackOrigin,
|
||||
'pie-donut-origin': pieDonutOrigin,
|
||||
'pie-donut-rose-origin': pieDonutRoseOrigin,
|
||||
'pie-origin': pieOrigin,
|
||||
'pie-rose-origin': pieRoseOrigin,
|
||||
'progress-bar-origin': progressBarOrigin,
|
||||
'quadrant-origin': quadrantOrigin,
|
||||
'radar-origin': radarOrigin,
|
||||
'rich-text-origin': richTextOrigin,
|
||||
'sankey-origin': sankeyOrigin,
|
||||
'scatter-origin': scatterOrigin,
|
||||
'stock-line-origin': stockLineOrigin,
|
||||
'symbolic-map-origin': symbolicMapOrigin,
|
||||
'table-info-origin': tableInfoOrigin,
|
||||
'table-normal-origin': tableNormalOrigin,
|
||||
'table-pivot-origin': tablePivotOrigin,
|
||||
'treemap-origin': treemapOrigin,
|
||||
'waterfall-origin': waterfallOrigin,
|
||||
'word-cloud-origin': wordCloudOrigin,
|
||||
't-heatmap-origin': tHeatmapOrigin,
|
||||
group: group
|
||||
}
|
||||
const getIconName = item => {
|
||||
if (item.component === 'UserView') {
|
||||
const viewInfo = canvasViewInfo.value[item.id]
|
||||
return `${viewInfo.type}-origin`
|
||||
return iconMap[`${viewInfo.type}-origin`]
|
||||
} else {
|
||||
return item.icon
|
||||
return iconMap[item.icon]
|
||||
}
|
||||
}
|
||||
|
||||
@ -300,7 +422,7 @@ const canvasChange = () => {
|
||||
>
|
||||
<div style="width: 22px; padding-left: 3px"></div>
|
||||
<el-icon class="component-icon">
|
||||
<Icon :name="getIconName(element)"></Icon>
|
||||
<Icon><component :is="getIconName(element)"></component></Icon>
|
||||
</el-icon>
|
||||
<span
|
||||
:id="`component-label-${element?.id}`"
|
||||
@ -328,7 +450,7 @@ const canvasChange = () => {
|
||||
@click="hiddenAreaOnClick($event, element)"
|
||||
>
|
||||
<el-icon class="component-base">
|
||||
<Icon name="dv-more" class="opt-icon"></Icon>
|
||||
<Icon name="dv-more"><dvMore class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
@ -385,19 +507,21 @@ const canvasChange = () => {
|
||||
@click="expandClick(getComponent(index))"
|
||||
>
|
||||
<Icon
|
||||
v-show="getComponent(index)?.expand"
|
||||
v-if="getComponent(index)?.expand"
|
||||
name="dv-expand-down"
|
||||
class="expand-icon"
|
||||
></Icon>
|
||||
><dvExpandDown class="svg-icon expand-icon"
|
||||
/></Icon>
|
||||
<Icon
|
||||
v-show="!getComponent(index)?.expand"
|
||||
v-if="!getComponent(index)?.expand"
|
||||
name="dv-expand-right"
|
||||
class="expand-icon"
|
||||
></Icon>
|
||||
><dvExpandRight class="svg-icon expand-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
<el-icon class="component-icon">
|
||||
<Icon :name="getIconName(getComponent(index))"></Icon>
|
||||
<Icon><component :is="getIconName(getComponent(index))"></component></Icon>
|
||||
</el-icon>
|
||||
<span
|
||||
:id="`component-label-${getComponent(index)?.id}`"
|
||||
@ -420,28 +544,28 @@ const canvasChange = () => {
|
||||
v-show="!getComponent(index).isShow"
|
||||
@click="showComponent"
|
||||
>
|
||||
<Icon name="dv-eye-close" class="opt-icon"></Icon>
|
||||
<Icon name="dv-eye-close"><dvEyeClose class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="component-base"
|
||||
v-show="getComponent(index)?.isShow"
|
||||
@click="hideComponent"
|
||||
>
|
||||
<Icon name="dv-show" class="opt-icon"></Icon>
|
||||
<Icon name="dv-show"><dvShow class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon
|
||||
v-show="!getComponent(index)?.isLock"
|
||||
class="component-base"
|
||||
@click="lock"
|
||||
>
|
||||
<Icon class="opt-icon" name="dv-unlock"></Icon>
|
||||
<Icon name="dv-unlock"><dvUnlock class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-icon
|
||||
class="component-base component-icon-display"
|
||||
v-show="getComponent(index)?.isLock"
|
||||
@click="unlock"
|
||||
>
|
||||
<Icon name="dv-lock" class="opt-icon"></Icon>
|
||||
<Icon name="dv-lock"><dvLock class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-dropdown
|
||||
ref="dropdownMore"
|
||||
@ -452,7 +576,7 @@ const canvasChange = () => {
|
||||
>
|
||||
<span :class="'dropdownMore-' + index" @click="onClick(transformIndex(index))">
|
||||
<el-icon class="component-base">
|
||||
<Icon name="dv-more" class="opt-icon"></Icon>
|
||||
<Icon name="dv-more"><dvMore class="svg-icon opt-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
<template #dropdown>
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
<script setup lang="ts"></script>
|
||||
|
||||
<template></template>
|
||||
<template>
|
||||
<div>ts</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
|
||||
@ -332,6 +332,10 @@ const dashboardActive = computed(() => {
|
||||
return dvInfo.value.type === 'dashboard'
|
||||
})
|
||||
|
||||
const groupCanvasActive = computed(() => {
|
||||
return isGroupOrTabCanvas(canvasId.value)
|
||||
})
|
||||
|
||||
// 融合矩阵设计
|
||||
const renderOk = ref(false)
|
||||
const moveAnimate = ref(false)
|
||||
@ -1502,7 +1506,11 @@ defineExpose({
|
||||
:id="mainDomId"
|
||||
ref="container"
|
||||
class="editor"
|
||||
:class="{ edit: isEdit, 'dashboard-editor': dashboardActive }"
|
||||
:class="{
|
||||
edit: isEdit,
|
||||
'dashboard-editor': dashboardActive,
|
||||
'group-canvas': groupCanvasActive
|
||||
}"
|
||||
:style="editStyle"
|
||||
@contextmenu="handleContextMenu"
|
||||
>
|
||||
@ -1650,4 +1658,9 @@ defineExpose({
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.group-canvas {
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -228,7 +228,24 @@ const commonBackgroundSvgInner = computed(() => {
|
||||
const slotStyle = computed(() => {
|
||||
// 3d效果支持
|
||||
if (config.value['multiDimensional'] && config.value['multiDimensional']?.enable) {
|
||||
const width = config.value.style.width // 原始元素宽度
|
||||
const height = config.value.style.height // 原始元素高度
|
||||
const rotateX = config.value['multiDimensional'].x // 旋转X角度
|
||||
const rotateY = config.value['multiDimensional'].y // 旋转Y角度
|
||||
|
||||
// 将角度转换为弧度
|
||||
const radX = (rotateX * Math.PI) / 180
|
||||
const radY = (rotateY * Math.PI) / 180
|
||||
|
||||
// 计算旋转后新宽度和高度
|
||||
const newWidth = Math.abs(width * Math.cos(radY)) + Math.abs(height * Math.sin(radX))
|
||||
const newHeight = Math.abs(height * Math.cos(radX)) + Math.abs(width * Math.sin(radY))
|
||||
|
||||
// 计算需要的 padding
|
||||
const paddingX = (newWidth - width) / 2
|
||||
const paddingY = (newHeight - height) / 2
|
||||
return {
|
||||
padding: `${paddingY}px ${paddingX}px`,
|
||||
transform: `rotateX(${config.value['multiDimensional'].x}deg) rotateY(${config.value['multiDimensional'].y}deg) rotateZ(${config.value['multiDimensional'].z}deg)`
|
||||
}
|
||||
} else {
|
||||
@ -259,10 +276,22 @@ const onWrapperClick = e => {
|
||||
dvMainStore.popAreaActiveSwitch()
|
||||
})
|
||||
} else if (config.value.events.type === 'jump') {
|
||||
const url = config.value.events.jump.value
|
||||
const jumpType = config.value.events.jump.type
|
||||
try {
|
||||
window.open(config.value.events.jump.value, '_blank')
|
||||
let newWindow
|
||||
if ('newPop' === jumpType) {
|
||||
window.open(
|
||||
url,
|
||||
'_blank',
|
||||
'width=800,height=600,left=200,top=100,toolbar=no,scrollbars=yes,resizable=yes,location=no'
|
||||
)
|
||||
} else {
|
||||
newWindow = window.open(url, jumpType)
|
||||
}
|
||||
initOpenHandler(newWindow)
|
||||
} catch (e) {
|
||||
console.info('Something wrong when try to jump: ' + config.value.events?.jump?.value)
|
||||
console.warn('url 格式错误:' + url)
|
||||
}
|
||||
} else if (config.value.events.type === 'refreshDataV') {
|
||||
useEmitt().emitter.emit('componentRefresh')
|
||||
@ -276,6 +305,16 @@ const onWrapperClick = e => {
|
||||
}
|
||||
}
|
||||
|
||||
const openHandler = ref(null)
|
||||
const initOpenHandler = newWindow => {
|
||||
if (openHandler?.value) {
|
||||
const pm = {
|
||||
methodName: 'initOpenHandler',
|
||||
args: newWindow
|
||||
}
|
||||
openHandler.value.invokeMethod(pm)
|
||||
}
|
||||
}
|
||||
const deepScale = computed(() => scale.value / 100)
|
||||
</script>
|
||||
|
||||
@ -290,7 +329,7 @@ const deepScale = computed(() => scale.value / 100)
|
||||
element-loading-background="rgba(255, 255, 255, 1)"
|
||||
>
|
||||
<component-edit-bar
|
||||
v-if="!showPosition.includes('canvas') && dvInfo.type === 'dashboard' && !props.isSelector"
|
||||
v-if="!showPosition.includes('canvas') && !props.isSelector"
|
||||
class="wrapper-edit-bar"
|
||||
ref="componentEditBarRef"
|
||||
:canvas-id="canvasId"
|
||||
|
||||
@ -297,7 +297,8 @@ const winMsgHandle = event => {
|
||||
if (
|
||||
msgInfo &&
|
||||
msgInfo.type === 'attachParams' &&
|
||||
msgInfo.targetSourceId === dvInfo.value.id + ''
|
||||
msgInfo.targetSourceId === dvInfo.value.id + '' &&
|
||||
isMainCanvas(canvasId.value)
|
||||
) {
|
||||
const attachParams = msgInfo.params
|
||||
if (attachParams) {
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
>
|
||||
<div v-if="showCheck" class="del-from-mobile" @click="delFromMobile">
|
||||
<el-icon>
|
||||
<Icon name="mobile-checkbox"></Icon>
|
||||
<Icon name="mobile-checkbox"><mobileCheckbox class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
<div
|
||||
@ -46,7 +46,7 @@
|
||||
@click="selectCurComponent"
|
||||
@mousedown="handleInnerMouseDownOnShape"
|
||||
>
|
||||
<Icon v-show="shapeLock" class="iconfont icon-suo" name="dv-lock"></Icon>
|
||||
<Icon v-if="shapeLock" name="dv-lock"><dvLock class="svg-icon iconfont icon-suo" /></Icon>
|
||||
<!--边框背景-->
|
||||
<Board
|
||||
v-if="svgInnerEnable"
|
||||
@ -97,6 +97,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import mobileCheckbox from '@/assets/svg/mobile-checkbox.svg'
|
||||
import dvLock from '@/assets/svg/dv-lock.svg'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import calculateComponentPositionAndSize, {
|
||||
calculateRadioComponentPositionAndSize
|
||||
@ -160,7 +162,7 @@ const state = reactive({
|
||||
id: ''
|
||||
},
|
||||
// 禁止移入Tab中的组件
|
||||
ignoreTabMoveComponent: ['de-button', 'de-reset-button', 'DeTabs', 'Group'],
|
||||
ignoreTabMoveComponent: ['de-button', 'de-reset-button', 'DeTabs', 'Group', 'GroupArea'],
|
||||
// 当画布在tab中是 宽度左右拓展的余量
|
||||
parentWidthTabOffset: 40,
|
||||
canvasChangeTips: 'none',
|
||||
@ -524,6 +526,7 @@ const handleMouseDownOnShape = e => {
|
||||
if (
|
||||
!isMainCanvas(canvasId.value) &&
|
||||
!isGroupCanvas(canvasId.value) &&
|
||||
!isGroupArea.value &&
|
||||
(left < -30 || left + componentWidth - canvasWidth > 30)
|
||||
) {
|
||||
contentDisplay.value = false
|
||||
@ -826,6 +829,30 @@ const commonBackgroundSvgInner = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const padding3D = computed(() => {
|
||||
const width = defaultStyle.value.width // 原始元素宽度
|
||||
const height = defaultStyle.value.height // 原始元素高度
|
||||
const rotateX = element.value['multiDimensional'].x // 旋转X角度
|
||||
const rotateY = element.value['multiDimensional'].y // 旋转Y角度
|
||||
|
||||
// 将角度转换为弧度
|
||||
const radX = (rotateX * Math.PI) / 180
|
||||
const radY = (rotateY * Math.PI) / 180
|
||||
|
||||
// 计算旋转后新宽度和高度
|
||||
const newWidth = Math.abs(width * Math.cos(radY)) + Math.abs(height * Math.sin(radX))
|
||||
const newHeight = Math.abs(height * Math.cos(radX)) + Math.abs(width * Math.sin(radY))
|
||||
|
||||
// 计算需要的 padding
|
||||
const paddingX = (newWidth - width) / 2
|
||||
const paddingY = (newHeight - height) / 2
|
||||
|
||||
return {
|
||||
paddingX: `${paddingX}px`,
|
||||
paddingY: `${paddingY}px`
|
||||
}
|
||||
})
|
||||
|
||||
const componentBackgroundStyle = computed(() => {
|
||||
if (element.value.commonBackground && element.value.component !== 'GroupArea') {
|
||||
const {
|
||||
@ -961,7 +988,25 @@ const tabMoveInCheck = async () => {
|
||||
const slotStyle = computed(() => {
|
||||
// 3d效果支持
|
||||
if (element.value['multiDimensional'] && element.value['multiDimensional']?.enable) {
|
||||
const width = defaultStyle.value.width // 原始元素宽度
|
||||
const height = defaultStyle.value.height // 原始元素高度
|
||||
const rotateX = element.value['multiDimensional'].x // 旋转X角度
|
||||
const rotateY = element.value['multiDimensional'].y // 旋转Y角度
|
||||
|
||||
// 将角度转换为弧度
|
||||
const radX = (rotateX * Math.PI) / 180
|
||||
const radY = (rotateY * Math.PI) / 180
|
||||
|
||||
// 计算旋转后新宽度和高度
|
||||
const newWidth = Math.abs(width * Math.cos(radY)) + Math.abs(height * Math.sin(radX))
|
||||
const newHeight = Math.abs(height * Math.cos(radX)) + Math.abs(width * Math.sin(radY))
|
||||
|
||||
// 计算需要的 padding
|
||||
const paddingX = (newWidth - width) / 2
|
||||
const paddingY = (newHeight - height) / 2
|
||||
|
||||
return {
|
||||
padding: `${paddingY}px ${paddingX}px`,
|
||||
transform: `rotateX(${element.value['multiDimensional'].x}deg) rotateY(${element.value['multiDimensional'].y}deg) rotateZ(${element.value['multiDimensional'].z}deg)`
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
|
||||
import icon_close_outlined from '@/assets/svg/icon_close_outlined.svg'
|
||||
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
|
||||
import icon_right_outlined from '@/assets/svg/icon_right_outlined.svg'
|
||||
import { nextTick, ref, watch } from 'vue'
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import { ElButton, ElDivider, ElIcon } from 'element-plus-secondary'
|
||||
@ -50,7 +54,7 @@ watch(
|
||||
<span class="title">个结果</span>
|
||||
<el-divider direction="vertical" />
|
||||
<el-icon @click="scrollPre" class="arrow-left arrow-filter" v-if="showScroll">
|
||||
<Icon name="icon_left_outlined"></Icon>
|
||||
<Icon name="icon_left_outlined"><icon_left_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<div class="filter-texts-container" ref="container">
|
||||
<p v-for="(ele, index) in filterTexts" :key="ele" class="text">
|
||||
@ -58,7 +62,7 @@ watch(
|
||||
{{ ele }}
|
||||
</el-tooltip>
|
||||
<el-icon @click="clearFilter(index)">
|
||||
<Icon name="icon_close_outlined"></Icon>
|
||||
<Icon name="icon_close_outlined"><icon_close_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</p>
|
||||
<el-button
|
||||
@ -68,13 +72,15 @@ watch(
|
||||
@click="clearFilterAll"
|
||||
>
|
||||
<template #icon>
|
||||
<Icon name="icon_delete-trash_outlined"></Icon>
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</template>
|
||||
清空条件</el-button
|
||||
>
|
||||
</div>
|
||||
<el-icon @click="scrollNext" class="arrow-right arrow-filter" v-if="showScroll">
|
||||
<Icon name="icon_right_outlined"></Icon>
|
||||
<Icon name="icon_right_outlined"><icon_right_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-button
|
||||
type="text"
|
||||
@ -84,7 +90,9 @@ watch(
|
||||
@click="clearFilterAll"
|
||||
>
|
||||
<template #icon>
|
||||
<Icon name="icon_delete-trash_outlined"></Icon>
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</template>
|
||||
清空条件</el-button
|
||||
>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import type { Placement } from 'element-plus-secondary'
|
||||
import { ref, PropType } from 'vue'
|
||||
@ -21,7 +22,7 @@ const props = defineProps({
|
||||
type: String as () => Placement,
|
||||
default: 'bottom-end'
|
||||
},
|
||||
iconName: propTypes.string.def('icon_more_outlined'),
|
||||
iconName: propTypes.string.def(''),
|
||||
inTable: propTypes.bool.def(false),
|
||||
resourceType: propTypes.string.def('dashboard'),
|
||||
node: {
|
||||
@ -67,7 +68,7 @@ const emit = defineEmits(['handleCommand'])
|
||||
@command="handleCommand"
|
||||
>
|
||||
<el-icon class="hover-icon" :class="inTable && 'hover-icon-in-table'" @click.stop>
|
||||
<Icon :name="iconName"></Icon>
|
||||
<Icon><component class="svg-icon" :is="iconName || icon_more_outlined"></component></Icon>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
@ -80,7 +81,7 @@ const emit = defineEmits(['handleCommand'])
|
||||
:class="{ 'de-hidden-drop-item': ele.hidden }"
|
||||
>
|
||||
<el-icon class="handle-icon" v-if="ele.svgName">
|
||||
<Icon :name="ele.svgName"></Icon>
|
||||
<Icon><component class="svg-icon" :is="ele.svgName"></component></Icon>
|
||||
</el-icon>
|
||||
{{ ele.label }}
|
||||
</el-dropdown-item>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import type { Placement } from 'element-plus-secondary'
|
||||
import { PropType } from 'vue'
|
||||
@ -20,7 +21,7 @@ defineProps({
|
||||
type: String as () => Placement,
|
||||
default: 'bottom-end'
|
||||
},
|
||||
iconName: propTypes.string.def('icon_more_outlined'),
|
||||
iconName: propTypes.string.def(''),
|
||||
iconSize: propTypes.string.def('16px'),
|
||||
inTable: propTypes.bool.def(false)
|
||||
})
|
||||
@ -40,7 +41,7 @@ const emit = defineEmits(['handleCommand'])
|
||||
@command="handleCommand"
|
||||
>
|
||||
<el-icon class="hover-icon" :class="inTable && 'hover-icon-in-table'" @click.stop>
|
||||
<Icon :name="iconName"></Icon>
|
||||
<Icon><component class="svg-icon" :is="iconName || icon_more_outlined"></component></Icon>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu :persistent="false">
|
||||
@ -52,7 +53,7 @@ const emit = defineEmits(['handleCommand'])
|
||||
:disabled="ele.disabled"
|
||||
>
|
||||
<el-icon class="handle-icon" :style="{ fontSize: iconSize }" v-if="ele.svgName">
|
||||
<Icon :name="ele.svgName"></Icon>
|
||||
<Icon><component class="svg-icon" :is="ele.svgName"></component></Icon>
|
||||
</el-icon>
|
||||
{{ ele.label }}
|
||||
</el-dropdown-item>
|
||||
|
||||
@ -3,7 +3,7 @@ import { ElIcon } from 'element-plus-secondary'
|
||||
import Icon from './src/Icon.vue'
|
||||
const hIcon = (name: string) => {
|
||||
return h(ElIcon, null, {
|
||||
default: () => h(Icon, { name })
|
||||
default: () => h(name)
|
||||
})
|
||||
}
|
||||
export { Icon, hIcon }
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
22
core/core-frontend/src/components/icon-group/board-list.ts
Normal file
22
core/core-frontend/src/components/icon-group/board-list.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import board_1 from '@/assets/svg/board_1.svg'
|
||||
import board_2 from '@/assets/svg/board_2.svg'
|
||||
import board_3 from '@/assets/svg/board_3.svg'
|
||||
import board_4 from '@/assets/svg/board_4.svg'
|
||||
import board_5 from '@/assets/svg/board_5.svg'
|
||||
import board_6 from '@/assets/svg/board_6.svg'
|
||||
import board_7 from '@/assets/svg/board_7.svg'
|
||||
import board_8 from '@/assets/svg/board_8.svg'
|
||||
import board_9 from '@/assets/svg/board_9.svg'
|
||||
|
||||
const iconBoardMap = {
|
||||
board_1: board_1,
|
||||
board_2: board_2,
|
||||
board_3: board_3,
|
||||
board_4: board_4,
|
||||
board_5: board_5,
|
||||
board_6: board_6,
|
||||
board_7: board_7,
|
||||
board_8: board_8,
|
||||
board_9: board_9
|
||||
}
|
||||
export { iconBoardMap }
|
||||
@ -0,0 +1,93 @@
|
||||
import areaDark from '@/assets/svg/area-dark.svg'
|
||||
import areaStackDark from '@/assets/svg/area-stack-dark.svg'
|
||||
import barDark from '@/assets/svg/bar-dark.svg'
|
||||
import barGroupDark from '@/assets/svg/bar-group-dark.svg'
|
||||
import barGroupStackDark from '@/assets/svg/bar-group-stack-dark.svg'
|
||||
import barHorizontalDark from '@/assets/svg/bar-horizontal-dark.svg'
|
||||
import barRangeDark from '@/assets/svg/bar-range-dark.svg'
|
||||
import barStackDark from '@/assets/svg/bar-stack-dark.svg'
|
||||
import barStackHorizontalDark from '@/assets/svg/bar-stack-horizontal-dark.svg'
|
||||
import bidirectionalBarDark from '@/assets/svg/bidirectional-bar-dark.svg'
|
||||
import bubbleMapDark from '@/assets/svg/bubble-map-dark.svg'
|
||||
import chartMixDark from '@/assets/svg/chart-mix-dark.svg'
|
||||
import chartMixGroupDark from '@/assets/svg/chart-mix-group-dark.svg'
|
||||
import chartMixStackDark from '@/assets/svg/chart-mix-stack-dark.svg'
|
||||
import chartMixDualLineDark from '@/assets/svg/chart-mix-dual-line-dark.svg'
|
||||
import flowMapDark from '@/assets/svg/flow-map-dark.svg'
|
||||
import funnelDark from '@/assets/svg/funnel-dark.svg'
|
||||
import gaugeDark from '@/assets/svg/gauge-dark.svg'
|
||||
import heatMapDark from '@/assets/svg/heat-map-dark.svg'
|
||||
import indicatorDark from '@/assets/svg/indicator-dark.svg'
|
||||
import lineDark from '@/assets/svg/line-dark.svg'
|
||||
import liquidDark from '@/assets/svg/liquid-dark.svg'
|
||||
import mapDark from '@/assets/svg/map-dark.svg'
|
||||
import percentageBarStackDark from '@/assets/svg/percentage-bar-stack-dark.svg'
|
||||
import percentageBarStackHorizontalDark from '@/assets/svg/percentage-bar-stack-horizontal-dark.svg'
|
||||
import pieDark from '@/assets/svg/pie-dark.svg'
|
||||
import pieDonutDark from '@/assets/svg/pie-donut-dark.svg'
|
||||
import pieDonutRoseDark from '@/assets/svg/pie-donut-rose-dark.svg'
|
||||
import pieRoseDark from '@/assets/svg/pie-rose-dark.svg'
|
||||
import progressBarDark from '@/assets/svg/progress-bar-dark.svg'
|
||||
import quadrantDark from '@/assets/svg/quadrant-dark.svg'
|
||||
import radarDark from '@/assets/svg/radar-dark.svg'
|
||||
import richTextDark from '@/assets/svg/rich-text-dark.svg'
|
||||
import sankeyDark from '@/assets/svg/sankey-dark.svg'
|
||||
import scatterDark from '@/assets/svg/scatter-dark.svg'
|
||||
import stockLineDark from '@/assets/svg/stock-line-dark.svg'
|
||||
import symbolicMapDark from '@/assets/svg/symbolic-map-dark.svg'
|
||||
import tableInfoDark from '@/assets/svg/table-info-dark.svg'
|
||||
import tableNormalDark from '@/assets/svg/table-normal-dark.svg'
|
||||
import tablePivotDark from '@/assets/svg/table-pivot-dark.svg'
|
||||
import treemapDark from '@/assets/svg/treemap-dark.svg'
|
||||
import waterfallDark from '@/assets/svg/waterfall-dark.svg'
|
||||
import wordCloudDark from '@/assets/svg/word-cloud-dark.svg'
|
||||
import tHeatmapDark from '@/assets/svg/t-heatmap-dark.svg'
|
||||
|
||||
const iconChartDarkMap = {
|
||||
'area-dark': areaDark,
|
||||
'area-stack-dark': areaStackDark,
|
||||
'bar-dark': barDark,
|
||||
'bar-group-dark': barGroupDark,
|
||||
'bar-group-stack-dark': barGroupStackDark,
|
||||
'bar-horizontal-dark': barHorizontalDark,
|
||||
'bar-range-dark': barRangeDark,
|
||||
'bar-stack-dark': barStackDark,
|
||||
'bar-stack-horizontal-dark': barStackHorizontalDark,
|
||||
'bidirectional-bar-dark': bidirectionalBarDark,
|
||||
'bubble-map-dark': bubbleMapDark,
|
||||
'chart-mix-dark': chartMixDark,
|
||||
'chart-mix-group-dark': chartMixGroupDark,
|
||||
'chart-mix-stack-dark': chartMixStackDark,
|
||||
'chart-mix-dual-line-dark': chartMixDualLineDark,
|
||||
'flow-map-dark': flowMapDark,
|
||||
'funnel-dark': funnelDark,
|
||||
'gauge-dark': gaugeDark,
|
||||
'heat-map-dark': heatMapDark,
|
||||
'indicator-dark': indicatorDark,
|
||||
'line-dark': lineDark,
|
||||
'liquid-dark': liquidDark,
|
||||
'map-dark': mapDark,
|
||||
'percentage-bar-stack-dark': percentageBarStackDark,
|
||||
'percentage-bar-stack-horizontal-dark': percentageBarStackHorizontalDark,
|
||||
'pie-dark': pieDark,
|
||||
'pie-donut-dark': pieDonutDark,
|
||||
'pie-donut-rose-dark': pieDonutRoseDark,
|
||||
'pie-rose-dark': pieRoseDark,
|
||||
'progress-bar-dark': progressBarDark,
|
||||
'quadrant-dark': quadrantDark,
|
||||
'radar-dark': radarDark,
|
||||
'rich-text-dark': richTextDark,
|
||||
'sankey-dark': sankeyDark,
|
||||
'scatter-dark': scatterDark,
|
||||
'stock-line-dark': stockLineDark,
|
||||
'symbolic-map-dark': symbolicMapDark,
|
||||
'table-info-dark': tableInfoDark,
|
||||
'table-normal-dark': tableNormalDark,
|
||||
'table-pivot-dark': tablePivotDark,
|
||||
'treemap-dark': treemapDark,
|
||||
'waterfall-dark': waterfallDark,
|
||||
'word-cloud-dark': wordCloudDark,
|
||||
't-heatmap-dark': tHeatmapDark
|
||||
}
|
||||
|
||||
export { iconChartDarkMap }
|
||||
95
core/core-frontend/src/components/icon-group/chart-list.ts
Normal file
95
core/core-frontend/src/components/icon-group/chart-list.ts
Normal file
@ -0,0 +1,95 @@
|
||||
import areaStack from '@/assets/svg/area-stack.svg'
|
||||
import area from '@/assets/svg/area.svg'
|
||||
import barGroupStack from '@/assets/svg/bar-group-stack.svg'
|
||||
import barGroup from '@/assets/svg/bar-group.svg'
|
||||
import barHorizontal from '@/assets/svg/bar-horizontal.svg'
|
||||
import barRange from '@/assets/svg/bar-range.svg'
|
||||
import barStackHorizontal from '@/assets/svg/bar-stack-horizontal.svg'
|
||||
import barStack from '@/assets/svg/bar-stack.svg'
|
||||
import bar from '@/assets/svg/bar.svg'
|
||||
import bidirectionalBar from '@/assets/svg/bidirectional-bar.svg'
|
||||
import bubbleMap from '@/assets/svg/bubble-map.svg'
|
||||
import chartMixGroup from '@/assets/svg/chart-mix-group.svg'
|
||||
import chartMixStack from '@/assets/svg/chart-mix-stack.svg'
|
||||
import chartMixDualLine from '@/assets/svg/chart-mix-dual-line.svg'
|
||||
import chartMix from '@/assets/svg/chart-mix.svg'
|
||||
import flowMap from '@/assets/svg/flow-map.svg'
|
||||
import funnel from '@/assets/svg/funnel.svg'
|
||||
import gauge from '@/assets/svg/gauge.svg'
|
||||
import heatMap from '@/assets/svg/heat-map.svg'
|
||||
import indicator from '@/assets/svg/indicator.svg'
|
||||
import line from '@/assets/svg/line.svg'
|
||||
import liquid from '@/assets/svg/liquid.svg'
|
||||
import map from '@/assets/svg/map.svg'
|
||||
import percentageBarStackHorizontal from '@/assets/svg/percentage-bar-stack-horizontal.svg'
|
||||
import percentageBarStack from '@/assets/svg/percentage-bar-stack.svg'
|
||||
import pieDonutRose from '@/assets/svg/pie-donut-rose.svg'
|
||||
import pieDonut from '@/assets/svg/pie-donut.svg'
|
||||
import pieRose from '@/assets/svg/pie-rose.svg'
|
||||
import pie from '@/assets/svg/pie.svg'
|
||||
import progressBar from '@/assets/svg/progress-bar.svg'
|
||||
import quadrant from '@/assets/svg/quadrant.svg'
|
||||
import radar from '@/assets/svg/radar.svg'
|
||||
import richText from '@/assets/svg/rich-text.svg'
|
||||
import sankey from '@/assets/svg/sankey.svg'
|
||||
import scatter from '@/assets/svg/scatter.svg'
|
||||
import stockLine from '@/assets/svg/stock-line.svg'
|
||||
import symbolicMap from '@/assets/svg/symbolic-map.svg'
|
||||
import tableInfo from '@/assets/svg/table-info.svg'
|
||||
import tableNormal from '@/assets/svg/table-normal.svg'
|
||||
import tablePivot from '@/assets/svg/table-pivot.svg'
|
||||
import treemap from '@/assets/svg/treemap.svg'
|
||||
import waterfall from '@/assets/svg/waterfall.svg'
|
||||
import wordCloud from '@/assets/svg/word-cloud.svg'
|
||||
import tHeatmap from '@/assets/svg/t-heatmap.svg'
|
||||
import pictureGroup from '@/assets/svg/picture-group.svg'
|
||||
|
||||
const iconChartMap = {
|
||||
'area-stack': areaStack,
|
||||
area: area,
|
||||
'bar-group-stack': barGroupStack,
|
||||
'bar-group': barGroup,
|
||||
'bar-horizontal': barHorizontal,
|
||||
'bar-range': barRange,
|
||||
'bar-stack-horizontal': barStackHorizontal,
|
||||
'bar-stack': barStack,
|
||||
bar: bar,
|
||||
'bidirectional-bar': bidirectionalBar,
|
||||
'bubble-map': bubbleMap,
|
||||
'chart-mix-group': chartMixGroup,
|
||||
'chart-mix-stack': chartMixStack,
|
||||
'chart-mix-dual-line': chartMixDualLine,
|
||||
'chart-mix': chartMix,
|
||||
'flow-map': flowMap,
|
||||
funnel: funnel,
|
||||
gauge: gauge,
|
||||
'heat-map': heatMap,
|
||||
indicator: indicator,
|
||||
line: line,
|
||||
liquid: liquid,
|
||||
map: map,
|
||||
'percentage-bar-stack-horizontal': percentageBarStackHorizontal,
|
||||
'percentage-bar-stack': percentageBarStack,
|
||||
'pie-donut-rose': pieDonutRose,
|
||||
'pie-donut': pieDonut,
|
||||
'pie-rose': pieRose,
|
||||
pie: pie,
|
||||
'progress-bar': progressBar,
|
||||
quadrant: quadrant,
|
||||
radar: radar,
|
||||
'rich-text': richText,
|
||||
sankey: sankey,
|
||||
scatter: scatter,
|
||||
'stock-line': stockLine,
|
||||
'symbolic-map': symbolicMap,
|
||||
'table-info': tableInfo,
|
||||
'table-normal': tableNormal,
|
||||
'table-pivot': tablePivot,
|
||||
treemap: treemap,
|
||||
waterfall: waterfall,
|
||||
'word-cloud': wordCloud,
|
||||
't-heatmap': tHeatmap,
|
||||
'picture-group': pictureGroup
|
||||
}
|
||||
|
||||
export { iconChartMap }
|
||||
@ -0,0 +1,34 @@
|
||||
import mysqlDs from '@/assets/svg/mysql-ds.svg'
|
||||
import oracleDs from '@/assets/svg/oracle-ds.svg'
|
||||
import sqlServerDs from '@/assets/svg/sqlServer-ds.svg'
|
||||
import TiDBDs from '@/assets/svg/TiDB-ds.svg'
|
||||
import impalaDs from '@/assets/svg/impala-ds.svg'
|
||||
import mariadbDs from '@/assets/svg/mariadb-ds.svg'
|
||||
import StarRocksDs from '@/assets/svg/StarRocks-ds.svg'
|
||||
import pgDs from '@/assets/svg/pg-ds.svg'
|
||||
import mongoDs from '@/assets/svg/mongo-ds.svg'
|
||||
import ckDs from '@/assets/svg/ck-ds.svg'
|
||||
import db2Ds from '@/assets/svg/db2-ds.svg'
|
||||
import redshiftDs from '@/assets/svg/redshift-ds.svg'
|
||||
import APIDs from '@/assets/svg/API-ds.svg'
|
||||
import ExcelDs from '@/assets/svg/Excel-ds.svg'
|
||||
import dorisDs from '@/assets/svg/doris-ds.svg'
|
||||
const iconDatasourceMap = {
|
||||
mysql: mysqlDs,
|
||||
oracle: oracleDs,
|
||||
sqlServer: sqlServerDs,
|
||||
TiDB: TiDBDs,
|
||||
impala: impalaDs,
|
||||
mariadb: mariadbDs,
|
||||
StarRocks: StarRocksDs,
|
||||
pg: pgDs,
|
||||
mongo: mongoDs,
|
||||
ck: ckDs,
|
||||
db2: db2Ds,
|
||||
redshift: redshiftDs,
|
||||
API: APIDs,
|
||||
Excel: ExcelDs,
|
||||
doris: dorisDs
|
||||
}
|
||||
|
||||
export { iconDatasourceMap }
|
||||
@ -0,0 +1,33 @@
|
||||
import icon_link_calculated_outlined from '@/assets/svg/icon_link-calculated_outlined.svg'
|
||||
import icon_link_calculated_outlined_1 from '@/assets/svg/icon_link-calculated_outlined-1.svg'
|
||||
import icon_text_calculated_outlined from '@/assets/svg/icon_text-calculated_outlined.svg'
|
||||
import icon_text_calculated_outlined_1 from '@/assets/svg/icon_text-calculated_outlined-1.svg'
|
||||
import icon_number_calculated_outlined from '@/assets/svg/icon_number-calculated_outlined.svg'
|
||||
import icon_number_calculated_outlined_1 from '@/assets/svg/icon_number-calculated_outlined-1.svg'
|
||||
import icon_local_calculated_outlined from '@/assets/svg/icon_local-calculated_outlined.svg'
|
||||
import icon_local_calculated_outlined_1 from '@/assets/svg/icon_local-calculated_outlined-1.svg'
|
||||
import icon_calendar_calculated_outlined from '@/assets/svg/icon_calendar-calculated_outlined.svg'
|
||||
import icon_calendar_calculated_outlined_1 from '@/assets/svg/icon_calendar-calculated_outlined-1.svg'
|
||||
const iconFieldCalculatedMap = [
|
||||
icon_text_calculated_outlined,
|
||||
icon_calendar_calculated_outlined,
|
||||
icon_number_calculated_outlined,
|
||||
icon_number_calculated_outlined,
|
||||
icon_number_calculated_outlined,
|
||||
icon_local_calculated_outlined,
|
||||
'binary',
|
||||
icon_link_calculated_outlined
|
||||
]
|
||||
|
||||
const iconFieldCalculatedQMap = [
|
||||
icon_text_calculated_outlined_1,
|
||||
icon_calendar_calculated_outlined_1,
|
||||
icon_number_calculated_outlined_1,
|
||||
icon_number_calculated_outlined_1,
|
||||
icon_number_calculated_outlined_1,
|
||||
icon_local_calculated_outlined_1,
|
||||
'binary',
|
||||
icon_link_calculated_outlined_1
|
||||
]
|
||||
|
||||
export { iconFieldCalculatedMap, iconFieldCalculatedQMap }
|
||||
14
core/core-frontend/src/components/icon-group/field-list.ts
Normal file
14
core/core-frontend/src/components/icon-group/field-list.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import field_text from '@/assets/svg/field_text.svg'
|
||||
import field_time from '@/assets/svg/field_time.svg'
|
||||
import field_value from '@/assets/svg/field_value.svg'
|
||||
import field_location from '@/assets/svg/field_location.svg'
|
||||
import field_url from '@/assets/svg/field_url.svg'
|
||||
const iconFieldMap = {
|
||||
text: field_text,
|
||||
value: field_value,
|
||||
location: field_location,
|
||||
time: field_time,
|
||||
url: field_url
|
||||
}
|
||||
|
||||
export { iconFieldMap }
|
||||
@ -8,6 +8,7 @@ import { i18n } from '@/plugins/vue-i18n'
|
||||
import * as Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import * as Pinia from 'pinia'
|
||||
import * as echarts from 'echarts'
|
||||
import router from '@/router'
|
||||
import tinymce from 'tinymce/tinymce'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
@ -123,6 +124,7 @@ onMounted(async () => {
|
||||
window['vueRouterDe'] = router
|
||||
window['MittAllDe'] = useEmitt().emitter.all
|
||||
window['I18nDe'] = i18n
|
||||
window['EchartsDE'] = echarts
|
||||
if (!window.tinymce) {
|
||||
window.tinymce = tinymce
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<div>预览时启用</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -26,6 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
@ -9,7 +9,9 @@
|
||||
>
|
||||
<el-row style="height: 20px">
|
||||
<el-col :span="3">
|
||||
<Icon name="warn-tree" style="width: 20px; height: 20px; float: right" />
|
||||
<Icon name="warn-tree"
|
||||
><warnTree style="width: 20px; height: 20px; float: right" class="svg-icon"
|
||||
/></Icon>
|
||||
</el-col>
|
||||
<el-col :span="21">
|
||||
<span style="font-size: 13px; margin-left: 10px; font-weight: bold; line-height: 20px">
|
||||
@ -27,6 +29,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import warnTree from '@/assets/svg/warn-tree.svg'
|
||||
import { ref } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -6,13 +6,15 @@
|
||||
@mousedown="handOptBarMousedown"
|
||||
>
|
||||
<el-button size="mini" type="warning" @click="clearAllLinkage"
|
||||
><el-icon class="bar-base-icon"> <Icon name="dv-bar-unLinkage"></Icon></el-icon
|
||||
><el-icon class="bar-base-icon">
|
||||
<Icon name="dv-bar-unLinkage"><dvBarUnLinkage class="svg-icon" /></Icon></el-icon
|
||||
>{{ $t('visualization.remove_all_linkage') }}</el-button
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import dvBarUnLinkage from '@/assets/svg/dv-bar-unLinkage.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { computed } from 'vue'
|
||||
import { isMainCanvas } from '@/utils/canvasUtils'
|
||||
|
||||
@ -25,7 +25,7 @@ const emits = defineEmits(['customClick'])
|
||||
>
|
||||
<el-col :span="24" class="group_inner" :class="{ 'inner-active': active }">
|
||||
<el-icon class="toolbar-icon">
|
||||
<Icon :name="iconName" />
|
||||
<Icon><component :is="iconName"></component></Icon>
|
||||
</el-icon>
|
||||
<span>{{ title }}</span>
|
||||
</el-col>
|
||||
|
||||
@ -20,7 +20,7 @@ const emits = defineEmits(['customClick'])
|
||||
<div class="flex-align-center">
|
||||
<el-row class="group_icon" :title="tips" @click="emits('customClick')">
|
||||
<el-col :span="24" class="group_inner" :class="{ 'inner-active': active }">
|
||||
<Icon class="toolbar-icon" :name="iconName" />
|
||||
<Icon><component class="svg-icon toolbar-icon" :is="iconName"></component></Icon>
|
||||
<span>{{ title }}</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@ -23,12 +23,12 @@
|
||||
<template v-if="element.component === 'VQuery' && showPosition === 'canvas'">
|
||||
<span title="添加查询条件">
|
||||
<el-icon class="bar-base-icon" @click="addQueryCriteria">
|
||||
<Icon name="icon_add_outlined"></Icon
|
||||
<Icon name="icon_add_outlined"><icon_add_outlined class="svg-icon" /></Icon
|
||||
></el-icon>
|
||||
</span>
|
||||
<span title="编辑查询条件">
|
||||
<el-icon class="bar-base-icon" @click="editQueryCriteria">
|
||||
<Icon name="icon_edit_outlined"></Icon
|
||||
<Icon name="icon_edit_outlined"><icon_edit_outlined class="svg-icon" /></Icon
|
||||
></el-icon>
|
||||
</span>
|
||||
</template>
|
||||
@ -40,7 +40,7 @@
|
||||
>
|
||||
<span>
|
||||
<el-icon class="bar-base-icon" @click="userViewEnlargeOpen($event, 'enlarge')">
|
||||
<Icon name="dv-bar-enlarge" />
|
||||
<Icon name="dv-bar-enlarge"><dvBarEnlarge class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@ -52,7 +52,7 @@
|
||||
>
|
||||
<span>
|
||||
<el-icon class="bar-base-icon" @click="userViewEnlargeOpen($event, 'details')">
|
||||
<Icon name="dv-details" />
|
||||
<Icon name="dv-details"><dvDetails class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@ -64,7 +64,7 @@
|
||||
>
|
||||
<span>
|
||||
<el-icon class="bar-base-icon" @click="datasetParamsInit">
|
||||
<Icon name="icon_params_setting"></Icon>
|
||||
<Icon name="icon_params_setting"><icon_params_setting class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
</el-tooltip>
|
||||
@ -82,7 +82,7 @@
|
||||
v-if="barShowCheck('unLinkage') && existLinkage"
|
||||
>
|
||||
<el-icon class="bar-base-icon" @click="clearLinkage">
|
||||
<Icon name="dv-bar-unLinkage" />
|
||||
<Icon name="dv-bar-unLinkage"><dvBarUnLinkage class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</span>
|
||||
<div v-if="barShowCheck('batchOpt')" class="bar-checkbox-area">
|
||||
@ -97,7 +97,7 @@
|
||||
>
|
||||
<el-icon class="bar-base-icon">
|
||||
<el-tooltip :content="t('visualization.more')" effect="dark" placement="bottom">
|
||||
<icon name="icon_more_outlined" />
|
||||
<icon name="icon_more_outlined"><icon_more_outlined class="svg-icon" /></icon>
|
||||
</el-tooltip>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
@ -118,7 +118,7 @@
|
||||
>
|
||||
<el-dropdown-item
|
||||
style="padding: 0"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('download')"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('download') && showDownload"
|
||||
@click.prevent
|
||||
>
|
||||
<el-dropdown style="width: 100%" trigger="hover" placement="right-start">
|
||||
@ -161,11 +161,16 @@
|
||||
<el-dropdown
|
||||
trigger="click"
|
||||
placement="right-start"
|
||||
v-if="element.innerType !== 'rich-text' && barShowCheck('previewDownload') && authShow"
|
||||
v-if="
|
||||
element.innerType !== 'rich-text' &&
|
||||
barShowCheck('previewDownload') &&
|
||||
authShow &&
|
||||
showDownload
|
||||
"
|
||||
>
|
||||
<el-icon @click="downloadClick" class="bar-base-icon">
|
||||
<el-tooltip :content="t('chart.export')" effect="dark" placement="bottom">
|
||||
<icon name="dv-preview-download" />
|
||||
<icon name="dv-preview-download"><dvPreviewDownload class="svg-icon" /></icon>
|
||||
</el-tooltip>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
@ -184,7 +189,9 @@
|
||||
</el-dropdown>
|
||||
<el-popover v-if="selectFieldShow" width="200" trigger="click" @mousedown="fieldsAreaDown">
|
||||
<template #reference>
|
||||
<el-icon class="bar-base-icon"> <Icon name="database"></Icon></el-icon>
|
||||
<el-icon class="bar-base-icon">
|
||||
<Icon name="database"><database class="svg-icon" /></Icon
|
||||
></el-icon>
|
||||
</template>
|
||||
<fields-list :fields="state.curFields" :element="element" />
|
||||
</el-popover>
|
||||
@ -193,6 +200,15 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import icon_edit_outlined from '@/assets/svg/icon_edit_outlined.svg'
|
||||
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
|
||||
import dvBarEnlarge from '@/assets/svg/dv-bar-enlarge.svg'
|
||||
import dvDetails from '@/assets/svg/dv-details.svg'
|
||||
import icon_params_setting from '@/assets/svg/icon_params_setting.svg'
|
||||
import dvBarUnLinkage from '@/assets/svg/dv-bar-unLinkage.svg'
|
||||
import database from '@/assets/svg/database.svg'
|
||||
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
|
||||
import dvPreviewDownload from '@/assets/svg/dv-preview-download.svg'
|
||||
import { computed, h, onBeforeUnmount, onMounted, reactive, ref, toRefs, watch } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -572,6 +588,8 @@ const initCurFields = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const showDownload = computed(() => canvasViewInfo.value[element.value.id]?.dataFrom !== 'template')
|
||||
// 富文本-End
|
||||
|
||||
const datasetParamsSetShow = computed(() => {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import language from '@/assets/svg/language.svg'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { Icon } from '@/components/icon-custom'
|
||||
import { useUserStoreWithOut } from '@/store/modules/user'
|
||||
@ -17,7 +18,7 @@ onMounted(() => {
|
||||
@command="handleSetLanguage"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="language" />
|
||||
<Icon name="language"><language class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
|
||||
@ -14,16 +14,19 @@
|
||||
<div class="top-area">
|
||||
<span class="top-area-text">已选图表:</span>
|
||||
<span class="top-area-value">
|
||||
<Icon class-name="view-type-icon" :name="state.curJumpViewInfo.type" />
|
||||
<Icon class-name="view-type-icon"
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
:is="iconChartMap[state.curJumpViewInfo.type]"
|
||||
></component
|
||||
></Icon>
|
||||
{{ state.curJumpViewInfo.title }}</span
|
||||
>
|
||||
<span class="top-area-text margin-left">所用数据集:</span>
|
||||
<span class="top-area-value">
|
||||
<Icon
|
||||
style="vertical-align: -0.2em"
|
||||
class-name="view-type-icon"
|
||||
name="dataset-outline"
|
||||
/>
|
||||
<Icon name="dataset-outline"
|
||||
><datasetOutline style="vertical-align: -0.2em" class="svg-icon view-type-icon"
|
||||
/></Icon>
|
||||
{{ state.curDatasetInfo.name }}</span
|
||||
>
|
||||
</div>
|
||||
@ -64,9 +67,12 @@
|
||||
<span class="tree-select-field">
|
||||
<el-icon style="margin-right: 4px">
|
||||
<Icon
|
||||
:name="`field_${fieldType[data.sourceDeType]}`"
|
||||
:className="`field-icon-${fieldType[data.sourceDeType]}`"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon"
|
||||
:class="`field-icon-${fieldType[data.sourceDeType]}`"
|
||||
:is="iconFieldMap[fieldType[data.sourceDeType]]"
|
||||
></component
|
||||
></Icon>
|
||||
</el-icon>
|
||||
{{ data.sourceFieldName }}
|
||||
</span>
|
||||
@ -114,6 +120,20 @@
|
||||
<el-radio label="newPop">{{ t('visualization.pop_window') }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
class="radio-group-box"
|
||||
v-if="state.linkJumpInfo?.jumpType === 'newPop'"
|
||||
>
|
||||
<template #label>
|
||||
<span class="title">窗口大小</span>
|
||||
</template>
|
||||
<el-radio-group class="larger-radio" v-model="state.linkJumpInfo.windowSize">
|
||||
<el-radio label="large">大</el-radio>
|
||||
<el-radio label="middle">中</el-radio>
|
||||
<el-radio label="small">小</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-header>
|
||||
|
||||
<el-main class="settings-main">
|
||||
@ -135,7 +155,9 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="icon-center">
|
||||
<Icon style="width: 20px; height: 20px" name="dv-link-target" />
|
||||
<Icon name="dv-link-target"
|
||||
><dvLinkTarget style="width: 20px; height: 20px" class="svg-icon"
|
||||
/></Icon>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<el-form-item>
|
||||
@ -156,10 +178,12 @@
|
||||
style="display: inline-block"
|
||||
v-if="data.leaf"
|
||||
>
|
||||
<Icon name="dv-dashboard-spine"></Icon>
|
||||
<Icon name="dv-dashboard-spine"
|
||||
><dvDashboardSpine class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<el-icon size="18px" style="display: inline-block" v-else>
|
||||
<Icon name="dv-folder"></Icon>
|
||||
<Icon name="dv-folder"><dvFolder class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<span
|
||||
style="margin-left: 8px; font-size: 14px"
|
||||
@ -203,10 +227,13 @@
|
||||
>
|
||||
<span class="custom-option">
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[curViewField.deType]}`"
|
||||
:className="`field-icon-${fieldType[curViewField.deType]}`"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon"
|
||||
style="width: 14px; height: 14px"
|
||||
:class="`field-icon-${fieldType[curViewField.deType]}`"
|
||||
:is="iconFieldMap[fieldType[curViewField.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="float: left; margin-left: 4px; font-size: 14px">{{
|
||||
curViewField.name
|
||||
}}</span>
|
||||
@ -215,7 +242,9 @@
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="icon-center">
|
||||
<Icon style="width: 20px; height: 20px" name="dv-link-target" />
|
||||
<Icon name="dv-link-target"
|
||||
><dvLinkTarget style="width: 20px; height: 20px" class="svg-icon"
|
||||
/></Icon>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
<el-select
|
||||
@ -233,10 +262,12 @@
|
||||
>
|
||||
<span class="custom-option">
|
||||
<Icon
|
||||
:name="item.type"
|
||||
class-name="view-type-icon"
|
||||
style="width: 14px; height: 14px"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
style="width: 14px; height: 14px"
|
||||
:is="iconChartMap[item.type]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="float: left; margin-left: 4px; font-size: 14px">{{
|
||||
item.title
|
||||
}}</span>
|
||||
@ -261,10 +292,13 @@
|
||||
>
|
||||
<span class="custom-option">
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[viewField.deType]}`"
|
||||
:className="`field-icon-${fieldType[viewField.deType]}`"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon"
|
||||
style="width: 14px; height: 14px"
|
||||
:class="`field-icon-${fieldType[viewField.deType]}`"
|
||||
:is="iconFieldMap[fieldType[viewField.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="float: left; margin-left: 4px; font-size: 14px">{{
|
||||
viewField.name
|
||||
}}</span>
|
||||
@ -279,7 +313,9 @@
|
||||
@click="deleteLinkJumpField(index)"
|
||||
>
|
||||
<el-icon size="20px">
|
||||
<Icon name="icon_delete-trash_outlined" />
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
@ -308,7 +344,9 @@
|
||||
{{ $t('visualization.target_url_tips') }}
|
||||
</template>
|
||||
<el-icon size="16px" class="hint-icon">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"
|
||||
><icon_info_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -328,7 +366,9 @@
|
||||
<span v-html="$t('chart.reference_field_tip')"></span>
|
||||
</template>
|
||||
<el-icon size="16px" class="hint-icon">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"
|
||||
><icon_info_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
@ -353,9 +393,12 @@
|
||||
>
|
||||
<el-icon>
|
||||
<Icon
|
||||
:name="`field_${fieldType[item.sourceDeType]}`"
|
||||
:className="`field-icon-${fieldType[item.sourceDeType]}`"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon"
|
||||
:class="`field-icon-${fieldType[item.sourceDeType]}`"
|
||||
:is="iconFieldMap[fieldType[item.sourceDeType]]"
|
||||
></component
|
||||
></Icon>
|
||||
</el-icon>
|
||||
{{ item.sourceFieldName }}
|
||||
</span>
|
||||
@ -387,6 +430,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { iconFieldMap } from '@/components/icon-group/field-list'
|
||||
import { iconChartMap } from '@/components/icon-group/chart-list'
|
||||
import datasetOutline from '@/assets/svg/dataset-outline.svg'
|
||||
import dvLinkTarget from '@/assets/svg/dv-link-target.svg'
|
||||
import dvDashboardSpine from '@/assets/svg/dv-dashboard-spine.svg'
|
||||
import dvFolder from '@/assets/svg/dv-folder.svg'
|
||||
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import {
|
||||
queryVisualizationJumpInfo,
|
||||
queryWithViewId,
|
||||
@ -985,7 +1036,7 @@ span {
|
||||
height: 100%;
|
||||
|
||||
.settings-header {
|
||||
height: 92px;
|
||||
height: auto;
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
|
||||
.radio-group-box {
|
||||
@ -1010,6 +1061,7 @@ span {
|
||||
|
||||
.settings-main {
|
||||
padding: 16px;
|
||||
overflow: hidden;
|
||||
.empty {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@ -1,247 +0,0 @@
|
||||
<template>
|
||||
<el-popover width="400" trigger="click" style="max-height: 400px; overflow-y: auto">
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<div class="ellipsis-area">{{ sourceLinkageInfo.targetViewName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<div class="ellipsis-area">{{ linkageInfo.targetViewName }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row class="match-area">
|
||||
<el-row v-for="(itemLinkage, index) in linkageInfo.linkageFields" :key="index">
|
||||
<el-col :span="11">
|
||||
<div class="select-filed">
|
||||
<el-select v-model="itemLinkage.sourceField" size="small" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sourceLinkageInfo.targetViewFields"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float: left">
|
||||
<svg-icon
|
||||
v-if="item.deType === 0"
|
||||
icon-class="field_text"
|
||||
class="field-icon-text"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 1"
|
||||
icon-class="field_time"
|
||||
class="field-icon-time"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 2 || item.deType === 3"
|
||||
icon-class="field_value"
|
||||
class="field-icon-value"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 5"
|
||||
icon-class="field_location"
|
||||
class="field-icon-location"
|
||||
/>
|
||||
</span>
|
||||
<span class="name-area">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<div class="select-filed">
|
||||
<el-select v-model="itemLinkage.targetField" size="small" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in linkageInfo.targetViewFields"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
<span style="float: left">
|
||||
<svg-icon
|
||||
v-if="item.deType === 0"
|
||||
icon-class="field_text"
|
||||
class="field-icon-text"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 1"
|
||||
icon-class="field_time"
|
||||
class="field-icon-time"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 2 || item.deType === 3"
|
||||
icon-class="field_value"
|
||||
class="field-icon-value"
|
||||
/>
|
||||
<svg-icon
|
||||
v-if="item.deType === 5"
|
||||
icon-class="field_location"
|
||||
class="field-icon-location"
|
||||
/>
|
||||
</span>
|
||||
<span class="name-area">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<div>
|
||||
<el-button
|
||||
:icon="Delete"
|
||||
text
|
||||
size="small"
|
||||
class="delete-area"
|
||||
@click="deleteLinkageField(index)"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>
|
||||
|
||||
<el-row class="bottom">
|
||||
<el-button size="small" type="success" :icon="Plus" round @click="addLinkageField(null, null)"
|
||||
>追加联动依赖字段</el-button
|
||||
>
|
||||
</el-row>
|
||||
|
||||
<template #reference>
|
||||
<el-icon class="bar-base-icon"><Edit /></el-icon>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { checkSameDataSet } from '@/api/chart'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { computed, onMounted, toRefs } from 'vue'
|
||||
import { Plus, Delete } from '@element-plus/icons-vue'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { targetLinkageInfo, curLinkageView } = storeToRefs(dvMainStore)
|
||||
|
||||
const props = defineProps({
|
||||
element: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
active: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
// 当前模式 preview 预览 edit 编辑,
|
||||
activeModel: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'preview'
|
||||
}
|
||||
})
|
||||
|
||||
const { element } = toRefs(props)
|
||||
const linkageInfo = computed(() => {
|
||||
return targetLinkageInfo.value[element.value.id]
|
||||
})
|
||||
|
||||
const sourceLinkageInfo = computed(() => {
|
||||
return targetLinkageInfo.value[curLinkageView.value.id]
|
||||
})
|
||||
|
||||
const deleteLinkageField = index => {
|
||||
linkageInfo.value.linkageFields.splice(index, 1)
|
||||
}
|
||||
|
||||
const addLinkageField = (sourceFieldId, targetFieldId) => {
|
||||
const linkageFieldItem = {
|
||||
sourceField: sourceFieldId,
|
||||
targetField: targetFieldId
|
||||
}
|
||||
linkageInfo.value.linkageFields.push(linkageFieldItem)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系
|
||||
checkSameDataSet(curLinkageView.value.id, element.value.id).then(res => {
|
||||
if (res.data === 'YES' && linkageInfo.value.linkageFields.length === 0) {
|
||||
sourceLinkageInfo.value.targetViewFields.forEach(item => {
|
||||
addLinkageField(item.id, item.id)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.custom-icon {
|
||||
color: white;
|
||||
}
|
||||
.name-area {
|
||||
float: left;
|
||||
color: #8492a6;
|
||||
font-size: 12px;
|
||||
}
|
||||
.slot-class {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
.ellipsis-area {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
overflow: hidden; /*超出部分隐藏*/
|
||||
white-space: nowrap; /*不换行*/
|
||||
text-overflow: ellipsis; /*超出部分文字以...显示*/
|
||||
background-color: #f7f8fa;
|
||||
color: #3d4d66;
|
||||
font-size: 12px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.select-filed {
|
||||
margin-left: 10px;
|
||||
margin-right: 10px;
|
||||
overflow: hidden; /*超出部分隐藏*/
|
||||
white-space: nowrap; /*不换行*/
|
||||
text-overflow: ellipsis; /*超出部分文字以...显示*/
|
||||
color: #3d4d66;
|
||||
font-size: 12px;
|
||||
line-height: 35px;
|
||||
height: 35px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.ed-popover {
|
||||
height: 200px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.bar-base-icon {
|
||||
height: 22px;
|
||||
width: 22px;
|
||||
color: #ffffff;
|
||||
&:hover {
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
&:active {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 20px;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.delete-area {
|
||||
float: left;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.match-area {
|
||||
display: inline-block;
|
||||
height: 120px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
@ -17,16 +17,19 @@
|
||||
<div class="top-area">
|
||||
<span class="top-area-text" style="margin-left: 0">已选图表:</span>
|
||||
<span class="top-area-value">
|
||||
<Icon class-name="view-type-icon" :name="state.curLinkageViewInfo.type" />
|
||||
<Icon class-name="view-type-icon"
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
:is="iconChartMap[state.curLinkageViewInfo.type]"
|
||||
></component
|
||||
></Icon>
|
||||
{{ state.curLinkageViewInfo.title }}</span
|
||||
>
|
||||
<span class="top-area-text">所用数据集:</span>
|
||||
<span class="top-area-value">
|
||||
<Icon
|
||||
style="vertical-align: -0.2em"
|
||||
class-name="view-type-icon"
|
||||
name="dataset-outline"
|
||||
/>
|
||||
<Icon class-name="view-type-icon" name="dataset-outline"
|
||||
><datasetOutline style="vertical-align: -0.2em" class="svg-icon view-type-icon"
|
||||
/></Icon>
|
||||
{{ state.curDatasetInfo.name }}</span
|
||||
>
|
||||
</div>
|
||||
@ -82,11 +85,13 @@
|
||||
</span>
|
||||
<span>
|
||||
<span class="tree-select-field">
|
||||
<Icon
|
||||
class-name="view-type-icon"
|
||||
style="margin-right: 4px"
|
||||
:name="data.targetViewType"
|
||||
/>
|
||||
<Icon class-name="view-type-icon"
|
||||
><component
|
||||
:is="iconChartMap[data.targetViewType]"
|
||||
style="margin-right: 4px"
|
||||
class="svg-icon view-type-icon"
|
||||
></component
|
||||
></Icon>
|
||||
{{ data.targetViewName }}
|
||||
</span>
|
||||
</span>
|
||||
@ -129,11 +134,13 @@
|
||||
</span>
|
||||
<span>
|
||||
<span class="tree-select-field">
|
||||
<Icon
|
||||
class-name="view-type-icon"
|
||||
style="margin-right: 4px"
|
||||
:name="data.targetViewType"
|
||||
/>
|
||||
<Icon :name="data.targetViewType"
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
style="margin-right: 4px"
|
||||
:is="iconChartMap[data.targetViewType]"
|
||||
></component
|
||||
></Icon>
|
||||
{{ data.targetViewName }}
|
||||
</span>
|
||||
</span>
|
||||
@ -174,10 +181,13 @@
|
||||
>
|
||||
<span class="custom-option">
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[item.deType]}`"
|
||||
:className="`field-icon-${fieldType[item.deType]}`"
|
||||
/>
|
||||
><component
|
||||
style="width: 14px; height: 14px"
|
||||
:class="`field-icon-${fieldType[item.deType]}`"
|
||||
class="svg-icon"
|
||||
:is="iconFieldMap[fieldType[item.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="float: left; margin-left: 4px; font-size: 14px">{{
|
||||
item.name
|
||||
}}</span>
|
||||
@ -187,7 +197,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-icon class="link-icon-join">
|
||||
<Icon style="width: 20px; height: 20px" name="dv-link-target" />
|
||||
<Icon style="width: 20px; height: 20px" name="dv-link-target"
|
||||
><dvLinkTarget style="width: 20px; height: 20px" class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<div style="flex: 1">
|
||||
<div class="select-filed">
|
||||
@ -204,10 +216,13 @@
|
||||
>
|
||||
<span class="custom-option">
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[item.deType]}`"
|
||||
:className="`field-icon-${fieldType[item.deType]}`"
|
||||
/>
|
||||
><component
|
||||
style="width: 14px; height: 14px"
|
||||
class="svg-icon"
|
||||
:class="`field-icon-${fieldType[item.deType]}`"
|
||||
:is="iconFieldMap[fieldType[item.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="float: left; margin-left: 4px; font-size: 14px">{{
|
||||
item.name
|
||||
}}</span>
|
||||
@ -219,7 +234,9 @@
|
||||
|
||||
<el-button class="m-del-icon-btn" text @click="deleteLinkageField(index)">
|
||||
<el-icon size="20px">
|
||||
<Icon name="icon_delete-trash_outlined" />
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
@ -232,7 +249,9 @@
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row v-else style="height: 100%" class="custom-position">
|
||||
<Icon style="width: 125px; height: 125px" name="dv-empty" />
|
||||
<Icon name="dv-empty"
|
||||
><dvEmpty style="width: 125px; height: 125px" class="svg-icon"
|
||||
/></Icon>
|
||||
<span style="margin-top: 8px; font-size: 14px">请先勾选需要联动的图表</span>
|
||||
</el-row>
|
||||
</el-col>
|
||||
@ -249,6 +268,12 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { iconFieldMap } from '@/components/icon-group/field-list'
|
||||
import { iconChartMap } from '@/components/icon-group/chart-list'
|
||||
import datasetOutline from '@/assets/svg/dataset-outline.svg'
|
||||
import dvLinkTarget from '@/assets/svg/dv-link-target.svg'
|
||||
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
|
||||
import dvEmpty from '@/assets/svg/dv-empty.svg'
|
||||
import { queryVisualizationJumpInfo } from '@/api/visualization/linkJump'
|
||||
import { reactive, ref, nextTick, watch, computed } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
style="margin-right: 16px"
|
||||
@handle-command="cmd => outerParamsOperation(cmd, node, data)"
|
||||
:menu-list="state.optMenu"
|
||||
icon-name="icon_more_outlined"
|
||||
:icon-name="icon_more_outlined"
|
||||
placement="bottom-start"
|
||||
></handle-more>
|
||||
</span>
|
||||
@ -94,11 +94,9 @@
|
||||
>
|
||||
<div style="width: 16px"></div>
|
||||
<div style="flex: 1; line-height: 32px">
|
||||
<Icon
|
||||
style="margin-top: 4px"
|
||||
class-name="view-type-icon"
|
||||
name="filter-params"
|
||||
/>
|
||||
<Icon name="filter-params"
|
||||
><filterParams style="margin-top: 4px" class="svg-icon view-type-icon"
|
||||
/></Icon>
|
||||
<span>{{ findFilterName(baseFilter.id) }}</span>
|
||||
</div>
|
||||
<div style="flex: 1">
|
||||
@ -157,7 +155,7 @@
|
||||
<div style="flex: 1; display: flex; line-height: 32px">
|
||||
<div style="width: 16px; margin-top: 2px; margin-right: 4px">
|
||||
<el-icon>
|
||||
<Icon name="icon_dataset" />
|
||||
<Icon name="icon_dataset"><icon_dataset class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
<span>{{ baseDatasetInfo.name }}</span>
|
||||
@ -189,10 +187,13 @@
|
||||
:value="item.attachId"
|
||||
>
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[item.deType]}`"
|
||||
:className="`field-icon-${fieldType[item.deType]}`"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon"
|
||||
style="width: 14px; height: 14px"
|
||||
:class="`field-icon-${fieldType[item.deType]}`"
|
||||
:is="iconFieldMap[fieldType[item.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="font-size: 12px">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -229,10 +230,12 @@
|
||||
</div>
|
||||
<div>
|
||||
<Icon
|
||||
class-name="view-type-icon"
|
||||
style="margin: 0 4px"
|
||||
:name="viewInfo.chartType"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
style="margin: 0 4px"
|
||||
:is="iconChartMap[viewInfo.chartType]"
|
||||
></component
|
||||
></Icon>
|
||||
</div>
|
||||
<span style="font-size: 12px"> {{ viewInfo.chartName }}</span>
|
||||
</div>
|
||||
@ -284,6 +287,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import _delete from '@/assets/svg/delete.svg'
|
||||
import edit from '@/assets/svg/edit.svg'
|
||||
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
|
||||
import filterParams from '@/assets/svg/filter-params.svg'
|
||||
import icon_dataset from '@/assets/svg/icon_dataset.svg'
|
||||
import { ref, reactive, computed, nextTick } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -297,6 +305,8 @@ import HandleMore from '@/components/handle-more/src/HandleMore.vue'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { iconChartMap } from '../icon-group/chart-list'
|
||||
import { iconFieldMap } from '../icon-group/field-list'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { dvInfo, componentData } = storeToRefs(dvMainStore)
|
||||
const outerParamsInfoTree = ref(null)
|
||||
@ -312,12 +322,12 @@ const state = reactive({
|
||||
optMenu: [
|
||||
{
|
||||
label: '重命名',
|
||||
svgName: 'edit',
|
||||
svgName: edit,
|
||||
command: 'rename'
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
svgName: 'delete',
|
||||
svgName: _delete,
|
||||
command: 'delete'
|
||||
}
|
||||
],
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
style="margin-right: 10px"
|
||||
@handle-command="cmd => outerParamsOperation(cmd, node, data)"
|
||||
:menu-list="state.optMenu"
|
||||
icon-name="icon_more_outlined"
|
||||
:icon-name="icon_more_outlined"
|
||||
placement="bottom-start"
|
||||
></handle-more>
|
||||
</span>
|
||||
@ -103,18 +103,22 @@
|
||||
:label="item.title"
|
||||
:value="item.id"
|
||||
>
|
||||
<Icon
|
||||
class-name="view-type-icon"
|
||||
style="margin-right: 4px"
|
||||
:name="item.type"
|
||||
/>
|
||||
<Icon class-name="view-type-icon"
|
||||
><component
|
||||
class="svg-icon view-type-icon"
|
||||
style="margin-right: 4px"
|
||||
:is="iconChartMap[item.type]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="font-size: 12px"> {{ item.title }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</div>
|
||||
<el-icon class="link-icon-join">
|
||||
<Icon style="width: 20px; height: 20px" name="dv-link-target" />
|
||||
<Icon name="dv-link-target"
|
||||
><dvLinkTarget style="width: 20px; height: 20px" class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<div style="flex: 1">
|
||||
<div class="select-filed">
|
||||
@ -134,9 +138,11 @@
|
||||
>
|
||||
<Icon
|
||||
style="width: 14px; height: 14px"
|
||||
:name="`field_${fieldType[viewField.deType]}`"
|
||||
:className="`field-icon-${fieldType[viewField.deType]}`"
|
||||
/>
|
||||
><component
|
||||
:is="iconFieldMap[fieldType[viewField.deType]]"
|
||||
></component
|
||||
></Icon>
|
||||
<span style="font-size: 12px">{{ viewField.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -144,7 +150,9 @@
|
||||
</div>
|
||||
<el-button class="m-del-icon-btn" text @click="deleteOuterParamsField(index)">
|
||||
<el-icon size="20px">
|
||||
<Icon name="icon_delete-trash_outlined" />
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</el-button>
|
||||
</div>
|
||||
@ -174,6 +182,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import _delete from '@/assets/svg/delete.svg'
|
||||
import edit from '@/assets/svg/edit.svg'
|
||||
import icon_more_outlined from '@/assets/svg/icon_more_outlined.svg'
|
||||
import dvLinkTarget from '@/assets/svg/dv-link-target.svg'
|
||||
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
|
||||
import { ref, reactive, computed, nextTick } from 'vue'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
@ -188,6 +201,8 @@ import HandleMore from '@/components/handle-more/src/HandleMore.vue'
|
||||
import { fieldType } from '@/utils/attr'
|
||||
import EmptyBackground from '@/components/empty-background/src/EmptyBackground.vue'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { iconChartMap } from '../icon-group/chart-list'
|
||||
import { iconFieldMap } from '../icon-group/field-list'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { dvInfo, componentData } = storeToRefs(dvMainStore)
|
||||
const outerParamsInfoTree = ref(null)
|
||||
@ -201,12 +216,12 @@ const state = reactive({
|
||||
optMenu: [
|
||||
{
|
||||
label: '重命名',
|
||||
svgName: 'edit',
|
||||
svgName: edit,
|
||||
command: 'rename'
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
svgName: 'delete',
|
||||
svgName: _delete,
|
||||
command: 'delete'
|
||||
}
|
||||
],
|
||||
|
||||
@ -41,7 +41,9 @@
|
||||
icon="Download"
|
||||
size="middle"
|
||||
:loading="exportLoading"
|
||||
:disabled="requestStore.loadingMap[permissionStore.currentPath] > 0"
|
||||
:disabled="
|
||||
requestStore.loadingMap[permissionStore.currentPath] > 0 || state.dataFrom === 'template'
|
||||
"
|
||||
@click="downloadViewDetails('view')"
|
||||
>
|
||||
导出Excel
|
||||
@ -54,7 +56,9 @@
|
||||
size="middle"
|
||||
:loading="exportLoading"
|
||||
@click="downloadViewDetails('dataset')"
|
||||
:disabled="requestStore.loadingMap[permissionStore.currentPath] > 0"
|
||||
:disabled="
|
||||
requestStore.loadingMap[permissionStore.currentPath] > 0 || state.dataFrom === 'template'
|
||||
"
|
||||
>
|
||||
导出原始明细
|
||||
</el-button>
|
||||
@ -146,6 +150,7 @@ import { exportPivotExcel } from '@/views/chart/components/js/panel/common/commo
|
||||
import { useRequestStoreWithOut } from '@/store/modules/request'
|
||||
import { usePermissionStoreWithOut } from '@/store/modules/permission'
|
||||
import { activeWatermarkCheckUser } from '@/components/watermark/watermark'
|
||||
import { getCanvasStyle } from '@/utils/style'
|
||||
const downLoading = ref(false)
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const dialogShow = ref(false)
|
||||
@ -194,7 +199,9 @@ const DETAIL_CHART_ATTR: DeepPartial<ChartObj> = {
|
||||
}
|
||||
|
||||
const state = reactive({
|
||||
scale: 0.5
|
||||
scale: 0.5,
|
||||
componentSourceType: null,
|
||||
dataFrom: null
|
||||
})
|
||||
const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||
senior: {
|
||||
@ -208,14 +215,18 @@ const DETAIL_TABLE_ATTR: DeepPartial<ChartObj> = {
|
||||
const authShow = computed(() => editMode.value === 'edit' || dvInfo.value.weight > 3)
|
||||
|
||||
const customExport = computed(() => {
|
||||
const style =
|
||||
canvasStyleData.value &&
|
||||
(optType.value === 'enlarge' || state.componentSourceType?.includes('table'))
|
||||
? getCanvasStyle(canvasStyleData.value, 'canvas-main')
|
||||
: {}
|
||||
if (downLoading.value) {
|
||||
const bashStyle = pixel.value.split(' * ')
|
||||
return {
|
||||
width: bashStyle[0] + 'px!important',
|
||||
height: bashStyle[1] + 'px!important'
|
||||
}
|
||||
style['width'] = bashStyle[0] + 'px!important'
|
||||
style['height'] = bashStyle[1] + 'px!important'
|
||||
return style
|
||||
} else {
|
||||
return {}
|
||||
return style
|
||||
}
|
||||
})
|
||||
|
||||
@ -262,6 +273,8 @@ const dialogInit = (canvasStyle, view, item, opt, params = { scale: 0.5 }) => {
|
||||
sourceViewType.value = view.type
|
||||
optType.value = opt
|
||||
dialogShow.value = true
|
||||
state.componentSourceType = view.type
|
||||
state.dataFrom = view.dataFrom
|
||||
viewInfo.value = deepCopy(view) as DeepPartial<ChartObj>
|
||||
viewInfo.value.customStyle.text.show = false
|
||||
config.value = deepCopy(item)
|
||||
|
||||
@ -93,7 +93,10 @@ import { storeToRefs } from 'pinia'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import _ from 'lodash'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import { groupSizeStyleAdaptor } from '@/utils/style'
|
||||
import { groupSizeStyleAdaptor, groupStyleRevert } from '@/utils/style'
|
||||
import { isGroupCanvas, isTabCanvas } from '@/utils/canvasUtils'
|
||||
const parentNode = ref(null)
|
||||
const canvasId = ref('canvas-main')
|
||||
const snapshotStore = snapshotStoreWithOut()
|
||||
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
@ -155,9 +158,15 @@ const onPositionChange = key => {
|
||||
)
|
||||
}
|
||||
} else {
|
||||
curComponent.value.style[key] = Math.round(
|
||||
(positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
)
|
||||
curComponent.value.style[key] = (positionMounted.value[key] * canvasStyleData.value.scale) / 100
|
||||
}
|
||||
|
||||
//如果当前画布是Group内部画布 则对应组件定位在resize时要还原到groupStyle中
|
||||
if (isGroupCanvas(canvasId.value) || isTabCanvas(canvasId.value)) {
|
||||
groupStyleRevert(curComponent.value, {
|
||||
width: parentNode.value.offsetWidth,
|
||||
height: parentNode.value.offsetHeight
|
||||
})
|
||||
}
|
||||
|
||||
if (['Group', 'DeTabs'].includes(curComponent.value.component)) {
|
||||
@ -174,10 +183,13 @@ const maintainRadioChange = () => {
|
||||
}
|
||||
const multiDimensionalChange = () => {
|
||||
// do change
|
||||
snapshotStore.recordSnapshotCache()
|
||||
}
|
||||
|
||||
const positionInit = () => {
|
||||
if (curComponent.value) {
|
||||
canvasId.value = curComponent.value.canvasId
|
||||
parentNode.value = document.querySelector('#editor-' + canvasId.value)
|
||||
Object.keys(positionMounted.value).forEach(key => {
|
||||
positionMounted.value[key] = Math.round(
|
||||
(curComponent.value.style[key] * 100) / canvasStyleData.value.scale
|
||||
|
||||
@ -2,7 +2,9 @@
|
||||
<div class="drag-info-main">
|
||||
<template v-if="!mobileInPc">
|
||||
<el-row style="justify-content: center">
|
||||
<Icon style="width: 125px; height: 125px" name="dv-drag-tips"></Icon>
|
||||
<Icon name="dv-drag-tips"
|
||||
><dvDragTips class="svg-icon" style="width: 125px; height: 125px"
|
||||
/></Icon>
|
||||
</el-row>
|
||||
<el-row class="tips-info"> {{ tips }} </el-row>
|
||||
</template>
|
||||
@ -11,6 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import dvDragTips from '@/assets/svg/dv-drag-tips.svg'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
import { storeToRefs } from 'pinia'
|
||||
|
||||
|
||||
@ -11,10 +11,12 @@
|
||||
@click.stop="setBoard"
|
||||
>
|
||||
<Icon
|
||||
:style="{ color: curComponent.commonBackground.innerImageColor }"
|
||||
class-name="svg-background"
|
||||
:name="mainIconClass"
|
||||
/>
|
||||
><component
|
||||
class="svg-icon svg-background"
|
||||
:style="{ color: curComponent.commonBackground.innerImageColor }"
|
||||
:is="iconBoardMap[mainIconClass]"
|
||||
></component
|
||||
></Icon>
|
||||
</div>
|
||||
<span class="demonstration">{{ template.name }}</span>
|
||||
</div>
|
||||
@ -28,6 +30,7 @@ import { computed, toRefs } from 'vue'
|
||||
const dvMainStore = dvMainStoreWithOut()
|
||||
const { curComponent } = storeToRefs(dvMainStore)
|
||||
import Icon from '@/components/icon-custom/src/Icon.vue'
|
||||
import { iconBoardMap } from '@/components/icon-group/board-list'
|
||||
|
||||
const props = defineProps({
|
||||
template: {
|
||||
|
||||
@ -10,11 +10,13 @@
|
||||
:style="itemStyle"
|
||||
@click.stop="setBoard"
|
||||
>
|
||||
<Icon
|
||||
:style="{ color: commonBackground.innerImageColor }"
|
||||
class-name="svg-background"
|
||||
:name="mainIconClass"
|
||||
/>
|
||||
<Icon class-name="svg-background"
|
||||
><component
|
||||
:style="{ color: commonBackground.innerImageColor }"
|
||||
class="svg-icon svg-background"
|
||||
:is="iconBoardMap[mainIconClass]"
|
||||
></component
|
||||
></Icon>
|
||||
</div>
|
||||
<span class="demonstration">{{ template.name }}</span>
|
||||
</div>
|
||||
@ -24,6 +26,7 @@
|
||||
import Icon from '@/components/icon-custom/src/Icon.vue'
|
||||
import { computed, toRefs } from 'vue'
|
||||
import { hexColorToRGBA } from '@/views/chart/components/js/util'
|
||||
import { iconBoardMap } from '@/components/icon-group/board-list'
|
||||
|
||||
const props = defineProps({
|
||||
template: {
|
||||
|
||||
@ -5,16 +5,19 @@
|
||||
:class="{ 'selected-active': active, 'icon-area-dark': themes === 'dark' }"
|
||||
>
|
||||
<Icon
|
||||
:style="{ color: innerImageColor }"
|
||||
class-name="svg-background"
|
||||
:name="mainIconClass(item)"
|
||||
/>
|
||||
><component
|
||||
:style="{ color: innerImageColor }"
|
||||
class="svg-icon svg-background"
|
||||
:is="iconBoardMap[mainIconClass(item)]"
|
||||
></component
|
||||
></Icon>
|
||||
</div>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { iconBoardMap } from '@/components/icon-group/board-list'
|
||||
import { toRefs } from 'vue'
|
||||
|
||||
const props = withDefaults(
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
<script lang="ts" setup>
|
||||
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
|
||||
import joinJoin from '@/assets/svg/join-join.svg'
|
||||
import icon_deleteTrash_outlined from '@/assets/svg/icon_delete-trash_outlined.svg'
|
||||
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { ref, reactive } from 'vue'
|
||||
import type { FormInstance } from 'element-plus-secondary'
|
||||
@ -98,7 +102,9 @@ defineExpose({
|
||||
<span class="label">已选择图表:</span>
|
||||
<span class="name">
|
||||
<el-icon class="main-color">
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
<Icon name="icon_left_outlined"
|
||||
><icon_left_outlined class="svg-icon toolbar-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
折线图1
|
||||
</span>
|
||||
@ -107,7 +113,9 @@ defineExpose({
|
||||
<span class="label">所用数据集:</span>
|
||||
<span class="name">
|
||||
<el-icon class="main-color">
|
||||
<Icon class="toolbar-icon" name="icon_left_outlined" />
|
||||
<Icon name="icon_left_outlined"
|
||||
><icon_left_outlined class="svg-icon toolbar-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
佩尔数据集
|
||||
</span>
|
||||
@ -172,7 +180,7 @@ defineExpose({
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-icon class="join">
|
||||
<Icon name="join-join"></Icon>
|
||||
<Icon name="join-join"><joinJoin class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-form-item label="目标仪表板">
|
||||
<el-select v-model="formInline.region" placeholder="Activity zone" clearable>
|
||||
@ -206,7 +214,7 @@ defineExpose({
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-icon class="join">
|
||||
<Icon name="join-join"></Icon>
|
||||
<Icon name="join-join"><joinJoin class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<el-form-item
|
||||
label="目标字段"
|
||||
@ -238,7 +246,9 @@ defineExpose({
|
||||
</el-form-item>
|
||||
<el-button v-if="formFields.fields.length > 1" text @click="removeField(field)">
|
||||
<template #icon>
|
||||
<Icon name="icon_delete-trash_outlined"></Icon>
|
||||
<Icon name="icon_delete-trash_outlined"
|
||||
><icon_deleteTrash_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</template>
|
||||
</el-button>
|
||||
</template>
|
||||
@ -246,7 +256,7 @@ defineExpose({
|
||||
</div>
|
||||
<el-button class="add-field" text @click="addField">
|
||||
<template #icon>
|
||||
<Icon name="icon_add_outlined"></Icon>
|
||||
<Icon name="icon_add_outlined"><icon_add_outlined class="svg-icon" /></Icon>
|
||||
</template>
|
||||
添加联动图表字段
|
||||
</el-button>
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
<template>
|
||||
<Icon
|
||||
v-if="element.innerType.includes('board')"
|
||||
class-name="de-svg-main"
|
||||
:name="element.innerType"
|
||||
/>
|
||||
<Icon v-if="element.innerType.includes('board')" class-name="de-svg-main"
|
||||
><component class="svg-icon de-svg-main" :is="iconBoardMap[element.innerType]"></component
|
||||
></Icon>
|
||||
<component v-else :is="element.innerType"></component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import Icon from '@/components/icon-custom/src/Icon.vue'
|
||||
import { iconBoardMap } from '@/components/icon-group/board-list'
|
||||
import { toRefs } from 'vue'
|
||||
const props = defineProps({
|
||||
propValue: {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import { computed, toRefs } from 'vue'
|
||||
import { ElFormItem, ElIcon, ElInputNumber } from 'element-plus-secondary'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
@ -48,6 +49,7 @@ const handleInput = value => {
|
||||
:themes="themes"
|
||||
v-model="carouselInfo.enable"
|
||||
name="carouselInfo"
|
||||
@modelChange="onSettingChange"
|
||||
title="轮播"
|
||||
>
|
||||
<el-row class="custom-row">
|
||||
@ -60,10 +62,11 @@ const handleInput = value => {
|
||||
<span style="font-size: 12px">轮播时间(秒)</span>
|
||||
<el-tooltip class="item" :effect="themes" placement="top">
|
||||
<template #content>
|
||||
<div>Tab轮播退出编辑模式才开生效</div>
|
||||
<div>轮播退出编辑模式才开生效</div>
|
||||
<div v-if="element.innerType === 'picture-group'">启用条件样式后,轮播失效</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
|
||||
@ -10,7 +10,7 @@ import elementResizeDetectorMaker from 'element-resize-detector'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
import CommonStyleSet from '@/custom-component/common/CommonStyleSet.vue'
|
||||
import CommonEvent from '@/custom-component/common/CommonEvent.vue'
|
||||
import TabCarouselSetting from '@/custom-component/common/TabCarouselSetting.vue'
|
||||
import CarouselSetting from '@/custom-component/common/CarouselSetting.vue'
|
||||
import CommonBorderSetting from '@/custom-component/common/CommonBorderSetting.vue'
|
||||
import CollapseSwitchItem from '../../components/collapse-switch-item/src/CollapseSwitchItem.vue'
|
||||
const snapshotStore = snapshotStoreWithOut()
|
||||
@ -197,11 +197,7 @@ const stopEvent = e => {
|
||||
@onStyleAttrChange="onStyleAttrChange"
|
||||
></common-border-setting>
|
||||
</collapse-switch-item>
|
||||
<TabCarouselSetting
|
||||
v-if="carouselShow"
|
||||
:element="element"
|
||||
:themes="themes"
|
||||
></TabCarouselSetting>
|
||||
<CarouselSetting v-if="carouselShow" :element="element" :themes="themes"></CarouselSetting>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import icon_info_outlined from '@/assets/svg/icon_info_outlined.svg'
|
||||
import { computed, toRefs } from 'vue'
|
||||
import { ElFormItem, ElIcon } from 'element-plus-secondary'
|
||||
import { snapshotStoreWithOut } from '@/store/modules/data-visualization/snapshot'
|
||||
@ -52,7 +53,7 @@ const onJumpValueChange = () => {
|
||||
<div>事件绑定需退出编辑模式后生效,富文本开启绑定事件则内部点击事件失效</div>
|
||||
</template>
|
||||
<el-icon class="hint-icon" :class="{ 'hint-icon--dark': themes === 'dark' }">
|
||||
<Icon name="icon_info_outlined" />
|
||||
<Icon name="icon_info_outlined"><icon_info_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
@ -92,8 +93,32 @@ const onJumpValueChange = () => {
|
||||
@change="onJumpValueChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="eventsInfo.type === 'jump' && eventsInfo.jump.type"
|
||||
class="form-item"
|
||||
:class="'form-item-' + themes"
|
||||
style="margin-bottom: 8px"
|
||||
>
|
||||
<el-radio-group
|
||||
size="small"
|
||||
v-model="eventsInfo.jump.type"
|
||||
:effect="themes"
|
||||
:disabled="!eventsInfo.checked"
|
||||
@change="onJumpValueChange"
|
||||
>
|
||||
<el-radio :effect="themes" label="_blank">新开页面</el-radio>
|
||||
<el-radio :effect="themes" label="_self">当前页面</el-radio>
|
||||
<el-radio :effect="themes" label="newPop">弹窗页面</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style scoped lang="less">
|
||||
.form-item-dark {
|
||||
.ed-radio {
|
||||
margin-right: 4px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon :class="{ 'dark-icon': themes === 'dark' }">
|
||||
<Icon :name="styleOptionKey.icon" />
|
||||
<Icon><component :is="styleOptionKey.icon"></component></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
<el-option
|
||||
@ -54,7 +54,7 @@
|
||||
:title="t('chart.text_color')"
|
||||
v-model="styleForm[styleColorKey.value]"
|
||||
class="color-picker-style"
|
||||
:prefix-icon="expandIcon(styleColorKey.icon)"
|
||||
:prefix-icon="styleColorKey.icon"
|
||||
:triggerWidth="styleColorKey.width"
|
||||
is-custom
|
||||
:predefine="state.predefineColors"
|
||||
@ -89,7 +89,7 @@
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon :class="{ 'dark-icon': themes === 'dark' }">
|
||||
<Icon :name="styleOptionMountedKey.icon" />
|
||||
<Icon><component :is="styleOptionMountedKey.icon"></component></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
<el-option
|
||||
@ -122,7 +122,7 @@
|
||||
>
|
||||
<template #prefix>
|
||||
<el-icon :class="{ 'dark-icon': themes === 'dark' }">
|
||||
<Icon :name="styleOptionKey.icon" />
|
||||
<Icon><component :is="styleOptionKey.icon"></component></Icon>
|
||||
</el-icon>
|
||||
</template>
|
||||
<el-option
|
||||
@ -146,7 +146,7 @@
|
||||
@click="checkBold"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_bold_outlined" />
|
||||
<Icon name="icon_bold_outlined"><icon_bold_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -161,7 +161,7 @@
|
||||
@click="checkItalic"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_italic_outlined" />
|
||||
<Icon name="icon_italic_outlined"><icon_italic_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -178,7 +178,9 @@
|
||||
@click="setPosition('textAlign', 'left')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_left-alignment_outlined" />
|
||||
<Icon name="icon_left-alignment_outlined"
|
||||
><icon_leftAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -192,7 +194,9 @@
|
||||
@click="setPosition('textAlign', 'center')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_center-alignment_outlined" />
|
||||
<Icon name="icon_center-alignment_outlined"
|
||||
><icon_centerAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -206,7 +210,9 @@
|
||||
@click="setPosition('textAlign', 'right')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_right-alignment_outlined" />
|
||||
<Icon name="icon_right-alignment_outlined"
|
||||
><icon_rightAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -227,7 +233,9 @@
|
||||
@click="setPosition('headHorizontalPosition', 'left')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_left-alignment_outlined" />
|
||||
<Icon name="icon_left-alignment_outlined"
|
||||
><icon_leftAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -244,7 +252,9 @@
|
||||
@click="setPosition('headHorizontalPosition', 'center')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_center-alignment_outlined" />
|
||||
<Icon name="icon_center-alignment_outlined"
|
||||
><icon_centerAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -261,7 +271,9 @@
|
||||
@click="setPosition('headHorizontalPosition', 'right')"
|
||||
>
|
||||
<el-icon>
|
||||
<Icon name="icon_right-alignment_outlined" />
|
||||
<Icon name="icon_right-alignment_outlined"
|
||||
><icon_rightAlignment_outlined class="svg-icon"
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
@ -272,6 +284,21 @@
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
import dvStyleBackgroundColor from '@/assets/svg/dv-style-backgroundColor.svg'
|
||||
import dvStyleColor from '@/assets/svg/dv-style-color.svg'
|
||||
import dvStyleHeadFontActiveColor from '@/assets/svg/dv-style-headFontActiveColor.svg'
|
||||
import dvStyleHeadFontColor from '@/assets/svg/dv-style-headFontColor.svg'
|
||||
import dvStyleScrollSpeed from '@/assets/svg/dv-style-scroll-speed.svg'
|
||||
import dvStyleOpacity from '@/assets/svg/dv-style-opacity.svg'
|
||||
import dvStyleFontSize from '@/assets/svg/dv-style-fontSize.svg'
|
||||
import dvStyleLetterSpacing from '@/assets/svg/dv-style-letterSpacing.svg'
|
||||
import dvStyleActiveFont from '@/assets/svg/dv-style-activeFont.svg'
|
||||
import dvStyleFontFamily from '@/assets/svg/dv-style-fontFamily.svg'
|
||||
import icon_bold_outlined from '@/assets/svg/icon_bold_outlined.svg'
|
||||
import icon_italic_outlined from '@/assets/svg/icon_italic_outlined.svg'
|
||||
import icon_leftAlignment_outlined from '@/assets/svg/icon_left-alignment_outlined.svg'
|
||||
import icon_centerAlignment_outlined from '@/assets/svg/icon_center-alignment_outlined.svg'
|
||||
import icon_rightAlignment_outlined from '@/assets/svg/icon_right-alignment_outlined.svg'
|
||||
import { computed, h, reactive, ref, toRefs, watch } from 'vue'
|
||||
import { COLOR_PANEL } from '@/views/chart/components/editor/util/chart'
|
||||
import { dvMainStoreWithOut } from '@/store/modules/data-visualization/dvMain'
|
||||
@ -294,9 +321,6 @@ const props = withDefaults(
|
||||
themes: 'dark'
|
||||
}
|
||||
)
|
||||
const expandIcon = (name: string) => {
|
||||
return h(Icon, { className: '', name })
|
||||
}
|
||||
const { themes, element } = toRefs(props)
|
||||
const emits = defineEmits(['onStyleAttrChange'])
|
||||
const styleMounted = ref({
|
||||
@ -353,20 +377,20 @@ const state = reactive({
|
||||
})
|
||||
|
||||
const styleColorKeyArray = [
|
||||
{ value: 'color', label: '颜色', width: 90, icon: 'dv-style-color' },
|
||||
{ value: 'color', label: '颜色', width: 90, icon: dvStyleColor },
|
||||
{
|
||||
value: 'headFontColor',
|
||||
label: '头部字体颜色',
|
||||
width: 90,
|
||||
icon: 'dv-style-headFontColor'
|
||||
icon: dvStyleHeadFontColor
|
||||
},
|
||||
{
|
||||
value: 'headFontActiveColor',
|
||||
label: '激活字体颜色',
|
||||
width: 90,
|
||||
icon: 'dv-style-headFontActiveColor'
|
||||
icon: dvStyleHeadFontActiveColor
|
||||
},
|
||||
{ value: 'backgroundColor', label: '背景色', width: 90, icon: 'dv-style-backgroundColor' }
|
||||
{ value: 'backgroundColor', label: '背景色', width: 90, icon: dvStyleBackgroundColor }
|
||||
]
|
||||
|
||||
const letterSpacingList = computed(() => {
|
||||
@ -390,14 +414,13 @@ const fontSizeList = computed(() => {
|
||||
}
|
||||
return arr
|
||||
})
|
||||
|
||||
const styleOptionKeyArrayPre = [
|
||||
{
|
||||
value: 'fontFamily',
|
||||
label: '字体',
|
||||
customOption: fontFamilyList,
|
||||
width: '188px',
|
||||
icon: 'dv-style-fontFamily'
|
||||
icon: dvStyleFontFamily
|
||||
}
|
||||
]
|
||||
|
||||
@ -408,21 +431,21 @@ const styleOptionMountedKeyArray = [
|
||||
label: '字间距',
|
||||
customOption: letterSpacingList.value,
|
||||
width: '90px',
|
||||
icon: 'dv-style-letterSpacing'
|
||||
icon: dvStyleLetterSpacing
|
||||
},
|
||||
{
|
||||
value: 'fontSize',
|
||||
label: '字体大小',
|
||||
customOption: fontSizeList.value,
|
||||
width: '90px',
|
||||
icon: 'dv-style-fontSize'
|
||||
icon: dvStyleFontSize
|
||||
},
|
||||
{
|
||||
value: 'activeFontSize',
|
||||
label: '激活字体大小',
|
||||
customOption: fontSizeList.value,
|
||||
width: '90px',
|
||||
icon: 'dv-style-activeFont'
|
||||
icon: dvStyleActiveFont
|
||||
}
|
||||
]
|
||||
|
||||
@ -433,14 +456,14 @@ const styleOptionKeyArray = [
|
||||
label: '滚动速度',
|
||||
customOption: scrollSpeedList,
|
||||
width: '90px',
|
||||
icon: 'dv-style-scroll-speed'
|
||||
icon: dvStyleScrollSpeed
|
||||
},
|
||||
{
|
||||
value: 'opacity',
|
||||
label: '不透明度',
|
||||
customOption: opacitySizeList,
|
||||
width: '90px',
|
||||
icon: 'dv-style-opacity'
|
||||
icon: dvStyleOpacity
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@ -1,63 +1,30 @@
|
||||
import board_1 from '@/assets/svg/board_1.svg'
|
||||
import board_2 from '@/assets/svg/board_2.svg'
|
||||
import board_3 from '@/assets/svg/board_3.svg'
|
||||
import board_4 from '@/assets/svg/board_4.svg'
|
||||
import board_5 from '@/assets/svg/board_5.svg'
|
||||
import board_6 from '@/assets/svg/board_6.svg'
|
||||
import board_7 from '@/assets/svg/board_7.svg'
|
||||
import board_8 from '@/assets/svg/board_8.svg'
|
||||
import board_9 from '@/assets/svg/board_9.svg'
|
||||
import graphicalCircular from '@/assets/svg/graphical-circular.svg'
|
||||
import graphicalRect from '@/assets/svg/graphical-rect.svg'
|
||||
import graphicalTriangle from '@/assets/svg/graphical-triangle.svg'
|
||||
export const CANVAS_MATERIAL = [
|
||||
{
|
||||
category: 'CanvasBoard',
|
||||
title: '边框',
|
||||
span: 8,
|
||||
details: [
|
||||
{
|
||||
value: 'board_1',
|
||||
type: 'outer_svg',
|
||||
title: '边框1',
|
||||
icon: 'board_1'
|
||||
},
|
||||
{
|
||||
value: 'board_2',
|
||||
type: 'outer_svg',
|
||||
title: '边框2',
|
||||
icon: 'board_2'
|
||||
},
|
||||
{
|
||||
value: 'board_3',
|
||||
type: 'outer_svg',
|
||||
title: '边框3',
|
||||
icon: 'board_3'
|
||||
},
|
||||
{
|
||||
value: 'board_4',
|
||||
type: 'outer_svg',
|
||||
title: '边框4',
|
||||
icon: 'board_4'
|
||||
},
|
||||
{
|
||||
value: 'board_5',
|
||||
type: 'outer_svg',
|
||||
title: '边框5',
|
||||
icon: 'board_5'
|
||||
},
|
||||
{
|
||||
value: 'board_6',
|
||||
type: 'outer_svg',
|
||||
title: '边框6',
|
||||
icon: 'board_6'
|
||||
},
|
||||
{
|
||||
value: 'board_7',
|
||||
type: 'outer_svg',
|
||||
title: '边框7',
|
||||
icon: 'board_7'
|
||||
},
|
||||
{
|
||||
value: 'board_8',
|
||||
type: 'outer_svg',
|
||||
title: '边框8',
|
||||
icon: 'board_8'
|
||||
},
|
||||
{
|
||||
value: 'board_9',
|
||||
type: 'outer_svg',
|
||||
title: '边框9',
|
||||
icon: 'board_9'
|
||||
}
|
||||
{ value: 'board_1', type: 'outer_svg', title: '边框1', icon: board_1 },
|
||||
{ value: 'board_2', type: 'outer_svg', title: '边框2', icon: board_2 },
|
||||
{ value: 'board_3', type: 'outer_svg', title: '边框3', icon: board_3 },
|
||||
{ value: 'board_4', type: 'outer_svg', title: '边框4', icon: board_4 },
|
||||
{ value: 'board_5', type: 'outer_svg', title: '边框5', icon: board_5 },
|
||||
{ value: 'board_6', type: 'outer_svg', title: '边框6', icon: board_6 },
|
||||
{ value: 'board_7', type: 'outer_svg', title: '边框7', icon: board_7 },
|
||||
{ value: 'board_8', type: 'outer_svg', title: '边框8', icon: board_8 },
|
||||
{ value: 'board_9', type: 'outer_svg', title: '边框9', icon: board_9 }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -65,24 +32,9 @@ export const CANVAS_MATERIAL = [
|
||||
title: '图形',
|
||||
span: 8,
|
||||
details: [
|
||||
{
|
||||
value: 'RectShape',
|
||||
type: 'graphical',
|
||||
title: '矩形',
|
||||
icon: 'graphical-rect'
|
||||
},
|
||||
{
|
||||
value: 'SvgTriangle',
|
||||
type: 'graphical',
|
||||
title: '三角形',
|
||||
icon: 'graphical-triangle'
|
||||
},
|
||||
{
|
||||
value: 'CircleShape',
|
||||
type: 'graphical',
|
||||
title: '圆形',
|
||||
icon: 'graphical-circular'
|
||||
}
|
||||
{ value: 'RectShape', type: 'graphical', title: '矩形', icon: graphicalRect },
|
||||
{ value: 'SvgTriangle', type: 'graphical', title: '三角形', icon: graphicalTriangle },
|
||||
{ value: 'CircleShape', type: 'graphical', title: '圆形', icon: graphicalCircular }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -90,516 +42,108 @@ export const CANVAS_MATERIAL = [
|
||||
title: '图标',
|
||||
span: 4,
|
||||
details: [
|
||||
{
|
||||
value: 'Plus',
|
||||
type: 'inner_svg',
|
||||
icon: 'Plus'
|
||||
},
|
||||
{
|
||||
value: 'Minus',
|
||||
type: 'inner_svg',
|
||||
icon: 'Minus'
|
||||
},
|
||||
{
|
||||
value: 'CirclePlus',
|
||||
type: 'inner_svg',
|
||||
icon: 'CirclePlus'
|
||||
},
|
||||
{
|
||||
value: 'Search',
|
||||
type: 'inner_svg',
|
||||
icon: 'Search'
|
||||
},
|
||||
{
|
||||
value: 'Female',
|
||||
type: 'inner_svg',
|
||||
icon: 'Female'
|
||||
},
|
||||
{
|
||||
value: 'Male',
|
||||
type: 'inner_svg',
|
||||
icon: 'Male'
|
||||
},
|
||||
{
|
||||
value: 'Aim',
|
||||
type: 'inner_svg',
|
||||
icon: 'Aim'
|
||||
},
|
||||
{
|
||||
value: 'House',
|
||||
type: 'inner_svg',
|
||||
icon: 'House'
|
||||
},
|
||||
{
|
||||
value: 'FullScreen',
|
||||
type: 'inner_svg',
|
||||
icon: 'FullScreen'
|
||||
},
|
||||
{
|
||||
value: 'Loading',
|
||||
type: 'inner_svg',
|
||||
icon: 'Loading'
|
||||
},
|
||||
{
|
||||
value: 'Link',
|
||||
type: 'inner_svg',
|
||||
icon: 'Link'
|
||||
},
|
||||
{
|
||||
value: 'Service',
|
||||
type: 'inner_svg',
|
||||
icon: 'Service'
|
||||
},
|
||||
{
|
||||
value: 'Pointer',
|
||||
type: 'inner_svg',
|
||||
icon: 'Pointer'
|
||||
},
|
||||
{
|
||||
value: 'Star',
|
||||
type: 'inner_svg',
|
||||
icon: 'Star'
|
||||
},
|
||||
{
|
||||
value: 'Notification',
|
||||
type: 'inner_svg',
|
||||
icon: 'Notification'
|
||||
},
|
||||
{
|
||||
value: 'Connection',
|
||||
type: 'inner_svg',
|
||||
icon: 'Connection'
|
||||
},
|
||||
{
|
||||
value: 'ChatDotRound',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatDotRound'
|
||||
},
|
||||
{
|
||||
value: 'Setting',
|
||||
type: 'inner_svg',
|
||||
icon: 'Setting'
|
||||
},
|
||||
{
|
||||
value: 'Clock',
|
||||
type: 'inner_svg',
|
||||
icon: 'Clock'
|
||||
},
|
||||
{
|
||||
value: 'Position',
|
||||
type: 'inner_svg',
|
||||
icon: 'Position'
|
||||
},
|
||||
{
|
||||
value: 'Discount',
|
||||
type: 'inner_svg',
|
||||
icon: 'Discount'
|
||||
},
|
||||
{
|
||||
value: 'Odometer',
|
||||
type: 'inner_svg',
|
||||
icon: 'Odometer'
|
||||
},
|
||||
{
|
||||
value: 'ChatSquare',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatSquare'
|
||||
},
|
||||
{
|
||||
value: 'ChatRound',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatRound'
|
||||
},
|
||||
{
|
||||
value: 'ChatLineRound',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatLineRound'
|
||||
},
|
||||
{
|
||||
value: 'ChatLineSquare',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatLineSquare'
|
||||
},
|
||||
{
|
||||
value: 'ChatDotSquare',
|
||||
type: 'inner_svg',
|
||||
icon: 'ChatDotSquare'
|
||||
},
|
||||
{
|
||||
value: 'View',
|
||||
type: 'inner_svg',
|
||||
icon: 'View'
|
||||
},
|
||||
{
|
||||
value: 'Hide',
|
||||
type: 'inner_svg',
|
||||
icon: 'Hide'
|
||||
},
|
||||
{
|
||||
value: 'Unlock',
|
||||
type: 'inner_svg',
|
||||
icon: 'Unlock'
|
||||
},
|
||||
{
|
||||
value: 'Lock',
|
||||
type: 'inner_svg',
|
||||
icon: 'Lock'
|
||||
},
|
||||
{
|
||||
value: 'RefreshRight',
|
||||
type: 'inner_svg',
|
||||
icon: 'RefreshRight'
|
||||
},
|
||||
{
|
||||
value: 'RefreshLeft',
|
||||
type: 'inner_svg',
|
||||
icon: 'RefreshLeft'
|
||||
},
|
||||
{
|
||||
value: 'Refresh',
|
||||
type: 'inner_svg',
|
||||
icon: 'Refresh'
|
||||
},
|
||||
{
|
||||
value: 'Bell',
|
||||
type: 'inner_svg',
|
||||
icon: 'Bell'
|
||||
},
|
||||
{
|
||||
value: 'MuteNotification',
|
||||
type: 'inner_svg',
|
||||
icon: 'MuteNotification'
|
||||
},
|
||||
{
|
||||
value: 'User',
|
||||
type: 'inner_svg',
|
||||
icon: 'User'
|
||||
},
|
||||
{
|
||||
value: 'Check',
|
||||
type: 'inner_svg',
|
||||
icon: 'Check'
|
||||
},
|
||||
{
|
||||
value: 'CircleCheck',
|
||||
type: 'inner_svg',
|
||||
icon: 'CircleCheck'
|
||||
},
|
||||
{
|
||||
value: 'Warning',
|
||||
type: 'inner_svg',
|
||||
icon: 'Warning'
|
||||
},
|
||||
{
|
||||
value: 'CircleClose',
|
||||
type: 'inner_svg',
|
||||
icon: 'CircleClose'
|
||||
},
|
||||
{
|
||||
value: 'Close',
|
||||
type: 'inner_svg',
|
||||
icon: 'Close'
|
||||
},
|
||||
{
|
||||
value: 'PieChart',
|
||||
type: 'inner_svg',
|
||||
icon: 'PieChart'
|
||||
},
|
||||
{
|
||||
value: 'More',
|
||||
type: 'inner_svg',
|
||||
icon: 'More'
|
||||
},
|
||||
{
|
||||
value: 'Compass',
|
||||
type: 'inner_svg',
|
||||
icon: 'Compass'
|
||||
},
|
||||
{
|
||||
value: 'Filter',
|
||||
type: 'inner_svg',
|
||||
icon: 'Filter'
|
||||
},
|
||||
{
|
||||
value: 'Switch',
|
||||
type: 'inner_svg',
|
||||
icon: 'Switch'
|
||||
},
|
||||
{
|
||||
value: 'Select',
|
||||
type: 'inner_svg',
|
||||
icon: 'Select'
|
||||
},
|
||||
{
|
||||
value: 'SemiSelect',
|
||||
type: 'inner_svg',
|
||||
icon: 'SemiSelect'
|
||||
},
|
||||
{
|
||||
value: 'CloseBold',
|
||||
type: 'inner_svg',
|
||||
icon: 'CloseBold'
|
||||
},
|
||||
{
|
||||
value: 'EditPen',
|
||||
type: 'inner_svg',
|
||||
icon: 'EditPen'
|
||||
},
|
||||
{
|
||||
value: 'Edit',
|
||||
type: 'inner_svg',
|
||||
icon: 'Edit'
|
||||
},
|
||||
{
|
||||
value: 'Message',
|
||||
type: 'inner_svg',
|
||||
icon: 'Message'
|
||||
},
|
||||
{
|
||||
value: 'MessageBox',
|
||||
type: 'inner_svg',
|
||||
icon: 'MessageBox'
|
||||
},
|
||||
{
|
||||
value: 'TurnOff',
|
||||
type: 'inner_svg',
|
||||
icon: 'TurnOff'
|
||||
},
|
||||
{
|
||||
value: 'Finished',
|
||||
type: 'inner_svg',
|
||||
icon: 'Finished'
|
||||
},
|
||||
{
|
||||
value: 'Delete',
|
||||
type: 'inner_svg',
|
||||
icon: 'Delete'
|
||||
},
|
||||
{
|
||||
value: 'Crop',
|
||||
type: 'inner_svg',
|
||||
icon: 'Crop'
|
||||
},
|
||||
{
|
||||
value: 'SwitchButton',
|
||||
type: 'inner_svg',
|
||||
icon: 'SwitchButton'
|
||||
},
|
||||
{
|
||||
value: 'Operation',
|
||||
type: 'inner_svg',
|
||||
icon: 'Operation'
|
||||
},
|
||||
{
|
||||
value: 'Open',
|
||||
type: 'inner_svg',
|
||||
icon: 'Open'
|
||||
},
|
||||
{
|
||||
value: 'Remove',
|
||||
type: 'inner_svg',
|
||||
icon: 'Remove'
|
||||
},
|
||||
{
|
||||
value: 'ZoomOut',
|
||||
type: 'inner_svg',
|
||||
icon: 'ZoomOut'
|
||||
},
|
||||
{
|
||||
value: 'ZoomIn',
|
||||
type: 'inner_svg',
|
||||
icon: 'ZoomIn'
|
||||
},
|
||||
{
|
||||
value: 'InfoFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'InfoFilled'
|
||||
},
|
||||
{
|
||||
value: 'CircleCheckFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'CircleCheckFilled'
|
||||
},
|
||||
{
|
||||
value: 'SuccessFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'SuccessFilled'
|
||||
},
|
||||
{
|
||||
value: 'WarningFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'WarningFilled'
|
||||
},
|
||||
{
|
||||
value: 'CircleCloseFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'CircleCloseFilled'
|
||||
},
|
||||
{
|
||||
value: 'QuestionFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'QuestionFilled'
|
||||
},
|
||||
{
|
||||
value: 'WarnTriangleFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'WarnTriangleFilled'
|
||||
},
|
||||
{
|
||||
value: 'UserFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'UserFilled'
|
||||
},
|
||||
{
|
||||
value: 'MoreFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'MoreFilled'
|
||||
},
|
||||
{
|
||||
value: 'Tools',
|
||||
type: 'inner_svg',
|
||||
icon: 'Tools'
|
||||
},
|
||||
{
|
||||
value: 'HomeFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'HomeFilled'
|
||||
},
|
||||
{
|
||||
value: 'Menu',
|
||||
type: 'inner_svg',
|
||||
icon: 'Menu'
|
||||
},
|
||||
{
|
||||
value: 'UploadFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'UploadFilled'
|
||||
},
|
||||
{
|
||||
value: 'Avatar',
|
||||
type: 'inner_svg',
|
||||
icon: 'Avatar'
|
||||
},
|
||||
{
|
||||
value: 'HelpFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'HelpFilled'
|
||||
},
|
||||
{
|
||||
value: 'Share',
|
||||
type: 'inner_svg',
|
||||
icon: 'Share'
|
||||
},
|
||||
{
|
||||
value: 'StarFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'StarFilled'
|
||||
},
|
||||
{
|
||||
value: 'Comment',
|
||||
type: 'inner_svg',
|
||||
icon: 'Comment'
|
||||
},
|
||||
{
|
||||
value: 'Histogram',
|
||||
type: 'inner_svg',
|
||||
icon: 'Histogram'
|
||||
},
|
||||
{
|
||||
value: 'Grid',
|
||||
type: 'inner_svg',
|
||||
icon: 'Grid'
|
||||
},
|
||||
{
|
||||
value: 'Promotion',
|
||||
type: 'inner_svg',
|
||||
icon: 'Promotion'
|
||||
},
|
||||
{
|
||||
value: 'DeleteFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'DeleteFilled'
|
||||
},
|
||||
{
|
||||
value: 'RemoveFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'RemoveFilled'
|
||||
},
|
||||
{
|
||||
value: 'CirclePlusFilled',
|
||||
type: 'inner_svg',
|
||||
icon: 'CirclePlusFilled'
|
||||
},
|
||||
{
|
||||
value: 'ArrowLeft',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowLeft'
|
||||
},
|
||||
{
|
||||
value: 'ArrowUp',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowUp'
|
||||
},
|
||||
{
|
||||
value: 'ArrowRight',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowRight'
|
||||
},
|
||||
{
|
||||
value: 'ArrowDown',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowDown'
|
||||
},
|
||||
{
|
||||
value: 'ArrowLeftBold',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowLeftBold'
|
||||
},
|
||||
{
|
||||
value: 'ArrowUpBold',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowUpBold'
|
||||
},
|
||||
{
|
||||
value: 'ArrowRightBold',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowRightBold'
|
||||
},
|
||||
{
|
||||
value: 'ArrowDownBold',
|
||||
type: 'inner_svg',
|
||||
icon: 'ArrowDownBold'
|
||||
},
|
||||
{
|
||||
value: 'DArrowRight',
|
||||
type: 'inner_svg',
|
||||
icon: 'DArrowRight'
|
||||
},
|
||||
{
|
||||
value: 'DArrowLeft',
|
||||
type: 'inner_svg',
|
||||
icon: 'DArrowLeft'
|
||||
},
|
||||
{
|
||||
value: 'Download',
|
||||
type: 'inner_svg',
|
||||
icon: 'Download'
|
||||
},
|
||||
{
|
||||
value: 'Upload',
|
||||
type: 'inner_svg',
|
||||
icon: 'Upload'
|
||||
},
|
||||
{
|
||||
value: 'Top',
|
||||
type: 'inner_svg',
|
||||
icon: 'Top'
|
||||
},
|
||||
{
|
||||
value: 'Bottom',
|
||||
type: 'inner_svg',
|
||||
icon: 'Bottom'
|
||||
}
|
||||
{ value: 'Plus', type: 'inner_svg', icon: 'Plus' },
|
||||
{ value: 'Minus', type: 'inner_svg', icon: 'Minus' },
|
||||
{ value: 'CirclePlus', type: 'inner_svg', icon: 'CirclePlus' },
|
||||
{ value: 'Search', type: 'inner_svg', icon: 'Search' },
|
||||
{ value: 'Female', type: 'inner_svg', icon: 'Female' },
|
||||
{ value: 'Male', type: 'inner_svg', icon: 'Male' },
|
||||
{ value: 'Aim', type: 'inner_svg', icon: 'Aim' },
|
||||
{ value: 'House', type: 'inner_svg', icon: 'House' },
|
||||
{ value: 'FullScreen', type: 'inner_svg', icon: 'FullScreen' },
|
||||
{ value: 'Loading', type: 'inner_svg', icon: 'Loading' },
|
||||
{ value: 'Link', type: 'inner_svg', icon: 'Link' },
|
||||
{ value: 'Service', type: 'inner_svg', icon: 'Service' },
|
||||
{ value: 'Pointer', type: 'inner_svg', icon: 'Pointer' },
|
||||
{ value: 'Star', type: 'inner_svg', icon: 'Star' },
|
||||
{ value: 'Notification', type: 'inner_svg', icon: 'Notification' },
|
||||
{ value: 'Connection', type: 'inner_svg', icon: 'Connection' },
|
||||
{ value: 'ChatDotRound', type: 'inner_svg', icon: 'ChatDotRound' },
|
||||
{ value: 'Setting', type: 'inner_svg', icon: 'Setting' },
|
||||
{ value: 'Clock', type: 'inner_svg', icon: 'Clock' },
|
||||
{ value: 'Position', type: 'inner_svg', icon: 'Position' },
|
||||
{ value: 'Discount', type: 'inner_svg', icon: 'Discount' },
|
||||
{ value: 'Odometer', type: 'inner_svg', icon: 'Odometer' },
|
||||
{ value: 'ChatSquare', type: 'inner_svg', icon: 'ChatSquare' },
|
||||
{ value: 'ChatRound', type: 'inner_svg', icon: 'ChatRound' },
|
||||
{ value: 'ChatLineRound', type: 'inner_svg', icon: 'ChatLineRound' },
|
||||
{ value: 'ChatLineSquare', type: 'inner_svg', icon: 'ChatLineSquare' },
|
||||
{ value: 'ChatDotSquare', type: 'inner_svg', icon: 'ChatDotSquare' },
|
||||
{ value: 'View', type: 'inner_svg', icon: 'View' },
|
||||
{ value: 'Hide', type: 'inner_svg', icon: 'Hide' },
|
||||
{ value: 'Unlock', type: 'inner_svg', icon: 'Unlock' },
|
||||
{ value: 'Lock', type: 'inner_svg', icon: 'Lock' },
|
||||
{ value: 'RefreshRight', type: 'inner_svg', icon: 'RefreshRight' },
|
||||
{ value: 'RefreshLeft', type: 'inner_svg', icon: 'RefreshLeft' },
|
||||
{ value: 'Refresh', type: 'inner_svg', icon: 'Refresh' },
|
||||
{ value: 'Bell', type: 'inner_svg', icon: 'Bell' },
|
||||
{ value: 'MuteNotification', type: 'inner_svg', icon: 'MuteNotification' },
|
||||
{ value: 'User', type: 'inner_svg', icon: 'User' },
|
||||
{ value: 'Check', type: 'inner_svg', icon: 'Check' },
|
||||
{ value: 'CircleCheck', type: 'inner_svg', icon: 'CircleCheck' },
|
||||
{ value: 'Warning', type: 'inner_svg', icon: 'Warning' },
|
||||
{ value: 'CircleClose', type: 'inner_svg', icon: 'CircleClose' },
|
||||
{ value: 'Close', type: 'inner_svg', icon: 'Close' },
|
||||
{ value: 'PieChart', type: 'inner_svg', icon: 'PieChart' },
|
||||
{ value: 'More', type: 'inner_svg', icon: 'More' },
|
||||
{ value: 'Compass', type: 'inner_svg', icon: 'Compass' },
|
||||
{ value: 'Filter', type: 'inner_svg', icon: 'Filter' },
|
||||
{ value: 'Switch', type: 'inner_svg', icon: 'Switch' },
|
||||
{ value: 'Select', type: 'inner_svg', icon: 'Select' },
|
||||
{ value: 'SemiSelect', type: 'inner_svg', icon: 'SemiSelect' },
|
||||
{ value: 'CloseBold', type: 'inner_svg', icon: 'CloseBold' },
|
||||
{ value: 'EditPen', type: 'inner_svg', icon: 'EditPen' },
|
||||
{ value: 'Edit', type: 'inner_svg', icon: 'Edit' },
|
||||
{ value: 'Message', type: 'inner_svg', icon: 'Message' },
|
||||
{ value: 'MessageBox', type: 'inner_svg', icon: 'MessageBox' },
|
||||
{ value: 'TurnOff', type: 'inner_svg', icon: 'TurnOff' },
|
||||
{ value: 'Finished', type: 'inner_svg', icon: 'Finished' },
|
||||
{ value: 'Delete', type: 'inner_svg', icon: 'Delete' },
|
||||
{ value: 'Crop', type: 'inner_svg', icon: 'Crop' },
|
||||
{ value: 'SwitchButton', type: 'inner_svg', icon: 'SwitchButton' },
|
||||
{ value: 'Operation', type: 'inner_svg', icon: 'Operation' },
|
||||
{ value: 'Open', type: 'inner_svg', icon: 'Open' },
|
||||
{ value: 'Remove', type: 'inner_svg', icon: 'Remove' },
|
||||
{ value: 'ZoomOut', type: 'inner_svg', icon: 'ZoomOut' },
|
||||
{ value: 'ZoomIn', type: 'inner_svg', icon: 'ZoomIn' },
|
||||
{ value: 'InfoFilled', type: 'inner_svg', icon: 'InfoFilled' },
|
||||
{ value: 'CircleCheckFilled', type: 'inner_svg', icon: 'CircleCheckFilled' },
|
||||
{ value: 'SuccessFilled', type: 'inner_svg', icon: 'SuccessFilled' },
|
||||
{ value: 'WarningFilled', type: 'inner_svg', icon: 'WarningFilled' },
|
||||
{ value: 'CircleCloseFilled', type: 'inner_svg', icon: 'CircleCloseFilled' },
|
||||
{ value: 'QuestionFilled', type: 'inner_svg', icon: 'QuestionFilled' },
|
||||
{ value: 'WarnTriangleFilled', type: 'inner_svg', icon: 'WarnTriangleFilled' },
|
||||
{ value: 'UserFilled', type: 'inner_svg', icon: 'UserFilled' },
|
||||
{ value: 'MoreFilled', type: 'inner_svg', icon: 'MoreFilled' },
|
||||
{ value: 'Tools', type: 'inner_svg', icon: 'Tools' },
|
||||
{ value: 'HomeFilled', type: 'inner_svg', icon: 'HomeFilled' },
|
||||
{ value: 'Menu', type: 'inner_svg', icon: 'Menu' },
|
||||
{ value: 'UploadFilled', type: 'inner_svg', icon: 'UploadFilled' },
|
||||
{ value: 'Avatar', type: 'inner_svg', icon: 'Avatar' },
|
||||
{ value: 'HelpFilled', type: 'inner_svg', icon: 'HelpFilled' },
|
||||
{ value: 'Share', type: 'inner_svg', icon: 'Share' },
|
||||
{ value: 'StarFilled', type: 'inner_svg', icon: 'StarFilled' },
|
||||
{ value: 'Comment', type: 'inner_svg', icon: 'Comment' },
|
||||
{ value: 'Histogram', type: 'inner_svg', icon: 'Histogram' },
|
||||
{ value: 'Grid', type: 'inner_svg', icon: 'Grid' },
|
||||
{ value: 'Promotion', type: 'inner_svg', icon: 'Promotion' },
|
||||
{ value: 'DeleteFilled', type: 'inner_svg', icon: 'DeleteFilled' },
|
||||
{ value: 'RemoveFilled', type: 'inner_svg', icon: 'RemoveFilled' },
|
||||
{ value: 'CirclePlusFilled', type: 'inner_svg', icon: 'CirclePlusFilled' },
|
||||
{ value: 'ArrowLeft', type: 'inner_svg', icon: 'ArrowLeft' },
|
||||
{ value: 'ArrowUp', type: 'inner_svg', icon: 'ArrowUp' },
|
||||
{ value: 'ArrowRight', type: 'inner_svg', icon: 'ArrowRight' },
|
||||
{ value: 'ArrowDown', type: 'inner_svg', icon: 'ArrowDown' },
|
||||
{ value: 'ArrowLeftBold', type: 'inner_svg', icon: 'ArrowLeftBold' },
|
||||
{ value: 'ArrowUpBold', type: 'inner_svg', icon: 'ArrowUpBold' },
|
||||
{ value: 'ArrowRightBold', type: 'inner_svg', icon: 'ArrowRightBold' },
|
||||
{ value: 'ArrowDownBold', type: 'inner_svg', icon: 'ArrowDownBold' },
|
||||
{ value: 'DArrowRight', type: 'inner_svg', icon: 'DArrowRight' },
|
||||
{ value: 'DArrowLeft', type: 'inner_svg', icon: 'DArrowLeft' },
|
||||
{ value: 'Download', type: 'inner_svg', icon: 'Download' },
|
||||
{ value: 'Upload', type: 'inner_svg', icon: 'Upload' },
|
||||
{ value: 'Top', type: 'inner_svg', icon: 'Top' },
|
||||
{ value: 'Bottom', type: 'inner_svg', icon: 'Bottom' }
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -88,8 +88,8 @@ const groupActiveChange = category => {
|
||||
<Icon
|
||||
v-if="['outer_svg', 'graphical'].includes(chartInfo.type)"
|
||||
class-name="item-top-icon"
|
||||
:name="chartInfo.icon"
|
||||
/>
|
||||
><component class="svg-icon item-top-icon" :is="chartInfo.icon"></component
|
||||
></Icon>
|
||||
<component v-else style="color: #a6a6a6" :is="chartInfo.icon"></component>
|
||||
</div>
|
||||
<div v-if="chartInfo.title" class="item-bottom">
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import dbMoreWeb from '@/assets/svg/db-more-web.svg'
|
||||
import { toRefs } from 'vue'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import DragComponent from '@/custom-component/component-group/DragComponent.vue'
|
||||
@ -38,7 +39,7 @@ const handleDragEnd = e => {
|
||||
>
|
||||
<drag-component
|
||||
:themes="themes"
|
||||
icon="db-more-web"
|
||||
:icon="dbMoreWeb"
|
||||
label="网页"
|
||||
drag-info="DeFrame&DeFrame"
|
||||
></drag-component>
|
||||
|
||||
@ -34,7 +34,9 @@ const { icon, name, label, dragInfo, themes } = toRefs(props)
|
||||
<div class="drag-component" :class="'drag-' + themes">
|
||||
<div draggable="true" :data-id="dragInfo" class="icon-content">
|
||||
<span v-if="name" class="label-content">{{ name }}</span>
|
||||
<Icon v-if="icon" class="drag-icon" :name="icon" />
|
||||
<Icon v-if="icon" class="drag-icon"
|
||||
><component class="svg-icon drag-icon" :is="icon"></component
|
||||
></Icon>
|
||||
</div>
|
||||
<div class="label-content">
|
||||
<span>{{ label }}</span>
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import iconVideo from '@/assets/svg/icon-video.svg'
|
||||
import dvPictureShow from '@/assets/svg/dv-picture-show.svg'
|
||||
import iconStream from '@/assets/svg/icon-stream.svg'
|
||||
import { toRefs } from 'vue'
|
||||
import eventBus from '@/utils/eventBus'
|
||||
import DragComponent from '@/custom-component/component-group/DragComponent.vue'
|
||||
@ -45,21 +48,21 @@ const handleDragEnd = e => {
|
||||
<div class="group" @dragstart="handleDragStart" @dragend="handleDragEnd">
|
||||
<drag-component
|
||||
:themes="themes"
|
||||
icon="dv-picture-show"
|
||||
:icon="dvPictureShow"
|
||||
label="图片"
|
||||
drag-info="Picture&Picture"
|
||||
v-on:click="newComponent('Picture')"
|
||||
></drag-component>
|
||||
<drag-component
|
||||
:themes="themes"
|
||||
icon="icon-video"
|
||||
:icon="iconVideo"
|
||||
label="视频"
|
||||
drag-info="DeVideo&DeVideo"
|
||||
v-on:click="newComponent('DeVideo')"
|
||||
></drag-component>
|
||||
<drag-component
|
||||
:themes="themes"
|
||||
icon="icon-stream"
|
||||
:icon="iconStream"
|
||||
label="流媒体"
|
||||
drag-info="DeStreamMedia&DeStreamMedia"
|
||||
v-on:click="newComponent('DeStreamMedia')"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user