forked from github/dataease
Merge branch 'dev' into pr@dev_refresh
This commit is contained in:
commit
bb1df8a182
1545
4362e265-5fbd-49d7-9e63-d88d82efe3fe.xml
Normal file
1545
4362e265-5fbd-49d7-9e63-d88d82efe3fe.xml
Normal file
File diff suppressed because it is too large
Load Diff
1871
476409e8-9887-438e-a6ce-e4e29ddd64bc.xml
Normal file
1871
476409e8-9887-438e-a6ce-e4e29ddd64bc.xml
Normal file
File diff suppressed because it is too large
Load Diff
@ -4,9 +4,9 @@ import java.util.List;
|
|||||||
|
|
||||||
import org.apache.shiro.authc.AuthenticationException;
|
import org.apache.shiro.authc.AuthenticationException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import groovy.lang.Lazy;
|
|
||||||
import io.dataease.auth.api.dto.CurrentRoleDto;
|
import io.dataease.auth.api.dto.CurrentRoleDto;
|
||||||
import io.dataease.auth.api.dto.CurrentUserDto;
|
import io.dataease.auth.api.dto.CurrentUserDto;
|
||||||
import io.dataease.auth.entity.SysUserEntity;
|
import io.dataease.auth.entity.SysUserEntity;
|
||||||
|
@ -116,7 +116,7 @@ public interface ParamConstants {
|
|||||||
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
|
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
|
||||||
DEFAULT_LOGIN_TYPE("basic.loginType"),
|
DEFAULT_LOGIN_TYPE("basic.loginType"),
|
||||||
OPEN_HOME_PAGE("ui.openHomePage"),
|
OPEN_HOME_PAGE("ui.openHomePage"),
|
||||||
|
AUTO_MOBILE("ui.autoMobile"),
|
||||||
OPEN_MARKET_PAGE("ui.openMarketPage"),
|
OPEN_MARKET_PAGE("ui.openMarketPage"),
|
||||||
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),
|
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),
|
||||||
|
|
||||||
|
@ -29,5 +29,7 @@ public class BasicInfo extends LoginLimitInfo implements Serializable {
|
|||||||
private String dsCheckInterval;
|
private String dsCheckInterval;
|
||||||
@ApiModelProperty("数据源检测时间间隔类型")
|
@ApiModelProperty("数据源检测时间间隔类型")
|
||||||
private String dsCheckIntervalType;
|
private String dsCheckIntervalType;
|
||||||
|
@ApiModelProperty("自动识别移动端")
|
||||||
|
private String autoMobile = "true";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,19 @@ public class Db2Configuration extends JdbcConfiguration {
|
|||||||
|
|
||||||
public String getJdbc() {
|
public String getJdbc() {
|
||||||
if(StringUtils.isEmpty(extraParams.trim())){
|
if(StringUtils.isEmpty(extraParams.trim())){
|
||||||
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
|
if (StringUtils.isEmpty(getSchema())) {
|
||||||
.replace("HOSTNAME", getHost().trim())
|
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
|
||||||
.replace("PORT", getPort().toString().trim())
|
.replace("HOSTNAME", getHost().trim())
|
||||||
.replace("DATABASE", getDataBase().trim()
|
.replace("PORT", getPort().toString().trim())
|
||||||
.replace("SCHEMA",getSchema().trim()));
|
.replace("DATABASE", getDataBase().trim());
|
||||||
|
} else {
|
||||||
|
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
|
||||||
|
.replace("HOSTNAME", getHost().trim())
|
||||||
|
.replace("PORT", getPort().toString().trim())
|
||||||
|
.replace("DATABASE", getDataBase().trim())
|
||||||
|
.replace("SCHEMA", getSchema().trim());
|
||||||
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
return "jdbc:hive2://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
|
return "jdbc:hive2://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
|
||||||
.replace("HOSTNAME", getHost().trim())
|
.replace("HOSTNAME", getHost().trim())
|
||||||
|
@ -1077,8 +1077,11 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
|
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
|
||||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
|
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
|
||||||
String date = String.format(MySQLConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
String date = String.format(MySQLConstants.STR_TO_DATE, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
||||||
if (request.getOperator().equals("between")) {
|
if (field.getType().equalsIgnoreCase("YEAR") || StringUtils.equalsIgnoreCase(field.getDateFormat(), "%Y")) {
|
||||||
whereName = date;
|
date = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + date + ",'-01-01')", "%Y-01-01");
|
||||||
|
}
|
||||||
|
if (request.getOperator().equals("between") && request.getDatasetTableField().getDeExtractType() != 1) {
|
||||||
|
whereName = String.format(MySQLConstants.UNIX_TIMESTAMP, date) + "*1000";
|
||||||
} else {
|
} else {
|
||||||
whereName = String.format(MySQLConstants.DATE_FORMAT, date, format);
|
whereName = String.format(MySQLConstants.DATE_FORMAT, date, format);
|
||||||
}
|
}
|
||||||
@ -1126,10 +1129,14 @@ public class DorisQueryProvider extends QueryProvider {
|
|||||||
whereName = "upper(" + whereName + ")";
|
whereName = "upper(" + whereName + ")";
|
||||||
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
|
||||||
if (request.getDatasetTableField().getDeType() == 1) {
|
if (request.getDatasetTableField().getDeType() == 1) {
|
||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
if (request.getDatasetTableField().getDeExtractType() == 1) {
|
||||||
String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0))));
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
|
||||||
String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1))));
|
String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0))));
|
||||||
whereValue = String.format(DorisConstants.WHERE_BETWEEN, startTime, endTime);
|
String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1))));
|
||||||
|
whereValue = String.format(DorisConstants.WHERE_BETWEEN, startTime, endTime);
|
||||||
|
} else {
|
||||||
|
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
|
||||||
}
|
}
|
||||||
|
@ -31,11 +31,9 @@ import org.stringtemplate.v4.STGroup;
|
|||||||
import org.stringtemplate.v4.STGroupFile;
|
import org.stringtemplate.v4.STGroupFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.text.Format;
|
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -1415,6 +1413,11 @@ public class CKQueryProvider extends QueryProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String sqlForPreview(String table, Datasource ds) {
|
||||||
|
return "SELECT * FROM " + String.format(CKConstants.KEYWORD_TABLE, table);
|
||||||
|
}
|
||||||
|
|
||||||
public List<Dateformat> dateformat() {
|
public List<Dateformat> dateformat() {
|
||||||
return JSONArray.parseArray("[\n" +
|
return JSONArray.parseArray("[\n" +
|
||||||
"{\"dateformat\": \"%Y%m%d\"},\n" +
|
"{\"dateformat\": \"%Y%m%d\"},\n" +
|
||||||
|
@ -1066,12 +1066,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
|||||||
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
|
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
|
||||||
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
|
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
|
||||||
String date;
|
String date;
|
||||||
if (field.getType().equalsIgnoreCase("YEAR")) {
|
if (field.getType().equalsIgnoreCase("YEAR") || StringUtils.equalsIgnoreCase(field.getDateFormat(), "%Y")) {
|
||||||
date = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originName + ",'-01-01')", StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
date = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originName + ",'-01-01')", StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
||||||
} else {
|
} else {
|
||||||
date = String.format(MySQLConstants.DATE_FORMAT, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
date = String.format(MySQLConstants.DATE_FORMAT, originName, StringUtils.isNotEmpty(field.getDateFormat()) ? field.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT);
|
||||||
}
|
}
|
||||||
if (request.getOperator().equals("between")) {
|
if (request.getOperator().equals("between") && request.getDatasetTableField().getDeExtractType() != 1) {
|
||||||
whereName = String.format(MySQLConstants.UNIX_TIMESTAMP, date) + "*1000";
|
whereName = String.format(MySQLConstants.UNIX_TIMESTAMP, date) + "*1000";
|
||||||
} else {
|
} else {
|
||||||
if (StringUtils.equalsIgnoreCase(request.getDateStyle(), "y_Q")) {
|
if (StringUtils.equalsIgnoreCase(request.getDateStyle(), "y_Q")) {
|
||||||
|
@ -211,7 +211,7 @@ public class ExtractDataService {
|
|||||||
for (DatasetTableField oldField : oldFields) {
|
for (DatasetTableField oldField : oldFields) {
|
||||||
boolean delete = true;
|
boolean delete = true;
|
||||||
for (DatasetTableField datasetTableField : datasetTableFields) {
|
for (DatasetTableField datasetTableField : datasetTableFields) {
|
||||||
if (oldField.getDataeaseName().equalsIgnoreCase(datasetTableField.getDataeaseName())) {
|
if (oldField.getDataeaseName().equalsIgnoreCase(datasetTableField.getDataeaseName()) && oldField.getType().equalsIgnoreCase(datasetTableField.getType())) {
|
||||||
delete = false;
|
delete = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -62,9 +62,11 @@ public class SystemParameterService {
|
|||||||
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
|
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
|
||||||
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
|
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
|
||||||
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
|
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
|
||||||
|
List<SystemParameter> autoMobileList = this.getParamList("ui.autoMobile");
|
||||||
paramList.addAll(homePageList);
|
paramList.addAll(homePageList);
|
||||||
paramList.addAll(marketPageList);
|
paramList.addAll(marketPageList);
|
||||||
paramList.addAll(loginLimitList);
|
paramList.addAll(loginLimitList);
|
||||||
|
paramList.addAll(autoMobileList);
|
||||||
BasicInfo result = new BasicInfo();
|
BasicInfo result = new BasicInfo();
|
||||||
result.setOpenHomePage("true");
|
result.setOpenHomePage("true");
|
||||||
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
|
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
|
||||||
@ -92,6 +94,10 @@ public class SystemParameterService {
|
|||||||
boolean open = StringUtils.equals("true", param.getParamValue());
|
boolean open = StringUtils.equals("true", param.getParamValue());
|
||||||
result.setOpenMarketPage(open ? "true" : "false");
|
result.setOpenMarketPage(open ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.AUTO_MOBILE.getValue())) {
|
||||||
|
boolean close = StringUtils.equals("false", param.getParamValue());
|
||||||
|
result.setAutoMobile(close ? "false" : "true");
|
||||||
|
}
|
||||||
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.TEMPLATE_MARKET_ULR.getValue())) {
|
if (StringUtils.equals(param.getParamKey(), ParamConstants.BASIC.TEMPLATE_MARKET_ULR.getValue())) {
|
||||||
result.setTemplateMarketUlr(param.getParamValue());
|
result.setTemplateMarketUlr(param.getParamValue());
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ 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 `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 = '文件基础信息表';
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div
|
<div
|
||||||
:style="getOutStyleDefault(config.style)"
|
:style="getOutStyleDefault(config.style)"
|
||||||
class="component component-outer"
|
class="component component-outer"
|
||||||
|
:class="{'component-active': filterActive}"
|
||||||
@click="handleClick"
|
@click="handleClick"
|
||||||
@mousedown="elementMouseDown"
|
@mousedown="elementMouseDown"
|
||||||
>
|
>
|
||||||
@ -75,19 +76,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStyle } from '@/components/canvas/utils/style'
|
import {getStyle} from '@/components/canvas/utils/style'
|
||||||
import runAnimation from '@/components/canvas/utils/runAnimation'
|
import runAnimation from '@/components/canvas/utils/runAnimation'
|
||||||
import { mixins } from '@/components/canvas/utils/events'
|
import {mixins} from '@/components/canvas/utils/events'
|
||||||
import { mapState } from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import DeOutWidget from '@/components/dataease/DeOutWidget'
|
import DeOutWidget from '@/components/dataease/DeOutWidget'
|
||||||
import EditBar from '@/components/canvas/components/editor/EditBar'
|
import EditBar from '@/components/canvas/components/editor/EditBar'
|
||||||
import MobileCheckBar from '@/components/canvas/components/editor/MobileCheckBar'
|
import MobileCheckBar from '@/components/canvas/components/editor/MobileCheckBar'
|
||||||
import CloseBar from '@/components/canvas/components/editor/CloseBar'
|
import CloseBar from '@/components/canvas/components/editor/CloseBar'
|
||||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
import {hexColorToRGBA} from '@/views/chart/chart/util'
|
||||||
import { imgUrlTrans } from '@/components/canvas/utils/utils'
|
import {imgUrlTrans} from '@/components/canvas/utils/utils'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { CloseBar, MobileCheckBar, DeOutWidget, EditBar },
|
components: {CloseBar, MobileCheckBar, DeOutWidget, EditBar},
|
||||||
mixins: [mixins],
|
mixins: [mixins],
|
||||||
props: {
|
props: {
|
||||||
canvasId: {
|
canvasId: {
|
||||||
@ -134,7 +135,7 @@ export default {
|
|||||||
canvasStyleData: {
|
canvasStyleData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: function() {
|
default: function () {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -157,10 +158,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
filterActive() {
|
||||||
|
return this.curComponent && this.config.id === this.curComponent.id && this.config.type === 'custom'
|
||||||
|
},
|
||||||
chart() {
|
chart() {
|
||||||
if (this.config.propValue?.viewId) {
|
if (this.config.propValue?.viewId) {
|
||||||
const viewInfo = this.panelViewDetailsInfo[this.config.propValue.viewId];
|
const viewInfo = this.panelViewDetailsInfo[this.config.propValue.viewId];
|
||||||
return viewInfo?JSON.parse(viewInfo):null
|
return viewInfo ? JSON.parse(viewInfo) : null
|
||||||
}
|
}
|
||||||
return null
|
return null
|
||||||
},
|
},
|
||||||
@ -320,7 +324,7 @@ export default {
|
|||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
const _this = this
|
const _this = this
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_this.$store.commit('setCurComponent', { component: _this.config, index: _this.index })
|
_this.$store.commit('setCurComponent', {component: _this.config, index: _this.index})
|
||||||
}, 200)
|
}, 200)
|
||||||
},
|
},
|
||||||
showViewDetails(params) {
|
showViewDetails(params) {
|
||||||
@ -354,12 +358,6 @@ export default {
|
|||||||
.component {
|
.component {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
.component-outer {
|
|
||||||
transform: translate(0);
|
|
||||||
}
|
|
||||||
.component-outer:hover {
|
|
||||||
box-shadow: 0px 0px 3px #0a7be0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gap_class {
|
.gap_class {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
@ -374,7 +372,6 @@ export default {
|
|||||||
.main_view {
|
.main_view {
|
||||||
position: relative;
|
position: relative;
|
||||||
background-size: 100% 100% !important;
|
background-size: 100% 100% !important;
|
||||||
z-index: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.component {
|
.component {
|
||||||
@ -388,4 +385,12 @@ export default {
|
|||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
height: 100% !important;
|
height: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.component-outer {
|
||||||
|
transform: translate(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.component-active {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -985,7 +985,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -575,7 +575,7 @@ export default {
|
|||||||
.bar-main {
|
.bar-main {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
float: right;
|
float: right;
|
||||||
z-index: 2;
|
z-index: 10;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
padding-left: 3px;
|
padding-left: 3px;
|
||||||
padding-right: 0px;
|
padding-right: 0px;
|
||||||
|
@ -145,30 +145,32 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getStyle } from '@/components/canvas/utils/style'
|
import {getStyle} from '@/components/canvas/utils/style'
|
||||||
import { mapState } from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
import ComponentWrapper from './ComponentWrapper'
|
import ComponentWrapper from './ComponentWrapper'
|
||||||
import { changeStyleWithScale } from '@/components/canvas/utils/translate'
|
import {changeStyleWithScale} from '@/components/canvas/utils/translate'
|
||||||
import { uuid } from 'vue-uuid'
|
import {uuid} from 'vue-uuid'
|
||||||
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
|
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
|
||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import elementResizeDetectorMaker from 'element-resize-detector'
|
import elementResizeDetectorMaker from 'element-resize-detector'
|
||||||
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
|
||||||
import bus from '@/utils/bus'
|
import bus from '@/utils/bus'
|
||||||
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
|
import {buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch} from '@/utils/conditionUtil'
|
||||||
import { hasDataPermission } from '@/utils/permission'
|
import {hasDataPermission} from '@/utils/permission'
|
||||||
import { activeWatermark } from '@/components/canvas/tools/watermark'
|
import {activeWatermark} from '@/components/canvas/tools/watermark'
|
||||||
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
|
import {proxyUserLoginInfo, userLoginInfo} from '@/api/systemInfo/userLogin'
|
||||||
import html2canvas from 'html2canvasde'
|
import html2canvas from 'html2canvasde'
|
||||||
import { queryAll } from '@/api/panel/pdfTemplate'
|
import {queryAll} from '@/api/panel/pdfTemplate'
|
||||||
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
import PDFPreExport from '@/views/panel/export/PDFPreExport'
|
||||||
import { listenGlobalKeyDownPreview } from '@/components/canvas/utils/shortcutKey'
|
import {listenGlobalKeyDownPreview} from '@/components/canvas/utils/shortcutKey'
|
||||||
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
import UserViewDialog from '@/components/canvas/customComponent/UserViewDialog'
|
||||||
import {hexColorToRGBA} from "@/views/chart/chart/util";
|
import {hexColorToRGBA} from "@/views/chart/chart/util";
|
||||||
|
import {isMobile} from '@/utils/index'
|
||||||
|
|
||||||
|
|
||||||
const erd = elementResizeDetectorMaker()
|
const erd = elementResizeDetectorMaker()
|
||||||
export default {
|
export default {
|
||||||
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
|
components: {UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport},
|
||||||
model: {
|
model: {
|
||||||
prop: 'show',
|
prop: 'show',
|
||||||
event: 'change'
|
event: 'change'
|
||||||
@ -205,14 +207,14 @@ export default {
|
|||||||
componentData: {
|
componentData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: false,
|
required: false,
|
||||||
default: function() {
|
default: function () {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canvasStyleData: {
|
canvasStyleData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: false,
|
required: false,
|
||||||
default: function() {
|
default: function () {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -344,7 +346,7 @@ export default {
|
|||||||
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
||||||
}
|
}
|
||||||
} else if (styleInfo.backgroundType === 'color') {
|
} else if (styleInfo.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha||100)
|
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha === undefined ? 100 : styleInfo.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA
|
background: colorRGBA
|
||||||
}
|
}
|
||||||
@ -623,9 +625,8 @@ export default {
|
|||||||
return -1
|
return -1
|
||||||
},
|
},
|
||||||
_isMobile() {
|
_isMobile() {
|
||||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
const flag = isMobile()
|
||||||
this.terminal = flag ? 'mobile' : 'pc'
|
this.terminal = flag ? 'mobile' : 'pc'
|
||||||
// this.terminal = 'mobile'
|
|
||||||
},
|
},
|
||||||
canvasStyleDataInit() {
|
canvasStyleDataInit() {
|
||||||
// 数据刷新计时器
|
// 数据刷新计时器
|
||||||
@ -648,7 +649,7 @@ export default {
|
|||||||
},
|
},
|
||||||
clearAllLinkage() {
|
clearAllLinkage() {
|
||||||
this.$store.commit('clearPanelLinkageInfo')
|
this.$store.commit('clearPanelLinkageInfo')
|
||||||
bus.$emit('clear_panel_linkage', { viewId: 'all' })
|
bus.$emit('clear_panel_linkage', {viewId: 'all'})
|
||||||
},
|
},
|
||||||
changeStyleWithScale,
|
changeStyleWithScale,
|
||||||
getStyle,
|
getStyle,
|
||||||
@ -707,13 +708,13 @@ export default {
|
|||||||
},
|
},
|
||||||
exportViewImg() {
|
exportViewImg() {
|
||||||
this.imageDownloading = true
|
this.imageDownloading = true
|
||||||
this.$refs['userViewDialog-canvas-main'].exportViewImg(()=>{
|
this.$refs['userViewDialog-canvas-main'].exportViewImg(() => {
|
||||||
this.imageDownloading = false
|
this.imageDownloading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
deselectCurComponent(e) {
|
deselectCurComponent(e) {
|
||||||
if (!this.isClickComponent) {
|
if (!this.isClickComponent) {
|
||||||
this.$store.commit('setCurComponent', { component: null, index: null })
|
this.$store.commit('setCurComponent', {component: null, index: null})
|
||||||
if (this.$refs?.['canvas-opt-bar']) {
|
if (this.$refs?.['canvas-opt-bar']) {
|
||||||
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
this.$refs['canvas-opt-bar'].setWidgetStatus()
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
:scale="scale"
|
:scale="scale"
|
||||||
:theme-style="element.commonBackground"
|
:theme-style="element.commonBackground"
|
||||||
:active="active"
|
:active="active"
|
||||||
|
:in-screen="inScreen"
|
||||||
@onChartClick="chartClick"
|
@onChartClick="chartClick"
|
||||||
@onJumpClick="jumpClick"
|
@onJumpClick="jumpClick"
|
||||||
/>
|
/>
|
||||||
|
@ -144,7 +144,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -102,7 +102,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -27,6 +27,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
canvasStyleData:{
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
size: String
|
size: String
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -45,10 +49,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
}
|
||||||
...mapState([
|
|
||||||
'canvasStyleData'
|
|
||||||
])
|
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
@ -27,6 +27,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
canvasStyleData:{
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
size: String
|
size: String
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -44,11 +48,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
},
|
}
|
||||||
...mapState([
|
|
||||||
'canvasStyleData'
|
|
||||||
])
|
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
|
@ -669,7 +669,7 @@ export default {
|
|||||||
input_phone: 'Please enter the phone number',
|
input_phone: 'Please enter the phone number',
|
||||||
input_roles: 'Please select role',
|
input_roles: 'Please select role',
|
||||||
select_users: 'Please select user',
|
select_users: 'Please select user',
|
||||||
user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter!',
|
user_name_pattern_error: 'IDs can only contain alphanumeric and ._- and start with a letter or number!',
|
||||||
special_characters_are_not_supported: 'Special characters are not supported',
|
special_characters_are_not_supported: 'Special characters are not supported',
|
||||||
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number',
|
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number',
|
||||||
email_format_is_incorrect: 'The mailbox format is incorrect',
|
email_format_is_incorrect: 'The mailbox format is incorrect',
|
||||||
@ -1466,6 +1466,7 @@ export default {
|
|||||||
dimension_text_style: 'Name Style',
|
dimension_text_style: 'Name Style',
|
||||||
dimension_letter_space: 'Name Letter Space',
|
dimension_letter_space: 'Name Letter Space',
|
||||||
font_family: 'Font Family',
|
font_family: 'Font Family',
|
||||||
|
font_family_tip: 'The font will only take effect if it is installed on the operating system',
|
||||||
letter_space: 'Letter Space',
|
letter_space: 'Letter Space',
|
||||||
font_shadow: 'Font Shadow',
|
font_shadow: 'Font Shadow',
|
||||||
chart_area: 'Area',
|
chart_area: 'Area',
|
||||||
@ -2412,6 +2413,7 @@ export default {
|
|||||||
themeDark: 'Dark',
|
themeDark: 'Dark',
|
||||||
themeCustom: 'Custom',
|
themeCustom: 'Custom',
|
||||||
openHomePage: 'Show Home Page',
|
openHomePage: 'Show Home Page',
|
||||||
|
auto_identify_mobile_devices: 'Automatically identify mobile devices',
|
||||||
openMarketPage: 'Show Market Page',
|
openMarketPage: 'Show Market Page',
|
||||||
mobileBG: 'Mobile Login page BG',
|
mobileBG: 'Mobile Login page BG',
|
||||||
helpLink: 'Help Document Link',
|
helpLink: 'Help Document Link',
|
||||||
@ -2853,7 +2855,8 @@ export default {
|
|||||||
geo_json: 'Geo Json',
|
geo_json: 'Geo Json',
|
||||||
fileplaceholder: 'Please upload the JSON format coordinate file',
|
fileplaceholder: 'Please upload the JSON format coordinate file',
|
||||||
delete_confirm: 'And child nodes will be deleted. Confirm to execute ?',
|
delete_confirm: 'And child nodes will be deleted. Confirm to execute ?',
|
||||||
cur_node: 'Current node'
|
cur_node: 'Current node',
|
||||||
|
prohibit_prompts: '000 and 156 are the global village and China area code prefixes respectively. Removal is prohibited. Please use other code prefixes!'
|
||||||
},
|
},
|
||||||
map_mapping: {
|
map_mapping: {
|
||||||
map: 'Map',
|
map: 'Map',
|
||||||
|
@ -669,7 +669,7 @@ export default {
|
|||||||
input_roles: '請選擇角色',
|
input_roles: '請選擇角色',
|
||||||
select_users: '請選擇用戶',
|
select_users: '請選擇用戶',
|
||||||
select_gender: '請選擇性別',
|
select_gender: '請選擇性別',
|
||||||
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!',
|
user_name_pattern_error: 'ID只能包含字母數字以及._-並以字母或數字開頭!',
|
||||||
special_characters_are_not_supported: '不支持特殊字符',
|
special_characters_are_not_supported: '不支持特殊字符',
|
||||||
mobile_number_format_is_incorrect: '手機號碼格式不正確',
|
mobile_number_format_is_incorrect: '手機號碼格式不正確',
|
||||||
email_format_is_incorrect: '郵箱格式不正確',
|
email_format_is_incorrect: '郵箱格式不正確',
|
||||||
@ -1465,6 +1465,7 @@ export default {
|
|||||||
dimension_text_style: '名稱樣式',
|
dimension_text_style: '名稱樣式',
|
||||||
dimension_letter_space: '名稱字間距',
|
dimension_letter_space: '名稱字間距',
|
||||||
font_family: '字體',
|
font_family: '字體',
|
||||||
|
font_family_tip: '只有操作系統上已安裝該字體才能生效',
|
||||||
letter_space: '字間距',
|
letter_space: '字間距',
|
||||||
font_shadow: '字體陰影',
|
font_shadow: '字體陰影',
|
||||||
chart_area: '面積圖',
|
chart_area: '面積圖',
|
||||||
@ -2406,6 +2407,7 @@ export default {
|
|||||||
themeDark: '深色',
|
themeDark: '深色',
|
||||||
themeCustom: '自定義',
|
themeCustom: '自定義',
|
||||||
openHomePage: '顯示首頁',
|
openHomePage: '顯示首頁',
|
||||||
|
auto_identify_mobile_devices: '自動識別移動設備',
|
||||||
openMarketPage: '顯示模板市場',
|
openMarketPage: '顯示模板市場',
|
||||||
mobileBG: '移動端登錄頁背景',
|
mobileBG: '移動端登錄頁背景',
|
||||||
helpLink: '幫助文檔鏈接',
|
helpLink: '幫助文檔鏈接',
|
||||||
@ -2847,7 +2849,8 @@ export default {
|
|||||||
geo_json: '坐標文件',
|
geo_json: '坐標文件',
|
||||||
fileplaceholder: '請上傳json格式坐標文件',
|
fileplaceholder: '請上傳json格式坐標文件',
|
||||||
delete_confirm: '及子節點都會被刪除,確認執行?',
|
delete_confirm: '及子節點都會被刪除,確認執行?',
|
||||||
cur_node: '當前節點'
|
cur_node: '當前節點',
|
||||||
|
prohibit_prompts: '000、156分別是地球村和中華人民共和國區域代碼前綴,禁止移除,請使用其他代碼前綴!'
|
||||||
},
|
},
|
||||||
map_mapping: {
|
map_mapping: {
|
||||||
map: '圖形',
|
map: '圖形',
|
||||||
|
@ -668,7 +668,7 @@ export default {
|
|||||||
input_roles: '请选择角色',
|
input_roles: '请选择角色',
|
||||||
select_users: '请选择用户',
|
select_users: '请选择用户',
|
||||||
select_gender: '请选择性别',
|
select_gender: '请选择性别',
|
||||||
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!',
|
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母或数字开头!',
|
||||||
special_characters_are_not_supported: '不支持特殊字符',
|
special_characters_are_not_supported: '不支持特殊字符',
|
||||||
mobile_number_format_is_incorrect: '手机号码格式不正确',
|
mobile_number_format_is_incorrect: '手机号码格式不正确',
|
||||||
email_format_is_incorrect: '邮箱格式不正确',
|
email_format_is_incorrect: '邮箱格式不正确',
|
||||||
@ -1464,6 +1464,7 @@ export default {
|
|||||||
dimension_text_style: '名称样式',
|
dimension_text_style: '名称样式',
|
||||||
dimension_letter_space: '名称字间距',
|
dimension_letter_space: '名称字间距',
|
||||||
font_family: '字体',
|
font_family: '字体',
|
||||||
|
font_family_tip: '只有操作系统上已安装该字体才能生效',
|
||||||
letter_space: '字间距',
|
letter_space: '字间距',
|
||||||
font_shadow: '字体阴影',
|
font_shadow: '字体阴影',
|
||||||
chart_area: '面积图',
|
chart_area: '面积图',
|
||||||
@ -2406,6 +2407,7 @@ export default {
|
|||||||
themeDark: '深色',
|
themeDark: '深色',
|
||||||
themeCustom: '自定义',
|
themeCustom: '自定义',
|
||||||
openHomePage: '显示首页',
|
openHomePage: '显示首页',
|
||||||
|
auto_identify_mobile_devices: '自动识别移动设备',
|
||||||
openMarketPage: '显示模板市场',
|
openMarketPage: '显示模板市场',
|
||||||
mobileBG: '移动端登录页背景',
|
mobileBG: '移动端登录页背景',
|
||||||
helpLink: '帮助文档链接',
|
helpLink: '帮助文档链接',
|
||||||
@ -2847,7 +2849,8 @@ export default {
|
|||||||
geo_json: '坐标文件',
|
geo_json: '坐标文件',
|
||||||
fileplaceholder: '请上传json格式坐标文件',
|
fileplaceholder: '请上传json格式坐标文件',
|
||||||
delete_confirm: '及子节点都会被删除,确认执行?',
|
delete_confirm: '及子节点都会被删除,确认执行?',
|
||||||
cur_node: '当前节点'
|
cur_node: '当前节点',
|
||||||
|
prohibit_prompts: '000、156分别是地球村和中华人民共和国区域代码前缀,禁止移除,请使用其他代码前缀!'
|
||||||
},
|
},
|
||||||
map_mapping: {
|
map_mapping: {
|
||||||
map: '图形',
|
map: '图形',
|
||||||
|
@ -5,6 +5,7 @@ import { seizeLogin } from '@/api/user'
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import { Loading } from 'element-ui'
|
import { Loading } from 'element-ui'
|
||||||
|
import { getSysUI } from '@/utils/auth'
|
||||||
export function timeSection(date, type, labelFormat = 'yyyy-MM-dd') {
|
export function timeSection(date, type, labelFormat = 'yyyy-MM-dd') {
|
||||||
if (!date) {
|
if (!date) {
|
||||||
return null
|
return null
|
||||||
@ -308,6 +309,10 @@ export function getQueryVariable(variable) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function isMobile() {
|
export function isMobile() {
|
||||||
|
const uiInfo = getSysUI()
|
||||||
|
if (uiInfo['ui.autoMobile']?.paramValue === 'false') {
|
||||||
|
return false
|
||||||
|
}
|
||||||
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
const flag = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)
|
||||||
return flag
|
return flag
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -291,7 +291,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -1146,6 +1146,13 @@ export const CHART_FONT_FAMILY = [
|
|||||||
{ name: '楷体', value: 'KaiTi' }
|
{ name: '楷体', value: 'KaiTi' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
export const CHART_CONT_FAMILY_MAP = {
|
||||||
|
'Microsoft YaHei': 'Microsoft YaHei',
|
||||||
|
'SimSun': 'SimSun, "Songti SC", STSong',
|
||||||
|
'SimHei': 'SimHei, Helvetica',
|
||||||
|
'KaiTi': 'KaiTi, "Kaiti SC", STKaiti'
|
||||||
|
}
|
||||||
|
|
||||||
export const CHART_FONT_LETTER_SPACE = [
|
export const CHART_FONT_LETTER_SPACE = [
|
||||||
{ name: '0px', value: '0' },
|
{ name: '0px', value: '0' },
|
||||||
{ name: '1px', value: '1' },
|
{ name: '1px', value: '1' },
|
||||||
|
@ -141,6 +141,11 @@ export function getLabel(chart) {
|
|||||||
if (l.position === 'inner') {
|
if (l.position === 'inner') {
|
||||||
label.offset = -10
|
label.offset = -10
|
||||||
}
|
}
|
||||||
|
} else if (chart.type.includes('bar')) {
|
||||||
|
label = {
|
||||||
|
layout: [{ type: 'limit-in-canvas' }],
|
||||||
|
position: l.position
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
label = {
|
label = {
|
||||||
position: l.position
|
position: l.position
|
||||||
|
@ -297,7 +297,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'gaugeStartAngle',
|
'gaugeStartAngle',
|
||||||
'gaugeEndAngle',
|
'gaugeEndAngle',
|
||||||
'gaugeTickCount',
|
'gaugeTickCount',
|
||||||
'gaugeAxisLabel'
|
'gaugeAxisLine'
|
||||||
],
|
],
|
||||||
'label-selector-ant-v': [
|
'label-selector-ant-v': [
|
||||||
'labelGauge'
|
'labelGauge'
|
||||||
@ -2160,7 +2160,7 @@ export const TYPE_CONFIGS = [
|
|||||||
'gaugeMax',
|
'gaugeMax',
|
||||||
'gaugeStartAngle',
|
'gaugeStartAngle',
|
||||||
'gaugeEndAngle',
|
'gaugeEndAngle',
|
||||||
'gaugeAxisLabel'
|
'gaugeAxisLine'
|
||||||
],
|
],
|
||||||
'label-selector': [
|
'label-selector': [
|
||||||
'show',
|
'show',
|
||||||
|
@ -65,6 +65,11 @@ export default {
|
|||||||
MapController
|
MapController
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
inScreen: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
active: {
|
active: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
@ -292,6 +297,7 @@ export default {
|
|||||||
this.myChart = this.$echarts.init(document.getElementById(this.chartId))
|
this.myChart = this.$echarts.init(document.getElementById(this.chartId))
|
||||||
}
|
}
|
||||||
this.drawEcharts()
|
this.drawEcharts()
|
||||||
|
this.myChart.off('click')
|
||||||
this.myChart.on('click', function(param) {
|
this.myChart.on('click', function(param) {
|
||||||
that.pointParam = param
|
that.pointParam = param
|
||||||
if (that.linkageActiveParam) {
|
if (that.linkageActiveParam) {
|
||||||
@ -408,7 +414,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
|
||||||
}
|
}
|
||||||
this.myEcharts(chart_option)
|
this.myEcharts(chart_option)
|
||||||
@ -493,12 +499,6 @@ export default {
|
|||||||
trackClick(trackAction) {
|
trackClick(trackAction) {
|
||||||
const param = this.pointParam
|
const param = this.pointParam
|
||||||
if (!param || !param.data || !param.data.dimensionList) {
|
if (!param || !param.data || !param.data.dimensionList) {
|
||||||
if (this.chart.type === 'map') {
|
|
||||||
const zoom = this.myChart.getOption().geo[0].zoom
|
|
||||||
if (zoom <= 1) {
|
|
||||||
this.$warning(this.$t('panel.no_drill_field'))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const quotaList = this.pointParam.data.quotaList
|
const quotaList = this.pointParam.data.quotaList
|
||||||
|
@ -55,7 +55,7 @@ import { baseRadarOptionAntV } from '@/views/chart/chart/radar/radar_antv'
|
|||||||
import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall'
|
import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall'
|
||||||
import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud'
|
import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud'
|
||||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||||
import { DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
import { CHART_CONT_FAMILY_MAP, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||||
import { baseMixOptionAntV } from '@/views/chart/chart/mix/mix_antv'
|
import { baseMixOptionAntV } from '@/views/chart/chart/mix/mix_antv'
|
||||||
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
||||||
import { equalsAny } from '@/utils/StringUtils'
|
import { equalsAny } from '@/utils/StringUtils'
|
||||||
@ -429,7 +429,7 @@ export default {
|
|||||||
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
||||||
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
|
@ -97,7 +97,7 @@ import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
|
|||||||
import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util'
|
import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util'
|
||||||
import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/chart/table/table-info'
|
import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/chart/table/table-info'
|
||||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||||
import { DEFAULT_TITLE_STYLE, NOT_SUPPORT_PAGE_DATASET } from '@/views/chart/chart/chart'
|
import { CHART_CONT_FAMILY_MAP, DEFAULT_TITLE_STYLE, NOT_SUPPORT_PAGE_DATASET } from '@/views/chart/chart/chart'
|
||||||
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
import ChartTitleUpdate from './ChartTitleUpdate.vue'
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import DePagination from '@/components/deCustomCm/pagination.js'
|
import DePagination from '@/components/deCustomCm/pagination.js'
|
||||||
@ -431,6 +431,7 @@ export default {
|
|||||||
}
|
}
|
||||||
switch (trackAction) {
|
switch (trackAction) {
|
||||||
case 'drill':
|
case 'drill':
|
||||||
|
this.currentPage.page = 1
|
||||||
this.$emit('onChartClick', this.pointParam)
|
this.$emit('onChartClick', this.pointParam)
|
||||||
break
|
break
|
||||||
case 'linkage':
|
case 'linkage':
|
||||||
@ -459,7 +460,7 @@ export default {
|
|||||||
this.$refs.title.style.fontSize = customStyle.text.fontSize + 'px'
|
this.$refs.title.style.fontSize = customStyle.text.fontSize + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
// 表格总计与分页颜色,取标题颜色
|
// 表格总计与分页颜色,取标题颜色
|
||||||
|
@ -50,6 +50,20 @@
|
|||||||
:value="option.value"
|
:value="option.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
slot="content"
|
||||||
|
v-html="$t('chart.font_family_tip')"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-info"
|
||||||
|
style="cursor: pointer;color: #606266;margin-left: 4px;"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('fontSize')"
|
v-show="showProperty('fontSize')"
|
||||||
|
@ -51,6 +51,20 @@
|
|||||||
:value="option.value"
|
:value="option.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-tooltip
|
||||||
|
class="item"
|
||||||
|
effect="dark"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
slot="content"
|
||||||
|
v-html="$t('chart.font_family_tip')"
|
||||||
|
/>
|
||||||
|
<i
|
||||||
|
class="el-icon-info"
|
||||||
|
style="cursor: pointer;color: #606266;margin-left: 4px;"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('fontSize')"
|
v-show="showProperty('fontSize')"
|
||||||
|
@ -99,7 +99,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -134,7 +134,15 @@
|
|||||||
</span>
|
</span>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="showDateExt"
|
||||||
|
:command="beforeDateStyle('y_Q')"
|
||||||
|
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="showDateExt"
|
||||||
|
:command="beforeDateStyle('y_W')"
|
||||||
|
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||||
<el-dropdown-item :command="beforeDateStyle('H_m_s')">{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeDateStyle('H_m_s')">{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
||||||
@ -223,6 +231,10 @@ export default {
|
|||||||
type: Object,
|
type: Object,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
chart: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
index: {
|
index: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
@ -245,6 +257,14 @@ export default {
|
|||||||
tagType: 'success'
|
tagType: 'success'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
showDateExt() {
|
||||||
|
return this.chart.datasourceType === 'mysql' ||
|
||||||
|
this.chart.datasourceType === 'ds_doris' ||
|
||||||
|
this.chart.datasourceType === 'StarRocks' ||
|
||||||
|
this.chart.datasetMode === 1
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dimensionData: function() {
|
dimensionData: function() {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
|
@ -298,7 +298,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getDateExtStatus() {
|
getDateExtStatus() {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
this.showDateExt = this.showDateExt = this.chart.datasourceType === 'mysql' ||
|
this.showDateExt = this.chart.datasourceType === 'mysql' ||
|
||||||
this.chart.datasourceType === 'ds_doris' ||
|
this.chart.datasourceType === 'ds_doris' ||
|
||||||
this.chart.datasourceType === 'StarRocks' ||
|
this.chart.datasourceType === 'StarRocks' ||
|
||||||
this.chart.datasetMode === 1
|
this.chart.datasetMode === 1
|
||||||
|
@ -275,6 +275,11 @@ export default {
|
|||||||
this.logic = this.item.logic
|
this.logic = this.item.logic
|
||||||
this.filterType = this.item.filterType
|
this.filterType = this.item.filterType
|
||||||
this.enumCheckField = this.item.enumCheckField
|
this.enumCheckField = this.item.enumCheckField
|
||||||
|
|
||||||
|
// init enum option
|
||||||
|
if (this.item.filterType === 'enum' && this.needRequestEnum) {
|
||||||
|
this.initEnumOptions()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
initEnumOptions() {
|
initEnumOptions() {
|
||||||
// 查找枚举值
|
// 查找枚举值
|
||||||
|
@ -49,7 +49,7 @@ import { getRemark, hexColorToRGBA } from '../../chart/util'
|
|||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
|
||||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||||
import { DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
import { CHART_CONT_FAMILY_MAP, DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||||
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -209,7 +209,7 @@ export default {
|
|||||||
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
||||||
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ import { getRemark, hexColorToRGBA } from '../../chart/util'
|
|||||||
import eventBus from '@/components/canvas/utils/eventBus'
|
import eventBus from '@/components/canvas/utils/eventBus'
|
||||||
import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
|
import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
|
||||||
import TitleRemark from '@/views/chart/view/TitleRemark'
|
import TitleRemark from '@/views/chart/view/TitleRemark'
|
||||||
import { DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
import { CHART_CONT_FAMILY_MAP, DEFAULT_SIZE, DEFAULT_TITLE_STYLE } from '@/views/chart/chart/chart'
|
||||||
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
import ChartTitleUpdate from '../ChartTitleUpdate.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -236,7 +236,7 @@ export default {
|
|||||||
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
||||||
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
this.title_class.fontFamily = customStyle.text.fontFamily ? CHART_CONT_FAMILY_MAP[customStyle.text.fontFamily] : DEFAULT_TITLE_STYLE.fontFamily
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
|
@ -477,13 +477,13 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('gaugeAxisLabel')"
|
v-show="showProperty('gaugeAxisLine')"
|
||||||
:label="$t('chart.gauge_axis_label')"
|
:label="$t('chart.gauge_axis_label')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="sizeForm.gaugeAxisLine"
|
v-model="sizeForm.gaugeAxisLine"
|
||||||
@change="changeBarSizeCase('gaugeAxisLabel')"
|
@change="changeBarSizeCase('gaugeAxisLine')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!--gauge-end-->
|
<!--gauge-end-->
|
||||||
|
@ -522,243 +522,245 @@
|
|||||||
label-width="100px"
|
label-width="100px"
|
||||||
size="mini"
|
size="mini"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<div v-show="!batchOptStatus">
|
||||||
v-show="showProperty('gaugeMin')"
|
<el-form-item
|
||||||
:label="$t('chart.min')"
|
v-show="showProperty('gaugeMin')"
|
||||||
class="form-item"
|
:label="$t('chart.min')"
|
||||||
>
|
class="form-item"
|
||||||
<el-radio-group
|
|
||||||
v-model="sizeForm.gaugeMinType"
|
|
||||||
size="mini"
|
|
||||||
@change="changeQuotaField('min')"
|
|
||||||
>
|
>
|
||||||
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
|
<el-radio-group
|
||||||
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
|
v-model="sizeForm.gaugeMinType"
|
||||||
</el-radio-group>
|
size="mini"
|
||||||
</el-form-item>
|
@change="changeQuotaField('min')"
|
||||||
<el-form-item
|
|
||||||
v-if="showProperty('gaugeMin') && sizeForm.gaugeMinType === 'fix'"
|
|
||||||
class="form-item form-item-slider"
|
|
||||||
>
|
|
||||||
<el-input-number
|
|
||||||
v-model="sizeForm.gaugeMin"
|
|
||||||
size="mini"
|
|
||||||
@change="changeBarSizeCase('gaugeMin')"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-if="showProperty('gaugeMin') && sizeForm.gaugeMinType === 'dynamic'"
|
|
||||||
class="form-item form-flex"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.gaugeMinField.id"
|
|
||||||
:placeholder="$t('chart.field')"
|
|
||||||
@change="changeQuotaField('min',true)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in quotaData"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
>
|
||||||
<span style="float: left">
|
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
|
||||||
<svg-icon
|
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
|
||||||
v-if="item.deType === 0"
|
</el-radio-group>
|
||||||
icon-class="field_text"
|
</el-form-item>
|
||||||
class="field-icon-text"
|
<el-form-item
|
||||||
/>
|
v-if="showProperty('gaugeMin') && sizeForm.gaugeMinType === 'fix'"
|
||||||
<svg-icon
|
class="form-item form-item-slider"
|
||||||
v-if="item.deType === 1"
|
|
||||||
icon-class="field_time"
|
|
||||||
class="field-icon-time"
|
|
||||||
/>
|
|
||||||
<svg-icon
|
|
||||||
v-if="item.deType === 2 || item.deType === 3"
|
|
||||||
icon-class="field_value"
|
|
||||||
class="field-icon-value"
|
|
||||||
/>
|
|
||||||
<svg-icon
|
|
||||||
v-if="item.deType === 5"
|
|
||||||
icon-class="field_location"
|
|
||||||
class="field-icon-location"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.gaugeMinField.summary"
|
|
||||||
:placeholder="$t('chart.summary')"
|
|
||||||
@change="changeQuotaField('min')"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-input-number
|
||||||
v-if="validMinField"
|
v-model="sizeForm.gaugeMin"
|
||||||
key="sum"
|
size="mini"
|
||||||
value="sum"
|
@change="changeBarSizeCase('gaugeMin')"
|
||||||
:label="$t('chart.sum')"
|
|
||||||
/>
|
/>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-if="validMinField"
|
<el-form-item
|
||||||
key="avg"
|
v-if="showProperty('gaugeMin') && sizeForm.gaugeMinType === 'dynamic'"
|
||||||
value="avg"
|
class="form-item form-flex"
|
||||||
:label="$t('chart.avg')"
|
>
|
||||||
/>
|
<el-select
|
||||||
<el-option
|
v-model="sizeForm.gaugeMinField.id"
|
||||||
v-if="validMinField"
|
:placeholder="$t('chart.field')"
|
||||||
key="max"
|
@change="changeQuotaField('min',true)"
|
||||||
value="max"
|
>
|
||||||
:label="$t('chart.max')"
|
<el-option
|
||||||
/>
|
v-for="item in quotaData"
|
||||||
<el-option
|
:key="item.id"
|
||||||
v-if="validMinField"
|
:label="item.name"
|
||||||
key="min"
|
:value="item.id"
|
||||||
value="min"
|
>
|
||||||
:label="$t('chart.min')"
|
<span style="float: left">
|
||||||
/>
|
<svg-icon
|
||||||
<el-option
|
v-if="item.deType === 0"
|
||||||
v-if="validMinField"
|
icon-class="field_text"
|
||||||
key="stddev_pop"
|
class="field-icon-text"
|
||||||
value="stddev_pop"
|
/>
|
||||||
:label="$t('chart.stddev_pop')"
|
<svg-icon
|
||||||
/>
|
v-if="item.deType === 1"
|
||||||
<el-option
|
icon-class="field_time"
|
||||||
v-if="validMinField"
|
class="field-icon-time"
|
||||||
key="var_pop"
|
/>
|
||||||
value="var_pop"
|
<svg-icon
|
||||||
:label="$t('chart.var_pop')"
|
v-if="item.deType === 2 || item.deType === 3"
|
||||||
/>
|
icon-class="field_value"
|
||||||
<el-option
|
class="field-icon-value"
|
||||||
key="count"
|
/>
|
||||||
value="count"
|
<svg-icon
|
||||||
:label="$t('chart.count')"
|
v-if="item.deType === 5"
|
||||||
/>
|
icon-class="field_location"
|
||||||
<el-option
|
class="field-icon-location"
|
||||||
v-if="minField.id !== 'count'"
|
/>
|
||||||
key="count_distinct"
|
</span>
|
||||||
value="count_distinct"
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
:label="$t('chart.count_distinct')"
|
</el-option>
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
<el-select
|
||||||
</el-form-item>
|
v-model="sizeForm.gaugeMinField.summary"
|
||||||
|
:placeholder="$t('chart.summary')"
|
||||||
|
@change="changeQuotaField('min')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="sum"
|
||||||
|
value="sum"
|
||||||
|
:label="$t('chart.sum')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="avg"
|
||||||
|
value="avg"
|
||||||
|
:label="$t('chart.avg')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="max"
|
||||||
|
value="max"
|
||||||
|
:label="$t('chart.max')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="min"
|
||||||
|
value="min"
|
||||||
|
:label="$t('chart.min')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="stddev_pop"
|
||||||
|
value="stddev_pop"
|
||||||
|
:label="$t('chart.stddev_pop')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMinField"
|
||||||
|
key="var_pop"
|
||||||
|
value="var_pop"
|
||||||
|
:label="$t('chart.var_pop')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
key="count"
|
||||||
|
value="count"
|
||||||
|
:label="$t('chart.count')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="minField.id !== 'count'"
|
||||||
|
key="count_distinct"
|
||||||
|
value="count_distinct"
|
||||||
|
:label="$t('chart.count_distinct')"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('gaugeMax')"
|
v-show="showProperty('gaugeMax')"
|
||||||
:label="$t('chart.max')"
|
:label="$t('chart.max')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
>
|
|
||||||
<el-radio-group
|
|
||||||
v-model="sizeForm.gaugeMaxType"
|
|
||||||
size="mini"
|
|
||||||
@change="changeQuotaField('max')"
|
|
||||||
>
|
>
|
||||||
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
|
<el-radio-group
|
||||||
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
|
v-model="sizeForm.gaugeMaxType"
|
||||||
</el-radio-group>
|
size="mini"
|
||||||
</el-form-item>
|
@change="changeQuotaField('max')"
|
||||||
<el-form-item
|
|
||||||
v-if="showProperty('gaugeMax') && sizeForm.gaugeMaxType === 'fix'"
|
|
||||||
class="form-item form-item-slider"
|
|
||||||
>
|
|
||||||
<el-input-number
|
|
||||||
v-model="sizeForm.gaugeMax"
|
|
||||||
size="mini"
|
|
||||||
@change="changeBarSizeCase('gaugeMax')"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item
|
|
||||||
v-if="showProperty('gaugeMax') && sizeForm.gaugeMaxType === 'dynamic'"
|
|
||||||
class="form-item form-flex"
|
|
||||||
>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.gaugeMaxField.id"
|
|
||||||
:placeholder="$t('chart.field')"
|
|
||||||
@change="changeQuotaField('max',true)"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in quotaData"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
>
|
>
|
||||||
<span style="float: left">
|
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
|
||||||
<svg-icon
|
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
|
||||||
v-if="item.deType === 0"
|
</el-radio-group>
|
||||||
icon-class="field_text"
|
</el-form-item>
|
||||||
class="field-icon-text"
|
<el-form-item
|
||||||
/>
|
v-if="showProperty('gaugeMax') && sizeForm.gaugeMaxType === 'fix'"
|
||||||
<svg-icon
|
class="form-item form-item-slider"
|
||||||
v-if="item.deType === 1"
|
|
||||||
icon-class="field_time"
|
|
||||||
class="field-icon-time"
|
|
||||||
/>
|
|
||||||
<svg-icon
|
|
||||||
v-if="item.deType === 2 || item.deType === 3"
|
|
||||||
icon-class="field_value"
|
|
||||||
class="field-icon-value"
|
|
||||||
/>
|
|
||||||
<svg-icon
|
|
||||||
v-if="item.deType === 5"
|
|
||||||
icon-class="field_location"
|
|
||||||
class="field-icon-location"
|
|
||||||
/>
|
|
||||||
</span>
|
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-select
|
|
||||||
v-model="sizeForm.gaugeMaxField.summary"
|
|
||||||
:placeholder="$t('chart.summary')"
|
|
||||||
@change="changeQuotaField('max')"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-input-number
|
||||||
v-if="validMaxField"
|
v-model="sizeForm.gaugeMax"
|
||||||
key="sum"
|
size="mini"
|
||||||
value="sum"
|
@change="changeBarSizeCase('gaugeMax')"
|
||||||
:label="$t('chart.sum')"
|
|
||||||
/>
|
/>
|
||||||
<el-option
|
</el-form-item>
|
||||||
v-if="validMaxField"
|
<el-form-item
|
||||||
key="avg"
|
v-if="showProperty('gaugeMax') && sizeForm.gaugeMaxType === 'dynamic'"
|
||||||
value="avg"
|
class="form-item form-flex"
|
||||||
:label="$t('chart.avg')"
|
>
|
||||||
/>
|
<el-select
|
||||||
<el-option
|
v-model="sizeForm.gaugeMaxField.id"
|
||||||
v-if="validMaxField"
|
:placeholder="$t('chart.field')"
|
||||||
key="max"
|
@change="changeQuotaField('max',true)"
|
||||||
value="max"
|
>
|
||||||
:label="$t('chart.max')"
|
<el-option
|
||||||
/>
|
v-for="item in quotaData"
|
||||||
<el-option
|
:key="item.id"
|
||||||
v-if="validMaxField"
|
:label="item.name"
|
||||||
key="min"
|
:value="item.id"
|
||||||
value="min"
|
>
|
||||||
:label="$t('chart.min')"
|
<span style="float: left">
|
||||||
/>
|
<svg-icon
|
||||||
<el-option
|
v-if="item.deType === 0"
|
||||||
v-if="validMaxField"
|
icon-class="field_text"
|
||||||
key="stddev_pop"
|
class="field-icon-text"
|
||||||
value="stddev_pop"
|
/>
|
||||||
:label="$t('chart.stddev_pop')"
|
<svg-icon
|
||||||
/>
|
v-if="item.deType === 1"
|
||||||
<el-option
|
icon-class="field_time"
|
||||||
v-if="validMaxField"
|
class="field-icon-time"
|
||||||
key="var_pop"
|
/>
|
||||||
value="var_pop"
|
<svg-icon
|
||||||
:label="$t('chart.var_pop')"
|
v-if="item.deType === 2 || item.deType === 3"
|
||||||
/>
|
icon-class="field_value"
|
||||||
<el-option
|
class="field-icon-value"
|
||||||
key="count"
|
/>
|
||||||
value="count"
|
<svg-icon
|
||||||
:label="$t('chart.count')"
|
v-if="item.deType === 5"
|
||||||
/>
|
icon-class="field_location"
|
||||||
<el-option
|
class="field-icon-location"
|
||||||
v-if="maxField.id !== 'count'"
|
/>
|
||||||
key="count_distinct"
|
</span>
|
||||||
value="count_distinct"
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
:label="$t('chart.count_distinct')"
|
</el-option>
|
||||||
/>
|
</el-select>
|
||||||
</el-select>
|
<el-select
|
||||||
</el-form-item>
|
v-model="sizeForm.gaugeMaxField.summary"
|
||||||
|
:placeholder="$t('chart.summary')"
|
||||||
|
@change="changeQuotaField('max')"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="sum"
|
||||||
|
value="sum"
|
||||||
|
:label="$t('chart.sum')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="avg"
|
||||||
|
value="avg"
|
||||||
|
:label="$t('chart.avg')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="max"
|
||||||
|
value="max"
|
||||||
|
:label="$t('chart.max')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="min"
|
||||||
|
value="min"
|
||||||
|
:label="$t('chart.min')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="stddev_pop"
|
||||||
|
value="stddev_pop"
|
||||||
|
:label="$t('chart.stddev_pop')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="validMaxField"
|
||||||
|
key="var_pop"
|
||||||
|
value="var_pop"
|
||||||
|
:label="$t('chart.var_pop')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
key="count"
|
||||||
|
value="count"
|
||||||
|
:label="$t('chart.count')"
|
||||||
|
/>
|
||||||
|
<el-option
|
||||||
|
v-if="maxField.id !== 'count'"
|
||||||
|
key="count_distinct"
|
||||||
|
value="count_distinct"
|
||||||
|
:label="$t('chart.count_distinct')"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('gaugeStartAngle')"
|
v-show="showProperty('gaugeStartAngle')"
|
||||||
@ -791,13 +793,13 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('gaugeAxisLabel')"
|
v-show="showProperty('gaugeAxisLine')"
|
||||||
:label="$t('chart.gauge_axis_label')"
|
:label="$t('chart.gauge_axis_label')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="sizeForm.gaugeAxisLine"
|
v-model="sizeForm.gaugeAxisLine"
|
||||||
@change="changeBarSizeCase('gaugeAxisLabel')"
|
@change="changeBarSizeCase('gaugeAxisLine')"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item v-show="showProperty('gaugeTickCount')" :label="$t('chart.tick_count')" class="form-item form-item-slider">-->
|
<!-- <el-form-item v-show="showProperty('gaugeTickCount')" :label="$t('chart.tick_count')" class="form-item form-item-slider">-->
|
||||||
@ -1369,7 +1371,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
v-show="showProperty('wordSizeRange') "
|
v-show="showProperty('wordSizeRange') "
|
||||||
:label="$t('chart.word_size_range')"
|
:label="$t('chart.word_size_range')"
|
||||||
class="form-item form-item-slider"
|
class="form-item form-item-slider form-item-range-slider"
|
||||||
>
|
>
|
||||||
<el-slider
|
<el-slider
|
||||||
v-model="sizeForm.wordSizeRange"
|
v-model="sizeForm.wordSizeRange"
|
||||||
@ -1386,6 +1388,9 @@
|
|||||||
>
|
>
|
||||||
<el-slider
|
<el-slider
|
||||||
v-model="sizeForm.wordSpacing"
|
v-model="sizeForm.wordSpacing"
|
||||||
|
show-input
|
||||||
|
:show-input-controls="false"
|
||||||
|
input-size="mini"
|
||||||
:min="0"
|
:min="0"
|
||||||
:max="20"
|
:max="20"
|
||||||
@change="changeBarSizeCase('wordSpacing')"
|
@change="changeBarSizeCase('wordSpacing')"
|
||||||
@ -1402,6 +1407,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, DEFAULT_SIZE } from '../../chart/chart'
|
import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, DEFAULT_SIZE } from '../../chart/chart'
|
||||||
import { equalsAny } from '@/utils/StringUtils'
|
import { equalsAny } from '@/utils/StringUtils'
|
||||||
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SizeSelectorAntV',
|
name: 'SizeSelectorAntV',
|
||||||
@ -1490,7 +1496,8 @@ export default {
|
|||||||
return customAttr.color.mapLineGradient && equalsAny(this.sizeForm.mapLineType, 'line', 'arc')
|
return customAttr.color.mapLineGradient && equalsAny(this.sizeForm.mapLineType, 'line', 'arc')
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
},
|
||||||
|
...mapState(['batchOptStatus'])
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'chart': {
|
'chart': {
|
||||||
@ -1750,6 +1757,10 @@ export default {
|
|||||||
line-height: 38px;
|
line-height: 38px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form-item-range-slider ::v-deep .el-form-item__content {
|
||||||
|
padding-right: 6px
|
||||||
|
}
|
||||||
|
|
||||||
.form-item ::v-deep .el-form-item__label {
|
.form-item ::v-deep .el-form-item__label {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
@ -863,6 +863,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="stackItemChange"
|
@onItemChange="stackItemChange"
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
|||||||
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
||||||
}
|
}
|
||||||
} else if (styleInfo.backgroundType === 'color') {
|
} else if (styleInfo.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha||100)
|
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha === undefined ? 100 : styleInfo.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA
|
background: colorRGBA
|
||||||
}
|
}
|
||||||
|
@ -723,7 +723,7 @@ export default {
|
|||||||
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
|
||||||
}
|
}
|
||||||
} else if (styleInfo.backgroundType === 'color') {
|
} else if (styleInfo.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha||100)
|
const colorRGBA = hexColorToRGBA(styleInfo.color, styleInfo.alpha === undefined ? 100 : styleInfo.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA
|
background: colorRGBA
|
||||||
}
|
}
|
||||||
@ -747,7 +747,7 @@ export default {
|
|||||||
...style
|
...style
|
||||||
}
|
}
|
||||||
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
} else if (this.canvasStyleData.panel.backgroundType === 'color') {
|
||||||
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha||100)
|
const colorRGBA = hexColorToRGBA(this.canvasStyleData.panel.color, this.canvasStyleData.panel.alpha === undefined ? 100 : this.canvasStyleData.panel.alpha)
|
||||||
style = {
|
style = {
|
||||||
background: colorRGBA,
|
background: colorRGBA,
|
||||||
...style
|
...style
|
||||||
|
@ -207,6 +207,24 @@
|
|||||||
>{{ $t("commons.no") }}</el-radio>
|
>{{ $t("commons.no") }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
:label="
|
||||||
|
$t('commons.yes') + $t('commons.no') + $t('display.auto_identify_mobile_devices')
|
||||||
|
"
|
||||||
|
prop="autoMobile"
|
||||||
|
>
|
||||||
|
<el-radio-group v-model="formInline.autoMobile">
|
||||||
|
<el-radio
|
||||||
|
label="true"
|
||||||
|
size="mini"
|
||||||
|
>{{ $t("commons.yes") }}</el-radio>
|
||||||
|
<el-radio
|
||||||
|
label="false"
|
||||||
|
size="mini"
|
||||||
|
>{{ $t("commons.no") }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -412,6 +430,12 @@ export default {
|
|||||||
type: 'text',
|
type: 'text',
|
||||||
sort: 14
|
sort: 14
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
paramKey: 'ui.autoMobile',
|
||||||
|
paramValue: this.formInline.autoMobile,
|
||||||
|
type: 'text',
|
||||||
|
sort: 15
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
paramKey: 'loginlimit.limitTimes',
|
paramKey: 'loginlimit.limitTimes',
|
||||||
|
@ -100,7 +100,7 @@ export default {
|
|||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id'
|
value: 'id'
|
||||||
},
|
},
|
||||||
expandedKeys: []
|
expandedKeys: ['000000000']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -2,12 +2,20 @@
|
|||||||
<de-container
|
<de-container
|
||||||
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
|
||||||
class="de-earth"
|
class="de-earth"
|
||||||
style="height: calc(100vh - 150px);"
|
style="height: calc(100vh - 200px);"
|
||||||
>
|
>
|
||||||
|
<div class="de-map-tips">
|
||||||
|
<el-alert
|
||||||
|
:title="$t('map_setting.prohibit_prompts')"
|
||||||
|
type="warning"
|
||||||
|
description=""
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<de-aside-container
|
<de-aside-container
|
||||||
type="mapset"
|
type="mapset"
|
||||||
style="height: 100%;"
|
class="map-setting-aside"
|
||||||
>
|
>
|
||||||
<map-setting-left
|
<map-setting-left
|
||||||
ref="map_setting_tree"
|
ref="map_setting_tree"
|
||||||
@ -18,7 +26,9 @@
|
|||||||
/>
|
/>
|
||||||
</de-aside-container>
|
</de-aside-container>
|
||||||
|
|
||||||
<de-main-container style="height: 100%;">
|
<de-main-container
|
||||||
|
class="map-setting-main"
|
||||||
|
>
|
||||||
<map-setting-right
|
<map-setting-right
|
||||||
ref="map_setting_form"
|
ref="map_setting_form"
|
||||||
:tree-data="treeData"
|
:tree-data="treeData"
|
||||||
@ -83,5 +93,17 @@ export default {
|
|||||||
padding: 24px;
|
padding: 24px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
.de-map-tips {
|
||||||
|
position: absolute;
|
||||||
|
width: calc(100% - 135px);
|
||||||
|
}
|
||||||
|
.map-setting-aside {
|
||||||
|
top: 50px;
|
||||||
|
height: calc(100% - 40px) !important;
|
||||||
|
}
|
||||||
|
.map-setting-main {
|
||||||
|
margin-top: 50px;
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -50,16 +50,14 @@
|
|||||||
class="tabs-container"
|
class="tabs-container"
|
||||||
:class="[activeName !== 'eight' ? 'is-center' : 'pad-center']"
|
:class="[activeName !== 'eight' ? 'is-center' : 'pad-center']"
|
||||||
>
|
>
|
||||||
<div class="min-w600">
|
<div :class="activeName === 'ten' ? 'max-w600' : 'min-w600'">
|
||||||
<basic-setting
|
<basic-setting
|
||||||
v-if="activeName === 'zero'"
|
v-if="activeName === 'zero'"
|
||||||
:is-plugin-loaded="isPluginLoaded"
|
:is-plugin-loaded="isPluginLoaded"
|
||||||
/>
|
/>
|
||||||
<email-setting v-if="activeName === 'first'" />
|
<email-setting v-if="activeName === 'first'" />
|
||||||
<map-setting
|
<map-setting v-if="activeName === 'ten'" />
|
||||||
v-if="activeName === 'ten'"
|
|
||||||
ref="mapSetting"
|
|
||||||
/>
|
|
||||||
<simple-mode v-if="activeName === 'six'" />
|
<simple-mode v-if="activeName === 'six'" />
|
||||||
<cluster-mode v-if="activeName === 'seven'" />
|
<cluster-mode v-if="activeName === 'seven'" />
|
||||||
<kettle-setting v-if="activeName === 'eight'" />
|
<kettle-setting v-if="activeName === 'eight'" />
|
||||||
@ -123,6 +121,14 @@ export default {
|
|||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.max-w600 {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
& > :nth-child(1) {
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-center {
|
.is-center {
|
||||||
|
@ -432,7 +432,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
validateUsername(rule, value, callback) {
|
validateUsername(rule, value, callback) {
|
||||||
const pattern = '^[a-zA-Z][a-zA-Z0-9\._-]*$'
|
const pattern = '^[a-zA-Z0-9][a-zA-Z0-9\._-]*$'
|
||||||
const regep = new RegExp(pattern)
|
const regep = new RegExp(pattern)
|
||||||
if (!regep.test(value) && this.formType === 'add') {
|
if (!regep.test(value) && this.formType === 'add') {
|
||||||
const msg = this.$t('user.user_name_pattern_error')
|
const msg = this.$t('user.user_name_pattern_error')
|
||||||
|
@ -4,7 +4,7 @@ import Stomp from 'stompjs'
|
|||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
class DeWebsocket {
|
class DeWebsocket {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.ws_url = '/websocket'
|
this.ws_url = `${process.env.VUE_APP_BASE_API}websocket`
|
||||||
this.client = null
|
this.client = null
|
||||||
this.channels = [
|
this.channels = [
|
||||||
{
|
{
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -348,10 +348,6 @@
|
|||||||
this.pointParam.viewId = this.chart.id
|
this.pointParam.viewId = this.chart.id
|
||||||
const param = this.pointParam
|
const param = this.pointParam
|
||||||
if (!param || !param.data || !param.data.dimensionList) {
|
if (!param || !param.data || !param.data.dimensionList) {
|
||||||
const zoom = this.myChart.getOption().geo[0].zoom
|
|
||||||
if (zoom <= 1) {
|
|
||||||
this.$warning(this.$t('panel.no_drill_field'))
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const linkageParam = {
|
const linkageParam = {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mvn clean package
|
mvn clean package
|
||||||
|
|
||||||
cp view-chartmix-backend/target/view-chartmix-backend-1.18.9.jar .
|
cp view-chartmix-backend/target/view-chartmix-backend-1.18.10.jar .
|
||||||
|
|
||||||
zip -r chartmix.zip ./view-chartmix-backend-1.18.9.jar ./plugin.json
|
zip -r chartmix.zip ./view-chartmix-backend-1.18.10.jar ./plugin.json
|
||||||
|
|
||||||
rm -f ./view-chartmix-backend-1.18.9.jar
|
rm -f ./view-chartmix-backend-1.18.10.jar
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
"cost": 0,
|
"cost": 0,
|
||||||
"category": "view",
|
"category": "view",
|
||||||
"descript": "AntV G2Plot 组合图插件",
|
"descript": "AntV G2Plot 组合图插件",
|
||||||
"version": "1.18.9",
|
"version": "1.18.10",
|
||||||
"creator": "DATAEASE",
|
"creator": "DATAEASE",
|
||||||
"moduleName": "view-chartmix-backend",
|
"moduleName": "view-chartmix-backend",
|
||||||
"require": "1.18.9",
|
"require": "1.18.10",
|
||||||
"dsType": ""
|
"dsType": ""
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package io.dataease.plugins.view.official.handler;
|
package io.dataease.plugins.view.official.handler;
|
||||||
|
|
||||||
|
import com.google.gson.Gson;
|
||||||
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.util.ConstantsUtil;
|
import io.dataease.plugins.common.util.ConstantsUtil;
|
||||||
@ -19,7 +20,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class DefaultViewStatHandler implements PluginViewStatHandler {
|
public class ChartMixViewStatHandler implements PluginViewStatHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {
|
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {
|
||||||
@ -43,6 +44,8 @@ public class DefaultViewStatHandler 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());
|
||||||
@ -75,6 +78,9 @@ public class DefaultViewStatHandler implements PluginViewStatHandler {
|
|||||||
List<PluginViewSQL> orders = new ArrayList<>();
|
List<PluginViewSQL> orders = new ArrayList<>();
|
||||||
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()));
|
||||||
|
|
@ -3,7 +3,7 @@ package io.dataease.plugins.view.official.impl;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import io.dataease.plugins.common.dto.StaticResource;
|
import io.dataease.plugins.common.dto.StaticResource;
|
||||||
import io.dataease.plugins.view.entity.*;
|
import io.dataease.plugins.view.entity.*;
|
||||||
import io.dataease.plugins.view.official.handler.DefaultViewStatHandler;
|
import io.dataease.plugins.view.official.handler.ChartMixViewStatHandler;
|
||||||
import io.dataease.plugins.view.service.ViewPluginService;
|
import io.dataease.plugins.view.service.ViewPluginService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -110,11 +110,10 @@ public class ChartMixService extends ViewPluginService {
|
|||||||
if (CollectionUtils.isNotEmpty(yAxisExt)) {
|
if (CollectionUtils.isNotEmpty(yAxisExt)) {
|
||||||
yAxis.addAll(yAxisExt);
|
yAxis.addAll(yAxisExt);
|
||||||
}*/
|
}*/
|
||||||
System.out.println(new Gson().toJson(yAxis));
|
|
||||||
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis)) {
|
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String sql = new DefaultViewStatHandler().build(param, this);
|
String sql = new ChartMixViewStatHandler().build(param, this);
|
||||||
System.out.println(sql);
|
System.out.println(sql);
|
||||||
return sql;
|
return sql;
|
||||||
|
|
||||||
|
@ -16,6 +16,34 @@
|
|||||||
<el-color-picker v-model="labelForm.color" class="color-picker-style" :predefine="predefineColors"
|
<el-color-picker v-model="labelForm.color" class="color-picker-style" :predefine="predefineColors"
|
||||||
@change="changeLabelAttr"/>
|
@change="changeLabelAttr"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
{{ $t('chart.label_position') }}
|
||||||
|
<el-tooltip
|
||||||
|
effect="dark"
|
||||||
|
content="仅对柱状图生效"
|
||||||
|
>
|
||||||
|
<i
|
||||||
|
class="el-icon-info"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<el-select
|
||||||
|
v-model="labelForm.position"
|
||||||
|
:placeholder="$t('chart.label_position')"
|
||||||
|
@change="changeLabelAttr"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="option in labelPositionV"
|
||||||
|
:key="option.value"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<!-- <el-form-item :label="$t('chart.label')" class="form-item">
|
<!-- <el-form-item :label="$t('chart.label')" class="form-item">
|
||||||
<el-select v-model="values" :placeholder="$t('commons.please_select')" multiple collapse-tags
|
<el-select v-model="values" :placeholder="$t('commons.please_select')" multiple collapse-tags
|
||||||
@change="changeFields">
|
@change="changeFields">
|
||||||
@ -125,7 +153,12 @@ export default {
|
|||||||
],
|
],
|
||||||
predefineColors: COLOR_PANEL,
|
predefineColors: COLOR_PANEL,
|
||||||
values: null,
|
values: null,
|
||||||
busiType: 'labelAxis'
|
busiType: 'labelAxis',
|
||||||
|
labelPositionV: [
|
||||||
|
{name: this.$t('chart.text_pos_top'), value: 'top'},
|
||||||
|
{name: this.$t('chart.center'), value: 'middle'},
|
||||||
|
{name: this.$t('chart.text_pos_bottom'), value: 'bottom'}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -70,7 +70,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"
|
||||||
@ -83,7 +83,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>
|
||||||
@ -95,82 +95,82 @@
|
|||||||
>{{ $t('chart.custom_sort') }}...</el-dropdown-item>
|
>{{ $t('chart.custom_sort') }}...</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-dropdown-item>-->
|
|
||||||
<!-- <el-dropdown-item
|
|
||||||
v-show="item.deType === 1"
|
|
||||||
divided
|
|
||||||
>
|
|
||||||
<el-dropdown
|
|
||||||
placement="right-start"
|
|
||||||
size="mini"
|
|
||||||
style="width: 100%"
|
|
||||||
@command="dateStyle"
|
|
||||||
>
|
|
||||||
<span class="el-dropdown-link inner-dropdown-menu">
|
|
||||||
<span>
|
|
||||||
<i class="el-icon-c-scale-to-original"/>
|
|
||||||
<span>{{ $t('chart.dateStyle') }}</span>
|
|
||||||
<span class="summary-span-item">({{ $t('chart.' + item.dateStyle) }})</span>
|
|
||||||
</span>
|
|
||||||
<i class="el-icon-arrow-right el-icon--right"/>
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item
|
|
||||||
v-if="showDateExt"
|
|
||||||
:command="beforeDateStyle('y_Q')"
|
|
||||||
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item
|
|
||||||
v-if="showDateExt"
|
|
||||||
:command="beforeDateStyle('y_W')"
|
|
||||||
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item
|
|
||||||
:command="beforeDateStyle('H_m_s')"
|
|
||||||
divided
|
|
||||||
>{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
|
||||||
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m_s')">{{
|
|
||||||
$t('chart.y_M_d_H_m_s')
|
|
||||||
}}</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</el-dropdown-item>
|
|
||||||
<el-dropdown-item v-show="item.deType === 1">
|
|
||||||
<el-dropdown
|
|
||||||
placement="right-start"
|
|
||||||
size="mini"
|
|
||||||
style="width: 100%"
|
|
||||||
@command="datePattern"
|
|
||||||
>
|
|
||||||
<span class="el-dropdown-link inner-dropdown-menu">
|
|
||||||
<span>
|
|
||||||
<i class="el-icon-timer"/>
|
|
||||||
<span>{{ $t('chart.datePattern') }}</span>
|
|
||||||
<span class="summary-span-item">({{ $t('chart.' + item.datePattern) }})</span>
|
|
||||||
</span>
|
|
||||||
<i class="el-icon-arrow-right el-icon--right"/>
|
|
||||||
</span>
|
|
||||||
<el-dropdown-menu slot="dropdown">
|
|
||||||
<el-dropdown-item :command="beforeDatePattern('date_sub')">{{
|
|
||||||
$t('chart.date_sub')
|
|
||||||
}}(1990-01-01)</el-dropdown-item>
|
|
||||||
<el-dropdown-item :command="beforeDatePattern('date_split')">{{
|
|
||||||
$t('chart.date_split')
|
|
||||||
}}(1990/01/01)</el-dropdown-item>
|
|
||||||
</el-dropdown-menu>
|
|
||||||
</el-dropdown>
|
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
|
<!-- <el-dropdown-item
|
||||||
|
v-show="item.deType === 1"
|
||||||
|
divided
|
||||||
|
>
|
||||||
|
<el-dropdown
|
||||||
|
placement="right-start"
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%"
|
||||||
|
@command="dateStyle"
|
||||||
|
>
|
||||||
|
<span class="el-dropdown-link inner-dropdown-menu">
|
||||||
|
<span>
|
||||||
|
<i class="el-icon-c-scale-to-original"/>
|
||||||
|
<span>{{ $t('chart.dateStyle') }}</span>
|
||||||
|
<span class="summary-span-item">({{ $t('chart.' + item.dateStyle) }})</span>
|
||||||
|
</span>
|
||||||
|
<i class="el-icon-arrow-right el-icon--right"/>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="showDateExt"
|
||||||
|
:command="beforeDateStyle('y_Q')"
|
||||||
|
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
v-if="showDateExt"
|
||||||
|
:command="beforeDateStyle('y_W')"
|
||||||
|
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item
|
||||||
|
:command="beforeDateStyle('H_m_s')"
|
||||||
|
divided
|
||||||
|
>{{ $t('chart.H_m_s') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m')">{{ $t('chart.y_M_d_H_m') }}</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeDateStyle('y_M_d_H_m_s')">{{
|
||||||
|
$t('chart.y_M_d_H_m_s')
|
||||||
|
}}</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-show="item.deType === 1">
|
||||||
|
<el-dropdown
|
||||||
|
placement="right-start"
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%"
|
||||||
|
@command="datePattern"
|
||||||
|
>
|
||||||
|
<span class="el-dropdown-link inner-dropdown-menu">
|
||||||
|
<span>
|
||||||
|
<i class="el-icon-timer"/>
|
||||||
|
<span>{{ $t('chart.datePattern') }}</span>
|
||||||
|
<span class="summary-span-item">({{ $t('chart.' + item.datePattern) }})</span>
|
||||||
|
</span>
|
||||||
|
<i class="el-icon-arrow-right el-icon--right"/>
|
||||||
|
</span>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item :command="beforeDatePattern('date_sub')">{{
|
||||||
|
$t('chart.date_sub')
|
||||||
|
}}(1990-01-01)</el-dropdown-item>
|
||||||
|
<el-dropdown-item :command="beforeDatePattern('date_split')">{{
|
||||||
|
$t('chart.date_split')
|
||||||
|
}}(1990/01/01)</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</el-dropdown-item>
|
||||||
|
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
v-if="chart && chart.render === 'antv' && chart.type.includes('table') && item.groupType === 'q'"
|
v-if="chart && chart.render === 'antv' && chart.type.includes('table') && item.groupType === 'q'"
|
||||||
icon="el-icon-notebook-2"
|
icon="el-icon-notebook-2"
|
||||||
divided
|
divided
|
||||||
:command="beforeClickItem('formatter')"
|
:command="beforeClickItem('formatter')"
|
||||||
>
|
>
|
||||||
<span>{{ $t('chart.value_formatter') }}...</span>
|
<span>{{ $t('chart.value_formatter') }}...</span>
|
||||||
</el-dropdown-item>-->
|
</el-dropdown-item>-->
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
icon="el-icon-edit-outline"
|
icon="el-icon-edit-outline"
|
||||||
:command="beforeClickItem('rename')"
|
:command="beforeClickItem('rename')"
|
@ -1,24 +1,65 @@
|
|||||||
<template>
|
<template>
|
||||||
<span style="position: relative;display: inline-block;">
|
<span style="position: relative;display: inline-block;">
|
||||||
<i class="el-icon-arrow-down el-icon-delete" style="position: absolute;top: 6px;right: 24px;color: #878d9f;cursor: pointer;z-index: 1;" @click="removeItem" />
|
<i
|
||||||
<el-dropdown trigger="click" size="mini" @command="clickItem">
|
class="el-icon-arrow-down el-icon-delete"
|
||||||
|
style="position: absolute;top: 6px;right: 24px;color: #878d9f;cursor: pointer;z-index: 1;"
|
||||||
|
@click="removeItem"
|
||||||
|
/>
|
||||||
|
<el-dropdown
|
||||||
|
trigger="click"
|
||||||
|
size="mini"
|
||||||
|
@command="clickItem"
|
||||||
|
>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<el-tag size="small" class="item-axis" :type="tagType">
|
<el-tag
|
||||||
|
size="small"
|
||||||
|
class="item-axis"
|
||||||
|
:type="tagType"
|
||||||
|
>
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
<svg-icon
|
||||||
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
v-if="item.deType === 0"
|
||||||
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
|
icon-class="field_text"
|
||||||
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
class="field-icon-text"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 1"
|
||||||
|
icon-class="field_time"
|
||||||
|
class="field-icon-time"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 2 || item.deType === 3"
|
||||||
|
icon-class="field_value"
|
||||||
|
class="field-icon-value"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 5"
|
||||||
|
icon-class="field_location"
|
||||||
|
class="field-icon-location"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-span-style" :title="item.name">{{ item.name }}</span>
|
<span
|
||||||
<field-error-tips v-if="tagType === 'danger'" />
|
class="item-span-style"
|
||||||
<i class="el-icon-arrow-down el-icon--right" style="position: absolute;top: 6px;right: 10px;" />
|
:title="item.name"
|
||||||
|
>{{ item.name }}</span>
|
||||||
|
<field-error-tips v-if="tagType === 'danger'"/>
|
||||||
|
<i
|
||||||
|
class="el-icon-arrow-down el-icon--right"
|
||||||
|
style="position: absolute;top: 6px;right: 10px;"
|
||||||
|
/>
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item icon="el-icon-files" :command="beforeClickItem('filter')">
|
<el-dropdown-item
|
||||||
|
icon="el-icon-files"
|
||||||
|
:command="beforeClickItem('filter')"
|
||||||
|
>
|
||||||
<span>{{ $t('chart.filter') }}...</span>
|
<span>{{ $t('chart.filter') }}...</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item icon="el-icon-delete" divided :command="beforeClickItem('remove')">
|
<el-dropdown-item
|
||||||
|
icon="el-icon-delete"
|
||||||
|
divided
|
||||||
|
:command="beforeClickItem('remove')"
|
||||||
|
>
|
||||||
<span>{{ $t('chart.delete') }}</span>
|
<span>{{ $t('chart.delete') }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@ -28,11 +69,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getItemType } from './utils'
|
import {getItemType} from './utils'
|
||||||
import FieldErrorTips from './FieldErrorTips'
|
import FieldErrorTips from './FieldErrorTips'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FilterItem',
|
name: 'FilterItem',
|
||||||
components: { FieldErrorTips },
|
components: {FieldErrorTips},
|
||||||
props: {
|
props: {
|
||||||
param: {
|
param: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -53,25 +95,34 @@ export default {
|
|||||||
quotaData: {
|
quotaData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
}
|
},
|
||||||
|
bus: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tagType: 'success'
|
tagType: 'success'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dimensionData: function() {
|
dimensionData: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
},
|
},
|
||||||
quotaData: function() {
|
quotaData: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
},
|
},
|
||||||
item: function() {
|
item: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.bus.$on('reset-change-table', this.getItemTagType)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.bus.$off('reset-change-table', this.getItemTagType)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickItem(param) {
|
clickItem(param) {
|
||||||
@ -110,45 +161,45 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.item-axis {
|
.item-axis {
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
margin: 0 3px 2px 3px;
|
margin: 0 3px 2px 3px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 159px;
|
width: 159px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-axis:hover {
|
.item-axis:hover {
|
||||||
background-color: #fdfdfd;
|
background-color: #fdfdfd;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-span{
|
.summary-span {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
color: #878d9f;;
|
color: #878d9f;;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-dropdown-menu{
|
.inner-dropdown-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%
|
width: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-span-style{
|
.item-span-style {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
width: 115px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -8,19 +8,19 @@
|
|||||||
<draggable v-model="view.xaxis" group="drag" animation="300" :move="onMove" class="drag-block-style"
|
<draggable v-model="view.xaxis" group="drag" animation="300" :move="onMove" class="drag-block-style"
|
||||||
@add="addXaxis" @update="calcData(true)">
|
@add="addXaxis" @update="calcData(true)">
|
||||||
<transition-group class="draggable-group">
|
<transition-group class="draggable-group">
|
||||||
<sankey-dimension-item v-for="(item,index) in view.xaxis" :key="index"
|
<dimension-item v-for="(item,index) in view.xaxis" :key="index"
|
||||||
:param="param"
|
:param="param"
|
||||||
:index="0"
|
:index="0"
|
||||||
:item="item"
|
:item="item"
|
||||||
:dimension-data="dimension"
|
:dimension-data="dimension"
|
||||||
:quota-data="quotaData"
|
:quota-data="quotaData"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
@onDimensionItemChange="dimensionItemChange"
|
@onDimensionItemChange="dimensionItemChange"
|
||||||
@onDimensionItemRemove="dimensionItemRemove"
|
@onDimensionItemRemove="dimensionItemRemove"
|
||||||
@editItemFilter="showDimensionEditFilter"
|
@editItemFilter="showDimensionEditFilter"
|
||||||
@onNameEdit="showRename"
|
@onNameEdit="showRename"
|
||||||
dimension-name="dimension"
|
dimension-name="dimension"
|
||||||
:bus="bus"
|
:bus="bus"
|
||||||
/>
|
/>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</draggable>
|
</draggable>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
@add="addCustomFilter" @update="calcData(true)">
|
@add="addCustomFilter" @update="calcData(true)">
|
||||||
<transition-group class="draggable-group">
|
<transition-group class="draggable-group">
|
||||||
<filter-item v-for="(item,index) in view.customFilter" :key="item.id" :param="param" :index="index"
|
<filter-item v-for="(item,index) in view.customFilter" :key="item.id" :param="param" :index="index"
|
||||||
:item="item" :dimension-data="dimension" :quota-data="quota"
|
:item="item" :dimension-data="dimension" :quota-data="quota" :bus="bus"
|
||||||
@onFilterItemRemove="filterItemRemove"
|
@onFilterItemRemove="filterItemRemove"
|
||||||
@editItemFilter="showEditFilter"/>
|
@editItemFilter="showEditFilter"/>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
@ -98,7 +98,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SankeyDimensionItem from '@/components/views/SankeyDimensionItem'
|
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'
|
||||||
@ -118,7 +118,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
SankeyDimensionItem,
|
DimensionItem,
|
||||||
QuotaItem,
|
QuotaItem,
|
||||||
QuotaExtItem,
|
QuotaExtItem,
|
||||||
FilterItem
|
FilterItem
|
||||||
@ -197,7 +197,9 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addXaxis(e) {
|
addXaxis(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxis, e)
|
this.dragMoveDuplicate(this.view.xaxis, e)
|
||||||
/*if (this.view.xaxis.length > 1) {
|
/*if (this.view.xaxis.length > 1) {
|
||||||
this.view.xaxis = [this.view.xaxis[0]]
|
this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
@ -36,7 +36,13 @@ 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 {DEFAULT_TITLE_STYLE, DEFAULT_XAXIS_STYLE, DEFAULT_YAXIS_STYLE, transAxisPosition, getLineDash} from '@/utils/map';
|
import {
|
||||||
|
DEFAULT_TITLE_STYLE,
|
||||||
|
DEFAULT_XAXIS_STYLE,
|
||||||
|
DEFAULT_YAXIS_STYLE,
|
||||||
|
transAxisPosition,
|
||||||
|
getLineDash
|
||||||
|
} 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'
|
||||||
@ -134,6 +140,12 @@ export default {
|
|||||||
},
|
},
|
||||||
linkageActiveParam: null,
|
linkageActiveParam: null,
|
||||||
linkageActiveHistory: false,
|
linkageActiveHistory: false,
|
||||||
|
CHART_CONT_FAMILY_MAP: {
|
||||||
|
'Microsoft YaHei': 'Microsoft YaHei',
|
||||||
|
'SimSun': 'SimSun, "Songti SC", STSong',
|
||||||
|
'SimHei': 'SimHei, Helvetica',
|
||||||
|
'KaiTi': 'KaiTi, "Kaiti SC", STKaiti'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -242,7 +254,7 @@ export default {
|
|||||||
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.fontSize = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
|
|
||||||
this.titleClass.fontFamily = customStyle.text.fontFamily ? 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'
|
||||||
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
@ -251,23 +263,6 @@ export default {
|
|||||||
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customStyle.text) {
|
|
||||||
this.title_show = customStyle.text.show
|
|
||||||
this.title_class.fontSize = customStyle.text.fontSize + 'px'
|
|
||||||
this.title_class.color = customStyle.text.color
|
|
||||||
this.title_class.textAlign = customStyle.text.hPosition
|
|
||||||
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
|
||||||
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
|
||||||
}
|
|
||||||
if (customStyle.background) {
|
|
||||||
this.title_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
|
|
||||||
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.initRemark()
|
this.initRemark()
|
||||||
},
|
},
|
||||||
@ -294,6 +289,7 @@ export default {
|
|||||||
let customAttr = undefined;
|
let customAttr = undefined;
|
||||||
let colors = undefined;
|
let colors = undefined;
|
||||||
let labelSetting = undefined;
|
let labelSetting = undefined;
|
||||||
|
let labelPosition = 'middle';
|
||||||
if (this.chart.customAttr) {
|
if (this.chart.customAttr) {
|
||||||
customAttr = JSON.parse(this.chart.customAttr);
|
customAttr = JSON.parse(this.chart.customAttr);
|
||||||
if (customAttr) {
|
if (customAttr) {
|
||||||
@ -302,15 +298,12 @@ export default {
|
|||||||
}
|
}
|
||||||
if (customAttr.label) {
|
if (customAttr.label) {
|
||||||
labelSetting = customAttr.label.show ? {
|
labelSetting = customAttr.label.show ? {
|
||||||
callback: function (x) {
|
style: {
|
||||||
return {
|
fill: customAttr.label.color,
|
||||||
style: {
|
fontSize: parseInt(customAttr.label.fontSize),
|
||||||
fill: customAttr.label.color,
|
|
||||||
fontSize: parseInt(customAttr.label.fontSize),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
} : false
|
} : false
|
||||||
|
labelPosition = customAttr.label.position;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -330,8 +323,16 @@ export default {
|
|||||||
|
|
||||||
names.push(t.name);
|
names.push(t.name);
|
||||||
|
|
||||||
|
const _chartType = this.getChartType(yaxisList[_index].chartType);
|
||||||
|
|
||||||
|
if (_chartType === "column") {
|
||||||
|
_labelSetting.position = labelPosition;
|
||||||
|
} else {
|
||||||
|
_labelSetting.position = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: this.getChartType(yaxisList[_index].chartType),
|
type: _chartType,
|
||||||
name: t.name,
|
name: t.name,
|
||||||
options: {
|
options: {
|
||||||
data: _.map(t.data, (v) => {
|
data: _.map(t.data, (v) => {
|
||||||
@ -374,8 +375,17 @@ export default {
|
|||||||
|
|
||||||
names.push(t.name);
|
names.push(t.name);
|
||||||
|
|
||||||
|
|
||||||
|
const _chartType = this.getChartType(yaxisExtList[_index].chartType);
|
||||||
|
|
||||||
|
if (_chartType === "column") {
|
||||||
|
_labelSetting.position = labelPosition;
|
||||||
|
} else {
|
||||||
|
_labelSetting.position = undefined;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
type: this.getChartType(yaxisExtList[_index].chartType),
|
type: _chartType,
|
||||||
name: t.name,
|
name: t.name,
|
||||||
options: {
|
options: {
|
||||||
data: _.map(t.data, (v) => {
|
data: _.map(t.data, (v) => {
|
||||||
@ -444,7 +454,6 @@ export default {
|
|||||||
item.value = valueFormatter(item.data.value, yaxisExtList[item.data.i].formatterCfg)
|
item.value = valueFormatter(item.data.value, yaxisExtList[item.data.i].formatterCfg)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(originalItems)
|
|
||||||
return _.filter(originalItems, (item) => {
|
return _.filter(originalItems, (item) => {
|
||||||
const v = item.data.key;
|
const v = item.data.key;
|
||||||
if (item.title === v && item.title === item.value && item.name === "key" || !names.includes(item.name)) {
|
if (item.title === v && item.title === item.value && item.name === "key" || !names.includes(item.name)) {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package io.dataease.plugins.view.official.handler;
|
package io.dataease.plugins.view.official.handler;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
import io.dataease.plugins.common.constants.datasource.SQLConstants;
|
||||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||||
import io.dataease.plugins.common.util.ConstantsUtil;
|
import io.dataease.plugins.common.util.ConstantsUtil;
|
||||||
@ -21,7 +20,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class DefaultViewStatHandler implements PluginViewStatHandler {
|
public class RaceBarViewStatHandler implements PluginViewStatHandler {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {
|
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {
|
@ -1,11 +1,10 @@
|
|||||||
package io.dataease.plugins.view.official.impl;
|
package io.dataease.plugins.view.official.impl;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
|
||||||
import io.dataease.plugins.common.dto.StaticResource;
|
import io.dataease.plugins.common.dto.StaticResource;
|
||||||
import io.dataease.plugins.view.entity.PluginViewField;
|
import io.dataease.plugins.view.entity.PluginViewField;
|
||||||
import io.dataease.plugins.view.entity.PluginViewParam;
|
import io.dataease.plugins.view.entity.PluginViewParam;
|
||||||
import io.dataease.plugins.view.entity.PluginViewType;
|
import io.dataease.plugins.view.entity.PluginViewType;
|
||||||
import io.dataease.plugins.view.official.handler.DefaultViewStatHandler;
|
import io.dataease.plugins.view.official.handler.RaceBarViewStatHandler;
|
||||||
import io.dataease.plugins.view.service.ViewPluginService;
|
import io.dataease.plugins.view.service.ViewPluginService;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
@ -107,7 +106,7 @@ public class RaceBarService extends ViewPluginService {
|
|||||||
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis) || xAxis.size() < 2) {
|
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis) || xAxis.size() < 2) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String sql = new DefaultViewStatHandler().build(param, this);
|
String sql = new RaceBarViewStatHandler().build(param, this);
|
||||||
return sql;
|
return sql;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="width: 100%;">
|
<div style="width: 100%;">
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-form v-show="chart.type" ref="labelForm" :model="labelForm" label-width="80px" size="mini">
|
<el-form v-show="chart.type" ref="labelForm" :model="labelForm" label-width="80px" size="mini" :rules="rules">
|
||||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||||
<el-checkbox v-model="labelForm.show" @change="changeAttr">{{ $t('chart.show') }}</el-checkbox>
|
<el-checkbox v-model="labelForm.show" @change="changeAttr">{{ $t('chart.show') }}</el-checkbox>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -29,30 +29,58 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item
|
||||||
|
:label="$t('chart.margin_model')"
|
||||||
|
class="form-item"
|
||||||
|
>
|
||||||
|
<el-radio-group
|
||||||
|
v-model="labelForm.marginModel"
|
||||||
|
size="mini"
|
||||||
|
@change="changeMarginStyle(labelForm.marginModel, 'marginModel')"
|
||||||
|
>
|
||||||
|
<el-radio-button label="absolute">{{ $t('chart.margin_model_absolute') }}</el-radio-button>
|
||||||
|
<el-radio-button label="relative">{{ $t('chart.margin_model_relative') }}</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('chart.text_pos_bottom')"
|
:label="$t('chart.text_pos_bottom')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
prop="marginBottom"
|
prop="bottom"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="labelForm.bottom"
|
v-model="labelForm.bottom"
|
||||||
type="number"
|
type="number"
|
||||||
class="hide-icon-number"
|
class="hide-icon-number"
|
||||||
@change="changeAttr"
|
@change="changeAttr"
|
||||||
/>
|
>
|
||||||
|
<template
|
||||||
|
v-if="unitSuffix"
|
||||||
|
slot="append"
|
||||||
|
>
|
||||||
|
{{ unitSuffix }}
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item
|
<el-form-item
|
||||||
:label="$t('chart.text_pos_right')"
|
:label="$t('chart.text_pos_right')"
|
||||||
class="form-item"
|
class="form-item"
|
||||||
prop="marginRight"
|
prop="right"
|
||||||
>
|
>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="labelForm.right"
|
v-model="labelForm.right"
|
||||||
type="number"
|
type="number"
|
||||||
class="hide-icon-number"
|
class="hide-icon-number"
|
||||||
@change="changeAttr"
|
@change="changeAttr"
|
||||||
/>
|
>
|
||||||
|
<template
|
||||||
|
v-if="unitSuffix"
|
||||||
|
slot="append"
|
||||||
|
>
|
||||||
|
{{ unitSuffix }}
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -62,7 +90,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {DEFAULT_Graphic, COLOR_PANEL} from '../../utils/map'
|
import {DEFAULT_Graphic, COLOR_PANEL, getMarginUnit} from '../../utils/map'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SliderSetting',
|
name: 'SliderSetting',
|
||||||
@ -76,12 +104,25 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
unitSuffix() {
|
||||||
|
return getMarginUnit(this.labelForm)
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
labelForm: JSON.parse(JSON.stringify(DEFAULT_Graphic)),
|
labelForm: JSON.parse(JSON.stringify(DEFAULT_Graphic)),
|
||||||
isSetting: false,
|
isSetting: false,
|
||||||
predefineColors: COLOR_PANEL,
|
predefineColors: COLOR_PANEL,
|
||||||
fontSize: [],
|
fontSize: [],
|
||||||
|
rules: {
|
||||||
|
bottom: [
|
||||||
|
{validator: this.validateMarginNumber, trigger: ['blur', 'change']}
|
||||||
|
],
|
||||||
|
right: [
|
||||||
|
{validator: this.validateMarginNumber, trigger: ['blur', 'change']}
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -129,6 +170,35 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$emit('onChange', this.labelForm)
|
this.$emit('onChange', this.labelForm)
|
||||||
},
|
},
|
||||||
|
changeMarginStyle(value, modifyName) {
|
||||||
|
if (modifyName === 'marginModel') {
|
||||||
|
if (value === 'absolute') {
|
||||||
|
this.labelForm.bottom = JSON.parse(JSON.stringify(DEFAULT_Graphic)).bottom
|
||||||
|
this.labelForm.right = JSON.parse(JSON.stringify(DEFAULT_Graphic)).right
|
||||||
|
}
|
||||||
|
if (value === 'relative') {
|
||||||
|
this.labelForm.bottom = 15
|
||||||
|
this.labelForm.right = 5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.labelForm['modifyName'] = modifyName
|
||||||
|
this.changeAttr()
|
||||||
|
},
|
||||||
|
validateMarginNumber(rule, value, callBack) {
|
||||||
|
if (value == null || value === '') {
|
||||||
|
callBack()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.labelForm.marginModel === 'absolute' && (value < 0 || value > 200)) {
|
||||||
|
callBack(new Error(this.$t('chart.margin_placeholder')))
|
||||||
|
this.labelForm[rule.field] = 0
|
||||||
|
} else if (this.labelForm.marginModel === 'relative' && (value < 0 || value > 50)) {
|
||||||
|
callBack(new Error(this.$t('chart.margin_absolute_placeholder')))
|
||||||
|
this.labelForm[rule.field] = 0
|
||||||
|
} else {
|
||||||
|
callBack()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,24 +1,65 @@
|
|||||||
<template>
|
<template>
|
||||||
<span style="position: relative;display: inline-block;">
|
<span style="position: relative;display: inline-block;">
|
||||||
<i class="el-icon-arrow-down el-icon-delete" style="position: absolute;top: 6px;right: 24px;color: #878d9f;cursor: pointer;z-index: 1;" @click="removeItem" />
|
<i
|
||||||
<el-dropdown trigger="click" size="mini" @command="clickItem">
|
class="el-icon-arrow-down el-icon-delete"
|
||||||
|
style="position: absolute;top: 6px;right: 24px;color: #878d9f;cursor: pointer;z-index: 1;"
|
||||||
|
@click="removeItem"
|
||||||
|
/>
|
||||||
|
<el-dropdown
|
||||||
|
trigger="click"
|
||||||
|
size="mini"
|
||||||
|
@command="clickItem"
|
||||||
|
>
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<el-tag size="small" class="item-axis" :type="tagType">
|
<el-tag
|
||||||
|
size="small"
|
||||||
|
class="item-axis"
|
||||||
|
:type="tagType"
|
||||||
|
>
|
||||||
<span style="float: left">
|
<span style="float: left">
|
||||||
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
<svg-icon
|
||||||
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
v-if="item.deType === 0"
|
||||||
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
|
icon-class="field_text"
|
||||||
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
class="field-icon-text"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 1"
|
||||||
|
icon-class="field_time"
|
||||||
|
class="field-icon-time"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 2 || item.deType === 3"
|
||||||
|
icon-class="field_value"
|
||||||
|
class="field-icon-value"
|
||||||
|
/>
|
||||||
|
<svg-icon
|
||||||
|
v-if="item.deType === 5"
|
||||||
|
icon-class="field_location"
|
||||||
|
class="field-icon-location"
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
<span class="item-span-style" :title="item.name">{{ item.name }}</span>
|
<span
|
||||||
<field-error-tips v-if="tagType === 'danger'" />
|
class="item-span-style"
|
||||||
<i class="el-icon-arrow-down el-icon--right" style="position: absolute;top: 6px;right: 10px;" />
|
:title="item.name"
|
||||||
|
>{{ item.name }}</span>
|
||||||
|
<field-error-tips v-if="tagType === 'danger'"/>
|
||||||
|
<i
|
||||||
|
class="el-icon-arrow-down el-icon--right"
|
||||||
|
style="position: absolute;top: 6px;right: 10px;"
|
||||||
|
/>
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-dropdown-menu slot="dropdown">
|
<el-dropdown-menu slot="dropdown">
|
||||||
<el-dropdown-item icon="el-icon-files" :command="beforeClickItem('filter')">
|
<el-dropdown-item
|
||||||
|
icon="el-icon-files"
|
||||||
|
:command="beforeClickItem('filter')"
|
||||||
|
>
|
||||||
<span>{{ $t('chart.filter') }}...</span>
|
<span>{{ $t('chart.filter') }}...</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item icon="el-icon-delete" divided :command="beforeClickItem('remove')">
|
<el-dropdown-item
|
||||||
|
icon="el-icon-delete"
|
||||||
|
divided
|
||||||
|
:command="beforeClickItem('remove')"
|
||||||
|
>
|
||||||
<span>{{ $t('chart.delete') }}</span>
|
<span>{{ $t('chart.delete') }}</span>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
@ -28,11 +69,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getItemType } from './utils'
|
import {getItemType} from './utils'
|
||||||
import FieldErrorTips from './FieldErrorTips'
|
import FieldErrorTips from './FieldErrorTips'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FilterItem',
|
name: 'FilterItem',
|
||||||
components: { FieldErrorTips },
|
components: {FieldErrorTips},
|
||||||
props: {
|
props: {
|
||||||
param: {
|
param: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -53,25 +95,34 @@ export default {
|
|||||||
quotaData: {
|
quotaData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
}
|
},
|
||||||
|
bus: {
|
||||||
|
type: Object,
|
||||||
|
required: false,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tagType: 'success'
|
tagType: 'success'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
dimensionData: function() {
|
dimensionData: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
},
|
},
|
||||||
quotaData: function() {
|
quotaData: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
},
|
},
|
||||||
item: function() {
|
item: function () {
|
||||||
this.getItemTagType()
|
this.getItemTagType()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.bus.$on('reset-change-table', this.getItemTagType)
|
||||||
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
this.bus.$off('reset-change-table', this.getItemTagType)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickItem(param) {
|
clickItem(param) {
|
||||||
@ -110,45 +161,45 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.item-axis {
|
.item-axis {
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
margin: 0 3px 2px 3px;
|
margin: 0 3px 2px 3px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
display: flex;
|
display: flex;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 159px;
|
width: 159px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-axis:hover {
|
.item-axis:hover {
|
||||||
background-color: #fdfdfd;
|
background-color: #fdfdfd;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-span{
|
.summary-span {
|
||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
color: #878d9f;;
|
color: #878d9f;;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inner-dropdown-menu{
|
.inner-dropdown-menu {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%
|
width: 100%
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-span-style{
|
.item-span-style {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
width: 115px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -87,6 +87,7 @@ export const DEFAULT_SLIDER = {
|
|||||||
export const DEFAULT_Graphic = {
|
export const DEFAULT_Graphic = {
|
||||||
show: true,
|
show: true,
|
||||||
fontSize: '60',
|
fontSize: '60',
|
||||||
|
marginModel: 'absolute',
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
alpha: 25,
|
alpha: 25,
|
||||||
bottom: 90,
|
bottom: 90,
|
||||||
@ -842,7 +843,7 @@ const hexToRgba = (hex, opacity) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const getMarginUnit = marginForm => {
|
export const getMarginUnit = marginForm => {
|
||||||
if (!marginForm.marginModel || marginForm.marginModel === 'auto') return null
|
if (!marginForm || !marginForm.marginModel || marginForm.marginModel === 'auto') return null
|
||||||
if (marginForm.marginModel === 'absolute') return 'px'
|
if (marginForm.marginModel === 'absolute') return 'px'
|
||||||
if (marginForm.marginModel === 'relative') return '%'
|
if (marginForm.marginModel === 'relative') return '%'
|
||||||
return null
|
return null
|
||||||
|
@ -9,18 +9,18 @@
|
|||||||
@add="addXaxis" @update="calcData(true)">
|
@add="addXaxis" @update="calcData(true)">
|
||||||
<transition-group class="draggable-group">
|
<transition-group class="draggable-group">
|
||||||
<dimension-item v-for="(item,index) in view.xaxis" :key="index"
|
<dimension-item v-for="(item,index) in view.xaxis" :key="index"
|
||||||
:param="param"
|
:param="param"
|
||||||
:index="0"
|
:index="0"
|
||||||
:item="item"
|
:item="item"
|
||||||
:dimension-data="dimension"
|
:dimension-data="dimension"
|
||||||
:quota-data="quotaData"
|
:quota-data="quotaData"
|
||||||
:chart="chart"
|
:chart="chart"
|
||||||
@onDimensionItemChange="dimensionItemChange"
|
@onDimensionItemChange="dimensionItemChange"
|
||||||
@onDimensionItemRemove="dimensionItemRemove"
|
@onDimensionItemRemove="dimensionItemRemove"
|
||||||
@editItemFilter="showDimensionEditFilter"
|
@editItemFilter="showDimensionEditFilter"
|
||||||
@onNameEdit="showRename"
|
@onNameEdit="showRename"
|
||||||
dimension-name="dimension"
|
dimension-name="dimension"
|
||||||
:bus="bus"
|
:bus="bus"
|
||||||
/>
|
/>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
</draggable>
|
</draggable>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
@add="addCustomFilter" @update="calcData(true)">
|
@add="addCustomFilter" @update="calcData(true)">
|
||||||
<transition-group class="draggable-group">
|
<transition-group class="draggable-group">
|
||||||
<filter-item v-for="(item,index) in view.customFilter" :key="item.id" :param="param" :index="index"
|
<filter-item v-for="(item,index) in view.customFilter" :key="item.id" :param="param" :index="index"
|
||||||
:item="item" :dimension-data="dimension" :quota-data="quota"
|
:item="item" :dimension-data="dimension" :quota-data="quota" :bus="bus"
|
||||||
@onFilterItemRemove="filterItemRemove"
|
@onFilterItemRemove="filterItemRemove"
|
||||||
@editItemFilter="showEditFilter"/>
|
@editItemFilter="showEditFilter"/>
|
||||||
</transition-group>
|
</transition-group>
|
||||||
@ -111,10 +111,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DimensionItem from '@/components/views/DimensionItem'
|
import DimensionItem from '../../../components/views/DimensionItem'
|
||||||
import DimensionExtItem from '@/components/views/DimensionExtItem'
|
import DimensionExtItem from '../../../components/views/DimensionExtItem'
|
||||||
import QuotaItem from '@/components/views/QuotaItem'
|
import QuotaItem from '../../../components/views/QuotaItem'
|
||||||
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 {
|
||||||
@ -176,11 +176,41 @@ export default {
|
|||||||
quotaData() {
|
quotaData() {
|
||||||
return this.obj.quotaData
|
return this.obj.quotaData
|
||||||
},
|
},
|
||||||
|
listenLists() {
|
||||||
|
if (!this.view) return [0, 0, 0];
|
||||||
|
return [
|
||||||
|
this.view.xaxis ? this.view.xaxis.length : 0,
|
||||||
|
this.view.xaxisExt ? this.view.xaxisExt.length : 0,
|
||||||
|
this.view.yaxis ? this.view.yaxis.length : 0
|
||||||
|
]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$emit('on-add-languages', messages)
|
this.$emit('on-add-languages', messages)
|
||||||
},
|
},
|
||||||
watch: {},
|
mounted() {
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
listenLists: function (val) {
|
||||||
|
if (this.listenLists[0] <= 1 && this.listenLists[1] <= 1 && this.listenLists[2] <= 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.view.xaxis.length > 1) {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
}
|
||||||
|
if (this.view.xaxisExt.length > 1) {
|
||||||
|
this.dragCheckType(this.view.xaxisExt, 'd')
|
||||||
|
this.view.xaxisExt = [this.view.xaxisExt[0]]
|
||||||
|
}
|
||||||
|
if (this.view.yaxis.length > 1) {
|
||||||
|
this.dragCheckType(this.view.yaxis, 'q')
|
||||||
|
this.view.yaxis = [this.view.yaxis[0]]
|
||||||
|
}
|
||||||
|
this.calcData(true)
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
executeAxios(url, type, data, callBack) {
|
executeAxios(url, type, data, callBack) {
|
||||||
const param = {
|
const param = {
|
||||||
@ -210,37 +240,39 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
addXaxis(e) {
|
addXaxis(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxis, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxis, e)
|
this.dragMoveDuplicate(this.view.xaxis, e)
|
||||||
if (this.view.xaxis.length > 1) {
|
if (this.view.xaxis.length > 1) {
|
||||||
this.view.xaxis = [this.view.xaxis[0]]
|
//this.view.xaxis = [this.view.xaxis[0]]
|
||||||
|
} else {
|
||||||
|
this.calcData(true)
|
||||||
}
|
}
|
||||||
this.calcData(true)
|
|
||||||
},
|
},
|
||||||
addXaxisExt(e) {
|
addXaxisExt(e) {
|
||||||
|
if (this.view.type !== 'table-info') {
|
||||||
|
this.dragCheckType(this.view.xaxisExt, 'd')
|
||||||
|
}
|
||||||
this.dragMoveDuplicate(this.view.xaxisExt, e)
|
this.dragMoveDuplicate(this.view.xaxisExt, e)
|
||||||
if (this.view.xaxisExt.length > 1) {
|
if (this.view.xaxisExt.length > 1) {
|
||||||
this.view.xaxisExt = [this.view.xaxisExt[0]]
|
//this.view.xaxisExt = [this.view.xaxisExt[0]]
|
||||||
|
} else {
|
||||||
|
this.calcData(true)
|
||||||
}
|
}
|
||||||
this.calcData(true)
|
|
||||||
},
|
},
|
||||||
addYaxis(e) {
|
addYaxis(e) {
|
||||||
this.dragCheckType(this.view.yaxis, 'q')
|
this.dragCheckType(this.view.yaxis, 'q')
|
||||||
this.dragMoveDuplicate(this.view.yaxis, e)
|
this.dragMoveDuplicate(this.view.yaxis, e)
|
||||||
if ( this.view.yaxis.length > 1) {
|
if (this.view.yaxis.length > 1) {
|
||||||
this.view.yaxis = [this.view.yaxis[0]]
|
//this.view.yaxis = [this.view.yaxis[0]]
|
||||||
|
} else {
|
||||||
|
this.calcData(true)
|
||||||
}
|
}
|
||||||
this.calcData(true)
|
|
||||||
},
|
|
||||||
addYaxisExt(e) {
|
|
||||||
this.dragCheckType(this.view.yaxisExt, 'q')
|
|
||||||
this.dragMoveDuplicate(this.view.yaxisExt, e)
|
|
||||||
/*if (equalsAny(this.view.type, 'map', 'bidirectional-bar') && this.view.yaxisExt.length > 1) {
|
|
||||||
this.view.yaxisExt = [this.view.yaxisExt[0]]
|
|
||||||
}*/
|
|
||||||
this.calcData(true)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
calcData(cache) {
|
calcData(cache) {
|
||||||
console.log(cache)
|
//console.log(cache)
|
||||||
//this.view.xaxis = [...this.source, ...this.target]
|
//this.view.xaxis = [...this.source, ...this.target]
|
||||||
|
|
||||||
this.$emit('plugin-call-back', {
|
this.$emit('plugin-call-back', {
|
||||||
|
@ -46,7 +46,7 @@ import {
|
|||||||
componentStyle,
|
componentStyle,
|
||||||
seniorCfg,
|
seniorCfg,
|
||||||
DEFAULT_SLIDER,
|
DEFAULT_SLIDER,
|
||||||
DEFAULT_Graphic,
|
DEFAULT_Graphic, getMarginUnit,
|
||||||
} from '../../../utils/map';
|
} from '../../../utils/map';
|
||||||
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
|
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
|
||||||
import {mapState} from 'vuex'
|
import {mapState} from 'vuex'
|
||||||
@ -554,17 +554,20 @@ export default {
|
|||||||
chart_option.graphic.elements[0].style.text = extX;
|
chart_option.graphic.elements[0].style.text = extX;
|
||||||
chart_option.graphic.elements[0].style.fill = hexColorToRGBA(DEFAULT_Graphic.color, DEFAULT_Graphic.alpha);
|
chart_option.graphic.elements[0].style.fill = hexColorToRGBA(DEFAULT_Graphic.color, DEFAULT_Graphic.alpha);
|
||||||
chart_option.graphic.elements[0].style.font = 'bolder ' + DEFAULT_Graphic.fontSize + 'px monospace';
|
chart_option.graphic.elements[0].style.font = 'bolder ' + DEFAULT_Graphic.fontSize + 'px monospace';
|
||||||
chart_option.graphic.elements[0].right = DEFAULT_Graphic.right;
|
chart_option.graphic.elements[0].right = DEFAULT_Graphic.right + 'px';
|
||||||
chart_option.graphic.elements[0].bottom = DEFAULT_Graphic.bottom;
|
chart_option.graphic.elements[0].bottom = DEFAULT_Graphic.bottom + 'px';
|
||||||
|
|
||||||
if (customAttr.graphic) {
|
if (customAttr.graphic) {
|
||||||
chart_option.graphic.elements[0].style.fill = hexColorToRGBA(customAttr.graphic.color, customAttr.graphic.alpha);
|
chart_option.graphic.elements[0].style.fill = hexColorToRGBA(customAttr.graphic.color, customAttr.graphic.alpha);
|
||||||
chart_option.graphic.elements[0].style.font = 'bolder ' + customAttr.graphic.fontSize + 'px monospace';
|
chart_option.graphic.elements[0].style.font = 'bolder ' + customAttr.graphic.fontSize + 'px monospace';
|
||||||
|
|
||||||
|
const unit = _.defaultTo(getMarginUnit(customAttr.graphic), '');
|
||||||
|
|
||||||
if (customAttr.graphic.right !== undefined) {
|
if (customAttr.graphic.right !== undefined) {
|
||||||
chart_option.graphic.elements[0].right = customAttr.graphic.right;
|
chart_option.graphic.elements[0].right = customAttr.graphic.right + unit;
|
||||||
}
|
}
|
||||||
if (customAttr.graphic.bottom !== undefined) {
|
if (customAttr.graphic.bottom !== undefined) {
|
||||||
chart_option.graphic.elements[0].bottom = customAttr.graphic.bottom;
|
chart_option.graphic.elements[0].bottom = customAttr.graphic.bottom + unit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -133,6 +133,12 @@ export default {
|
|||||||
},
|
},
|
||||||
linkageActiveParam: null,
|
linkageActiveParam: null,
|
||||||
linkageActiveHistory: false,
|
linkageActiveHistory: false,
|
||||||
|
CHART_CONT_FAMILY_MAP: {
|
||||||
|
'Microsoft YaHei': 'Microsoft YaHei',
|
||||||
|
'SimSun': 'SimSun, "Songti SC", STSong',
|
||||||
|
'SimHei': 'SimHei, Helvetica',
|
||||||
|
'KaiTi': 'KaiTi, "Kaiti SC", STKaiti'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -240,7 +246,7 @@ export default {
|
|||||||
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.fontSize = customStyle.text.isBolder ? 'bold' : 'normal'
|
||||||
|
|
||||||
this.titleClass.fontFamily = customStyle.text.fontFamily ? 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'
|
||||||
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
@ -249,23 +255,6 @@ export default {
|
|||||||
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (customStyle.text) {
|
|
||||||
this.title_show = customStyle.text.show
|
|
||||||
this.title_class.fontSize = customStyle.text.fontSize + 'px'
|
|
||||||
this.title_class.color = customStyle.text.color
|
|
||||||
this.title_class.textAlign = customStyle.text.hPosition
|
|
||||||
this.title_class.fontStyle = customStyle.text.isItalic ? 'italic' : 'normal'
|
|
||||||
this.title_class.fontWeight = customStyle.text.isBolder ? 'bold' : 'normal'
|
|
||||||
|
|
||||||
this.title_class.fontFamily = customStyle.text.fontFamily ? customStyle.text.fontFamily : DEFAULT_TITLE_STYLE.fontFamily
|
|
||||||
this.title_class.letterSpacing = (customStyle.text.letterSpace ? customStyle.text.letterSpace : DEFAULT_TITLE_STYLE.letterSpace) + 'px'
|
|
||||||
this.title_class.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
|
||||||
}
|
|
||||||
if (customStyle.background) {
|
|
||||||
this.title_class.background = hexColorToRGBA(customStyle.background.color, customStyle.background.alpha)
|
|
||||||
this.borderRadius = (customStyle.background.borderRadius || 0) + 'px'
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.initRemark()
|
this.initRemark()
|
||||||
},
|
},
|
||||||
|
@ -107,7 +107,13 @@
|
|||||||
content: ''
|
content: ''
|
||||||
},
|
},
|
||||||
buttonTextColor: null,
|
buttonTextColor: null,
|
||||||
loading: true
|
loading: true,
|
||||||
|
CHART_CONT_FAMILY_MAP: {
|
||||||
|
'Microsoft YaHei': 'Microsoft YaHei',
|
||||||
|
'SimSun': 'SimSun, "Songti SC", STSong',
|
||||||
|
'SimHei': 'SimHei, Helvetica',
|
||||||
|
'KaiTi': 'KaiTi, "Kaiti SC", STKaiti'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -175,7 +181,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
this.myChart.destroy()
|
this.myChart.destroy()
|
||||||
this.pointLayer.layerPickService.layer.textureService.destroy()
|
this.pointLayer.layerPickService.layer.textureService.destroy()
|
||||||
this.pointLayer.layerPickService.layer.textureService.rendererService.destroy()
|
this.pointLayer.layerPickService.layer.textureService.rendererService.destroy()
|
||||||
@ -200,7 +206,7 @@
|
|||||||
if (this.textLayer) {
|
if (this.textLayer) {
|
||||||
this.textLayer.configService.clean() // GlobalConfigService
|
this.textLayer.configService.clean() // GlobalConfigService
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.pointLayer) {
|
if (this.pointLayer) {
|
||||||
for (const key in this.pointLayer) {
|
for (const key in this.pointLayer) {
|
||||||
this.pointLayer[key] = null
|
this.pointLayer[key] = null
|
||||||
@ -574,7 +580,7 @@
|
|||||||
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.fontFamily = customStyle.text.fontFamily ? 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'
|
||||||
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
this.titleClass.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user