forked from github/dataease
fix: 代码合并
This commit is contained in:
commit
9b7fc446ae
18
.typos.toml
18
.typos.toml
@ -9,5 +9,21 @@ keynode = "keynode"
|
|||||||
SCHEM = "SCHEM"
|
SCHEM = "SCHEM"
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
extend-exclude = ["public/", "amap-wx/", "m-icon/", "uni-card/", "uni-col/", "uni-link/", "uni-list/", "uni-list-item/", "uni-row/", "migration/", "mapFiles/", "frontend/src/views/chart/components/table/TableNormal.vue"]
|
extend-exclude = [
|
||||||
|
"public/",
|
||||||
|
"amap-wx/",
|
||||||
|
"m-icon/",
|
||||||
|
"uni-card/",
|
||||||
|
"uni-col/",
|
||||||
|
"uni-link/",
|
||||||
|
"uni-list/",
|
||||||
|
"uni-list-item/",
|
||||||
|
"uni-row/",
|
||||||
|
"migration/",
|
||||||
|
"mapFiles/",
|
||||||
|
"core/frontend/src/views/chart/components/table/TableNormal.vue",
|
||||||
|
"core/backend/src/main/java/io/dataease/ext/ExtSysUserMapper.xml",
|
||||||
|
"core/backend/src/main/java/io/dataease/ext/AuthMapper.xml",
|
||||||
|
"installer/dataease/templates/be.conf"
|
||||||
|
]
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ public class PanelTemplateRequest extends PanelTemplateWithBLOBs {
|
|||||||
@ApiModelProperty("排序")
|
@ApiModelProperty("排序")
|
||||||
private String sort;
|
private String sort;
|
||||||
@ApiModelProperty("详细信息")
|
@ApiModelProperty("详细信息")
|
||||||
private String withBlobs="Y";
|
private String withBlobs="N";
|
||||||
@ApiModelProperty("操作类型")
|
@ApiModelProperty("操作类型")
|
||||||
private String optType;
|
private String optType;
|
||||||
@ApiModelProperty("静态文件")
|
@ApiModelProperty("静态文件")
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
panel_template.id, panel_template.`name`, panel_template.pid, panel_template.`level`, panel_template.node_type, panel_template.create_by, panel_template.create_time, panel_template.template_type
|
panel_template.id, panel_template.`name`, panel_template.pid, panel_template.`level`, panel_template.node_type, panel_template.create_by, panel_template.create_time, panel_template.template_type, panel_template.snapshot
|
||||||
</sql>
|
</sql>
|
||||||
<sql id="Blob_Column_List">
|
<sql id="Blob_Column_List">
|
||||||
panel_template.snapshot, panel_template.template_style, panel_template.template_data, panel_template.dynamic_data
|
panel_template.template_style, panel_template.template_data, panel_template.dynamic_data
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="panelTemplate" resultMap="BaseResultMapDTO">
|
<select id="panelTemplate" resultMap="BaseResultMapDTO">
|
||||||
|
@ -1,96 +0,0 @@
|
|||||||
package io.dataease.plugins.server;
|
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
|
||||||
import io.dataease.auth.annotation.DePermission;
|
|
||||||
import io.dataease.commons.constants.DePermissionType;
|
|
||||||
import io.dataease.commons.constants.ResourceAuthLevel;
|
|
||||||
import io.dataease.commons.utils.PageUtils;
|
|
||||||
import io.dataease.commons.utils.Pager;
|
|
||||||
import io.dataease.i18n.Translator;
|
|
||||||
import io.dataease.plugins.config.SpringContextUtil;
|
|
||||||
import io.dataease.plugins.xpack.auth.dto.request.DataSetRowPermissionsDTO;
|
|
||||||
import io.dataease.plugins.xpack.auth.dto.request.DatasetRowPermissions;
|
|
||||||
import io.dataease.plugins.xpack.auth.service.RowPermissionService;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.springframework.util.CollectionUtils;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import springfox.documentation.annotations.ApiIgnore;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@ApiIgnore
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("plugin/dataset/rowPermissions")
|
|
||||||
public class RowPermissionsController {
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("保存")
|
|
||||||
@PostMapping("save")
|
|
||||||
public void save(@RequestBody DatasetRowPermissions datasetRowPermissions) throws Exception {
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
|
|
||||||
DataSetRowPermissionsDTO request = new DataSetRowPermissionsDTO();
|
|
||||||
request.setAuthTargetType(datasetRowPermissions.getAuthTargetType());
|
|
||||||
request.setAuthTargetId(datasetRowPermissions.getAuthTargetId());
|
|
||||||
request.setDatasetFieldId(datasetRowPermissions.getDatasetFieldId());
|
|
||||||
List<DataSetRowPermissionsDTO> rowPermissionsDTOS = rowPermissionService.searchRowPermissions(request);
|
|
||||||
if (StringUtils.isEmpty(datasetRowPermissions.getId())) {
|
|
||||||
if (!CollectionUtils.isEmpty(rowPermissionsDTOS)) {
|
|
||||||
throw new Exception(Translator.get("i18n_rp_exist"));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!CollectionUtils.isEmpty(rowPermissionsDTOS) && rowPermissionsDTOS.size() > 1) {
|
|
||||||
throw new Exception(Translator.get("i18n_rp_exist"));
|
|
||||||
}
|
|
||||||
if (rowPermissionsDTOS.size() == 1 && !rowPermissionsDTOS.get(0).getId().equalsIgnoreCase(datasetRowPermissions.getId())) {
|
|
||||||
throw new Exception(Translator.get("i18n_rp_exist"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
rowPermissionService.save(datasetRowPermissions);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("查询")
|
|
||||||
@PostMapping("/list")
|
|
||||||
public List<DataSetRowPermissionsDTO> rowPermissions(@RequestBody DataSetRowPermissionsDTO request) {
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
return rowPermissionService.searchRowPermissions(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("删除")
|
|
||||||
@PostMapping("/delete")
|
|
||||||
public void dataSetRowPermissionInfo(@RequestBody DatasetRowPermissions datasetRowPermissions) {
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
rowPermissionService.delete(datasetRowPermissions.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("分页查询")
|
|
||||||
@PostMapping("/pageList/{datasetId}/{goPage}/{pageSize}")
|
|
||||||
public Pager<List<DataSetRowPermissionsDTO>> rowPermissions(@PathVariable String datasetId, @PathVariable int goPage, @PathVariable int pageSize) {
|
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
|
|
||||||
return PageUtils.setPageInfo(page, rowPermissionService.queryRowPermissions(datasetId));
|
|
||||||
}
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("有权限的对象")
|
|
||||||
@PostMapping("/authObjs")
|
|
||||||
public List<Object> authObjs(@RequestBody DataSetRowPermissionsDTO request) {
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
return (List<Object>) rowPermissionService.authObjs(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
|
||||||
@ApiOperation("详情")
|
|
||||||
@PostMapping("/dataSetRowPermissionInfo")
|
|
||||||
public DataSetRowPermissionsDTO dataSetRowPermissionInfo(@RequestBody DataSetRowPermissionsDTO request) {
|
|
||||||
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
|
||||||
return rowPermissionService.dataSetRowPermissionInfo(request);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -12,6 +12,8 @@ import io.dataease.i18n.Translator;
|
|||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeRequest;
|
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeRequest;
|
||||||
import io.dataease.plugins.config.SpringContextUtil;
|
import io.dataease.plugins.config.SpringContextUtil;
|
||||||
|
import io.dataease.plugins.xpack.auth.dto.request.DataSetRowPermissionsDTO;
|
||||||
|
import io.dataease.plugins.xpack.auth.service.RowPermissionService;
|
||||||
import io.dataease.plugins.xpack.auth.service.RowPermissionTreeService;
|
import io.dataease.plugins.xpack.auth.service.RowPermissionTreeService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@ -21,7 +23,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
//@ApiIgnore
|
|
||||||
@Api(tags = "xpack:行权限")
|
@Api(tags = "xpack:行权限")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("plugin/dataset/rowPermissionsTree")
|
@RequestMapping("plugin/dataset/rowPermissionsTree")
|
||||||
@ -85,4 +87,13 @@ public class RowPermissionsTreeController {
|
|||||||
Pager<List<DataSetRowPermissionsTreeDTO>> setPageInfo = PageUtils.setPageInfo(page, list);
|
Pager<List<DataSetRowPermissionsTreeDTO>> setPageInfo = PageUtils.setPageInfo(page, list);
|
||||||
return setPageInfo;
|
return setPageInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DePermission(type = DePermissionType.DATASET, value = "datasetId", level = ResourceAuthLevel.DATASET_LEVEL_MANAGE)
|
||||||
|
@ApiOperation("有权限的对象")
|
||||||
|
@PostMapping("/authObjs")
|
||||||
|
public List<Object> authObjs(@RequestBody DataSetRowPermissionsDTO request) {
|
||||||
|
RowPermissionService rowPermissionService = SpringContextUtil.getBean(RowPermissionService.class);
|
||||||
|
return (List<Object>) rowPermissionService.authObjs(request);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1220,8 +1220,8 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
if (x.getDeExtractType() == 0) {
|
if (x.getDeExtractType() == 0) {
|
||||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||||
fieldName = String.format(format,
|
fieldName = String.format(format,
|
||||||
String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, DorisConstants.DEFAULT_DATE_FORMAT), "%Y"),
|
String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT), "%Y"),
|
||||||
String.format(DorisConstants.QUARTER, String.format(DorisConstants.STR_TO_DATE, originField, DorisConstants.DEFAULT_DATE_FORMAT)));
|
String.format(DorisConstants.QUARTER, String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT)));
|
||||||
} else {
|
} else {
|
||||||
fieldName = String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT), format);
|
fieldName = String.format(DorisConstants.DATE_FORMAT, String.format(DorisConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : DorisConstants.DEFAULT_DATE_FORMAT), format);
|
||||||
}
|
}
|
||||||
|
@ -1149,7 +1149,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
String whereValue = "";
|
String whereValue = "";
|
||||||
|
|
||||||
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
if (StringUtils.containsIgnoreCase(request.getOperator(), "in")) {
|
||||||
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")) {
|
if(request.getDatasetTableField() != null && request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")) {
|
||||||
whereValue = "(" + value.stream().map(str -> {
|
whereValue = "(" + value.stream().map(str -> {
|
||||||
return "N" + "'" + str + "'";
|
return "N" + "'" + str + "'";
|
||||||
}).collect(Collectors.joining(",")) + ")";
|
}).collect(Collectors.joining(",")) + ")";
|
||||||
@ -1171,7 +1171,7 @@ public class SqlserverQueryProvider extends QueryProvider {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")){
|
if(request.getDatasetTableField() != null && request.getDatasetTableField().getType().equalsIgnoreCase("NVARCHAR")){
|
||||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE_CH, value.get(0));
|
||||||
}else {
|
}else {
|
||||||
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
whereValue = String.format(SqlServerSQLConstants.WHERE_VALUE_VALUE, value.get(0));
|
||||||
|
@ -604,12 +604,21 @@ public class ChartViewService {
|
|||||||
List<ChartViewFieldDTO> viewFields = gson.fromJson(view.getViewFields(), tokenType);
|
List<ChartViewFieldDTO> viewFields = gson.fromJson(view.getViewFields(), tokenType);
|
||||||
final Map<String, List<ChartViewFieldDTO>> extFieldsMap = new LinkedHashMap<>();
|
final Map<String, List<ChartViewFieldDTO>> extFieldsMap = new LinkedHashMap<>();
|
||||||
if (CollectionUtils.isNotEmpty(viewFields)) {
|
if (CollectionUtils.isNotEmpty(viewFields)) {
|
||||||
viewFields.forEach(field -> {
|
String[] busiFlagArray = new String[] {"daxis", "locationXaxis", "locationYaxis"};
|
||||||
|
Map<String, Boolean> flagMap = new HashMap<>();
|
||||||
|
for (String s : busiFlagArray) {
|
||||||
|
flagMap.put(s, false);
|
||||||
|
}
|
||||||
|
for (ChartViewFieldDTO field : viewFields) {
|
||||||
|
flagMap.put(field.getBusiType(), true);
|
||||||
String busiType = field.getBusiType();
|
String busiType = field.getBusiType();
|
||||||
List<ChartViewFieldDTO> list = extFieldsMap.containsKey(busiType) ? extFieldsMap.get(busiType) : new ArrayList<>();
|
List<ChartViewFieldDTO> list = extFieldsMap.containsKey(busiType) ? extFieldsMap.get(busiType) : new ArrayList<>();
|
||||||
list.add(field);
|
list.add(field);
|
||||||
extFieldsMap.put(field.getBusiType(), list);
|
extFieldsMap.put(field.getBusiType(), list);
|
||||||
});
|
}
|
||||||
|
if (flagMap.get("daxis") && (!flagMap.get("locationXaxis") || !flagMap.get("locationYaxis"))) {
|
||||||
|
viewFields = viewFields.stream().filter(field -> !StringUtils.equals("daxis", field.getBusiType())).collect(Collectors.toList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ChartViewFieldDTO> xAxisBase = gson.fromJson(view.getXAxis(), tokenType);
|
List<ChartViewFieldDTO> xAxisBase = gson.fromJson(view.getXAxis(), tokenType);
|
||||||
@ -1474,6 +1483,8 @@ public class ChartViewService {
|
|||||||
|
|
||||||
List<PluginViewField> pluginViewFields = fieldMap.entrySet().stream().flatMap(entry -> entry.getValue().stream().map(field -> {
|
List<PluginViewField> pluginViewFields = fieldMap.entrySet().stream().flatMap(entry -> entry.getValue().stream().map(field -> {
|
||||||
PluginViewField pluginViewField = BeanUtils.copyBean(new PluginViewField(), field);
|
PluginViewField pluginViewField = BeanUtils.copyBean(new PluginViewField(), field);
|
||||||
|
pluginViewField.setFilter(gson.fromJson(gson.toJson(field.getFilter()), new TypeToken<List<PluginChartCustomFilterItem>>() {
|
||||||
|
}.getType()));
|
||||||
pluginViewField.setTypeField(entry.getKey());
|
pluginViewField.setTypeField(entry.getKey());
|
||||||
return pluginViewField;
|
return pluginViewField;
|
||||||
})).collect(Collectors.toList());
|
})).collect(Collectors.toList());
|
||||||
|
@ -2,6 +2,7 @@ package io.dataease.service.chart;
|
|||||||
|
|
||||||
import cn.hutool.core.util.ReflectUtil;
|
import cn.hutool.core.util.ReflectUtil;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.google.gson.reflect.TypeToken;
|
||||||
import io.dataease.commons.model.PluginViewSetImpl;
|
import io.dataease.commons.model.PluginViewSetImpl;
|
||||||
import io.dataease.commons.utils.TableUtils;
|
import io.dataease.commons.utils.TableUtils;
|
||||||
import io.dataease.controller.request.chart.ChartExtRequest;
|
import io.dataease.controller.request.chart.ChartExtRequest;
|
||||||
@ -14,6 +15,7 @@ import io.dataease.plugins.common.constants.DatasetType;
|
|||||||
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
||||||
import io.dataease.plugins.common.dto.chart.ChartFieldCustomFilterDTO;
|
import io.dataease.plugins.common.dto.chart.ChartFieldCustomFilterDTO;
|
||||||
import io.dataease.plugins.common.dto.chart.ChartViewFieldDTO;
|
import io.dataease.plugins.common.dto.chart.ChartViewFieldDTO;
|
||||||
|
import io.dataease.plugins.common.dto.chart.ChartViewFieldFilterDTO;
|
||||||
import io.dataease.plugins.common.dto.sqlObj.SQLObj;
|
import io.dataease.plugins.common.dto.sqlObj.SQLObj;
|
||||||
import io.dataease.plugins.common.request.chart.ChartExtFilterRequest;
|
import io.dataease.plugins.common.request.chart.ChartExtFilterRequest;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
@ -247,6 +249,9 @@ public class ViewPluginBaseServiceImpl implements ViewPluginBaseService {
|
|||||||
methodName = "getYWheres";
|
methodName = "getYWheres";
|
||||||
}
|
}
|
||||||
ChartViewFieldDTO chartViewFieldDTO = BeanUtils.copyBean(new ChartViewFieldDTO(), field);
|
ChartViewFieldDTO chartViewFieldDTO = BeanUtils.copyBean(new ChartViewFieldDTO(), field);
|
||||||
|
chartViewFieldDTO.setFilter(gson.fromJson(gson.toJson(field.getFilter()), new TypeToken<List<ChartViewFieldFilterDTO>>() {
|
||||||
|
}.getType()));
|
||||||
|
|
||||||
Object execResult;
|
Object execResult;
|
||||||
if ((execResult = execProviderMethod(queryProvider, methodName, chartViewFieldDTO, originField, fieldAlias)) != null) {
|
if ((execResult = execProviderMethod(queryProvider, methodName, chartViewFieldDTO, originField, fieldAlias)) != null) {
|
||||||
String where = (String) execResult;
|
String where = (String) execResult;
|
||||||
|
@ -152,9 +152,6 @@ public class DataSetGroupService {
|
|||||||
if (StringUtils.isNotEmpty(datasetGroup.getId())) {
|
if (StringUtils.isNotEmpty(datasetGroup.getId())) {
|
||||||
criteria.andIdNotEqualTo(datasetGroup.getId());
|
criteria.andIdNotEqualTo(datasetGroup.getId());
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isNotEmpty(datasetGroup.getLevel())) {
|
|
||||||
criteria.andLevelEqualTo(datasetGroup.getLevel());
|
|
||||||
}
|
|
||||||
List<DatasetGroup> list = datasetGroupMapper.selectByExample(datasetGroupExample);
|
List<DatasetGroup> list = datasetGroupMapper.selectByExample(datasetGroupExample);
|
||||||
if (list.size() > 0) {
|
if (list.size() > 0) {
|
||||||
throw new RuntimeException(Translator.get("I18N_DATASET_GROUP_EXIST"));
|
throw new RuntimeException(Translator.get("I18N_DATASET_GROUP_EXIST"));
|
||||||
|
@ -314,7 +314,8 @@ public class PanelAppTemplateService {
|
|||||||
for (ChartViewWithBLOBs chartView : chartViewsInfo) {
|
for (ChartViewWithBLOBs chartView : chartViewsInfo) {
|
||||||
String oldViewId = chartView.getId();
|
String oldViewId = chartView.getId();
|
||||||
// 替换datasetId
|
// 替换datasetId
|
||||||
chartView.setTableId(datasetsRealMap.get(chartView.getTableId()));
|
String newTableId = datasetsRealMap.get(chartView.getTableId());
|
||||||
|
chartView.setTableId(StringUtils.isEmpty(newTableId) ? " " : newTableId);
|
||||||
datasetsRealMap.forEach((k, v) -> {
|
datasetsRealMap.forEach((k, v) -> {
|
||||||
chartView.setXAxis(chartView.getXAxis().replaceAll(k, v));
|
chartView.setXAxis(chartView.getXAxis().replaceAll(k, v));
|
||||||
chartView.setXAxisExt(chartView.getXAxisExt().replaceAll(k, v));
|
chartView.setXAxisExt(chartView.getXAxisExt().replaceAll(k, v));
|
||||||
|
@ -68,6 +68,7 @@ public class SysUserService {
|
|||||||
|
|
||||||
List<SysUserGridResponse> lists = extSysUserMapper.query(request);
|
List<SysUserGridResponse> lists = extSysUserMapper.query(request);
|
||||||
lists.forEach(item -> {
|
lists.forEach(item -> {
|
||||||
|
item.setPassword("");
|
||||||
List<SysUserRole> roles = item.getRoles();
|
List<SysUserRole> roles = item.getRoles();
|
||||||
List<Long> roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList());
|
List<Long> roleIds = roles.stream().filter(ObjectUtils::isNotEmpty).map(SysUserRole::getRoleId).collect(Collectors.toList());
|
||||||
item.setRoleIds(roleIds);
|
item.setRoleIds(roleIds);
|
||||||
|
@ -228,7 +228,7 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for demo_new_trend_of_diagnosis
|
-- Table structure for demo_new_trend_of_diagnosis
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
CREATE TABLE `demo_new_trend_of_diagnosis` (
|
CREATE TABLE IF NOT EXISTS `demo_new_trend_of_diagnosis` (
|
||||||
`date` varchar(50) NOT NULL DEFAULT '' COMMENT '日期',
|
`date` varchar(50) NOT NULL DEFAULT '' COMMENT '日期',
|
||||||
`new_diagnosis` bigint(13) DEFAULT NULL COMMENT '新增确诊',
|
`new_diagnosis` bigint(13) DEFAULT NULL COMMENT '新增确诊',
|
||||||
`current_diagnosis` bigint(13) DEFAULT NULL COMMENT '现有确诊'
|
`current_diagnosis` bigint(13) DEFAULT NULL COMMENT '现有确诊'
|
||||||
|
@ -47,7 +47,6 @@ ALTER TABLE `demo_stny_carbon_emission_trend` COMMENT = '官方示例模板数
|
|||||||
ALTER TABLE `demo_stny_disposable_energy` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
ALTER TABLE `demo_stny_disposable_energy` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
||||||
ALTER TABLE `demo_stny_energy_consumption_proportion` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
ALTER TABLE `demo_stny_energy_consumption_proportion` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
||||||
ALTER TABLE `demo_stny_energy_consumption_total` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
ALTER TABLE `demo_stny_energy_consumption_total` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
||||||
ALTER TABLE `demo_stny_province_city_ index` COMMENT = '官方示例模板数据(双碳及能源情况概览)';
|
|
||||||
ALTER TABLE `de_engine` COMMENT = '引擎设置表';
|
ALTER TABLE `de_engine` COMMENT = '引擎设置表';
|
||||||
ALTER TABLE `file_content` COMMENT = '文件内容表';
|
ALTER TABLE `file_content` COMMENT = '文件内容表';
|
||||||
ALTER TABLE `file_metadata` COMMENT = '文件基础信息表';
|
ALTER TABLE `file_metadata` COMMENT = '文件基础信息表';
|
||||||
|
@ -258,15 +258,6 @@ export function datasetTaskList(page, size, data, loading) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function datasetRowPermissionsList(datasetId, page, size, data, loading) {
|
|
||||||
return request({
|
|
||||||
url: 'plugin/dataset/rowPermissions/pageList/' + datasetId + '/' + page + '/' + size,
|
|
||||||
method: 'post',
|
|
||||||
data,
|
|
||||||
loading: loading
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function checkCustomDs() {
|
export function checkCustomDs() {
|
||||||
return request({
|
return request({
|
||||||
url: '/system/checkCustomDs',
|
url: '/system/checkCustomDs',
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
{{ $t('commons.confirm') }}
|
{{ $t('commons.confirm') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
|
style="margin-right: 24px"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="editCancel"
|
@click="editCancel"
|
||||||
>
|
>
|
||||||
|
@ -120,7 +120,8 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
round
|
round
|
||||||
@click="addLinkageField(null,null)"
|
@click="addLinkageField(null,null)"
|
||||||
>追加联动依赖字段</el-button>
|
>追加联动依赖字段
|
||||||
|
</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- <el-button slot="reference">T</el-button>-->
|
<!-- <el-button slot="reference">T</el-button>-->
|
||||||
@ -134,6 +135,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import {checkSameDataSet} from '@/api/chart/chart'
|
import {checkSameDataSet} from '@/api/chart/chart'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@ -172,18 +174,24 @@ export default {
|
|||||||
},
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
'targetLinkageInfo',
|
'targetLinkageInfo',
|
||||||
'curLinkageView'
|
'curLinkageView',
|
||||||
|
'panelViewDetailsInfo'
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const _this = this
|
const _this = this
|
||||||
// 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系
|
// 初始化映射关系 如果当前是相同的数据集且没有关联关系,则自动补充映射关系
|
||||||
checkSameDataSet(this.curLinkageView.propValue.viewId, this.element.propValue.viewId).then(res => {
|
checkSameDataSet(this.curLinkageView.propValue.viewId, this.element.propValue.viewId).then(res => {
|
||||||
|
const chartDetails = JSON.parse(this.panelViewDetailsInfo[this.curLinkageView.propValue.viewId])
|
||||||
|
const curCheckAllAxisStr = chartDetails.xaxis + chartDetails.xaxisExt + chartDetails.yaxis + chartDetails.yaxisExt
|
||||||
|
const targetChartDetails = JSON.parse(this.panelViewDetailsInfo[this.element.propValue.viewId])
|
||||||
|
const targetCheckAllAxisStr = targetChartDetails.xaxis + targetChartDetails.xaxisExt + targetChartDetails.yaxis + targetChartDetails.yaxisExt
|
||||||
|
|
||||||
if (res.data === 'YES' && this.linkageInfo.linkageFields.length === 0) {
|
if (res.data === 'YES' && this.linkageInfo.linkageFields.length === 0) {
|
||||||
this.sourceLinkageInfo.targetViewFields.forEach(item => {
|
this.sourceLinkageInfo.targetViewFields.forEach(item => {
|
||||||
_this.$nextTick(() => {
|
if (curCheckAllAxisStr.includes(item.id)&&targetCheckAllAxisStr.includes(item.id)) {
|
||||||
this.addLinkageField(item.id, item.id)
|
this.addLinkageField(item.id, item.id)
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -222,6 +230,7 @@ export default {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ellip {
|
.ellip {
|
||||||
/*width: 100%;*/
|
/*width: 100%;*/
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@ -250,6 +259,7 @@ export default {
|
|||||||
height: 35px;
|
height: 35px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-popover {
|
::v-deep .el-popover {
|
||||||
height: 200px;
|
height: 200px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
@ -17,8 +17,7 @@
|
|||||||
v-if="curComponent.type != 'custom-button'"
|
v-if="curComponent.type != 'custom-button'"
|
||||||
icon="el-icon-document-copy"
|
icon="el-icon-document-copy"
|
||||||
@click.native="copy"
|
@click.native="copy"
|
||||||
><span>{{ $t('panel.copy') }} (<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command"
|
><span>{{ $t('panel.copy') }} (<span v-show="systemOS==='Mac'"><i class="icon iconfont icon-command" />+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
||||||
/>+ D</span> <span v-show="systemOS!=='Mac'">Control + D</span>)</span>
|
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@ -193,7 +192,8 @@ export default {
|
|||||||
'text',
|
'text',
|
||||||
'label',
|
'label',
|
||||||
'flow-map',
|
'flow-map',
|
||||||
'bidirectional-bar'
|
'bidirectional-bar',
|
||||||
|
'race-bar'
|
||||||
],
|
],
|
||||||
linkageExcludeViewType: [
|
linkageExcludeViewType: [
|
||||||
'richTextView',
|
'richTextView',
|
||||||
@ -202,7 +202,8 @@ export default {
|
|||||||
'text',
|
'text',
|
||||||
'label',
|
'label',
|
||||||
'flow-map',
|
'flow-map',
|
||||||
'bidirectional-bar'
|
'bidirectional-bar',
|
||||||
|
'race-bar'
|
||||||
],
|
],
|
||||||
copyData: null,
|
copyData: null,
|
||||||
hyperlinksSetVisible: false,
|
hyperlinksSetVisible: false,
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
:obj="{active, chart, trackMenu, searchCount, terminalType: scaleCoefficientType}"
|
:obj="{active, chart, trackMenu, searchCount, terminalType: scaleCoefficientType}"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
:track-menu="trackMenu"
|
:track-menu="trackMenu"
|
||||||
|
:in-screen="inScreen"
|
||||||
:search-count="searchCount"
|
:search-count="searchCount"
|
||||||
:terminal-type="scaleCoefficientType"
|
:terminal-type="scaleCoefficientType"
|
||||||
:scale="scale"
|
:scale="scale"
|
||||||
@ -361,7 +362,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
// 首次加载且非编辑状态新复制的视图,使用外部filter
|
// 首次加载且非编辑状态新复制的视图,使用外部filter
|
||||||
initLoad() {
|
initLoad() {
|
||||||
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad && this.canvasId === 'canvas-main'
|
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
|
||||||
},
|
},
|
||||||
scaleCoefficient() {
|
scaleCoefficient() {
|
||||||
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
|
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
|
||||||
|
@ -60,7 +60,8 @@ export default {
|
|||||||
values: null,
|
values: null,
|
||||||
onFocus: false,
|
onFocus: false,
|
||||||
show: true,
|
show: true,
|
||||||
timer: null
|
outTimer: null,
|
||||||
|
innerTimer: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -134,12 +135,7 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
canvasStyleData: {
|
|
||||||
handler(newVal, oldVla) {
|
|
||||||
this.canvasStyleDataInit()
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
'viewIds': function(value, old) {
|
'viewIds': function(value, old) {
|
||||||
if (typeof value === 'undefined' || value === old) return
|
if (typeof value === 'undefined' || value === old) return
|
||||||
this.setCondition()
|
this.setCondition()
|
||||||
@ -174,7 +170,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInit()
|
this.loadInit()
|
||||||
this.canvasStyleDataInit()
|
this.$nextTick(() => {
|
||||||
|
this.dynamicRefresh()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
bus.$on('onScroll', this.onScroll)
|
bus.$on('onScroll', this.onScroll)
|
||||||
@ -183,18 +181,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.timer && clearInterval(this.timer)
|
this.clearTime()
|
||||||
bus.$off('onScroll', this.onScroll)
|
bus.$off('onScroll', this.onScroll)
|
||||||
bus.$off('reset-default-value', this.resetDefaultValue)
|
bus.$off('reset-default-value', this.resetDefaultValue)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInit() {
|
loadInit() {
|
||||||
if (this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
this.clearTime()
|
||||||
if (this.element.options.attrs.default) {
|
if (this.refreshHandler()) {
|
||||||
const widget = ApplicationContext.getService(this.element.serviceName)
|
|
||||||
this.values = widget.dynamicDateFormNow(this.element)
|
|
||||||
this.dateChange(this.values)
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.element.options.value) {
|
if (this.element.options.value) {
|
||||||
@ -202,22 +196,42 @@ export default {
|
|||||||
this.dateChange(this.values)
|
this.dateChange(this.values)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canvasStyleDataInit() {
|
refreshHandler() {
|
||||||
if (this.inDraw && this.canvasStyleData.refreshViewEnable && this.element.options.attrs.default && this.element.options.attrs.default.isDynamic) {
|
if (this.element.options.attrs.default?.isDynamic) {
|
||||||
this.searchCount = 0
|
const widget = ApplicationContext.getService(this.element.serviceName)
|
||||||
this.timer && clearInterval(this.timer)
|
this.values = widget.dynamicDateFormNow(this.element)
|
||||||
let refreshTime = 300000
|
this.dateChange(this.values)
|
||||||
if (this.canvasStyleData.refreshTime && this.canvasStyleData.refreshTime > 0) {
|
return true
|
||||||
if (this.canvasStyleData.refreshUnit === 'second') {
|
|
||||||
refreshTime = this.canvasStyleData.refreshTime * 1000
|
|
||||||
} else {
|
|
||||||
refreshTime = this.canvasStyleData.refreshTime * 60000
|
|
||||||
}
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
clearTime() {
|
||||||
|
if (this.outTimer) {
|
||||||
|
clearTimeout(this.outTimer)
|
||||||
|
this.outTimer = null
|
||||||
}
|
}
|
||||||
this.timer = setInterval(() => {
|
if (this.innerTimer) {
|
||||||
this.loadInit()
|
clearInterval(this.innerTimer)
|
||||||
this.searchCount++
|
this.innerTimer = null
|
||||||
}, refreshTime)
|
}
|
||||||
|
},
|
||||||
|
dynamicRefresh() {
|
||||||
|
if (this.inDraw && this.element.options.attrs.default?.isDynamic) {
|
||||||
|
const nowDate = new Date()
|
||||||
|
const nowTime = nowDate.getTime()
|
||||||
|
const tomorrow = new Date(`${nowDate.getFullYear()}-${nowDate.getMonth() + 1}-${nowDate.getDate() + 1} 00:00:01`)
|
||||||
|
const tomorrowTime = tomorrow.getTime()
|
||||||
|
this.clearTime()
|
||||||
|
this.outTimer = setTimeout(() => {
|
||||||
|
if (this.inDraw) {
|
||||||
|
this.refreshHandler()
|
||||||
|
}
|
||||||
|
this.innerTimer = setInterval(() => {
|
||||||
|
if (this.inDraw) {
|
||||||
|
this.refreshHandler()
|
||||||
|
}
|
||||||
|
}, 24 * 3600 * 1000)
|
||||||
|
}, tomorrowTime - nowTime)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
clearHandler() {
|
clearHandler() {
|
||||||
|
@ -1489,6 +1489,8 @@ export default {
|
|||||||
label_content: 'Label Content',
|
label_content: 'Label Content',
|
||||||
percent: 'Percent',
|
percent: 'Percent',
|
||||||
table_index_desc: 'Index Header Name',
|
table_index_desc: 'Index Header Name',
|
||||||
|
table_row_tooltip: 'Row Tooltip',
|
||||||
|
table_col_tooltip: 'Column Tooltip',
|
||||||
total_sort: 'Total Sort',
|
total_sort: 'Total Sort',
|
||||||
total_sort_none: 'None',
|
total_sort_none: 'None',
|
||||||
total_sort_asc: 'ASC',
|
total_sort_asc: 'ASC',
|
||||||
|
@ -1488,6 +1488,8 @@ export default {
|
|||||||
label_content: '標籤展示',
|
label_content: '標籤展示',
|
||||||
percent: '占比',
|
percent: '占比',
|
||||||
table_index_desc: '表頭名稱',
|
table_index_desc: '表頭名稱',
|
||||||
|
table_row_tooltip: '行頭提示',
|
||||||
|
table_col_tooltip: '列頭提示',
|
||||||
total_sort: '總計排序',
|
total_sort: '總計排序',
|
||||||
total_sort_none: '無',
|
total_sort_none: '無',
|
||||||
total_sort_asc: '升序',
|
total_sort_asc: '升序',
|
||||||
|
@ -1487,6 +1487,8 @@ export default {
|
|||||||
label_content: '标签展示',
|
label_content: '标签展示',
|
||||||
percent: '占比',
|
percent: '占比',
|
||||||
table_index_desc: '表头名称',
|
table_index_desc: '表头名称',
|
||||||
|
table_row_tooltip: '行头提示',
|
||||||
|
table_col_tooltip: '列头提示',
|
||||||
total_sort: '总计排序',
|
total_sort: '总计排序',
|
||||||
total_sort_none: '无',
|
total_sort_none: '无',
|
||||||
total_sort_asc: '升序',
|
total_sort_asc: '升序',
|
||||||
|
@ -40,6 +40,7 @@ import VueFriendlyIframe from 'vue-friendly-iframe'
|
|||||||
import vueToPdf from 'vue-to-pdf'
|
import vueToPdf from 'vue-to-pdf'
|
||||||
import VueVideoPlayer from 'vue-video-player'
|
import VueVideoPlayer from 'vue-video-player'
|
||||||
import 'video.js/dist/video-js.css'
|
import 'video.js/dist/video-js.css'
|
||||||
|
import '@antv/s2/dist/style.min.css'
|
||||||
// 控制标签宽高成比例的指令
|
// 控制标签宽高成比例的指令
|
||||||
import proportion from 'vue-proportion-directive'
|
import proportion from 'vue-proportion-directive'
|
||||||
|
|
||||||
|
@ -45,6 +45,16 @@ export function baseBarOptionAntV(plot, container, chart, action, isGroup, isSta
|
|||||||
yAxis: yAxis,
|
yAxis: yAxis,
|
||||||
slider: slider,
|
slider: slider,
|
||||||
annotations: analyse,
|
annotations: analyse,
|
||||||
|
brush: {
|
||||||
|
enabled: true,
|
||||||
|
isStartEnable: (context) => {
|
||||||
|
// 按住 shift 键,才能开启交互
|
||||||
|
if (context.event.gEvent.originalEvent?.shiftKey) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
interactions: [
|
interactions: [
|
||||||
{
|
{
|
||||||
type: 'legend-active', cfg: {
|
type: 'legend-active', cfg: {
|
||||||
@ -162,6 +172,16 @@ export function hBaseBarOptionAntV(plot, container, chart, action, isGroup, isSt
|
|||||||
yAxis: yAxis,
|
yAxis: yAxis,
|
||||||
slider: slider,
|
slider: slider,
|
||||||
annotations: analyse,
|
annotations: analyse,
|
||||||
|
brush: {
|
||||||
|
enabled: true,
|
||||||
|
isStartEnable: (context) => {
|
||||||
|
// 按住 shift 键,才能开启交互
|
||||||
|
if (context.event.gEvent.originalEvent?.shiftKey) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
},
|
||||||
interactions: [
|
interactions: [
|
||||||
{
|
{
|
||||||
type: 'legend-active', cfg: {
|
type: 'legend-active', cfg: {
|
||||||
|
@ -86,6 +86,12 @@ export const DEFAULT_SIZE = {
|
|||||||
tableHeaderAlign: 'left',
|
tableHeaderAlign: 'left',
|
||||||
tableItemAlign: 'right',
|
tableItemAlign: 'right',
|
||||||
tableAutoBreakLine: false,
|
tableAutoBreakLine: false,
|
||||||
|
tableRowTooltip: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
|
tableColTooltip: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
gaugeMinType: 'fix', // fix or dynamic
|
gaugeMinType: 'fix', // fix or dynamic
|
||||||
gaugeMinField: {
|
gaugeMinField: {
|
||||||
id: '',
|
id: '',
|
||||||
|
@ -593,9 +593,11 @@ export function getXAxis(chart) {
|
|||||||
stroke: axisCfg.lineStyle.color
|
stroke: axisCfg.lineStyle.color
|
||||||
}
|
}
|
||||||
} : null
|
} : null
|
||||||
|
const rotate = parseInt(a.axisLabel.rotate)
|
||||||
const label = a.axisLabel.show ? {
|
const label = a.axisLabel.show ? {
|
||||||
rotate: parseInt(a.axisLabel.rotate) * Math.PI / 180,
|
rotate: rotate * Math.PI / 180,
|
||||||
style: {
|
style: {
|
||||||
|
textAlign: rotate > 20 ? 'start' : rotate < -20 ? 'end' : 'center',
|
||||||
fill: a.axisLabel.color,
|
fill: a.axisLabel.color,
|
||||||
fontSize: parseInt(a.axisLabel.fontSize)
|
fontSize: parseInt(a.axisLabel.fontSize)
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { TableSheet, S2Event, PivotSheet, DataCell, EXTRA_FIELD, TOTAL_VALUE } from '@antv/s2'
|
import { TableSheet, S2Event, PivotSheet, DataCell, EXTRA_FIELD, TOTAL_VALUE, BaseEvent } from '@antv/s2'
|
||||||
import { getCustomTheme, getSize } from '@/views/chart/chart/common/common_table'
|
import { getCustomTheme, getSize } from '@/views/chart/chart/common/common_table'
|
||||||
import { DEFAULT_COLOR_CASE, DEFAULT_TOTAL } from '@/views/chart/chart/chart'
|
import { DEFAULT_COLOR_CASE, DEFAULT_TOTAL } from '@/views/chart/chart/chart'
|
||||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||||
@ -7,7 +7,7 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
|||||||
const containerDom = document.getElementById(container)
|
const containerDom = document.getElementById(container)
|
||||||
|
|
||||||
// fields
|
// fields
|
||||||
const fields = chart.data.fields
|
let fields = chart.data.fields
|
||||||
if (!fields || fields.length === 0) {
|
if (!fields || fields.length === 0) {
|
||||||
if (s2) {
|
if (s2) {
|
||||||
s2.destroy()
|
s2.destroy()
|
||||||
@ -17,21 +17,6 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
|||||||
|
|
||||||
const columns = []
|
const columns = []
|
||||||
const meta = []
|
const meta = []
|
||||||
|
|
||||||
// add drill list
|
|
||||||
if (chart.drill) {
|
|
||||||
let drillFields = []
|
|
||||||
try {
|
|
||||||
drillFields = JSON.parse(chart.drillFields)
|
|
||||||
} catch (err) {
|
|
||||||
drillFields = JSON.parse(JSON.stringify(chart.drillFields))
|
|
||||||
}
|
|
||||||
|
|
||||||
const drillField = drillFields[chart.drillFilters.length]
|
|
||||||
|
|
||||||
const drillFilters = JSON.parse(JSON.stringify(chart.drillFilters))
|
|
||||||
const drillExp = drillFilters[drillFilters.length - 1].datasetTableField
|
|
||||||
|
|
||||||
// 记录下钻起始字段的index
|
// 记录下钻起始字段的index
|
||||||
let xAxis = []
|
let xAxis = []
|
||||||
try {
|
try {
|
||||||
@ -39,68 +24,30 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
xAxis = JSON.parse(JSON.stringify(chart.xaxis))
|
xAxis = JSON.parse(JSON.stringify(chart.xaxis))
|
||||||
}
|
}
|
||||||
let index = 0
|
const nameMap = xAxis.reduce((pre, next) => {
|
||||||
for (let i = 0; i < xAxis.length; i++) {
|
pre[next.dataeaseName] = next
|
||||||
if (xAxis[i].id === drillFilters[0].fieldId) {
|
return pre
|
||||||
index = i
|
}, {})
|
||||||
break
|
if (chart.drill) {
|
||||||
|
let drillFields = []
|
||||||
|
try {
|
||||||
|
drillFields = JSON.parse(chart.drillFields)
|
||||||
|
} catch (err) {
|
||||||
|
drillFields = JSON.parse(JSON.stringify(chart.drillFields))
|
||||||
}
|
}
|
||||||
|
// 总下钻过滤字段
|
||||||
|
const drillFilters = JSON.parse(JSON.stringify(chart.drillFilters)).map(i => i.fieldId)
|
||||||
|
// 当前下钻字段
|
||||||
|
const curDrillField = drillFields[chart.drillFilters.length]
|
||||||
|
drillFilters.push(curDrillField.id)
|
||||||
|
// 下钻入口字段的下标
|
||||||
|
const drillEnterFieldIndex = xAxis.findIndex(item => item.id === drillFilters[0])
|
||||||
|
// 移除所有下钻字段,调整当前下钻字段到下钻入口位置
|
||||||
|
fields = fields.filter(item => !drillFilters.includes(item.id))
|
||||||
|
fields.splice(drillEnterFieldIndex, 0, curDrillField)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 移除所有下钻字段
|
|
||||||
const removeField = []
|
|
||||||
for (let i = 0; i < chart.drillFilters.length; i++) {
|
|
||||||
const ele = chart.drillFilters[i].datasetTableField
|
|
||||||
removeField.push(ele.dataeaseName)
|
|
||||||
}
|
|
||||||
|
|
||||||
// build field
|
|
||||||
fields.forEach(ele => {
|
fields.forEach(ele => {
|
||||||
if (removeField.indexOf(ele.dataeaseName) < 0) {
|
const f = nameMap[ele.dataeaseName]
|
||||||
// 用下钻字段替换当前字段
|
|
||||||
if (drillExp.dataeaseName === ele.dataeaseName) {
|
|
||||||
columns.push(drillField.dataeaseName)
|
|
||||||
meta.push({
|
|
||||||
field: drillField.dataeaseName,
|
|
||||||
name: drillField.name
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
const f = getCurrentField(chart.xaxis, ele)
|
|
||||||
columns.push(ele.dataeaseName)
|
|
||||||
meta.push({
|
|
||||||
field: ele.dataeaseName,
|
|
||||||
name: ele.name,
|
|
||||||
formatter: function(value) {
|
|
||||||
if (!f) {
|
|
||||||
return value
|
|
||||||
}
|
|
||||||
if (value === null || value === undefined) {
|
|
||||||
return value
|
|
||||||
}
|
|
||||||
if (f.groupType === 'd') {
|
|
||||||
return value
|
|
||||||
} else {
|
|
||||||
if (f.formatterCfg) {
|
|
||||||
const v = valueFormatter(value, f.formatterCfg)
|
|
||||||
return v.includes('NaN') ? value : v
|
|
||||||
} else {
|
|
||||||
const v = valueFormatter(value, formatterItem)
|
|
||||||
return v.includes('NaN') ? value : v
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 修正下钻字段的index,获取下钻位置元素添加到index位置,并删除
|
|
||||||
const ele = columns[columns.length - 1]
|
|
||||||
columns.splice(index, 0, ele)
|
|
||||||
columns.splice(columns.length - 1, 1)
|
|
||||||
} else {
|
|
||||||
fields.forEach(ele => {
|
|
||||||
const f = getCurrentField(chart.xaxis, ele)
|
|
||||||
columns.push(ele.dataeaseName)
|
columns.push(ele.dataeaseName)
|
||||||
meta.push({
|
meta.push({
|
||||||
field: ele.dataeaseName,
|
field: ele.dataeaseName,
|
||||||
@ -126,7 +73,6 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
|
||||||
// 空值处理
|
// 空值处理
|
||||||
const newData = handleTableEmptyStrategy(tableData, chart)
|
const newData = handleTableEmptyStrategy(tableData, chart)
|
||||||
// data config
|
// data config
|
||||||
@ -174,6 +120,11 @@ export function baseTableInfo(s2, container, chart, action, tableData, pageInfo)
|
|||||||
|
|
||||||
// click
|
// click
|
||||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||||
|
// hover
|
||||||
|
const size = customAttr.size
|
||||||
|
if (size.tableColTooltip?.show) {
|
||||||
|
s2.on(S2Event.COL_CELL_HOVER, event => showTooltip(s2, event))
|
||||||
|
}
|
||||||
|
|
||||||
// theme
|
// theme
|
||||||
const customTheme = getCustomTheme(chart)
|
const customTheme = getCustomTheme(chart)
|
||||||
@ -342,7 +293,11 @@ export function baseTableNormal(s2, container, chart, action, tableData) {
|
|||||||
|
|
||||||
// click
|
// click
|
||||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||||
|
// hover
|
||||||
|
const size = customAttr.size
|
||||||
|
if (size.tableColTooltip?.show) {
|
||||||
|
s2.on(S2Event.COL_CELL_HOVER, event => showTooltip(s2, event))
|
||||||
|
}
|
||||||
// theme
|
// theme
|
||||||
const customTheme = getCustomTheme(chart)
|
const customTheme = getCustomTheme(chart)
|
||||||
s2.setThemeCfg({ theme: customTheme })
|
s2.setThemeCfg({ theme: customTheme })
|
||||||
@ -455,8 +410,8 @@ export function baseTablePivot(s2, container, chart, action, headerAction, table
|
|||||||
// total config
|
// total config
|
||||||
let totalCfg = {}
|
let totalCfg = {}
|
||||||
const chartObj = JSON.parse(JSON.stringify(chart))
|
const chartObj = JSON.parse(JSON.stringify(chart))
|
||||||
|
let customAttr
|
||||||
if (chartObj.customAttr) {
|
if (chartObj.customAttr) {
|
||||||
let customAttr = null
|
|
||||||
if (Object.prototype.toString.call(chartObj.customAttr) === '[object Object]') {
|
if (Object.prototype.toString.call(chartObj.customAttr) === '[object Object]') {
|
||||||
customAttr = JSON.parse(JSON.stringify(chartObj.customAttr))
|
customAttr = JSON.parse(JSON.stringify(chartObj.customAttr))
|
||||||
} else {
|
} else {
|
||||||
@ -528,7 +483,14 @@ export function baseTablePivot(s2, container, chart, action, headerAction, table
|
|||||||
s2.on(S2Event.DATA_CELL_CLICK, action)
|
s2.on(S2Event.DATA_CELL_CLICK, action)
|
||||||
s2.on(S2Event.ROW_CELL_CLICK, headerAction)
|
s2.on(S2Event.ROW_CELL_CLICK, headerAction)
|
||||||
s2.on(S2Event.COL_CELL_CLICK, headerAction)
|
s2.on(S2Event.COL_CELL_CLICK, headerAction)
|
||||||
|
// hover
|
||||||
|
const size = customAttr?.size
|
||||||
|
if (size?.tableRowTooltip?.show) {
|
||||||
|
s2.on(S2Event.ROW_CELL_HOVER, event => showTooltip(s2, event))
|
||||||
|
}
|
||||||
|
if (size?.tableColTooltip?.show) {
|
||||||
|
s2.on(S2Event.COL_CELL_HOVER, event => showTooltip(s2, event))
|
||||||
|
}
|
||||||
// theme
|
// theme
|
||||||
const customTheme = getCustomTheme(chart)
|
const customTheme = getCustomTheme(chart)
|
||||||
s2.setThemeCfg({ theme: customTheme })
|
s2.setThemeCfg({ theme: customTheme })
|
||||||
@ -740,3 +702,16 @@ function mappingColor(value, defaultColor, field, type) {
|
|||||||
}
|
}
|
||||||
return color
|
return color
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showTooltip(s2Instance, event) {
|
||||||
|
const cell = s2Instance.getCell(event.target)
|
||||||
|
const content = cell.actualText
|
||||||
|
|
||||||
|
s2Instance.showTooltip({
|
||||||
|
position: {
|
||||||
|
x: event.clientX,
|
||||||
|
y: event.clientY
|
||||||
|
},
|
||||||
|
content
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -62,7 +62,8 @@ export const TYPE_CONFIGS = [
|
|||||||
'tableItemHeight',
|
'tableItemHeight',
|
||||||
'tableColumnMode',
|
'tableColumnMode',
|
||||||
'showIndex',
|
'showIndex',
|
||||||
'indexLabel'
|
'indexLabel',
|
||||||
|
'tableColTooltip'
|
||||||
],
|
],
|
||||||
'title-selector-ant-v': [
|
'title-selector-ant-v': [
|
||||||
'show',
|
'show',
|
||||||
@ -111,7 +112,8 @@ export const TYPE_CONFIGS = [
|
|||||||
'tableItemHeight',
|
'tableItemHeight',
|
||||||
'tableColumnMode',
|
'tableColumnMode',
|
||||||
'showIndex',
|
'showIndex',
|
||||||
'indexLabel'
|
'indexLabel',
|
||||||
|
'tableColTooltip'
|
||||||
],
|
],
|
||||||
'title-selector-ant-v': [
|
'title-selector-ant-v': [
|
||||||
'show',
|
'show',
|
||||||
@ -157,7 +159,9 @@ export const TYPE_CONFIGS = [
|
|||||||
'tableItemAlign',
|
'tableItemAlign',
|
||||||
'tableTitleHeight',
|
'tableTitleHeight',
|
||||||
'tableItemHeight',
|
'tableItemHeight',
|
||||||
'tableColumnMode'
|
'tableColumnMode',
|
||||||
|
'tableRowTooltip',
|
||||||
|
'tableColTooltip'
|
||||||
],
|
],
|
||||||
'total-cfg': [
|
'total-cfg': [
|
||||||
'row',
|
'row',
|
||||||
|
@ -189,13 +189,19 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
bus.$on('change-series-id', this.changeSeriesId)
|
bus.$on('change-series-id', this.changeSeriesId)
|
||||||
document.getElementById(this.chartId).addEventListener('mouseover', this.bodyMouseover)
|
const dom = document.getElementById(this.chartId)
|
||||||
document.getElementById(this.chartId).addEventListener('mouseout', this.bodyMouseout)
|
if (dom) {
|
||||||
|
dom.addEventListener('mouseover', this.bodyMouseover)
|
||||||
|
dom.addEventListener('mouseout', this.bodyMouseout)
|
||||||
|
}
|
||||||
this.preDraw()
|
this.preDraw()
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
document.getElementById(this.chartId).removeEventListener('mouseover', this.bodyMouseover)
|
const dom = document.getElementById(this.chartId)
|
||||||
document.getElementById(this.chartId).removeEventListener('mouseout', this.bodyMouseout)
|
if (dom) {
|
||||||
|
dom.removeEventListener('mouseover', this.bodyMouseover)
|
||||||
|
dom.removeEventListener('mouseout', this.bodyMouseout)
|
||||||
|
}
|
||||||
bus.$off('change-series-id', this.changeSeriesId)
|
bus.$off('change-series-id', this.changeSeriesId)
|
||||||
window.removeEventListener('resize', this.myChart.resize)
|
window.removeEventListener('resize', this.myChart.resize)
|
||||||
this.myChart.dispose()
|
this.myChart.dispose()
|
||||||
|
@ -614,3 +614,8 @@ export default {
|
|||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<style>
|
||||||
|
.antv-s2-tooltip-container {
|
||||||
|
padding: 4px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -384,6 +384,28 @@
|
|||||||
@blur="changeBarSizeCase('indexLabel')"
|
@blur="changeBarSizeCase('indexLabel')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-show="showProperty('tableRowTooltip')"
|
||||||
|
label-width="100px"
|
||||||
|
:label="$t('chart.table_row_tooltip')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
v-model="sizeForm.tableRowTooltip.show"
|
||||||
|
@change="changeBarSizeCase('tableRowTooltip')"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-show="showProperty('tableColTooltip')"
|
||||||
|
label-width="100px"
|
||||||
|
:label="$t('chart.table_col_tooltip')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-checkbox
|
||||||
|
v-model="sizeForm.tableColTooltip.show"
|
||||||
|
@change="changeBarSizeCase('tableColTooltip')"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<!--chart-mix-start-->
|
<!--chart-mix-start-->
|
||||||
<span v-show="showProperty('mix')">
|
<span v-show="showProperty('mix')">
|
||||||
@ -893,6 +915,54 @@
|
|||||||
@change="changeBarSizeCase('quotaFontShadow')"
|
@change="changeBarSizeCase('quotaFontShadow')"
|
||||||
>{{ $t('chart.font_shadow') }}</el-checkbox>
|
>{{ $t('chart.font_shadow') }}</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-show="showProperty('hPosition')"
|
||||||
|
:label="$t('chart.h_position')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="sizeForm.hPosition"
|
||||||
|
:placeholder="$t('chart.h_position')"
|
||||||
|
@change="changeBarSizeCase('hPosition')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
value="start"
|
||||||
|
:label="$t('chart.p_left')"
|
||||||
|
>{{ $t('chart.p_left') }}</el-option>
|
||||||
|
<el-option
|
||||||
|
value="center"
|
||||||
|
:label="$t('chart.p_center')"
|
||||||
|
>{{ $t('chart.p_center') }}</el-option>
|
||||||
|
<el-option
|
||||||
|
value="end"
|
||||||
|
:label="$t('chart.p_right')"
|
||||||
|
>{{ $t('chart.p_right') }}</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
v-show="showProperty('vPosition')"
|
||||||
|
:label="$t('chart.v_position')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="sizeForm.vPosition"
|
||||||
|
:placeholder="$t('chart.v_position')"
|
||||||
|
@change="changeBarSizeCase('vPosition')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
value="start"
|
||||||
|
:label="$t('chart.p_top')"
|
||||||
|
>{{ $t('chart.p_top') }}</el-option>
|
||||||
|
<el-option
|
||||||
|
value="center"
|
||||||
|
:label="$t('chart.p_center')"
|
||||||
|
>{{ $t('chart.p_center') }}</el-option>
|
||||||
|
<el-option
|
||||||
|
value="end"
|
||||||
|
:label="$t('chart.p_bottom')"
|
||||||
|
>{{ $t('chart.p_bottom') }}</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-divider v-if="showProperty('dimensionShow')" />
|
<el-divider v-if="showProperty('dimensionShow')" />
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('dimensionShow')"
|
v-show="showProperty('dimensionShow')"
|
||||||
@ -983,7 +1053,6 @@
|
|||||||
@change="changeBarSizeCase('dimensionFontShadow')"
|
@change="changeBarSizeCase('dimensionFontShadow')"
|
||||||
>{{ $t('chart.font_shadow') }}</el-checkbox>
|
>{{ $t('chart.font_shadow') }}</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-divider v-if="showProperty('spaceSplit')" />
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('spaceSplit')"
|
v-show="showProperty('spaceSplit')"
|
||||||
:label="$t('chart.space_split')"
|
:label="$t('chart.space_split')"
|
||||||
@ -996,54 +1065,6 @@
|
|||||||
@change="changeBarSizeCase('spaceSplit')"
|
@change="changeBarSizeCase('spaceSplit')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
|
||||||
v-show="showProperty('hPosition')"
|
|
||||||
:label="$t('chart.h_position')"
|
|
||||||
class="form-item"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.hPosition"
|
|
||||||
:placeholder="$t('chart.h_position')"
|
|
||||||
@change="changeBarSizeCase('hPosition')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
value="start"
|
|
||||||
:label="$t('chart.p_left')"
|
|
||||||
>{{ $t('chart.p_left') }}</el-option>
|
|
||||||
<el-option
|
|
||||||
value="center"
|
|
||||||
:label="$t('chart.p_center')"
|
|
||||||
>{{ $t('chart.p_center') }}</el-option>
|
|
||||||
<el-option
|
|
||||||
value="end"
|
|
||||||
:label="$t('chart.p_right')"
|
|
||||||
>{{ $t('chart.p_right') }}</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-show="showProperty('vPosition')"
|
|
||||||
:label="$t('chart.v_position')"
|
|
||||||
class="form-item"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.vPosition"
|
|
||||||
:placeholder="$t('chart.v_position')"
|
|
||||||
@change="changeBarSizeCase('vPosition')"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
value="start"
|
|
||||||
:label="$t('chart.p_top')"
|
|
||||||
>{{ $t('chart.p_top') }}</el-option>
|
|
||||||
<el-option
|
|
||||||
value="center"
|
|
||||||
:label="$t('chart.p_center')"
|
|
||||||
>{{ $t('chart.p_center') }}</el-option>
|
|
||||||
<el-option
|
|
||||||
value="end"
|
|
||||||
:label="$t('chart.p_bottom')"
|
|
||||||
>{{ $t('chart.p_bottom') }}</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
</div>
|
||||||
<!--text&label-end-->
|
<!--text&label-end-->
|
||||||
<!--scatter-begin-->
|
<!--scatter-begin-->
|
||||||
@ -1565,6 +1586,8 @@ export default {
|
|||||||
|
|
||||||
this.sizeForm.tableHeaderAlign = this.sizeForm.tableHeaderAlign ? this.sizeForm.tableHeaderAlign : DEFAULT_SIZE.tableHeaderAlign
|
this.sizeForm.tableHeaderAlign = this.sizeForm.tableHeaderAlign ? this.sizeForm.tableHeaderAlign : DEFAULT_SIZE.tableHeaderAlign
|
||||||
this.sizeForm.tableItemAlign = this.sizeForm.tableItemAlign ? this.sizeForm.tableItemAlign : DEFAULT_SIZE.tableItemAlign
|
this.sizeForm.tableItemAlign = this.sizeForm.tableItemAlign ? this.sizeForm.tableItemAlign : DEFAULT_SIZE.tableItemAlign
|
||||||
|
this.sizeForm.tableRowTooltip = this.sizeForm.tableRowTooltip ?? DEFAULT_SIZE.tableRowTooltip
|
||||||
|
this.sizeForm.tableColTooltip = this.sizeForm.tableColTooltip ?? DEFAULT_SIZE.tableColTooltip
|
||||||
|
|
||||||
this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex
|
this.sizeForm.showIndex = this.sizeForm.showIndex ? this.sizeForm.showIndex : DEFAULT_SIZE.showIndex
|
||||||
if (this.sizeForm.indexLabel === null || this.sizeForm.indexLabel === undefined) {
|
if (this.sizeForm.indexLabel === null || this.sizeForm.indexLabel === undefined) {
|
||||||
|
@ -630,6 +630,10 @@ export default {
|
|||||||
},
|
},
|
||||||
panelInfo() {
|
panelInfo() {
|
||||||
return this.$store.state.panel.panelInfo
|
return this.$store.state.panel.panelInfo
|
||||||
|
},
|
||||||
|
watchChartTypeChangeObj() {
|
||||||
|
const { type, render } = this.view
|
||||||
|
return { type, render }
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -649,8 +653,14 @@ export default {
|
|||||||
this.searchPids = []
|
this.searchPids = []
|
||||||
this.$refs.chartTreeRef.filter(this.filterText)
|
this.$refs.chartTreeRef.filter(this.filterText)
|
||||||
},
|
},
|
||||||
chartType(val) {
|
// chartType(val) {
|
||||||
this.view.isPlugin = val && this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(val)
|
// this.view.isPlugin = val && this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(val)
|
||||||
|
// },
|
||||||
|
watchChartTypeChangeObj(newVal, oldVal) {
|
||||||
|
if (newVal.type === oldVal.type && newVal.render === oldVal.render) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.view.isPlugin = this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
@ -924,6 +924,7 @@
|
|||||||
:param="param"
|
:param="param"
|
||||||
:index="index"
|
:index="index"
|
||||||
:item="item"
|
:item="item"
|
||||||
|
:chart="chart"
|
||||||
:dimension-data="dimension"
|
:dimension-data="dimension"
|
||||||
:quota-data="quota"
|
:quota-data="quota"
|
||||||
@onItemChange="bubbleItemChange"
|
@onItemChange="bubbleItemChange"
|
||||||
@ -1323,8 +1324,8 @@
|
|||||||
ref="itemForm"
|
ref="itemForm"
|
||||||
label-width="80px"
|
label-width="80px"
|
||||||
:model="itemForm"
|
:model="itemForm"
|
||||||
@submit.native.prevent
|
|
||||||
:rules="itemFormRules"
|
:rules="itemFormRules"
|
||||||
|
@submit.native.prevent
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('dataset.field_origin_name')"
|
:label="$t('dataset.field_origin_name')"
|
||||||
@ -1734,7 +1735,6 @@ import QuotaFilterEditor from '../components/filter/QuotaFilterEditor'
|
|||||||
import DimensionFilterEditor from '../components/filter/DimensionFilterEditor'
|
import DimensionFilterEditor from '../components/filter/DimensionFilterEditor'
|
||||||
import TableNormal from '../components/table/TableNormal'
|
import TableNormal from '../components/table/TableNormal'
|
||||||
import LabelNormal from '../components/normal/LabelNormal'
|
import LabelNormal from '../components/normal/LabelNormal'
|
||||||
// import html2canvas from 'html2canvasde'
|
|
||||||
import TableSelector from './TableSelector'
|
import TableSelector from './TableSelector'
|
||||||
import FieldEdit from '../../dataset/data/FieldEdit'
|
import FieldEdit from '../../dataset/data/FieldEdit'
|
||||||
import { areaMapping } from '@/api/map/map'
|
import { areaMapping } from '@/api/map/map'
|
||||||
@ -1996,6 +1996,10 @@ export default {
|
|||||||
!equalsAny(this.view.type, 'liquid', 'bidirectional-bar',
|
!equalsAny(this.view.type, 'liquid', 'bidirectional-bar',
|
||||||
'word-cloud', 'table-pivot', 'label', 'richTextView', 'flow-map')
|
'word-cloud', 'table-pivot', 'label', 'richTextView', 'flow-map')
|
||||||
},
|
},
|
||||||
|
watchChartTypeChangeObj() {
|
||||||
|
const { type, render } = this.view
|
||||||
|
return { type, render }
|
||||||
|
},
|
||||||
...mapState([
|
...mapState([
|
||||||
'curComponent',
|
'curComponent',
|
||||||
'panelViewEditInfo',
|
'panelViewEditInfo',
|
||||||
@ -2016,7 +2020,7 @@ export default {
|
|||||||
},
|
},
|
||||||
'param': function(val) {
|
'param': function(val) {
|
||||||
if (this.param.optType === 'new') {
|
if (this.param.optType === 'new') {
|
||||||
//
|
// Do Nothing
|
||||||
} else if (this.param.id !== this.preChartId && this.editStatus) {
|
} else if (this.param.id !== this.preChartId && this.editStatus) {
|
||||||
this.preChartId = this.param.id
|
this.preChartId = this.param.id
|
||||||
this.chartInit()
|
this.chartInit()
|
||||||
@ -2031,8 +2035,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$emit('typeChange', newVal)
|
this.$emit('typeChange', newVal)
|
||||||
},
|
},
|
||||||
'view.type': function(newVal, oldVal) {
|
watchChartTypeChangeObj(newVal, oldVal) {
|
||||||
this.view.isPlugin = this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(newVal)
|
if (newVal.type === oldVal.type && newVal.render === oldVal.render) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.view.isPlugin = this.$refs['cu-chart-type'] && this.$refs['cu-chart-type'].currentIsPlugin(newVal.type, newVal.render)
|
||||||
|
|
||||||
|
this.setChartDefaultOptions()
|
||||||
|
this.calcData(true, 'chart', true, newVal.type !== oldVal.type, newVal.render !== oldVal.render)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -2124,9 +2134,6 @@ export default {
|
|||||||
this.resetDrill()
|
this.resetDrill()
|
||||||
this.initFromPanel()
|
this.initFromPanel()
|
||||||
this.getChart(this.param.id)
|
this.getChart(this.param.id)
|
||||||
// if (this.componentViewsData[this.param.id]) {
|
|
||||||
// this.chart = this.componentViewsData[this.param.id]
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
bindPluginEvent() {
|
bindPluginEvent() {
|
||||||
bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter)
|
bus.$on('show-dimension-edit-filter', this.showDimensionEditFilter)
|
||||||
@ -2257,9 +2264,6 @@ export default {
|
|||||||
view.xaxis = [view.xaxis[0]]
|
view.xaxis = [view.xaxis[0]]
|
||||||
}
|
}
|
||||||
view.xaxis.forEach(function(ele) {
|
view.xaxis.forEach(function(ele) {
|
||||||
// if (!ele.summary || ele.summary === '') {
|
|
||||||
// ele.summary = 'sum'
|
|
||||||
// }
|
|
||||||
if (!ele.dateStyle || ele.dateStyle === '') {
|
if (!ele.dateStyle || ele.dateStyle === '') {
|
||||||
ele.dateStyle = 'y_M_d'
|
ele.dateStyle = 'y_M_d'
|
||||||
}
|
}
|
||||||
@ -2417,6 +2421,7 @@ export default {
|
|||||||
view.extBubble = JSON.stringify(view.extBubble)
|
view.extBubble = JSON.stringify(view.extBubble)
|
||||||
view.senior = JSON.stringify(view.senior)
|
view.senior = JSON.stringify(view.senior)
|
||||||
delete view.data
|
delete view.data
|
||||||
|
|
||||||
return view
|
return view
|
||||||
},
|
},
|
||||||
refreshAttrChange() {
|
refreshAttrChange() {
|
||||||
@ -2435,7 +2440,6 @@ export default {
|
|||||||
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
||||||
if (!view) return
|
if (!view) return
|
||||||
viewEditSave(this.panelInfo.id, view).then(() => {
|
viewEditSave(this.panelInfo.id, view).then(() => {
|
||||||
// this.getData(this.param.id)
|
|
||||||
this.getChart(this.param.id)
|
this.getChart(this.param.id)
|
||||||
bus.$emit('view-in-cache', {
|
bus.$emit('view-in-cache', {
|
||||||
type: 'propChange',
|
type: 'propChange',
|
||||||
@ -2462,7 +2466,6 @@ export default {
|
|||||||
view.senior = JSON.stringify(this.view.senior)
|
view.senior = JSON.stringify(this.view.senior)
|
||||||
view.title = this.view.title
|
view.title = this.view.title
|
||||||
view.stylePriority = this.view.stylePriority
|
view.stylePriority = this.view.stylePriority
|
||||||
// view.data = this.data
|
|
||||||
this.chart = view
|
this.chart = view
|
||||||
|
|
||||||
// 保存到缓存表
|
// 保存到缓存表
|
||||||
@ -2514,7 +2517,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getData(id) {
|
getData(id) {
|
||||||
// this.hasEdit = true
|
|
||||||
if (id) {
|
if (id) {
|
||||||
ajaxGetDataOnly(id, this.panelInfo.id, {
|
ajaxGetDataOnly(id, this.panelInfo.id, {
|
||||||
filter: [],
|
filter: [],
|
||||||
@ -2894,12 +2896,7 @@ export default {
|
|||||||
},
|
},
|
||||||
closeRename() {
|
closeRename() {
|
||||||
this.renameItem = false
|
this.renameItem = false
|
||||||
this.resetRename()
|
|
||||||
},
|
},
|
||||||
resetRename() {
|
|
||||||
// this.itemForm = {}
|
|
||||||
},
|
|
||||||
|
|
||||||
showQuotaEditCompare(item) {
|
showQuotaEditCompare(item) {
|
||||||
this.quotaItemCompare = JSON.parse(JSON.stringify(item))
|
this.quotaItemCompare = JSON.parse(JSON.stringify(item))
|
||||||
this.showEditQuotaCompare = true
|
this.showEditQuotaCompare = true
|
||||||
@ -3107,14 +3104,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
initAreas() {
|
initAreas() {
|
||||||
// let mapping
|
|
||||||
// if ((mapping = localStorage.getItem('areaMapping')) !== null) {
|
|
||||||
// this.places = JSON.parse(mapping)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
Object.keys(this.places).length === 0 && areaMapping().then(res => {
|
Object.keys(this.places).length === 0 && areaMapping().then(res => {
|
||||||
this.places = res.data
|
this.places = res.data
|
||||||
// localStorage.setItem('areaMapping', JSON.stringify(res.data))
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -3182,16 +3173,13 @@ export default {
|
|||||||
|
|
||||||
chartClick(param) {
|
chartClick(param) {
|
||||||
if (this.drillClickDimensionList.length < this.view.drillFields.length - 1) {
|
if (this.drillClickDimensionList.length < this.view.drillFields.length - 1) {
|
||||||
// const isSwitch = (this.chart.type === 'map' && this.sendToChildren(param))
|
|
||||||
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
||||||
if (this.sendToChildren(param)) {
|
if (this.sendToChildren(param)) {
|
||||||
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
||||||
// this.getData(this.param.id)
|
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
this.drillClickDimensionList.push({ dimensionList: param.data.dimensionList })
|
||||||
// this.getData(this.param.id)
|
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
}
|
}
|
||||||
} else if (this.view.drillFields.length > 0) {
|
} else if (this.view.drillFields.length > 0) {
|
||||||
@ -3219,7 +3207,6 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
current && current.registerDynamicMap && current.registerDynamicMap(null)
|
current && current.registerDynamicMap && current.registerDynamicMap(null)
|
||||||
}
|
}
|
||||||
// this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(null)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
drillJump(index) {
|
drillJump(index) {
|
||||||
@ -3228,8 +3215,6 @@ export default {
|
|||||||
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
if (this.chart.type === 'map' || this.chart.type === 'buddle-map') {
|
||||||
this.backToParent(index, length)
|
this.backToParent(index, length)
|
||||||
}
|
}
|
||||||
|
|
||||||
// this.getData(this.param.id)
|
|
||||||
this.calcData(true, 'chart', false, false)
|
this.calcData(true, 'chart', false, false)
|
||||||
},
|
},
|
||||||
// 回到父级地图
|
// 回到父级地图
|
||||||
@ -3245,7 +3230,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.currentAcreaNode = tempNode
|
this.currentAcreaNode = tempNode
|
||||||
// this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(this.currentAcreaNode.code)
|
|
||||||
const current = this.$refs.dynamicChart
|
const current = this.$refs.dynamicChart
|
||||||
if (this.view.isPlugin) {
|
if (this.view.isPlugin) {
|
||||||
current && current.callPluginInner && this.setDetailMapCode(this.currentAcreaNode.code) && current.callPluginInner({
|
current && current.callPluginInner && this.setDetailMapCode(this.currentAcreaNode.code) && current.callPluginInner({
|
||||||
@ -3271,14 +3255,11 @@ export default {
|
|||||||
if (this.currentAcreaNode) {
|
if (this.currentAcreaNode) {
|
||||||
aCode = this.currentAcreaNode.code
|
aCode = this.currentAcreaNode.code
|
||||||
}
|
}
|
||||||
// const aCode = this.currentAcreaNode ? this.currentAcreaNode.code : null
|
|
||||||
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
|
const currentNode = this.findEntityByCode(aCode || this.view.customAttr.areaCode, this.places)
|
||||||
if (currentNode && currentNode.children && currentNode.children.length > 0) {
|
if (currentNode && currentNode.children && currentNode.children.length > 0) {
|
||||||
const nextNode = currentNode.children.find(item => item.name === name)
|
const nextNode = currentNode.children.find(item => item.name === name)
|
||||||
if (!nextNode || !nextNode.code) return null
|
if (!nextNode || !nextNode.code) return null
|
||||||
// this.view.customAttr.areaCode = nextNode.code
|
|
||||||
this.currentAcreaNode = nextNode
|
this.currentAcreaNode = nextNode
|
||||||
// this.$refs.dynamicChart && this.$refs.dynamicChart.registerDynamicMap && this.$refs.dynamicChart.registerDynamicMap(nextNode.code)
|
|
||||||
const current = this.$refs.dynamicChart
|
const current = this.$refs.dynamicChart
|
||||||
if (this.view.isPlugin) {
|
if (this.view.isPlugin) {
|
||||||
nextNode && current && current.callPluginInner && this.setDetailMapCode(nextNode.code) && current.callPluginInner({
|
nextNode && current && current.callPluginInner && this.setDetailMapCode(nextNode.code) && current.callPluginInner({
|
||||||
@ -3329,12 +3310,10 @@ export default {
|
|||||||
this.$store.commit('recordViewEdit', { viewId: this.param.id, hasEdit: status })
|
this.$store.commit('recordViewEdit', { viewId: this.param.id, hasEdit: status })
|
||||||
},
|
},
|
||||||
changeChartRender() {
|
changeChartRender() {
|
||||||
this.setChartDefaultOptions()
|
// Do Nothing
|
||||||
this.calcData(true, 'chart', true, false, true)
|
|
||||||
},
|
},
|
||||||
changeChartType() {
|
changeChartType() {
|
||||||
this.setChartDefaultOptions()
|
// Do Nothing
|
||||||
this.calcData(true, 'chart', true, true)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setChartDefaultOptions() {
|
setChartDefaultOptions() {
|
||||||
|
@ -93,9 +93,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
currentIsPlugin(type) {
|
currentIsPlugin(type, render) {
|
||||||
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || []
|
const plugins = localStorage.getItem('plugin-views') && JSON.parse(localStorage.getItem('plugin-views')) || []
|
||||||
return plugins.some(plugin => plugin.value === type)
|
return plugins.some(plugin => plugin.value === type && plugin.render === render)
|
||||||
},
|
},
|
||||||
initTypes(plugins) {
|
initTypes(plugins) {
|
||||||
plugins.forEach(plugin => {
|
plugins.forEach(plugin => {
|
||||||
|
@ -368,6 +368,7 @@
|
|||||||
<Preview
|
<Preview
|
||||||
v-if="previewVisible"
|
v-if="previewVisible"
|
||||||
:in-screen="!previewVisible"
|
:in-screen="!previewVisible"
|
||||||
|
:class="previewVisible && 'fullscreen-visual-selects'"
|
||||||
:panel-info="panelInfo"
|
:panel-info="panelInfo"
|
||||||
:show-type="canvasStyleData.selfAdaption?'full':'width'"
|
:show-type="canvasStyleData.selfAdaption?'full':'width'"
|
||||||
:canvas-style-data="canvasStyleData"
|
:canvas-style-data="canvasStyleData"
|
||||||
|
@ -798,7 +798,7 @@ export default {
|
|||||||
async loadField(tableId, init) {
|
async loadField(tableId, init) {
|
||||||
const res = await fieldListWithPermission(tableId)
|
const res = await fieldListWithPermission(tableId)
|
||||||
let data = res.data || []
|
let data = res.data || []
|
||||||
if (init && !this.checkSuperior(data, this.anotherTableInfo(tableId))) {
|
if (init && (!data.length || !this.checkSuperior(data, this.anotherTableInfo(tableId)))) {
|
||||||
this.backToLink()
|
this.backToLink()
|
||||||
}
|
}
|
||||||
if (this.widget && this.widget.filterFieldMethod) {
|
if (this.widget && this.widget.filterFieldMethod) {
|
||||||
|
@ -155,7 +155,7 @@
|
|||||||
:format="element.options.attrs.accuracy"
|
:format="element.options.attrs.accuracy"
|
||||||
style="width: auto; min-width: 110px;"
|
style="width: auto; min-width: 110px;"
|
||||||
placeholder=""
|
placeholder=""
|
||||||
@change="eDynamicSuffixTimeChange"
|
@change="sDynamicSuffixTimeChange"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
@ -384,10 +384,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
eDynamicSuffixTimeChange(val) {
|
eDynamicSuffixTimeChange(val) {
|
||||||
|
const time = this.convertTime(val)
|
||||||
|
this.$set(this.element.options.attrs.default, 'eDynamicSuffixTime', time)
|
||||||
this.setDval()
|
this.setDval()
|
||||||
},
|
},
|
||||||
sDynamicSuffixTimeChange(val) {
|
sDynamicSuffixTimeChange(val) {
|
||||||
|
const time = this.convertTime(val)
|
||||||
|
this.$set(this.element.options.attrs.default, 'sDynamicSuffixTime', time)
|
||||||
this.setDval()
|
this.setDval()
|
||||||
|
},
|
||||||
|
convertTime(val) {
|
||||||
|
const date = new Date(val)
|
||||||
|
const baseDate = new Date(this.baseTime)
|
||||||
|
date.setFullYear(baseDate.getFullYear())
|
||||||
|
date.setMonth(baseDate.getMonth())
|
||||||
|
date.setDate(baseDate.getDate())
|
||||||
|
return date.getTime()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -932,6 +932,15 @@ export default {
|
|||||||
top: inherit !important;
|
top: inherit !important;
|
||||||
left: inherit !important;
|
left: inherit !important;
|
||||||
}
|
}
|
||||||
|
.el-tree-select-popper {
|
||||||
|
left: 0 !important;
|
||||||
|
top: inherit !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.track-menu,
|
||||||
|
.coustom-date-picker {
|
||||||
|
left: inherit !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
|||||||
List<PluginViewSQL> xFields = fieldSQLMap.getOrDefault("xAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
List<PluginViewSQL> xFields = fieldSQLMap.getOrDefault("xAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
||||||
List<PluginViewSQL> xOrders = fieldSQLMap.getOrDefault("xAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(PluginSingleField::getSort).collect(Collectors.toList());
|
List<PluginViewSQL> xOrders = fieldSQLMap.getOrDefault("xAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(PluginSingleField::getSort).collect(Collectors.toList());
|
||||||
|
|
||||||
System.out.println("11111111 orders:"+new Gson().toJson(xOrders));
|
|
||||||
// List<String> xWheres = fieldSQLMap.get("xAxis").stream().map(singleField -> singleField.getWhere()).collect(Collectors.toList());
|
// List<String> xWheres = fieldSQLMap.get("xAxis").stream().map(singleField -> singleField.getWhere()).collect(Collectors.toList());
|
||||||
|
|
||||||
List<PluginViewSQL> yFields = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
List<PluginViewSQL> yFields = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
||||||
@ -79,7 +78,6 @@ public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
|||||||
orders.addAll(xOrders);
|
orders.addAll(xOrders);
|
||||||
orders.addAll(yOrders);
|
orders.addAll(yOrders);
|
||||||
|
|
||||||
System.out.println("11111111 orders: " + new Gson().toJson(orders));
|
|
||||||
|
|
||||||
List<String> aggWheres = new ArrayList<>();
|
List<String> aggWheres = new ArrayList<>();
|
||||||
aggWheres.addAll(yWheres.stream().filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));
|
aggWheres.addAll(yWheres.stream().filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));
|
||||||
|
@ -122,6 +122,9 @@ export default {
|
|||||||
.form-item>>>.el-form-item__label{
|
.form-item>>>.el-form-item__label{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
.form-item ::v-deep .el-form-item__label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
.el-select-dropdown__item{
|
.el-select-dropdown__item{
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
@ -98,10 +98,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DimensionItem from '@/components/views/DimensionItem'
|
import DimensionItem from '../../../components/views/DimensionItem'
|
||||||
import QuotaItem from '@/components/views/QuotaItem'
|
import QuotaItem from '../../../components/views/QuotaItem'
|
||||||
import QuotaExtItem from '@/components/views/QuotaExtItem'
|
import QuotaExtItem from '../../../components/views/QuotaExtItem'
|
||||||
import FilterItem from '@/components/views/FilterItem'
|
import FilterItem from '../../../components/views/FilterItem'
|
||||||
import messages from '@/de-base/lang/messages'
|
import messages from '@/de-base/lang/messages'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
v-if="chart.type && antVRenderStatus"
|
v-if="chart.type && antVRenderStatus"
|
||||||
v-show="title_show"
|
v-show="title_show"
|
||||||
ref="title"
|
ref="title"
|
||||||
:style="title_class"
|
:style="titleClass"
|
||||||
style="cursor: default;display: block;"
|
style="cursor: default;display: block;"
|
||||||
>
|
>
|
||||||
<div style="padding:4px 4px 0;margin: 0;">
|
<div style="padding:4px 4px 0;margin: 0;">
|
||||||
<chart-title-update
|
<chart-title-update
|
||||||
:title-class="title_class"
|
:title-class="titleClass"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
:bus="bus"
|
:bus="bus"
|
||||||
:axios-request="axiosRequest"
|
:axios-request="axiosRequest"
|
||||||
@ -33,20 +33,20 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Mix} from '@antv/g2plot'
|
import {Mix} from '@antv/g2plot'
|
||||||
import {uuid, hexColorToRGBA} from '@/utils/chartmix'
|
import {uuid, hexColorToRGBA} from '../../../utils/chartmix'
|
||||||
import ViewTrackBar from '@/components/views/ViewTrackBar'
|
import ViewTrackBar from '../../../components/views/ViewTrackBar'
|
||||||
import {getRemark} from "@/components/views/utils";
|
import {getRemark} from "../../../components/views/utils";
|
||||||
import {
|
import {
|
||||||
DEFAULT_TITLE_STYLE,
|
DEFAULT_TITLE_STYLE,
|
||||||
DEFAULT_XAXIS_STYLE,
|
DEFAULT_XAXIS_STYLE,
|
||||||
DEFAULT_YAXIS_STYLE,
|
DEFAULT_YAXIS_STYLE,
|
||||||
transAxisPosition,
|
transAxisPosition,
|
||||||
getLineDash
|
getLineDash
|
||||||
} from '@/utils/map';
|
} from '../../../utils/map';
|
||||||
import ChartTitleUpdate from '@/components/views/ChartTitleUpdate';
|
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {clear} from 'size-sensor'
|
import {clear} from 'size-sensor'
|
||||||
import {valueFormatter} from '@/utils/formatter'
|
import {valueFormatter} from '../../../utils/formatter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChartComponent',
|
name: 'ChartComponent',
|
||||||
@ -128,16 +128,6 @@ export default {
|
|||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
background: hexColorToRGBA('#ffffff', 0)
|
background: hexColorToRGBA('#ffffff', 0)
|
||||||
},
|
},
|
||||||
title_class: {
|
|
||||||
margin: '0 0',
|
|
||||||
width: '100%',
|
|
||||||
fontSize: '18px',
|
|
||||||
color: '#303133',
|
|
||||||
textAlign: 'left',
|
|
||||||
fontStyle: 'normal',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
background: ''
|
|
||||||
},
|
|
||||||
linkageActiveParam: null,
|
linkageActiveParam: null,
|
||||||
linkageActiveHistory: false,
|
linkageActiveHistory: false,
|
||||||
CHART_CONT_FAMILY_MAP: {
|
CHART_CONT_FAMILY_MAP: {
|
||||||
@ -252,7 +242,6 @@ export default {
|
|||||||
this.titleClass.textAlign = customStyle.text.hPosition
|
this.titleClass.textAlign = customStyle.text.hPosition
|
||||||
this.titleClass.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
this.titleClass.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
||||||
this.titleClass.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
this.titleClass.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
this.titleClass.fontSize = customStyle.text.isBolder ? 'bold' : 'normal'
|
|
||||||
|
|
||||||
this.titleClass.fontFamily = customStyle.text.fontFamily ? this.CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : 'Microsoft YaHei'
|
this.titleClass.fontFamily = customStyle.text.fontFamily ? this.CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : 'Microsoft YaHei'
|
||||||
this.titleClass.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : '0') + 'px'
|
this.titleClass.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : '0') + 'px'
|
||||||
@ -325,11 +314,13 @@ export default {
|
|||||||
|
|
||||||
const _chartType = this.getChartType(yaxisList[_index].chartType);
|
const _chartType = this.getChartType(yaxisList[_index].chartType);
|
||||||
|
|
||||||
|
if (_labelSetting) {
|
||||||
if (_chartType === "column") {
|
if (_chartType === "column") {
|
||||||
_labelSetting.position = labelPosition;
|
_labelSetting.position = labelPosition;
|
||||||
} else {
|
} else {
|
||||||
_labelSetting.position = undefined;
|
_labelSetting.position = undefined;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: _chartType,
|
type: _chartType,
|
||||||
@ -378,11 +369,13 @@ export default {
|
|||||||
|
|
||||||
const _chartType = this.getChartType(yaxisExtList[_index].chartType);
|
const _chartType = this.getChartType(yaxisExtList[_index].chartType);
|
||||||
|
|
||||||
|
if (_labelSetting) {
|
||||||
if (_chartType === "column") {
|
if (_chartType === "column") {
|
||||||
_labelSetting.position = labelPosition;
|
_labelSetting.position = labelPosition;
|
||||||
} else {
|
} else {
|
||||||
_labelSetting.position = undefined;
|
_labelSetting.position = undefined;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: _chartType,
|
type: _chartType,
|
||||||
|
@ -59,10 +59,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ColorSelector from '@/components/selector/ColorSelector'
|
import ColorSelector from '../../../components/selector/ColorSelector'
|
||||||
import TitleSelector from '@/components/selector/TitleSelector'
|
import TitleSelector from '../../../components/selector/TitleSelector'
|
||||||
import TooltipSelectorAntV from '@/components/selector/TooltipSelectorAntV'
|
import TooltipSelectorAntV from '../../../components/selector/TooltipSelectorAntV'
|
||||||
import LabelSelector from '@/components/selector/LabelSelector.vue'
|
import LabelSelector from '../../../components/selector/LabelSelector.vue'
|
||||||
import messages from '@/de-base/lang/messages'
|
import messages from '@/de-base/lang/messages'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
@ -49,20 +49,14 @@ public class RaceBarViewStatHandler implements PluginViewStatHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
List<PluginViewSQL> xFields = fieldSQLMap.getOrDefault("xAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
List<PluginViewSQL> xFields = fieldSQLMap.get("xAxis").stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(singleField -> singleField.getField()).collect(Collectors.toList());
|
||||||
|
List<PluginViewSQL> xOrders = fieldSQLMap.get("xAxis").stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(singleField -> singleField.getSort()).collect(Collectors.toList());
|
||||||
|
|
||||||
// List<String> xWheres = fieldSQLMap.get("xAxis").stream().map(singleField -> singleField.getWhere()).collect(Collectors.toList());
|
// List<String> xWheres = fieldSQLMap.get("xAxis").stream().map(singleField -> singleField.getWhere()).collect(Collectors.toList());
|
||||||
|
|
||||||
List<PluginViewSQL> yFields = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
List<PluginViewSQL> yFields = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
||||||
List<String> yWheres = fieldSQLMap.getOrDefault("yAxis", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getWhere())).map(PluginSingleField::getWhere).collect(Collectors.toList());
|
List<String> yWheres = fieldSQLMap.get("yAxis").stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getWhere())).map(singleField -> singleField.getWhere()).collect(Collectors.toList());
|
||||||
|
|
||||||
/*List<PluginViewSQL> yExtFields = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getField())).map(PluginSingleField::getField).collect(Collectors.toList());
|
|
||||||
List<PluginViewSQL> yExtOrders = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getSort())).map(PluginSingleField::getSort).collect(Collectors.toList());
|
|
||||||
List<String> yExtWheres = fieldSQLMap.getOrDefault("yAxisExt", new ArrayList<>()).stream().filter(singleField -> ObjectUtils.isNotEmpty(singleField.getWhere())).map(PluginSingleField::getWhere).collect(Collectors.toList());
|
|
||||||
|
|
||||||
yFields.addAll(yExtFields);
|
|
||||||
yOrders.addAll(yExtOrders);
|
|
||||||
yWheres.addAll(yExtWheres);*/
|
|
||||||
|
|
||||||
// 处理视图中字段过滤
|
// 处理视图中字段过滤
|
||||||
String customWheres = baseService.customWhere(dsType, pluginViewParam.getPluginChartFieldCustomFilters(), tableObj);
|
String customWheres = baseService.customWhere(dsType, pluginViewParam.getPluginChartFieldCustomFilters(), tableObj);
|
||||||
@ -75,9 +69,15 @@ public class RaceBarViewStatHandler implements PluginViewStatHandler {
|
|||||||
if (customWheres != null) wheres.add(customWheres);
|
if (customWheres != null) wheres.add(customWheres);
|
||||||
if (panelWheres != null) wheres.add(panelWheres);
|
if (panelWheres != null) wheres.add(panelWheres);
|
||||||
if (permissionWhere != null) wheres.add(permissionWhere);
|
if (permissionWhere != null) wheres.add(permissionWhere);
|
||||||
|
|
||||||
List<PluginViewSQL> groups = new ArrayList<>();
|
List<PluginViewSQL> groups = new ArrayList<>();
|
||||||
groups.addAll(xFields);
|
groups.addAll(xFields);
|
||||||
|
|
||||||
|
|
||||||
|
List<PluginViewSQL> orders = new ArrayList<>();
|
||||||
|
orders.addAll(xOrders);
|
||||||
|
|
||||||
|
|
||||||
// 外层再次套sql
|
// 外层再次套sql
|
||||||
List<String> aggWheres = new ArrayList<>();
|
List<String> aggWheres = new ArrayList<>();
|
||||||
aggWheres.addAll(yWheres.stream().filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));
|
aggWheres.addAll(yWheres.stream().filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));
|
||||||
@ -99,7 +99,9 @@ public class RaceBarViewStatHandler implements PluginViewStatHandler {
|
|||||||
.tableAlias(String.format(table_alias_prefix, 1))
|
.tableAlias(String.format(table_alias_prefix, 1))
|
||||||
.build();
|
.build();
|
||||||
if (CollectionUtils.isNotEmpty(aggWheres)) st.add("filters", aggWheres);
|
if (CollectionUtils.isNotEmpty(aggWheres)) st.add("filters", aggWheres);
|
||||||
|
if (CollectionUtils.isNotEmpty(orders)) st.add("orders", orders);
|
||||||
if (ObjectUtils.isNotEmpty(tableSQL)) st.add("table", tableSQL);
|
if (ObjectUtils.isNotEmpty(tableSQL)) st.add("table", tableSQL);
|
||||||
|
|
||||||
return baseService.sqlLimit(dsType, st.render(), pluginViewParam.getPluginViewLimit());
|
return baseService.sqlLimit(dsType, st.render(), pluginViewParam.getPluginViewLimit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ public class RaceBarService extends ViewPluginService {
|
|||||||
private static final Map<String, String[]> VIEW_STYLE_PROPERTY_INNER = new HashMap<>();
|
private static final Map<String, String[]> VIEW_STYLE_PROPERTY_INNER = new HashMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
VIEW_STYLE_PROPERTY_INNER.put("color-selector", new String[]{"value", "alpha"});
|
VIEW_STYLE_PROPERTY_INNER.put("color-selector", new String[]{"value"});
|
||||||
VIEW_STYLE_PROPERTY_INNER.put("label-selector", new String[]{"show", "fontSize", "color", "position", "formatter"});
|
VIEW_STYLE_PROPERTY_INNER.put("label-selector", new String[]{"show", "fontSize", "color", "position"});
|
||||||
VIEW_STYLE_PROPERTY_INNER.put("tooltip-selector", new String[]{"show", "textStyle", "formatter"});
|
VIEW_STYLE_PROPERTY_INNER.put("tooltip-selector", new String[]{"show", "textStyle",});
|
||||||
VIEW_STYLE_PROPERTY_INNER.put("title-selector", new String[]{"show", "title", "fontSize", "color", "hPosition", "vPosition", "isItalic", "isBolder"});
|
VIEW_STYLE_PROPERTY_INNER.put("title-selector", new String[]{"show", "title", "fontSize", "color", "hPosition", "vPosition", "isItalic", "isBolder"});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +107,7 @@ public class RaceBarService extends ViewPluginService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String sql = new RaceBarViewStatHandler().build(param, this);
|
String sql = new RaceBarViewStatHandler().build(param, this);
|
||||||
|
|
||||||
return sql;
|
return sql;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -143,12 +144,23 @@ public class RaceBarService extends ViewPluginService {
|
|||||||
map.put("encode", encode);
|
map.put("encode", encode);
|
||||||
|
|
||||||
Set<Object> xs = new HashSet<>();
|
Set<Object> xs = new HashSet<>();
|
||||||
|
Set<String> keySet = new HashSet<>();
|
||||||
|
List<String> keyList = new ArrayList<>();
|
||||||
|
|
||||||
data.forEach(ss -> {
|
data.forEach(ss -> {
|
||||||
xs.add(ss[encode.get("y")]);
|
xs.add(ss[encode.get("y")]);
|
||||||
|
|
||||||
|
String key = StringUtils.defaultString(ss[(Integer) map.get("extIndex")], StringUtils.EMPTY);
|
||||||
|
if (!keySet.contains(key)) {
|
||||||
|
keySet.add(key);
|
||||||
|
keyList.add(key);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
Map<String, List<String[]>> groupData = data.stream().collect(Collectors.toMap(
|
Map<String, List<String[]>> groupData = data.stream().collect(Collectors.toMap(
|
||||||
k -> k[(Integer) map.get("extIndex")],
|
k -> StringUtils.defaultString(k[(Integer) map.get("extIndex")], StringUtils.EMPTY),
|
||||||
v -> {
|
v -> {
|
||||||
List<String[]> list = new ArrayList<>();
|
List<String[]> list = new ArrayList<>();
|
||||||
list.add(v);
|
list.add(v);
|
||||||
@ -160,24 +172,13 @@ public class RaceBarService extends ViewPluginService {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
for (String key : groupData.keySet()) {
|
|
||||||
String finalType = type;
|
|
||||||
groupData.put(key, groupData.get(key).stream().sorted((o1, o2) -> {
|
|
||||||
if (StringUtils.equals(finalType, "LONG")) {
|
|
||||||
return Long.valueOf(o2[encode.get("x")]).compareTo(Long.valueOf(o1[encode.get("x")]));
|
|
||||||
} else if (StringUtils.equals(finalType, "DOUBLE")) {
|
|
||||||
return Double.valueOf(o2[encode.get("x")]).compareTo(Double.valueOf(o1[encode.get("x")]));
|
|
||||||
}
|
|
||||||
return o2[encode.get("x")].compareTo(o1[encode.get("x")]);
|
|
||||||
}).collect(Collectors.toList()));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
map.put("groupData", groupData);
|
map.put("groupData", groupData);
|
||||||
|
|
||||||
map.put("extXs", new ArrayList<>(groupData.keySet()).stream().sorted().collect(Collectors.toList()));
|
map.put("extXs", keyList);
|
||||||
|
|
||||||
|
map.put("xs", xs);
|
||||||
|
|
||||||
map.put("xs", new ArrayList<>(xs).stream().sorted().collect(Collectors.toList()));
|
|
||||||
|
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,17 @@
|
|||||||
<el-color-picker v-model="tooltipForm.textStyle.color" class="color-picker-style"
|
<el-color-picker v-model="tooltipForm.textStyle.color" class="color-picker-style"
|
||||||
:predefine="predefineColors" @change="changeTooltipAttr"/>
|
:predefine="predefineColors" @change="changeTooltipAttr"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('chart.background')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-color-picker
|
||||||
|
v-model="tooltipForm.backgroundColor"
|
||||||
|
class="color-picker-style"
|
||||||
|
:predefine="predefineColors"
|
||||||
|
@change="changeTooltipAttr"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item class="form-item">
|
<!-- <el-form-item class="form-item">
|
||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span class="span-box">
|
<span class="span-box">
|
||||||
@ -40,7 +51,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {COLOR_PANEL, DEFAULT_TOOLTIP} from '@/utils/map'
|
import {COLOR_PANEL, DEFAULT_TOOLTIP} from '../../utils/map'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TooltipSelector',
|
name: 'TooltipSelector',
|
||||||
@ -127,6 +138,10 @@ export default {
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-item ::v-deep .el-form-item__label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.el-select-dropdown__item {
|
.el-select-dropdown__item {
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<!-- <el-dropdown-item>
|
<el-dropdown-item>
|
||||||
<el-dropdown
|
<el-dropdown
|
||||||
placement="right-start"
|
placement="right-start"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -78,7 +78,7 @@
|
|||||||
<span>{{ $t('chart.sort') }}</span>
|
<span>{{ $t('chart.sort') }}</span>
|
||||||
<span class="summary-span-item">({{ $t('chart.' + item.sort) }})</span>
|
<span class="summary-span-item">({{ $t('chart.' + item.sort) }})</span>
|
||||||
</span>
|
</span>
|
||||||
<i class="el-icon-arrow-right el-icon--right"/>
|
<i class="el-icon-arrow-right el-icon--right"/>
|
||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="beforeSort('none')">{{ $t('chart.none') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeSort('none')">{{ $t('chart.none') }}</el-dropdown-item>
|
||||||
@ -86,7 +86,7 @@
|
|||||||
<el-dropdown-item :command="beforeSort('desc')">{{ $t('chart.desc') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeSort('desc')">{{ $t('chart.desc') }}</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-dropdown-item>-->
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-show="item.deType === 1"
|
v-show="item.deType === 1"
|
||||||
|
@ -76,6 +76,11 @@ export default {
|
|||||||
return ['drill']
|
return ['drill']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
inScreen: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
searchCount: {
|
searchCount: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
@ -393,6 +398,8 @@ export default {
|
|||||||
this.myChart.on('finished', () => {
|
this.myChart.on('finished', () => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
this.currentIndex = 0;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
loadThemeStyle() {
|
loadThemeStyle() {
|
||||||
@ -594,7 +601,7 @@ export default {
|
|||||||
chart_option.legend['pageIconInactiveColor'] = '#8c8c8c'
|
chart_option.legend['pageIconInactiveColor'] = '#8c8c8c'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (chart_option.tooltip) {
|
if (chart_option.tooltip && this.inScreen) {
|
||||||
chart_option.tooltip.appendToBody = true
|
chart_option.tooltip.appendToBody = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,6 +122,9 @@ export default {
|
|||||||
.form-item>>>.el-form-item__label{
|
.form-item>>>.el-form-item__label{
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
.form-item ::v-deep .el-form-item__label {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
.el-select-dropdown__item{
|
.el-select-dropdown__item{
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
@ -105,9 +105,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SankeyDimensionItem from '@/components/views/SankeyDimensionItem'
|
import SankeyDimensionItem from '../../../components/views/SankeyDimensionItem'
|
||||||
import SankeyQuotaItem from '@/components/views/SankeyQuotaItem'
|
import SankeyQuotaItem from '../../../components/views/SankeyQuotaItem'
|
||||||
import FilterItem from '@/components/views/FilterItem'
|
import FilterItem from '../../../components/views/FilterItem'
|
||||||
import messages from '@/de-base/lang/messages'
|
import messages from '@/de-base/lang/messages'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
v-if="chart.type && antVRenderStatus"
|
v-if="chart.type && antVRenderStatus"
|
||||||
v-show="title_show"
|
v-show="title_show"
|
||||||
ref="title"
|
ref="title"
|
||||||
:style="title_class"
|
:style="titleClass"
|
||||||
style="cursor: default;display: block;"
|
style="cursor: default;display: block;"
|
||||||
>
|
>
|
||||||
<div style="padding:4px 4px 0;margin: 0;">
|
<div style="padding:4px 4px 0;margin: 0;">
|
||||||
<chart-title-update
|
<chart-title-update
|
||||||
:title-class="title_class"
|
:title-class="titleClass"
|
||||||
:chart-info="chartInfo"
|
:chart-info="chartInfo"
|
||||||
:bus="bus"
|
:bus="bus"
|
||||||
:axios-request="axiosRequest"
|
:axios-request="axiosRequest"
|
||||||
@ -33,11 +33,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {Sankey} from '@antv/g2plot'
|
import {Sankey} from '@antv/g2plot'
|
||||||
import {uuid, hexColorToRGBA} from '@/utils/sankey'
|
import {uuid, hexColorToRGBA} from '../../../utils/sankey'
|
||||||
import ViewTrackBar from '@/components/views/ViewTrackBar'
|
import ViewTrackBar from '../../../components/views/ViewTrackBar'
|
||||||
import {getRemark} from "@/components/views/utils";
|
import {getRemark} from "../../../components/views/utils";
|
||||||
import {DEFAULT_TITLE_STYLE} from '@/utils/map';
|
import {DEFAULT_TITLE_STYLE} from '../../../utils/map';
|
||||||
import ChartTitleUpdate from '@/components/views/ChartTitleUpdate';
|
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {clear} from 'size-sensor'
|
import {clear} from 'size-sensor'
|
||||||
|
|
||||||
@ -121,16 +121,6 @@ export default {
|
|||||||
fontWeight: 'normal',
|
fontWeight: 'normal',
|
||||||
background: hexColorToRGBA('#ffffff', 0)
|
background: hexColorToRGBA('#ffffff', 0)
|
||||||
},
|
},
|
||||||
title_class: {
|
|
||||||
margin: '0 0',
|
|
||||||
width: '100%',
|
|
||||||
fontSize: '18px',
|
|
||||||
color: '#303133',
|
|
||||||
textAlign: 'left',
|
|
||||||
fontStyle: 'normal',
|
|
||||||
fontWeight: 'normal',
|
|
||||||
background: ''
|
|
||||||
},
|
|
||||||
linkageActiveParam: null,
|
linkageActiveParam: null,
|
||||||
linkageActiveHistory: false,
|
linkageActiveHistory: false,
|
||||||
CHART_CONT_FAMILY_MAP: {
|
CHART_CONT_FAMILY_MAP: {
|
||||||
@ -244,7 +234,6 @@ export default {
|
|||||||
this.titleClass.textAlign = customStyle.text.hPosition
|
this.titleClass.textAlign = customStyle.text.hPosition
|
||||||
this.titleClass.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
this.titleClass.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
||||||
this.titleClass.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
this.titleClass.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
this.titleClass.fontSize = customStyle.text.isBolder ? 'bold' : 'normal'
|
|
||||||
|
|
||||||
this.titleClass.fontFamily = customStyle.text.fontFamily ? this.CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : 'Microsoft YaHei'
|
this.titleClass.fontFamily = customStyle.text.fontFamily ? this.CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : 'Microsoft YaHei'
|
||||||
this.titleClass.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : '0') + 'px'
|
this.titleClass.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : '0') + 'px'
|
||||||
|
@ -59,10 +59,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ColorSelector from '@/components/selector/ColorSelector'
|
import ColorSelector from '../../../components/selector/ColorSelector'
|
||||||
import TitleSelector from '@/components/selector/TitleSelector'
|
import TitleSelector from '../../../components/selector/TitleSelector'
|
||||||
import TooltipSelectorAntV from '@/components/selector/TooltipSelectorAntV'
|
import TooltipSelectorAntV from '../../../components/selector/TooltipSelectorAntV'
|
||||||
import LabelSelector from '@/components/selector/LabelSelector.vue'
|
import LabelSelector from '../../../components/selector/LabelSelector.vue'
|
||||||
import messages from '@/de-base/lang/messages'
|
import messages from '@/de-base/lang/messages'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
|
Loading…
Reference in New Issue
Block a user