Merge branch 'dev' into pr@dev_refresh

This commit is contained in:
dataeaseShu 2023-09-07 14:31:47 +08:00
commit bb1df8a182
75 changed files with 4506 additions and 666 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,9 +4,9 @@ import java.util.List;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import groovy.lang.Lazy;
import io.dataease.auth.api.dto.CurrentRoleDto;
import io.dataease.auth.api.dto.CurrentUserDto;
import io.dataease.auth.entity.SysUserEntity;

View File

@ -116,7 +116,7 @@ public interface ParamConstants {
DS_CHECK_INTERVAL_TYPE("basic.dsCheckIntervalType"),
DEFAULT_LOGIN_TYPE("basic.loginType"),
OPEN_HOME_PAGE("ui.openHomePage"),
AUTO_MOBILE("ui.autoMobile"),
OPEN_MARKET_PAGE("ui.openMarketPage"),
TEMPLATE_MARKET_ULR("basic.templateMarketUlr"),

View File

@ -29,5 +29,7 @@ public class BasicInfo extends LoginLimitInfo implements Serializable {
private String dsCheckInterval;
@ApiModelProperty("数据源检测时间间隔类型")
private String dsCheckIntervalType;
@ApiModelProperty("自动识别移动端")
private String autoMobile = "true";
}

View File

@ -14,11 +14,19 @@ public class Db2Configuration extends JdbcConfiguration {
public String getJdbc() {
if(StringUtils.isEmpty(extraParams.trim())){
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()));
if (StringUtils.isEmpty(getSchema())) {
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().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 {
return "jdbc:hive2://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
.replace("HOSTNAME", getHost().trim())

View File

@ -1077,8 +1077,11 @@ public class DorisQueryProvider extends QueryProvider {
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
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);
if (request.getOperator().equals("between")) {
whereName = date;
if (field.getType().equalsIgnoreCase("YEAR") || StringUtils.equalsIgnoreCase(field.getDateFormat(), "%Y")) {
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 {
whereName = String.format(MySQLConstants.DATE_FORMAT, date, format);
}
@ -1126,10 +1129,14 @@ public class DorisQueryProvider extends QueryProvider {
whereName = "upper(" + whereName + ")";
} else if (StringUtils.containsIgnoreCase(request.getOperator(), "between")) {
if (request.getDatasetTableField().getDeType() == 1) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0))));
String endTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(1))));
whereValue = String.format(DorisConstants.WHERE_BETWEEN, startTime, endTime);
if (request.getDatasetTableField().getDeExtractType() == 1) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
String startTime = simpleDateFormat.format(new Date(Long.parseLong(value.get(0))));
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 {
whereValue = String.format(DorisConstants.WHERE_BETWEEN, value.get(0), value.get(1));
}

View File

@ -31,11 +31,9 @@ import org.stringtemplate.v4.STGroup;
import org.stringtemplate.v4.STGroupFile;
import javax.annotation.Resource;
import java.text.Format;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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() {
return JSONArray.parseArray("[\n" +
"{\"dateformat\": \"%Y%m%d\"},\n" +

View File

@ -1066,12 +1066,12 @@ public class MysqlQueryProvider extends QueryProvider {
String format = transDateFormat(request.getDateStyle(), request.getDatePattern());
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5 || field.getDeExtractType() == 1) {
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);
} else {
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";
} else {
if (StringUtils.equalsIgnoreCase(request.getDateStyle(), "y_Q")) {

View File

@ -211,7 +211,7 @@ public class ExtractDataService {
for (DatasetTableField oldField : oldFields) {
boolean delete = true;
for (DatasetTableField datasetTableField : datasetTableFields) {
if (oldField.getDataeaseName().equalsIgnoreCase(datasetTableField.getDataeaseName())) {
if (oldField.getDataeaseName().equalsIgnoreCase(datasetTableField.getDataeaseName()) && oldField.getType().equalsIgnoreCase(datasetTableField.getType())) {
delete = false;
}
}

View File

@ -62,9 +62,11 @@ public class SystemParameterService {
List<SystemParameter> homePageList = this.getParamList("ui.openHomePage");
List<SystemParameter> marketPageList = this.getParamList("ui.openMarketPage");
List<SystemParameter> loginLimitList = this.getParamList("loginlimit");
List<SystemParameter> autoMobileList = this.getParamList("ui.autoMobile");
paramList.addAll(homePageList);
paramList.addAll(marketPageList);
paramList.addAll(loginLimitList);
paramList.addAll(autoMobileList);
BasicInfo result = new BasicInfo();
result.setOpenHomePage("true");
Map<String, LoginLimitXpackService> beansOfType = SpringContextUtil.getApplicationContext().getBeansOfType((LoginLimitXpackService.class));
@ -92,6 +94,10 @@ public class SystemParameterService {
boolean open = StringUtils.equals("true", param.getParamValue());
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())) {
result.setTemplateMarketUlr(param.getParamValue());
}

View File

@ -47,7 +47,7 @@ ALTER TABLE `demo_stny_carbon_emission_trend` COMMENT = '官方示例模板数
ALTER TABLE `demo_stny_disposable_energy` COMMENT = '官方示例模板数据双碳及能源情况概览';
ALTER TABLE `demo_stny_energy_consumption_proportion` 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 `file_content` COMMENT = '文件内容表';
ALTER TABLE `file_metadata` COMMENT = '文件基础信息表';

View File

@ -2,6 +2,7 @@
<div
:style="getOutStyleDefault(config.style)"
class="component component-outer"
:class="{'component-active': filterActive}"
@click="handleClick"
@mousedown="elementMouseDown"
>
@ -75,19 +76,19 @@
</template>
<script>
import { getStyle } from '@/components/canvas/utils/style'
import {getStyle} from '@/components/canvas/utils/style'
import runAnimation from '@/components/canvas/utils/runAnimation'
import { mixins } from '@/components/canvas/utils/events'
import { mapState } from 'vuex'
import {mixins} from '@/components/canvas/utils/events'
import {mapState} from 'vuex'
import DeOutWidget from '@/components/dataease/DeOutWidget'
import EditBar from '@/components/canvas/components/editor/EditBar'
import MobileCheckBar from '@/components/canvas/components/editor/MobileCheckBar'
import CloseBar from '@/components/canvas/components/editor/CloseBar'
import { hexColorToRGBA } from '@/views/chart/chart/util'
import { imgUrlTrans } from '@/components/canvas/utils/utils'
import {hexColorToRGBA} from '@/views/chart/chart/util'
import {imgUrlTrans} from '@/components/canvas/utils/utils'
export default {
components: { CloseBar, MobileCheckBar, DeOutWidget, EditBar },
components: {CloseBar, MobileCheckBar, DeOutWidget, EditBar},
mixins: [mixins],
props: {
canvasId: {
@ -134,7 +135,7 @@ export default {
canvasStyleData: {
type: Object,
required: false,
default: function() {
default: function () {
return {}
}
},
@ -157,10 +158,13 @@ export default {
}
},
computed: {
filterActive() {
return this.curComponent && this.config.id === this.curComponent.id && this.config.type === 'custom'
},
chart() {
if (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
},
@ -320,7 +324,7 @@ export default {
e.stopPropagation()
const _this = this
setTimeout(() => {
_this.$store.commit('setCurComponent', { component: _this.config, index: _this.index })
_this.$store.commit('setCurComponent', {component: _this.config, index: _this.index})
}, 200)
},
showViewDetails(params) {
@ -354,12 +358,6 @@ export default {
.component {
position: absolute;
}
.component-outer {
transform: translate(0);
}
.component-outer:hover {
box-shadow: 0px 0px 3px #0a7be0;
}
.gap_class {
padding: 5px;
@ -374,7 +372,6 @@ export default {
.main_view {
position: relative;
background-size: 100% 100% !important;
z-index: 1;
}
.component {
@ -388,4 +385,12 @@ export default {
width: 100% !important;
height: 100% !important;
}
.component-outer {
transform: translate(0);
}
.component-active {
z-index: 1;
}
</style>

View File

@ -985,7 +985,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -575,7 +575,7 @@ export default {
.bar-main {
position: absolute;
float: right;
z-index: 2;
z-index: 10;
border-radius: 2px;
padding-left: 3px;
padding-right: 0px;

View File

@ -145,30 +145,32 @@
</template>
<script>
import { getStyle } from '@/components/canvas/utils/style'
import { mapState } from 'vuex'
import {getStyle} from '@/components/canvas/utils/style'
import {mapState} from 'vuex'
import ComponentWrapper from './ComponentWrapper'
import { changeStyleWithScale } from '@/components/canvas/utils/translate'
import { uuid } from 'vue-uuid'
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
import {changeStyleWithScale} from '@/components/canvas/utils/translate'
import {uuid} from 'vue-uuid'
import {deepCopy, imgUrlTrans} from '@/components/canvas/utils/utils'
import eventBus from '@/components/canvas/utils/eventBus'
import elementResizeDetectorMaker from 'element-resize-detector'
import CanvasOptBar from '@/components/canvas/components/editor/CanvasOptBar'
import bus from '@/utils/bus'
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
import { hasDataPermission } from '@/utils/permission'
import { activeWatermark } from '@/components/canvas/tools/watermark'
import { proxyUserLoginInfo, userLoginInfo } from '@/api/systemInfo/userLogin'
import {buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch} from '@/utils/conditionUtil'
import {hasDataPermission} from '@/utils/permission'
import {activeWatermark} from '@/components/canvas/tools/watermark'
import {proxyUserLoginInfo, userLoginInfo} from '@/api/systemInfo/userLogin'
import html2canvas from 'html2canvasde'
import { queryAll } from '@/api/panel/pdfTemplate'
import {queryAll} from '@/api/panel/pdfTemplate'
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 {hexColorToRGBA} from "@/views/chart/chart/util";
import {isMobile} from '@/utils/index'
const erd = elementResizeDetectorMaker()
export default {
components: { UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport },
components: {UserViewDialog, ComponentWrapper, CanvasOptBar, PDFPreExport},
model: {
prop: 'show',
event: 'change'
@ -205,14 +207,14 @@ export default {
componentData: {
type: Array,
required: false,
default: function() {
default: function () {
return []
}
},
canvasStyleData: {
type: Object,
required: false,
default: function() {
default: function () {
return {}
}
},
@ -344,7 +346,7 @@ export default {
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
}
} 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 = {
background: colorRGBA
}
@ -623,9 +625,8 @@ export default {
return -1
},
_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 = 'mobile'
},
canvasStyleDataInit() {
//
@ -648,7 +649,7 @@ export default {
},
clearAllLinkage() {
this.$store.commit('clearPanelLinkageInfo')
bus.$emit('clear_panel_linkage', { viewId: 'all' })
bus.$emit('clear_panel_linkage', {viewId: 'all'})
},
changeStyleWithScale,
getStyle,
@ -707,13 +708,13 @@ export default {
},
exportViewImg() {
this.imageDownloading = true
this.$refs['userViewDialog-canvas-main'].exportViewImg(()=>{
this.$refs['userViewDialog-canvas-main'].exportViewImg(() => {
this.imageDownloading = false
})
},
deselectCurComponent(e) {
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']) {
this.$refs['canvas-opt-bar'].setWidgetStatus()
}

View File

@ -67,6 +67,7 @@
:scale="scale"
:theme-style="element.commonBackground"
:active="active"
:in-screen="inScreen"
@onChartClick="chartClick"
@onJumpClick="jumpClick"
/>

View File

@ -144,7 +144,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -102,7 +102,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -27,6 +27,10 @@ export default {
type: Boolean,
default: true
},
canvasStyleData:{
type: Object,
default: {}
},
size: String
},
@ -45,10 +49,7 @@ export default {
}
}
return false
},
...mapState([
'canvasStyleData'
])
}
},
created() {

View File

@ -27,6 +27,10 @@ export default {
type: Boolean,
default: true
},
canvasStyleData:{
type: Object,
default: {}
},
size: String
},
data() {
@ -44,11 +48,7 @@ export default {
}
}
return false
},
...mapState([
'canvasStyleData'
])
}
},
created() {
},

View File

@ -669,7 +669,7 @@ export default {
input_phone: 'Please enter the phone number',
input_roles: 'Please select role',
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',
mobile_number_format_is_incorrect: 'Incorrect format of mobile phone number',
email_format_is_incorrect: 'The mailbox format is incorrect',
@ -1466,6 +1466,7 @@ export default {
dimension_text_style: 'Name Style',
dimension_letter_space: 'Name Letter Space',
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',
font_shadow: 'Font Shadow',
chart_area: 'Area',
@ -2412,6 +2413,7 @@ export default {
themeDark: 'Dark',
themeCustom: 'Custom',
openHomePage: 'Show Home Page',
auto_identify_mobile_devices: 'Automatically identify mobile devices',
openMarketPage: 'Show Market Page',
mobileBG: 'Mobile Login page BG',
helpLink: 'Help Document Link',
@ -2853,7 +2855,8 @@ export default {
geo_json: 'Geo Json',
fileplaceholder: 'Please upload the JSON format coordinate file',
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: 'Map',

View File

@ -669,7 +669,7 @@ export default {
input_roles: '請選擇角色',
select_users: '請選擇用戶',
select_gender: '請選擇性別',
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头',
user_name_pattern_error: 'ID只能包含字母數字以及._-並以字母或數字開頭',
special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手機號碼格式不正確',
email_format_is_incorrect: '郵箱格式不正確',
@ -1465,6 +1465,7 @@ export default {
dimension_text_style: '名稱樣式',
dimension_letter_space: '名稱字間距',
font_family: '字體',
font_family_tip: '只有操作系統上已安裝該字體才能生效',
letter_space: '字間距',
font_shadow: '字體陰影',
chart_area: '面積圖',
@ -2406,6 +2407,7 @@ export default {
themeDark: '深色',
themeCustom: '自定義',
openHomePage: '顯示首頁',
auto_identify_mobile_devices: '自動識別移動設備',
openMarketPage: '顯示模板市場',
mobileBG: '移動端登錄頁背景',
helpLink: '幫助文檔鏈接',
@ -2847,7 +2849,8 @@ export default {
geo_json: '坐標文件',
fileplaceholder: '請上傳json格式坐標文件',
delete_confirm: '及子節點都會被刪除,確認執行?',
cur_node: '當前節點'
cur_node: '當前節點',
prohibit_prompts: '000、156分別是地球村和中華人民共和國區域代碼前綴禁止移除請使用其他代碼前綴'
},
map_mapping: {
map: '圖形',

View File

@ -668,7 +668,7 @@ export default {
input_roles: '请选择角色',
select_users: '请选择用户',
select_gender: '请选择性别',
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母开头!',
user_name_pattern_error: 'ID只能包含字母数字以及._-并以字母或数字开头!',
special_characters_are_not_supported: '不支持特殊字符',
mobile_number_format_is_incorrect: '手机号码格式不正确',
email_format_is_incorrect: '邮箱格式不正确',
@ -1464,6 +1464,7 @@ export default {
dimension_text_style: '名称样式',
dimension_letter_space: '名称字间距',
font_family: '字体',
font_family_tip: '只有操作系统上已安装该字体才能生效',
letter_space: '字间距',
font_shadow: '字体阴影',
chart_area: '面积图',
@ -2406,6 +2407,7 @@ export default {
themeDark: '深色',
themeCustom: '自定义',
openHomePage: '显示首页',
auto_identify_mobile_devices: '自动识别移动设备',
openMarketPage: '显示模板市场',
mobileBG: '移动端登录页背景',
helpLink: '帮助文档链接',
@ -2847,7 +2849,8 @@ export default {
geo_json: '坐标文件',
fileplaceholder: '请上传json格式坐标文件',
delete_confirm: '及子节点都会被删除,确认执行?',
cur_node: '当前节点'
cur_node: '当前节点',
prohibit_prompts: '000、156分别是地球村和中华人民共和国区域代码前缀禁止移除请使用其他代码前缀'
},
map_mapping: {
map: '图形',

View File

@ -5,6 +5,7 @@ import { seizeLogin } from '@/api/user'
import router from '@/router'
import store from '@/store'
import { Loading } from 'element-ui'
import { getSysUI } from '@/utils/auth'
export function timeSection(date, type, labelFormat = 'yyyy-MM-dd') {
if (!date) {
return null
@ -308,6 +309,10 @@ export function getQueryVariable(variable) {
}
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)
return flag
}

View File

@ -228,7 +228,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -291,7 +291,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -1146,6 +1146,13 @@ export const CHART_FONT_FAMILY = [
{ 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 = [
{ name: '0px', value: '0' },
{ name: '1px', value: '1' },

View File

@ -141,6 +141,11 @@ export function getLabel(chart) {
if (l.position === 'inner') {
label.offset = -10
}
} else if (chart.type.includes('bar')) {
label = {
layout: [{ type: 'limit-in-canvas' }],
position: l.position
}
} else {
label = {
position: l.position

View File

@ -297,7 +297,7 @@ export const TYPE_CONFIGS = [
'gaugeStartAngle',
'gaugeEndAngle',
'gaugeTickCount',
'gaugeAxisLabel'
'gaugeAxisLine'
],
'label-selector-ant-v': [
'labelGauge'
@ -2160,7 +2160,7 @@ export const TYPE_CONFIGS = [
'gaugeMax',
'gaugeStartAngle',
'gaugeEndAngle',
'gaugeAxisLabel'
'gaugeAxisLine'
],
'label-selector': [
'show',

View File

@ -65,6 +65,11 @@ export default {
MapController
},
props: {
inScreen: {
type: Boolean,
required: false,
default: true
},
active: {
type: Boolean,
required: false,
@ -292,6 +297,7 @@ export default {
this.myChart = this.$echarts.init(document.getElementById(this.chartId))
}
this.drawEcharts()
this.myChart.off('click')
this.myChart.on('click', function(param) {
that.pointParam = param
if (that.linkageActiveParam) {
@ -408,7 +414,7 @@ export default {
chart_option.legend['pageIconInactiveColor'] = '#8c8c8c'
}
}
if (chart_option.tooltip) {
if (chart_option.tooltip && this.inScreen) {
chart_option.tooltip.appendToBody = true
}
this.myEcharts(chart_option)
@ -493,12 +499,6 @@ export default {
trackClick(trackAction) {
const param = this.pointParam
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
}
const quotaList = this.pointParam.data.quotaList

View File

@ -55,7 +55,7 @@ import { baseRadarOptionAntV } from '@/views/chart/chart/radar/radar_antv'
import { baseWaterfallOptionAntV } from '@/views/chart/chart/waterfall/waterfall'
import { baseWordCloudOptionAntV } from '@/views/chart/chart/wordCloud/word_cloud'
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 ChartTitleUpdate from './ChartTitleUpdate.vue'
import { equalsAny } from '@/utils/StringUtils'
@ -429,7 +429,7 @@ export default {
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.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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}

View File

@ -97,7 +97,7 @@ import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
import { getRemark, hexColorToRGBA } from '@/views/chart/chart/util'
import { baseTableInfo, baseTableNormal, baseTablePivot } from '@/views/chart/chart/table/table-info'
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 { mapState } from 'vuex'
import DePagination from '@/components/deCustomCm/pagination.js'
@ -431,6 +431,7 @@ export default {
}
switch (trackAction) {
case 'drill':
this.currentPage.page = 1
this.$emit('onChartClick', this.pointParam)
break
case 'linkage':
@ -459,7 +460,7 @@ export default {
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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
//

View File

@ -50,6 +50,20 @@
:value="option.value"
/>
</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
v-show="showProperty('fontSize')"

View File

@ -51,6 +51,20 @@
:value="option.value"
/>
</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
v-show="showProperty('fontSize')"

View File

@ -99,7 +99,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -134,7 +134,15 @@
</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')">{{ $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>
@ -223,6 +231,10 @@ export default {
type: Object,
required: true
},
chart: {
type: Object,
required: true
},
index: {
type: Number,
required: true
@ -245,6 +257,14 @@ export default {
tagType: 'success'
}
},
computed: {
showDateExt() {
return this.chart.datasourceType === 'mysql' ||
this.chart.datasourceType === 'ds_doris' ||
this.chart.datasourceType === 'StarRocks' ||
this.chart.datasetMode === 1
}
},
watch: {
dimensionData: function() {
this.getItemTagType()

View File

@ -298,7 +298,7 @@ export default {
},
getDateExtStatus() {
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 === 'StarRocks' ||
this.chart.datasetMode === 1

View File

@ -275,6 +275,11 @@ export default {
this.logic = this.item.logic
this.filterType = this.item.filterType
this.enumCheckField = this.item.enumCheckField
// init enum option
if (this.item.filterType === 'enum' && this.needRequestEnum) {
this.initEnumOptions()
}
},
initEnumOptions() {
//

View File

@ -49,7 +49,7 @@ import { getRemark, hexColorToRGBA } from '../../chart/util'
import eventBus from '@/components/canvas/utils/eventBus'
import { formatterItem, valueFormatter } from '@/views/chart/chart/formatter'
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'
export default {
@ -209,7 +209,7 @@ export default {
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.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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}

View File

@ -61,7 +61,7 @@ import { getRemark, hexColorToRGBA } from '../../chart/util'
import eventBus from '@/components/canvas/utils/eventBus'
import ViewTrackBar from '@/components/canvas/components/editor/ViewTrackBar'
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'
export default {
@ -236,7 +236,7 @@ export default {
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.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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}

View File

@ -477,13 +477,13 @@
/>
</el-form-item>
<el-form-item
v-show="showProperty('gaugeAxisLabel')"
v-show="showProperty('gaugeAxisLine')"
:label="$t('chart.gauge_axis_label')"
class="form-item"
>
<el-checkbox
v-model="sizeForm.gaugeAxisLine"
@change="changeBarSizeCase('gaugeAxisLabel')"
@change="changeBarSizeCase('gaugeAxisLine')"
/>
</el-form-item>
<!--gauge-end-->

View File

@ -522,243 +522,245 @@
label-width="100px"
size="mini"
>
<el-form-item
v-show="showProperty('gaugeMin')"
:label="$t('chart.min')"
class="form-item"
>
<el-radio-group
v-model="sizeForm.gaugeMinType"
size="mini"
@change="changeQuotaField('min')"
<div v-show="!batchOptStatus">
<el-form-item
v-show="showProperty('gaugeMin')"
:label="$t('chart.min')"
class="form-item"
>
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<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"
<el-radio-group
v-model="sizeForm.gaugeMinType"
size="mini"
@change="changeQuotaField('min')"
>
<span style="float: left">
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span 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-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="showProperty('gaugeMin') && sizeForm.gaugeMinType === 'fix'"
class="form-item form-item-slider"
>
<el-option
v-if="validMinField"
key="sum"
value="sum"
:label="$t('chart.sum')"
<el-input-number
v-model="sizeForm.gaugeMin"
size="mini"
@change="changeBarSizeCase('gaugeMin')"
/>
<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-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">
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span 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
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
v-show="showProperty('gaugeMax')"
:label="$t('chart.max')"
class="form-item"
>
<el-radio-group
v-model="sizeForm.gaugeMaxType"
size="mini"
@change="changeQuotaField('max')"
<el-form-item
v-show="showProperty('gaugeMax')"
:label="$t('chart.max')"
class="form-item"
>
<el-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<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"
<el-radio-group
v-model="sizeForm.gaugeMaxType"
size="mini"
@change="changeQuotaField('max')"
>
<span style="float: left">
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span 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-radio-button label="fix">{{ $t('chart.fix') }}</el-radio-button>
<el-radio-button label="dynamic">{{ $t('chart.dynamic') }}</el-radio-button>
</el-radio-group>
</el-form-item>
<el-form-item
v-if="showProperty('gaugeMax') && sizeForm.gaugeMaxType === 'fix'"
class="form-item form-item-slider"
>
<el-option
v-if="validMaxField"
key="sum"
value="sum"
:label="$t('chart.sum')"
<el-input-number
v-model="sizeForm.gaugeMax"
size="mini"
@change="changeBarSizeCase('gaugeMax')"
/>
<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>
</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">
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span 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
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
v-show="showProperty('gaugeStartAngle')"
@ -791,13 +793,13 @@
/>
</el-form-item>
<el-form-item
v-show="showProperty('gaugeAxisLabel')"
:label="$t('chart.gauge_axis_label')"
class="form-item"
v-show="showProperty('gaugeAxisLine')"
:label="$t('chart.gauge_axis_label')"
class="form-item"
>
<el-checkbox
v-model="sizeForm.gaugeAxisLine"
@change="changeBarSizeCase('gaugeAxisLabel')"
v-model="sizeForm.gaugeAxisLine"
@change="changeBarSizeCase('gaugeAxisLine')"
/>
</el-form-item>
<!-- <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
v-show="showProperty('wordSizeRange') "
:label="$t('chart.word_size_range')"
class="form-item form-item-slider"
class="form-item form-item-slider form-item-range-slider"
>
<el-slider
v-model="sizeForm.wordSizeRange"
@ -1386,6 +1388,9 @@
>
<el-slider
v-model="sizeForm.wordSpacing"
show-input
:show-input-controls="false"
input-size="mini"
:min="0"
:max="20"
@change="changeBarSizeCase('wordSpacing')"
@ -1402,6 +1407,7 @@
<script>
import { CHART_FONT_FAMILY, CHART_FONT_LETTER_SPACE, DEFAULT_SIZE } from '../../chart/chart'
import { equalsAny } from '@/utils/StringUtils'
import { mapState } from 'vuex'
export default {
name: 'SizeSelectorAntV',
@ -1490,7 +1496,8 @@ export default {
return customAttr.color.mapLineGradient && equalsAny(this.sizeForm.mapLineType, 'line', 'arc')
}
return false
}
},
...mapState(['batchOptStatus'])
},
watch: {
'chart': {
@ -1750,6 +1757,10 @@ export default {
line-height: 38px;
}
.form-item-range-slider ::v-deep .el-form-item__content {
padding-right: 6px
}
.form-item ::v-deep .el-form-item__label {
font-size: 12px;
}

View File

@ -863,6 +863,7 @@
:param="param"
:index="index"
:item="item"
:chart="chart"
:dimension-data="dimension"
:quota-data="quota"
@onItemChange="stackItemChange"

View File

@ -82,7 +82,7 @@ export default {
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
}
} 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 = {
background: colorRGBA
}

View File

@ -723,7 +723,7 @@ export default {
background: `url(${imgUrlTrans(styleInfo.imageUrl)}) no-repeat`
}
} 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 = {
background: colorRGBA
}
@ -747,7 +747,7 @@ export default {
...style
}
} 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 = {
background: colorRGBA,
...style

View File

@ -207,6 +207,24 @@
>{{ $t("commons.no") }}</el-radio>
</el-radio-group>
</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>
</div>
</template>
@ -412,6 +430,12 @@ export default {
type: 'text',
sort: 14
},
{
paramKey: 'ui.autoMobile',
paramValue: this.formInline.autoMobile,
type: 'text',
sort: 15
},
{
paramKey: 'loginlimit.limitTimes',

View File

@ -100,7 +100,7 @@ export default {
label: 'name',
value: 'id'
},
expandedKeys: []
expandedKeys: ['000000000']
}
},
watch: {

View File

@ -2,12 +2,20 @@
<de-container
v-loading="$store.getters.loadingMap[$store.getters.currentPath]"
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
type="mapset"
style="height: 100%;"
class="map-setting-aside"
>
<map-setting-left
ref="map_setting_tree"
@ -18,7 +26,9 @@
/>
</de-aside-container>
<de-main-container style="height: 100%;">
<de-main-container
class="map-setting-main"
>
<map-setting-right
ref="map_setting_form"
:tree-data="treeData"
@ -83,5 +93,17 @@ export default {
padding: 24px;
width: 100%;
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>

View File

@ -50,16 +50,14 @@
class="tabs-container"
:class="[activeName !== 'eight' ? 'is-center' : 'pad-center']"
>
<div class="min-w600">
<div :class="activeName === 'ten' ? 'max-w600' : 'min-w600'">
<basic-setting
v-if="activeName === 'zero'"
:is-plugin-loaded="isPluginLoaded"
/>
<email-setting v-if="activeName === 'first'" />
<map-setting
v-if="activeName === 'ten'"
ref="mapSetting"
/>
<map-setting v-if="activeName === 'ten'" />
<simple-mode v-if="activeName === 'six'" />
<cluster-mode v-if="activeName === 'seven'" />
<kettle-setting v-if="activeName === 'eight'" />
@ -123,6 +121,14 @@ export default {
padding-bottom: 20px;
}
}
.max-w600 {
width: 100%;
height: 100%;
& > :nth-child(1) {
box-sizing: border-box;
padding-bottom: 20px;
}
}
}
.is-center {

View File

@ -432,7 +432,7 @@ export default {
}
},
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)
if (!regep.test(value) && this.formType === 'add') {
const msg = this.$t('user.user_name_pattern_error')

View File

@ -4,7 +4,7 @@ import Stomp from 'stompjs'
import store from '@/store'
class DeWebsocket {
constructor() {
this.ws_url = '/websocket'
this.ws_url = `${process.env.VUE_APP_BASE_API}websocket`
this.client = null
this.channels = [
{

View File

@ -348,10 +348,6 @@
this.pointParam.viewId = this.chart.id
const param = this.pointParam
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
}
const linkageParam = {

View File

@ -1,8 +1,8 @@
#!/bin/sh
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

View File

@ -5,9 +5,9 @@
"cost": 0,
"category": "view",
"descript": "AntV G2Plot 组合图插件",
"version": "1.18.9",
"version": "1.18.10",
"creator": "DATAEASE",
"moduleName": "view-chartmix-backend",
"require": "1.18.9",
"require": "1.18.10",
"dsType": ""
}

View File

@ -1,5 +1,6 @@
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.request.permission.DataSetRowPermissionsTreeDTO;
import io.dataease.plugins.common.util.ConstantsUtil;
@ -19,7 +20,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class DefaultViewStatHandler implements PluginViewStatHandler {
public class ChartMixViewStatHandler implements PluginViewStatHandler {
@Override
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> 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<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<>();
orders.addAll(xOrders);
orders.addAll(yOrders);
System.out.println("11111111 orders: " + new Gson().toJson(orders));
List<String> aggWheres = new ArrayList<>();
aggWheres.addAll(yWheres.stream().filter(ObjectUtils::isNotEmpty).collect(Collectors.toList()));

View File

@ -3,7 +3,7 @@ package io.dataease.plugins.view.official.impl;
import com.google.gson.Gson;
import io.dataease.plugins.common.dto.StaticResource;
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 org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
@ -110,11 +110,10 @@ public class ChartMixService extends ViewPluginService {
if (CollectionUtils.isNotEmpty(yAxisExt)) {
yAxis.addAll(yAxisExt);
}*/
System.out.println(new Gson().toJson(yAxis));
if (CollectionUtils.isEmpty(xAxis) || CollectionUtils.isEmpty(yAxis)) {
return null;
}
String sql = new DefaultViewStatHandler().build(param, this);
String sql = new ChartMixViewStatHandler().build(param, this);
System.out.println(sql);
return sql;

View File

@ -16,6 +16,34 @@
<el-color-picker v-model="labelForm.color" class="color-picker-style" :predefine="predefineColors"
@change="changeLabelAttr"/>
</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-select v-model="values" :placeholder="$t('commons.please_select')" multiple collapse-tags
@change="changeFields">
@ -125,7 +153,12 @@ export default {
],
predefineColors: COLOR_PANEL,
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: {

View File

@ -70,7 +70,7 @@
/>
</el-tag>
<el-dropdown-menu slot="dropdown">
<!-- <el-dropdown-item>
<el-dropdown-item>
<el-dropdown
placement="right-start"
size="mini"
@ -83,7 +83,7 @@
<span>{{ $t('chart.sort') }}</span>
<span class="summary-span-item">({{ $t('chart.' + item.sort) }})</span>
</span>
<i class="el-icon-arrow-right el-icon&#45;&#45;right"/>
<i class="el-icon-arrow-right el-icon--right"/>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="beforeSort('none')">{{ $t('chart.none') }}</el-dropdown-item>
@ -95,82 +95,82 @@
>{{ $t('chart.custom_sort') }}...</el-dropdown-item>
</el-dropdown-menu>
</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&#45;&#45;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&#45;&#45;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
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&#45;&#45;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&#45;&#45;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
v-if="chart && chart.render === 'antv' && chart.type.includes('table') && item.groupType === 'q'"
icon="el-icon-notebook-2"
divided
:command="beforeClickItem('formatter')"
>
<span>{{ $t('chart.value_formatter') }}...</span>
</el-dropdown-item>-->
<el-dropdown-item
v-if="chart && chart.render === 'antv' && chart.type.includes('table') && item.groupType === 'q'"
icon="el-icon-notebook-2"
divided
:command="beforeClickItem('formatter')"
>
<span>{{ $t('chart.value_formatter') }}...</span>
</el-dropdown-item>-->
<el-dropdown-item
icon="el-icon-edit-outline"
:command="beforeClickItem('rename')"

View File

@ -1,24 +1,65 @@
<template>
<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" />
<el-dropdown trigger="click" size="mini" @command="clickItem">
<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"
/>
<el-dropdown
trigger="click"
size="mini"
@command="clickItem"
>
<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">
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span class="item-span-style" :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;" />
<span
class="item-span-style"
: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-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>
</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>
</el-dropdown-item>
</el-dropdown-menu>
@ -28,11 +69,12 @@
</template>
<script>
import { getItemType } from './utils'
import {getItemType} from './utils'
import FieldErrorTips from './FieldErrorTips'
export default {
name: 'FilterItem',
components: { FieldErrorTips },
components: {FieldErrorTips},
props: {
param: {
type: Object,
@ -53,25 +95,34 @@ export default {
quotaData: {
type: Array,
required: true
}
},
bus: {
type: Object,
required: false,
default: null
},
},
data() {
return {
tagType: 'success'
tagType: 'success'
}
},
watch: {
dimensionData: function() {
dimensionData: function () {
this.getItemTagType()
},
quotaData: function() {
quotaData: function () {
this.getItemTagType()
},
item: function() {
item: function () {
this.getItemTagType()
}
},
mounted() {
this.bus.$on('reset-change-table', this.getItemTagType)
},
beforeDestroy() {
this.bus.$off('reset-change-table', this.getItemTagType)
},
methods: {
clickItem(param) {
@ -110,45 +161,45 @@ export default {
</script>
<style scoped>
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
display: flex;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
width: 159px;
}
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
display: flex;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
width: 159px;
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
}
span {
font-size: 12px;
}
span {
font-size: 12px;
}
.summary-span{
margin-left: 4px;
color: #878d9f;;
}
.summary-span {
margin-left: 4px;
color: #878d9f;;
}
.inner-dropdown-menu{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%
}
.inner-dropdown-menu {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%
}
.item-span-style{
display: inline-block;
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.item-span-style {
display: inline-block;
width: 115px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>

View File

@ -8,19 +8,19 @@
<draggable v-model="view.xaxis" group="drag" animation="300" :move="onMove" class="drag-block-style"
@add="addXaxis" @update="calcData(true)">
<transition-group class="draggable-group">
<sankey-dimension-item v-for="(item,index) in view.xaxis" :key="index"
:param="param"
:index="0"
:item="item"
:dimension-data="dimension"
:quota-data="quotaData"
:chart="chart"
@onDimensionItemChange="dimensionItemChange"
@onDimensionItemRemove="dimensionItemRemove"
@editItemFilter="showDimensionEditFilter"
@onNameEdit="showRename"
dimension-name="dimension"
:bus="bus"
<dimension-item v-for="(item,index) in view.xaxis" :key="index"
:param="param"
:index="0"
:item="item"
:dimension-data="dimension"
:quota-data="quotaData"
:chart="chart"
@onDimensionItemChange="dimensionItemChange"
@onDimensionItemRemove="dimensionItemRemove"
@editItemFilter="showDimensionEditFilter"
@onNameEdit="showRename"
dimension-name="dimension"
:bus="bus"
/>
</transition-group>
</draggable>
@ -84,7 +84,7 @@
@add="addCustomFilter" @update="calcData(true)">
<transition-group class="draggable-group">
<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"
@editItemFilter="showEditFilter"/>
</transition-group>
@ -98,7 +98,7 @@
</template>
<script>
import SankeyDimensionItem from '@/components/views/SankeyDimensionItem'
import DimensionItem from '@/components/views/DimensionItem'
import QuotaItem from '@/components/views/QuotaItem'
import QuotaExtItem from '@/components/views/QuotaExtItem'
import FilterItem from '@/components/views/FilterItem'
@ -118,7 +118,7 @@ export default {
},
},
components: {
SankeyDimensionItem,
DimensionItem,
QuotaItem,
QuotaExtItem,
FilterItem
@ -197,7 +197,9 @@ export default {
},
addXaxis(e) {
if (this.view.type !== 'table-info') {
this.dragCheckType(this.view.xaxis, 'd')
}
this.dragMoveDuplicate(this.view.xaxis, e)
/*if (this.view.xaxis.length > 1) {
this.view.xaxis = [this.view.xaxis[0]]

View File

@ -36,7 +36,13 @@ import {Mix} from '@antv/g2plot'
import {uuid, hexColorToRGBA} from '@/utils/chartmix'
import ViewTrackBar from '@/components/views/ViewTrackBar'
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 _ from 'lodash';
import {clear} from 'size-sensor'
@ -134,6 +140,12 @@ export default {
},
linkageActiveParam: null,
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.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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}
@ -251,23 +263,6 @@ export default {
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()
},
@ -294,6 +289,7 @@ export default {
let customAttr = undefined;
let colors = undefined;
let labelSetting = undefined;
let labelPosition = 'middle';
if (this.chart.customAttr) {
customAttr = JSON.parse(this.chart.customAttr);
if (customAttr) {
@ -302,15 +298,12 @@ export default {
}
if (customAttr.label) {
labelSetting = customAttr.label.show ? {
callback: function (x) {
return {
style: {
fill: customAttr.label.color,
fontSize: parseInt(customAttr.label.fontSize),
},
};
style: {
fill: customAttr.label.color,
fontSize: parseInt(customAttr.label.fontSize),
},
} : false
labelPosition = customAttr.label.position;
}
}
}
@ -330,8 +323,16 @@ export default {
names.push(t.name);
const _chartType = this.getChartType(yaxisList[_index].chartType);
if (_chartType === "column") {
_labelSetting.position = labelPosition;
} else {
_labelSetting.position = undefined;
}
return {
type: this.getChartType(yaxisList[_index].chartType),
type: _chartType,
name: t.name,
options: {
data: _.map(t.data, (v) => {
@ -374,8 +375,17 @@ export default {
names.push(t.name);
const _chartType = this.getChartType(yaxisExtList[_index].chartType);
if (_chartType === "column") {
_labelSetting.position = labelPosition;
} else {
_labelSetting.position = undefined;
}
return {
type: this.getChartType(yaxisExtList[_index].chartType),
type: _chartType,
name: t.name,
options: {
data: _.map(t.data, (v) => {
@ -444,7 +454,6 @@ export default {
item.value = valueFormatter(item.data.value, yaxisExtList[item.data.i].formatterCfg)
}
})
console.log(originalItems)
return _.filter(originalItems, (item) => {
const v = item.data.key;
if (item.title === v && item.title === item.value && item.name === "key" || !names.includes(item.name)) {

View File

@ -1,6 +1,5 @@
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.request.permission.DataSetRowPermissionsTreeDTO;
import io.dataease.plugins.common.util.ConstantsUtil;
@ -21,7 +20,7 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
public class DefaultViewStatHandler implements PluginViewStatHandler {
public class RaceBarViewStatHandler implements PluginViewStatHandler {
@Override
public String build(PluginViewParam pluginViewParam, ViewPluginService viewPluginService) {

View File

@ -1,11 +1,10 @@
package io.dataease.plugins.view.official.impl;
import com.google.gson.Gson;
import io.dataease.plugins.common.dto.StaticResource;
import io.dataease.plugins.view.entity.PluginViewField;
import io.dataease.plugins.view.entity.PluginViewParam;
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 org.apache.commons.collections4.CollectionUtils;
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) {
return null;
}
String sql = new DefaultViewStatHandler().build(param, this);
String sql = new RaceBarViewStatHandler().build(param, this);
return sql;
}

View File

@ -1,7 +1,7 @@
<template>
<div style="width: 100%;">
<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-checkbox v-model="labelForm.show" @change="changeAttr">{{ $t('chart.show') }}</el-checkbox>
</el-form-item>
@ -29,30 +29,58 @@
/>
</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
:label="$t('chart.text_pos_bottom')"
class="form-item"
prop="marginBottom"
prop="bottom"
>
<el-input
v-model="labelForm.bottom"
type="number"
class="hide-icon-number"
@change="changeAttr"
/>
>
<template
v-if="unitSuffix"
slot="append"
>
{{ unitSuffix }}
</template>
</el-input>
</el-form-item>
<el-form-item
:label="$t('chart.text_pos_right')"
class="form-item"
prop="marginRight"
prop="right"
>
<el-input
v-model="labelForm.right"
type="number"
class="hide-icon-number"
@change="changeAttr"
/>
>
<template
v-if="unitSuffix"
slot="append"
>
{{ unitSuffix }}
</template>
</el-input>
</el-form-item>
</div>
@ -62,7 +90,7 @@
</template>
<script>
import {DEFAULT_Graphic, COLOR_PANEL} from '../../utils/map'
import {DEFAULT_Graphic, COLOR_PANEL, getMarginUnit} from '../../utils/map'
export default {
name: 'SliderSetting',
@ -76,12 +104,25 @@ export default {
required: true
}
},
computed: {
unitSuffix() {
return getMarginUnit(this.labelForm)
},
},
data() {
return {
labelForm: JSON.parse(JSON.stringify(DEFAULT_Graphic)),
isSetting: false,
predefineColors: COLOR_PANEL,
fontSize: [],
rules: {
bottom: [
{validator: this.validateMarginNumber, trigger: ['blur', 'change']}
],
right: [
{validator: this.validateMarginNumber, trigger: ['blur', 'change']}
]
}
}
},
watch: {
@ -129,6 +170,35 @@ export default {
}
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>

View File

@ -1,24 +1,65 @@
<template>
<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" />
<el-dropdown trigger="click" size="mini" @command="clickItem">
<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"
/>
<el-dropdown
trigger="click"
size="mini"
@command="clickItem"
>
<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">
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
<svg-icon
v-if="item.deType === 0"
icon-class="field_text"
class="field-icon-text"
/>
<svg-icon
v-if="item.deType === 1"
icon-class="field_time"
class="field-icon-time"
/>
<svg-icon
v-if="item.deType === 2 || item.deType === 3"
icon-class="field_value"
class="field-icon-value"
/>
<svg-icon
v-if="item.deType === 5"
icon-class="field_location"
class="field-icon-location"
/>
</span>
<span class="item-span-style" :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;" />
<span
class="item-span-style"
: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-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>
</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>
</el-dropdown-item>
</el-dropdown-menu>
@ -28,11 +69,12 @@
</template>
<script>
import { getItemType } from './utils'
import {getItemType} from './utils'
import FieldErrorTips from './FieldErrorTips'
export default {
name: 'FilterItem',
components: { FieldErrorTips },
components: {FieldErrorTips},
props: {
param: {
type: Object,
@ -53,25 +95,34 @@ export default {
quotaData: {
type: Array,
required: true
}
},
bus: {
type: Object,
required: false,
default: null
},
},
data() {
return {
tagType: 'success'
tagType: 'success'
}
},
watch: {
dimensionData: function() {
dimensionData: function () {
this.getItemTagType()
},
quotaData: function() {
quotaData: function () {
this.getItemTagType()
},
item: function() {
item: function () {
this.getItemTagType()
}
},
mounted() {
this.bus.$on('reset-change-table', this.getItemTagType)
},
beforeDestroy() {
this.bus.$off('reset-change-table', this.getItemTagType)
},
methods: {
clickItem(param) {
@ -110,45 +161,45 @@ export default {
</script>
<style scoped>
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
display: flex;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
width: 159px;
}
.item-axis {
padding: 1px 6px;
margin: 0 3px 2px 3px;
text-align: left;
height: 24px;
line-height: 22px;
display: flex;
border-radius: 4px;
box-sizing: border-box;
white-space: nowrap;
width: 159px;
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
}
.item-axis:hover {
background-color: #fdfdfd;
cursor: pointer;
}
span {
font-size: 12px;
}
span {
font-size: 12px;
}
.summary-span{
margin-left: 4px;
color: #878d9f;;
}
.summary-span {
margin-left: 4px;
color: #878d9f;;
}
.inner-dropdown-menu{
display: flex;
justify-content: space-between;
align-items: center;
width: 100%
}
.inner-dropdown-menu {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%
}
.item-span-style{
display: inline-block;
width: 100px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.item-span-style {
display: inline-block;
width: 115px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>

View File

@ -87,6 +87,7 @@ export const DEFAULT_SLIDER = {
export const DEFAULT_Graphic = {
show: true,
fontSize: '60',
marginModel: 'absolute',
color: '#000000',
alpha: 25,
bottom: 90,
@ -842,7 +843,7 @@ const hexToRgba = (hex, opacity) => {
}
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 === 'relative') return '%'
return null

View File

@ -9,18 +9,18 @@
@add="addXaxis" @update="calcData(true)">
<transition-group class="draggable-group">
<dimension-item v-for="(item,index) in view.xaxis" :key="index"
:param="param"
:index="0"
:item="item"
:dimension-data="dimension"
:quota-data="quotaData"
:chart="chart"
@onDimensionItemChange="dimensionItemChange"
@onDimensionItemRemove="dimensionItemRemove"
@editItemFilter="showDimensionEditFilter"
@onNameEdit="showRename"
dimension-name="dimension"
:bus="bus"
:param="param"
:index="0"
:item="item"
:dimension-data="dimension"
:quota-data="quotaData"
:chart="chart"
@onDimensionItemChange="dimensionItemChange"
@onDimensionItemRemove="dimensionItemRemove"
@editItemFilter="showDimensionEditFilter"
@onNameEdit="showRename"
dimension-name="dimension"
:bus="bus"
/>
</transition-group>
</draggable>
@ -97,7 +97,7 @@
@add="addCustomFilter" @update="calcData(true)">
<transition-group class="draggable-group">
<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"
@editItemFilter="showEditFilter"/>
</transition-group>
@ -111,10 +111,10 @@
</template>
<script>
import DimensionItem from '@/components/views/DimensionItem'
import DimensionExtItem from '@/components/views/DimensionExtItem'
import QuotaItem from '@/components/views/QuotaItem'
import FilterItem from '@/components/views/FilterItem'
import DimensionItem from '../../../components/views/DimensionItem'
import DimensionExtItem from '../../../components/views/DimensionExtItem'
import QuotaItem from '../../../components/views/QuotaItem'
import FilterItem from '../../../components/views/FilterItem'
import messages from '@/de-base/lang/messages'
export default {
@ -176,11 +176,41 @@ export default {
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() {
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: {
executeAxios(url, type, data, callBack) {
const param = {
@ -210,37 +240,39 @@ export default {
},
addXaxis(e) {
if (this.view.type !== 'table-info') {
this.dragCheckType(this.view.xaxis, 'd')
}
this.dragMoveDuplicate(this.view.xaxis, e)
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) {
if (this.view.type !== 'table-info') {
this.dragCheckType(this.view.xaxisExt, 'd')
}
this.dragMoveDuplicate(this.view.xaxisExt, e)
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) {
this.dragCheckType(this.view.yaxis, 'q')
this.dragMoveDuplicate(this.view.yaxis, e)
if ( this.view.yaxis.length > 1) {
this.view.yaxis = [this.view.yaxis[0]]
if (this.view.yaxis.length > 1) {
//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) {
console.log(cache)
//console.log(cache)
//this.view.xaxis = [...this.source, ...this.target]
this.$emit('plugin-call-back', {

View File

@ -46,7 +46,7 @@ import {
componentStyle,
seniorCfg,
DEFAULT_SLIDER,
DEFAULT_Graphic,
DEFAULT_Graphic, getMarginUnit,
} from '../../../utils/map';
import ChartTitleUpdate from '../../../components/views/ChartTitleUpdate';
import {mapState} from 'vuex'
@ -554,17 +554,20 @@ export default {
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.font = 'bolder ' + DEFAULT_Graphic.fontSize + 'px monospace';
chart_option.graphic.elements[0].right = DEFAULT_Graphic.right;
chart_option.graphic.elements[0].bottom = DEFAULT_Graphic.bottom;
chart_option.graphic.elements[0].right = DEFAULT_Graphic.right + 'px';
chart_option.graphic.elements[0].bottom = DEFAULT_Graphic.bottom + 'px';
if (customAttr.graphic) {
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';
const unit = _.defaultTo(getMarginUnit(customAttr.graphic), '');
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) {
chart_option.graphic.elements[0].bottom = customAttr.graphic.bottom;
chart_option.graphic.elements[0].bottom = customAttr.graphic.bottom + unit;
}
}
} else {

View File

@ -133,6 +133,12 @@ export default {
},
linkageActiveParam: null,
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.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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}
@ -249,23 +255,6 @@ export default {
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()
},

View File

@ -107,7 +107,13 @@
content: ''
},
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.pointLayer.layerPickService.layer.textureService.destroy()
this.pointLayer.layerPickService.layer.textureService.rendererService.destroy()
@ -200,7 +206,7 @@
if (this.textLayer) {
this.textLayer.configService.clean() // GlobalConfigService
}
if (this.pointLayer) {
for (const key in this.pointLayer) {
this.pointLayer[key] = null
@ -574,7 +580,7 @@
this.titleClass.fontStyle = customStyle.text.isItalic ? 'italic' : '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.textShadow = customStyle.text.fontShadow ? '2px 2px 4px' : 'none'
}